#RubyDev-prices
1 messages · Page 1 of 1 (latest)
yes you get all Prices and Products together when you list one of them, and you can pass a plan ID to the Price retrieve API and vice versa
it all just works together seamlessly
i.e if you list Prices, you get Price objects proice_xxxx , and also Plan objects plan_xxxx , but they are rendered as Prices in the API response so you can work with them all exactly the same way.
Okay let me check
when I update this price metadata
price_1KPkpGGABbZHUFxpsSzdWzcy
to price
why plan metadata got changed to price from plan
plan_L5xSftrMzHn08r
?
not sure what is hapening
Do this plan and price are related in any way?
plan_L5xSftrMzHn08r
price_1KPkpGGABbZHUFxpsSzdWzcy
@olive herald please help
I saw plan and price are related
but why did when I update price metadata plan metadata got changed?
@chrome arch please give me a moment and I'll look at this
sure please
I do see that those objects changed at almost the same time, but I'm seeing two separate update requests that made those changes. Based on what I'm seeing it looks like your Ruby code updated each object separately.
not sure but I just updated price
so I updated only price
price_1KPkpGGABbZHUFxpsSzdWzcy
Do you have the request ID (req_XXX) from where you updated that price?
Okay wait a minute please
req_IlNeaL1iTzDvYJ
this is the request where plan metadata get updated to value 'price'
though I updated price metadata
That request also happened nearly a day after you changed the metadata on the price object, which supports that these changes weren't linked together (at least not on our end). That request seems to have come from your Ruby code.
Sure
evt_1KS1CZGABbZHUFxpCkm9tC6R
evt_1KS1CZGABbZHUFxpdrNzD1zH
both events happened at the same time when I updated Stripe::Plan
it means if I update the plan price also get updated
Note: I only called Stripe::plan.update
But if you look at the ID of the object in those events, you can see that they're both for the same object.
hmm but I updated this using plan_ id
I mean plan_id
Okay now I get it
why when I pull list of plan I'm getting id as price_
#<Stripe::Plan:0x3fc9a9acf820 id=price_1JWfpYGABbZHUFxpeMEh3qxz> JSON: {
"id": "price_1JWfpYGABbZHUFxpeMEh3qxz",
"object": "plan",
look at this
it is plan but id is price_
Sorry, I thought it'd already been mentioned in this thread, Prices and Plans are basically interchangeable. Prices are the new version of Plans.
when I call Stripe::Plan.list does it also fetch price?
cause I'm getting these ids ["plan_K9xQRLisVERbfY", "price_1JVd9TGABbZHUFxpLI22Zgfx", "price_1JVd9SGABbZHUFxpzavzoPeM", "price_1JVd9RGABbZHUFxpC814tVbt", "price_1JVd9PGABbZHUFxppmNraAJc", "price_1JVd9OGABbZHUFxprah28qJJ", "price_1JVd9MGABbZHUFxpNm0yXt0J", "price_1JVd9KGABbZHUFxpZlltQ35G", "price_1JVd9JGABbZHUFxpL6omTHXK", "price_1JVd9IGABbZHUFxphPQZvFO5"]
mix with plan_ and price_
Yes it does.
ahh can I only get plan and price by passing old API version?
before call
cause earlier it was like that
both were seperate
Hm, possibly, but I'm not seeing mention of such a change in the API changelog so I'm not sure if it's controlled by the API version or the client library version.