mobify / commercecloud-ocapi-client

Salesforce Commerce Cloud Open Commerce API (OCAPI) for Node and browsers 🛒
MIT License
70 stars 31 forks source link

Fix Refine Parsing for Various Calls #29

Closed bendvc closed 4 years ago

bendvc commented 4 years ago

By default the refine property for various search type calls (searchProducts, searchContent) gets parsed into a CSV (e.g. color=blue,cgid=root). This behaviour worked fine when the client was originally generate even though it didn't follow the described behaviour as per the Salesforce doc's.

There was an attempt to fix this in the following PR#2 but was abandoned in favour of leaving it and not touching the auto generated code, as it was still working.

It seems as tho Salesforce has discontinued this undocumented behaviour (I can only speculate that this is the cause). So this PR re-introduces that functionality provided by the PR linked above.

Note: A community member proposed a fix here.

Type of change

Changes

How to test this PR?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

bendvc commented 4 years ago

Looks like the circle ci status check is broken. Because this is a critical issue for some of our websites, I checked manually that tests are padding on CircleCi and I'm going to merge this pr.