BaseApi.RequestExecutor, BaseApi.RequestSupplier, BaseApi.ResponseHandler<T>authManagers, config, httpCallback, internalUserAgent| Constructor and Description |
|---|
DefaultCardsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers)
Initializes the controller.
|
DefaultCardsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers,
HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
|
| Modifier and Type | Method and Description |
|---|---|
CreateCardResponse |
createCard(CreateCardRequest body)
Adds a card on file to an existing merchant.
|
CompletableFuture<CreateCardResponse> |
createCardAsync(CreateCardRequest body)
Adds a card on file to an existing merchant.
|
DisableCardResponse |
disableCard(String cardId)
Disables the card, preventing any further updates or charges.
|
CompletableFuture<DisableCardResponse> |
disableCardAsync(String cardId)
Disables the card, preventing any further updates or charges.
|
ListCardsResponse |
listCards(String cursor,
String customerId,
Boolean includeDisabled,
String referenceId,
String sortOrder)
Retrieves a list of cards owned by the account making the request.
|
CompletableFuture<ListCardsResponse> |
listCardsAsync(String cursor,
String customerId,
Boolean includeDisabled,
String referenceId,
String sortOrder)
Retrieves a list of cards owned by the account making the request.
|
RetrieveCardResponse |
retrieveCard(String cardId)
Retrieves details for a specific Card.
|
CompletableFuture<RetrieveCardResponse> |
retrieveCardAsync(String cardId)
Retrieves details for a specific Card.
|
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponsepublic DefaultCardsApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.public DefaultCardsApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers, HttpCallback httpCallback)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.httpCallback - Callback to be called before and after the HTTP call.public ListCardsResponse listCards(String cursor, String customerId, Boolean includeDisabled, String referenceId, String sortOrder) throws ApiException, IOException
listCards in interface CardsApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this to retrieve the next set of results for your original query.
See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for
more information.customerId - Optional parameter: Limit results to cards associated with the customer
supplied. By default, all cards owned by the merchant are returned.includeDisabled - Optional parameter: Includes disabled cards. By default, all enabled
cards owned by the merchant are returned.referenceId - Optional parameter: Limit results to cards associated with the
reference_id supplied.sortOrder - Optional parameter: Sorts the returned list by when the card was created
with the specified order. This field defaults to ASC.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ListCardsResponse> listCardsAsync(String cursor, String customerId, Boolean includeDisabled, String referenceId, String sortOrder)
listCardsAsync in interface CardsApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this to retrieve the next set of results for your original query.
See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for
more information.customerId - Optional parameter: Limit results to cards associated with the customer
supplied. By default, all cards owned by the merchant are returned.includeDisabled - Optional parameter: Includes disabled cards. By default, all enabled
cards owned by the merchant are returned.referenceId - Optional parameter: Limit results to cards associated with the
reference_id supplied.sortOrder - Optional parameter: Sorts the returned list by when the card was created
with the specified order. This field defaults to ASC.public CreateCardResponse createCard(CreateCardRequest body) throws ApiException, IOException
createCard in interface CardsApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<CreateCardResponse> createCardAsync(CreateCardRequest body)
createCardAsync in interface CardsApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public RetrieveCardResponse retrieveCard(String cardId) throws ApiException, IOException
retrieveCard in interface CardsApicardId - Required parameter: Unique ID for the desired Card.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RetrieveCardResponse> retrieveCardAsync(String cardId)
retrieveCardAsync in interface CardsApicardId - Required parameter: Unique ID for the desired Card.public DisableCardResponse disableCard(String cardId) throws ApiException, IOException
disableCard in interface CardsApicardId - Required parameter: Unique ID for the desired Card.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<DisableCardResponse> disableCardAsync(String cardId)
disableCardAsync in interface CardsApicardId - Required parameter: Unique ID for the desired Card.Copyright © 2022. All rights reserved.