addBankAccount method
Future<Response<RazorpayCustomerBankAccount> >
addBankAccount({
- required String customerId,
- required RazorpayCustomerBankAccountRequestBody params,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayCustomerBankAccount> ?
Add Bank Account of Customer
@param customerId - The unique identifier of the customer. @param params - Check doc for required params
Implementation
Future<Response<RazorpayCustomerBankAccount>> addBankAccount({
required String customerId,
required RazorpayCustomerBankAccountRequestBody params,
void Function(
RazorpayApiException?,
Response<RazorpayCustomerBankAccount>?,
)? callback,
}) async {
if (customerId.isEmpty) {
throw ArgumentError('customerId is required');
}
return api.post<RazorpayCustomerBankAccount>(
{
'url': '/customers/$customerId/bank_account',
'data': params.toJson(),
},
fromJsonFactory: RazorpayCustomerBankAccount.fromJson,
callback: callback,
);
}