public interface DevicesApi
| 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.
|
ListDevicesResponse listDevices(String cursor, String sortOrder, Integer limit, String locationId) 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 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.CompletableFuture<ListDevicesResponse> listDevicesAsync(String cursor, String sortOrder, Integer limit, String locationId)
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 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.ListDeviceCodesResponse listDeviceCodes(String cursor, String locationId, String productType, String status) throws ApiException, IOException
cursor - 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.CompletableFuture<ListDeviceCodesResponse> listDeviceCodesAsync(String cursor, String locationId, String productType, String status)
cursor - 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.CreateDeviceCodeResponse createDeviceCode(CreateDeviceCodeRequest 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<CreateDeviceCodeResponse> createDeviceCodeAsync(CreateDeviceCodeRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.GetDeviceCodeResponse getDeviceCode(String id) throws ApiException, IOException
id - 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.CompletableFuture<GetDeviceCodeResponse> getDeviceCodeAsync(String id)
id - Required parameter: The unique identifier for the device code.GetDeviceResponse getDevice(String deviceId) throws ApiException, IOException
deviceId - 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.CompletableFuture<GetDeviceResponse> getDeviceAsync(String deviceId)
deviceId - Required parameter: The unique ID for the desired `Device`.Copyright © 2024. All rights reserved.