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

com.adyen.model.checkout.PaymentMethodToStore Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * Adyen Checkout API
 *
 * The version of the OpenAPI document: 71
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.adyen.model.checkout;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * PaymentMethodToStore
 */
@JsonPropertyOrder({
  PaymentMethodToStore.JSON_PROPERTY_BRAND,
  PaymentMethodToStore.JSON_PROPERTY_CVC,
  PaymentMethodToStore.JSON_PROPERTY_ENCRYPTED_CARD,
  PaymentMethodToStore.JSON_PROPERTY_ENCRYPTED_CARD_NUMBER,
  PaymentMethodToStore.JSON_PROPERTY_ENCRYPTED_EXPIRY_MONTH,
  PaymentMethodToStore.JSON_PROPERTY_ENCRYPTED_EXPIRY_YEAR,
  PaymentMethodToStore.JSON_PROPERTY_ENCRYPTED_SECURITY_CODE,
  PaymentMethodToStore.JSON_PROPERTY_EXPIRY_MONTH,
  PaymentMethodToStore.JSON_PROPERTY_EXPIRY_YEAR,
  PaymentMethodToStore.JSON_PROPERTY_HOLDER_NAME,
  PaymentMethodToStore.JSON_PROPERTY_NUMBER,
  PaymentMethodToStore.JSON_PROPERTY_TYPE
})

public class PaymentMethodToStore {
  public static final String JSON_PROPERTY_BRAND = "brand";
  private String brand;

  public static final String JSON_PROPERTY_CVC = "cvc";
  private String cvc;

  public static final String JSON_PROPERTY_ENCRYPTED_CARD = "encryptedCard";
  private String encryptedCard;

  public static final String JSON_PROPERTY_ENCRYPTED_CARD_NUMBER = "encryptedCardNumber";
  private String encryptedCardNumber;

  public static final String JSON_PROPERTY_ENCRYPTED_EXPIRY_MONTH = "encryptedExpiryMonth";
  private String encryptedExpiryMonth;

  public static final String JSON_PROPERTY_ENCRYPTED_EXPIRY_YEAR = "encryptedExpiryYear";
  private String encryptedExpiryYear;

  public static final String JSON_PROPERTY_ENCRYPTED_SECURITY_CODE = "encryptedSecurityCode";
  private String encryptedSecurityCode;

  public static final String JSON_PROPERTY_EXPIRY_MONTH = "expiryMonth";
  private String expiryMonth;

  public static final String JSON_PROPERTY_EXPIRY_YEAR = "expiryYear";
  private String expiryYear;

  public static final String JSON_PROPERTY_HOLDER_NAME = "holderName";
  private String holderName;

  public static final String JSON_PROPERTY_NUMBER = "number";
  private String number;

  public static final String JSON_PROPERTY_TYPE = "type";
  private String type;

  public PaymentMethodToStore() { 
  }

  /**
   * Secondary brand of the card. For example: **plastix**, **hmclub**.
   *
   * @param brand Secondary brand of the card. For example: **plastix**, **hmclub**.
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore brand(String brand) {
    this.brand = brand;
    return this;
  }

  /**
   * Secondary brand of the card. For example: **plastix**, **hmclub**.
   * @return brand Secondary brand of the card. For example: **plastix**, **hmclub**.
   */
  @JsonProperty(JSON_PROPERTY_BRAND)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getBrand() {
    return brand;
  }

  /**
   * Secondary brand of the card. For example: **plastix**, **hmclub**.
   *
   * @param brand Secondary brand of the card. For example: **plastix**, **hmclub**.
   */
  @JsonProperty(JSON_PROPERTY_BRAND)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBrand(String brand) {
    this.brand = brand;
  }

  /**
   * The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   *
   * @param cvc The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore cvc(String cvc) {
    this.cvc = cvc;
    return this;
  }

  /**
   * The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   * @return cvc The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   */
  @JsonProperty(JSON_PROPERTY_CVC)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getCvc() {
    return cvc;
  }

  /**
   * The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   *
   * @param cvc The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   */
  @JsonProperty(JSON_PROPERTY_CVC)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCvc(String cvc) {
    this.cvc = cvc;
  }

  /**
   * The encrypted card.
   *
   * @param encryptedCard The encrypted card.
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore encryptedCard(String encryptedCard) {
    this.encryptedCard = encryptedCard;
    return this;
  }

  /**
   * The encrypted card.
   * @return encryptedCard The encrypted card.
   */
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_CARD)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getEncryptedCard() {
    return encryptedCard;
  }

  /**
   * The encrypted card.
   *
   * @param encryptedCard The encrypted card.
   */
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_CARD)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEncryptedCard(String encryptedCard) {
    this.encryptedCard = encryptedCard;
  }

  /**
   * The encrypted card number.
   *
   * @param encryptedCardNumber The encrypted card number.
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore encryptedCardNumber(String encryptedCardNumber) {
    this.encryptedCardNumber = encryptedCardNumber;
    return this;
  }

  /**
   * The encrypted card number.
   * @return encryptedCardNumber The encrypted card number.
   */
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_CARD_NUMBER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getEncryptedCardNumber() {
    return encryptedCardNumber;
  }

  /**
   * The encrypted card number.
   *
   * @param encryptedCardNumber The encrypted card number.
   */
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_CARD_NUMBER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEncryptedCardNumber(String encryptedCardNumber) {
    this.encryptedCardNumber = encryptedCardNumber;
  }

  /**
   * The encrypted card expiry month.
   *
   * @param encryptedExpiryMonth The encrypted card expiry month.
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore encryptedExpiryMonth(String encryptedExpiryMonth) {
    this.encryptedExpiryMonth = encryptedExpiryMonth;
    return this;
  }

  /**
   * The encrypted card expiry month.
   * @return encryptedExpiryMonth The encrypted card expiry month.
   */
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_EXPIRY_MONTH)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getEncryptedExpiryMonth() {
    return encryptedExpiryMonth;
  }

  /**
   * The encrypted card expiry month.
   *
   * @param encryptedExpiryMonth The encrypted card expiry month.
   */
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_EXPIRY_MONTH)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEncryptedExpiryMonth(String encryptedExpiryMonth) {
    this.encryptedExpiryMonth = encryptedExpiryMonth;
  }

  /**
   * The encrypted card expiry year.
   *
   * @param encryptedExpiryYear The encrypted card expiry year.
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore encryptedExpiryYear(String encryptedExpiryYear) {
    this.encryptedExpiryYear = encryptedExpiryYear;
    return this;
  }

  /**
   * The encrypted card expiry year.
   * @return encryptedExpiryYear The encrypted card expiry year.
   */
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_EXPIRY_YEAR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getEncryptedExpiryYear() {
    return encryptedExpiryYear;
  }

  /**
   * The encrypted card expiry year.
   *
   * @param encryptedExpiryYear The encrypted card expiry year.
   */
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_EXPIRY_YEAR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEncryptedExpiryYear(String encryptedExpiryYear) {
    this.encryptedExpiryYear = encryptedExpiryYear;
  }

  /**
   * The encrypted card verification code.
   *
   * @param encryptedSecurityCode The encrypted card verification code.
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore encryptedSecurityCode(String encryptedSecurityCode) {
    this.encryptedSecurityCode = encryptedSecurityCode;
    return this;
  }

  /**
   * The encrypted card verification code.
   * @return encryptedSecurityCode The encrypted card verification code.
   */
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_SECURITY_CODE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getEncryptedSecurityCode() {
    return encryptedSecurityCode;
  }

  /**
   * The encrypted card verification code.
   *
   * @param encryptedSecurityCode The encrypted card verification code.
   */
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_SECURITY_CODE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEncryptedSecurityCode(String encryptedSecurityCode) {
    this.encryptedSecurityCode = encryptedSecurityCode;
  }

  /**
   * The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   *
   * @param expiryMonth The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore expiryMonth(String expiryMonth) {
    this.expiryMonth = expiryMonth;
    return this;
  }

  /**
   * The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   * @return expiryMonth The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   */
  @JsonProperty(JSON_PROPERTY_EXPIRY_MONTH)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getExpiryMonth() {
    return expiryMonth;
  }

  /**
   * The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   *
   * @param expiryMonth The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   */
  @JsonProperty(JSON_PROPERTY_EXPIRY_MONTH)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setExpiryMonth(String expiryMonth) {
    this.expiryMonth = expiryMonth;
  }

  /**
   * The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   *
   * @param expiryYear The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore expiryYear(String expiryYear) {
    this.expiryYear = expiryYear;
    return this;
  }

  /**
   * The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   * @return expiryYear The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   */
  @JsonProperty(JSON_PROPERTY_EXPIRY_YEAR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getExpiryYear() {
    return expiryYear;
  }

  /**
   * The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   *
   * @param expiryYear The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   */
  @JsonProperty(JSON_PROPERTY_EXPIRY_YEAR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setExpiryYear(String expiryYear) {
    this.expiryYear = expiryYear;
  }

  /**
   * The name of the card holder.
   *
   * @param holderName The name of the card holder.
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore holderName(String holderName) {
    this.holderName = holderName;
    return this;
  }

  /**
   * The name of the card holder.
   * @return holderName The name of the card holder.
   */
  @JsonProperty(JSON_PROPERTY_HOLDER_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getHolderName() {
    return holderName;
  }

  /**
   * The name of the card holder.
   *
   * @param holderName The name of the card holder.
   */
  @JsonProperty(JSON_PROPERTY_HOLDER_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setHolderName(String holderName) {
    this.holderName = holderName;
  }

  /**
   * The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   *
   * @param number The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore number(String number) {
    this.number = number;
    return this;
  }

  /**
   * The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   * @return number The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   */
  @JsonProperty(JSON_PROPERTY_NUMBER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getNumber() {
    return number;
  }

  /**
   * The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   *
   * @param number The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
   */
  @JsonProperty(JSON_PROPERTY_NUMBER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setNumber(String number) {
    this.number = number;
  }

  /**
   * Set to **scheme**.
   *
   * @param type Set to **scheme**.
   * @return the current {@code PaymentMethodToStore} instance, allowing for method chaining
   */
  public PaymentMethodToStore type(String type) {
    this.type = type;
    return this;
  }

  /**
   * Set to **scheme**.
   * @return type Set to **scheme**.
   */
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getType() {
    return type;
  }

  /**
   * Set to **scheme**.
   *
   * @param type Set to **scheme**.
   */
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setType(String type) {
    this.type = type;
  }

  /**
   * Return true if this PaymentMethodToStore object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentMethodToStore paymentMethodToStore = (PaymentMethodToStore) o;
    return Objects.equals(this.brand, paymentMethodToStore.brand) &&
        Objects.equals(this.cvc, paymentMethodToStore.cvc) &&
        Objects.equals(this.encryptedCard, paymentMethodToStore.encryptedCard) &&
        Objects.equals(this.encryptedCardNumber, paymentMethodToStore.encryptedCardNumber) &&
        Objects.equals(this.encryptedExpiryMonth, paymentMethodToStore.encryptedExpiryMonth) &&
        Objects.equals(this.encryptedExpiryYear, paymentMethodToStore.encryptedExpiryYear) &&
        Objects.equals(this.encryptedSecurityCode, paymentMethodToStore.encryptedSecurityCode) &&
        Objects.equals(this.expiryMonth, paymentMethodToStore.expiryMonth) &&
        Objects.equals(this.expiryYear, paymentMethodToStore.expiryYear) &&
        Objects.equals(this.holderName, paymentMethodToStore.holderName) &&
        Objects.equals(this.number, paymentMethodToStore.number) &&
        Objects.equals(this.type, paymentMethodToStore.type);
  }

  @Override
  public int hashCode() {
    return Objects.hash(brand, cvc, encryptedCard, encryptedCardNumber, encryptedExpiryMonth, encryptedExpiryYear, encryptedSecurityCode, expiryMonth, expiryYear, holderName, number, type);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentMethodToStore {\n");
    sb.append("    brand: ").append(toIndentedString(brand)).append("\n");
    sb.append("    cvc: ").append(toIndentedString(cvc)).append("\n");
    sb.append("    encryptedCard: ").append(toIndentedString(encryptedCard)).append("\n");
    sb.append("    encryptedCardNumber: ").append(toIndentedString(encryptedCardNumber)).append("\n");
    sb.append("    encryptedExpiryMonth: ").append(toIndentedString(encryptedExpiryMonth)).append("\n");
    sb.append("    encryptedExpiryYear: ").append(toIndentedString(encryptedExpiryYear)).append("\n");
    sb.append("    encryptedSecurityCode: ").append(toIndentedString(encryptedSecurityCode)).append("\n");
    sb.append("    expiryMonth: ").append(toIndentedString(expiryMonth)).append("\n");
    sb.append("    expiryYear: ").append(toIndentedString(expiryYear)).append("\n");
    sb.append("    holderName: ").append(toIndentedString(holderName)).append("\n");
    sb.append("    number: ").append(toIndentedString(number)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).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(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

/**
   * Create an instance of PaymentMethodToStore given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of PaymentMethodToStore
   * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentMethodToStore
   */
  public static PaymentMethodToStore fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, PaymentMethodToStore.class);
  }
/**
  * Convert an instance of PaymentMethodToStore to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy