rawFindMessagesByToAddress method

Future<PaginatedListMessageDto?> rawFindMessagesByToAddress({
  1. String? toAddress,
  2. String? startKey,
  3. String? startDocumentId,
  4. int? limit,
  5. bool? reverse,
  6. String? hcpId,
})

Get all messages (paginated) for current HC Party and provided to address

Parameters:

Implementation

Future<PaginatedListMessageDto?> rawFindMessagesByToAddress({ String? toAddress, String? startKey, String? startDocumentId, int? limit, bool? reverse, String? hcpId, }) async {
  final response = await rawFindMessagesByToAddressWithHttpInfo( toAddress: toAddress, startKey: startKey, startDocumentId: startDocumentId, limit: limit, reverse: reverse, hcpId: hcpId, );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException.withRequestId(response.statusCode, await _decodeBodyBytes(response), response.headers["x-request-id"], response.request?.url.toString());
  }
  // 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), 'PaginatedListMessageDto',) as PaginatedListMessageDto;

  }
  return null;
}