Package com.xendit.model
Class Invoice
- java.lang.Object
-
- com.xendit.model.Invoice
-
public class Invoice extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Invoice()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Invoicecreate(java.lang.String externalId, java.lang.Number amount, java.lang.String payerEmail, java.lang.String description)Create invoice with given parametersstatic Invoicecreate(java.util.Map<java.lang.String,java.lang.Object> params)Create invoice with all parameters as HashMapstatic Invoicecreate(java.util.Map<java.lang.String,java.lang.String> headers, java.util.Map<java.lang.String,java.lang.Object> params)Create invoice with all parameters as HashMapstatic Invoiceexpire(java.lang.String id)Expire an already created invoicestatic Invoiceexpire(java.util.Map<java.lang.String,java.lang.String> headers, java.lang.String id)Expire an already created invoicestatic Invoice[]getAll(java.util.Map<java.lang.String,java.lang.Object> params)Get all invoices by given parametersstatic Invoice[]getAll(java.util.Map<java.lang.String,java.lang.String> headers, java.util.Map<java.lang.String,java.lang.Object> params)Get all invoices by given parametersstatic InvoicegetById(java.lang.String id)Get invoice detail by IDstatic InvoicegetById(java.util.Map<java.lang.String,java.lang.String> headers, java.lang.String id)Get invoice detail by ID
-
-
-
Method Detail
-
create
public static Invoice create(java.lang.String externalId, java.lang.Number amount, java.lang.String payerEmail, java.lang.String description) throws XenditException
Create invoice with given parameters- Parameters:
externalId- ID of your choice (typically the unique identifier of an invoice in your system)amount- Amount on the invoice. The minimum amount to create an invoice is 10000.payerEmail- Email of the end user you're charging.description- Description of the invoice.- Returns:
- Invoice
- Throws:
XenditException- XenditException
-
create
public static Invoice create(java.util.Map<java.lang.String,java.lang.Object> params) throws XenditException
Create invoice with all parameters as HashMap- Parameters:
params- listed here https://xendit.github.io/apireference/#create-invoice.- Returns:
- Invoice
- Throws:
XenditException- XenditException
-
create
public static Invoice create(java.util.Map<java.lang.String,java.lang.String> headers, java.util.Map<java.lang.String,java.lang.Object> params) throws XenditException
Create invoice with all parameters as HashMap- Parameters:
headers-params- listed here https://xendit.github.io/apireference/#create-invoice.- Returns:
- Invoice
- Throws:
XenditException- XenditException
-
getById
public static Invoice getById(java.util.Map<java.lang.String,java.lang.String> headers, java.lang.String id) throws XenditException
Get invoice detail by ID- Parameters:
headers-id- ID of the invoice to retrieve- Returns:
- Invoice
- Throws:
XenditException- XenditException
-
getById
public static Invoice getById(java.lang.String id) throws XenditException
Get invoice detail by ID- Parameters:
id- ID of the invoice to retrieve- Returns:
- Invoice
- Throws:
XenditException- XenditException
-
getAll
public static Invoice[] getAll(java.util.Map<java.lang.String,java.lang.String> headers, java.util.Map<java.lang.String,java.lang.Object> params) throws XenditException
Get all invoices by given parameters- Parameters:
headers-params- listed here https://xendit.github.io/apireference/#list-all-invoices- Returns:
- Array of invoices
- Throws:
XenditException- XenditException
-
getAll
public static Invoice[] getAll(java.util.Map<java.lang.String,java.lang.Object> params) throws XenditException
Get all invoices by given parameters- Parameters:
params- listed here https://xendit.github.io/apireference/#list-all-invoices- Returns:
- Array of invoices
- Throws:
XenditException- XenditException
-
expire
public static Invoice expire(java.util.Map<java.lang.String,java.lang.String> headers, java.lang.String id) throws XenditException
Expire an already created invoice- Parameters:
headers-id- ID of the invoice to be expired / canceled- Returns:
- Invoice
- Throws:
XenditException- XenditException
-
expire
public static Invoice expire(java.lang.String id) throws XenditException
Expire an already created invoice- Parameters:
id- ID of the invoice to be expired / canceled- Returns:
- Invoice
- Throws:
XenditException- XenditException
-
-