generateNotificationV3 method

Future<DynamiteResponse<ApiGenerateNotificationV3ResponseApplicationJson, void>> generateNotificationV3({
  1. required String apiVersion3,
  2. required String userId,
  3. bool? oCSAPIRequest,
  4. ApiGenerateNotificationV3RequestApplicationJson? $body,
})

Generate a notification with rich object parameters for a user.

This endpoint requires admin access.

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:

  • apiVersion3
  • userId ID of the user.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Notification generated successfully, returned id is the notification ID for future delete requests
  • 400: Provided data was invalid, check error field of the response of log file for details

See:

Implementation

Future<_i1.DynamiteResponse<ApiGenerateNotificationV3ResponseApplicationJson, void>> generateNotificationV3({
  required String apiVersion3,
  required String userId,
  bool? oCSAPIRequest,
  ApiGenerateNotificationV3RequestApplicationJson? $body,
}) async {
  final _request = $generateNotificationV3_Request(
    apiVersion3: apiVersion3,
    userId: userId,
    oCSAPIRequest: oCSAPIRequest,
    $body: $body,
  );
  final _streamedResponse = await _rootClient.httpClient.send(_request);
  final _response = await _i3.Response.fromStream(_streamedResponse);

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