Replies: 1 comment
|
Hello @matks, Thanks for reaching out! The models used in the Server SDKs are generated based on the API specifications defined by the API teams to ensure compatibility and identical behavior between the API requests/response and the SDK requests/response. In this case, the specification for the I understand that it seems unlikely or impossible to have a valid response with all or some of these fields optional, and that the checks required to ensure values are cumbersome, but there are usually circumstances where this kind of response is possible. Still, we can look at ways of improving the integration pattern here in the future. Thanks for the feedback! |
Uh oh!
There was an error while loading. Please reload this page.
Hello, with the team of PrestaShop Checkout we are using the PayPal TS Server SDK ✋
We have noticed Response DTOs with properties all optional (= nullable), for example the Order DTO: https://github.com/paypal/PayPal-TypeScript-Server-SDK/blob/main/src/models/order.ts#L22
Could you tell us the reason for these properties to be all optional? Because when we use PayPal API it seems all of these properties are set, and I don't see how it could be a valid response without them
All reactions