saveCommentWithHttpInfo method

Future<Response> saveCommentWithHttpInfo(
  1. String tenantId,
  2. CreateCommentParams createCommentParams, {
  3. bool? isLive,
  4. bool? doSpamCheck,
  5. bool? sendEmails,
  6. bool? populateNotifications,
})

Performs an HTTP 'POST /api/v1/comments' operation and returns the Response. Parameters:

Implementation

Future<Response> saveCommentWithHttpInfo(String tenantId, CreateCommentParams createCommentParams, { bool? isLive, bool? doSpamCheck, bool? sendEmails, bool? populateNotifications, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v1/comments';

  // ignore: prefer_final_locals
  Object? postBody = createCommentParams;

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

    queryParams.addAll(_queryParams('', 'tenantId', tenantId));
  if (isLive != null) {
    queryParams.addAll(_queryParams('', 'isLive', isLive));
  }
  if (doSpamCheck != null) {
    queryParams.addAll(_queryParams('', 'doSpamCheck', doSpamCheck));
  }
  if (sendEmails != null) {
    queryParams.addAll(_queryParams('', 'sendEmails', sendEmails));
  }
  if (populateNotifications != null) {
    queryParams.addAll(_queryParams('', 'populateNotifications', populateNotifications));
  }

  const contentTypes = <String>['application/json'];


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