Class PaymentMethod


  • public class PaymentMethod
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      PaymentMethod()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PaymentMethod createPaymentMethod​(java.lang.String customerId, LinkedAccountEnum.AccountType type, java.util.Map<java.lang.String,​java.lang.Object> properties, java.util.Map<java.lang.String,​java.lang.Object> metadata)
      Create payment method
      static PaymentMethod createPaymentMethod​(java.util.Map<java.lang.String,​java.lang.Object> params)
      Create payment method with all parameter as HashMap
      static PaymentMethod createPaymentMethod​(java.util.Map<java.lang.String,​java.lang.String> headers, java.util.Map<java.lang.String,​java.lang.Object> params)
      Create payment method with headers and all parameter as HashMap
      static PaymentMethod[] getPaymentMethodsByCustomerId​(java.lang.String customerId)
      Get payment methods by customer id
      • Methods inherited from class java.lang.Object

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

      • PaymentMethod

        public PaymentMethod()
    • Method Detail

      • createPaymentMethod

        public static PaymentMethod createPaymentMethod​(java.lang.String customerId,
                                                        LinkedAccountEnum.AccountType type,
                                                        java.util.Map<java.lang.String,​java.lang.Object> properties,
                                                        java.util.Map<java.lang.String,​java.lang.Object> metadata)
                                                 throws XenditException
        Create payment method
        Parameters:
        customerId - ID of the customer object to which the account token will be linked to
        type - Type of payment method
        properties - Specific information that identifies the payment method
        metadata - Object of additional information the user may use.
        Returns:
        PaymentMethod model.
        Throws:
        XenditException - XenditException
      • createPaymentMethod

        public static PaymentMethod createPaymentMethod​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                                 throws XenditException
        Create payment method with all parameter as HashMap
        Parameters:
        params - listed here https://developers.xendit.co/api-reference/#create-payment-method.
        Returns:
        PaymentMethod
        Throws:
        XenditException
      • createPaymentMethod

        public static PaymentMethod createPaymentMethod​(java.util.Map<java.lang.String,​java.lang.String> headers,
                                                        java.util.Map<java.lang.String,​java.lang.Object> params)
                                                 throws XenditException
        Create payment method with headers and all parameter as HashMap
        Parameters:
        headers -
        params - listed here https://developers.xendit.co/api-reference/#create-payment-method.
        Returns:
        PaymentMethod
        Throws:
        XenditException
      • getPaymentMethodsByCustomerId

        public static PaymentMethod[] getPaymentMethodsByCustomerId​(java.lang.String customerId)
                                                             throws XenditException
        Get payment methods by customer id
        Parameters:
        customerId - Customer ID
        Returns:
        PaymentMethod
        Throws:
        XenditException - XenditException