Package com.adyen.model.payments
Class Installments
- java.lang.Object
-
- com.adyen.model.payments.Installments
-
public class Installments extends Object
Installments
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInstallments.CustomTypeAdapterFactorystatic classInstallments.PlanEnumThe installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan).
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_PLANstatic StringSERIALIZED_NAME_VALUE
-
Constructor Summary
Constructors Constructor Description Installments()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static InstallmentsfromJson(String jsonString)Create an instance of Installments given an JSON stringInstallments.PlanEnumgetPlan()The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan).IntegergetValue()Defines the number of installments.inthashCode()Installmentsplan(Installments.PlanEnum plan)voidsetPlan(Installments.PlanEnum plan)voidsetValue(Integer value)StringtoJson()Convert an instance of Installments to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues foundInstallmentsvalue(Integer value)
-
-
-
Field Detail
-
SERIALIZED_NAME_PLAN
public static final String SERIALIZED_NAME_PLAN
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_VALUE
public static final String SERIALIZED_NAME_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
plan
public Installments plan(Installments.PlanEnum plan)
-
getPlan
public Installments.PlanEnum getPlan()
The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving**- Returns:
- plan
-
setPlan
public void setPlan(Installments.PlanEnum plan)
-
value
public Installments value(Integer value)
-
getValue
public Integer getValue()
Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary.- Returns:
- value
-
setValue
public void setValue(Integer value)
-
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 Installments
-
fromJson
public static Installments fromJson(String jsonString) throws IOException
Create an instance of Installments given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Installments
- Throws:
IOException- if the JSON string is invalid with respect to Installments
-
toJson
public String toJson()
Convert an instance of Installments to an JSON string- Returns:
- JSON string
-
-