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 stringIntegergetMaxValue()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()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.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-- Returns:
- the current
InstallmentOptioninstance, allowing for method chaining
-
getMaxValue
public Integer getMaxValue()
The maximum number of installments offered for this payment method.- Returns:
- maxValue
-
setMaxValue
public void setMaxValue(Integer maxValue)
The maximum number of installments offered for this payment method.- Parameters:
maxValue-
-
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-- 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
-
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-
-
preselectedValue
public InstallmentOption preselectedValue(Integer preselectedValue)
Preselected number of installments offered for this payment method.- Parameters:
preselectedValue-- Returns:
- the current
InstallmentOptioninstance, allowing for method chaining
-
getPreselectedValue
public Integer getPreselectedValue()
Preselected number of installments offered for this payment method.- Returns:
- preselectedValue
-
setPreselectedValue
public void setPreselectedValue(Integer preselectedValue)
Preselected number of installments offered for this payment method.- Parameters:
preselectedValue-
-
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-- 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
-
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-
-
equals
public boolean equals(Object o)
Return true if this InstallmentOption object is equal to o.
-
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
-
-