depositFromPaymentMethod method
Deposit from payment method
Deposits funds from a linked external payment method to the specified profile_id.
https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postdepositpaymentmethod
Implementation
Future<Transaction> depositFromPaymentMethod({
String? profileId,
required double amount,
required String paymentMethodId,
required String currency,
}) async {
var response = await _transfersRestClient.depositFromPaymentMethod(
profileId: profileId,
amount: amount,
paymentMethodId: paymentMethodId,
currency: currency,
);
if (response.statusCode != 200) throw response;
return Transaction.fromJson(json.decode(response.body));
}