njosefbeck / gatsby-source-stripe

Gatsby source plugin for building websites using Stripe as a data source
74 stars 17 forks source link

Pulling product details #58

Closed keeko20 closed 4 years ago

keeko20 commented 4 years ago

Hi,

Not entirely sure if this is an issue but I'm not getting the whole product details especially price and it's api_id, i believed this api_id was sku before.

It's pulling the product name, images etc. but no price and api_id

gatsby config used

{ resolve: gatsby-source-stripe, options: { objects: [ "Balance", "BalanceTransaction", "Product", "ApplicationFee", "Sku", "Subscription", ], secretKey: "my_secret_key", downloadFiles: true, }, },

Thanks

njosefbeck commented 4 years ago

Hello!

So it doesn't look like the Product resource object has any price-related data, as shown in the Stripe API docs: https://stripe.com/docs/api/products/object.

If you want to get back a list of prices associated with your Stripe account, you can add 'Price' to your objects array in the plugin's config. After this weekend you'll be able to get the full product object automatically off of that, once I merge in the outstanding PR that expands that object for you.

Let me know if you have any questions!

keeko20 commented 4 years ago

Hello!

So it doesn't look like the Product resource object has any price-related data, as shown in the Stripe API docs: https://stripe.com/docs/api/products/object.

If you want to get back a list of prices associated with your Stripe account, you can add 'Price' to your objects array in the plugin's config. After this weekend you'll be able to get the full product object automatically off of that, once I merge in the outstanding PR that expands that object for you.

Let me know if you have any questions!

Cool cool, Thank you!

njosefbeck commented 4 years ago

This is now published on npm! Let me know if you run into any issues; closing for now!