Closed kievins closed 7 years ago
👍 Can you add a test? I'll merge this after that. Thanks.
I tried coding the tests for this param type, but I ran into issues with how JSON params are coded and validated in general. The way the data array with JSON is structured makes it impossible to assertEqual because the validation intentionally converts this:
[products] => Array ( [json] => [1,2,3] )
to this:
Array ( [products] => [1,2,3] )
The later being the required format for Etsy API. Can you comment on why the JSON params are structured the way they are?
Hey, I modified the validation function as well as created tests.
Etsy API method "updateInventory" requires params to be passed with type "stringJSON". This commit ads support for this param type in etsy-php RequestValidator. Previously trying to PUT product inventory like described here resulted in validation error.