callNotificationState method

Future<DynamiteResponse<CallNotificationStateResponseApplicationJson, void>> callNotificationState({
  1. required String token,
  2. CallNotificationStateApiVersion? apiVersion,
  3. bool? oCSAPIRequest,
})

Check the expected state of a call notification.

Required capability: call-notification-state-api.

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 "v4".
  • token Conversation token to check.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Notification should be kept alive
  • 201: Dismiss call notification and show "Missed call"-notification instead
  • 403: Not logged in, try again with auth data sent
  • 404: Dismiss call notification

See:

Implementation

Future<_i1.DynamiteResponse<CallNotificationStateResponseApplicationJson, void>> callNotificationState({
  required String token,
  CallNotificationStateApiVersion? apiVersion,
  bool? oCSAPIRequest,
}) async {
  final _request = $callNotificationState_Request(token: token, apiVersion: apiVersion, oCSAPIRequest: oCSAPIRequest);
  final _streamedResponse = await _rootClient.httpClient.send(_request);
  final _response = await _i3.Response.fromStream(_streamedResponse);

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