edit method
Future<Response<RazorpayCustomer> >
edit({
- required String customerId,
- required RazorpayCustomerUpdateRequestBody params,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayCustomer> ?
Edit a customer given Customer ID
@param customerId - The unique identifier of the customer. @param params - Check doc for required params
Implementation
Future<Response<RazorpayCustomer>> edit({
required String customerId,
required RazorpayCustomerUpdateRequestBody params,
void Function(RazorpayApiException?, Response<RazorpayCustomer>?)? callback,
}) async {
if (customerId.isEmpty) {
throw ArgumentError('customerId is required');
}
return api.put<RazorpayCustomer>(
// PUT method used in JS
{
'url': '/customers/$customerId',
'data': params.toJson(),
},
fromJsonFactory: RazorpayCustomer.fromJson,
callback: callback,
);
}