pendingUpdate method
Future<Response<RazorpaySubscription> >
pendingUpdate({
- required String subscriptionId,
- void callback(
- RazorpayApiException?,
- Response<
RazorpaySubscription> ?
Fetch details of pending update
@param subscriptionId - The unique identifier of the Subscription.
Implementation
Future<Response<RazorpaySubscription>> pendingUpdate({
required String subscriptionId,
void Function(RazorpayApiException?, Response<RazorpaySubscription>?)?
callback,
}) async {
if (subscriptionId.isEmpty) {
throw ArgumentError(MISSING_ID_ERROR);
}
final url = '$BASE_URL/$subscriptionId/retrieve_scheduled_changes';
return api.get<RazorpaySubscription>(
// Assuming it returns the subscription object
{'url': url},
fromJsonFactory: RazorpaySubscription.fromJson,
callback: callback,
);
}