Package com.adyen.model.management
Class ModelConfiguration
- java.lang.Object
-
- com.adyen.model.management.ModelConfiguration
-
public class ModelConfiguration extends Object
ModelConfiguration
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_BRANDstatic StringJSON_PROPERTY_COMMERCIALstatic StringJSON_PROPERTY_COUNTRYstatic StringJSON_PROPERTY_CURRENCIESstatic StringJSON_PROPERTY_SOURCES
-
Constructor Summary
Constructors Constructor Description ModelConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelConfigurationaddCountryItem(String countryItem)ModelConfigurationaddCurrenciesItem(Currency currenciesItem)ModelConfigurationaddSourcesItem(String sourcesItem)ModelConfigurationbrand(String brand)Payment method, like **eftpos_australia** or **mc**.ModelConfigurationcommercial(Boolean commercial)Set to **true** to apply surcharges only to commercial/business cards.ModelConfigurationcountry(List<String> country)The country/region of the card issuer.ModelConfigurationcurrencies(List<Currency> currencies)Currency and percentage or amount of the surcharge.booleanequals(Object o)Return true if this Configuration object is equal to o.static ModelConfigurationfromJson(String jsonString)Create an instance of ModelConfiguration given an JSON stringStringgetBrand()Payment method, like **eftpos_australia** or **mc**.BooleangetCommercial()Set to **true** to apply surcharges only to commercial/business cards.List<String>getCountry()The country/region of the card issuer.List<Currency>getCurrencies()Currency and percentage or amount of the surcharge.List<String>getSources()Funding source.inthashCode()voidsetBrand(String brand)Payment method, like **eftpos_australia** or **mc**.voidsetCommercial(Boolean commercial)Set to **true** to apply surcharges only to commercial/business cards.voidsetCountry(List<String> country)The country/region of the card issuer.voidsetCurrencies(List<Currency> currencies)Currency and percentage or amount of the surcharge.voidsetSources(List<String> sources)Funding source.ModelConfigurationsources(List<String> sources)Funding source.StringtoJson()Convert an instance of ModelConfiguration to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_BRAND
public static final String JSON_PROPERTY_BRAND
- See Also:
- Constant Field Values
-
JSON_PROPERTY_COMMERCIAL
public static final String JSON_PROPERTY_COMMERCIAL
- See Also:
- Constant Field Values
-
JSON_PROPERTY_COUNTRY
public static final String JSON_PROPERTY_COUNTRY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CURRENCIES
public static final String JSON_PROPERTY_CURRENCIES
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SOURCES
public static final String JSON_PROPERTY_SOURCES
- See Also:
- Constant Field Values
-
-
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-- Returns:
- the current
ModelConfigurationinstance, 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
-
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-
-
commercial
public ModelConfiguration commercial(Boolean commercial)
Set to **true** to apply surcharges only to commercial/business cards.- Parameters:
commercial-- Returns:
- the current
ModelConfigurationinstance, allowing for method chaining
-
getCommercial
public Boolean getCommercial()
Set to **true** to apply surcharges only to commercial/business cards.- Returns:
- commercial
-
setCommercial
public void setCommercial(Boolean commercial)
Set to **true** to apply surcharges only to commercial/business cards.- Parameters:
commercial-
-
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-- Returns:
- the current
ModelConfigurationinstance, allowing for method chaining
-
addCountryItem
public ModelConfiguration addCountryItem(String countryItem)
-
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
-
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-
-
currencies
public ModelConfiguration currencies(List<Currency> currencies)
Currency and percentage or amount of the surcharge.- Parameters:
currencies-- Returns:
- the current
ModelConfigurationinstance, allowing for method chaining
-
addCurrenciesItem
public ModelConfiguration addCurrenciesItem(Currency currenciesItem)
-
getCurrencies
public List<Currency> getCurrencies()
Currency and percentage or amount of the surcharge.- Returns:
- currencies
-
setCurrencies
public void setCurrencies(List<Currency> currencies)
Currency and percentage or amount of the surcharge.- Parameters:
currencies-
-
sources
public ModelConfiguration sources(List<String> sources)
Funding source. Possible values: * **Credit** * **Debit**- Parameters:
sources-- Returns:
- the current
ModelConfigurationinstance, allowing for method chaining
-
addSourcesItem
public ModelConfiguration addSourcesItem(String sourcesItem)
-
getSources
public List<String> getSources()
Funding source. Possible values: * **Credit** * **Debit**- Returns:
- sources
-
setSources
public void setSources(List<String> sources)
Funding source. Possible values: * **Credit** * **Debit**- Parameters:
sources-
-
equals
public boolean equals(Object o)
Return true if this Configuration object is equal to o.
-
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
-
-