pajaydev / ebay-node-api

eBay API Client for node
https://pajaydev.github.io/ebay-node-api
MIT License
132 stars 76 forks source link

Group filter parameters #147

Closed EarthlingDavey closed 3 years ago

EarthlingDavey commented 3 years ago

This fixes an API error caused by any other parameter in between filter parameters.

Reference: https://forums.developer.ebay.com/questions/14689/error-value-is-required-for-item-filter-listing-ty.html

Error: Value is required for item filter

You're putting sortOrder in between two itemFilter parameters. Put the item filters together, in order. Move sortOrder to a different position.

Goal of the pull request:

Description

A minor change to how constructAdditionalParams concatenates parameters. It keeps the filter parameters grouped in-case the filter properties of the options object is un-grouped.