All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.klarna.rest.api.payments.model.PaymentsErrorV2 Maven / Gradle / Ivy

The newest version!
/*
 * 
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.klarna.rest.api.payments.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.klarna.rest.api.payments.model.PaymentsAuthorizedPaymentMethod;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;

/**
 * PaymentsErrorV2
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-20T11:12:59.490Z")
public class PaymentsErrorV2 {
  @JsonProperty("authorized_payment_method")
  private PaymentsAuthorizedPaymentMethod authorizedPaymentMethod = null;

  @JsonProperty("correlation_id")
  private String correlationId = null;

  @JsonProperty("error_code")
  private String errorCode = null;

  @JsonProperty("error_messages")
  private List errorMessages = null;

  @JsonProperty("fraud_status")
  private String fraudStatus = null;

  @JsonProperty("reason")
  private String reason = null;

  public PaymentsErrorV2 authorizedPaymentMethod(PaymentsAuthorizedPaymentMethod authorizedPaymentMethod) {
    this.authorizedPaymentMethod = authorizedPaymentMethod;
    return this;
  }

   /**
   * Get authorizedPaymentMethod
   * @return authorizedPaymentMethod
  **/
  @ApiModelProperty(value = "")
  public PaymentsAuthorizedPaymentMethod getAuthorizedPaymentMethod() {
    return authorizedPaymentMethod;
  }

  public void setAuthorizedPaymentMethod(PaymentsAuthorizedPaymentMethod authorizedPaymentMethod) {
    this.authorizedPaymentMethod = authorizedPaymentMethod;
  }

  public PaymentsErrorV2 correlationId(String correlationId) {
    this.correlationId = correlationId;
    return this;
  }

   /**
   * Get correlationId
   * @return correlationId
  **/
  @ApiModelProperty(value = "")
  public String getCorrelationId() {
    return correlationId;
  }

  public void setCorrelationId(String correlationId) {
    this.correlationId = correlationId;
  }

  public PaymentsErrorV2 errorCode(String errorCode) {
    this.errorCode = errorCode;
    return this;
  }

   /**
   * Get errorCode
   * @return errorCode
  **/
  @ApiModelProperty(value = "")
  public String getErrorCode() {
    return errorCode;
  }

  public void setErrorCode(String errorCode) {
    this.errorCode = errorCode;
  }

  public PaymentsErrorV2 errorMessages(List errorMessages) {
    this.errorMessages = errorMessages;
    return this;
  }

  public PaymentsErrorV2 addErrorMessagesItem(String errorMessagesItem) {
    if (this.errorMessages == null) {
      this.errorMessages = new ArrayList();
    }
    this.errorMessages.add(errorMessagesItem);
    return this;
  }

   /**
   * Get errorMessages
   * @return errorMessages
  **/
  @ApiModelProperty(value = "")
  public List getErrorMessages() {
    return errorMessages;
  }

  public void setErrorMessages(List errorMessages) {
    this.errorMessages = errorMessages;
  }

  public PaymentsErrorV2 fraudStatus(String fraudStatus) {
    this.fraudStatus = fraudStatus;
    return this;
  }

   /**
   * Get fraudStatus
   * @return fraudStatus
  **/
  @ApiModelProperty(value = "")
  public String getFraudStatus() {
    return fraudStatus;
  }

  public void setFraudStatus(String fraudStatus) {
    this.fraudStatus = fraudStatus;
  }

  public PaymentsErrorV2 reason(String reason) {
    this.reason = reason;
    return this;
  }

   /**
   * Get reason
   * @return reason
  **/
  @ApiModelProperty(value = "")
  public String getReason() {
    return reason;
  }

  public void setReason(String reason) {
    this.reason = reason;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentsErrorV2 errorV2 = (PaymentsErrorV2) o;
    return Objects.equals(this.authorizedPaymentMethod, errorV2.authorizedPaymentMethod) &&
        Objects.equals(this.correlationId, errorV2.correlationId) &&
        Objects.equals(this.errorCode, errorV2.errorCode) &&
        Objects.equals(this.errorMessages, errorV2.errorMessages) &&
        Objects.equals(this.fraudStatus, errorV2.fraudStatus) &&
        Objects.equals(this.reason, errorV2.reason);
  }

  @Override
  public int hashCode() {
    return Objects.hash(authorizedPaymentMethod, correlationId, errorCode, errorMessages, fraudStatus, reason);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentsErrorV2 {\n");
    
    sb.append("    authorizedPaymentMethod: ").append(toIndentedString(authorizedPaymentMethod)).append("\n");
    sb.append("    correlationId: ").append(toIndentedString(correlationId)).append("\n");
    sb.append("    errorCode: ").append(toIndentedString(errorCode)).append("\n");
    sb.append("    errorMessages: ").append(toIndentedString(errorMessages)).append("\n");
    sb.append("    fraudStatus: ").append(toIndentedString(fraudStatus)).append("\n");
    sb.append("    reason: ").append(toIndentedString(reason)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy