edit method
Future<Response<RazorpayRefund> >
edit({
- required String refundId,
- required RazorpayRefundUpdateRequestBody params,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayRefund> ?
Edit a refund given Refund ID (Update notes)
@param refundId - The unique identifier of the refund. @param params - Check doc for required params (only notes).
Implementation
Future<Response<RazorpayRefund>> edit({
required String refundId,
required RazorpayRefundUpdateRequestBody params,
void Function(RazorpayApiException?, Response<RazorpayRefund>?)? callback,
}) async {
if (refundId.isEmpty) {
throw ArgumentError('refundId is mandatory');
}
return api.patch<RazorpayRefund>(
{
'url': '/refunds/$refundId',
'data': params.toJson(),
},
fromJsonFactory: RazorpayRefund.fromJson,
callback: callback,
);
}