声明设备

为指定客户声明单个设备的同步请求。

方法签名

public ClaimDeviceResponse claimDevice(ClaimDeviceRequest request) throws CommonException;

ClaimDeviceRequest

属性名称 值 必填 说明
claim DeviceClaim 对象 是 要处理的设备声明。

DeviceClaim

属性名称 值 必填 说明
deviceIdentifier object(DeviceIdentifier) 是 设备标识符。
customer CompanyReference 对象 是 分配给设备的客户的公司参考信息。
orderNumber string 否 订单号。
vendorParams map 否 额外字段,供应商指定的键值对。

ClaimDeviceResponse

属性名称 值 说明
deviceId string 设备 ID,前缀为“samsung/”或“google/”。

错误行为

如果发生错误,该库会抛出包含以下错误代码之一的 CommonException:

错误代码
AUTHORIZATION_FAIL
DUPLICATE_DEVICES
INVALID_CUSTOMER_ID
INVALID_DEVICE_IMEI
INVALID_DEVICE_MEID
INVALID_DEVICE_SERIAL
INVALID_IDENTIFIER_SET
INVALID_MANUFACTURER
INVALID_MODEL
NOT_IMPLEMENTED