ebay-api
ebay-api copied to clipboard
Defining multiple filters in a call to getTransactions (Finances API)
Describe the bug If I want to call 'getTransactions' from the Finances API I can't specify multiple filters. An example from the eBay docs: (https://developer.ebay.com/api-docs/sell/finances/resources/transaction/methods/getTransactions)
transactionId: the unique identifier of a monetary transaction. For a sales order, the orderId filter should be used instead. Only the monetary transaction defined by the identifier is returned.
Note: This filter cannot be used alone; the transactionType must also be specified when filtering by transaction ID.
Below is the proper syntax to use if filtering by a specific transaction ID:
https://apiz.ebay.com/sell/finances/v1/transaction?filter=transactionId:{0*-0***0-3***3}&filter=transactionType:{SALE}
Code
ebayClient.sell.finances.sign.getTransactions({
filter: "transactionType:{SALE}"
// transactionId... ??? how do I include this?
})
Would you like to work on this issue?
- [ ] Yes
- [ ] No
- [x] Maybe
I'll work on it. But for now you can use this Workaround:
const = new new eBayApi({
// ...
axiosConfig: { paramsSerializer: {indexes: null}} // remove the [] from params
})
ebayClient.sell.finances.sign.getTransactions({
filter: ["transactionType:{SALE}"] // try array here and ignore the TS error
// transactionId... ??? how do I include this?
})
``