#ironbeard - update subscriptions

1 messages · Page 1 of 1 (latest)

fiery wyvernBOT
tiny copper
#

I will have to test that myself. I would have thought we would error on that but if you have seen it in your testing then it sounds like I am wrong. Do you have the ID of a subscription that you updated like this?

gleaming socket
#

Sorry, got called away with the baby one second I can provide that

#

sub_1LW3URCoTIfwbn285grgenqz

tiny copper
#

Yep seeing the same behavior on my end. So it looks like we don't explicitly check for that, I am guessing to allow putting the coupon on and then the price but not sure. Are you just checking that that is expected or are you looking in to how to prevent it as well?

gleaming socket
#

Well, I'm refactoring some code and just wanted to make sure I checked things properly.

#

But if I needed to check, I would have to go PromotionCode to Coupon to Product to Price, and then make sure that Price is associated with a SubscriptionItem on the Subscription I'm updating/creating?

tiny copper
#

Correct, that would be the way to check this on your end

#

You should be able to get to at least the product with one retrieve call to the promotion code if you use expansion but after that point I think you would need to do another API call to list the prices

gleaming socket
#

Gotcha

#

but I guess, it's possible to have a PromotionCode associated with a Coupon that has no Product, right?

tiny copper
#

Yes, in which case it should apply to every product as far as I know.

gleaming socket
#

Gotcha, thanks!