markAsReadWithHttpInfo method

Future<Response> markAsReadWithHttpInfo(
  1. String emailId, {
  2. bool? read,
})

Mark an email as read on unread

Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread

Note: This method returns the HTTP Response.

Parameters:

  • String emailId (required):

  • bool read: What value to assign to email read property. Default true.

Implementation

Future<Response> markAsReadWithHttpInfo(String emailId, { bool? read, }) async {
  // ignore: prefer_const_declarations
  final path = r'/emails/{emailId}/read'
    .replaceAll('{emailId}', emailId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (read != null) {
    queryParams.addAll(_queryParams('', 'read', read));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'PATCH',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}