public interface CardsApi
| 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.
|
ListCardsResponse listCards(String cursor, String customerId, Boolean includeDisabled, String referenceId, String sortOrder) throws ApiException, IOException
cursor - 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.CompletableFuture<ListCardsResponse> listCardsAsync(String cursor, String customerId, Boolean includeDisabled, String referenceId, String sortOrder)
cursor - 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.CreateCardResponse createCard(CreateCardRequest body) throws ApiException, IOException
body - 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.CompletableFuture<CreateCardResponse> createCardAsync(CreateCardRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.RetrieveCardResponse retrieveCard(String cardId) throws ApiException, IOException
cardId - 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.CompletableFuture<RetrieveCardResponse> retrieveCardAsync(String cardId)
cardId - Required parameter: Unique ID for the desired Card.DisableCardResponse disableCard(String cardId) throws ApiException, IOException
cardId - 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.CompletableFuture<DisableCardResponse> disableCardAsync(String cardId)
cardId - Required parameter: Unique ID for the desired Card.Copyright © 2022. All rights reserved.