Package com.adyen.model.checkout
Class InstallmentOption
- java.lang.Object
-
- com.adyen.model.checkout.InstallmentOption
-
public class InstallmentOption extends Object
InstallmentOption
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInstallmentOption.PlansEnumGets or Sets plans
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_MAX_VALUEstatic StringJSON_PROPERTY_PLANSstatic StringJSON_PROPERTY_PRESELECTED_VALUEstatic StringJSON_PROPERTY_VALUES
-
Constructor Summary
Constructors Constructor Description InstallmentOption()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InstallmentOptionaddPlansItem(InstallmentOption.PlansEnum plansItem)InstallmentOptionaddValuesItem(Integer valuesItem)booleanequals(Object o)Return true if this InstallmentOption object is equal to o.static InstallmentOptionfromJson(String jsonString)Create an instance of InstallmentOption given an JSON stringMap<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.IntegergetMaxValue()The maximum number of installments offered for this payment method.List<InstallmentOption.PlansEnum>getPlans()Defines the type of installment plan.IntegergetPreselectedValue()Preselected number of installments offered for this payment method.List<Integer>getValues()An array of the number of installments that the shopper can choose from.inthashCode()InstallmentOptionincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.InstallmentOptionmaxValue(Integer maxValue)The maximum number of installments offered for this payment method.InstallmentOptionplans(List<InstallmentOption.PlansEnum> plans)Defines the type of installment plan.InstallmentOptionpreselectedValue(Integer preselectedValue)Preselected number of installments offered for this payment method.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetMaxValue(Integer maxValue)The maximum number of installments offered for this payment method.voidsetPlans(List<InstallmentOption.PlansEnum> plans)Defines the type of installment plan.voidsetPreselectedValue(Integer preselectedValue)Preselected number of installments offered for this payment method.voidsetValues(List<Integer> values)An array of the number of installments that the shopper can choose from.StringtoJson()Convert an instance of InstallmentOption to an JSON stringStringtoString()InstallmentOptionvalues(List<Integer> values)An array of the number of installments that the shopper can choose from.
-
-
-
Field Detail
-
JSON_PROPERTY_MAX_VALUE
public static final String JSON_PROPERTY_MAX_VALUE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PLANS
public static final String JSON_PROPERTY_PLANS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PRESELECTED_VALUE
public static final String JSON_PROPERTY_PRESELECTED_VALUE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_VALUES
public static final String JSON_PROPERTY_VALUES
- See Also:
- Constant Field Values
-
-
Method Detail
-
maxValue
public InstallmentOption maxValue(Integer maxValue)
The maximum number of installments offered for this payment method.- Parameters:
maxValue- The maximum number of installments offered for this payment method.- Returns:
- the current
InstallmentOptioninstance, allowing for method chaining
-
getMaxValue
public Integer getMaxValue()
The maximum number of installments offered for this payment method.- Returns:
- maxValue The maximum number of installments offered for this payment method.
-
setMaxValue
public void setMaxValue(Integer maxValue)
The maximum number of installments offered for this payment method.- Parameters:
maxValue- The maximum number of installments offered for this payment method.
-
plans
public InstallmentOption plans(List<InstallmentOption.PlansEnum> plans)
Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving**- Parameters:
plans- Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving**- Returns:
- the current
InstallmentOptioninstance, allowing for method chaining
-
addPlansItem
public InstallmentOption addPlansItem(InstallmentOption.PlansEnum plansItem)
-
getPlans
public List<InstallmentOption.PlansEnum> getPlans()
Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving**- Returns:
- plans Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving**
-
setPlans
public void setPlans(List<InstallmentOption.PlansEnum> plans)
Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving**- Parameters:
plans- Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving**
-
preselectedValue
public InstallmentOption preselectedValue(Integer preselectedValue)
Preselected number of installments offered for this payment method.- Parameters:
preselectedValue- Preselected number of installments offered for this payment method.- Returns:
- the current
InstallmentOptioninstance, allowing for method chaining
-
getPreselectedValue
public Integer getPreselectedValue()
Preselected number of installments offered for this payment method.- Returns:
- preselectedValue Preselected number of installments offered for this payment method.
-
setPreselectedValue
public void setPreselectedValue(Integer preselectedValue)
Preselected number of installments offered for this payment method.- Parameters:
preselectedValue- Preselected number of installments offered for this payment method.
-
values
public InstallmentOption values(List<Integer> values)
An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`.- Parameters:
values- An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`.- Returns:
- the current
InstallmentOptioninstance, allowing for method chaining
-
addValuesItem
public InstallmentOption addValuesItem(Integer valuesItem)
-
getValues
public List<Integer> getValues()
An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`.- Returns:
- values An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`.
-
setValues
public void setValues(List<Integer> values)
An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`.- Parameters:
values- An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`.
-
includeNullValues
public InstallmentOption 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 InstallmentOption object is equal to o.
-
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 InstallmentOption fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of InstallmentOption given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of InstallmentOption
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to InstallmentOption
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of InstallmentOption to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-