claimDevicesByClaimCode method

Future<ClaimDevicesByClaimCodeResponse> claimDevicesByClaimCode({
  1. required String claimCode,
})

Adds device(s) to your account (i.e., claim one or more devices) if and only if you received a claim code with the device(s).

May throw InvalidRequestException. May throw InternalFailureException. May throw ForbiddenException.

Parameter claimCode : The claim code, starting with "C-", as provided by the device manufacturer.

Implementation

Future<ClaimDevicesByClaimCodeResponse> claimDevicesByClaimCode({
  required String claimCode,
}) async {
  ArgumentError.checkNotNull(claimCode, 'claimCode');
  final response = await _protocol.send(
    payload: null,
    method: 'PUT',
    requestUri: '/claims/${Uri.encodeComponent(claimCode)}',
    exceptionFnMap: _exceptionFns,
  );
  return ClaimDevicesByClaimCodeResponse.fromJson(response);
}