getLatestEmailInInboxWithHttpInfo method

Future<Response> getLatestEmailInInboxWithHttpInfo(
  1. String inboxId,
  2. int timeoutMillis
)

Get latest email in an inbox. Use WaitForController to get emails that may not have arrived yet.

Get the newest email in an inbox or wait for one to arrive

Note: This method returns the HTTP Response.

Parameters:

  • String inboxId (required): ID of the inbox you want to get the latest email from

  • int timeoutMillis (required): Timeout milliseconds to wait for latest email

Implementation

Future<Response> getLatestEmailInInboxWithHttpInfo(String inboxId, int timeoutMillis,) async {
  // ignore: prefer_const_declarations
  final path = r'/inboxes/getLatestEmail';

  // ignore: prefer_final_locals
  Object? postBody;

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

    queryParams.addAll(_queryParams('', 'inboxId', inboxId));
    queryParams.addAll(_queryParams('', 'timeoutMillis', timeoutMillis));

  const contentTypes = <String>[];


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