Class Mandate


  • public class Mandate
    extends Object
    Mandate
    • Constructor Detail

      • Mandate

        public Mandate()
    • Method Detail

      • amount

        public Mandate amount​(String amount)
        The billing amount (in minor units) of the recurring transactions.
        Parameters:
        amount -
        Returns:
        the current Mandate instance, 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 Mandate instance, 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 Mandate instance, 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 Mandate instance, 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 Mandate instance, 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 Mandate instance, 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 Mandate instance, 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 Mandate instance, 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 Mandate instance, 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.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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