Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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