Package com.adyen.model.payment
Class Mandate
- java.lang.Object
-
- com.adyen.model.payment.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.FrequencyEnumThe frequency with which a shopper should be charged.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_AMOUNTstatic StringJSON_PROPERTY_AMOUNT_RULEstatic StringJSON_PROPERTY_BILLING_ATTEMPTS_RULEstatic StringJSON_PROPERTY_BILLING_DAYstatic StringJSON_PROPERTY_COUNTstatic StringJSON_PROPERTY_ENDS_ATstatic StringJSON_PROPERTY_FREQUENCYstatic StringJSON_PROPERTY_REMARKSstatic StringJSON_PROPERTY_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)The billing amount (in minor units) of the recurring transactions.MandateamountRule(Mandate.AmountRuleEnum amountRule)The limitation rule of the billing amount.MandatebillingAttemptsRule(Mandate.BillingAttemptsRuleEnum billingAttemptsRule)The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date.MandatebillingDay(String billingDay)The number of the day, on which the recurring debit can happen.Mandatecount(String count)The number of transactions that can be performed within the given frequency.MandateendsAt(String endsAt)End date of the billing plan, in YYYY-MM-DD format.booleanequals(Object o)Return true if this Mandate object is equal to o.Mandatefrequency(Mandate.FrequencyEnum frequency)The frequency with which a shopper should be charged.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.StringgetCount()The number of transactions that can be performed within the given frequency.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)The message shown by UPI to the shopper on the approval screen.voidsetAmount(String amount)The billing amount (in minor units) of the recurring transactions.voidsetAmountRule(Mandate.AmountRuleEnum amountRule)The limitation rule of the billing amount.voidsetBillingAttemptsRule(Mandate.BillingAttemptsRuleEnum billingAttemptsRule)The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date.voidsetBillingDay(String billingDay)The number of the day, on which the recurring debit can happen.voidsetCount(String count)The number of transactions that can be performed within the given frequency.voidsetEndsAt(String endsAt)End date of the billing plan, in YYYY-MM-DD format.voidsetFrequency(Mandate.FrequencyEnum frequency)The frequency with which a shopper should be charged.voidsetRemarks(String remarks)The message shown by UPI to the shopper on the approval screen.voidsetStartsAt(String startsAt)Start date of the billing plan, in YYYY-MM-DD format.MandatestartsAt(String startsAt)Start date of the billing plan, in YYYY-MM-DD format.StringtoJson()Convert an instance of Mandate to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_AMOUNT
public static final String JSON_PROPERTY_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_AMOUNT_RULE
public static final String JSON_PROPERTY_AMOUNT_RULE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_BILLING_ATTEMPTS_RULE
public static final String JSON_PROPERTY_BILLING_ATTEMPTS_RULE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_BILLING_DAY
public static final String JSON_PROPERTY_BILLING_DAY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_COUNT
public static final String JSON_PROPERTY_COUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ENDS_AT
public static final String JSON_PROPERTY_ENDS_AT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_FREQUENCY
public static final String JSON_PROPERTY_FREQUENCY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REMARKS
public static final String JSON_PROPERTY_REMARKS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STARTS_AT
public static final String JSON_PROPERTY_STARTS_AT
- See Also:
- Constant Field Values
-
-
Method Detail
-
amount
public Mandate amount(String amount)
The billing amount (in minor units) of the recurring transactions.- Parameters:
amount-- Returns:
- the current
Mandateinstance, allowing for method chaining
-
getAmount
public String getAmount()
The billing amount (in minor units) of the recurring transactions.- Returns:
- amount
-
setAmount
public void setAmount(String amount)
The billing amount (in minor units) of the recurring transactions.- Parameters:
amount-
-
amountRule
public Mandate amountRule(Mandate.AmountRuleEnum amountRule)
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`.- Parameters:
amountRule-- Returns:
- the current
Mandateinstance, allowing for method chaining
-
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)
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`.- Parameters:
amountRule-
-
billingAttemptsRule
public Mandate billingAttemptsRule(Mandate.BillingAttemptsRuleEnum billingAttemptsRule)
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.- Parameters:
billingAttemptsRule-- Returns:
- the current
Mandateinstance, allowing for method chaining
-
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)
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.- Parameters:
billingAttemptsRule-
-
billingDay
public Mandate billingDay(String billingDay)
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`.- Parameters:
billingDay-- Returns:
- the current
Mandateinstance, allowing for method chaining
-
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)
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`.- Parameters:
billingDay-
-
count
public Mandate count(String count)
The number of transactions that can be performed within the given frequency.- Parameters:
count-- Returns:
- the current
Mandateinstance, allowing for method chaining
-
getCount
public String getCount()
The number of transactions that can be performed within the given frequency.- Returns:
- count
-
setCount
public void setCount(String count)
The number of transactions that can be performed within the given frequency.- Parameters:
count-
-
endsAt
public Mandate endsAt(String endsAt)
End date of the billing plan, in YYYY-MM-DD format.- Parameters:
endsAt-- Returns:
- the current
Mandateinstance, allowing for method chaining
-
getEndsAt
public String getEndsAt()
End date of the billing plan, in YYYY-MM-DD format.- Returns:
- endsAt
-
setEndsAt
public void setEndsAt(String endsAt)
End date of the billing plan, in YYYY-MM-DD format.- Parameters:
endsAt-
-
frequency
public Mandate frequency(Mandate.FrequencyEnum frequency)
The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**.- Parameters:
frequency-- Returns:
- the current
Mandateinstance, allowing for method chaining
-
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)
The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**.- Parameters:
frequency-
-
remarks
public Mandate remarks(String remarks)
The message shown by UPI to the shopper on the approval screen.- Parameters:
remarks-- Returns:
- the current
Mandateinstance, allowing for method chaining
-
getRemarks
public String getRemarks()
The message shown by UPI to the shopper on the approval screen.- Returns:
- remarks
-
setRemarks
public void setRemarks(String remarks)
The message shown by UPI to the shopper on the approval screen.- Parameters:
remarks-
-
startsAt
public Mandate startsAt(String startsAt)
Start date of the billing plan, in YYYY-MM-DD format. By default, the transaction date.- Parameters:
startsAt-- Returns:
- the current
Mandateinstance, allowing for method chaining
-
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)
Start date of the billing plan, in YYYY-MM-DD format. By default, the transaction date.- Parameters:
startsAt-
-
equals
public boolean equals(Object o)
Return true if this Mandate object is equal to o.
-
fromJson
public static Mandate fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Mandate given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Mandate
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Mandate
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Mandate to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-