public final class DefaultCustomerSegmentsApi extends BaseApi implements CustomerSegmentsApi
BaseApi.RequestExecutor, BaseApi.RequestSupplier, BaseApi.ResponseHandler<T>authManagers, config, httpCallback, internalUserAgent| Constructor and Description |
|---|
DefaultCustomerSegmentsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers)
Initializes the controller.
|
DefaultCustomerSegmentsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers,
HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
|
| Modifier and Type | Method and Description |
|---|---|
ListCustomerSegmentsResponse |
listCustomerSegments(String cursor,
Integer limit)
Retrieves the list of customer segments of a business.
|
CompletableFuture<ListCustomerSegmentsResponse> |
listCustomerSegmentsAsync(String cursor,
Integer limit)
Retrieves the list of customer segments of a business.
|
RetrieveCustomerSegmentResponse |
retrieveCustomerSegment(String segmentId)
Retrieves a specific customer segment as identified by the `segment_id` value.
|
CompletableFuture<RetrieveCustomerSegmentResponse> |
retrieveCustomerSegmentAsync(String segmentId)
Retrieves a specific customer segment as identified by the `segment_id` value.
|
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponsepublic DefaultCustomerSegmentsApi(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 DefaultCustomerSegmentsApi(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 ListCustomerSegmentsResponse listCustomerSegments(String cursor, Integer limit) throws ApiException, IOException
listCustomerSegments in interface CustomerSegmentsApicursor - Optional parameter: A pagination cursor returned by previous calls to
`ListCustomerSegments`. This cursor is used to retrieve the next set of query
results. For more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).limit - Optional parameter: The maximum number of results to return in a single page.
This limit is advisory. The response might contain more or fewer results. If the
specified limit is less than 1 or greater than 50, Square returns a `400
VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 50. For more
information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ListCustomerSegmentsResponse> listCustomerSegmentsAsync(String cursor, Integer limit)
listCustomerSegmentsAsync in interface CustomerSegmentsApicursor - Optional parameter: A pagination cursor returned by previous calls to
`ListCustomerSegments`. This cursor is used to retrieve the next set of query
results. For more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).limit - Optional parameter: The maximum number of results to return in a single page.
This limit is advisory. The response might contain more or fewer results. If the
specified limit is less than 1 or greater than 50, Square returns a `400
VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 50. For more
information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).public RetrieveCustomerSegmentResponse retrieveCustomerSegment(String segmentId) throws ApiException, IOException
retrieveCustomerSegment in interface CustomerSegmentsApisegmentId - Required parameter: The Square-issued ID of the customer segment.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RetrieveCustomerSegmentResponse> retrieveCustomerSegmentAsync(String segmentId)
retrieveCustomerSegmentAsync in interface CustomerSegmentsApisegmentId - Required parameter: The Square-issued ID of the customer segment.Copyright © 2022. All rights reserved.