walletsCreate method
Future<void>
walletsCreate({
- WalletCreateRequest? walletCreateRequest,
- Future<
void> ? abortTrigger,
Create a wallet
Creates an empty wallet in a currency the partner has no wallet in yet. Take currencyId from GET currencies. The new wallet starts with a zero balance. Without a label it is named after its currency, for example USD wallet. The partner's first wallet is always selected; for a later one, isSelected: true makes it the selected wallet in place of the current one. Returns 201 without a body; list the wallets to read it. A second wallet in the same currency returns 400 with code 17000 (WALLET_CURRENCY_ALREADY_EXISTS); a label already used by another of the partner's wallets, ignoring case, returns 400 with code 17001 (WALLET_LABEL_ALREADY_EXISTS).
Parameters:
- WalletCreateRequest walletCreateRequest: The wallet to create.
Implementation
Future<void> walletsCreate({ WalletCreateRequest? walletCreateRequest, Future<void>? abortTrigger, }) async {
final response = await walletsCreateWithHttpInfo(walletCreateRequest: walletCreateRequest, abortTrigger: abortTrigger,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}