walletsUpdateWithHttpInfo method

Future<Response> walletsUpdateWithHttpInfo(
  1. String id, {
  2. WalletUpdateRequest? walletUpdateRequest,
  3. Future<void>? abortTrigger,
})

Update a wallet

Renames a wallet and sets its low-balance threshold. Both values are replaced: label is required, and omitting lowBalanceThreshold clears the threshold. The wallet id comes from the route; a walletId in the body is ignored. A label already used by another of the partner's wallets, ignoring case, returns 400 with code 17001 (WALLET_LABEL_ALREADY_EXISTS); an unknown wallet returns 404 with code 10004.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> walletsUpdateWithHttpInfo(String id, { WalletUpdateRequest? walletUpdateRequest, Future<void>? abortTrigger, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v1/b2b/wallets/{id}'
    .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody = walletUpdateRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json', 'text/json', 'application/*+json'];


  return apiClient.invokeAPI(
    path,
    'PATCH',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
    abortTrigger: abortTrigger,
  );
}