com.klarna.rest.api.checkout.model.CheckoutRecurringOrderRequestV1 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.checkout.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.checkout.model.CheckoutAggregatedOrderAddressV2;
import com.klarna.rest.api.checkout.model.CheckoutAggregatedOrderCartV2;
import com.klarna.rest.api.checkout.model.CheckoutMerchantAggregatedOrderV2;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* CheckoutRecurringOrderRequestV1
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-04-02T15:03:42.622Z")
public class CheckoutRecurringOrderRequestV1 {
@JsonProperty("locale")
private String locale = null;
@JsonProperty("cart")
private CheckoutAggregatedOrderCartV2 cart = null;
@JsonProperty("merchant")
private CheckoutMerchantAggregatedOrderV2 merchant = null;
@JsonProperty("merchant_reference")
private Map merchantReference = null;
@JsonProperty("purchase_country")
private String purchaseCountry = null;
@JsonProperty("purchase_currency")
private String purchaseCurrency = null;
@JsonProperty("billing_address")
private CheckoutAggregatedOrderAddressV2 billingAddress = null;
@JsonProperty("shipping_address")
private CheckoutAggregatedOrderAddressV2 shippingAddress = null;
public CheckoutRecurringOrderRequestV1 locale(String locale) {
this.locale = locale;
return this;
}
/**
* Get locale
* @return locale
**/
@ApiModelProperty(value = "")
public String getLocale() {
return locale;
}
public void setLocale(String locale) {
this.locale = locale;
}
public CheckoutRecurringOrderRequestV1 cart(CheckoutAggregatedOrderCartV2 cart) {
this.cart = cart;
return this;
}
/**
* Get cart
* @return cart
**/
@ApiModelProperty(value = "")
public CheckoutAggregatedOrderCartV2 getCart() {
return cart;
}
public void setCart(CheckoutAggregatedOrderCartV2 cart) {
this.cart = cart;
}
public CheckoutRecurringOrderRequestV1 merchant(CheckoutMerchantAggregatedOrderV2 merchant) {
this.merchant = merchant;
return this;
}
/**
* Get merchant
* @return merchant
**/
@ApiModelProperty(required = true, value = "")
public CheckoutMerchantAggregatedOrderV2 getMerchant() {
return merchant;
}
public void setMerchant(CheckoutMerchantAggregatedOrderV2 merchant) {
this.merchant = merchant;
}
public CheckoutRecurringOrderRequestV1 merchantReference(Map merchantReference) {
this.merchantReference = merchantReference;
return this;
}
public CheckoutRecurringOrderRequestV1 putMerchantReferenceItem(String key, String merchantReferenceItem) {
if (this.merchantReference == null) {
this.merchantReference = new HashMap();
}
this.merchantReference.put(key, merchantReferenceItem);
return this;
}
/**
* Get merchantReference
* @return merchantReference
**/
@ApiModelProperty(value = "")
public Map getMerchantReference() {
return merchantReference;
}
public void setMerchantReference(Map merchantReference) {
this.merchantReference = merchantReference;
}
public CheckoutRecurringOrderRequestV1 purchaseCountry(String purchaseCountry) {
this.purchaseCountry = purchaseCountry;
return this;
}
/**
* Get purchaseCountry
* @return purchaseCountry
**/
@ApiModelProperty(value = "")
public String getPurchaseCountry() {
return purchaseCountry;
}
public void setPurchaseCountry(String purchaseCountry) {
this.purchaseCountry = purchaseCountry;
}
public CheckoutRecurringOrderRequestV1 purchaseCurrency(String purchaseCurrency) {
this.purchaseCurrency = purchaseCurrency;
return this;
}
/**
* Get purchaseCurrency
* @return purchaseCurrency
**/
@ApiModelProperty(value = "")
public String getPurchaseCurrency() {
return purchaseCurrency;
}
public void setPurchaseCurrency(String purchaseCurrency) {
this.purchaseCurrency = purchaseCurrency;
}
public CheckoutRecurringOrderRequestV1 billingAddress(CheckoutAggregatedOrderAddressV2 billingAddress) {
this.billingAddress = billingAddress;
return this;
}
/**
* Get billingAddress
* @return billingAddress
**/
@ApiModelProperty(value = "")
public CheckoutAggregatedOrderAddressV2 getBillingAddress() {
return billingAddress;
}
public void setBillingAddress(CheckoutAggregatedOrderAddressV2 billingAddress) {
this.billingAddress = billingAddress;
}
public CheckoutRecurringOrderRequestV1 shippingAddress(CheckoutAggregatedOrderAddressV2 shippingAddress) {
this.shippingAddress = shippingAddress;
return this;
}
/**
* Get shippingAddress
* @return shippingAddress
**/
@ApiModelProperty(value = "")
public CheckoutAggregatedOrderAddressV2 getShippingAddress() {
return shippingAddress;
}
public void setShippingAddress(CheckoutAggregatedOrderAddressV2 shippingAddress) {
this.shippingAddress = shippingAddress;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CheckoutRecurringOrderRequestV1 recurringOrderRequestV1 = (CheckoutRecurringOrderRequestV1) o;
return Objects.equals(this.locale, recurringOrderRequestV1.locale) &&
Objects.equals(this.cart, recurringOrderRequestV1.cart) &&
Objects.equals(this.merchant, recurringOrderRequestV1.merchant) &&
Objects.equals(this.merchantReference, recurringOrderRequestV1.merchantReference) &&
Objects.equals(this.purchaseCountry, recurringOrderRequestV1.purchaseCountry) &&
Objects.equals(this.purchaseCurrency, recurringOrderRequestV1.purchaseCurrency) &&
Objects.equals(this.billingAddress, recurringOrderRequestV1.billingAddress) &&
Objects.equals(this.shippingAddress, recurringOrderRequestV1.shippingAddress);
}
@Override
public int hashCode() {
return Objects.hash(locale, cart, merchant, merchantReference, purchaseCountry, purchaseCurrency, billingAddress, shippingAddress);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CheckoutRecurringOrderRequestV1 {\n");
sb.append(" locale: ").append(toIndentedString(locale)).append("\n");
sb.append(" cart: ").append(toIndentedString(cart)).append("\n");
sb.append(" merchant: ").append(toIndentedString(merchant)).append("\n");
sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n");
sb.append(" purchaseCountry: ").append(toIndentedString(purchaseCountry)).append("\n");
sb.append(" purchaseCurrency: ").append(toIndentedString(purchaseCurrency)).append("\n");
sb.append(" billingAddress: ").append(toIndentedString(billingAddress)).append("\n");
sb.append(" shippingAddress: ").append(toIndentedString(shippingAddress)).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 ");
}
}