edit method
Future<Response<RazorpayInvoice> >
edit({
- required String invoiceId,
- required RazorpayInvoiceUpdateRequestBody params,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayInvoice> ?
Patches given invoice with new attributes
@param invoiceId - The unique identifier of the invoice @param params - Check doc for required params
Implementation
Future<Response<RazorpayInvoice>> edit({
required String invoiceId,
required RazorpayInvoiceUpdateRequestBody params,
void Function(RazorpayApiException?, Response<RazorpayInvoice>?)? callback,
}) async {
if (invoiceId.isEmpty) {
throw ArgumentError(MISSING_ID_ERROR);
}
final url = '$BASE_URL/$invoiceId';
return api.patch<RazorpayInvoice>(
{
'url': url,
'data': params.toJson(),
},
fromJsonFactory: RazorpayInvoice.fromJson,
callback: callback,
);
}