edit method
Future<Response<RazorpayProduct> >
edit({
- required String accountId,
- required String productId,
- required RazorpayProductUpdateRequestBody params,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayProduct> ?
Update a Product Configuration
@param accountId - The unique identifier of the account. @param productId - The unique identifier of a product. @param params - Check doc for required params
Implementation
Future<Response<RazorpayProduct>> edit({
required String accountId,
required String productId,
required RazorpayProductUpdateRequestBody params,
void Function(RazorpayApiException?, Response<RazorpayProduct>?)? callback,
}) async {
if (accountId.isEmpty) {
throw ArgumentError('accountId is required');
}
if (productId.isEmpty) {
throw ArgumentError('productId is required');
}
return api.patch<RazorpayProduct>(
{
'version': 'v2',
'url': '$BASE_URL/$accountId/products/$productId',
'data': params.toJson(),
},
fromJsonFactory: RazorpayProduct.fromJson,
callback: callback,
);
}