Package com.adyen.model.tapi
Class Instalment
- java.lang.Object
-
- com.adyen.model.tapi.Instalment
-
public class Instalment extends Object
Instalment
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_CHARGESstatic StringJSON_PROPERTY_CUMULATIVE_AMOUNTstatic StringJSON_PROPERTY_FIRST_AMOUNTstatic StringJSON_PROPERTY_FIRST_PAYMENT_DATEstatic StringJSON_PROPERTY_INSTALMENT_TYPEstatic StringJSON_PROPERTY_PERIODstatic StringJSON_PROPERTY_PERIOD_UNITstatic StringJSON_PROPERTY_PLAN_I_Dstatic StringJSON_PROPERTY_SEQUENCE_NUMBERstatic StringJSON_PROPERTY_TOTAL_NB_OF_PAYMENTS
-
Constructor Summary
Constructors Constructor Description Instalment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Instalmentcharges(BigDecimal charges)Charges related to a transaction.InstalmentcumulativeAmount(BigDecimal cumulativeAmount)Sum of a collection of amounts.booleanequals(Object o)Return true if this Instalment object is equal to o.InstalmentfirstAmount(BigDecimal firstAmount)First amount of the payment instalments.InstalmentfirstPaymentDate(LocalDate firstPaymentDate)First date of a payment.static InstalmentfromJson(String jsonString)Create an instance of Instalment given an JSON stringBigDecimalgetCharges()Charges related to a transaction.BigDecimalgetCumulativeAmount()Sum of a collection of amounts.Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.BigDecimalgetFirstAmount()First amount of the payment instalments. minimum: 0.0 maximum: 99999999.999999LocalDategetFirstPaymentDate()First date of a payment.InstalmentTypegetInstalmentType()Get instalmentTypeIntegergetPeriod()Period of time with defined unit of time.PeriodUnitgetPeriodUnit()Get periodUnitStringgetPlanID()Identification of an instalment plan.IntegergetSequenceNumber()Sequence number of the instalment.IntegergetTotalNbOfPayments()Total number of payments.inthashCode()InstalmentincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.InstalmentinstalmentType(InstalmentType instalmentType)instalmentTypebooleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.Instalmentperiod(Integer period)Period of time with defined unit of time.InstalmentperiodUnit(PeriodUnit periodUnit)periodUnitInstalmentplanID(String planID)Identification of an instalment plan.InstalmentsequenceNumber(Integer sequenceNumber)Sequence number of the instalment.voidsetCharges(BigDecimal charges)Charges related to a transaction.voidsetCumulativeAmount(BigDecimal cumulativeAmount)Sum of a collection of amounts.voidsetFirstAmount(BigDecimal firstAmount)First amount of the payment instalments.voidsetFirstPaymentDate(LocalDate firstPaymentDate)First date of a payment.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetInstalmentType(InstalmentType instalmentType)instalmentTypevoidsetPeriod(Integer period)Period of time with defined unit of time.voidsetPeriodUnit(PeriodUnit periodUnit)periodUnitvoidsetPlanID(String planID)Identification of an instalment plan.voidsetSequenceNumber(Integer sequenceNumber)Sequence number of the instalment.voidsetTotalNbOfPayments(Integer totalNbOfPayments)Total number of payments.StringtoJson()Convert an instance of Instalment to an JSON stringStringtoString()InstalmenttotalNbOfPayments(Integer totalNbOfPayments)Total number of payments.
-
-
-
Field Detail
-
JSON_PROPERTY_INSTALMENT_TYPE
public static final String JSON_PROPERTY_INSTALMENT_TYPE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SEQUENCE_NUMBER
public static final String JSON_PROPERTY_SEQUENCE_NUMBER
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PLAN_I_D
public static final String JSON_PROPERTY_PLAN_I_D
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PERIOD
public static final String JSON_PROPERTY_PERIOD
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PERIOD_UNIT
public static final String JSON_PROPERTY_PERIOD_UNIT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_FIRST_PAYMENT_DATE
public static final String JSON_PROPERTY_FIRST_PAYMENT_DATE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TOTAL_NB_OF_PAYMENTS
public static final String JSON_PROPERTY_TOTAL_NB_OF_PAYMENTS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CUMULATIVE_AMOUNT
public static final String JSON_PROPERTY_CUMULATIVE_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_FIRST_AMOUNT
public static final String JSON_PROPERTY_FIRST_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CHARGES
public static final String JSON_PROPERTY_CHARGES
- See Also:
- Constant Field Values
-
-
Method Detail
-
instalmentType
public Instalment instalmentType(InstalmentType instalmentType)
instalmentType- Parameters:
instalmentType-- Returns:
- the current
Instalmentinstance, allowing for method chaining
-
getInstalmentType
public InstalmentType getInstalmentType()
Get instalmentType- Returns:
- instalmentType
-
setInstalmentType
public void setInstalmentType(InstalmentType instalmentType)
instalmentType- Parameters:
instalmentType-
-
sequenceNumber
public Instalment sequenceNumber(Integer sequenceNumber)
Sequence number of the instalment. For an instalment payment transaction, number of the payment, from 1 to TotalNbOfPayments.- Parameters:
sequenceNumber- Sequence number of the instalment. For an instalment payment transaction, number of the payment, from 1 to TotalNbOfPayments.- Returns:
- the current
Instalmentinstance, allowing for method chaining
-
getSequenceNumber
public Integer getSequenceNumber()
Sequence number of the instalment. For an instalment payment transaction, number of the payment, from 1 to TotalNbOfPayments.- Returns:
- sequenceNumber Sequence number of the instalment. For an instalment payment transaction, number of the payment, from 1 to TotalNbOfPayments.
-
setSequenceNumber
public void setSequenceNumber(Integer sequenceNumber)
Sequence number of the instalment. For an instalment payment transaction, number of the payment, from 1 to TotalNbOfPayments.- Parameters:
sequenceNumber- Sequence number of the instalment. For an instalment payment transaction, number of the payment, from 1 to TotalNbOfPayments.
-
planID
public Instalment planID(String planID)
Identification of an instalment plan.- Parameters:
planID- Identification of an instalment plan.- Returns:
- the current
Instalmentinstance, allowing for method chaining
-
getPlanID
public String getPlanID()
Identification of an instalment plan.- Returns:
- planID Identification of an instalment plan.
-
setPlanID
public void setPlanID(String planID)
Identification of an instalment plan.- Parameters:
planID- Identification of an instalment plan.
-
period
public Instalment period(Integer period)
Period of time with defined unit of time. A period between 2 payment instalments.- Parameters:
period- Period of time with defined unit of time. A period between 2 payment instalments.- Returns:
- the current
Instalmentinstance, allowing for method chaining
-
getPeriod
public Integer getPeriod()
Period of time with defined unit of time. A period between 2 payment instalments.- Returns:
- period Period of time with defined unit of time. A period between 2 payment instalments.
-
setPeriod
public void setPeriod(Integer period)
Period of time with defined unit of time. A period between 2 payment instalments.- Parameters:
period- Period of time with defined unit of time. A period between 2 payment instalments.
-
periodUnit
public Instalment periodUnit(PeriodUnit periodUnit)
periodUnit- Parameters:
periodUnit-- Returns:
- the current
Instalmentinstance, allowing for method chaining
-
getPeriodUnit
public PeriodUnit getPeriodUnit()
Get periodUnit- Returns:
- periodUnit
-
setPeriodUnit
public void setPeriodUnit(PeriodUnit periodUnit)
periodUnit- Parameters:
periodUnit-
-
firstPaymentDate
public Instalment firstPaymentDate(LocalDate firstPaymentDate)
First date of a payment. For instalment, the date of the first payments, if not immediate.- Parameters:
firstPaymentDate- First date of a payment. For instalment, the date of the first payments, if not immediate.- Returns:
- the current
Instalmentinstance, allowing for method chaining
-
getFirstPaymentDate
public LocalDate getFirstPaymentDate()
First date of a payment. For instalment, the date of the first payments, if not immediate.- Returns:
- firstPaymentDate First date of a payment. For instalment, the date of the first payments, if not immediate.
-
setFirstPaymentDate
public void setFirstPaymentDate(LocalDate firstPaymentDate)
First date of a payment. For instalment, the date of the first payments, if not immediate.- Parameters:
firstPaymentDate- First date of a payment. For instalment, the date of the first payments, if not immediate.
-
totalNbOfPayments
public Instalment totalNbOfPayments(Integer totalNbOfPayments)
Total number of payments. For instalment, the number of payments, including the first one.- Parameters:
totalNbOfPayments- Total number of payments. For instalment, the number of payments, including the first one.- Returns:
- the current
Instalmentinstance, allowing for method chaining
-
getTotalNbOfPayments
public Integer getTotalNbOfPayments()
Total number of payments. For instalment, the number of payments, including the first one.- Returns:
- totalNbOfPayments Total number of payments. For instalment, the number of payments, including the first one.
-
setTotalNbOfPayments
public void setTotalNbOfPayments(Integer totalNbOfPayments)
Total number of payments. For instalment, the number of payments, including the first one.- Parameters:
totalNbOfPayments- Total number of payments. For instalment, the number of payments, including the first one.
-
cumulativeAmount
public Instalment cumulativeAmount(BigDecimal cumulativeAmount)
Sum of a collection of amounts. Total amount of the payment instalments.- Parameters:
cumulativeAmount- Sum of a collection of amounts. Total amount of the payment instalments.- Returns:
- the current
Instalmentinstance, allowing for method chaining
-
getCumulativeAmount
public BigDecimal getCumulativeAmount()
Sum of a collection of amounts. Total amount of the payment instalments. minimum: 0.0 maximum: 99999999.999999- Returns:
- cumulativeAmount Sum of a collection of amounts. Total amount of the payment instalments.
-
setCumulativeAmount
public void setCumulativeAmount(BigDecimal cumulativeAmount)
Sum of a collection of amounts. Total amount of the payment instalments.- Parameters:
cumulativeAmount- Sum of a collection of amounts. Total amount of the payment instalments.
-
firstAmount
public Instalment firstAmount(BigDecimal firstAmount)
First amount of the payment instalments.- Parameters:
firstAmount- First amount of the payment instalments.- Returns:
- the current
Instalmentinstance, allowing for method chaining
-
getFirstAmount
public BigDecimal getFirstAmount()
First amount of the payment instalments. minimum: 0.0 maximum: 99999999.999999- Returns:
- firstAmount First amount of the payment instalments.
-
setFirstAmount
public void setFirstAmount(BigDecimal firstAmount)
First amount of the payment instalments.- Parameters:
firstAmount- First amount of the payment instalments.
-
charges
public Instalment charges(BigDecimal charges)
Charges related to a transaction. Charge related to the payment instalments.- Parameters:
charges- Charges related to a transaction. Charge related to the payment instalments.- Returns:
- the current
Instalmentinstance, allowing for method chaining
-
getCharges
public BigDecimal getCharges()
Charges related to a transaction. Charge related to the payment instalments. minimum: 0.0 maximum: 99999999.999999- Returns:
- charges Charges related to a transaction. Charge related to the payment instalments.
-
setCharges
public void setCharges(BigDecimal charges)
Charges related to a transaction. Charge related to the payment instalments.- Parameters:
charges- Charges related to a transaction. Charge related to the payment instalments.
-
includeNullValues
public Instalment 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 Instalment 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 Instalment fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Instalment given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Instalment
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Instalment
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Instalment to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-