createNewEmailAddressWithHttpInfo method

Future<Response> createNewEmailAddressWithHttpInfo({
  1. bool? allowTeamAccess,
  2. bool? useDomainPool,
  3. DateTime? expiresAt,
  4. int? expiresIn,
  5. String? emailAddress,
  6. String? inboxType,
  7. String? description,
  8. String? name,
  9. List<String>? tags,
  10. bool? favourite,
  11. bool? virtualInbox,
  12. bool? useShortAddress,
  13. String? domainName,
  14. String? domainId,
})

Create new random inbox

Returns an Inbox with an id and an emailAddress

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> createNewEmailAddressWithHttpInfo({ bool? allowTeamAccess, bool? useDomainPool, DateTime? expiresAt, int? expiresIn, String? emailAddress, String? inboxType, String? description, String? name, List<String>? tags, bool? favourite, bool? virtualInbox, bool? useShortAddress, String? domainName, String? domainId, }) async {
  // ignore: prefer_const_declarations
  final path = r'/newEmailAddress';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (allowTeamAccess != null) {
    queryParams.addAll(_queryParams('', 'allowTeamAccess', allowTeamAccess));
  }
  if (useDomainPool != null) {
    queryParams.addAll(_queryParams('', 'useDomainPool', useDomainPool));
  }
  if (expiresAt != null) {
    queryParams.addAll(_queryParams('', 'expiresAt', expiresAt));
  }
  if (expiresIn != null) {
    queryParams.addAll(_queryParams('', 'expiresIn', expiresIn));
  }
  if (emailAddress != null) {
    queryParams.addAll(_queryParams('', 'emailAddress', emailAddress));
  }
  if (inboxType != null) {
    queryParams.addAll(_queryParams('', 'inboxType', inboxType));
  }
  if (description != null) {
    queryParams.addAll(_queryParams('', 'description', description));
  }
  if (name != null) {
    queryParams.addAll(_queryParams('', 'name', name));
  }
  if (tags != null) {
    queryParams.addAll(_queryParams('multi', 'tags', tags));
  }
  if (favourite != null) {
    queryParams.addAll(_queryParams('', 'favourite', favourite));
  }
  if (virtualInbox != null) {
    queryParams.addAll(_queryParams('', 'virtualInbox', virtualInbox));
  }
  if (useShortAddress != null) {
    queryParams.addAll(_queryParams('', 'useShortAddress', useShortAddress));
  }
  if (domainName != null) {
    queryParams.addAll(_queryParams('', 'domainName', domainName));
  }
  if (domainId != null) {
    queryParams.addAll(_queryParams('', 'domainId', domainId));
  }

  const contentTypes = <String>[];


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