#atul
1 messages · Page 1 of 1 (latest)
hi, yes, you can't. You have to make two requests, one to create the Schedule with from_subscription and another to update that new Schedule.
While updating it i getting error
GEtting error
You can not modify the start date of the current phase.
that is because you need to pass two phases when modifying a subscription like this.
you need to pass phases with two items, the first item has to match the current state of the subscription, and the second phase has to match the changes you want to make later. With a schedule you are "declaring" the state of the subscription, so you need to pass the 'current' phase when updating it.
How can we match to current state ??
for example you pass start_date and end_date on the phase as the value of your subscription.current_period_start and subscription.current_period_end , and you pass the items using the same details are are in subscription.items.