addDomainWildcardCatchAll method

Future<DomainDto?> addDomainWildcardCatchAll(
  1. String id
)

Add catch all wild card inbox to domain

Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated

Parameters:

Implementation

Future<DomainDto?> addDomainWildcardCatchAll(String id,) async {
  final response = await addDomainWildcardCatchAllWithHttpInfo(id,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DomainDto',) as DomainDto;

  }
  return null;
}