Package com.adyen.model.checkout
Class Mandate
- java.lang.Object
-
- com.adyen.model.checkout.Mandate
-
public class Mandate extends Object
Mandate
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMandate.AmountRuleEnumThe limitation rule of the billing amount.static classMandate.BillingAttemptsRuleEnumThe rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date.static classMandate.CustomTypeAdapterFactorystatic classMandate.FrequencyEnumThe frequency with which a shopper should be charged.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_AMOUNTstatic StringSERIALIZED_NAME_AMOUNT_RULEstatic StringSERIALIZED_NAME_BILLING_ATTEMPTS_RULEstatic StringSERIALIZED_NAME_BILLING_DAYstatic StringSERIALIZED_NAME_ENDS_ATstatic StringSERIALIZED_NAME_FREQUENCYstatic StringSERIALIZED_NAME_REMARKSstatic StringSERIALIZED_NAME_STARTS_AT
-
Constructor Summary
Constructors Constructor Description Mandate()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Mandateamount(String amount)MandateamountRule(Mandate.AmountRuleEnum amountRule)MandatebillingAttemptsRule(Mandate.BillingAttemptsRuleEnum billingAttemptsRule)MandatebillingDay(String billingDay)MandateendsAt(String endsAt)booleanequals(Object o)Mandatefrequency(Mandate.FrequencyEnum frequency)static MandatefromJson(String jsonString)Create an instance of Mandate given an JSON stringStringgetAmount()The billing amount (in minor units) of the recurring transactions.Mandate.AmountRuleEnumgetAmountRule()The limitation rule of the billing amount.Mandate.BillingAttemptsRuleEnumgetBillingAttemptsRule()The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date.StringgetBillingDay()The number of the day, on which the recurring debit can happen.StringgetEndsAt()End date of the billing plan, in YYYY-MM-DD format.Mandate.FrequencyEnumgetFrequency()The frequency with which a shopper should be charged.StringgetRemarks()The message shown by UPI to the shopper on the approval screen.StringgetStartsAt()Start date of the billing plan, in YYYY-MM-DD format.inthashCode()Mandateremarks(String remarks)voidsetAmount(String amount)voidsetAmountRule(Mandate.AmountRuleEnum amountRule)voidsetBillingAttemptsRule(Mandate.BillingAttemptsRuleEnum billingAttemptsRule)voidsetBillingDay(String billingDay)voidsetEndsAt(String endsAt)voidsetFrequency(Mandate.FrequencyEnum frequency)voidsetRemarks(String remarks)voidsetStartsAt(String startsAt)MandatestartsAt(String startsAt)StringtoJson()Convert an instance of Mandate to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_AMOUNT
public static final String SERIALIZED_NAME_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_AMOUNT_RULE
public static final String SERIALIZED_NAME_AMOUNT_RULE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_BILLING_ATTEMPTS_RULE
public static final String SERIALIZED_NAME_BILLING_ATTEMPTS_RULE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_BILLING_DAY
public static final String SERIALIZED_NAME_BILLING_DAY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ENDS_AT
public static final String SERIALIZED_NAME_ENDS_AT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FREQUENCY
public static final String SERIALIZED_NAME_FREQUENCY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REMARKS
public static final String SERIALIZED_NAME_REMARKS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STARTS_AT
public static final String SERIALIZED_NAME_STARTS_AT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAmount
public String getAmount()
The billing amount (in minor units) of the recurring transactions.- Returns:
- amount
-
setAmount
public void setAmount(String amount)
-
amountRule
public Mandate amountRule(Mandate.AmountRuleEnum amountRule)
-
getAmountRule
public Mandate.AmountRuleEnum getAmountRule()
The limitation rule of the billing amount. Possible values: * **max**: The transaction amount can not exceed the `amount`. * **exact**: The transaction amount should be the same as the `amount`.- Returns:
- amountRule
-
setAmountRule
public void setAmountRule(Mandate.AmountRuleEnum amountRule)
-
billingAttemptsRule
public Mandate billingAttemptsRule(Mandate.BillingAttemptsRuleEnum billingAttemptsRule)
-
getBillingAttemptsRule
public Mandate.BillingAttemptsRuleEnum getBillingAttemptsRule()
The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date. Possible values: * **on**: On a specific date. * **before**: Before and on a specific date. * **after**: On and after a specific date.- Returns:
- billingAttemptsRule
-
setBillingAttemptsRule
public void setBillingAttemptsRule(Mandate.BillingAttemptsRuleEnum billingAttemptsRule)
-
getBillingDay
public String getBillingDay()
The number of the day, on which the recurring debit can happen. Should be within the same calendar month as the mandate recurring date. Possible values: 1-31 based on the `frequency`.- Returns:
- billingDay
-
setBillingDay
public void setBillingDay(String billingDay)
-
getEndsAt
public String getEndsAt()
End date of the billing plan, in YYYY-MM-DD format.- Returns:
- endsAt
-
setEndsAt
public void setEndsAt(String endsAt)
-
frequency
public Mandate frequency(Mandate.FrequencyEnum frequency)
-
getFrequency
public Mandate.FrequencyEnum getFrequency()
The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**.- Returns:
- frequency
-
setFrequency
public void setFrequency(Mandate.FrequencyEnum frequency)
-
getRemarks
public String getRemarks()
The message shown by UPI to the shopper on the approval screen.- Returns:
- remarks
-
setRemarks
public void setRemarks(String remarks)
-
getStartsAt
public String getStartsAt()
Start date of the billing plan, in YYYY-MM-DD format. By default, the transaction date.- Returns:
- startsAt
-
setStartsAt
public void setStartsAt(String startsAt)
-
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 Mandate
-
fromJson
public static Mandate fromJson(String jsonString) throws IOException
Create an instance of Mandate given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Mandate
- Throws:
IOException- if the JSON string is invalid with respect to Mandate
-
toJson
public String toJson()
Convert an instance of Mandate to an JSON string- Returns:
- JSON string
-
-