createNewEmailAddressWithHttpInfo method
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,
);
}