Class ModelConfiguration


  • public class ModelConfiguration
    extends Object
    ModelConfiguration
    • Constructor Detail

      • ModelConfiguration

        public ModelConfiguration()
    • Method Detail

      • brand

        public ModelConfiguration brand​(String brand)
        Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api).
        Parameters:
        brand - Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api).
        Returns:
        the current ModelConfiguration instance, allowing for method chaining
      • getBrand

        public String getBrand()
        Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api).
        Returns:
        brand Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api).
      • setBrand

        public void setBrand​(String brand)
        Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api).
        Parameters:
        brand - Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api).
      • commercial

        public ModelConfiguration commercial​(Boolean commercial)
        Set to **true** to apply surcharges only to commercial/business cards.
        Parameters:
        commercial - Set to **true** to apply surcharges only to commercial/business cards.
        Returns:
        the current ModelConfiguration instance, allowing for method chaining
      • getCommercial

        public Boolean getCommercial()
        Set to **true** to apply surcharges only to commercial/business cards.
        Returns:
        commercial Set to **true** to apply surcharges only to commercial/business cards.
      • setCommercial

        public void setCommercial​(Boolean commercial)
        Set to **true** to apply surcharges only to commercial/business cards.
        Parameters:
        commercial - Set to **true** to apply surcharges only to commercial/business cards.
      • country

        public ModelConfiguration country​(List<String> country)
        The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region.
        Parameters:
        country - The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region.
        Returns:
        the current ModelConfiguration instance, allowing for method chaining
      • getCountry

        public List<String> getCountry()
        The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region.
        Returns:
        country The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region.
      • setCountry

        public void setCountry​(List<String> country)
        The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region.
        Parameters:
        country - The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region.
      • currencies

        public ModelConfiguration currencies​(List<Currency> currencies)
        Currency and percentage or amount of the surcharge.
        Parameters:
        currencies - Currency and percentage or amount of the surcharge.
        Returns:
        the current ModelConfiguration instance, allowing for method chaining
      • getCurrencies

        public List<Currency> getCurrencies()
        Currency and percentage or amount of the surcharge.
        Returns:
        currencies Currency and percentage or amount of the surcharge.
      • setCurrencies

        public void setCurrencies​(List<Currency> currencies)
        Currency and percentage or amount of the surcharge.
        Parameters:
        currencies - Currency and percentage or amount of the surcharge.
      • sources

        public ModelConfiguration sources​(List<String> sources)
        Funding source. Possible values: * **Credit** * **Debit**
        Parameters:
        sources - Funding source. Possible values: * **Credit** * **Debit**
        Returns:
        the current ModelConfiguration instance, allowing for method chaining
      • getSources

        public List<String> getSources()
        Funding source. Possible values: * **Credit** * **Debit**
        Returns:
        sources Funding source. Possible values: * **Credit** * **Debit**
      • setSources

        public void setSources​(List<String> sources)
        Funding source. Possible values: * **Credit** * **Debit**
        Parameters:
        sources - Funding source. Possible values: * **Credit** * **Debit**
      • includeNullValues

        public ModelConfiguration includeNullValues​(boolean includeNullValues)
        Configures whether null values are explicitly serialized in the JSON payload. Default is false.
      • isIncludeNullValues

        public boolean isIncludeNullValues()
        Returns whether null values are explicitly serialized in the JSON payload.
      • setIncludeNullValues

        public void setIncludeNullValues​(boolean includeNullValues)
        Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
      • equals

        public boolean equals​(Object o)
        Return true if this Configuration object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getExplicitNulls

        public Map<String,​Object> getExplicitNulls()
        Returns a map of properties to be merged into the JSON payload as explicit null values.
      • fromJson

        public static ModelConfiguration fromJson​(String jsonString)
                                           throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of ModelConfiguration given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of ModelConfiguration
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to ModelConfiguration
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of ModelConfiguration to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException