public class CustomersApiImpl extends AbstractBaseApi implements CustomersApi
CustomersApi interface.| Constructor and Description |
|---|
CustomersApiImpl() |
| 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.
|
protected java.lang.String |
getApiName() |
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.
|
executeList, executeSearch, getApiBase, getApiUrl, getDeletionResult, httpTransportForDelete, httpTransportForGet, httpTransportForPost, httpTransportForPutpublic final CustomerResponse create(Customer customer) throws java.io.IOException
CustomersApicreate in interface CustomersApicustomer - The new customer specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.public final CustomerListResponse list(int page) throws java.io.IOException
CustomersApilist in interface CustomersApipage - The page number specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.public final CustomerResponse fetch(java.lang.String customerToken) throws java.io.IOException
CustomersApifetch in interface CustomersApicustomerToken - The customer token specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.public final CustomerResponse update(java.lang.String customerToken, Customer customer) throws java.io.IOException
CustomersApiIn addition, you can update the customer’s email address.
update in interface CustomersApicustomerToken - The customer token specified.customer - The new customer specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.public final DeletionResult delete(java.lang.String customerToken) throws java.io.IOException
CustomersApidelete in interface CustomersApicustomerToken - The customer token specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.public final ChargeListResponse listCharges(java.lang.String customerToken, int page) throws java.io.IOException
CustomersApilistCharges in interface CustomersApicustomerToken - The customer token specified.page - The page number specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.public final CardListResponse listCards(java.lang.String customerToken, int page) throws java.io.IOException
CustomersApilistCards in interface CustomersApicustomerToken - The customer token specified.page - The page number specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.public final CardResponse createCard(java.lang.String customerToken, Card card) throws java.io.IOException
CustomersApicreateCard in interface CustomersApicustomerToken - The customer token specified.card - The card specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.public final DeletionResult deleteCard(java.lang.String customerToken, java.lang.String cardToken) throws java.io.IOException
CustomersApideleteCard in interface CustomersApicustomerToken - The customer token specified.cardToken - The card token specified.java.io.IOException - If IO errors occur while calling PinPayments REST API.protected final java.lang.String getApiName()
getApiName in class AbstractBaseApi