updateAccount method

  1. @override
Future<AccountV1?> updateAccount(
  1. String? correlationId,
  2. AccountV1 account
)
override

Updates an account.

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

Implementation

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