deleteAccountById method

  1. @override
Future<AccountV1?> deleteAccountById(
  1. String? correlationId,
  2. String id
)
override

Deleted an account by it's unique id.

  • correlation_id (optional) transaction id to trace execution through call chain.
  • id an id of the account to be deleted Return Future that receives deleted account Throws error.

Implementation

@override
Future<AccountV1?> deleteAccountById(String? correlationId, String id) async {
  var result = await callCommand(
      'delete_account_by_id', correlationId, {'account_id': id});
  if (result == null) return null;
  var item = AccountV1();
  item.fromJson(json.decode(result));
  return item;
}