Package com.xendit.model
Class PaymentMethod
- java.lang.Object
-
- com.xendit.model.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 PaymentMethodcreatePaymentMethod(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 methodstatic PaymentMethodcreatePaymentMethod(java.util.Map<java.lang.String,java.lang.Object> params)Create payment method with all parameter as HashMapstatic PaymentMethodcreatePaymentMethod(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 HashMapstatic PaymentMethod[]getPaymentMethodsByCustomerId(java.lang.String customerId)Get payment methods by customer id
-
-
-
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 totype- Type of payment methodproperties- Specific information that identifies the payment methodmetadata- 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
-
-