ebay-api
ebay-api copied to clipboard
How to SetNotificationPreferences multiples
- [x] Are you running the latest version?
- [x] Have you checked if you are using correct configuration?
Describe the bug How to subscribe to multiple notifications in one call? The object key is "UserDeliveryPreferenceArray" but it contains an object.
Code
const notifs = await thisInstance.trading.SetNotificationPreferences({
UserDeliveryPreferenceArray: {
// https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/types/NotificationEventTypeCodeType.html
NotificationEnable: {
EventType: 'ItemListed',
EventEnable: 'Enable',
},
//NotificationEnable: {
// EventType: 'ItemSold',
// EventEnable: 'Enable',
//},
// ItemMarkedPaid ItemMarkedShipped ItemRevised ItemSold
},
});
Would you like to work on this issue?
- [ ] Yes
- [x] No
- [ ] Maybe
Good question. I'll work on that.
I have release 9.1.0
This is how it should work:
eBay.trading.SetNotificationPreferences({
UserDeliveryPreferenceArray: [{
NotificationEnable: {
EventType: 'ItemListed',
EventEnable: 'Enable',
}
}, {
NotificationEnable: {
EventType: 'ItemSold',
EventEnable: 'Enable',
},
}],
}, { xmlBuilderOptions: { oneListGroup: true }})