public final class DefaultCustomerGroupsApi extends BaseApi implements CustomerGroupsApi
AUTHENTICATION_KEY, GLOBAL_ERROR_CASES| Constructor and Description |
|---|
DefaultCustomerGroupsApi(io.apimatic.core.GlobalConfiguration globalConfig)
Initializes the controller.
|
| Modifier and Type | Method and Description |
|---|---|
CreateCustomerGroupResponse |
createCustomerGroup(CreateCustomerGroupRequest body)
Creates a new customer group for a business.
|
CompletableFuture<CreateCustomerGroupResponse> |
createCustomerGroupAsync(CreateCustomerGroupRequest body)
Creates a new customer group for a business.
|
DeleteCustomerGroupResponse |
deleteCustomerGroup(String groupId)
Deletes a customer group as identified by the `group_id` value.
|
CompletableFuture<DeleteCustomerGroupResponse> |
deleteCustomerGroupAsync(String groupId)
Deletes a customer group as identified by the `group_id` value.
|
ListCustomerGroupsResponse |
listCustomerGroups(String cursor,
Integer limit)
Retrieves the list of customer groups of a business.
|
CompletableFuture<ListCustomerGroupsResponse> |
listCustomerGroupsAsync(String cursor,
Integer limit)
Retrieves the list of customer groups of a business.
|
RetrieveCustomerGroupResponse |
retrieveCustomerGroup(String groupId)
Retrieves a specific customer group as identified by the `group_id` value.
|
CompletableFuture<RetrieveCustomerGroupResponse> |
retrieveCustomerGroupAsync(String groupId)
Retrieves a specific customer group as identified by the `group_id` value.
|
UpdateCustomerGroupResponse |
updateCustomerGroup(String groupId,
UpdateCustomerGroupRequest body)
Updates a customer group as identified by the `group_id` value.
|
CompletableFuture<UpdateCustomerGroupResponse> |
updateCustomerGroupAsync(String groupId,
UpdateCustomerGroupRequest body)
Updates a customer group as identified by the `group_id` value.
|
getClientInstance, getGlobalConfiguration, getHttpCallbackpublic DefaultCustomerGroupsApi(io.apimatic.core.GlobalConfiguration globalConfig)
globalConfig - Configurations added in client.public ListCustomerGroupsResponse listCustomerGroups(String cursor, Integer limit) throws ApiException, IOException
listCustomerGroups in interface CustomerGroupsApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this cursor to retrieve the next set of results for your original
query. 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
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<ListCustomerGroupsResponse> listCustomerGroupsAsync(String cursor, Integer limit)
listCustomerGroupsAsync in interface CustomerGroupsApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this cursor to retrieve the next set of results for your original
query. 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
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 CreateCustomerGroupResponse createCustomerGroup(CreateCustomerGroupRequest body) throws ApiException, IOException
createCustomerGroup in interface CustomerGroupsApibody - 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<CreateCustomerGroupResponse> createCustomerGroupAsync(CreateCustomerGroupRequest body)
createCustomerGroupAsync in interface CustomerGroupsApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public DeleteCustomerGroupResponse deleteCustomerGroup(String groupId) throws ApiException, IOException
deleteCustomerGroup in interface CustomerGroupsApigroupId - Required parameter: The ID of the customer group to delete.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<DeleteCustomerGroupResponse> deleteCustomerGroupAsync(String groupId)
deleteCustomerGroupAsync in interface CustomerGroupsApigroupId - Required parameter: The ID of the customer group to delete.public RetrieveCustomerGroupResponse retrieveCustomerGroup(String groupId) throws ApiException, IOException
retrieveCustomerGroup in interface CustomerGroupsApigroupId - Required parameter: The ID of the customer group to retrieve.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RetrieveCustomerGroupResponse> retrieveCustomerGroupAsync(String groupId)
retrieveCustomerGroupAsync in interface CustomerGroupsApigroupId - Required parameter: The ID of the customer group to retrieve.public UpdateCustomerGroupResponse updateCustomerGroup(String groupId, UpdateCustomerGroupRequest body) throws ApiException, IOException
updateCustomerGroup in interface CustomerGroupsApigroupId - Required parameter: The ID of the customer group to update.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.public CompletableFuture<UpdateCustomerGroupResponse> updateCustomerGroupAsync(String groupId, UpdateCustomerGroupRequest body)
updateCustomerGroupAsync in interface CustomerGroupsApigroupId - Required parameter: The ID of the customer group to update.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.Copyright © 2024. All rights reserved.