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.CustomTypeAdapterFactorystatic classInstallmentOption.PlansEnumGets or Sets plans
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_MAX_VALUEstatic StringSERIALIZED_NAME_PLANSstatic StringSERIALIZED_NAME_PRESELECTED_VALUEstatic StringSERIALIZED_NAME_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)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)InstallmentOptionplans(List<InstallmentOption.PlansEnum> plans)InstallmentOptionpreselectedValue(Integer preselectedValue)voidsetMaxValue(Integer maxValue)voidsetPlans(List<InstallmentOption.PlansEnum> plans)voidsetPreselectedValue(Integer preselectedValue)voidsetValues(List<Integer> values)StringtoJson()Convert an instance of InstallmentOption to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues foundInstallmentOptionvalues(List<Integer> values)
-
-
-
Field Detail
-
SERIALIZED_NAME_MAX_VALUE
public static final String SERIALIZED_NAME_MAX_VALUE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PLANS
public static final String SERIALIZED_NAME_PLANS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PRESELECTED_VALUE
public static final String SERIALIZED_NAME_PRESELECTED_VALUE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_VALUES
public static final String SERIALIZED_NAME_VALUES
- See Also:
- Constant Field Values
-
-
Method Detail
-
maxValue
public InstallmentOption maxValue(Integer maxValue)
-
getMaxValue
public Integer getMaxValue()
The maximum number of installments offered for this payment method.- Returns:
- maxValue
-
setMaxValue
public void setMaxValue(Integer maxValue)
-
plans
public InstallmentOption plans(List<InstallmentOption.PlansEnum> plans)
-
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)
-
preselectedValue
public InstallmentOption preselectedValue(Integer preselectedValue)
-
getPreselectedValue
public Integer getPreselectedValue()
Preselected number of installments offered for this payment method.- Returns:
- preselectedValue
-
setPreselectedValue
public void setPreselectedValue(Integer preselectedValue)
-
values
public InstallmentOption values(List<Integer> values)
-
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
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to InstallmentOption
-
fromJson
public static InstallmentOption fromJson(String jsonString) throws IOException
Create an instance of InstallmentOption given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of InstallmentOption
- Throws:
IOException- if the JSON string is invalid with respect to InstallmentOption
-
toJson
public String toJson()
Convert an instance of InstallmentOption to an JSON string- Returns:
- JSON string
-
-