rawFindMessagesByToAddressWithHttpInfo method

Future<Response> rawFindMessagesByToAddressWithHttpInfo({
  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

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> rawFindMessagesByToAddressWithHttpInfo({ String? toAddress, String? startKey, String? startDocumentId, int? limit, bool? reverse, String? hcpId, }) async {
  // ignore: prefer_const_declarations
  final path = r'/rest/v1/message/byToAddress';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (toAddress != null) {
    queryParams.addAll(_queryParams('', 'toAddress', toAddress));
  }
  if (startKey != null) {
    queryParams.addAll(_queryParams('', 'startKey', startKey));
  }
  if (startDocumentId != null) {
    queryParams.addAll(_queryParams('', 'startDocumentId', startDocumentId));
  }
  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }
  if (reverse != null) {
    queryParams.addAll(_queryParams('', 'reverse', reverse));
  }
  if (hcpId != null) {
    queryParams.addAll(_queryParams('', 'hcpId', hcpId));
  }

  const authNames = <String>[r'basicSchema'];
  const contentTypes = <String>[];


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