#jachensh

1 messages · Page 1 of 1 (latest)

ashen narwhalBOT
hidden rune
cedar monolith
#

thanks @hidden rune will take a look!

#

hey @hidden rune just to clarify, so if i wanted to make a one time update to a sub at the next billing cycle start, i would setup a sub schedule with one phase, that contains the sub item change, a start_date of the start of the next billing cycle, and iterations set to 1 and this would initiate the schedule at that future date, run once, and end?

hidden rune
#

No, you would create a Subscription Schedule with two phases. The first phase would represent the current state of the Subscription and have a start date of now and an end date of when you want the change to be made. The second phase would start at the end of the current phase and represent how the Subscription looks after the change is made.

cedar monolith
#

gotcha. how would i represent the first phase as the current state? Would i just leave the hash empty except for start_date and end_date?

hidden rune
#

Are you trying to do this for a Subscription that already exists?

cedar monolith
#

yes

hidden rune
#

When you create a Subscription Schedule for an existing Subscription it will automatically create an initial phase that represents the current state of the Subscription.

#

You would then update the Subscription Schedule to add the second phase.

cedar monolith
#

ok so it would be two stripe calls, one to create with from_subscriptions and another to update. Last question, for the second phase in the update call, is there a recommended end_date if I just want the sub released from the schedule as soon as the update (to the sub) is completed?

hidden rune
#

Not really. I recommend not specifying end date at all and instead do a single iteration, then release the Subscription from the Schedule after that single iteration.

cedar monolith
#

got it, so on that update where I am specifying the second phase, don't specify end date, and set iterations = 1. This should release as soon as the update is complete. correct?

#

actually if i'm understanding this correctly, if we're on a monthly billing cycle, and iteration = 1, does this mean the schedule phase continues for one month?

hidden rune
#

Yes, and then it will release.

cedar monolith
#

but this might cause issues if for example, another update is scheduled within that month no?

#

oh nvm, it would chain and the next update scheduled would be appended as a new phase

hidden rune
#

You would update the existing Subscription Schedule in that case.

#

Yep.