updateWallet method

Future<TUpdateWalletResponse> updateWallet({
  1. required TUpdateWalletBody input,
})

Update a wallet for an organization.

Sign the provided TUpdateWalletBody with the client's stamp function and submit the request (POST /public/v1/submit/update_wallet).

See also: stampUpdateWallet.

Implementation

Future<TUpdateWalletResponse> updateWallet({
  required TUpdateWalletBody input,
}) async {
  final body = packActivityBody(
    bodyJson: input.toJson(),
    fallbackOrganizationId: input.organizationId ??
        config.organizationId ??
        (throw Exception(
            "Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
    activityType: 'ACTIVITY_TYPE_UPDATE_WALLET',
  );
  return await request<Map<String, dynamic>, TUpdateWalletResponse>(
      "/public/v1/submit/update_wallet",
      body,
      (json) => TUpdateWalletResponse.fromJson(
          transformActivityResponse(json, 'UpdateWallet')));
}