Hey! I'm currently working on a project that requires using more of the Stripe API than Cashier currently has to offer, in this case; creating and updating products and prices in Stripe.
Connecting to and using the API is fairly easy, but I'm not quite sure how I should structure the files accoring to the Laravel conventions.
Right now I have all of the code placed in a "App\Models\Stripe" folder, with a "Stripe" parent model that opens the API-connection and the Product and Price models that extends the "Stripe" model to access the API client.
I am able to create and update the products and prices in Stripe, but this is where I start getting confused.
Cause I would also like to have all of these products and prices stored in the database connected to the Laravel project and syncronized when any changes are made.
Do I create seperate models for interacting with Eloquent for the products and prices and call these within the Stripe models after successfully storing and/or updating something? (I feel this is the wrong way to do it)
Or is there some cleaner or more elegant way to achieve this that I have missed or not learned about yet?
Would appreciate any input, tips and/or links on how to best solve this.