public final class DefaultLocationsApi extends BaseApi implements LocationsApi
BaseApi.RequestExecutor, BaseApi.RequestSupplier, BaseApi.ResponseHandler<T>authManagers, config, httpCallback, internalUserAgent| Constructor and Description |
|---|
DefaultLocationsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers)
Initializes the controller.
|
DefaultLocationsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers,
HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
|
| Modifier and Type | Method and Description |
|---|---|
CreateLocationResponse |
createLocation(CreateLocationRequest body)
Creates a [location](https://developer.squareup.com/docs/locations-api).
|
CompletableFuture<CreateLocationResponse> |
createLocationAsync(CreateLocationRequest body)
Creates a [location](https://developer.squareup.com/docs/locations-api).
|
ListLocationsResponse |
listLocations()
Provides details about all of the seller's
[locations](https://developer.squareup.com/docs/locations-api), including those with an
inactive status.
|
CompletableFuture<ListLocationsResponse> |
listLocationsAsync()
Provides details about all of the seller's
[locations](https://developer.squareup.com/docs/locations-api), including those with an
inactive status.
|
RetrieveLocationResponse |
retrieveLocation(String locationId)
Retrieves details of a single location.
|
CompletableFuture<RetrieveLocationResponse> |
retrieveLocationAsync(String locationId)
Retrieves details of a single location.
|
UpdateLocationResponse |
updateLocation(String locationId,
UpdateLocationRequest body)
Updates a [location](https://developer.squareup.com/docs/locations-api).
|
CompletableFuture<UpdateLocationResponse> |
updateLocationAsync(String locationId,
UpdateLocationRequest body)
Updates a [location](https://developer.squareup.com/docs/locations-api).
|
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponsepublic DefaultLocationsApi(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 DefaultLocationsApi(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 ListLocationsResponse listLocations() throws ApiException, IOException
listLocations in interface LocationsApiApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ListLocationsResponse> listLocationsAsync()
listLocationsAsync in interface LocationsApipublic CreateLocationResponse createLocation(CreateLocationRequest body) throws ApiException, IOException
createLocation in interface LocationsApibody - 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<CreateLocationResponse> createLocationAsync(CreateLocationRequest body)
createLocationAsync in interface LocationsApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public RetrieveLocationResponse retrieveLocation(String locationId) throws ApiException, IOException
retrieveLocation in interface LocationsApilocationId - Required parameter: The ID of the location to retrieve. Specify the
string "main" to return the main location.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RetrieveLocationResponse> retrieveLocationAsync(String locationId)
retrieveLocationAsync in interface LocationsApilocationId - Required parameter: The ID of the location to retrieve. Specify the
string "main" to return the main location.public UpdateLocationResponse updateLocation(String locationId, UpdateLocationRequest body) throws ApiException, IOException
updateLocation in interface LocationsApilocationId - Required parameter: The ID of the location 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<UpdateLocationResponse> updateLocationAsync(String locationId, UpdateLocationRequest body)
updateLocationAsync in interface LocationsApilocationId - Required parameter: The ID of the location 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.