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

com.klarna.rest.api.payments.model.PaymentsCustomerTokenCreationRequest 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.PaymentsAddress;
import com.klarna.rest.api.payments.model.PaymentsCustomer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

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

  @JsonProperty("customer")
  private PaymentsCustomer customer = null;

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

  /**
   * Intended use for the token.
   */
  public enum IntendedUseEnum {
    SUBSCRIPTION("SUBSCRIPTION");

    private String value;

    IntendedUseEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static IntendedUseEnum fromValue(String text) {
      for (IntendedUseEnum b : IntendedUseEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }
  }

  @JsonProperty("intended_use")
  private IntendedUseEnum intendedUse = null;

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

  @JsonProperty("purchase_country")
  private String purchaseCountry = null;

  @JsonProperty("purchase_currency")
  private String purchaseCurrency = null;

  public PaymentsCustomerTokenCreationRequest billingAddress(PaymentsAddress billingAddress) {
    this.billingAddress = billingAddress;
    return this;
  }

   /**
   * Once the customer has provided any data, updates to this object will be ignored (without generating an error).
   * @return billingAddress
  **/
  @ApiModelProperty(value = "Once the customer has provided any data, updates to this object will be ignored (without generating an error).")
  public PaymentsAddress getBillingAddress() {
    return billingAddress;
  }

  public void setBillingAddress(PaymentsAddress billingAddress) {
    this.billingAddress = billingAddress;
  }

  public PaymentsCustomerTokenCreationRequest customer(PaymentsCustomer customer) {
    this.customer = customer;
    return this;
  }

   /**
   * Information about the liable customer of the order.
   * @return customer
  **/
  @ApiModelProperty(value = "Information about the liable customer of the order.")
  public PaymentsCustomer getCustomer() {
    return customer;
  }

  public void setCustomer(PaymentsCustomer customer) {
    this.customer = customer;
  }

  public PaymentsCustomerTokenCreationRequest description(String description) {
    this.description = description;
    return this;
  }

   /**
   * Description of the purpose of the token.
   * @return description
  **/
  @ApiModelProperty(required = true, value = "Description of the purpose of the token.")
  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public PaymentsCustomerTokenCreationRequest intendedUse(IntendedUseEnum intendedUse) {
    this.intendedUse = intendedUse;
    return this;
  }

   /**
   * Intended use for the token.
   * @return intendedUse
  **/
  @ApiModelProperty(required = true, value = "Intended use for the token.")
  public IntendedUseEnum getIntendedUse() {
    return intendedUse;
  }

  public void setIntendedUse(IntendedUseEnum intendedUse) {
    this.intendedUse = intendedUse;
  }

  public PaymentsCustomerTokenCreationRequest locale(String locale) {
    this.locale = locale;
    return this;
  }

   /**
   * RFC 1766 customer's locale.
   * @return locale
  **/
  @ApiModelProperty(example = "en-US", required = true, value = "RFC 1766 customer's locale.")
  public String getLocale() {
    return locale;
  }

  public void setLocale(String locale) {
    this.locale = locale;
  }

  public PaymentsCustomerTokenCreationRequest purchaseCountry(String purchaseCountry) {
    this.purchaseCountry = purchaseCountry;
    return this;
  }

   /**
   * ISO 3166 alpha-2 purchase country.
   * @return purchaseCountry
  **/
  @ApiModelProperty(example = "US", required = true, value = "ISO 3166 alpha-2 purchase country.")
  public String getPurchaseCountry() {
    return purchaseCountry;
  }

  public void setPurchaseCountry(String purchaseCountry) {
    this.purchaseCountry = purchaseCountry;
  }

  public PaymentsCustomerTokenCreationRequest 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;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentsCustomerTokenCreationRequest customerTokenCreationRequest = (PaymentsCustomerTokenCreationRequest) o;
    return Objects.equals(this.billingAddress, customerTokenCreationRequest.billingAddress) &&
        Objects.equals(this.customer, customerTokenCreationRequest.customer) &&
        Objects.equals(this.description, customerTokenCreationRequest.description) &&
        Objects.equals(this.intendedUse, customerTokenCreationRequest.intendedUse) &&
        Objects.equals(this.locale, customerTokenCreationRequest.locale) &&
        Objects.equals(this.purchaseCountry, customerTokenCreationRequest.purchaseCountry) &&
        Objects.equals(this.purchaseCurrency, customerTokenCreationRequest.purchaseCurrency);
  }

  @Override
  public int hashCode() {
    return Objects.hash(billingAddress, customer, description, intendedUse, locale, purchaseCountry, purchaseCurrency);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentsCustomerTokenCreationRequest {\n");
    
    sb.append("    billingAddress: ").append(toIndentedString(billingAddress)).append("\n");
    sb.append("    customer: ").append(toIndentedString(customer)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    intendedUse: ").append(toIndentedString(intendedUse)).append("\n");
    sb.append("    locale: ").append(toIndentedString(locale)).append("\n");
    sb.append("    purchaseCountry: ").append(toIndentedString(purchaseCountry)).append("\n");
    sb.append("    purchaseCurrency: ").append(toIndentedString(purchaseCurrency)).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