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