getLatestEmailWithHttpInfo method

Future<Response> getLatestEmailWithHttpInfo({
  1. List<String>? inboxIds,
})

Get latest email in all inboxes. Most recently received.

Get the newest email in all inboxes or in a passed set of inbox IDs

Note: This method returns the HTTP Response.

Parameters:

  • List<String> inboxIds: Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes

Implementation

Future<Response> getLatestEmailWithHttpInfo({ List<String>? inboxIds, }) async {
  // ignore: prefer_const_declarations
  final path = r'/emails/latest';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (inboxIds != null) {
    queryParams.addAll(_queryParams('multi', 'inboxIds', inboxIds));
  }

  const contentTypes = <String>[];


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