#oboxodo

1 messages · Page 1 of 1 (latest)

remote baneBOT
opal seal
#

Hi there

#

No plans that I'm aware of to support this but you can expand a Product if you have the Price

#

Can you tell me more about your use-case here?

astral charm
#

it's a bit complex to explain but the gist of it is that we have a script that allows us to restore a DB backup from another developer or from any other environment, then we run this script and it will "sync" the dev's stripe environment to the products and prices existing in our DB. The script tries to match the products and prices existing in the DB with the ones existing in Stripe then either updates the DB records to point to the corresponding Stripe objects ids or creates any missing Stripe objects and assigns them to the corresponding DB record.

#

lookup_keys are awesome for that.

#

but the script currently depends on known predefined stripe ids for products and other types of objects and we'd like to update our script so that it lets Stripe autogenerate all ids, as recommended by docs.

#

we have a similar situation when seeding a DB. We have some seed data for what products and prices we expect should exist .

opal seal
#

Okay then I think going the Prices --> Products route should work fine, right?

#

You can use lookup_key still and then retrieve the Price and expand the Product

astral charm
#

🤔 I see... we'll investigate that route. It might require us to do a bunch of refactoring but I guess it could work.

#

Thanks.