public final class DefaultGiftCardActivitiesApi extends BaseApi implements GiftCardActivitiesApi
BaseApi.RequestExecutor, BaseApi.RequestSupplier, BaseApi.ResponseHandler<T>authManagers, config, httpCallback, internalUserAgent| Constructor and Description |
|---|
DefaultGiftCardActivitiesApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers)
Initializes the controller.
|
DefaultGiftCardActivitiesApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers,
HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
|
| Modifier and Type | Method and Description |
|---|---|
CreateGiftCardActivityResponse |
createGiftCardActivity(CreateGiftCardActivityRequest body)
Creates a gift card activity to manage the balance or state of a [gift card]($m/GiftCard).
|
CompletableFuture<CreateGiftCardActivityResponse> |
createGiftCardActivityAsync(CreateGiftCardActivityRequest body)
Creates a gift card activity to manage the balance or state of a [gift card]($m/GiftCard).
|
ListGiftCardActivitiesResponse |
listGiftCardActivities(String giftCardId,
String type,
String locationId,
String beginTime,
String endTime,
Integer limit,
String cursor,
String sortOrder)
Lists gift card activities.
|
CompletableFuture<ListGiftCardActivitiesResponse> |
listGiftCardActivitiesAsync(String giftCardId,
String type,
String locationId,
String beginTime,
String endTime,
Integer limit,
String cursor,
String sortOrder)
Lists gift card activities.
|
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponsepublic DefaultGiftCardActivitiesApi(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 DefaultGiftCardActivitiesApi(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 ListGiftCardActivitiesResponse listGiftCardActivities(String giftCardId, String type, String locationId, String beginTime, String endTime, Integer limit, String cursor, String sortOrder) throws ApiException, IOException
listGiftCardActivities in interface GiftCardActivitiesApigiftCardId - Optional parameter: If a gift card ID is provided, the endpoint returns
activities related to the specified gift card. Otherwise, the endpoint returns all
gift card activities for the seller.type - Optional parameter: If a [type]($m/GiftCardActivityType) is provided, the
endpoint returns gift card activities of the specified type. Otherwise, the endpoint
returns all types of gift card activities.locationId - Optional parameter: If a location ID is provided, the endpoint returns
gift card activities for the specified location. Otherwise, the endpoint returns gift
card activities for all locations.beginTime - Optional parameter: The timestamp for the beginning of the reporting
period, in RFC 3339 format. This start time is inclusive. The default value is the
current time minus one year.endTime - Optional parameter: The timestamp for the end of the reporting period, in
RFC 3339 format. This end time is inclusive. The default value is the current time.limit - Optional parameter: If a limit is provided, the endpoint returns the specified
number of results (or fewer) per page. The maximum value is 100. The default value is
50. For more information, see
[Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).cursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this cursor to retrieve the next set of results for the original
query. If a cursor is not provided, the endpoint returns the first page of the
results. For more information, see
[Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).sortOrder - Optional parameter: The order in which the endpoint returns the
activities, based on `created_at`. - `ASC` - Oldest to newest. - `DESC` - Newest to
oldest (default).ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ListGiftCardActivitiesResponse> listGiftCardActivitiesAsync(String giftCardId, String type, String locationId, String beginTime, String endTime, Integer limit, String cursor, String sortOrder)
listGiftCardActivitiesAsync in interface GiftCardActivitiesApigiftCardId - Optional parameter: If a gift card ID is provided, the endpoint returns
activities related to the specified gift card. Otherwise, the endpoint returns all
gift card activities for the seller.type - Optional parameter: If a [type]($m/GiftCardActivityType) is provided, the
endpoint returns gift card activities of the specified type. Otherwise, the endpoint
returns all types of gift card activities.locationId - Optional parameter: If a location ID is provided, the endpoint returns
gift card activities for the specified location. Otherwise, the endpoint returns gift
card activities for all locations.beginTime - Optional parameter: The timestamp for the beginning of the reporting
period, in RFC 3339 format. This start time is inclusive. The default value is the
current time minus one year.endTime - Optional parameter: The timestamp for the end of the reporting period, in
RFC 3339 format. This end time is inclusive. The default value is the current time.limit - Optional parameter: If a limit is provided, the endpoint returns the specified
number of results (or fewer) per page. The maximum value is 100. The default value is
50. For more information, see
[Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).cursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this cursor to retrieve the next set of results for the original
query. If a cursor is not provided, the endpoint returns the first page of the
results. For more information, see
[Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).sortOrder - Optional parameter: The order in which the endpoint returns the
activities, based on `created_at`. - `ASC` - Oldest to newest. - `DESC` - Newest to
oldest (default).public CreateGiftCardActivityResponse createGiftCardActivity(CreateGiftCardActivityRequest body) throws ApiException, IOException
createGiftCardActivity in interface GiftCardActivitiesApibody - 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<CreateGiftCardActivityResponse> createGiftCardActivityAsync(CreateGiftCardActivityRequest body)
createGiftCardActivityAsync in interface GiftCardActivitiesApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.Copyright © 2022. All rights reserved.