-
Notifications
You must be signed in to change notification settings - Fork 34
Description
The output of download orders contains all necessary information for debugging:
{
orderData,
orderId,
technicalCode,
technicalCodeSymbol,
technicalCodeShortText,
technicalCodeMeaning,
businessCode,
businessCodeSymbol,
businessCodeShortText,
businessCodeMeaning,
}
For upload orders, there is however only very limited output, which doesn't allow the user to even see whether the call succeeded:
[transactionId, orderId]
Therefore I'd like to propose changing the return value of Client.upload to the object below. For backwards compability I would even propose keys '0', '1' and the iterator; this should then not even require any code changes for current users of the library:
{
transactionId,
orderId,
technicalCode,
technicalCodeSymbol,
technicalCodeShortText,
technicalCodeMeaning,
businessCode,
businessCodeSymbol,
businessCodeShortText,
businessCodeMeaning,
// for backwards compatibility with the earlier return value [transactionId, orderId]:
'0': transactionId,
'1': orderId,
[Symbol.iterator]: function*() {
yield transactionId
yield orderId
},
}
I'll create a PR for these changes but I am of course open to discuss :-)
Metadata
Metadata
Assignees
Labels
No labels