edit method
Future<Response<RazorpayItem> >
edit({
- required String itemId,
- required RazorpayItemUpdateRequestBody params,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayItem> ?
Edit an item given Item ID
@param itemId - The unique identifier of the item. @param params - Check doc for required params
Implementation
Future<Response<RazorpayItem>> edit({
required String itemId,
required RazorpayItemUpdateRequestBody params,
void Function(RazorpayApiException?, Response<RazorpayItem>?)? callback,
}) async {
if (itemId.isEmpty) {
throw ArgumentError('`item_id` is mandatory');
}
return api.patch<RazorpayItem>(
{
'url': '/items/$itemId',
'data': params.toJson(),
},
fromJsonFactory: RazorpayItem.fromJson,
callback: callback,
);
}