listTransactionsWithHttpInfo method

Future<Response> listTransactionsWithHttpInfo({
  1. DateTime? from,
  2. DateTime? to,
  3. String? orderByAttribute,
  4. String? orderByType,
})

Get all transactions of a wallet

Returns all transaction of wallet

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> listTransactionsWithHttpInfo({
  DateTime? from,
  DateTime? to,
  String? orderByAttribute,
  String? orderByType,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/wallet/transactions';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (from != null) {
    queryParams.addAll(_queryParams('', 'from', from));
  }
  if (to != null) {
    queryParams.addAll(_queryParams('', 'to', to));
  }
  if (orderByAttribute != null) {
    queryParams
        .addAll(_queryParams('', 'order_by_attribute', orderByAttribute));
  }
  if (orderByType != null) {
    queryParams.addAll(_queryParams('', 'order_by_type', orderByType));
  }

  const contentTypes = <String>[];

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