createNewInboxRulesetWithHttpInfo method

Future<Response> createNewInboxRulesetWithHttpInfo(
  1. CreateInboxRulesetOptions createInboxRulesetOptions, {
  2. String? inboxId,
})

Create an inbox ruleset

Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> createNewInboxRulesetWithHttpInfo(CreateInboxRulesetOptions createInboxRulesetOptions, { String? inboxId, }) async {
  // ignore: prefer_const_declarations
  final path = r'/rulesets';

  // ignore: prefer_final_locals
  Object? postBody = createInboxRulesetOptions;

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

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

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


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