content: /*
   * 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 com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import java.util.*;
  import java.util.ArrayList;
  import java.util.List;
  
  /** StoredPaymentMethod */
  @JsonPropertyOrder({
    StoredPaymentMethod.JSON_PROPERTY_BANK_ACCOUNT_NUMBER,
    StoredPaymentMethod.JSON_PROPERTY_BANK_LOCATION_ID,
    StoredPaymentMethod.JSON_PROPERTY_BRAND,
    StoredPaymentMethod.JSON_PROPERTY_EXPIRY_MONTH,
    StoredPaymentMethod.JSON_PROPERTY_EXPIRY_YEAR,
    StoredPaymentMethod.JSON_PROPERTY_HOLDER_NAME,
    StoredPaymentMethod.JSON_PROPERTY_IBAN,
    StoredPaymentMethod.JSON_PROPERTY_ID,
    StoredPaymentMethod.JSON_PROPERTY_LABEL,
    StoredPaymentMethod.JSON_PROPERTY_LAST_FOUR,
    StoredPaymentMethod.JSON_PROPERTY_NAME,
    StoredPaymentMethod.JSON_PROPERTY_NETWORK_TX_REFERENCE,
    StoredPaymentMethod.JSON_PROPERTY_OWNER_NAME,
    StoredPaymentMethod.JSON_PROPERTY_SHOPPER_EMAIL,
    StoredPaymentMethod.JSON_PROPERTY_SUPPORTED_RECURRING_PROCESSING_MODELS,
    StoredPaymentMethod.JSON_PROPERTY_SUPPORTED_SHOPPER_INTERACTIONS,
    StoredPaymentMethod.JSON_PROPERTY_TYPE
  })
  public class StoredPaymentMethod {
    public static final String JSON_PROPERTY_BANK_ACCOUNT_NUMBER = "bankAccountNumber";
    private String bankAccountNumber;
  
    public static final String JSON_PROPERTY_BANK_LOCATION_ID = "bankLocationId";
    private String bankLocationId;
  
    public static final String JSON_PROPERTY_BRAND = "brand";
    private String brand;
  
    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_IBAN = "iban";
    private String iban;
  
    public static final String JSON_PROPERTY_ID = "id";
    private String id;
  
    public static final String JSON_PROPERTY_LABEL = "label";
    private String label;
  
    public static final String JSON_PROPERTY_LAST_FOUR = "lastFour";
    private String lastFour;
  
    public static final String JSON_PROPERTY_NAME = "name";
    private String name;
  
    public static final String JSON_PROPERTY_NETWORK_TX_REFERENCE = "networkTxReference";
    private String networkTxReference;
  
    public static final String JSON_PROPERTY_OWNER_NAME = "ownerName";
    private String ownerName;
  
    public static final String JSON_PROPERTY_SHOPPER_EMAIL = "shopperEmail";
    private String shopperEmail;
  
    public static final String JSON_PROPERTY_SUPPORTED_RECURRING_PROCESSING_MODELS =
        "supportedRecurringProcessingModels";
    private List<String> supportedRecurringProcessingModels;
  
    public static final String JSON_PROPERTY_SUPPORTED_SHOPPER_INTERACTIONS =
        "supportedShopperInteractions";
    private List<String> supportedShopperInteractions;
  
    public static final String JSON_PROPERTY_TYPE = "type";
    private String type;
  
    public StoredPaymentMethod() {}
  
    /**
     * The bank account number (without separators).
     *
     * @param bankAccountNumber The bank account number (without separators).
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod bankAccountNumber(String bankAccountNumber) {
      this.bankAccountNumber = bankAccountNumber;
      return this;
    }
  
    /**
     * The bank account number (without separators).
     *
     * @return bankAccountNumber The bank account number (without separators).
     */
    @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getBankAccountNumber() {
      return bankAccountNumber;
    }
  
    /**
     * The bank account number (without separators).
     *
     * @param bankAccountNumber The bank account number (without separators).
     */
    @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setBankAccountNumber(String bankAccountNumber) {
      this.bankAccountNumber = bankAccountNumber;
    }
  
    /**
     * The location id of the bank. The field value is &#x60;nil&#x60; in most cases.
     *
     * @param bankLocationId The location id of the bank. The field value is &#x60;nil&#x60; in most
     *     cases.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod bankLocationId(String bankLocationId) {
      this.bankLocationId = bankLocationId;
      return this;
    }
  
    /**
     * The location id of the bank. The field value is &#x60;nil&#x60; in most cases.
     *
     * @return bankLocationId The location id of the bank. The field value is &#x60;nil&#x60; in most
     *     cases.
     */
    @JsonProperty(JSON_PROPERTY_BANK_LOCATION_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getBankLocationId() {
      return bankLocationId;
    }
  
    /**
     * The location id of the bank. The field value is &#x60;nil&#x60; in most cases.
     *
     * @param bankLocationId The location id of the bank. The field value is &#x60;nil&#x60; in most
     *     cases.
     */
    @JsonProperty(JSON_PROPERTY_BANK_LOCATION_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setBankLocationId(String bankLocationId) {
      this.bankLocationId = bankLocationId;
    }
  
    /**
     * The brand of the card.
     *
     * @param brand The brand of the card.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod brand(String brand) {
      this.brand = brand;
      return this;
    }
  
    /**
     * The brand of the card.
     *
     * @return brand The brand of the card.
     */
    @JsonProperty(JSON_PROPERTY_BRAND)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getBrand() {
      return brand;
    }
  
    /**
     * The brand of the card.
     *
     * @param brand The brand of the card.
     */
    @JsonProperty(JSON_PROPERTY_BRAND)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setBrand(String brand) {
      this.brand = brand;
    }
  
    /**
     * The two-digit month when the card expires
     *
     * @param expiryMonth The two-digit month when the card expires
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod expiryMonth(String expiryMonth) {
      this.expiryMonth = expiryMonth;
      return this;
    }
  
    /**
     * The two-digit month when the card expires
     *
     * @return expiryMonth The two-digit month when the card expires
     */
    @JsonProperty(JSON_PROPERTY_EXPIRY_MONTH)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getExpiryMonth() {
      return expiryMonth;
    }
  
    /**
     * The two-digit month when the card expires
     *
     * @param expiryMonth The two-digit month when the card expires
     */
    @JsonProperty(JSON_PROPERTY_EXPIRY_MONTH)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setExpiryMonth(String expiryMonth) {
      this.expiryMonth = expiryMonth;
    }
  
    /**
     * The last two digits of the year the card expires. For example, **22** for the year 2022.
     *
     * @param expiryYear The last two digits of the year the card expires. For example, **22** for the
     *     year 2022.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod expiryYear(String expiryYear) {
      this.expiryYear = expiryYear;
      return this;
    }
  
    /**
     * The last two digits of the year the card expires. For example, **22** for the year 2022.
     *
     * @return expiryYear The last two digits of the year the card expires. For example, **22** for
     *     the year 2022.
     */
    @JsonProperty(JSON_PROPERTY_EXPIRY_YEAR)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getExpiryYear() {
      return expiryYear;
    }
  
    /**
     * The last two digits of the year the card expires. For example, **22** for the year 2022.
     *
     * @param expiryYear The last two digits of the year the card expires. For example, **22** for the
     *     year 2022.
     */
    @JsonProperty(JSON_PROPERTY_EXPIRY_YEAR)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setExpiryYear(String expiryYear) {
      this.expiryYear = expiryYear;
    }
  
    /**
     * The unique payment method code.
     *
     * @param holderName The unique payment method code.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod holderName(String holderName) {
      this.holderName = holderName;
      return this;
    }
  
    /**
     * The unique payment method code.
     *
     * @return holderName The unique payment method code.
     */
    @JsonProperty(JSON_PROPERTY_HOLDER_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getHolderName() {
      return holderName;
    }
  
    /**
     * The unique payment method code.
     *
     * @param holderName The unique payment method code.
     */
    @JsonProperty(JSON_PROPERTY_HOLDER_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setHolderName(String holderName) {
      this.holderName = holderName;
    }
  
    /**
     * The IBAN of the bank account.
     *
     * @param iban The IBAN of the bank account.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod iban(String iban) {
      this.iban = iban;
      return this;
    }
  
    /**
     * The IBAN of the bank account.
     *
     * @return iban The IBAN of the bank account.
     */
    @JsonProperty(JSON_PROPERTY_IBAN)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getIban() {
      return iban;
    }
  
    /**
     * The IBAN of the bank account.
     *
     * @param iban The IBAN of the bank account.
     */
    @JsonProperty(JSON_PROPERTY_IBAN)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setIban(String iban) {
      this.iban = iban;
    }
  
    /**
     * A unique identifier of this stored payment method.
     *
     * @param id A unique identifier of this stored payment method.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod id(String id) {
      this.id = id;
      return this;
    }
  
    /**
     * A unique identifier of this stored payment method.
     *
     * @return id A unique identifier of this stored payment method.
     */
    @JsonProperty(JSON_PROPERTY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getId() {
      return id;
    }
  
    /**
     * A unique identifier of this stored payment method.
     *
     * @param id A unique identifier of this stored payment method.
     */
    @JsonProperty(JSON_PROPERTY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setId(String id) {
      this.id = id;
    }
  
    /**
     * The shopper’s issuer account label
     *
     * @param label The shopper’s issuer account label
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod label(String label) {
      this.label = label;
      return this;
    }
  
    /**
     * The shopper’s issuer account label
     *
     * @return label The shopper’s issuer account label
     */
    @JsonProperty(JSON_PROPERTY_LABEL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getLabel() {
      return label;
    }
  
    /**
     * The shopper’s issuer account label
     *
     * @param label The shopper’s issuer account label
     */
    @JsonProperty(JSON_PROPERTY_LABEL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setLabel(String label) {
      this.label = label;
    }
  
    /**
     * The last four digits of the PAN.
     *
     * @param lastFour The last four digits of the PAN.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod lastFour(String lastFour) {
      this.lastFour = lastFour;
      return this;
    }
  
    /**
     * The last four digits of the PAN.
     *
     * @return lastFour The last four digits of the PAN.
     */
    @JsonProperty(JSON_PROPERTY_LAST_FOUR)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getLastFour() {
      return lastFour;
    }
  
    /**
     * The last four digits of the PAN.
     *
     * @param lastFour The last four digits of the PAN.
     */
    @JsonProperty(JSON_PROPERTY_LAST_FOUR)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setLastFour(String lastFour) {
      this.lastFour = lastFour;
    }
  
    /**
     * The display name of the stored payment method.
     *
     * @param name The display name of the stored payment method.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod name(String name) {
      this.name = name;
      return this;
    }
  
    /**
     * The display name of the stored payment method.
     *
     * @return name The display name of the stored payment method.
     */
    @JsonProperty(JSON_PROPERTY_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getName() {
      return name;
    }
  
    /**
     * The display name of the stored payment method.
     *
     * @param name The display name of the stored payment method.
     */
    @JsonProperty(JSON_PROPERTY_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setName(String name) {
      this.name = name;
    }
  
    /**
     * Returned in the response if you are not tokenizing with Adyen and are using the
     * Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either
     * the Mastercard Trace ID or the Visa Transaction ID.
     *
     * @param networkTxReference Returned in the response if you are not tokenizing with Adyen and are
     *     using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This
     *     contains either the Mastercard Trace ID or the Visa Transaction ID.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod networkTxReference(String networkTxReference) {
      this.networkTxReference = networkTxReference;
      return this;
    }
  
    /**
     * Returned in the response if you are not tokenizing with Adyen and are using the
     * Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either
     * the Mastercard Trace ID or the Visa Transaction ID.
     *
     * @return networkTxReference Returned in the response if you are not tokenizing with Adyen and
     *     are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This
     *     contains either the Mastercard Trace ID or the Visa Transaction ID.
     */
    @JsonProperty(JSON_PROPERTY_NETWORK_TX_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getNetworkTxReference() {
      return networkTxReference;
    }
  
    /**
     * Returned in the response if you are not tokenizing with Adyen and are using the
     * Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either
     * the Mastercard Trace ID or the Visa Transaction ID.
     *
     * @param networkTxReference Returned in the response if you are not tokenizing with Adyen and are
     *     using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This
     *     contains either the Mastercard Trace ID or the Visa Transaction ID.
     */
    @JsonProperty(JSON_PROPERTY_NETWORK_TX_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setNetworkTxReference(String networkTxReference) {
      this.networkTxReference = networkTxReference;
    }
  
    /**
     * The name of the bank account holder.
     *
     * @param ownerName The name of the bank account holder.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod ownerName(String ownerName) {
      this.ownerName = ownerName;
      return this;
    }
  
    /**
     * The name of the bank account holder.
     *
     * @return ownerName The name of the bank account holder.
     */
    @JsonProperty(JSON_PROPERTY_OWNER_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getOwnerName() {
      return ownerName;
    }
  
    /**
     * The name of the bank account holder.
     *
     * @param ownerName The name of the bank account holder.
     */
    @JsonProperty(JSON_PROPERTY_OWNER_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setOwnerName(String ownerName) {
      this.ownerName = ownerName;
    }
  
    /**
     * The shopper’s email address.
     *
     * @param shopperEmail The shopper’s email address.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod shopperEmail(String shopperEmail) {
      this.shopperEmail = shopperEmail;
      return this;
    }
  
    /**
     * The shopper’s email address.
     *
     * @return shopperEmail The shopper’s email address.
     */
    @JsonProperty(JSON_PROPERTY_SHOPPER_EMAIL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getShopperEmail() {
      return shopperEmail;
    }
  
    /**
     * The shopper’s email address.
     *
     * @param shopperEmail The shopper’s email address.
     */
    @JsonProperty(JSON_PROPERTY_SHOPPER_EMAIL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setShopperEmail(String shopperEmail) {
      this.shopperEmail = shopperEmail;
    }
  
    /**
     * The supported recurring processing models for this stored payment method.
     *
     * @param supportedRecurringProcessingModels The supported recurring processing models for this
     *     stored payment method.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod supportedRecurringProcessingModels(
        List<String> supportedRecurringProcessingModels) {
      this.supportedRecurringProcessingModels = supportedRecurringProcessingModels;
      return this;
    }
  
    public StoredPaymentMethod addSupportedRecurringProcessingModelsItem(
        String supportedRecurringProcessingModelsItem) {
      if (this.supportedRecurringProcessingModels == null) {
        this.supportedRecurringProcessingModels = new ArrayList<>();
      }
      this.supportedRecurringProcessingModels.add(supportedRecurringProcessingModelsItem);
      return this;
    }
  
    /**
     * The supported recurring processing models for this stored payment method.
     *
     * @return supportedRecurringProcessingModels The supported recurring processing models for this
     *     stored payment method.
     */
    @JsonProperty(JSON_PROPERTY_SUPPORTED_RECURRING_PROCESSING_MODELS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<String> getSupportedRecurringProcessingModels() {
      return supportedRecurringProcessingModels;
    }
  
    /**
     * The supported recurring processing models for this stored payment method.
     *
     * @param supportedRecurringProcessingModels The supported recurring processing models for this
     *     stored payment method.
     */
    @JsonProperty(JSON_PROPERTY_SUPPORTED_RECURRING_PROCESSING_MODELS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setSupportedRecurringProcessingModels(
        List<String> supportedRecurringProcessingModels) {
      this.supportedRecurringProcessingModels = supportedRecurringProcessingModels;
    }
  
    /**
     * The supported shopper interactions for this stored payment method.
     *
     * @param supportedShopperInteractions The supported shopper interactions for this stored payment
     *     method.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod supportedShopperInteractions(
        List<String> supportedShopperInteractions) {
      this.supportedShopperInteractions = supportedShopperInteractions;
      return this;
    }
  
    public StoredPaymentMethod addSupportedShopperInteractionsItem(
        String supportedShopperInteractionsItem) {
      if (this.supportedShopperInteractions == null) {
        this.supportedShopperInteractions = new ArrayList<>();
      }
      this.supportedShopperInteractions.add(supportedShopperInteractionsItem);
      return this;
    }
  
    /**
     * The supported shopper interactions for this stored payment method.
     *
     * @return supportedShopperInteractions The supported shopper interactions for this stored payment
     *     method.
     */
    @JsonProperty(JSON_PROPERTY_SUPPORTED_SHOPPER_INTERACTIONS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<String> getSupportedShopperInteractions() {
      return supportedShopperInteractions;
    }
  
    /**
     * The supported shopper interactions for this stored payment method.
     *
     * @param supportedShopperInteractions The supported shopper interactions for this stored payment
     *     method.
     */
    @JsonProperty(JSON_PROPERTY_SUPPORTED_SHOPPER_INTERACTIONS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setSupportedShopperInteractions(List<String> supportedShopperInteractions) {
      this.supportedShopperInteractions = supportedShopperInteractions;
    }
  
    /**
     * The type of payment method.
     *
     * @param type The type of payment method.
     * @return the current {@code StoredPaymentMethod} instance, allowing for method chaining
     */
    public StoredPaymentMethod type(String type) {
      this.type = type;
      return this;
    }
  
    /**
     * The type of payment method.
     *
     * @return type The type of payment method.
     */
    @JsonProperty(JSON_PROPERTY_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getType() {
      return type;
    }
  
    /**
     * The type of payment method.
     *
     * @param type The type of payment method.
     */
    @JsonProperty(JSON_PROPERTY_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setType(String type) {
      this.type = type;
    }
  
    /** Return true if this StoredPaymentMethod object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      StoredPaymentMethod storedPaymentMethod = (StoredPaymentMethod) o;
      return Objects.equals(this.bankAccountNumber, storedPaymentMethod.bankAccountNumber)
          && Objects.equals(this.bankLocationId, storedPaymentMethod.bankLocationId)
          && Objects.equals(this.brand, storedPaymentMethod.brand)
          && Objects.equals(this.expiryMonth, storedPaymentMethod.expiryMonth)
          && Objects.equals(this.expiryYear, storedPaymentMethod.expiryYear)
          && Objects.equals(this.holderName, storedPaymentMethod.holderName)
          && Objects.equals(this.iban, storedPaymentMethod.iban)
          && Objects.equals(this.id, storedPaymentMethod.id)
          && Objects.equals(this.label, storedPaymentMethod.label)
          && Objects.equals(this.lastFour, storedPaymentMethod.lastFour)
          && Objects.equals(this.name, storedPaymentMethod.name)
          && Objects.equals(this.networkTxReference, storedPaymentMethod.networkTxReference)
          && Objects.equals(this.ownerName, storedPaymentMethod.ownerName)
          && Objects.equals(this.shopperEmail, storedPaymentMethod.shopperEmail)
          && Objects.equals(
              this.supportedRecurringProcessingModels,
              storedPaymentMethod.supportedRecurringProcessingModels)
          && Objects.equals(
              this.supportedShopperInteractions, storedPaymentMethod.supportedShopperInteractions)
          && Objects.equals(this.type, storedPaymentMethod.type);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(
          bankAccountNumber,
          bankLocationId,
          brand,
          expiryMonth,
          expiryYear,
          holderName,
          iban,
          id,
          label,
          lastFour,
          name,
          networkTxReference,
          ownerName,
          shopperEmail,
          supportedRecurringProcessingModels,
          supportedShopperInteractions,
          type);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class StoredPaymentMethod {\n");
      sb.append("    bankAccountNumber: ").append(toIndentedString(bankAccountNumber)).append("\n");
      sb.append("    bankLocationId: ").append(toIndentedString(bankLocationId)).append("\n");
      sb.append("    brand: ").append(toIndentedString(brand)).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("    iban: ").append(toIndentedString(iban)).append("\n");
      sb.append("    id: ").append(toIndentedString(id)).append("\n");
      sb.append("    label: ").append(toIndentedString(label)).append("\n");
      sb.append("    lastFour: ").append(toIndentedString(lastFour)).append("\n");
      sb.append("    name: ").append(toIndentedString(name)).append("\n");
      sb.append("    networkTxReference: ").append(toIndentedString(networkTxReference)).append("\n");
      sb.append("    ownerName: ").append(toIndentedString(ownerName)).append("\n");
      sb.append("    shopperEmail: ").append(toIndentedString(shopperEmail)).append("\n");
      sb.append("    supportedRecurringProcessingModels: ")
          .append(toIndentedString(supportedRecurringProcessingModels))
          .append("\n");
      sb.append("    supportedShopperInteractions: ")
          .append(toIndentedString(supportedShopperInteractions))
          .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 StoredPaymentMethod given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of StoredPaymentMethod
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     StoredPaymentMethod
     */
    public static StoredPaymentMethod fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, StoredPaymentMethod.class);
    }
  
    /**
     * Convert an instance of StoredPaymentMethod to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  