Skip to content

Product Wrapper: response consistency / create & update methods #13

Open
drewwestphal wants to merge 1 commit intofetchapp:masterfrom
drewwestphal:master
Open

Product Wrapper: response consistency / create & update methods #13
drewwestphal wants to merge 1 commit intofetchapp:masterfrom
drewwestphal:master

Conversation

@drewwestphal
Copy link

Product XML response nodes were being inconsistently cast to their corresponding PHP types. The product create and product update methods took different parameters: create took a files array, update took a urls array.

This commit makes the following changes to address:

  • Feed all product XML responses through a single static method to populate products (I believe this would be a fruitful path for the rest of the API Wrapper as well)
  • Patch the create and update methods to take a $files and a $urls parameter (or no parameter), to ensure consistency and allow setting URLs with a single post call (my use case)

…hrough a single static method to ensure correctness and serializability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant