public final class DefaultCustomerCustomAttributesApi extends BaseApi implements CustomerCustomAttributesApi
BaseApi.RequestExecutor, BaseApi.RequestSupplier, BaseApi.ResponseHandler<T>authManagers, config, httpCallback, internalUserAgent| Constructor and Description |
|---|
DefaultCustomerCustomAttributesApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers)
Initializes the controller.
|
DefaultCustomerCustomAttributesApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers,
HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
|
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponsepublic DefaultCustomerCustomAttributesApi(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 DefaultCustomerCustomAttributesApi(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 ListCustomerCustomAttributeDefinitionsResponse listCustomerCustomAttributeDefinitions(Integer limit, String cursor) throws ApiException, IOException
listCustomerCustomAttributeDefinitions in interface CustomerCustomAttributesApilimit - Optional parameter: The maximum number of results to return in a single paged
response. This limit is advisory. The response might contain more or fewer results.
The minimum value is 1 and the maximum value is 100. The default value is 20. For
more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).cursor - Optional parameter: The cursor returned in the paged response from the
previous call to this endpoint. Provide this cursor to retrieve the next page of
results for your original request. 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<ListCustomerCustomAttributeDefinitionsResponse> listCustomerCustomAttributeDefinitionsAsync(Integer limit, String cursor)
listCustomerCustomAttributeDefinitionsAsync in interface CustomerCustomAttributesApilimit - Optional parameter: The maximum number of results to return in a single paged
response. This limit is advisory. The response might contain more or fewer results.
The minimum value is 1 and the maximum value is 100. The default value is 20. For
more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).cursor - Optional parameter: The cursor returned in the paged response from the
previous call to this endpoint. Provide this cursor to retrieve the next page of
results for your original request. For more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).public CreateCustomerCustomAttributeDefinitionResponse createCustomerCustomAttributeDefinition(CreateCustomerCustomAttributeDefinitionRequest body) throws ApiException, IOException
createCustomerCustomAttributeDefinition in interface CustomerCustomAttributesApibody - 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<CreateCustomerCustomAttributeDefinitionResponse> createCustomerCustomAttributeDefinitionAsync(CreateCustomerCustomAttributeDefinitionRequest body)
createCustomerCustomAttributeDefinitionAsync in interface CustomerCustomAttributesApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public DeleteCustomerCustomAttributeDefinitionResponse deleteCustomerCustomAttributeDefinition(String key) throws ApiException, IOException
deleteCustomerCustomAttributeDefinition in interface CustomerCustomAttributesApikey - Required parameter: The key of the custom attribute definition to delete.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<DeleteCustomerCustomAttributeDefinitionResponse> deleteCustomerCustomAttributeDefinitionAsync(String key)
deleteCustomerCustomAttributeDefinitionAsync in interface CustomerCustomAttributesApikey - Required parameter: The key of the custom attribute definition to delete.public RetrieveCustomerCustomAttributeDefinitionResponse retrieveCustomerCustomAttributeDefinition(String key, Integer version) throws ApiException, IOException
retrieveCustomerCustomAttributeDefinition in interface CustomerCustomAttributesApikey - Required parameter: The key of the custom attribute definition to retrieve. If
the requesting application is not the definition owner, you must use the qualified
key.version - Optional parameter: The current version of the custom attribute definition,
which is used for strongly consistent reads to guarantee that you receive the most
up-to-date data. When included in the request, Square returns the specified version
or a higher version if one exists. If the specified version is higher than the
current version, Square returns a `BAD_REQUEST` error.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RetrieveCustomerCustomAttributeDefinitionResponse> retrieveCustomerCustomAttributeDefinitionAsync(String key, Integer version)
retrieveCustomerCustomAttributeDefinitionAsync in interface CustomerCustomAttributesApikey - Required parameter: The key of the custom attribute definition to retrieve. If
the requesting application is not the definition owner, you must use the qualified
key.version - Optional parameter: The current version of the custom attribute definition,
which is used for strongly consistent reads to guarantee that you receive the most
up-to-date data. When included in the request, Square returns the specified version
or a higher version if one exists. If the specified version is higher than the
current version, Square returns a `BAD_REQUEST` error.public UpdateCustomerCustomAttributeDefinitionResponse updateCustomerCustomAttributeDefinition(String key, UpdateCustomerCustomAttributeDefinitionRequest body) throws ApiException, IOException
updateCustomerCustomAttributeDefinition in interface CustomerCustomAttributesApikey - Required parameter: The key of the custom attribute definition 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<UpdateCustomerCustomAttributeDefinitionResponse> updateCustomerCustomAttributeDefinitionAsync(String key, UpdateCustomerCustomAttributeDefinitionRequest body)
updateCustomerCustomAttributeDefinitionAsync in interface CustomerCustomAttributesApikey - Required parameter: The key of the custom attribute definition to update.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public BulkUpsertCustomerCustomAttributesResponse bulkUpsertCustomerCustomAttributes(BulkUpsertCustomerCustomAttributesRequest body) throws ApiException, IOException
bulkUpsertCustomerCustomAttributes in interface CustomerCustomAttributesApibody - 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<BulkUpsertCustomerCustomAttributesResponse> bulkUpsertCustomerCustomAttributesAsync(BulkUpsertCustomerCustomAttributesRequest body)
bulkUpsertCustomerCustomAttributesAsync in interface CustomerCustomAttributesApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public ListCustomerCustomAttributesResponse listCustomerCustomAttributes(String customerId, Integer limit, String cursor, Boolean withDefinitions) throws ApiException, IOException
listCustomerCustomAttributes in interface CustomerCustomAttributesApicustomerId - Required parameter: The ID of the target [customer profile]($m/Customer).limit - Optional parameter: The maximum number of results to return in a single paged
response. This limit is advisory. The response might contain more or fewer results.
The minimum value is 1 and the maximum value is 100. The default value is 20. For
more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).cursor - Optional parameter: The cursor returned in the paged response from the
previous call to this endpoint. Provide this cursor to retrieve the next page of
results for your original request. For more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).withDefinitions - Optional parameter: Indicates whether to return the [custom
attribute definition]($m/CustomAttributeDefinition) in the `definition` field of each
custom attribute. Set this parameter to `true` to get the name and description of
each custom attribute, information about the data type, or other definition details.
The default value is `false`.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ListCustomerCustomAttributesResponse> listCustomerCustomAttributesAsync(String customerId, Integer limit, String cursor, Boolean withDefinitions)
listCustomerCustomAttributesAsync in interface CustomerCustomAttributesApicustomerId - Required parameter: The ID of the target [customer profile]($m/Customer).limit - Optional parameter: The maximum number of results to return in a single paged
response. This limit is advisory. The response might contain more or fewer results.
The minimum value is 1 and the maximum value is 100. The default value is 20. For
more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).cursor - Optional parameter: The cursor returned in the paged response from the
previous call to this endpoint. Provide this cursor to retrieve the next page of
results for your original request. For more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).withDefinitions - Optional parameter: Indicates whether to return the [custom
attribute definition]($m/CustomAttributeDefinition) in the `definition` field of each
custom attribute. Set this parameter to `true` to get the name and description of
each custom attribute, information about the data type, or other definition details.
The default value is `false`.public DeleteCustomerCustomAttributeResponse deleteCustomerCustomAttribute(String customerId, String key) throws ApiException, IOException
deleteCustomerCustomAttribute in interface CustomerCustomAttributesApicustomerId - Required parameter: The ID of the target [customer profile]($m/Customer).key - Required parameter: The key of the custom attribute to delete. This key must
match the `key` of a custom attribute definition in the Square seller account. If the
requesting application is not the definition owner, you must use the qualified key.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<DeleteCustomerCustomAttributeResponse> deleteCustomerCustomAttributeAsync(String customerId, String key)
deleteCustomerCustomAttributeAsync in interface CustomerCustomAttributesApicustomerId - Required parameter: The ID of the target [customer profile]($m/Customer).key - Required parameter: The key of the custom attribute to delete. This key must
match the `key` of a custom attribute definition in the Square seller account. If the
requesting application is not the definition owner, you must use the qualified key.public RetrieveCustomerCustomAttributeResponse retrieveCustomerCustomAttribute(String customerId, String key, Boolean withDefinition, Integer version) throws ApiException, IOException
retrieveCustomerCustomAttribute in interface CustomerCustomAttributesApicustomerId - Required parameter: The ID of the target [customer profile]($m/Customer).key - Required parameter: The key of the custom attribute to retrieve. This key must
match the `key` of a custom attribute definition in the Square seller account. If the
requesting application is not the definition owner, you must use the qualified key.withDefinition - Optional parameter: Indicates whether to return the [custom attribute
definition]($m/CustomAttributeDefinition) in the `definition` field of the custom
attribute. Set this parameter to `true` to get the name and description of the custom
attribute, information about the data type, or other definition details. The default
value is `false`.version - Optional parameter: The current version of the custom attribute, which is
used for strongly consistent reads to guarantee that you receive the most up-to-date
data. When included in the request, Square returns the specified version or a higher
version if one exists. If the specified version is higher than the current version,
Square returns a `BAD_REQUEST` error.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RetrieveCustomerCustomAttributeResponse> retrieveCustomerCustomAttributeAsync(String customerId, String key, Boolean withDefinition, Integer version)
retrieveCustomerCustomAttributeAsync in interface CustomerCustomAttributesApicustomerId - Required parameter: The ID of the target [customer profile]($m/Customer).key - Required parameter: The key of the custom attribute to retrieve. This key must
match the `key` of a custom attribute definition in the Square seller account. If the
requesting application is not the definition owner, you must use the qualified key.withDefinition - Optional parameter: Indicates whether to return the [custom attribute
definition]($m/CustomAttributeDefinition) in the `definition` field of the custom
attribute. Set this parameter to `true` to get the name and description of the custom
attribute, information about the data type, or other definition details. The default
value is `false`.version - Optional parameter: The current version of the custom attribute, which is
used for strongly consistent reads to guarantee that you receive the most up-to-date
data. When included in the request, Square returns the specified version or a higher
version if one exists. If the specified version is higher than the current version,
Square returns a `BAD_REQUEST` error.public UpsertCustomerCustomAttributeResponse upsertCustomerCustomAttribute(String customerId, String key, UpsertCustomerCustomAttributeRequest body) throws ApiException, IOException
upsertCustomerCustomAttribute in interface CustomerCustomAttributesApicustomerId - Required parameter: The ID of the target [customer profile]($m/Customer).key - Required parameter: The key of the custom attribute to create or update. This
key must match the `key` of a custom attribute definition in the Square seller
account. If the requesting application is not the definition owner, you must use the
qualified key.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<UpsertCustomerCustomAttributeResponse> upsertCustomerCustomAttributeAsync(String customerId, String key, UpsertCustomerCustomAttributeRequest body)
upsertCustomerCustomAttributeAsync in interface CustomerCustomAttributesApicustomerId - Required parameter: The ID of the target [customer profile]($m/Customer).key - Required parameter: The key of the custom attribute to create or update. This
key must match the `key` of a custom attribute definition in the Square seller
account. If the requesting application is not the definition owner, you must use the
qualified key.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.