#jur_outlawz

1 messages · Page 1 of 1 (latest)

twin vineBOT
leaden slate
turbid mica
#

but the customer can still increase and decrease the number between the adjustments?

leaden slate
#

by that you are referring adjusting the quantity on the SubscriptionItems? Using the API or the CustomerPortal?

turbid mica
#

yes, Api

leaden slate
#

then yes, you can make those same updates

turbid mica
#

So I actually want to schedule the price change. Do you have sample code to do just that?

leaden slate
#

yep, in the docs linked above

turbid mica
#

For phases I have to provide a quantity, but that changes before the price changes. How can I arrange that?

#

I really just want him to go into the next circle from year to month

leaden slate
#

well you would be declaring what you intend the quantity to be at the time that the phase will come into effect

#

so at the time you're creating the Schedule you would just pass the current quantity, I would think

turbid mica
#

But the quantity changed, like the phase goes into effect on 21-01-2023 and I entered it on 15-01-2023 and the quantity changed on 18-01-2023. How does that work?

leaden slate
#

good question, would have to test it

#

it might be that when you update the quantity you also have to update the Schedule to update the quantity of the upcoming phases(otherwise when the phase starts it changes the quantity to the one declared on the phase which would be confusing, but it's certainly logical that it might work this way) , not sure off the top of my head but I remember this type of issue coming up before

turbid mica
#

If I have created a subscriptionSchedules, can I adjust it?

#

I see with update() but how can i check if i have a subscriptionSchedules on this subscription?

leaden slate
#

there would be a non-null subscription_schedule field on the Subscription object

turbid mica
leaden slate
turbid mica
#

thanks

turbid mica
#

Is it correct if I create a schedule for a subscription and if I then adjust the subscription it removes the schedule?

leaden slate
#

it shouldn't remove it no, generally what it does is it "writes-back" the change you made to the Subscription to the current_phase of the Schedule