getAliasEmailsWithHttpInfo method
Get emails for an alias
Get paginated emails for an alias by ID
Note: This method returns the HTTP Response
.
Parameters:
-
String aliasId (required):
-
int page: Optional page index alias email list pagination
-
int size: Optional page size alias email list pagination
-
String sort: Optional createdAt sort direction ASC or DESC
-
DateTime since: Optional filter by sent after given date time
-
DateTime before: Optional filter by sent before given date time
Implementation
Future<Response> getAliasEmailsWithHttpInfo(String aliasId, { int? page, int? size, String? sort, DateTime? since, DateTime? before, }) async {
// ignore: prefer_const_declarations
final path = r'/aliases/{aliasId}/emails'
.replaceAll('{aliasId}', aliasId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (page != null) {
queryParams.addAll(_queryParams('', 'page', page));
}
if (size != null) {
queryParams.addAll(_queryParams('', 'size', size));
}
if (sort != null) {
queryParams.addAll(_queryParams('', 'sort', sort));
}
if (since != null) {
queryParams.addAll(_queryParams('', 'since', since));
}
if (before != null) {
queryParams.addAll(_queryParams('', 'before', before));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}