edit method
Future<Response<RazorpayPayment> >
edit({
- required String paymentId,
- required RazorpayPaymentUpdateRequestBody params,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayPayment> ?
Edit a payment given Payment ID (Update notes)
@param paymentId - The unique identifier of the payment. @param params - Contains the 'notes' to update.
Implementation
Future<Response<RazorpayPayment>> edit({
required String paymentId,
required RazorpayPaymentUpdateRequestBody
params, // Use the specific update model
void Function(RazorpayApiException?, Response<RazorpayPayment>?)? callback,
}) async {
if (paymentId.isEmpty) {
throw ArgumentError(ID_REQUIRED_MSG);
}
return api.patch<RazorpayPayment>(
{
'url': '$BASE_URL/$paymentId',
'data': params.toJson(),
},
fromJsonFactory: RazorpayPayment.fromJson,
callback: callback,
);
}