removeDevice method

Future<DynamiteResponse<PushRemoveDeviceResponseApplicationJson, void>> removeDevice({
  1. PushRemoveDeviceApiVersion? apiVersion,
  2. bool? oCSAPIRequest,
})

Remove a device from push notifications.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • apiVersion Defaults to "v2".
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: No device registered
  • 202: Device removed successfully
  • 401: Missing permissions to remove device
  • 400: Removing device is not possible

See:

Implementation

Future<_i1.DynamiteResponse<PushRemoveDeviceResponseApplicationJson, void>> removeDevice({
  PushRemoveDeviceApiVersion? apiVersion,
  bool? oCSAPIRequest,
}) async {
  final _request = $removeDevice_Request(
    apiVersion: apiVersion,
    oCSAPIRequest: oCSAPIRequest,
  );
  final _streamedResponse = await _rootClient.httpClient.send(_request);
  final _response = await _i3.Response.fromStream(_streamedResponse);

  final _serializer = $removeDevice_Serializer();
  return _i1.ResponseConverter<PushRemoveDeviceResponseApplicationJson, void>(_serializer).convert(_response);
}