getAccounts method

  1. @override
Future<DataPage<AccountV1>> getAccounts(
  1. String? correlationId,
  2. FilterParams? filter,
  3. PagingParams? paging
)
override

Gets a page of accounts retrieved by a given filter.

  • correlationId (optional) transaction id to trace execution through call chain.
  • filter (optional) a filter function to filter items
  • paging (optional) paging parameters Return Future that receives a data page Throws error.

Implementation

@override
Future<DataPage<AccountV1>> getAccounts(
    String? correlationId, FilterParams? filter, PagingParams? paging) async {
  var result = await callCommand(
    'get_accounts',
    correlationId,
    {'filter': filter, 'paging': paging},
  );
  return DataPage<AccountV1>.fromJson(json.decode(result), (item) {
    var account = AccountV1();
    account.fromJson(item);
    return account;
  });
}