#Orph-coupons-expand

1 messages ยท Page 1 of 1 (latest)

spark helm
#

Hello ๐Ÿ‘‹
Give me a moment to catch up here and I'll respond as soon as I can ๐Ÿ™‚ Thanks

wise pond
#

Ok cool, just when you have a moment.

spark helm
#

so you want to expand the properties in product hashes?

#

not sure if I grasp the question correctly

wise pond
#

Yes

spark helm
#

Gotcha. You can expand up to four levels (I'm not super sure about the syntax though)
i.e. data.applies_to.default_price or something similar

wise pond
#

...ohh those are product id's, not hashes on Coupon.applies_to.products

spark helm
#

can you share the object here?
I don't remember the response object off the top of my head ๐Ÿ™‚

wise pond
#

...although thinking on it, the IDs don't change once they're created for a given product, coupon, etc, do they?

spark helm
#

Nope, they don't.

wise pond
#

Oh, that makes it pretty easy then. Can just store the IDs for those two products then as env variables.

#

They're just products we use as monthly/yearly premium subscriptions so it makes sense here

spark helm
#

Can't confirm or deny as not sure about the usecase ๐Ÿ˜„ but yes those IDs don't change

wise pond
#

This was useful in any case, so thank you.