Class 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 Invoice create​(java.lang.String externalId, java.lang.Number amount, java.lang.String payerEmail, java.lang.String description)
      Create invoice with given parameters
      static Invoice create​(java.util.Map<java.lang.String,​java.lang.Object> params)
      Create invoice with all parameters as HashMap
      static Invoice create​(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 HashMap
      static Invoice expire​(java.lang.String id)
      Expire an already created invoice
      static Invoice expire​(java.util.Map<java.lang.String,​java.lang.String> headers, java.lang.String id)
      Expire an already created invoice
      static Invoice[] getAll​(java.util.Map<java.lang.String,​java.lang.Object> params)
      Get all invoices by given parameters
      static 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 parameters
      static Invoice getById​(java.lang.String id)
      Get invoice detail by ID
      static Invoice getById​(java.util.Map<java.lang.String,​java.lang.String> headers, java.lang.String id)
      Get invoice detail by ID
      • Methods inherited from class java.lang.Object

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

      • Invoice

        public Invoice()
    • 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