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<DynamiteResponse<PushRemoveDeviceResponseApplicationJson, void>> removeDevice({
  PushRemoveDeviceApiVersion? apiVersion,
  bool? oCSAPIRequest,
}) async {
  final rawResponse = removeDeviceRaw(
    apiVersion: apiVersion,
    oCSAPIRequest: oCSAPIRequest,
  );

  return rawResponse.future;
}