Class RecurringPayment


  • public class RecurringPayment
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RecurringPayment create​(java.lang.String externalId, java.lang.String payerEmail, java.lang.String interval, java.lang.Number intervalCount, java.lang.String description, java.lang.Number amount)
      Create recurring payment with given parameters
      static RecurringPayment create​(java.util.Map<java.lang.String,​java.lang.Object> params)
      Create recurring payment with given parameters as a HashMap object
      static RecurringPayment create​(java.util.Map<java.lang.String,​java.lang.String> headers, java.util.Map<java.lang.String,​java.lang.Object> params)
      Create recurring payment with given parameters as a HashMap object
      static RecurringPayment edit​(java.lang.String id, java.util.Map<java.lang.String,​java.lang.Object> params)
      Edit a recurring payment by ID and given parameters
      static RecurringPayment get​(java.lang.String id)
      Get a recurring payment by ID
      static Invoice[] getPaymentsById​(java.lang.String id)
      Get list of payments by ID
      static RecurringPayment pause​(java.lang.String id)
      Pause a recurring payment by ID
      static RecurringPayment resume​(java.lang.String id)
      Resume a recurring payment by ID
      static RecurringPayment stop​(java.lang.String id)
      Stop a recurring payment by ID
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RecurringPayment

        public RecurringPayment()
    • Method Detail

      • create

        public static RecurringPayment create​(java.lang.String externalId,
                                              java.lang.String payerEmail,
                                              java.lang.String interval,
                                              java.lang.Number intervalCount,
                                              java.lang.String description,
                                              java.lang.Number amount)
                                       throws XenditException
        Create recurring payment with given parameters
        Parameters:
        externalId - ID of your choice (typically the unique identifier of a recurring payment in your system)
        payerEmail - Email of the end user you're charging
        interval - One of DAY, WEEK, MONTH. The frequency with which a recurring payment invoice should be billed.
        intervalCount - The number of intervals (specified in the interval property) between recurring. For example, interval=MONTH and interval_count=3 bills every 3 months.
        description - Description for the recurring payment and invoices
        amount - Amount per invoice per interval. The minimum amount to create an invoice is 10.000 IDR. The maximum amount is 1.000.000.000 IDR
        Returns:
        RecurringPayment
        Throws:
        XenditException - XenditException
      • create

        public static RecurringPayment create​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                       throws XenditException
        Create recurring payment with given parameters as a HashMap object
        Parameters:
        params - listed here https://xendit.github.io/apireference/#create-a-recurring-payment
        Returns:
        RecurringPayment
        Throws:
        XenditException - XenditException
      • create

        public static RecurringPayment create​(java.util.Map<java.lang.String,​java.lang.String> headers,
                                              java.util.Map<java.lang.String,​java.lang.Object> params)
                                       throws XenditException
        Create recurring payment with given parameters as a HashMap object
        Parameters:
        headers -
        params - listed here https://xendit.github.io/apireference/#create-a-recurring-payment
        Returns:
        RecurringPayment
        Throws:
        XenditException - XenditException
      • edit

        public static RecurringPayment edit​(java.lang.String id,
                                            java.util.Map<java.lang.String,​java.lang.Object> params)
                                     throws XenditException
        Edit a recurring payment by ID and given parameters
        Parameters:
        id - id of recurring you want to update
        params - listed here https://xendit.github.io/apireference/#edit-recurring-payment
        Returns:
        RecurringPayment
        Throws:
        XenditException - XenditException
      • get

        public static RecurringPayment get​(java.lang.String id)
                                    throws XenditException
        Get a recurring payment by ID
        Parameters:
        id - ID of the recurring payment to retrieve
        Returns:
        RecurringPayment
        Throws:
        XenditException - XenditException
      • stop

        public static RecurringPayment stop​(java.lang.String id)
                                     throws XenditException
        Stop a recurring payment by ID
        Parameters:
        id - ID of the recurring payment to stop
        Returns:
        RecurringPayment
        Throws:
        XenditException - XenditException
      • pause

        public static RecurringPayment pause​(java.lang.String id)
                                      throws XenditException
        Pause a recurring payment by ID
        Parameters:
        id - ID of the recurring payment to pause
        Returns:
        RecurringPayment
        Throws:
        XenditException - XenditException
      • resume

        public static RecurringPayment resume​(java.lang.String id)
                                       throws XenditException
        Resume a recurring payment by ID
        Parameters:
        id - ID of the recurring payment to resume
        Returns:
        RecurringPayment
        Throws:
        XenditException - XenditException
      • getPaymentsById

        public static Invoice[] getPaymentsById​(java.lang.String id)
                                         throws XenditException
        Get list of payments by ID
        Parameters:
        id - ID of the recurring payment to get
        Returns:
        Invoices
        Throws:
        XenditException - XenditException