public interface CustomerGroupsApi
| 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.
|
ListCustomerGroupsResponse listCustomerGroups(String cursor, Integer limit) throws ApiException, IOException
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 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.CompletableFuture<ListCustomerGroupsResponse> listCustomerGroupsAsync(String cursor, Integer limit)
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 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).CreateCustomerGroupResponse createCustomerGroup(CreateCustomerGroupRequest 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<CreateCustomerGroupResponse> createCustomerGroupAsync(CreateCustomerGroupRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.DeleteCustomerGroupResponse deleteCustomerGroup(String groupId) throws ApiException, IOException
groupId - 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.CompletableFuture<DeleteCustomerGroupResponse> deleteCustomerGroupAsync(String groupId)
groupId - Required parameter: The ID of the customer group to delete.RetrieveCustomerGroupResponse retrieveCustomerGroup(String groupId) throws ApiException, IOException
groupId - 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.CompletableFuture<RetrieveCustomerGroupResponse> retrieveCustomerGroupAsync(String groupId)
groupId - Required parameter: The ID of the customer group to retrieve.UpdateCustomerGroupResponse updateCustomerGroup(String groupId, UpdateCustomerGroupRequest body) throws ApiException, IOException
groupId - 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.CompletableFuture<UpdateCustomerGroupResponse> updateCustomerGroupAsync(String groupId, UpdateCustomerGroupRequest body)
groupId - 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 © 2022. All rights reserved.