getExpiredInboxByInboxId method
Get expired inbox record for a previously existing inbox
Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
Parameters:
- String inboxId (required): ID of inbox you want to retrieve (not the inbox ID)
Implementation
Future<ExpiredInboxDto?> getExpiredInboxByInboxId(String inboxId,) async {
final response = await getExpiredInboxByInboxIdWithHttpInfo(inboxId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ExpiredInboxDto',) as ExpiredInboxDto;
}
return null;
}