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

com.zuora.model.ExpandedPaymentMethod Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
 * Zuora API Reference
 * REST API reference for the Zuora Billing, Payments, and Central Platform! Check out the [REST API Overview](https://www.zuora.com/developer/api-references/api/overview/).
 *
 * The version of the OpenAPI document: 2024-05-20
 * Contact: [email protected]
 *
 * 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.zuora.model;

import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.zuora.model.ExpandedAccount;
import java.io.IOException;
import java.time.LocalDate;
import java.util.Arrays;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.zuora.JSON;

/**
 * ExpandedPaymentMethod
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0")
public class ExpandedPaymentMethod {
  public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_ID)
  private String accountId;

  public static final String SERIALIZED_NAME_ACH_ABA_CODE = "achAbaCode";
  @SerializedName(SERIALIZED_NAME_ACH_ABA_CODE)
  private String achAbaCode;

  public static final String SERIALIZED_NAME_ACH_ACCOUNT_NAME = "achAccountName";
  @SerializedName(SERIALIZED_NAME_ACH_ACCOUNT_NAME)
  private String achAccountName;

  public static final String SERIALIZED_NAME_ACH_ACCOUNT_NUMBER_MASK = "achAccountNumberMask";
  @SerializedName(SERIALIZED_NAME_ACH_ACCOUNT_NUMBER_MASK)
  private String achAccountNumberMask;

  public static final String SERIALIZED_NAME_ACH_ACCOUNT_TYPE = "achAccountType";
  @SerializedName(SERIALIZED_NAME_ACH_ACCOUNT_TYPE)
  private String achAccountType;

  public static final String SERIALIZED_NAME_ACH_ADDRESS1 = "achAddress1";
  @SerializedName(SERIALIZED_NAME_ACH_ADDRESS1)
  private String achAddress1;

  public static final String SERIALIZED_NAME_ACH_ADDRESS2 = "achAddress2";
  @SerializedName(SERIALIZED_NAME_ACH_ADDRESS2)
  private String achAddress2;

  public static final String SERIALIZED_NAME_ACH_BANK_NAME = "achBankName";
  @SerializedName(SERIALIZED_NAME_ACH_BANK_NAME)
  private String achBankName;

  public static final String SERIALIZED_NAME_ACH_CITY = "achCity";
  @SerializedName(SERIALIZED_NAME_ACH_CITY)
  private String achCity;

  public static final String SERIALIZED_NAME_ACH_COUNTRY = "achCountry";
  @SerializedName(SERIALIZED_NAME_ACH_COUNTRY)
  private String achCountry;

  public static final String SERIALIZED_NAME_ACH_POSTAL_CODE = "achPostalCode";
  @SerializedName(SERIALIZED_NAME_ACH_POSTAL_CODE)
  private String achPostalCode;

  public static final String SERIALIZED_NAME_ACH_STATE = "achState";
  @SerializedName(SERIALIZED_NAME_ACH_STATE)
  private String achState;

  public static final String SERIALIZED_NAME_ACTIVE = "active";
  @SerializedName(SERIALIZED_NAME_ACTIVE)
  private Boolean active;

  public static final String SERIALIZED_NAME_IS_SYSTEM = "isSystem";
  @SerializedName(SERIALIZED_NAME_IS_SYSTEM)
  private Boolean isSystem;

  public static final String SERIALIZED_NAME_BANK_BRANCH_CODE = "bankBranchCode";
  @SerializedName(SERIALIZED_NAME_BANK_BRANCH_CODE)
  private String bankBranchCode;

  public static final String SERIALIZED_NAME_BANK_CHECK_DIGIT = "bankCheckDigit";
  @SerializedName(SERIALIZED_NAME_BANK_CHECK_DIGIT)
  private String bankCheckDigit;

  public static final String SERIALIZED_NAME_BANK_CITY = "bankCity";
  @SerializedName(SERIALIZED_NAME_BANK_CITY)
  private String bankCity;

  public static final String SERIALIZED_NAME_BANK_CODE = "bankCode";
  @SerializedName(SERIALIZED_NAME_BANK_CODE)
  private String bankCode;

  public static final String SERIALIZED_NAME_BANK_IDENTIFICATION_NUMBER = "bankIdentificationNumber";
  @SerializedName(SERIALIZED_NAME_BANK_IDENTIFICATION_NUMBER)
  private String bankIdentificationNumber;

  public static final String SERIALIZED_NAME_BANK_NAME = "bankName";
  @SerializedName(SERIALIZED_NAME_BANK_NAME)
  private String bankName;

  public static final String SERIALIZED_NAME_BANK_POSTAL_CODE = "bankPostalCode";
  @SerializedName(SERIALIZED_NAME_BANK_POSTAL_CODE)
  private String bankPostalCode;

  public static final String SERIALIZED_NAME_BANK_STREET_NAME = "bankStreetName";
  @SerializedName(SERIALIZED_NAME_BANK_STREET_NAME)
  private String bankStreetName;

  public static final String SERIALIZED_NAME_BANK_STREET_NUMBER = "bankStreetNumber";
  @SerializedName(SERIALIZED_NAME_BANK_STREET_NUMBER)
  private String bankStreetNumber;

  public static final String SERIALIZED_NAME_BANK_TRANSFER_ACCOUNT_NAME = "bankTransferAccountName";
  @SerializedName(SERIALIZED_NAME_BANK_TRANSFER_ACCOUNT_NAME)
  private String bankTransferAccountName;

  public static final String SERIALIZED_NAME_BANK_TRANSFER_ACCOUNT_NUMBER_MASK = "bankTransferAccountNumberMask";
  @SerializedName(SERIALIZED_NAME_BANK_TRANSFER_ACCOUNT_NUMBER_MASK)
  private String bankTransferAccountNumberMask;

  public static final String SERIALIZED_NAME_BANK_TRANSFER_ACCOUNT_TYPE = "bankTransferAccountType";
  @SerializedName(SERIALIZED_NAME_BANK_TRANSFER_ACCOUNT_TYPE)
  private String bankTransferAccountType;

  public static final String SERIALIZED_NAME_BANK_TRANSFER_TYPE = "bankTransferType";
  @SerializedName(SERIALIZED_NAME_BANK_TRANSFER_TYPE)
  private String bankTransferType;

  public static final String SERIALIZED_NAME_BUSINESS_IDENTIFICATION_CODE = "businessIdentificationCode";
  @SerializedName(SERIALIZED_NAME_BUSINESS_IDENTIFICATION_CODE)
  private String businessIdentificationCode;

  public static final String SERIALIZED_NAME_CITY = "city";
  @SerializedName(SERIALIZED_NAME_CITY)
  private String city;

  public static final String SERIALIZED_NAME_COUNTRY = "country";
  @SerializedName(SERIALIZED_NAME_COUNTRY)
  private String country;

  public static final String SERIALIZED_NAME_CREDIT_CARD_ADDRESS1 = "creditCardAddress1";
  @SerializedName(SERIALIZED_NAME_CREDIT_CARD_ADDRESS1)
  private String creditCardAddress1;

  public static final String SERIALIZED_NAME_CREDIT_CARD_ADDRESS2 = "creditCardAddress2";
  @SerializedName(SERIALIZED_NAME_CREDIT_CARD_ADDRESS2)
  private String creditCardAddress2;

  public static final String SERIALIZED_NAME_CREDIT_CARD_CITY = "creditCardCity";
  @SerializedName(SERIALIZED_NAME_CREDIT_CARD_CITY)
  private String creditCardCity;

  public static final String SERIALIZED_NAME_CREDIT_CARD_COUNTRY = "creditCardCountry";
  @SerializedName(SERIALIZED_NAME_CREDIT_CARD_COUNTRY)
  private String creditCardCountry;

  public static final String SERIALIZED_NAME_CREDIT_CARD_EXPIRATION_MONTH = "creditCardExpirationMonth";
  @SerializedName(SERIALIZED_NAME_CREDIT_CARD_EXPIRATION_MONTH)
  private Integer creditCardExpirationMonth;

  public static final String SERIALIZED_NAME_CREDIT_CARD_EXPIRATION_YEAR = "creditCardExpirationYear";
  @SerializedName(SERIALIZED_NAME_CREDIT_CARD_EXPIRATION_YEAR)
  private Integer creditCardExpirationYear;

  public static final String SERIALIZED_NAME_CREDIT_CARD_HOLDER_NAME = "creditCardHolderName";
  @SerializedName(SERIALIZED_NAME_CREDIT_CARD_HOLDER_NAME)
  private String creditCardHolderName;

  public static final String SERIALIZED_NAME_CREDIT_CARD_MASK_NUMBER = "creditCardMaskNumber";
  @SerializedName(SERIALIZED_NAME_CREDIT_CARD_MASK_NUMBER)
  private String creditCardMaskNumber;

  public static final String SERIALIZED_NAME_CREDIT_CARD_POSTAL_CODE = "creditCardPostalCode";
  @SerializedName(SERIALIZED_NAME_CREDIT_CARD_POSTAL_CODE)
  private String creditCardPostalCode;

  public static final String SERIALIZED_NAME_CREDIT_CARD_STATE = "creditCardState";
  @SerializedName(SERIALIZED_NAME_CREDIT_CARD_STATE)
  private String creditCardState;

  public static final String SERIALIZED_NAME_CREDIT_CARD_TYPE = "creditCardType";
  @SerializedName(SERIALIZED_NAME_CREDIT_CARD_TYPE)
  private String creditCardType;

  public static final String SERIALIZED_NAME_DEVICE_SESSION_ID = "deviceSessionId";
  @SerializedName(SERIALIZED_NAME_DEVICE_SESSION_ID)
  private String deviceSessionId;

  public static final String SERIALIZED_NAME_EMAIL = "email";
  @SerializedName(SERIALIZED_NAME_EMAIL)
  private String email;

  public static final String SERIALIZED_NAME_EXISTING_MANDATE = "existingMandate";
  @SerializedName(SERIALIZED_NAME_EXISTING_MANDATE)
  private String existingMandate;

  public static final String SERIALIZED_NAME_FIRST_NAME = "firstName";
  @SerializedName(SERIALIZED_NAME_FIRST_NAME)
  private String firstName;

  public static final String SERIALIZED_NAME_I_B_A_N = "iBAN";
  @SerializedName(SERIALIZED_NAME_I_B_A_N)
  private String iBAN;

  public static final String SERIALIZED_NAME_I_P_ADDRESS = "iPAddress";
  @SerializedName(SERIALIZED_NAME_I_P_ADDRESS)
  private String iPAddress;

  public static final String SERIALIZED_NAME_IDENTITY_NUMBER = "identityNumber";
  @SerializedName(SERIALIZED_NAME_IDENTITY_NUMBER)
  private String identityNumber;

  public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName";
  @SerializedName(SERIALIZED_NAME_COMPANY_NAME)
  private String companyName;

  public static final String SERIALIZED_NAME_IS_COMPANY = "isCompany";
  @SerializedName(SERIALIZED_NAME_IS_COMPANY)
  private Boolean isCompany;

  public static final String SERIALIZED_NAME_LAST_FAILED_SALE_TRANSACTION_DATE = "lastFailedSaleTransactionDate";
  @SerializedName(SERIALIZED_NAME_LAST_FAILED_SALE_TRANSACTION_DATE)
  private LocalDate lastFailedSaleTransactionDate;

  public static final String SERIALIZED_NAME_LAST_NAME = "lastName";
  @SerializedName(SERIALIZED_NAME_LAST_NAME)
  private String lastName;

  public static final String SERIALIZED_NAME_LAST_TRANSACTION_DATE_TIME = "lastTransactionDateTime";
  @SerializedName(SERIALIZED_NAME_LAST_TRANSACTION_DATE_TIME)
  private String lastTransactionDateTime;

  public static final String SERIALIZED_NAME_LAST_TRANSACTION_STATUS = "lastTransactionStatus";
  @SerializedName(SERIALIZED_NAME_LAST_TRANSACTION_STATUS)
  private String lastTransactionStatus;

  public static final String SERIALIZED_NAME_MANDATE_CREATION_DATE = "mandateCreationDate";
  @SerializedName(SERIALIZED_NAME_MANDATE_CREATION_DATE)
  private LocalDate mandateCreationDate;

  public static final String SERIALIZED_NAME_MANDATE_I_D = "mandateID";
  @SerializedName(SERIALIZED_NAME_MANDATE_I_D)
  private String mandateID;

  public static final String SERIALIZED_NAME_MANDATE_REASON = "mandateReason";
  @SerializedName(SERIALIZED_NAME_MANDATE_REASON)
  private String mandateReason;

  public static final String SERIALIZED_NAME_MANDATE_RECEIVED = "mandateReceived";
  @SerializedName(SERIALIZED_NAME_MANDATE_RECEIVED)
  private String mandateReceived;

  public static final String SERIALIZED_NAME_MANDATE_STATUS = "mandateStatus";
  @SerializedName(SERIALIZED_NAME_MANDATE_STATUS)
  private String mandateStatus;

  public static final String SERIALIZED_NAME_MANDATE_UPDATE_DATE = "mandateUpdateDate";
  @SerializedName(SERIALIZED_NAME_MANDATE_UPDATE_DATE)
  private LocalDate mandateUpdateDate;

  public static final String SERIALIZED_NAME_MAX_CONSECUTIVE_PAYMENT_FAILURES = "maxConsecutivePaymentFailures";
  @SerializedName(SERIALIZED_NAME_MAX_CONSECUTIVE_PAYMENT_FAILURES)
  private Integer maxConsecutivePaymentFailures;

  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name;

  public static final String SERIALIZED_NAME_NUM_CONSECUTIVE_FAILURES = "numConsecutiveFailures";
  @SerializedName(SERIALIZED_NAME_NUM_CONSECUTIVE_FAILURES)
  private Integer numConsecutiveFailures;

  public static final String SERIALIZED_NAME_PAYMENT_METHOD_STATUS = "paymentMethodStatus";
  @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD_STATUS)
  private String paymentMethodStatus;

  public static final String SERIALIZED_NAME_PAYMENT_RETRY_WINDOW = "paymentRetryWindow";
  @SerializedName(SERIALIZED_NAME_PAYMENT_RETRY_WINDOW)
  private Integer paymentRetryWindow;

  public static final String SERIALIZED_NAME_PAYPAL_BAID = "paypalBaid";
  @SerializedName(SERIALIZED_NAME_PAYPAL_BAID)
  private String paypalBaid;

  public static final String SERIALIZED_NAME_PAYPAL_EMAIL = "paypalEmail";
  @SerializedName(SERIALIZED_NAME_PAYPAL_EMAIL)
  private String paypalEmail;

  public static final String SERIALIZED_NAME_PAYPAL_PREAPPROVAL_KEY = "paypalPreapprovalKey";
  @SerializedName(SERIALIZED_NAME_PAYPAL_PREAPPROVAL_KEY)
  private String paypalPreapprovalKey;

  public static final String SERIALIZED_NAME_PAYPAL_TYPE = "paypalType";
  @SerializedName(SERIALIZED_NAME_PAYPAL_TYPE)
  private String paypalType;

  public static final String SERIALIZED_NAME_PHONE = "phone";
  @SerializedName(SERIALIZED_NAME_PHONE)
  private String phone;

  public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode";
  @SerializedName(SERIALIZED_NAME_POSTAL_CODE)
  private String postalCode;

  public static final String SERIALIZED_NAME_SECOND_TOKEN_ID = "secondTokenId";
  @SerializedName(SERIALIZED_NAME_SECOND_TOKEN_ID)
  private String secondTokenId;

  public static final String SERIALIZED_NAME_STATE = "state";
  @SerializedName(SERIALIZED_NAME_STATE)
  private String state;

  public static final String SERIALIZED_NAME_STREET_NAME = "streetName";
  @SerializedName(SERIALIZED_NAME_STREET_NAME)
  private String streetName;

  public static final String SERIALIZED_NAME_STREET_NUMBER = "streetNumber";
  @SerializedName(SERIALIZED_NAME_STREET_NUMBER)
  private String streetNumber;

  public static final String SERIALIZED_NAME_TOKEN_ID = "tokenId";
  @SerializedName(SERIALIZED_NAME_TOKEN_ID)
  private String tokenId;

  public static final String SERIALIZED_NAME_TOTAL_NUMBER_OF_ERROR_PAYMENTS = "totalNumberOfErrorPayments";
  @SerializedName(SERIALIZED_NAME_TOTAL_NUMBER_OF_ERROR_PAYMENTS)
  private Integer totalNumberOfErrorPayments;

  public static final String SERIALIZED_NAME_TOTAL_NUMBER_OF_PROCESSED_PAYMENTS = "totalNumberOfProcessedPayments";
  @SerializedName(SERIALIZED_NAME_TOTAL_NUMBER_OF_PROCESSED_PAYMENTS)
  private Integer totalNumberOfProcessedPayments;

  public static final String SERIALIZED_NAME_TYPE = "type";
  @SerializedName(SERIALIZED_NAME_TYPE)
  private String type;

  public static final String SERIALIZED_NAME_USE_DEFAULT_RETRY_RULE = "useDefaultRetryRule";
  @SerializedName(SERIALIZED_NAME_USE_DEFAULT_RETRY_RULE)
  private Boolean useDefaultRetryRule;

  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private String id;

  public static final String SERIALIZED_NAME_CREATED_BY_ID = "createdById";
  @SerializedName(SERIALIZED_NAME_CREATED_BY_ID)
  private String createdById;

  public static final String SERIALIZED_NAME_CREATED_DATE = "createdDate";
  @SerializedName(SERIALIZED_NAME_CREATED_DATE)
  private String createdDate;

  public static final String SERIALIZED_NAME_UPDATED_BY_ID = "updatedById";
  @SerializedName(SERIALIZED_NAME_UPDATED_BY_ID)
  private String updatedById;

  public static final String SERIALIZED_NAME_UPDATED_DATE = "updatedDate";
  @SerializedName(SERIALIZED_NAME_UPDATED_DATE)
  private String updatedDate;

  public static final String SERIALIZED_NAME_CARD_BRAND = "cardBrand";
  @SerializedName(SERIALIZED_NAME_CARD_BRAND)
  private String cardBrand;

  public static final String SERIALIZED_NAME_CARD_CLASS = "cardClass";
  @SerializedName(SERIALIZED_NAME_CARD_CLASS)
  private String cardClass;

  public static final String SERIALIZED_NAME_CARD_PRODUCT_TYPE = "cardProductType";
  @SerializedName(SERIALIZED_NAME_CARD_PRODUCT_TYPE)
  private String cardProductType;

  public static final String SERIALIZED_NAME_CARD_ISSUING_BANK = "cardIssuingBank";
  @SerializedName(SERIALIZED_NAME_CARD_ISSUING_BANK)
  private String cardIssuingBank;

  public static final String SERIALIZED_NAME_CARD_ISSUING_COUNTRY = "cardIssuingCountry";
  @SerializedName(SERIALIZED_NAME_CARD_ISSUING_COUNTRY)
  private String cardIssuingCountry;

  public static final String SERIALIZED_NAME_METHOD_REFERENCE_ID = "methodReferenceId";
  @SerializedName(SERIALIZED_NAME_METHOD_REFERENCE_ID)
  private String methodReferenceId;

  public static final String SERIALIZED_NAME_USER_REFERENCE_ID = "userReferenceId";
  @SerializedName(SERIALIZED_NAME_USER_REFERENCE_ID)
  private String userReferenceId;

  public static final String SERIALIZED_NAME_SUB_TYPE = "subType";
  @SerializedName(SERIALIZED_NAME_SUB_TYPE)
  private String subType;

  public static final String SERIALIZED_NAME_METHOD_SPECIFIC_DATA = "methodSpecificData";
  @SerializedName(SERIALIZED_NAME_METHOD_SPECIFIC_DATA)
  private String methodSpecificData;

  public static final String SERIALIZED_NAME_ACCOUNT = "account";
  @SerializedName(SERIALIZED_NAME_ACCOUNT)
  private ExpandedAccount account;

  public ExpandedPaymentMethod() {
  }

  public ExpandedPaymentMethod accountId(String accountId) {
    this.accountId = accountId;
    return this;
  }

  /**
   * Get accountId
   * @return accountId
   */
  @javax.annotation.Nullable
  public String getAccountId() {
    return accountId;
  }

  public void setAccountId(String accountId) {
    this.accountId = accountId;
  }


  public ExpandedPaymentMethod achAbaCode(String achAbaCode) {
    this.achAbaCode = achAbaCode;
    return this;
  }

  /**
   * Get achAbaCode
   * @return achAbaCode
   */
  @javax.annotation.Nullable
  public String getAchAbaCode() {
    return achAbaCode;
  }

  public void setAchAbaCode(String achAbaCode) {
    this.achAbaCode = achAbaCode;
  }


  public ExpandedPaymentMethod achAccountName(String achAccountName) {
    this.achAccountName = achAccountName;
    return this;
  }

  /**
   * Get achAccountName
   * @return achAccountName
   */
  @javax.annotation.Nullable
  public String getAchAccountName() {
    return achAccountName;
  }

  public void setAchAccountName(String achAccountName) {
    this.achAccountName = achAccountName;
  }


  public ExpandedPaymentMethod achAccountNumberMask(String achAccountNumberMask) {
    this.achAccountNumberMask = achAccountNumberMask;
    return this;
  }

  /**
   * Get achAccountNumberMask
   * @return achAccountNumberMask
   */
  @javax.annotation.Nullable
  public String getAchAccountNumberMask() {
    return achAccountNumberMask;
  }

  public void setAchAccountNumberMask(String achAccountNumberMask) {
    this.achAccountNumberMask = achAccountNumberMask;
  }


  public ExpandedPaymentMethod achAccountType(String achAccountType) {
    this.achAccountType = achAccountType;
    return this;
  }

  /**
   * Get achAccountType
   * @return achAccountType
   */
  @javax.annotation.Nullable
  public String getAchAccountType() {
    return achAccountType;
  }

  public void setAchAccountType(String achAccountType) {
    this.achAccountType = achAccountType;
  }


  public ExpandedPaymentMethod achAddress1(String achAddress1) {
    this.achAddress1 = achAddress1;
    return this;
  }

  /**
   * Get achAddress1
   * @return achAddress1
   */
  @javax.annotation.Nullable
  public String getAchAddress1() {
    return achAddress1;
  }

  public void setAchAddress1(String achAddress1) {
    this.achAddress1 = achAddress1;
  }


  public ExpandedPaymentMethod achAddress2(String achAddress2) {
    this.achAddress2 = achAddress2;
    return this;
  }

  /**
   * Get achAddress2
   * @return achAddress2
   */
  @javax.annotation.Nullable
  public String getAchAddress2() {
    return achAddress2;
  }

  public void setAchAddress2(String achAddress2) {
    this.achAddress2 = achAddress2;
  }


  public ExpandedPaymentMethod achBankName(String achBankName) {
    this.achBankName = achBankName;
    return this;
  }

  /**
   * Get achBankName
   * @return achBankName
   */
  @javax.annotation.Nullable
  public String getAchBankName() {
    return achBankName;
  }

  public void setAchBankName(String achBankName) {
    this.achBankName = achBankName;
  }


  public ExpandedPaymentMethod achCity(String achCity) {
    this.achCity = achCity;
    return this;
  }

  /**
   * Get achCity
   * @return achCity
   */
  @javax.annotation.Nullable
  public String getAchCity() {
    return achCity;
  }

  public void setAchCity(String achCity) {
    this.achCity = achCity;
  }


  public ExpandedPaymentMethod achCountry(String achCountry) {
    this.achCountry = achCountry;
    return this;
  }

  /**
   * Get achCountry
   * @return achCountry
   */
  @javax.annotation.Nullable
  public String getAchCountry() {
    return achCountry;
  }

  public void setAchCountry(String achCountry) {
    this.achCountry = achCountry;
  }


  public ExpandedPaymentMethod achPostalCode(String achPostalCode) {
    this.achPostalCode = achPostalCode;
    return this;
  }

  /**
   * Get achPostalCode
   * @return achPostalCode
   */
  @javax.annotation.Nullable
  public String getAchPostalCode() {
    return achPostalCode;
  }

  public void setAchPostalCode(String achPostalCode) {
    this.achPostalCode = achPostalCode;
  }


  public ExpandedPaymentMethod achState(String achState) {
    this.achState = achState;
    return this;
  }

  /**
   * Get achState
   * @return achState
   */
  @javax.annotation.Nullable
  public String getAchState() {
    return achState;
  }

  public void setAchState(String achState) {
    this.achState = achState;
  }


  public ExpandedPaymentMethod active(Boolean active) {
    this.active = active;
    return this;
  }

  /**
   * Get active
   * @return active
   */
  @javax.annotation.Nullable
  public Boolean getActive() {
    return active;
  }

  public void setActive(Boolean active) {
    this.active = active;
  }


  public ExpandedPaymentMethod isSystem(Boolean isSystem) {
    this.isSystem = isSystem;
    return this;
  }

  /**
   * Get isSystem
   * @return isSystem
   */
  @javax.annotation.Nullable
  public Boolean getIsSystem() {
    return isSystem;
  }

  public void setIsSystem(Boolean isSystem) {
    this.isSystem = isSystem;
  }


  public ExpandedPaymentMethod bankBranchCode(String bankBranchCode) {
    this.bankBranchCode = bankBranchCode;
    return this;
  }

  /**
   * Get bankBranchCode
   * @return bankBranchCode
   */
  @javax.annotation.Nullable
  public String getBankBranchCode() {
    return bankBranchCode;
  }

  public void setBankBranchCode(String bankBranchCode) {
    this.bankBranchCode = bankBranchCode;
  }


  public ExpandedPaymentMethod bankCheckDigit(String bankCheckDigit) {
    this.bankCheckDigit = bankCheckDigit;
    return this;
  }

  /**
   * Get bankCheckDigit
   * @return bankCheckDigit
   */
  @javax.annotation.Nullable
  public String getBankCheckDigit() {
    return bankCheckDigit;
  }

  public void setBankCheckDigit(String bankCheckDigit) {
    this.bankCheckDigit = bankCheckDigit;
  }


  public ExpandedPaymentMethod bankCity(String bankCity) {
    this.bankCity = bankCity;
    return this;
  }

  /**
   * Get bankCity
   * @return bankCity
   */
  @javax.annotation.Nullable
  public String getBankCity() {
    return bankCity;
  }

  public void setBankCity(String bankCity) {
    this.bankCity = bankCity;
  }


  public ExpandedPaymentMethod bankCode(String bankCode) {
    this.bankCode = bankCode;
    return this;
  }

  /**
   * Get bankCode
   * @return bankCode
   */
  @javax.annotation.Nullable
  public String getBankCode() {
    return bankCode;
  }

  public void setBankCode(String bankCode) {
    this.bankCode = bankCode;
  }


  public ExpandedPaymentMethod bankIdentificationNumber(String bankIdentificationNumber) {
    this.bankIdentificationNumber = bankIdentificationNumber;
    return this;
  }

  /**
   * Get bankIdentificationNumber
   * @return bankIdentificationNumber
   */
  @javax.annotation.Nullable
  public String getBankIdentificationNumber() {
    return bankIdentificationNumber;
  }

  public void setBankIdentificationNumber(String bankIdentificationNumber) {
    this.bankIdentificationNumber = bankIdentificationNumber;
  }


  public ExpandedPaymentMethod bankName(String bankName) {
    this.bankName = bankName;
    return this;
  }

  /**
   * Get bankName
   * @return bankName
   */
  @javax.annotation.Nullable
  public String getBankName() {
    return bankName;
  }

  public void setBankName(String bankName) {
    this.bankName = bankName;
  }


  public ExpandedPaymentMethod bankPostalCode(String bankPostalCode) {
    this.bankPostalCode = bankPostalCode;
    return this;
  }

  /**
   * Get bankPostalCode
   * @return bankPostalCode
   */
  @javax.annotation.Nullable
  public String getBankPostalCode() {
    return bankPostalCode;
  }

  public void setBankPostalCode(String bankPostalCode) {
    this.bankPostalCode = bankPostalCode;
  }


  public ExpandedPaymentMethod bankStreetName(String bankStreetName) {
    this.bankStreetName = bankStreetName;
    return this;
  }

  /**
   * Get bankStreetName
   * @return bankStreetName
   */
  @javax.annotation.Nullable
  public String getBankStreetName() {
    return bankStreetName;
  }

  public void setBankStreetName(String bankStreetName) {
    this.bankStreetName = bankStreetName;
  }


  public ExpandedPaymentMethod bankStreetNumber(String bankStreetNumber) {
    this.bankStreetNumber = bankStreetNumber;
    return this;
  }

  /**
   * Get bankStreetNumber
   * @return bankStreetNumber
   */
  @javax.annotation.Nullable
  public String getBankStreetNumber() {
    return bankStreetNumber;
  }

  public void setBankStreetNumber(String bankStreetNumber) {
    this.bankStreetNumber = bankStreetNumber;
  }


  public ExpandedPaymentMethod bankTransferAccountName(String bankTransferAccountName) {
    this.bankTransferAccountName = bankTransferAccountName;
    return this;
  }

  /**
   * Get bankTransferAccountName
   * @return bankTransferAccountName
   */
  @javax.annotation.Nullable
  public String getBankTransferAccountName() {
    return bankTransferAccountName;
  }

  public void setBankTransferAccountName(String bankTransferAccountName) {
    this.bankTransferAccountName = bankTransferAccountName;
  }


  public ExpandedPaymentMethod bankTransferAccountNumberMask(String bankTransferAccountNumberMask) {
    this.bankTransferAccountNumberMask = bankTransferAccountNumberMask;
    return this;
  }

  /**
   * Get bankTransferAccountNumberMask
   * @return bankTransferAccountNumberMask
   */
  @javax.annotation.Nullable
  public String getBankTransferAccountNumberMask() {
    return bankTransferAccountNumberMask;
  }

  public void setBankTransferAccountNumberMask(String bankTransferAccountNumberMask) {
    this.bankTransferAccountNumberMask = bankTransferAccountNumberMask;
  }


  public ExpandedPaymentMethod bankTransferAccountType(String bankTransferAccountType) {
    this.bankTransferAccountType = bankTransferAccountType;
    return this;
  }

  /**
   * Get bankTransferAccountType
   * @return bankTransferAccountType
   */
  @javax.annotation.Nullable
  public String getBankTransferAccountType() {
    return bankTransferAccountType;
  }

  public void setBankTransferAccountType(String bankTransferAccountType) {
    this.bankTransferAccountType = bankTransferAccountType;
  }


  public ExpandedPaymentMethod bankTransferType(String bankTransferType) {
    this.bankTransferType = bankTransferType;
    return this;
  }

  /**
   * Get bankTransferType
   * @return bankTransferType
   */
  @javax.annotation.Nullable
  public String getBankTransferType() {
    return bankTransferType;
  }

  public void setBankTransferType(String bankTransferType) {
    this.bankTransferType = bankTransferType;
  }


  public ExpandedPaymentMethod businessIdentificationCode(String businessIdentificationCode) {
    this.businessIdentificationCode = businessIdentificationCode;
    return this;
  }

  /**
   * Get businessIdentificationCode
   * @return businessIdentificationCode
   */
  @javax.annotation.Nullable
  public String getBusinessIdentificationCode() {
    return businessIdentificationCode;
  }

  public void setBusinessIdentificationCode(String businessIdentificationCode) {
    this.businessIdentificationCode = businessIdentificationCode;
  }


  public ExpandedPaymentMethod city(String city) {
    this.city = city;
    return this;
  }

  /**
   * Get city
   * @return city
   */
  @javax.annotation.Nullable
  public String getCity() {
    return city;
  }

  public void setCity(String city) {
    this.city = city;
  }


  public ExpandedPaymentMethod country(String country) {
    this.country = country;
    return this;
  }

  /**
   * Get country
   * @return country
   */
  @javax.annotation.Nullable
  public String getCountry() {
    return country;
  }

  public void setCountry(String country) {
    this.country = country;
  }


  public ExpandedPaymentMethod creditCardAddress1(String creditCardAddress1) {
    this.creditCardAddress1 = creditCardAddress1;
    return this;
  }

  /**
   * Get creditCardAddress1
   * @return creditCardAddress1
   */
  @javax.annotation.Nullable
  public String getCreditCardAddress1() {
    return creditCardAddress1;
  }

  public void setCreditCardAddress1(String creditCardAddress1) {
    this.creditCardAddress1 = creditCardAddress1;
  }


  public ExpandedPaymentMethod creditCardAddress2(String creditCardAddress2) {
    this.creditCardAddress2 = creditCardAddress2;
    return this;
  }

  /**
   * Get creditCardAddress2
   * @return creditCardAddress2
   */
  @javax.annotation.Nullable
  public String getCreditCardAddress2() {
    return creditCardAddress2;
  }

  public void setCreditCardAddress2(String creditCardAddress2) {
    this.creditCardAddress2 = creditCardAddress2;
  }


  public ExpandedPaymentMethod creditCardCity(String creditCardCity) {
    this.creditCardCity = creditCardCity;
    return this;
  }

  /**
   * Get creditCardCity
   * @return creditCardCity
   */
  @javax.annotation.Nullable
  public String getCreditCardCity() {
    return creditCardCity;
  }

  public void setCreditCardCity(String creditCardCity) {
    this.creditCardCity = creditCardCity;
  }


  public ExpandedPaymentMethod creditCardCountry(String creditCardCountry) {
    this.creditCardCountry = creditCardCountry;
    return this;
  }

  /**
   * Get creditCardCountry
   * @return creditCardCountry
   */
  @javax.annotation.Nullable
  public String getCreditCardCountry() {
    return creditCardCountry;
  }

  public void setCreditCardCountry(String creditCardCountry) {
    this.creditCardCountry = creditCardCountry;
  }


  public ExpandedPaymentMethod creditCardExpirationMonth(Integer creditCardExpirationMonth) {
    this.creditCardExpirationMonth = creditCardExpirationMonth;
    return this;
  }

  /**
   * Get creditCardExpirationMonth
   * @return creditCardExpirationMonth
   */
  @javax.annotation.Nullable
  public Integer getCreditCardExpirationMonth() {
    return creditCardExpirationMonth;
  }

  public void setCreditCardExpirationMonth(Integer creditCardExpirationMonth) {
    this.creditCardExpirationMonth = creditCardExpirationMonth;
  }


  public ExpandedPaymentMethod creditCardExpirationYear(Integer creditCardExpirationYear) {
    this.creditCardExpirationYear = creditCardExpirationYear;
    return this;
  }

  /**
   * Get creditCardExpirationYear
   * @return creditCardExpirationYear
   */
  @javax.annotation.Nullable
  public Integer getCreditCardExpirationYear() {
    return creditCardExpirationYear;
  }

  public void setCreditCardExpirationYear(Integer creditCardExpirationYear) {
    this.creditCardExpirationYear = creditCardExpirationYear;
  }


  public ExpandedPaymentMethod creditCardHolderName(String creditCardHolderName) {
    this.creditCardHolderName = creditCardHolderName;
    return this;
  }

  /**
   * Get creditCardHolderName
   * @return creditCardHolderName
   */
  @javax.annotation.Nullable
  public String getCreditCardHolderName() {
    return creditCardHolderName;
  }

  public void setCreditCardHolderName(String creditCardHolderName) {
    this.creditCardHolderName = creditCardHolderName;
  }


  public ExpandedPaymentMethod creditCardMaskNumber(String creditCardMaskNumber) {
    this.creditCardMaskNumber = creditCardMaskNumber;
    return this;
  }

  /**
   * Get creditCardMaskNumber
   * @return creditCardMaskNumber
   */
  @javax.annotation.Nullable
  public String getCreditCardMaskNumber() {
    return creditCardMaskNumber;
  }

  public void setCreditCardMaskNumber(String creditCardMaskNumber) {
    this.creditCardMaskNumber = creditCardMaskNumber;
  }


  public ExpandedPaymentMethod creditCardPostalCode(String creditCardPostalCode) {
    this.creditCardPostalCode = creditCardPostalCode;
    return this;
  }

  /**
   * Get creditCardPostalCode
   * @return creditCardPostalCode
   */
  @javax.annotation.Nullable
  public String getCreditCardPostalCode() {
    return creditCardPostalCode;
  }

  public void setCreditCardPostalCode(String creditCardPostalCode) {
    this.creditCardPostalCode = creditCardPostalCode;
  }


  public ExpandedPaymentMethod creditCardState(String creditCardState) {
    this.creditCardState = creditCardState;
    return this;
  }

  /**
   * Get creditCardState
   * @return creditCardState
   */
  @javax.annotation.Nullable
  public String getCreditCardState() {
    return creditCardState;
  }

  public void setCreditCardState(String creditCardState) {
    this.creditCardState = creditCardState;
  }


  public ExpandedPaymentMethod creditCardType(String creditCardType) {
    this.creditCardType = creditCardType;
    return this;
  }

  /**
   * Get creditCardType
   * @return creditCardType
   */
  @javax.annotation.Nullable
  public String getCreditCardType() {
    return creditCardType;
  }

  public void setCreditCardType(String creditCardType) {
    this.creditCardType = creditCardType;
  }


  public ExpandedPaymentMethod deviceSessionId(String deviceSessionId) {
    this.deviceSessionId = deviceSessionId;
    return this;
  }

  /**
   * Get deviceSessionId
   * @return deviceSessionId
   */
  @javax.annotation.Nullable
  public String getDeviceSessionId() {
    return deviceSessionId;
  }

  public void setDeviceSessionId(String deviceSessionId) {
    this.deviceSessionId = deviceSessionId;
  }


  public ExpandedPaymentMethod email(String email) {
    this.email = email;
    return this;
  }

  /**
   * Get email
   * @return email
   */
  @javax.annotation.Nullable
  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }


  public ExpandedPaymentMethod existingMandate(String existingMandate) {
    this.existingMandate = existingMandate;
    return this;
  }

  /**
   * Get existingMandate
   * @return existingMandate
   */
  @javax.annotation.Nullable
  public String getExistingMandate() {
    return existingMandate;
  }

  public void setExistingMandate(String existingMandate) {
    this.existingMandate = existingMandate;
  }


  public ExpandedPaymentMethod firstName(String firstName) {
    this.firstName = firstName;
    return this;
  }

  /**
   * Get firstName
   * @return firstName
   */
  @javax.annotation.Nullable
  public String getFirstName() {
    return firstName;
  }

  public void setFirstName(String firstName) {
    this.firstName = firstName;
  }


  public ExpandedPaymentMethod iBAN(String iBAN) {
    this.iBAN = iBAN;
    return this;
  }

  /**
   * Get iBAN
   * @return iBAN
   */
  @javax.annotation.Nullable
  public String getiBAN() {
    return iBAN;
  }

  public void setiBAN(String iBAN) {
    this.iBAN = iBAN;
  }


  public ExpandedPaymentMethod iPAddress(String iPAddress) {
    this.iPAddress = iPAddress;
    return this;
  }

  /**
   * Get iPAddress
   * @return iPAddress
   */
  @javax.annotation.Nullable
  public String getiPAddress() {
    return iPAddress;
  }

  public void setiPAddress(String iPAddress) {
    this.iPAddress = iPAddress;
  }


  public ExpandedPaymentMethod identityNumber(String identityNumber) {
    this.identityNumber = identityNumber;
    return this;
  }

  /**
   * Get identityNumber
   * @return identityNumber
   */
  @javax.annotation.Nullable
  public String getIdentityNumber() {
    return identityNumber;
  }

  public void setIdentityNumber(String identityNumber) {
    this.identityNumber = identityNumber;
  }


  public ExpandedPaymentMethod companyName(String companyName) {
    this.companyName = companyName;
    return this;
  }

  /**
   * Get companyName
   * @return companyName
   */
  @javax.annotation.Nullable
  public String getCompanyName() {
    return companyName;
  }

  public void setCompanyName(String companyName) {
    this.companyName = companyName;
  }


  public ExpandedPaymentMethod isCompany(Boolean isCompany) {
    this.isCompany = isCompany;
    return this;
  }

  /**
   * Get isCompany
   * @return isCompany
   */
  @javax.annotation.Nullable
  public Boolean getIsCompany() {
    return isCompany;
  }

  public void setIsCompany(Boolean isCompany) {
    this.isCompany = isCompany;
  }


  public ExpandedPaymentMethod lastFailedSaleTransactionDate(LocalDate lastFailedSaleTransactionDate) {
    this.lastFailedSaleTransactionDate = lastFailedSaleTransactionDate;
    return this;
  }

  /**
   * Get lastFailedSaleTransactionDate
   * @return lastFailedSaleTransactionDate
   */
  @javax.annotation.Nullable
  public LocalDate getLastFailedSaleTransactionDate() {
    return lastFailedSaleTransactionDate;
  }

  public void setLastFailedSaleTransactionDate(LocalDate lastFailedSaleTransactionDate) {
    this.lastFailedSaleTransactionDate = lastFailedSaleTransactionDate;
  }


  public ExpandedPaymentMethod lastName(String lastName) {
    this.lastName = lastName;
    return this;
  }

  /**
   * Get lastName
   * @return lastName
   */
  @javax.annotation.Nullable
  public String getLastName() {
    return lastName;
  }

  public void setLastName(String lastName) {
    this.lastName = lastName;
  }


  public ExpandedPaymentMethod lastTransactionDateTime(String lastTransactionDateTime) {
    this.lastTransactionDateTime = lastTransactionDateTime;
    return this;
  }

  /**
   * Get lastTransactionDateTime
   * @return lastTransactionDateTime
   */
  @javax.annotation.Nullable
  public String getLastTransactionDateTime() {
    return lastTransactionDateTime;
  }

  public void setLastTransactionDateTime(String lastTransactionDateTime) {
    this.lastTransactionDateTime = lastTransactionDateTime;
  }


  public ExpandedPaymentMethod lastTransactionStatus(String lastTransactionStatus) {
    this.lastTransactionStatus = lastTransactionStatus;
    return this;
  }

  /**
   * Get lastTransactionStatus
   * @return lastTransactionStatus
   */
  @javax.annotation.Nullable
  public String getLastTransactionStatus() {
    return lastTransactionStatus;
  }

  public void setLastTransactionStatus(String lastTransactionStatus) {
    this.lastTransactionStatus = lastTransactionStatus;
  }


  public ExpandedPaymentMethod mandateCreationDate(LocalDate mandateCreationDate) {
    this.mandateCreationDate = mandateCreationDate;
    return this;
  }

  /**
   * Get mandateCreationDate
   * @return mandateCreationDate
   */
  @javax.annotation.Nullable
  public LocalDate getMandateCreationDate() {
    return mandateCreationDate;
  }

  public void setMandateCreationDate(LocalDate mandateCreationDate) {
    this.mandateCreationDate = mandateCreationDate;
  }


  public ExpandedPaymentMethod mandateID(String mandateID) {
    this.mandateID = mandateID;
    return this;
  }

  /**
   * Get mandateID
   * @return mandateID
   */
  @javax.annotation.Nullable
  public String getMandateID() {
    return mandateID;
  }

  public void setMandateID(String mandateID) {
    this.mandateID = mandateID;
  }


  public ExpandedPaymentMethod mandateReason(String mandateReason) {
    this.mandateReason = mandateReason;
    return this;
  }

  /**
   * Get mandateReason
   * @return mandateReason
   */
  @javax.annotation.Nullable
  public String getMandateReason() {
    return mandateReason;
  }

  public void setMandateReason(String mandateReason) {
    this.mandateReason = mandateReason;
  }


  public ExpandedPaymentMethod mandateReceived(String mandateReceived) {
    this.mandateReceived = mandateReceived;
    return this;
  }

  /**
   * Get mandateReceived
   * @return mandateReceived
   */
  @javax.annotation.Nullable
  public String getMandateReceived() {
    return mandateReceived;
  }

  public void setMandateReceived(String mandateReceived) {
    this.mandateReceived = mandateReceived;
  }


  public ExpandedPaymentMethod mandateStatus(String mandateStatus) {
    this.mandateStatus = mandateStatus;
    return this;
  }

  /**
   * Get mandateStatus
   * @return mandateStatus
   */
  @javax.annotation.Nullable
  public String getMandateStatus() {
    return mandateStatus;
  }

  public void setMandateStatus(String mandateStatus) {
    this.mandateStatus = mandateStatus;
  }


  public ExpandedPaymentMethod mandateUpdateDate(LocalDate mandateUpdateDate) {
    this.mandateUpdateDate = mandateUpdateDate;
    return this;
  }

  /**
   * Get mandateUpdateDate
   * @return mandateUpdateDate
   */
  @javax.annotation.Nullable
  public LocalDate getMandateUpdateDate() {
    return mandateUpdateDate;
  }

  public void setMandateUpdateDate(LocalDate mandateUpdateDate) {
    this.mandateUpdateDate = mandateUpdateDate;
  }


  public ExpandedPaymentMethod maxConsecutivePaymentFailures(Integer maxConsecutivePaymentFailures) {
    this.maxConsecutivePaymentFailures = maxConsecutivePaymentFailures;
    return this;
  }

  /**
   * Get maxConsecutivePaymentFailures
   * @return maxConsecutivePaymentFailures
   */
  @javax.annotation.Nullable
  public Integer getMaxConsecutivePaymentFailures() {
    return maxConsecutivePaymentFailures;
  }

  public void setMaxConsecutivePaymentFailures(Integer maxConsecutivePaymentFailures) {
    this.maxConsecutivePaymentFailures = maxConsecutivePaymentFailures;
  }


  public ExpandedPaymentMethod name(String name) {
    this.name = name;
    return this;
  }

  /**
   * Get name
   * @return name
   */
  @javax.annotation.Nullable
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }


  public ExpandedPaymentMethod numConsecutiveFailures(Integer numConsecutiveFailures) {
    this.numConsecutiveFailures = numConsecutiveFailures;
    return this;
  }

  /**
   * Get numConsecutiveFailures
   * @return numConsecutiveFailures
   */
  @javax.annotation.Nullable
  public Integer getNumConsecutiveFailures() {
    return numConsecutiveFailures;
  }

  public void setNumConsecutiveFailures(Integer numConsecutiveFailures) {
    this.numConsecutiveFailures = numConsecutiveFailures;
  }


  public ExpandedPaymentMethod paymentMethodStatus(String paymentMethodStatus) {
    this.paymentMethodStatus = paymentMethodStatus;
    return this;
  }

  /**
   * Get paymentMethodStatus
   * @return paymentMethodStatus
   */
  @javax.annotation.Nullable
  public String getPaymentMethodStatus() {
    return paymentMethodStatus;
  }

  public void setPaymentMethodStatus(String paymentMethodStatus) {
    this.paymentMethodStatus = paymentMethodStatus;
  }


  public ExpandedPaymentMethod paymentRetryWindow(Integer paymentRetryWindow) {
    this.paymentRetryWindow = paymentRetryWindow;
    return this;
  }

  /**
   * Get paymentRetryWindow
   * @return paymentRetryWindow
   */
  @javax.annotation.Nullable
  public Integer getPaymentRetryWindow() {
    return paymentRetryWindow;
  }

  public void setPaymentRetryWindow(Integer paymentRetryWindow) {
    this.paymentRetryWindow = paymentRetryWindow;
  }


  public ExpandedPaymentMethod paypalBaid(String paypalBaid) {
    this.paypalBaid = paypalBaid;
    return this;
  }

  /**
   * Get paypalBaid
   * @return paypalBaid
   */
  @javax.annotation.Nullable
  public String getPaypalBaid() {
    return paypalBaid;
  }

  public void setPaypalBaid(String paypalBaid) {
    this.paypalBaid = paypalBaid;
  }


  public ExpandedPaymentMethod paypalEmail(String paypalEmail) {
    this.paypalEmail = paypalEmail;
    return this;
  }

  /**
   * Get paypalEmail
   * @return paypalEmail
   */
  @javax.annotation.Nullable
  public String getPaypalEmail() {
    return paypalEmail;
  }

  public void setPaypalEmail(String paypalEmail) {
    this.paypalEmail = paypalEmail;
  }


  public ExpandedPaymentMethod paypalPreapprovalKey(String paypalPreapprovalKey) {
    this.paypalPreapprovalKey = paypalPreapprovalKey;
    return this;
  }

  /**
   * Get paypalPreapprovalKey
   * @return paypalPreapprovalKey
   */
  @javax.annotation.Nullable
  public String getPaypalPreapprovalKey() {
    return paypalPreapprovalKey;
  }

  public void setPaypalPreapprovalKey(String paypalPreapprovalKey) {
    this.paypalPreapprovalKey = paypalPreapprovalKey;
  }


  public ExpandedPaymentMethod paypalType(String paypalType) {
    this.paypalType = paypalType;
    return this;
  }

  /**
   * Get paypalType
   * @return paypalType
   */
  @javax.annotation.Nullable
  public String getPaypalType() {
    return paypalType;
  }

  public void setPaypalType(String paypalType) {
    this.paypalType = paypalType;
  }


  public ExpandedPaymentMethod phone(String phone) {
    this.phone = phone;
    return this;
  }

  /**
   * Get phone
   * @return phone
   */
  @javax.annotation.Nullable
  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }


  public ExpandedPaymentMethod postalCode(String postalCode) {
    this.postalCode = postalCode;
    return this;
  }

  /**
   * Get postalCode
   * @return postalCode
   */
  @javax.annotation.Nullable
  public String getPostalCode() {
    return postalCode;
  }

  public void setPostalCode(String postalCode) {
    this.postalCode = postalCode;
  }


  public ExpandedPaymentMethod secondTokenId(String secondTokenId) {
    this.secondTokenId = secondTokenId;
    return this;
  }

  /**
   * Get secondTokenId
   * @return secondTokenId
   */
  @javax.annotation.Nullable
  public String getSecondTokenId() {
    return secondTokenId;
  }

  public void setSecondTokenId(String secondTokenId) {
    this.secondTokenId = secondTokenId;
  }


  public ExpandedPaymentMethod state(String state) {
    this.state = state;
    return this;
  }

  /**
   * Get state
   * @return state
   */
  @javax.annotation.Nullable
  public String getState() {
    return state;
  }

  public void setState(String state) {
    this.state = state;
  }


  public ExpandedPaymentMethod streetName(String streetName) {
    this.streetName = streetName;
    return this;
  }

  /**
   * Get streetName
   * @return streetName
   */
  @javax.annotation.Nullable
  public String getStreetName() {
    return streetName;
  }

  public void setStreetName(String streetName) {
    this.streetName = streetName;
  }


  public ExpandedPaymentMethod streetNumber(String streetNumber) {
    this.streetNumber = streetNumber;
    return this;
  }

  /**
   * Get streetNumber
   * @return streetNumber
   */
  @javax.annotation.Nullable
  public String getStreetNumber() {
    return streetNumber;
  }

  public void setStreetNumber(String streetNumber) {
    this.streetNumber = streetNumber;
  }


  public ExpandedPaymentMethod tokenId(String tokenId) {
    this.tokenId = tokenId;
    return this;
  }

  /**
   * Get tokenId
   * @return tokenId
   */
  @javax.annotation.Nullable
  public String getTokenId() {
    return tokenId;
  }

  public void setTokenId(String tokenId) {
    this.tokenId = tokenId;
  }


  public ExpandedPaymentMethod totalNumberOfErrorPayments(Integer totalNumberOfErrorPayments) {
    this.totalNumberOfErrorPayments = totalNumberOfErrorPayments;
    return this;
  }

  /**
   * Get totalNumberOfErrorPayments
   * @return totalNumberOfErrorPayments
   */
  @javax.annotation.Nullable
  public Integer getTotalNumberOfErrorPayments() {
    return totalNumberOfErrorPayments;
  }

  public void setTotalNumberOfErrorPayments(Integer totalNumberOfErrorPayments) {
    this.totalNumberOfErrorPayments = totalNumberOfErrorPayments;
  }


  public ExpandedPaymentMethod totalNumberOfProcessedPayments(Integer totalNumberOfProcessedPayments) {
    this.totalNumberOfProcessedPayments = totalNumberOfProcessedPayments;
    return this;
  }

  /**
   * Get totalNumberOfProcessedPayments
   * @return totalNumberOfProcessedPayments
   */
  @javax.annotation.Nullable
  public Integer getTotalNumberOfProcessedPayments() {
    return totalNumberOfProcessedPayments;
  }

  public void setTotalNumberOfProcessedPayments(Integer totalNumberOfProcessedPayments) {
    this.totalNumberOfProcessedPayments = totalNumberOfProcessedPayments;
  }


  public ExpandedPaymentMethod type(String type) {
    this.type = type;
    return this;
  }

  /**
   * Get type
   * @return type
   */
  @javax.annotation.Nullable
  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }


  public ExpandedPaymentMethod useDefaultRetryRule(Boolean useDefaultRetryRule) {
    this.useDefaultRetryRule = useDefaultRetryRule;
    return this;
  }

  /**
   * Get useDefaultRetryRule
   * @return useDefaultRetryRule
   */
  @javax.annotation.Nullable
  public Boolean getUseDefaultRetryRule() {
    return useDefaultRetryRule;
  }

  public void setUseDefaultRetryRule(Boolean useDefaultRetryRule) {
    this.useDefaultRetryRule = useDefaultRetryRule;
  }


  public ExpandedPaymentMethod id(String id) {
    this.id = id;
    return this;
  }

  /**
   * Get id
   * @return id
   */
  @javax.annotation.Nullable
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }


  public ExpandedPaymentMethod createdById(String createdById) {
    this.createdById = createdById;
    return this;
  }

  /**
   * Get createdById
   * @return createdById
   */
  @javax.annotation.Nullable
  public String getCreatedById() {
    return createdById;
  }

  public void setCreatedById(String createdById) {
    this.createdById = createdById;
  }


  public ExpandedPaymentMethod createdDate(String createdDate) {
    this.createdDate = createdDate;
    return this;
  }

  /**
   * Get createdDate
   * @return createdDate
   */
  @javax.annotation.Nullable
  public String getCreatedDate() {
    return createdDate;
  }

  public void setCreatedDate(String createdDate) {
    this.createdDate = createdDate;
  }


  public ExpandedPaymentMethod updatedById(String updatedById) {
    this.updatedById = updatedById;
    return this;
  }

  /**
   * Get updatedById
   * @return updatedById
   */
  @javax.annotation.Nullable
  public String getUpdatedById() {
    return updatedById;
  }

  public void setUpdatedById(String updatedById) {
    this.updatedById = updatedById;
  }


  public ExpandedPaymentMethod updatedDate(String updatedDate) {
    this.updatedDate = updatedDate;
    return this;
  }

  /**
   * Get updatedDate
   * @return updatedDate
   */
  @javax.annotation.Nullable
  public String getUpdatedDate() {
    return updatedDate;
  }

  public void setUpdatedDate(String updatedDate) {
    this.updatedDate = updatedDate;
  }


  public ExpandedPaymentMethod cardBrand(String cardBrand) {
    this.cardBrand = cardBrand;
    return this;
  }

  /**
   * Get cardBrand
   * @return cardBrand
   */
  @javax.annotation.Nullable
  public String getCardBrand() {
    return cardBrand;
  }

  public void setCardBrand(String cardBrand) {
    this.cardBrand = cardBrand;
  }


  public ExpandedPaymentMethod cardClass(String cardClass) {
    this.cardClass = cardClass;
    return this;
  }

  /**
   * Get cardClass
   * @return cardClass
   */
  @javax.annotation.Nullable
  public String getCardClass() {
    return cardClass;
  }

  public void setCardClass(String cardClass) {
    this.cardClass = cardClass;
  }


  public ExpandedPaymentMethod cardProductType(String cardProductType) {
    this.cardProductType = cardProductType;
    return this;
  }

  /**
   * Get cardProductType
   * @return cardProductType
   */
  @javax.annotation.Nullable
  public String getCardProductType() {
    return cardProductType;
  }

  public void setCardProductType(String cardProductType) {
    this.cardProductType = cardProductType;
  }


  public ExpandedPaymentMethod cardIssuingBank(String cardIssuingBank) {
    this.cardIssuingBank = cardIssuingBank;
    return this;
  }

  /**
   * Get cardIssuingBank
   * @return cardIssuingBank
   */
  @javax.annotation.Nullable
  public String getCardIssuingBank() {
    return cardIssuingBank;
  }

  public void setCardIssuingBank(String cardIssuingBank) {
    this.cardIssuingBank = cardIssuingBank;
  }


  public ExpandedPaymentMethod cardIssuingCountry(String cardIssuingCountry) {
    this.cardIssuingCountry = cardIssuingCountry;
    return this;
  }

  /**
   * Get cardIssuingCountry
   * @return cardIssuingCountry
   */
  @javax.annotation.Nullable
  public String getCardIssuingCountry() {
    return cardIssuingCountry;
  }

  public void setCardIssuingCountry(String cardIssuingCountry) {
    this.cardIssuingCountry = cardIssuingCountry;
  }


  public ExpandedPaymentMethod methodReferenceId(String methodReferenceId) {
    this.methodReferenceId = methodReferenceId;
    return this;
  }

  /**
   * Get methodReferenceId
   * @return methodReferenceId
   */
  @javax.annotation.Nullable
  public String getMethodReferenceId() {
    return methodReferenceId;
  }

  public void setMethodReferenceId(String methodReferenceId) {
    this.methodReferenceId = methodReferenceId;
  }


  public ExpandedPaymentMethod userReferenceId(String userReferenceId) {
    this.userReferenceId = userReferenceId;
    return this;
  }

  /**
   * Get userReferenceId
   * @return userReferenceId
   */
  @javax.annotation.Nullable
  public String getUserReferenceId() {
    return userReferenceId;
  }

  public void setUserReferenceId(String userReferenceId) {
    this.userReferenceId = userReferenceId;
  }


  public ExpandedPaymentMethod subType(String subType) {
    this.subType = subType;
    return this;
  }

  /**
   * Get subType
   * @return subType
   */
  @javax.annotation.Nullable
  public String getSubType() {
    return subType;
  }

  public void setSubType(String subType) {
    this.subType = subType;
  }


  public ExpandedPaymentMethod methodSpecificData(String methodSpecificData) {
    this.methodSpecificData = methodSpecificData;
    return this;
  }

  /**
   * Get methodSpecificData
   * @return methodSpecificData
   */
  @javax.annotation.Nullable
  public String getMethodSpecificData() {
    return methodSpecificData;
  }

  public void setMethodSpecificData(String methodSpecificData) {
    this.methodSpecificData = methodSpecificData;
  }


  public ExpandedPaymentMethod account(ExpandedAccount account) {
    this.account = account;
    return this;
  }

  /**
   * Get account
   * @return account
   */
  @javax.annotation.Nullable
  public ExpandedAccount getAccount() {
    return account;
  }

  public void setAccount(ExpandedAccount account) {
    this.account = account;
  }

  /**
   * A container for additional, undeclared properties.
   * This is a holder for any undeclared properties as specified with
   * the 'additionalProperties' keyword in the OAS document.
   */
  private Map additionalProperties;

  /**
   * Set the additional (undeclared) property with the specified name and value.
   * If the property does not already exist, create it otherwise replace it.
   *
   * @param key name of the property
   * @param value value of the property
   * @return the ExpandedPaymentMethod instance itself
   */
  public ExpandedPaymentMethod putAdditionalProperty(String key, Object value) {
    if (this.additionalProperties == null) {
        this.additionalProperties = new HashMap();
    }
    this.additionalProperties.put(key, value);
    return this;
  }

  /**
   * Return the additional (undeclared) property.
   *
   * @return a map of objects
   */
  public Map getAdditionalProperties() {
    return additionalProperties;
  }

  /**
   * Return the additional (undeclared) property with the specified name.
   *
   * @param key name of the property
   * @return an object
   */
  public Object getAdditionalProperty(String key) {
    if (this.additionalProperties == null) {
        return null;
    }
    return this.additionalProperties.get(key);
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ExpandedPaymentMethod expandedPaymentMethod = (ExpandedPaymentMethod) o;
    return Objects.equals(this.accountId, expandedPaymentMethod.accountId) &&
        Objects.equals(this.achAbaCode, expandedPaymentMethod.achAbaCode) &&
        Objects.equals(this.achAccountName, expandedPaymentMethod.achAccountName) &&
        Objects.equals(this.achAccountNumberMask, expandedPaymentMethod.achAccountNumberMask) &&
        Objects.equals(this.achAccountType, expandedPaymentMethod.achAccountType) &&
        Objects.equals(this.achAddress1, expandedPaymentMethod.achAddress1) &&
        Objects.equals(this.achAddress2, expandedPaymentMethod.achAddress2) &&
        Objects.equals(this.achBankName, expandedPaymentMethod.achBankName) &&
        Objects.equals(this.achCity, expandedPaymentMethod.achCity) &&
        Objects.equals(this.achCountry, expandedPaymentMethod.achCountry) &&
        Objects.equals(this.achPostalCode, expandedPaymentMethod.achPostalCode) &&
        Objects.equals(this.achState, expandedPaymentMethod.achState) &&
        Objects.equals(this.active, expandedPaymentMethod.active) &&
        Objects.equals(this.isSystem, expandedPaymentMethod.isSystem) &&
        Objects.equals(this.bankBranchCode, expandedPaymentMethod.bankBranchCode) &&
        Objects.equals(this.bankCheckDigit, expandedPaymentMethod.bankCheckDigit) &&
        Objects.equals(this.bankCity, expandedPaymentMethod.bankCity) &&
        Objects.equals(this.bankCode, expandedPaymentMethod.bankCode) &&
        Objects.equals(this.bankIdentificationNumber, expandedPaymentMethod.bankIdentificationNumber) &&
        Objects.equals(this.bankName, expandedPaymentMethod.bankName) &&
        Objects.equals(this.bankPostalCode, expandedPaymentMethod.bankPostalCode) &&
        Objects.equals(this.bankStreetName, expandedPaymentMethod.bankStreetName) &&
        Objects.equals(this.bankStreetNumber, expandedPaymentMethod.bankStreetNumber) &&
        Objects.equals(this.bankTransferAccountName, expandedPaymentMethod.bankTransferAccountName) &&
        Objects.equals(this.bankTransferAccountNumberMask, expandedPaymentMethod.bankTransferAccountNumberMask) &&
        Objects.equals(this.bankTransferAccountType, expandedPaymentMethod.bankTransferAccountType) &&
        Objects.equals(this.bankTransferType, expandedPaymentMethod.bankTransferType) &&
        Objects.equals(this.businessIdentificationCode, expandedPaymentMethod.businessIdentificationCode) &&
        Objects.equals(this.city, expandedPaymentMethod.city) &&
        Objects.equals(this.country, expandedPaymentMethod.country) &&
        Objects.equals(this.creditCardAddress1, expandedPaymentMethod.creditCardAddress1) &&
        Objects.equals(this.creditCardAddress2, expandedPaymentMethod.creditCardAddress2) &&
        Objects.equals(this.creditCardCity, expandedPaymentMethod.creditCardCity) &&
        Objects.equals(this.creditCardCountry, expandedPaymentMethod.creditCardCountry) &&
        Objects.equals(this.creditCardExpirationMonth, expandedPaymentMethod.creditCardExpirationMonth) &&
        Objects.equals(this.creditCardExpirationYear, expandedPaymentMethod.creditCardExpirationYear) &&
        Objects.equals(this.creditCardHolderName, expandedPaymentMethod.creditCardHolderName) &&
        Objects.equals(this.creditCardMaskNumber, expandedPaymentMethod.creditCardMaskNumber) &&
        Objects.equals(this.creditCardPostalCode, expandedPaymentMethod.creditCardPostalCode) &&
        Objects.equals(this.creditCardState, expandedPaymentMethod.creditCardState) &&
        Objects.equals(this.creditCardType, expandedPaymentMethod.creditCardType) &&
        Objects.equals(this.deviceSessionId, expandedPaymentMethod.deviceSessionId) &&
        Objects.equals(this.email, expandedPaymentMethod.email) &&
        Objects.equals(this.existingMandate, expandedPaymentMethod.existingMandate) &&
        Objects.equals(this.firstName, expandedPaymentMethod.firstName) &&
        Objects.equals(this.iBAN, expandedPaymentMethod.iBAN) &&
        Objects.equals(this.iPAddress, expandedPaymentMethod.iPAddress) &&
        Objects.equals(this.identityNumber, expandedPaymentMethod.identityNumber) &&
        Objects.equals(this.companyName, expandedPaymentMethod.companyName) &&
        Objects.equals(this.isCompany, expandedPaymentMethod.isCompany) &&
        Objects.equals(this.lastFailedSaleTransactionDate, expandedPaymentMethod.lastFailedSaleTransactionDate) &&
        Objects.equals(this.lastName, expandedPaymentMethod.lastName) &&
        Objects.equals(this.lastTransactionDateTime, expandedPaymentMethod.lastTransactionDateTime) &&
        Objects.equals(this.lastTransactionStatus, expandedPaymentMethod.lastTransactionStatus) &&
        Objects.equals(this.mandateCreationDate, expandedPaymentMethod.mandateCreationDate) &&
        Objects.equals(this.mandateID, expandedPaymentMethod.mandateID) &&
        Objects.equals(this.mandateReason, expandedPaymentMethod.mandateReason) &&
        Objects.equals(this.mandateReceived, expandedPaymentMethod.mandateReceived) &&
        Objects.equals(this.mandateStatus, expandedPaymentMethod.mandateStatus) &&
        Objects.equals(this.mandateUpdateDate, expandedPaymentMethod.mandateUpdateDate) &&
        Objects.equals(this.maxConsecutivePaymentFailures, expandedPaymentMethod.maxConsecutivePaymentFailures) &&
        Objects.equals(this.name, expandedPaymentMethod.name) &&
        Objects.equals(this.numConsecutiveFailures, expandedPaymentMethod.numConsecutiveFailures) &&
        Objects.equals(this.paymentMethodStatus, expandedPaymentMethod.paymentMethodStatus) &&
        Objects.equals(this.paymentRetryWindow, expandedPaymentMethod.paymentRetryWindow) &&
        Objects.equals(this.paypalBaid, expandedPaymentMethod.paypalBaid) &&
        Objects.equals(this.paypalEmail, expandedPaymentMethod.paypalEmail) &&
        Objects.equals(this.paypalPreapprovalKey, expandedPaymentMethod.paypalPreapprovalKey) &&
        Objects.equals(this.paypalType, expandedPaymentMethod.paypalType) &&
        Objects.equals(this.phone, expandedPaymentMethod.phone) &&
        Objects.equals(this.postalCode, expandedPaymentMethod.postalCode) &&
        Objects.equals(this.secondTokenId, expandedPaymentMethod.secondTokenId) &&
        Objects.equals(this.state, expandedPaymentMethod.state) &&
        Objects.equals(this.streetName, expandedPaymentMethod.streetName) &&
        Objects.equals(this.streetNumber, expandedPaymentMethod.streetNumber) &&
        Objects.equals(this.tokenId, expandedPaymentMethod.tokenId) &&
        Objects.equals(this.totalNumberOfErrorPayments, expandedPaymentMethod.totalNumberOfErrorPayments) &&
        Objects.equals(this.totalNumberOfProcessedPayments, expandedPaymentMethod.totalNumberOfProcessedPayments) &&
        Objects.equals(this.type, expandedPaymentMethod.type) &&
        Objects.equals(this.useDefaultRetryRule, expandedPaymentMethod.useDefaultRetryRule) &&
        Objects.equals(this.id, expandedPaymentMethod.id) &&
        Objects.equals(this.createdById, expandedPaymentMethod.createdById) &&
        Objects.equals(this.createdDate, expandedPaymentMethod.createdDate) &&
        Objects.equals(this.updatedById, expandedPaymentMethod.updatedById) &&
        Objects.equals(this.updatedDate, expandedPaymentMethod.updatedDate) &&
        Objects.equals(this.cardBrand, expandedPaymentMethod.cardBrand) &&
        Objects.equals(this.cardClass, expandedPaymentMethod.cardClass) &&
        Objects.equals(this.cardProductType, expandedPaymentMethod.cardProductType) &&
        Objects.equals(this.cardIssuingBank, expandedPaymentMethod.cardIssuingBank) &&
        Objects.equals(this.cardIssuingCountry, expandedPaymentMethod.cardIssuingCountry) &&
        Objects.equals(this.methodReferenceId, expandedPaymentMethod.methodReferenceId) &&
        Objects.equals(this.userReferenceId, expandedPaymentMethod.userReferenceId) &&
        Objects.equals(this.subType, expandedPaymentMethod.subType) &&
        Objects.equals(this.methodSpecificData, expandedPaymentMethod.methodSpecificData) &&
        Objects.equals(this.account, expandedPaymentMethod.account)&&
        Objects.equals(this.additionalProperties, expandedPaymentMethod.additionalProperties);
  }

  @Override
  public int hashCode() {
    return Objects.hash(accountId, achAbaCode, achAccountName, achAccountNumberMask, achAccountType, achAddress1, achAddress2, achBankName, achCity, achCountry, achPostalCode, achState, active, isSystem, bankBranchCode, bankCheckDigit, bankCity, bankCode, bankIdentificationNumber, bankName, bankPostalCode, bankStreetName, bankStreetNumber, bankTransferAccountName, bankTransferAccountNumberMask, bankTransferAccountType, bankTransferType, businessIdentificationCode, city, country, creditCardAddress1, creditCardAddress2, creditCardCity, creditCardCountry, creditCardExpirationMonth, creditCardExpirationYear, creditCardHolderName, creditCardMaskNumber, creditCardPostalCode, creditCardState, creditCardType, deviceSessionId, email, existingMandate, firstName, iBAN, iPAddress, identityNumber, companyName, isCompany, lastFailedSaleTransactionDate, lastName, lastTransactionDateTime, lastTransactionStatus, mandateCreationDate, mandateID, mandateReason, mandateReceived, mandateStatus, mandateUpdateDate, maxConsecutivePaymentFailures, name, numConsecutiveFailures, paymentMethodStatus, paymentRetryWindow, paypalBaid, paypalEmail, paypalPreapprovalKey, paypalType, phone, postalCode, secondTokenId, state, streetName, streetNumber, tokenId, totalNumberOfErrorPayments, totalNumberOfProcessedPayments, type, useDefaultRetryRule, id, createdById, createdDate, updatedById, updatedDate, cardBrand, cardClass, cardProductType, cardIssuingBank, cardIssuingCountry, methodReferenceId, userReferenceId, subType, methodSpecificData, account, additionalProperties);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ExpandedPaymentMethod {\n");
    sb.append("    accountId: ").append(toIndentedString(accountId)).append("\n");
    sb.append("    achAbaCode: ").append(toIndentedString(achAbaCode)).append("\n");
    sb.append("    achAccountName: ").append(toIndentedString(achAccountName)).append("\n");
    sb.append("    achAccountNumberMask: ").append(toIndentedString(achAccountNumberMask)).append("\n");
    sb.append("    achAccountType: ").append(toIndentedString(achAccountType)).append("\n");
    sb.append("    achAddress1: ").append(toIndentedString(achAddress1)).append("\n");
    sb.append("    achAddress2: ").append(toIndentedString(achAddress2)).append("\n");
    sb.append("    achBankName: ").append(toIndentedString(achBankName)).append("\n");
    sb.append("    achCity: ").append(toIndentedString(achCity)).append("\n");
    sb.append("    achCountry: ").append(toIndentedString(achCountry)).append("\n");
    sb.append("    achPostalCode: ").append(toIndentedString(achPostalCode)).append("\n");
    sb.append("    achState: ").append(toIndentedString(achState)).append("\n");
    sb.append("    active: ").append(toIndentedString(active)).append("\n");
    sb.append("    isSystem: ").append(toIndentedString(isSystem)).append("\n");
    sb.append("    bankBranchCode: ").append(toIndentedString(bankBranchCode)).append("\n");
    sb.append("    bankCheckDigit: ").append(toIndentedString(bankCheckDigit)).append("\n");
    sb.append("    bankCity: ").append(toIndentedString(bankCity)).append("\n");
    sb.append("    bankCode: ").append(toIndentedString(bankCode)).append("\n");
    sb.append("    bankIdentificationNumber: ").append(toIndentedString(bankIdentificationNumber)).append("\n");
    sb.append("    bankName: ").append(toIndentedString(bankName)).append("\n");
    sb.append("    bankPostalCode: ").append(toIndentedString(bankPostalCode)).append("\n");
    sb.append("    bankStreetName: ").append(toIndentedString(bankStreetName)).append("\n");
    sb.append("    bankStreetNumber: ").append(toIndentedString(bankStreetNumber)).append("\n");
    sb.append("    bankTransferAccountName: ").append(toIndentedString(bankTransferAccountName)).append("\n");
    sb.append("    bankTransferAccountNumberMask: ").append(toIndentedString(bankTransferAccountNumberMask)).append("\n");
    sb.append("    bankTransferAccountType: ").append(toIndentedString(bankTransferAccountType)).append("\n");
    sb.append("    bankTransferType: ").append(toIndentedString(bankTransferType)).append("\n");
    sb.append("    businessIdentificationCode: ").append(toIndentedString(businessIdentificationCode)).append("\n");
    sb.append("    city: ").append(toIndentedString(city)).append("\n");
    sb.append("    country: ").append(toIndentedString(country)).append("\n");
    sb.append("    creditCardAddress1: ").append(toIndentedString(creditCardAddress1)).append("\n");
    sb.append("    creditCardAddress2: ").append(toIndentedString(creditCardAddress2)).append("\n");
    sb.append("    creditCardCity: ").append(toIndentedString(creditCardCity)).append("\n");
    sb.append("    creditCardCountry: ").append(toIndentedString(creditCardCountry)).append("\n");
    sb.append("    creditCardExpirationMonth: ").append(toIndentedString(creditCardExpirationMonth)).append("\n");
    sb.append("    creditCardExpirationYear: ").append(toIndentedString(creditCardExpirationYear)).append("\n");
    sb.append("    creditCardHolderName: ").append(toIndentedString(creditCardHolderName)).append("\n");
    sb.append("    creditCardMaskNumber: ").append(toIndentedString(creditCardMaskNumber)).append("\n");
    sb.append("    creditCardPostalCode: ").append(toIndentedString(creditCardPostalCode)).append("\n");
    sb.append("    creditCardState: ").append(toIndentedString(creditCardState)).append("\n");
    sb.append("    creditCardType: ").append(toIndentedString(creditCardType)).append("\n");
    sb.append("    deviceSessionId: ").append(toIndentedString(deviceSessionId)).append("\n");
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
    sb.append("    existingMandate: ").append(toIndentedString(existingMandate)).append("\n");
    sb.append("    firstName: ").append(toIndentedString(firstName)).append("\n");
    sb.append("    iBAN: ").append(toIndentedString(iBAN)).append("\n");
    sb.append("    iPAddress: ").append(toIndentedString(iPAddress)).append("\n");
    sb.append("    identityNumber: ").append(toIndentedString(identityNumber)).append("\n");
    sb.append("    companyName: ").append(toIndentedString(companyName)).append("\n");
    sb.append("    isCompany: ").append(toIndentedString(isCompany)).append("\n");
    sb.append("    lastFailedSaleTransactionDate: ").append(toIndentedString(lastFailedSaleTransactionDate)).append("\n");
    sb.append("    lastName: ").append(toIndentedString(lastName)).append("\n");
    sb.append("    lastTransactionDateTime: ").append(toIndentedString(lastTransactionDateTime)).append("\n");
    sb.append("    lastTransactionStatus: ").append(toIndentedString(lastTransactionStatus)).append("\n");
    sb.append("    mandateCreationDate: ").append(toIndentedString(mandateCreationDate)).append("\n");
    sb.append("    mandateID: ").append(toIndentedString(mandateID)).append("\n");
    sb.append("    mandateReason: ").append(toIndentedString(mandateReason)).append("\n");
    sb.append("    mandateReceived: ").append(toIndentedString(mandateReceived)).append("\n");
    sb.append("    mandateStatus: ").append(toIndentedString(mandateStatus)).append("\n");
    sb.append("    mandateUpdateDate: ").append(toIndentedString(mandateUpdateDate)).append("\n");
    sb.append("    maxConsecutivePaymentFailures: ").append(toIndentedString(maxConsecutivePaymentFailures)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    numConsecutiveFailures: ").append(toIndentedString(numConsecutiveFailures)).append("\n");
    sb.append("    paymentMethodStatus: ").append(toIndentedString(paymentMethodStatus)).append("\n");
    sb.append("    paymentRetryWindow: ").append(toIndentedString(paymentRetryWindow)).append("\n");
    sb.append("    paypalBaid: ").append(toIndentedString(paypalBaid)).append("\n");
    sb.append("    paypalEmail: ").append(toIndentedString(paypalEmail)).append("\n");
    sb.append("    paypalPreapprovalKey: ").append(toIndentedString(paypalPreapprovalKey)).append("\n");
    sb.append("    paypalType: ").append(toIndentedString(paypalType)).append("\n");
    sb.append("    phone: ").append(toIndentedString(phone)).append("\n");
    sb.append("    postalCode: ").append(toIndentedString(postalCode)).append("\n");
    sb.append("    secondTokenId: ").append(toIndentedString(secondTokenId)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    streetName: ").append(toIndentedString(streetName)).append("\n");
    sb.append("    streetNumber: ").append(toIndentedString(streetNumber)).append("\n");
    sb.append("    tokenId: ").append(toIndentedString(tokenId)).append("\n");
    sb.append("    totalNumberOfErrorPayments: ").append(toIndentedString(totalNumberOfErrorPayments)).append("\n");
    sb.append("    totalNumberOfProcessedPayments: ").append(toIndentedString(totalNumberOfProcessedPayments)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    useDefaultRetryRule: ").append(toIndentedString(useDefaultRetryRule)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    createdById: ").append(toIndentedString(createdById)).append("\n");
    sb.append("    createdDate: ").append(toIndentedString(createdDate)).append("\n");
    sb.append("    updatedById: ").append(toIndentedString(updatedById)).append("\n");
    sb.append("    updatedDate: ").append(toIndentedString(updatedDate)).append("\n");
    sb.append("    cardBrand: ").append(toIndentedString(cardBrand)).append("\n");
    sb.append("    cardClass: ").append(toIndentedString(cardClass)).append("\n");
    sb.append("    cardProductType: ").append(toIndentedString(cardProductType)).append("\n");
    sb.append("    cardIssuingBank: ").append(toIndentedString(cardIssuingBank)).append("\n");
    sb.append("    cardIssuingCountry: ").append(toIndentedString(cardIssuingCountry)).append("\n");
    sb.append("    methodReferenceId: ").append(toIndentedString(methodReferenceId)).append("\n");
    sb.append("    userReferenceId: ").append(toIndentedString(userReferenceId)).append("\n");
    sb.append("    subType: ").append(toIndentedString(subType)).append("\n");
    sb.append("    methodSpecificData: ").append(toIndentedString(methodSpecificData)).append("\n");
    sb.append("    account: ").append(toIndentedString(account)).append("\n");
    sb.append("    additionalProperties: ").append(toIndentedString(additionalProperties)).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    ");
  }


  public static HashSet openapiFields;
  public static HashSet openapiRequiredFields;

  static {
    // a set of all properties/fields (JSON key names)
    openapiFields = new HashSet();
    openapiFields.add("accountId");
    openapiFields.add("achAbaCode");
    openapiFields.add("achAccountName");
    openapiFields.add("achAccountNumberMask");
    openapiFields.add("achAccountType");
    openapiFields.add("achAddress1");
    openapiFields.add("achAddress2");
    openapiFields.add("achBankName");
    openapiFields.add("achCity");
    openapiFields.add("achCountry");
    openapiFields.add("achPostalCode");
    openapiFields.add("achState");
    openapiFields.add("active");
    openapiFields.add("isSystem");
    openapiFields.add("bankBranchCode");
    openapiFields.add("bankCheckDigit");
    openapiFields.add("bankCity");
    openapiFields.add("bankCode");
    openapiFields.add("bankIdentificationNumber");
    openapiFields.add("bankName");
    openapiFields.add("bankPostalCode");
    openapiFields.add("bankStreetName");
    openapiFields.add("bankStreetNumber");
    openapiFields.add("bankTransferAccountName");
    openapiFields.add("bankTransferAccountNumberMask");
    openapiFields.add("bankTransferAccountType");
    openapiFields.add("bankTransferType");
    openapiFields.add("businessIdentificationCode");
    openapiFields.add("city");
    openapiFields.add("country");
    openapiFields.add("creditCardAddress1");
    openapiFields.add("creditCardAddress2");
    openapiFields.add("creditCardCity");
    openapiFields.add("creditCardCountry");
    openapiFields.add("creditCardExpirationMonth");
    openapiFields.add("creditCardExpirationYear");
    openapiFields.add("creditCardHolderName");
    openapiFields.add("creditCardMaskNumber");
    openapiFields.add("creditCardPostalCode");
    openapiFields.add("creditCardState");
    openapiFields.add("creditCardType");
    openapiFields.add("deviceSessionId");
    openapiFields.add("email");
    openapiFields.add("existingMandate");
    openapiFields.add("firstName");
    openapiFields.add("iBAN");
    openapiFields.add("iPAddress");
    openapiFields.add("identityNumber");
    openapiFields.add("companyName");
    openapiFields.add("isCompany");
    openapiFields.add("lastFailedSaleTransactionDate");
    openapiFields.add("lastName");
    openapiFields.add("lastTransactionDateTime");
    openapiFields.add("lastTransactionStatus");
    openapiFields.add("mandateCreationDate");
    openapiFields.add("mandateID");
    openapiFields.add("mandateReason");
    openapiFields.add("mandateReceived");
    openapiFields.add("mandateStatus");
    openapiFields.add("mandateUpdateDate");
    openapiFields.add("maxConsecutivePaymentFailures");
    openapiFields.add("name");
    openapiFields.add("numConsecutiveFailures");
    openapiFields.add("paymentMethodStatus");
    openapiFields.add("paymentRetryWindow");
    openapiFields.add("paypalBaid");
    openapiFields.add("paypalEmail");
    openapiFields.add("paypalPreapprovalKey");
    openapiFields.add("paypalType");
    openapiFields.add("phone");
    openapiFields.add("postalCode");
    openapiFields.add("secondTokenId");
    openapiFields.add("state");
    openapiFields.add("streetName");
    openapiFields.add("streetNumber");
    openapiFields.add("tokenId");
    openapiFields.add("totalNumberOfErrorPayments");
    openapiFields.add("totalNumberOfProcessedPayments");
    openapiFields.add("type");
    openapiFields.add("useDefaultRetryRule");
    openapiFields.add("id");
    openapiFields.add("createdById");
    openapiFields.add("createdDate");
    openapiFields.add("updatedById");
    openapiFields.add("updatedDate");
    openapiFields.add("cardBrand");
    openapiFields.add("cardClass");
    openapiFields.add("cardProductType");
    openapiFields.add("cardIssuingBank");
    openapiFields.add("cardIssuingCountry");
    openapiFields.add("methodReferenceId");
    openapiFields.add("userReferenceId");
    openapiFields.add("subType");
    openapiFields.add("methodSpecificData");
    openapiFields.add("account");

    // a set of required properties/fields (JSON key names)
    openapiRequiredFields = new HashSet();
  }

  /**
   * Validates the JSON Element and throws an exception if issues found
   *
   * @param jsonElement JSON Element
   * @throws IOException if the JSON Element is invalid with respect to ExpandedPaymentMethod
   */
  public static void validateJsonElement(JsonElement jsonElement) throws IOException {
      if (jsonElement == null) {
        if (!ExpandedPaymentMethod.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
          throw new IllegalArgumentException(String.format("The required field(s) %s in ExpandedPaymentMethod is not found in the empty JSON string", ExpandedPaymentMethod.openapiRequiredFields.toString()));
        }
      }
        JsonObject jsonObj = jsonElement.getAsJsonObject();
      if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString()));
      }
      if ((jsonObj.get("achAbaCode") != null && !jsonObj.get("achAbaCode").isJsonNull()) && !jsonObj.get("achAbaCode").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `achAbaCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achAbaCode").toString()));
      }
      if ((jsonObj.get("achAccountName") != null && !jsonObj.get("achAccountName").isJsonNull()) && !jsonObj.get("achAccountName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `achAccountName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achAccountName").toString()));
      }
      if ((jsonObj.get("achAccountNumberMask") != null && !jsonObj.get("achAccountNumberMask").isJsonNull()) && !jsonObj.get("achAccountNumberMask").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `achAccountNumberMask` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achAccountNumberMask").toString()));
      }
      if ((jsonObj.get("achAccountType") != null && !jsonObj.get("achAccountType").isJsonNull()) && !jsonObj.get("achAccountType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `achAccountType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achAccountType").toString()));
      }
      if ((jsonObj.get("achAddress1") != null && !jsonObj.get("achAddress1").isJsonNull()) && !jsonObj.get("achAddress1").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `achAddress1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achAddress1").toString()));
      }
      if ((jsonObj.get("achAddress2") != null && !jsonObj.get("achAddress2").isJsonNull()) && !jsonObj.get("achAddress2").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `achAddress2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achAddress2").toString()));
      }
      if ((jsonObj.get("achBankName") != null && !jsonObj.get("achBankName").isJsonNull()) && !jsonObj.get("achBankName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `achBankName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achBankName").toString()));
      }
      if ((jsonObj.get("achCity") != null && !jsonObj.get("achCity").isJsonNull()) && !jsonObj.get("achCity").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `achCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achCity").toString()));
      }
      if ((jsonObj.get("achCountry") != null && !jsonObj.get("achCountry").isJsonNull()) && !jsonObj.get("achCountry").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `achCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achCountry").toString()));
      }
      if ((jsonObj.get("achPostalCode") != null && !jsonObj.get("achPostalCode").isJsonNull()) && !jsonObj.get("achPostalCode").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `achPostalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achPostalCode").toString()));
      }
      if ((jsonObj.get("achState") != null && !jsonObj.get("achState").isJsonNull()) && !jsonObj.get("achState").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `achState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("achState").toString()));
      }
      if ((jsonObj.get("bankBranchCode") != null && !jsonObj.get("bankBranchCode").isJsonNull()) && !jsonObj.get("bankBranchCode").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankBranchCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankBranchCode").toString()));
      }
      if ((jsonObj.get("bankCheckDigit") != null && !jsonObj.get("bankCheckDigit").isJsonNull()) && !jsonObj.get("bankCheckDigit").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankCheckDigit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankCheckDigit").toString()));
      }
      if ((jsonObj.get("bankCity") != null && !jsonObj.get("bankCity").isJsonNull()) && !jsonObj.get("bankCity").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankCity").toString()));
      }
      if ((jsonObj.get("bankCode") != null && !jsonObj.get("bankCode").isJsonNull()) && !jsonObj.get("bankCode").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankCode").toString()));
      }
      if ((jsonObj.get("bankIdentificationNumber") != null && !jsonObj.get("bankIdentificationNumber").isJsonNull()) && !jsonObj.get("bankIdentificationNumber").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankIdentificationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankIdentificationNumber").toString()));
      }
      if ((jsonObj.get("bankName") != null && !jsonObj.get("bankName").isJsonNull()) && !jsonObj.get("bankName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankName").toString()));
      }
      if ((jsonObj.get("bankPostalCode") != null && !jsonObj.get("bankPostalCode").isJsonNull()) && !jsonObj.get("bankPostalCode").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankPostalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankPostalCode").toString()));
      }
      if ((jsonObj.get("bankStreetName") != null && !jsonObj.get("bankStreetName").isJsonNull()) && !jsonObj.get("bankStreetName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankStreetName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankStreetName").toString()));
      }
      if ((jsonObj.get("bankStreetNumber") != null && !jsonObj.get("bankStreetNumber").isJsonNull()) && !jsonObj.get("bankStreetNumber").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankStreetNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankStreetNumber").toString()));
      }
      if ((jsonObj.get("bankTransferAccountName") != null && !jsonObj.get("bankTransferAccountName").isJsonNull()) && !jsonObj.get("bankTransferAccountName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankTransferAccountName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankTransferAccountName").toString()));
      }
      if ((jsonObj.get("bankTransferAccountNumberMask") != null && !jsonObj.get("bankTransferAccountNumberMask").isJsonNull()) && !jsonObj.get("bankTransferAccountNumberMask").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankTransferAccountNumberMask` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankTransferAccountNumberMask").toString()));
      }
      if ((jsonObj.get("bankTransferAccountType") != null && !jsonObj.get("bankTransferAccountType").isJsonNull()) && !jsonObj.get("bankTransferAccountType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankTransferAccountType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankTransferAccountType").toString()));
      }
      if ((jsonObj.get("bankTransferType") != null && !jsonObj.get("bankTransferType").isJsonNull()) && !jsonObj.get("bankTransferType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `bankTransferType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bankTransferType").toString()));
      }
      if ((jsonObj.get("businessIdentificationCode") != null && !jsonObj.get("businessIdentificationCode").isJsonNull()) && !jsonObj.get("businessIdentificationCode").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `businessIdentificationCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessIdentificationCode").toString()));
      }
      if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString()));
      }
      if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString()));
      }
      if ((jsonObj.get("creditCardAddress1") != null && !jsonObj.get("creditCardAddress1").isJsonNull()) && !jsonObj.get("creditCardAddress1").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `creditCardAddress1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditCardAddress1").toString()));
      }
      if ((jsonObj.get("creditCardAddress2") != null && !jsonObj.get("creditCardAddress2").isJsonNull()) && !jsonObj.get("creditCardAddress2").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `creditCardAddress2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditCardAddress2").toString()));
      }
      if ((jsonObj.get("creditCardCity") != null && !jsonObj.get("creditCardCity").isJsonNull()) && !jsonObj.get("creditCardCity").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `creditCardCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditCardCity").toString()));
      }
      if ((jsonObj.get("creditCardCountry") != null && !jsonObj.get("creditCardCountry").isJsonNull()) && !jsonObj.get("creditCardCountry").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `creditCardCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditCardCountry").toString()));
      }
      if ((jsonObj.get("creditCardHolderName") != null && !jsonObj.get("creditCardHolderName").isJsonNull()) && !jsonObj.get("creditCardHolderName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `creditCardHolderName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditCardHolderName").toString()));
      }
      if ((jsonObj.get("creditCardMaskNumber") != null && !jsonObj.get("creditCardMaskNumber").isJsonNull()) && !jsonObj.get("creditCardMaskNumber").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `creditCardMaskNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditCardMaskNumber").toString()));
      }
      if ((jsonObj.get("creditCardPostalCode") != null && !jsonObj.get("creditCardPostalCode").isJsonNull()) && !jsonObj.get("creditCardPostalCode").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `creditCardPostalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditCardPostalCode").toString()));
      }
      if ((jsonObj.get("creditCardState") != null && !jsonObj.get("creditCardState").isJsonNull()) && !jsonObj.get("creditCardState").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `creditCardState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditCardState").toString()));
      }
      if ((jsonObj.get("creditCardType") != null && !jsonObj.get("creditCardType").isJsonNull()) && !jsonObj.get("creditCardType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `creditCardType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditCardType").toString()));
      }
      if ((jsonObj.get("deviceSessionId") != null && !jsonObj.get("deviceSessionId").isJsonNull()) && !jsonObj.get("deviceSessionId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `deviceSessionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deviceSessionId").toString()));
      }
      if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
      }
      if ((jsonObj.get("existingMandate") != null && !jsonObj.get("existingMandate").isJsonNull()) && !jsonObj.get("existingMandate").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `existingMandate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("existingMandate").toString()));
      }
      if ((jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonNull()) && !jsonObj.get("firstName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString()));
      }
      if ((jsonObj.get("iBAN") != null && !jsonObj.get("iBAN").isJsonNull()) && !jsonObj.get("iBAN").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `iBAN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iBAN").toString()));
      }
      if ((jsonObj.get("iPAddress") != null && !jsonObj.get("iPAddress").isJsonNull()) && !jsonObj.get("iPAddress").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `iPAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iPAddress").toString()));
      }
      if ((jsonObj.get("identityNumber") != null && !jsonObj.get("identityNumber").isJsonNull()) && !jsonObj.get("identityNumber").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `identityNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identityNumber").toString()));
      }
      if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString()));
      }
      if ((jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonNull()) && !jsonObj.get("lastName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString()));
      }
      if ((jsonObj.get("lastTransactionDateTime") != null && !jsonObj.get("lastTransactionDateTime").isJsonNull()) && !jsonObj.get("lastTransactionDateTime").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `lastTransactionDateTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastTransactionDateTime").toString()));
      }
      if ((jsonObj.get("lastTransactionStatus") != null && !jsonObj.get("lastTransactionStatus").isJsonNull()) && !jsonObj.get("lastTransactionStatus").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `lastTransactionStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastTransactionStatus").toString()));
      }
      if ((jsonObj.get("mandateID") != null && !jsonObj.get("mandateID").isJsonNull()) && !jsonObj.get("mandateID").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `mandateID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mandateID").toString()));
      }
      if ((jsonObj.get("mandateReason") != null && !jsonObj.get("mandateReason").isJsonNull()) && !jsonObj.get("mandateReason").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `mandateReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mandateReason").toString()));
      }
      if ((jsonObj.get("mandateReceived") != null && !jsonObj.get("mandateReceived").isJsonNull()) && !jsonObj.get("mandateReceived").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `mandateReceived` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mandateReceived").toString()));
      }
      if ((jsonObj.get("mandateStatus") != null && !jsonObj.get("mandateStatus").isJsonNull()) && !jsonObj.get("mandateStatus").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `mandateStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mandateStatus").toString()));
      }
      if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
      }
      if ((jsonObj.get("paymentMethodStatus") != null && !jsonObj.get("paymentMethodStatus").isJsonNull()) && !jsonObj.get("paymentMethodStatus").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `paymentMethodStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentMethodStatus").toString()));
      }
      if ((jsonObj.get("paypalBaid") != null && !jsonObj.get("paypalBaid").isJsonNull()) && !jsonObj.get("paypalBaid").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `paypalBaid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paypalBaid").toString()));
      }
      if ((jsonObj.get("paypalEmail") != null && !jsonObj.get("paypalEmail").isJsonNull()) && !jsonObj.get("paypalEmail").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `paypalEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paypalEmail").toString()));
      }
      if ((jsonObj.get("paypalPreapprovalKey") != null && !jsonObj.get("paypalPreapprovalKey").isJsonNull()) && !jsonObj.get("paypalPreapprovalKey").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `paypalPreapprovalKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paypalPreapprovalKey").toString()));
      }
      if ((jsonObj.get("paypalType") != null && !jsonObj.get("paypalType").isJsonNull()) && !jsonObj.get("paypalType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `paypalType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paypalType").toString()));
      }
      if ((jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) && !jsonObj.get("phone").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone").toString()));
      }
      if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString()));
      }
      if ((jsonObj.get("secondTokenId") != null && !jsonObj.get("secondTokenId").isJsonNull()) && !jsonObj.get("secondTokenId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `secondTokenId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondTokenId").toString()));
      }
      if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString()));
      }
      if ((jsonObj.get("streetName") != null && !jsonObj.get("streetName").isJsonNull()) && !jsonObj.get("streetName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `streetName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("streetName").toString()));
      }
      if ((jsonObj.get("streetNumber") != null && !jsonObj.get("streetNumber").isJsonNull()) && !jsonObj.get("streetNumber").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `streetNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("streetNumber").toString()));
      }
      if ((jsonObj.get("tokenId") != null && !jsonObj.get("tokenId").isJsonNull()) && !jsonObj.get("tokenId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `tokenId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tokenId").toString()));
      }
      if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
      }
      if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
      }
      if ((jsonObj.get("createdById") != null && !jsonObj.get("createdById").isJsonNull()) && !jsonObj.get("createdById").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `createdById` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdById").toString()));
      }
      if ((jsonObj.get("createdDate") != null && !jsonObj.get("createdDate").isJsonNull()) && !jsonObj.get("createdDate").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `createdDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdDate").toString()));
      }
      if ((jsonObj.get("updatedById") != null && !jsonObj.get("updatedById").isJsonNull()) && !jsonObj.get("updatedById").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `updatedById` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updatedById").toString()));
      }
      if ((jsonObj.get("updatedDate") != null && !jsonObj.get("updatedDate").isJsonNull()) && !jsonObj.get("updatedDate").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `updatedDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updatedDate").toString()));
      }
      if ((jsonObj.get("cardBrand") != null && !jsonObj.get("cardBrand").isJsonNull()) && !jsonObj.get("cardBrand").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `cardBrand` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardBrand").toString()));
      }
      if ((jsonObj.get("cardClass") != null && !jsonObj.get("cardClass").isJsonNull()) && !jsonObj.get("cardClass").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `cardClass` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardClass").toString()));
      }
      if ((jsonObj.get("cardProductType") != null && !jsonObj.get("cardProductType").isJsonNull()) && !jsonObj.get("cardProductType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `cardProductType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardProductType").toString()));
      }
      if ((jsonObj.get("cardIssuingBank") != null && !jsonObj.get("cardIssuingBank").isJsonNull()) && !jsonObj.get("cardIssuingBank").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `cardIssuingBank` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardIssuingBank").toString()));
      }
      if ((jsonObj.get("cardIssuingCountry") != null && !jsonObj.get("cardIssuingCountry").isJsonNull()) && !jsonObj.get("cardIssuingCountry").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `cardIssuingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardIssuingCountry").toString()));
      }
      if ((jsonObj.get("methodReferenceId") != null && !jsonObj.get("methodReferenceId").isJsonNull()) && !jsonObj.get("methodReferenceId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `methodReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("methodReferenceId").toString()));
      }
      if ((jsonObj.get("userReferenceId") != null && !jsonObj.get("userReferenceId").isJsonNull()) && !jsonObj.get("userReferenceId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `userReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userReferenceId").toString()));
      }
      if ((jsonObj.get("subType") != null && !jsonObj.get("subType").isJsonNull()) && !jsonObj.get("subType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `subType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subType").toString()));
      }
      if ((jsonObj.get("methodSpecificData") != null && !jsonObj.get("methodSpecificData").isJsonNull()) && !jsonObj.get("methodSpecificData").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `methodSpecificData` to be a primitive type in the JSON string but got `%s`", jsonObj.get("methodSpecificData").toString()));
      }
  }

  public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
    @SuppressWarnings("unchecked")
    @Override
    public  TypeAdapter create(Gson gson, TypeToken type) {
       if (!ExpandedPaymentMethod.class.isAssignableFrom(type.getRawType())) {
         return null; // this class only serializes 'ExpandedPaymentMethod' and its subtypes
       }
       final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
       final TypeAdapter thisAdapter
                        = gson.getDelegateAdapter(this, TypeToken.get(ExpandedPaymentMethod.class));

       return (TypeAdapter) new TypeAdapter() {
           @Override
           public void write(JsonWriter out, ExpandedPaymentMethod value) throws IOException {
             JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
             obj.remove("additionalProperties");

             // support null values
             out.beginObject();
             Iterator iterator = obj.entrySet().iterator();
             while(iterator.hasNext()) {
                 Map.Entry e = (Map.Entry) iterator.next();
                 out.name((String)e.getKey());
                 elementAdapter.write(out, e.getValue());
             }

             // end

             // serialize additional properties
             if (value.getAdditionalProperties() != null) {
               // support null values
               boolean oldSerializeNulls = out.getSerializeNulls();
               out.setSerializeNulls(true); //force serialize
               // end
               for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
                 if (entry.getValue() instanceof String)
                   obj.addProperty(entry.getKey(), (String) entry.getValue());
                 else if (entry.getValue() instanceof Number)
                   obj.addProperty(entry.getKey(), (Number) entry.getValue());
                 else if (entry.getValue() instanceof Boolean)
                   obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
                 else if (entry.getValue() instanceof Character)
                   obj.addProperty(entry.getKey(), (Character) entry.getValue());
                 else if (entry.getValue() == null)
                    obj.add(entry.getKey(), null);
                 else {
                   JsonElement jsonElement = gson.toJsonTree(entry.getValue());
                   if (jsonElement.isJsonArray()) {
                     obj.add(entry.getKey(), jsonElement.getAsJsonArray());
                   } else {
                     obj.add(entry.getKey(), jsonElement.getAsJsonObject());
                   }
                 }
                 out.name((String)entry.getKey());
                 elementAdapter.write(out, obj.get(entry.getKey()));
               }
               out.setSerializeNulls(oldSerializeNulls); //restore
             }
             out.endObject();

           }

           @Override
           public ExpandedPaymentMethod read(JsonReader in) throws IOException {
             JsonElement jsonElement = elementAdapter.read(in);
             validateJsonElement(jsonElement);
             JsonObject jsonObj = jsonElement.getAsJsonObject();
             // store additional fields in the deserialized instance
             ExpandedPaymentMethod instance = thisAdapter.fromJsonTree(jsonObj);
             for (Map.Entry entry : jsonObj.entrySet()) {
               if (!openapiFields.contains(entry.getKey())) {
                 if (entry.getValue().isJsonPrimitive()) { // primitive type
                   if (entry.getValue().getAsJsonPrimitive().isString())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
                   else if (entry.getValue().getAsJsonPrimitive().isNumber())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
                   else if (entry.getValue().getAsJsonPrimitive().isBoolean())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
                   else
                     throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
                 } else if (entry.getValue().isJsonArray()) {
                     instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
                 } else { // JSON object
                     instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
                 }
               }
             }
             return instance;
           }

       }.nullSafe();
    }
  }

  /**
   * Create an instance of ExpandedPaymentMethod given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of ExpandedPaymentMethod
   * @throws IOException if the JSON string is invalid with respect to ExpandedPaymentMethod
   */
  public static ExpandedPaymentMethod fromJson(String jsonString) throws IOException {
    return JSON.getGson().fromJson(jsonString, ExpandedPaymentMethod.class);
  }

  /**
   * Convert an instance of ExpandedPaymentMethod to an JSON string
   *
   * @return JSON string
   */
  public String toJson() {
    return JSON.getGson().toJson(this);
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy