Package com.xendit.model
Class Customer
- java.lang.Object
-
- com.xendit.model.Customer
-
public class Customer extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Customer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CustomercreateCustomer(java.lang.String referenceId, java.lang.String mobileNumber, java.lang.String email, java.lang.String givenNames, java.lang.String middleName, java.lang.String surname, java.lang.String description, java.lang.String phoneNumber, java.lang.String nationality, CustomerAddress[] addresses, java.lang.String dateOfBirth, java.util.Map<java.lang.String,java.lang.Object> metadata)Create Customerstatic CustomercreateCustomer(java.util.Map<java.lang.String,java.lang.Object> params)Create customer with all parameter as HashMapstatic CustomercreateCustomer(java.util.Map<java.lang.String,java.lang.String> headers, java.util.Map<java.lang.String,java.lang.Object> params)Create customer with headers and all parameter as HashMapstatic Customer[]getCustomerByReferenceId(java.lang.String referenceId)Get customer by reference id
-
-
-
Method Detail
-
createCustomer
public static Customer createCustomer(java.lang.String referenceId, java.lang.String mobileNumber, java.lang.String email, java.lang.String givenNames, java.lang.String middleName, java.lang.String surname, java.lang.String description, java.lang.String phoneNumber, java.lang.String nationality, CustomerAddress[] addresses, java.lang.String dateOfBirth, java.util.Map<java.lang.String,java.lang.Object> metadata) throws XenditException
Create Customer- Parameters:
referenceId- Merchant-provided identifier for the customer.mobileNumber- Mobile number of the customer in E.164 international standard.email- Email address of the customer.givenNames- Primary of first name/s of the customer.middleName- Middle name of the customer.surname- Surname of the customer.description- Merchant-provided description for the customer object.phoneNumber- Alternate or landline phone number in E.164 international standard.nationality- 2-letter ISO 3166-2 country code for the customer's nationality.addresses- Array of objects containing the specific customer's address infromation.dateOfBirth- Date of birth of the customer in YYYY-MM-DD format.metadata- Object of additional information the user may use.- Returns:
- Customer model.
- Throws:
XenditException- XenditException
-
createCustomer
public static Customer createCustomer(java.util.Map<java.lang.String,java.lang.Object> params) throws XenditException
Create customer with all parameter as HashMap- Parameters:
params- listed here https://developers.xendit.co/api-reference/#create-customer.- Returns:
- Customer
- Throws:
XenditException
-
createCustomer
public static Customer createCustomer(java.util.Map<java.lang.String,java.lang.String> headers, java.util.Map<java.lang.String,java.lang.Object> params) throws XenditException
Create customer with headers and all parameter as HashMap- Parameters:
headers-params- listed here https://developers.xendit.co/api-reference/#create-customer.- Returns:
- Customer
- Throws:
XenditException
-
getCustomerByReferenceId
public static Customer[] getCustomerByReferenceId(java.lang.String referenceId) throws XenditException
Get customer by reference id- Parameters:
referenceId- Customer reference ID- Returns:
- Customer
- Throws:
XenditException- XenditException
-
-