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.
|
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.
|
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.Copyright © 2022. All rights reserved.