#thomasst-schedules
1 messages · Page 1 of 1 (latest)
yep you have to re-declare all the phases on every update
there's no trick, you can't update a single phase, you have to re-pass the full phases:[] array declarativey with the updated state
Thanks. It looks like I can't just post back the returned dictionary, since e.g. tax_rates are returned nested but I have to post back an array of IDs only.
But I'll just go through all the parameters to make sure they are posted back correctly.
yep unfortunately the API response shapes don't always match the API argument shapes so it's not always possible to just directly copy the variables
I completely agree it's painful and it's something we're aware of, we're just a bit stuck with it as it requires a large API version change to try to improve(the fundamental problem is each phase doesn't have an ID so you can't reference it any other way than as part of the full array, which was not a great design when this was built unfortunately)
Yeah I understand.