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

com.zuora.model.ExpandedPaymentMethodSnapshot 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 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;

/**
 * ExpandedPaymentMethodSnapshot
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0")
public class ExpandedPaymentMethodSnapshot {
  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_BANK_NAME = "achBankName";
  @SerializedName(SERIALIZED_NAME_ACH_BANK_NAME)
  private String achBankName;

  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_PAYMENT_METHOD_ID = "paymentMethodId";
  @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD_ID)
  private String paymentMethodId;

  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_DATE = "createdDate";
  @SerializedName(SERIALIZED_NAME_CREATED_DATE)
  private String createdDate;

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

  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 ExpandedPaymentMethodSnapshot() {
  }

  public ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot paymentMethodId(String paymentMethodId) {
    this.paymentMethodId = paymentMethodId;
    return this;
  }

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

  public void setPaymentMethodId(String paymentMethodId) {
    this.paymentMethodId = paymentMethodId;
  }


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

  /**
   * 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 ExpandedPaymentMethodSnapshot instance itself
   */
  public ExpandedPaymentMethodSnapshot 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;
    }
    ExpandedPaymentMethodSnapshot expandedPaymentMethodSnapshot = (ExpandedPaymentMethodSnapshot) o;
    return Objects.equals(this.accountId, expandedPaymentMethodSnapshot.accountId) &&
        Objects.equals(this.achAbaCode, expandedPaymentMethodSnapshot.achAbaCode) &&
        Objects.equals(this.achAccountName, expandedPaymentMethodSnapshot.achAccountName) &&
        Objects.equals(this.achAccountNumberMask, expandedPaymentMethodSnapshot.achAccountNumberMask) &&
        Objects.equals(this.achAccountType, expandedPaymentMethodSnapshot.achAccountType) &&
        Objects.equals(this.achBankName, expandedPaymentMethodSnapshot.achBankName) &&
        Objects.equals(this.bankBranchCode, expandedPaymentMethodSnapshot.bankBranchCode) &&
        Objects.equals(this.bankCheckDigit, expandedPaymentMethodSnapshot.bankCheckDigit) &&
        Objects.equals(this.bankCity, expandedPaymentMethodSnapshot.bankCity) &&
        Objects.equals(this.bankCode, expandedPaymentMethodSnapshot.bankCode) &&
        Objects.equals(this.bankIdentificationNumber, expandedPaymentMethodSnapshot.bankIdentificationNumber) &&
        Objects.equals(this.bankName, expandedPaymentMethodSnapshot.bankName) &&
        Objects.equals(this.bankPostalCode, expandedPaymentMethodSnapshot.bankPostalCode) &&
        Objects.equals(this.bankStreetName, expandedPaymentMethodSnapshot.bankStreetName) &&
        Objects.equals(this.bankStreetNumber, expandedPaymentMethodSnapshot.bankStreetNumber) &&
        Objects.equals(this.bankTransferAccountName, expandedPaymentMethodSnapshot.bankTransferAccountName) &&
        Objects.equals(this.bankTransferAccountNumberMask, expandedPaymentMethodSnapshot.bankTransferAccountNumberMask) &&
        Objects.equals(this.bankTransferAccountType, expandedPaymentMethodSnapshot.bankTransferAccountType) &&
        Objects.equals(this.bankTransferType, expandedPaymentMethodSnapshot.bankTransferType) &&
        Objects.equals(this.businessIdentificationCode, expandedPaymentMethodSnapshot.businessIdentificationCode) &&
        Objects.equals(this.city, expandedPaymentMethodSnapshot.city) &&
        Objects.equals(this.country, expandedPaymentMethodSnapshot.country) &&
        Objects.equals(this.creditCardAddress1, expandedPaymentMethodSnapshot.creditCardAddress1) &&
        Objects.equals(this.creditCardAddress2, expandedPaymentMethodSnapshot.creditCardAddress2) &&
        Objects.equals(this.creditCardCity, expandedPaymentMethodSnapshot.creditCardCity) &&
        Objects.equals(this.creditCardCountry, expandedPaymentMethodSnapshot.creditCardCountry) &&
        Objects.equals(this.creditCardExpirationMonth, expandedPaymentMethodSnapshot.creditCardExpirationMonth) &&
        Objects.equals(this.creditCardExpirationYear, expandedPaymentMethodSnapshot.creditCardExpirationYear) &&
        Objects.equals(this.creditCardHolderName, expandedPaymentMethodSnapshot.creditCardHolderName) &&
        Objects.equals(this.creditCardMaskNumber, expandedPaymentMethodSnapshot.creditCardMaskNumber) &&
        Objects.equals(this.creditCardPostalCode, expandedPaymentMethodSnapshot.creditCardPostalCode) &&
        Objects.equals(this.creditCardState, expandedPaymentMethodSnapshot.creditCardState) &&
        Objects.equals(this.creditCardType, expandedPaymentMethodSnapshot.creditCardType) &&
        Objects.equals(this.deviceSessionId, expandedPaymentMethodSnapshot.deviceSessionId) &&
        Objects.equals(this.email, expandedPaymentMethodSnapshot.email) &&
        Objects.equals(this.existingMandate, expandedPaymentMethodSnapshot.existingMandate) &&
        Objects.equals(this.firstName, expandedPaymentMethodSnapshot.firstName) &&
        Objects.equals(this.iBAN, expandedPaymentMethodSnapshot.iBAN) &&
        Objects.equals(this.iPAddress, expandedPaymentMethodSnapshot.iPAddress) &&
        Objects.equals(this.identityNumber, expandedPaymentMethodSnapshot.identityNumber) &&
        Objects.equals(this.companyName, expandedPaymentMethodSnapshot.companyName) &&
        Objects.equals(this.isCompany, expandedPaymentMethodSnapshot.isCompany) &&
        Objects.equals(this.lastFailedSaleTransactionDate, expandedPaymentMethodSnapshot.lastFailedSaleTransactionDate) &&
        Objects.equals(this.lastName, expandedPaymentMethodSnapshot.lastName) &&
        Objects.equals(this.lastTransactionDateTime, expandedPaymentMethodSnapshot.lastTransactionDateTime) &&
        Objects.equals(this.lastTransactionStatus, expandedPaymentMethodSnapshot.lastTransactionStatus) &&
        Objects.equals(this.mandateCreationDate, expandedPaymentMethodSnapshot.mandateCreationDate) &&
        Objects.equals(this.mandateID, expandedPaymentMethodSnapshot.mandateID) &&
        Objects.equals(this.mandateReason, expandedPaymentMethodSnapshot.mandateReason) &&
        Objects.equals(this.mandateReceived, expandedPaymentMethodSnapshot.mandateReceived) &&
        Objects.equals(this.mandateStatus, expandedPaymentMethodSnapshot.mandateStatus) &&
        Objects.equals(this.mandateUpdateDate, expandedPaymentMethodSnapshot.mandateUpdateDate) &&
        Objects.equals(this.maxConsecutivePaymentFailures, expandedPaymentMethodSnapshot.maxConsecutivePaymentFailures) &&
        Objects.equals(this.name, expandedPaymentMethodSnapshot.name) &&
        Objects.equals(this.paymentMethodId, expandedPaymentMethodSnapshot.paymentMethodId) &&
        Objects.equals(this.numConsecutiveFailures, expandedPaymentMethodSnapshot.numConsecutiveFailures) &&
        Objects.equals(this.paymentMethodStatus, expandedPaymentMethodSnapshot.paymentMethodStatus) &&
        Objects.equals(this.paymentRetryWindow, expandedPaymentMethodSnapshot.paymentRetryWindow) &&
        Objects.equals(this.paypalBaid, expandedPaymentMethodSnapshot.paypalBaid) &&
        Objects.equals(this.paypalEmail, expandedPaymentMethodSnapshot.paypalEmail) &&
        Objects.equals(this.paypalPreapprovalKey, expandedPaymentMethodSnapshot.paypalPreapprovalKey) &&
        Objects.equals(this.paypalType, expandedPaymentMethodSnapshot.paypalType) &&
        Objects.equals(this.phone, expandedPaymentMethodSnapshot.phone) &&
        Objects.equals(this.postalCode, expandedPaymentMethodSnapshot.postalCode) &&
        Objects.equals(this.secondTokenId, expandedPaymentMethodSnapshot.secondTokenId) &&
        Objects.equals(this.state, expandedPaymentMethodSnapshot.state) &&
        Objects.equals(this.streetName, expandedPaymentMethodSnapshot.streetName) &&
        Objects.equals(this.streetNumber, expandedPaymentMethodSnapshot.streetNumber) &&
        Objects.equals(this.tokenId, expandedPaymentMethodSnapshot.tokenId) &&
        Objects.equals(this.totalNumberOfErrorPayments, expandedPaymentMethodSnapshot.totalNumberOfErrorPayments) &&
        Objects.equals(this.totalNumberOfProcessedPayments, expandedPaymentMethodSnapshot.totalNumberOfProcessedPayments) &&
        Objects.equals(this.type, expandedPaymentMethodSnapshot.type) &&
        Objects.equals(this.useDefaultRetryRule, expandedPaymentMethodSnapshot.useDefaultRetryRule) &&
        Objects.equals(this.id, expandedPaymentMethodSnapshot.id) &&
        Objects.equals(this.createdDate, expandedPaymentMethodSnapshot.createdDate) &&
        Objects.equals(this.updatedDate, expandedPaymentMethodSnapshot.updatedDate) &&
        Objects.equals(this.methodReferenceId, expandedPaymentMethodSnapshot.methodReferenceId) &&
        Objects.equals(this.userReferenceId, expandedPaymentMethodSnapshot.userReferenceId) &&
        Objects.equals(this.subType, expandedPaymentMethodSnapshot.subType) &&
        Objects.equals(this.methodSpecificData, expandedPaymentMethodSnapshot.methodSpecificData)&&
        Objects.equals(this.additionalProperties, expandedPaymentMethodSnapshot.additionalProperties);
  }

  @Override
  public int hashCode() {
    return Objects.hash(accountId, achAbaCode, achAccountName, achAccountNumberMask, achAccountType, achBankName, 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, paymentMethodId, numConsecutiveFailures, paymentMethodStatus, paymentRetryWindow, paypalBaid, paypalEmail, paypalPreapprovalKey, paypalType, phone, postalCode, secondTokenId, state, streetName, streetNumber, tokenId, totalNumberOfErrorPayments, totalNumberOfProcessedPayments, type, useDefaultRetryRule, id, createdDate, updatedDate, methodReferenceId, userReferenceId, subType, methodSpecificData, additionalProperties);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ExpandedPaymentMethodSnapshot {\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("    achBankName: ").append(toIndentedString(achBankName)).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("    paymentMethodId: ").append(toIndentedString(paymentMethodId)).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("    createdDate: ").append(toIndentedString(createdDate)).append("\n");
    sb.append("    updatedDate: ").append(toIndentedString(updatedDate)).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("    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("achBankName");
    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("paymentMethodId");
    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("createdDate");
    openapiFields.add("updatedDate");
    openapiFields.add("methodReferenceId");
    openapiFields.add("userReferenceId");
    openapiFields.add("subType");
    openapiFields.add("methodSpecificData");

    // 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 ExpandedPaymentMethodSnapshot
   */
  public static void validateJsonElement(JsonElement jsonElement) throws IOException {
      if (jsonElement == null) {
        if (!ExpandedPaymentMethodSnapshot.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
          throw new IllegalArgumentException(String.format("The required field(s) %s in ExpandedPaymentMethodSnapshot is not found in the empty JSON string", ExpandedPaymentMethodSnapshot.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("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("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("paymentMethodId") != null && !jsonObj.get("paymentMethodId").isJsonNull()) && !jsonObj.get("paymentMethodId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `paymentMethodId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentMethodId").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("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("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("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 (!ExpandedPaymentMethodSnapshot.class.isAssignableFrom(type.getRawType())) {
         return null; // this class only serializes 'ExpandedPaymentMethodSnapshot' and its subtypes
       }
       final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
       final TypeAdapter thisAdapter
                        = gson.getDelegateAdapter(this, TypeToken.get(ExpandedPaymentMethodSnapshot.class));

       return (TypeAdapter) new TypeAdapter() {
           @Override
           public void write(JsonWriter out, ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot read(JsonReader in) throws IOException {
             JsonElement jsonElement = elementAdapter.read(in);
             validateJsonElement(jsonElement);
             JsonObject jsonObj = jsonElement.getAsJsonObject();
             // store additional fields in the deserialized instance
             ExpandedPaymentMethodSnapshot 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 ExpandedPaymentMethodSnapshot given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of ExpandedPaymentMethodSnapshot
   * @throws IOException if the JSON string is invalid with respect to ExpandedPaymentMethodSnapshot
   */
  public static ExpandedPaymentMethodSnapshot fromJson(String jsonString) throws IOException {
    return JSON.getGson().fromJson(jsonString, ExpandedPaymentMethodSnapshot.class);
  }

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





© 2015 - 2025 Weber Informatics LLC | Privacy Policy