I'm using Laravel Resources to transform both my own API responses and the responses I receive from a third party as described in this article.
I also have some of my models I would like to transform into JSON to post to the third party API. For all practical purposes, the API resources could be used for exactly that purpose, but is it recommended and are there many pitfalls of doing this?
Mostly I'm having trouble with how I would differentiate between API resources which are for transforming models coming from the API and ones that are transforming models being passed as a POST request.
e.g.
OrderResource: transforms my orders into my desired API response
MagentoOrderResource: transforms the API responses I receive into my own models
????: transforms my own models into JSON that I would like to use to POST to the third party API.