public final class DefaultDevicesApi extends BaseApi implements DevicesApi
AUTHENTICATION_KEY, GLOBAL_ERROR_CASES| Constructor and Description |
|---|
DefaultDevicesApi(io.apimatic.core.GlobalConfiguration globalConfig)
Initializes the controller.
|
| Modifier and Type | Method and Description |
|---|---|
CreateDeviceCodeResponse |
createDeviceCode(CreateDeviceCodeRequest body)
Creates a DeviceCode that can be used to login to a Square Terminal device to enter the
connected terminal mode.
|
CompletableFuture<CreateDeviceCodeResponse> |
createDeviceCodeAsync(CreateDeviceCodeRequest body)
Creates a DeviceCode that can be used to login to a Square Terminal device to enter the
connected terminal mode.
|
GetDeviceResponse |
getDevice(String deviceId)
Retrieves Device with the associated `device_id`.
|
CompletableFuture<GetDeviceResponse> |
getDeviceAsync(String deviceId)
Retrieves Device with the associated `device_id`.
|
GetDeviceCodeResponse |
getDeviceCode(String id)
Retrieves DeviceCode with the associated ID.
|
CompletableFuture<GetDeviceCodeResponse> |
getDeviceCodeAsync(String id)
Retrieves DeviceCode with the associated ID.
|
ListDeviceCodesResponse |
listDeviceCodes(String cursor,
String locationId,
String productType,
String status)
Lists all DeviceCodes associated with the merchant.
|
CompletableFuture<ListDeviceCodesResponse> |
listDeviceCodesAsync(String cursor,
String locationId,
String productType,
String status)
Lists all DeviceCodes associated with the merchant.
|
ListDevicesResponse |
listDevices(String cursor,
String sortOrder,
Integer limit,
String locationId)
List devices associated with the merchant.
|
CompletableFuture<ListDevicesResponse> |
listDevicesAsync(String cursor,
String sortOrder,
Integer limit,
String locationId)
List devices associated with the merchant.
|
getClientInstance, getGlobalConfiguration, getHttpCallbackpublic DefaultDevicesApi(io.apimatic.core.GlobalConfiguration globalConfig)
globalConfig - Configurations added in client.public ListDevicesResponse listDevices(String cursor, String sortOrder, Integer limit, String locationId) throws ApiException, IOException
listDevices in interface DevicesApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this cursor to retrieve the next set of results for the original
query. See
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)
for more information.sortOrder - Optional parameter: The order in which results are listed. - `ASC` -
Oldest to newest. - `DESC` - Newest to oldest (default).limit - Optional parameter: The number of results to return in a single page.locationId - Optional parameter: If present, only returns devices at the target
location.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ListDevicesResponse> listDevicesAsync(String cursor, String sortOrder, Integer limit, String locationId)
listDevicesAsync in interface DevicesApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this cursor to retrieve the next set of results for the original
query. See
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)
for more information.sortOrder - Optional parameter: The order in which results are listed. - `ASC` -
Oldest to newest. - `DESC` - Newest to oldest (default).limit - Optional parameter: The number of results to return in a single page.locationId - Optional parameter: If present, only returns devices at the target
location.public ListDeviceCodesResponse listDeviceCodes(String cursor, String locationId, String productType, String status) throws ApiException, IOException
listDeviceCodes in interface DevicesApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this to retrieve the next set of results for your original query.
See [Paginating
results](https://developer.squareup.com/docs/working-with-apis/pagination) for more
information.locationId - Optional parameter: If specified, only returns DeviceCodes of the
specified location. Returns DeviceCodes of all locations if empty.productType - Optional parameter: If specified, only returns DeviceCodes targeting the
specified product type. Returns DeviceCodes of all product types if empty.status - Optional parameter: If specified, returns DeviceCodes with the specified
statuses. Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ListDeviceCodesResponse> listDeviceCodesAsync(String cursor, String locationId, String productType, String status)
listDeviceCodesAsync in interface DevicesApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this to retrieve the next set of results for your original query.
See [Paginating
results](https://developer.squareup.com/docs/working-with-apis/pagination) for more
information.locationId - Optional parameter: If specified, only returns DeviceCodes of the
specified location. Returns DeviceCodes of all locations if empty.productType - Optional parameter: If specified, only returns DeviceCodes targeting the
specified product type. Returns DeviceCodes of all product types if empty.status - Optional parameter: If specified, returns DeviceCodes with the specified
statuses. Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty.public CreateDeviceCodeResponse createDeviceCode(CreateDeviceCodeRequest body) throws ApiException, IOException
createDeviceCode in interface DevicesApibody - 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<CreateDeviceCodeResponse> createDeviceCodeAsync(CreateDeviceCodeRequest body)
createDeviceCodeAsync in interface DevicesApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public GetDeviceCodeResponse getDeviceCode(String id) throws ApiException, IOException
getDeviceCode in interface DevicesApiid - Required parameter: The unique identifier for the device code.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<GetDeviceCodeResponse> getDeviceCodeAsync(String id)
getDeviceCodeAsync in interface DevicesApiid - Required parameter: The unique identifier for the device code.public GetDeviceResponse getDevice(String deviceId) throws ApiException, IOException
getDevice in interface DevicesApideviceId - Required parameter: The unique ID for the desired `Device`.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<GetDeviceResponse> getDeviceAsync(String deviceId)
getDeviceAsync in interface DevicesApideviceId - Required parameter: The unique ID for the desired `Device`.Copyright © 2024. All rights reserved.