public interface CustomersApi
Customers can have multiple cards associated with them, and one will be considered the customer’s primary card. The card object in returned customer information represents this primary card. It contains a member called primary, which says whether the card is a customer’s primary card; its value will always be true.
| Modifier and Type | Method and Description |
|---|---|
CustomerResponse |
create(Customer customer)
Creates a new customer and returns its details.
|
CardResponse |
createCard(java.lang.String customerToken,
Card card)
Creates an additional card for the specified customer and returns its details.
|
DeletionResult |
delete(java.lang.String customerToken)
Deletes a customer and all of its cards.
|
DeletionResult |
deleteCard(java.lang.String customerToken,
java.lang.String cardToken)
Deletes a customer’s non-primary card.
|
CustomerResponse |
fetch(java.lang.String customerToken)
Returns the details of a customer.
|
CustomerListResponse |
list(int page)
Returns a paginated list of all customers.
|
CardListResponse |
listCards(java.lang.String customerToken,
int page)
Returns a paginated list of a customer’s cards.
|
ChargeListResponse |
listCharges(java.lang.String customerToken,
int page)
Returns a paginated list of a customer’s charges.
|
CustomerResponse |
update(java.lang.String customerToken,
Customer customer)
Updates the given details of a customer and returns its details.
|
CustomerResponse create(Customer customer) throws java.io.IOException
customer - The new customer specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.CustomerListResponse list(int page) throws java.io.IOException
page - The page number specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.CustomerResponse fetch(java.lang.String customerToken) throws java.io.IOException
customerToken - The customer token specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.CustomerResponse update(java.lang.String customerToken, Customer customer) throws java.io.IOException
In addition, you can update the customer’s email address.
customerToken - The customer token specified.customer - The new customer specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.DeletionResult delete(java.lang.String customerToken) throws java.io.IOException
customerToken - The customer token specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.ChargeListResponse listCharges(java.lang.String customerToken, int page) throws java.io.IOException
customerToken - The customer token specified.page - The page number specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.CardListResponse listCards(java.lang.String customerToken, int page) throws java.io.IOException
customerToken - The customer token specified.page - The page number specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.CardResponse createCard(java.lang.String customerToken, Card card) throws java.io.IOException
customerToken - The customer token specified.card - The card specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.DeletionResult deleteCard(java.lang.String customerToken, java.lang.String cardToken) throws java.io.IOException
customerToken - The customer token specified.cardToken - The card token specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.