com.klarna.rest.api.customer_token.model.TokenCustomerTokenOrder 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.customer_token.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.customer_token.model.TokenAddress;
import com.klarna.rest.api.customer_token.model.TokenAttachment;
import com.klarna.rest.api.customer_token.model.TokenMerchantUrls;
import com.klarna.rest.api.customer_token.model.TokenOrderLine;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
* TokenCustomerTokenOrder
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-20T10:21:37.701Z")
public class TokenCustomerTokenOrder {
@JsonProperty("attachment")
private TokenAttachment attachment = null;
@JsonProperty("auto_capture")
private Boolean autoCapture = false;
@JsonProperty("customer_token_order_merchant_urls")
private TokenMerchantUrls customerTokenOrderMerchantUrls = null;
@JsonProperty("merchant_data")
private String merchantData = null;
@JsonProperty("merchant_reference1")
private String merchantReference1 = null;
@JsonProperty("merchant_reference2")
private String merchantReference2 = null;
@JsonProperty("order_amount")
private Long orderAmount = null;
@JsonProperty("order_lines")
private List orderLines = new ArrayList();
@JsonProperty("order_tax_amount")
private Long orderTaxAmount = null;
@JsonProperty("payment_method_reference")
private String paymentMethodReference = null;
@JsonProperty("purchase_currency")
private String purchaseCurrency = null;
@JsonProperty("shipping_address")
private TokenAddress shippingAddress = null;
@JsonProperty("usage")
private String usage = null;
public TokenCustomerTokenOrder attachment(TokenAttachment attachment) {
this.attachment = attachment;
return this;
}
/**
* Additional purchase information required for some industries.
* @return attachment
**/
@ApiModelProperty(value = "Additional purchase information required for some industries.")
public TokenAttachment getAttachment() {
return attachment;
}
public void setAttachment(TokenAttachment attachment) {
this.attachment = attachment;
}
public TokenCustomerTokenOrder autoCapture(Boolean autoCapture) {
this.autoCapture = autoCapture;
return this;
}
/**
* Allow merchant to trigger auto capturing.
* @return autoCapture
**/
@ApiModelProperty(value = "Allow merchant to trigger auto capturing.")
public Boolean isAutoCapture() {
return autoCapture;
}
public void setAutoCapture(Boolean autoCapture) {
this.autoCapture = autoCapture;
}
public TokenCustomerTokenOrder customerTokenOrderMerchantUrls(TokenMerchantUrls customerTokenOrderMerchantUrls) {
this.customerTokenOrderMerchantUrls = customerTokenOrderMerchantUrls;
return this;
}
/**
* The merchant_urls object.
* @return customerTokenOrderMerchantUrls
**/
@ApiModelProperty(value = "The merchant_urls object.")
public TokenMerchantUrls getCustomerTokenOrderMerchantUrls() {
return customerTokenOrderMerchantUrls;
}
public void setCustomerTokenOrderMerchantUrls(TokenMerchantUrls customerTokenOrderMerchantUrls) {
this.customerTokenOrderMerchantUrls = customerTokenOrderMerchantUrls;
}
public TokenCustomerTokenOrder merchantData(String merchantData) {
this.merchantData = merchantData;
return this;
}
/**
* Pass through field (max 1024 characters).
* @return merchantData
**/
@ApiModelProperty(example = "{\"order_speicif\":[{\"substore\":\"Women's Fashion\",\"product_name\":\"Women Sweatshirt\"}]}", value = "Pass through field (max 1024 characters).")
public String getMerchantData() {
return merchantData;
}
public void setMerchantData(String merchantData) {
this.merchantData = merchantData;
}
public TokenCustomerTokenOrder merchantReference1(String merchantReference1) {
this.merchantReference1 = merchantReference1;
return this;
}
/**
* Used for storing merchant's internal order number or other reference. If set, will be shown on the confirmation page as \"order number\" (max 255 characters).
* @return merchantReference1
**/
@ApiModelProperty(example = "45aa52f387871e3a210645d4", value = "Used for storing merchant's internal order number or other reference. If set, will be shown on the confirmation page as \"order number\" (max 255 characters).")
public String getMerchantReference1() {
return merchantReference1;
}
public void setMerchantReference1(String merchantReference1) {
this.merchantReference1 = merchantReference1;
}
public TokenCustomerTokenOrder merchantReference2(String merchantReference2) {
this.merchantReference2 = merchantReference2;
return this;
}
/**
* Used for storing merchant's internal order number or other reference (max 255 characters).
* @return merchantReference2
**/
@ApiModelProperty(example = "45aa52f387871e3a210645d4", value = "Used for storing merchant's internal order number or other reference (max 255 characters).")
public String getMerchantReference2() {
return merchantReference2;
}
public void setMerchantReference2(String merchantReference2) {
this.merchantReference2 = merchantReference2;
}
public TokenCustomerTokenOrder orderAmount(Long orderAmount) {
this.orderAmount = orderAmount;
return this;
}
/**
* Non-negative, minor units. Total amount of the order, including tax and any discounts.
* minimum: 0
* @return orderAmount
**/
@ApiModelProperty(required = true, value = "Non-negative, minor units. Total amount of the order, including tax and any discounts.")
public Long getOrderAmount() {
return orderAmount;
}
public void setOrderAmount(Long orderAmount) {
this.orderAmount = orderAmount;
}
public TokenCustomerTokenOrder orderLines(List orderLines) {
this.orderLines = orderLines;
return this;
}
public TokenCustomerTokenOrder addOrderLinesItem(TokenOrderLine orderLinesItem) {
this.orderLines.add(orderLinesItem);
return this;
}
/**
* The applicable order lines (max 1000)
* @return orderLines
**/
@ApiModelProperty(required = true, value = "The applicable order lines (max 1000)")
public List getOrderLines() {
return orderLines;
}
public void setOrderLines(List orderLines) {
this.orderLines = orderLines;
}
public TokenCustomerTokenOrder orderTaxAmount(Long orderTaxAmount) {
this.orderTaxAmount = orderTaxAmount;
return this;
}
/**
* Non-negative, minor units. The total tax amount of the order.
* minimum: 0
* @return orderTaxAmount
**/
@ApiModelProperty(required = true, value = "Non-negative, minor units. The total tax amount of the order.")
public Long getOrderTaxAmount() {
return orderTaxAmount;
}
public void setOrderTaxAmount(Long orderTaxAmount) {
this.orderTaxAmount = orderTaxAmount;
}
public TokenCustomerTokenOrder paymentMethodReference(String paymentMethodReference) {
this.paymentMethodReference = paymentMethodReference;
return this;
}
/**
* Used for slice it purchases to use termns
* @return paymentMethodReference
**/
@ApiModelProperty(example = "0b1d9815-165e-42e2-8867-35bc03789e00", value = "Used for slice it purchases to use termns")
public String getPaymentMethodReference() {
return paymentMethodReference;
}
public void setPaymentMethodReference(String paymentMethodReference) {
this.paymentMethodReference = paymentMethodReference;
}
public TokenCustomerTokenOrder purchaseCurrency(String purchaseCurrency) {
this.purchaseCurrency = purchaseCurrency;
return this;
}
/**
* ISO 4217 purchase currency.
* @return purchaseCurrency
**/
@ApiModelProperty(example = "USD", required = true, value = "ISO 4217 purchase currency.")
public String getPurchaseCurrency() {
return purchaseCurrency;
}
public void setPurchaseCurrency(String purchaseCurrency) {
this.purchaseCurrency = purchaseCurrency;
}
/**
* Shipping address
* @return shippingAddress
**/
@ApiModelProperty(value = "Shipping address")
public TokenAddress getShippingAddress() {
return shippingAddress;
}
/**
* Get usage
* @return usage
**/
@ApiModelProperty(value = "")
public String getUsage() {
return usage;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TokenCustomerTokenOrder customerTokenOrder = (TokenCustomerTokenOrder) o;
return Objects.equals(this.attachment, customerTokenOrder.attachment) &&
Objects.equals(this.autoCapture, customerTokenOrder.autoCapture) &&
Objects.equals(this.customerTokenOrderMerchantUrls, customerTokenOrder.customerTokenOrderMerchantUrls) &&
Objects.equals(this.merchantData, customerTokenOrder.merchantData) &&
Objects.equals(this.merchantReference1, customerTokenOrder.merchantReference1) &&
Objects.equals(this.merchantReference2, customerTokenOrder.merchantReference2) &&
Objects.equals(this.orderAmount, customerTokenOrder.orderAmount) &&
Objects.equals(this.orderLines, customerTokenOrder.orderLines) &&
Objects.equals(this.orderTaxAmount, customerTokenOrder.orderTaxAmount) &&
Objects.equals(this.paymentMethodReference, customerTokenOrder.paymentMethodReference) &&
Objects.equals(this.purchaseCurrency, customerTokenOrder.purchaseCurrency) &&
Objects.equals(this.shippingAddress, customerTokenOrder.shippingAddress) &&
Objects.equals(this.usage, customerTokenOrder.usage);
}
@Override
public int hashCode() {
return Objects.hash(attachment, autoCapture, customerTokenOrderMerchantUrls, merchantData, merchantReference1, merchantReference2, orderAmount, orderLines, orderTaxAmount, paymentMethodReference, purchaseCurrency, shippingAddress, usage);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TokenCustomerTokenOrder {\n");
sb.append(" attachment: ").append(toIndentedString(attachment)).append("\n");
sb.append(" autoCapture: ").append(toIndentedString(autoCapture)).append("\n");
sb.append(" customerTokenOrderMerchantUrls: ").append(toIndentedString(customerTokenOrderMerchantUrls)).append("\n");
sb.append(" merchantData: ").append(toIndentedString(merchantData)).append("\n");
sb.append(" merchantReference1: ").append(toIndentedString(merchantReference1)).append("\n");
sb.append(" merchantReference2: ").append(toIndentedString(merchantReference2)).append("\n");
sb.append(" orderAmount: ").append(toIndentedString(orderAmount)).append("\n");
sb.append(" orderLines: ").append(toIndentedString(orderLines)).append("\n");
sb.append(" orderTaxAmount: ").append(toIndentedString(orderTaxAmount)).append("\n");
sb.append(" paymentMethodReference: ").append(toIndentedString(paymentMethodReference)).append("\n");
sb.append(" purchaseCurrency: ").append(toIndentedString(purchaseCurrency)).append("\n");
sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n");
sb.append(" usage: ").append(toIndentedString(usage)).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 ");
}
}