This Pull Request introduces the following changes:
New Command that can query the Lemon Squeezy API for products and variants;
Command can list all products and their variants or an argument can also be passed to query the variants of a specific product;
Note: The products query can only show 100 products since I am doing only 1 request to the endpoint using a page size of 100 (maximum), can be changed to do a recursive request to show 100, I just was thinking if It makes sense to show so many products or a message with a link to the Lemon Squeezy Dashboard.
I think at some point we should introduce a class to query products and variants as it would be nice to make that affordance available for users to query the products and variants from Lemon Squeezy, maybe even import them to a table somehow idk...
There is an decision that I made after reading the Lemon Squeezy API Docs, on the product variants I only render the pending variants if the count of variants in a products is 1.
Note: If a variant has a pending status and its product has no other variants, it is considered the “default” variant and is not shown as a separate option at checkout.
This Pull Request introduces the following changes:
Note: The products query can only show 100 products since I am doing only 1 request to the endpoint using a page size of 100 (maximum), can be changed to do a recursive request to show 100, I just was thinking if It makes sense to show so many products or a message with a link to the Lemon Squeezy Dashboard.
I think at some point we should introduce a class to query products and variants as it would be nice to make that affordance available for users to query the products and variants from Lemon Squeezy, maybe even import them to a table somehow idk...
There is an decision that I made after reading the Lemon Squeezy API Docs, on the product variants I only render the pending variants if the count of variants in a products is 1.
From LemonSqueezy API Docs (https://docs.lemonsqueezy.com/api/variants):
Closes #12