Package com.xendit.model
Class RecurringPayment
- java.lang.Object
-
- com.xendit.model.RecurringPayment
-
public class RecurringPayment extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description RecurringPayment()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RecurringPaymentcreate(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 parametersstatic RecurringPaymentcreate(java.util.Map<java.lang.String,java.lang.Object> params)Create recurring payment with given parameters as a HashMap objectstatic RecurringPaymentcreate(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 objectstatic RecurringPaymentedit(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params)Edit a recurring payment by ID and given parametersstatic RecurringPaymentget(java.lang.String id)Get a recurring payment by IDstatic Invoice[]getPaymentsById(java.lang.String id)Get list of payments by IDstatic RecurringPaymentpause(java.lang.String id)Pause a recurring payment by IDstatic RecurringPaymentresume(java.lang.String id)Resume a recurring payment by IDstatic RecurringPaymentstop(java.lang.String id)Stop a recurring payment by ID
-
-
-
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 charginginterval- 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 invoicesamount- 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 updateparams- 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
-
-