updateAccount method

Future<void> updateAccount(
  1. ClientAccountUpdateContext clientAccountUpdateContext, {
  2. required void onSuccess(),
  3. required void onError(
    1. SyneriseError error
    ),
})

This function updates a client account using the provided context.

Args: clientAccountUpdateContext (ClientAccountUpdateContext): It is an object of type ClientAccountUpdateContext that contains the information needed to update a client's account. This object may include fields such as the client's name, email, phone number, address, and any other relevant information that needs to be updated.

Implementation

Future<void> updateAccount(
    ClientAccountUpdateContext clientAccountUpdateContext,
    {required void Function() onSuccess,
    required void Function(SyneriseError error) onError}) async {
  SyneriseResult<void> result =
      await _methods.updateAccount(clientAccountUpdateContext);

  result.onSuccess((result) {
    onSuccess();
  }).onError((error) {
    onError(error);
  });
}