#blocher_schedule-python

1 messages ¡ Page 1 of 1 (latest)

prisma socketBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1242178371782316224

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

brave swallow
autumn juniper
#

blocher_schedule-python

#

@brave swallow Why are you calling phases.append exactly?

brave swallow
#

I believe we are taking an existing set of phases and adding a new phase after the end of the current period with a lesser tier

autumn juniper
#

Gotcha, I was telling another dev just 30 minutes ago in this thread this:

So yeah the problem is your code. You can't just extract the phases array and add to it. That will never work. The phases array you get in your code is the response that our API returns to you. It has different properties/shapes than the parameters you are going to send us.

So you have to reconstruct the full phases array as if you were creating the SubscriptionSchedule for the first time

brave swallow
#

Oh, ok, I believe this had been working but we just started seeing the deprecation method after upgrading the SDK version

autumn juniper
#

so yeah don't do what you are doing right now, it works mostly by some luck of the old internals of the SDK and instead re-construct the phases to be exactly what needs to be sent

brave swallow
#

ok, thank you