walletsUpdate method
Future<void>
walletsUpdate(
- String id, {
- WalletUpdateRequest? walletUpdateRequest,
- 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.
Parameters:
-
String id (required): Wallet id.
-
WalletUpdateRequest walletUpdateRequest: The new label and threshold.
Implementation
Future<void> walletsUpdate(String id, { WalletUpdateRequest? walletUpdateRequest, Future<void>? abortTrigger, }) async {
final response = await walletsUpdateWithHttpInfo(id, walletUpdateRequest: walletUpdateRequest, abortTrigger: abortTrigger,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}