Package com.adyen.service.clouddevice
Class CloudDeviceApi
- java.lang.Object
-
- com.adyen.Service
-
- com.adyen.service.clouddevice.CloudDeviceApi
-
public class CloudDeviceApi extends Service
Service of the Cloud Device API
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPI_VERSIONprotected StringbaseURL
-
Constructor Summary
Constructors Constructor Description CloudDeviceApi(Client client)CloudDeviceApi constructor inpackage.CloudDeviceApi(Client client, String baseURL)CloudDeviceApi constructor inpackage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloudDeviceApiAsyncResponseasync(String merchantAccount, String deviceId, CloudDeviceApiRequest cloudDeviceApiRequest)Send an asynchronous payment request.ConnectedDevicesResponsegetConnectedDevices(String merchantAccount)Get a list of connected devicesConnectedDevicesResponsegetConnectedDevices(String merchantAccount, String store)Get a list of connected devicesDeviceStatusResponsegetDeviceStatus(String merchantAccount, String deviceId)Get the status of a device.CloudDeviceApiResponsesync(String merchantAccount, String deviceId, CloudDeviceApiRequest cloudDeviceApiRequest)Send a synchronous payment request.-
Methods inherited from class com.adyen.Service
createBaseURL, getClient, isApiKeyRequired, setApiKeyRequired, setClient
-
-
-
-
Field Detail
-
API_VERSION
public static final String API_VERSION
- See Also:
- Constant Field Values
-
baseURL
protected String baseURL
-
-
Constructor Detail
-
CloudDeviceApi
public CloudDeviceApi(Client client)
CloudDeviceApi constructor inpackage.- Parameters:
client-Client(required)
-
-
Method Detail
-
sync
public CloudDeviceApiResponse sync(String merchantAccount, String deviceId, CloudDeviceApiRequest cloudDeviceApiRequest) throws ApiException, IOException
Send a synchronous payment request.- Parameters:
merchantAccount- The unique identifier of the merchant accountdeviceId- The unique identifier of the payment device that you send this request to (must match POIID in the MessageHeader).cloudDeviceApiRequest- The request to send.- Returns:
- instance of CloudDeviceApiResponse
- Throws:
ApiException- when an error occursIOException
-
async
public CloudDeviceApiAsyncResponse async(String merchantAccount, String deviceId, CloudDeviceApiRequest cloudDeviceApiRequest) throws ApiException, IOException
Send an asynchronous payment request.- Parameters:
merchantAccount- The unique identifier of the merchant accountdeviceId- The unique identifier of the device that you send this request to (must match POIID in the MessageHeader).cloudDeviceApiRequest- The request to send.- Returns:
- instance of CloudDeviceApiAsyncResponse wrapping the response (success or an EventNotification with error details)
- Throws:
ApiException- when an error occursIOException
-
getConnectedDevices
public ConnectedDevicesResponse getConnectedDevices(String merchantAccount) throws ApiException, IOException
Get a list of connected devices- Parameters:
merchantAccount-StringThe unique identifier of the merchant account. (required)- Returns:
ConnectedDevicesResponse- Throws:
ApiException- if fails to make API callIOException
-
getConnectedDevices
public ConnectedDevicesResponse getConnectedDevices(String merchantAccount, String store) throws ApiException, IOException
Get a list of connected devices- Parameters:
merchantAccount-StringThe unique identifier of the merchant account. (required)store-StringQuery: The store ID of the store belonging to the merchant account specified in the path. (optional)- Returns:
ConnectedDevicesResponse- Throws:
ApiException- if fails to make API callIOException
-
getDeviceStatus
public DeviceStatusResponse getDeviceStatus(String merchantAccount, String deviceId) throws ApiException, IOException
Get the status of a device.- Parameters:
merchantAccount- The unique identifier of the merchant account.deviceId- The unique identifier of the device.- Returns:
- An instance of DeviceStatus.
- Throws:
ApiException- when an error occursIOException
-
-