getOrganizationEmailsPaginatedWithHttpInfo method

Future<Response> getOrganizationEmailsPaginatedWithHttpInfo({
  1. List<String>? inboxId,
  2. int? page,
  3. int? size,
  4. String? sort,
  5. bool? unreadOnly,
  6. String? searchFilter,
  7. DateTime? since,
  8. DateTime? before,
})

Get all organization emails. List team or shared test email accounts

By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages

Note: This method returns the HTTP Response.

Parameters:

  • List<String> inboxId: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.

  • int page: Optional page index in email list pagination

  • int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results

  • String sort: Optional createdAt sort direction ASC or DESC

  • bool unreadOnly: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly

  • String searchFilter: Optional search filter search filter for emails.

  • DateTime since: Optional filter emails received after given date time

  • DateTime before: Optional filter emails received before given date time

Implementation

Future<Response> getOrganizationEmailsPaginatedWithHttpInfo({ List<String>? inboxId, int? page, int? size, String? sort, bool? unreadOnly, String? searchFilter, DateTime? since, DateTime? before, }) async {
  // ignore: prefer_const_declarations
  final path = r'/emails/organization';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (inboxId != null) {
    queryParams.addAll(_queryParams('multi', 'inboxId', inboxId));
  }
  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 (unreadOnly != null) {
    queryParams.addAll(_queryParams('', 'unreadOnly', unreadOnly));
  }
  if (searchFilter != null) {
    queryParams.addAll(_queryParams('', 'searchFilter', searchFilter));
  }
  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,
  );
}