waitForNthMissedEmailWithHttpInfo method

Future<Response> waitForNthMissedEmailWithHttpInfo(
  1. int index, {
  2. String? inboxId,
  3. int? timeout,
  4. DateTime? since,
  5. DateTime? before,
})

Wait for Nth missed email

Wait for 0 based index missed email

Note: This method returns the HTTP Response.

Parameters:

  • int index (required): Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1

  • String inboxId: Optional inbox ID filter

  • int timeout: Optional timeout milliseconds

  • DateTime since: Filter by created at after the given timestamp

  • DateTime before: Filter by created at before the given timestamp

Implementation

Future<Response> waitForNthMissedEmailWithHttpInfo(int index, { String? inboxId, int? timeout, DateTime? since, DateTime? before, }) async {
  // ignore: prefer_const_declarations
  final path = r'/missed-emails/waitForNthMissedEmail';

  // ignore: prefer_final_locals
  Object? postBody;

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

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