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

com.klarna.rest.api.payments.model.PaymentsOrder 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;

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

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

  @JsonProperty("order_id")
  private String orderId = null;

  @JsonProperty("redirect_url")
  private String redirectUrl = null;

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

   /**
   * The payment method authorized for the order
   * @return authorizedPaymentMethod
  **/
  @ApiModelProperty(value = "The payment method authorized for the order")
  public PaymentsAuthorizedPaymentMethod getAuthorizedPaymentMethod() {
    return authorizedPaymentMethod;
  }

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

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

   /**
   * Fraud status for the order. Either ACCEPTED, PENDING or REJECTED.
   * @return fraudStatus
  **/
  @ApiModelProperty(required = true, value = "Fraud status for the order. Either ACCEPTED, PENDING or REJECTED.")
  public String getFraudStatus() {
    return fraudStatus;
  }

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

  public PaymentsOrder orderId(String orderId) {
    this.orderId = orderId;
    return this;
  }

   /**
   * The unique order ID (max 255 characters).
   * @return orderId
  **/
  @ApiModelProperty(required = true, value = "The unique order ID (max 255 characters).")
  public String getOrderId() {
    return orderId;
  }

  public void setOrderId(String orderId) {
    this.orderId = orderId;
  }

  public PaymentsOrder redirectUrl(String redirectUrl) {
    this.redirectUrl = redirectUrl;
    return this;
  }

   /**
   * URL to redirect the customer to after placing the order.
   * @return redirectUrl
  **/
  @ApiModelProperty(example = "https://credit.klarna.com/v1/sessions/0b1d9815-165e-42e2-8867-35bc03789e00/redirect", required = true, value = "URL to redirect the customer to after placing the order.")
  public String getRedirectUrl() {
    return redirectUrl;
  }

  public void setRedirectUrl(String redirectUrl) {
    this.redirectUrl = redirectUrl;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentsOrder order = (PaymentsOrder) o;
    return Objects.equals(this.authorizedPaymentMethod, order.authorizedPaymentMethod) &&
        Objects.equals(this.fraudStatus, order.fraudStatus) &&
        Objects.equals(this.orderId, order.orderId) &&
        Objects.equals(this.redirectUrl, order.redirectUrl);
  }

  @Override
  public int hashCode() {
    return Objects.hash(authorizedPaymentMethod, fraudStatus, orderId, redirectUrl);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentsOrder {\n");
    
    sb.append("    authorizedPaymentMethod: ").append(toIndentedString(authorizedPaymentMethod)).append("\n");
    sb.append("    fraudStatus: ").append(toIndentedString(fraudStatus)).append("\n");
    sb.append("    orderId: ").append(toIndentedString(orderId)).append("\n");
    sb.append("    redirectUrl: ").append(toIndentedString(redirectUrl)).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