content: /*
   * Adyen Checkout API
   *
   * The version of the OpenAPI document: 71
   *
   *
   * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
   * https://openapi-generator.tech
   * Do not edit the class manually.
   */
  
  package com.adyen.model.checkout;
  
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import java.util.*;
  
  /** SubMerchantInfo */
  @JsonPropertyOrder({
    SubMerchantInfo.JSON_PROPERTY_ADDRESS,
    SubMerchantInfo.JSON_PROPERTY_AMOUNT,
    SubMerchantInfo.JSON_PROPERTY_EMAIL,
    SubMerchantInfo.JSON_PROPERTY_ID,
    SubMerchantInfo.JSON_PROPERTY_MCC,
    SubMerchantInfo.JSON_PROPERTY_NAME,
    SubMerchantInfo.JSON_PROPERTY_PHONE_NUMBER,
    SubMerchantInfo.JSON_PROPERTY_REGISTERED_SINCE,
    SubMerchantInfo.JSON_PROPERTY_TAX_ID,
    SubMerchantInfo.JSON_PROPERTY_URL
  })
  public class SubMerchantInfo {
    public static final String JSON_PROPERTY_ADDRESS = "address";
    private BillingAddress address;
  
    public static final String JSON_PROPERTY_AMOUNT = "amount";
    private Amount amount;
  
    public static final String JSON_PROPERTY_EMAIL = "email";
    private String email;
  
    public static final String JSON_PROPERTY_ID = "id";
    private String id;
  
    public static final String JSON_PROPERTY_MCC = "mcc";
    private String mcc;
  
    public static final String JSON_PROPERTY_NAME = "name";
    private String name;
  
    public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber";
    private String phoneNumber;
  
    public static final String JSON_PROPERTY_REGISTERED_SINCE = "registeredSince";
    private String registeredSince;
  
    public static final String JSON_PROPERTY_TAX_ID = "taxId";
    private String taxId;
  
    public static final String JSON_PROPERTY_URL = "url";
    private String url;
  
    public SubMerchantInfo() {}
  
    /**
     * address
     *
     * @param address
     * @return the current {@code SubMerchantInfo} instance, allowing for method chaining
     */
    public SubMerchantInfo address(BillingAddress address) {
      this.address = address;
      return this;
    }
  
    /**
     * Get address
     *
     * @return address
     */
    @JsonProperty(JSON_PROPERTY_ADDRESS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public BillingAddress getAddress() {
      return address;
    }
  
    /**
     * address
     *
     * @param address
     */
    @JsonProperty(JSON_PROPERTY_ADDRESS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAddress(BillingAddress address) {
      this.address = address;
    }
  
    /**
     * amount
     *
     * @param amount
     * @return the current {@code SubMerchantInfo} instance, allowing for method chaining
     */
    public SubMerchantInfo amount(Amount amount) {
      this.amount = amount;
      return this;
    }
  
    /**
     * Get amount
     *
     * @return amount
     */
    @JsonProperty(JSON_PROPERTY_AMOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Amount getAmount() {
      return amount;
    }
  
    /**
     * amount
     *
     * @param amount
     */
    @JsonProperty(JSON_PROPERTY_AMOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAmount(Amount amount) {
      this.amount = amount;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The email associated
     * with the sub-merchant&#39;s account.
     *
     * @param email Required for transactions performed by registered payment facilitators. The email
     *     associated with the sub-merchant&#39;s account.
     * @return the current {@code SubMerchantInfo} instance, allowing for method chaining
     */
    public SubMerchantInfo email(String email) {
      this.email = email;
      return this;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The email associated
     * with the sub-merchant&#39;s account.
     *
     * @return email Required for transactions performed by registered payment facilitators. The email
     *     associated with the sub-merchant&#39;s account.
     */
    @JsonProperty(JSON_PROPERTY_EMAIL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getEmail() {
      return email;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The email associated
     * with the sub-merchant&#39;s account.
     *
     * @param email Required for transactions performed by registered payment facilitators. The email
     *     associated with the sub-merchant&#39;s account.
     */
    @JsonProperty(JSON_PROPERTY_EMAIL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setEmail(String email) {
      this.email = email;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. A unique identifier
     * that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format:
     * Alphanumeric * Maximum length: 15 characters
     *
     * @param id Required for transactions performed by registered payment facilitators. A unique
     *     identifier that you create for the sub-merchant, used by schemes to identify the
     *     sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters
     * @return the current {@code SubMerchantInfo} instance, allowing for method chaining
     */
    public SubMerchantInfo id(String id) {
      this.id = id;
      return this;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. A unique identifier
     * that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format:
     * Alphanumeric * Maximum length: 15 characters
     *
     * @return id Required for transactions performed by registered payment facilitators. A unique
     *     identifier that you create for the sub-merchant, used by schemes to identify the
     *     sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters
     */
    @JsonProperty(JSON_PROPERTY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getId() {
      return id;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. A unique identifier
     * that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format:
     * Alphanumeric * Maximum length: 15 characters
     *
     * @param id Required for transactions performed by registered payment facilitators. A unique
     *     identifier that you create for the sub-merchant, used by schemes to identify the
     *     sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters
     */
    @JsonProperty(JSON_PROPERTY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setId(String id) {
      this.id = id;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The sub-merchant&#39;s
     * 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits
     *
     * @param mcc Required for transactions performed by registered payment facilitators. The
     *     sub-merchant&#39;s 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length:
     *     4 digits
     * @return the current {@code SubMerchantInfo} instance, allowing for method chaining
     */
    public SubMerchantInfo mcc(String mcc) {
      this.mcc = mcc;
      return this;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The sub-merchant&#39;s
     * 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits
     *
     * @return mcc Required for transactions performed by registered payment facilitators. The
     *     sub-merchant&#39;s 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length:
     *     4 digits
     */
    @JsonProperty(JSON_PROPERTY_MCC)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getMcc() {
      return mcc;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The sub-merchant&#39;s
     * 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits
     *
     * @param mcc Required for transactions performed by registered payment facilitators. The
     *     sub-merchant&#39;s 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length:
     *     4 digits
     */
    @JsonProperty(JSON_PROPERTY_MCC)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setMcc(String mcc) {
      this.mcc = mcc;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The name of the
     * sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement
     * that will appear in the card statement. Exception: for acquirers in Brazil, this value does not
     * overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters
     *
     * @param name Required for transactions performed by registered payment facilitators. The name of
     *     the sub-merchant. Based on scheme specifications, this value will overwrite the shopper
     *     statement that will appear in the card statement. Exception: for acquirers in Brazil, this
     *     value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22
     *     characters
     * @return the current {@code SubMerchantInfo} instance, allowing for method chaining
     */
    public SubMerchantInfo name(String name) {
      this.name = name;
      return this;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The name of the
     * sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement
     * that will appear in the card statement. Exception: for acquirers in Brazil, this value does not
     * overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters
     *
     * @return name Required for transactions performed by registered payment facilitators. The name
     *     of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper
     *     statement that will appear in the card statement. Exception: for acquirers in Brazil, this
     *     value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22
     *     characters
     */
    @JsonProperty(JSON_PROPERTY_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getName() {
      return name;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The name of the
     * sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement
     * that will appear in the card statement. Exception: for acquirers in Brazil, this value does not
     * overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters
     *
     * @param name Required for transactions performed by registered payment facilitators. The name of
     *     the sub-merchant. Based on scheme specifications, this value will overwrite the shopper
     *     statement that will appear in the card statement. Exception: for acquirers in Brazil, this
     *     value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22
     *     characters
     */
    @JsonProperty(JSON_PROPERTY_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setName(String name) {
      this.name = name;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The phone number
     * associated with the sub-merchant&#39;s account.
     *
     * @param phoneNumber Required for transactions performed by registered payment facilitators. The
     *     phone number associated with the sub-merchant&#39;s account.
     * @return the current {@code SubMerchantInfo} instance, allowing for method chaining
     */
    public SubMerchantInfo phoneNumber(String phoneNumber) {
      this.phoneNumber = phoneNumber;
      return this;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The phone number
     * associated with the sub-merchant&#39;s account.
     *
     * @return phoneNumber Required for transactions performed by registered payment facilitators. The
     *     phone number associated with the sub-merchant&#39;s account.
     */
    @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getPhoneNumber() {
      return phoneNumber;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The phone number
     * associated with the sub-merchant&#39;s account.
     *
     * @param phoneNumber Required for transactions performed by registered payment facilitators. The
     *     phone number associated with the sub-merchant&#39;s account.
     */
    @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setPhoneNumber(String phoneNumber) {
      this.phoneNumber = phoneNumber;
    }
  
    /**
     * registeredSince
     *
     * @param registeredSince
     * @return the current {@code SubMerchantInfo} instance, allowing for method chaining
     */
    public SubMerchantInfo registeredSince(String registeredSince) {
      this.registeredSince = registeredSince;
      return this;
    }
  
    /**
     * Get registeredSince
     *
     * @return registeredSince
     */
    @JsonProperty(JSON_PROPERTY_REGISTERED_SINCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getRegisteredSince() {
      return registeredSince;
    }
  
    /**
     * registeredSince
     *
     * @param registeredSince
     */
    @JsonProperty(JSON_PROPERTY_REGISTERED_SINCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setRegisteredSince(String registeredSince) {
      this.registeredSince = registeredSince;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The tax ID of the
     * sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ
     *
     * @param taxId Required for transactions performed by registered payment facilitators. The tax ID
     *     of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits
     *     for the CNPJ
     * @return the current {@code SubMerchantInfo} instance, allowing for method chaining
     */
    public SubMerchantInfo taxId(String taxId) {
      this.taxId = taxId;
      return this;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The tax ID of the
     * sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ
     *
     * @return taxId Required for transactions performed by registered payment facilitators. The tax
     *     ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14
     *     digits for the CNPJ
     */
    @JsonProperty(JSON_PROPERTY_TAX_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getTaxId() {
      return taxId;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The tax ID of the
     * sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ
     *
     * @param taxId Required for transactions performed by registered payment facilitators. The tax ID
     *     of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits
     *     for the CNPJ
     */
    @JsonProperty(JSON_PROPERTY_TAX_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setTaxId(String taxId) {
      this.taxId = taxId;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The sub-merchant&#39;s
     * URL on the platform, i.e. the sub-merchant&#39;s shop.
     *
     * @param url Required for transactions performed by registered payment facilitators. The
     *     sub-merchant&#39;s URL on the platform, i.e. the sub-merchant&#39;s shop.
     * @return the current {@code SubMerchantInfo} instance, allowing for method chaining
     */
    public SubMerchantInfo url(String url) {
      this.url = url;
      return this;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The sub-merchant&#39;s
     * URL on the platform, i.e. the sub-merchant&#39;s shop.
     *
     * @return url Required for transactions performed by registered payment facilitators. The
     *     sub-merchant&#39;s URL on the platform, i.e. the sub-merchant&#39;s shop.
     */
    @JsonProperty(JSON_PROPERTY_URL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getUrl() {
      return url;
    }
  
    /**
     * Required for transactions performed by registered payment facilitators. The sub-merchant&#39;s
     * URL on the platform, i.e. the sub-merchant&#39;s shop.
     *
     * @param url Required for transactions performed by registered payment facilitators. The
     *     sub-merchant&#39;s URL on the platform, i.e. the sub-merchant&#39;s shop.
     */
    @JsonProperty(JSON_PROPERTY_URL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setUrl(String url) {
      this.url = url;
    }
  
    /** Return true if this SubMerchantInfo object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      SubMerchantInfo subMerchantInfo = (SubMerchantInfo) o;
      return Objects.equals(this.address, subMerchantInfo.address)
          && Objects.equals(this.amount, subMerchantInfo.amount)
          && Objects.equals(this.email, subMerchantInfo.email)
          && Objects.equals(this.id, subMerchantInfo.id)
          && Objects.equals(this.mcc, subMerchantInfo.mcc)
          && Objects.equals(this.name, subMerchantInfo.name)
          && Objects.equals(this.phoneNumber, subMerchantInfo.phoneNumber)
          && Objects.equals(this.registeredSince, subMerchantInfo.registeredSince)
          && Objects.equals(this.taxId, subMerchantInfo.taxId)
          && Objects.equals(this.url, subMerchantInfo.url);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(
          address, amount, email, id, mcc, name, phoneNumber, registeredSince, taxId, url);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class SubMerchantInfo {\n");
      sb.append("    address: ").append(toIndentedString(address)).append("\n");
      sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
      sb.append("    email: ").append(toIndentedString(email)).append("\n");
      sb.append("    id: ").append(toIndentedString(id)).append("\n");
      sb.append("    mcc: ").append(toIndentedString(mcc)).append("\n");
      sb.append("    name: ").append(toIndentedString(name)).append("\n");
      sb.append("    phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n");
      sb.append("    registeredSince: ").append(toIndentedString(registeredSince)).append("\n");
      sb.append("    taxId: ").append(toIndentedString(taxId)).append("\n");
      sb.append("    url: ").append(toIndentedString(url)).append("\n");
      sb.append("}");
      return sb.toString();
    }
  
    /**
     * Convert the given object to string with each line indented by 4 spaces (except the first line).
     */
    private String toIndentedString(Object o) {
      if (o == null) {
        return "null";
      }
      return o.toString().replace("\n", "\n    ");
    }
  
    /**
     * Create an instance of SubMerchantInfo given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of SubMerchantInfo
     * @throws JsonProcessingException if the JSON string is invalid with respect to SubMerchantInfo
     */
    public static SubMerchantInfo fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, SubMerchantInfo.class);
    }
  
    /**
     * Convert an instance of SubMerchantInfo to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  