commercetools / commercetools-sdk-java-v2

The e-commerce SDK from commercetools for Java.
https://commercetools.github.io/commercetools-sdk-java-v2/javadoc/index.html
Apache License 2.0
34 stars 15 forks source link

direct_discount can not deserialization when query cart list after approval quote request #429

Closed redxiiikk closed 1 year ago

redxiiikk commented 1 year ago

Describe the bug

direct_discount can not deserialization when query cart by sdk

To Reproduce

  1. create a cart and add line item
  2. create quote request from cart
  3. approval quote request and give a discount (this step was by Merchant Center web interface)
  4. query cart list by SDK and get error of deserialization

Screenshots/Code snippet

Exception message and stack: image

import message:

response of postman query cart list: image

Stack information (please complete the following information):

jenschude commented 1 year ago

With the introduction of the direct discounts to the API a change in the documentation for the DiscountedLineItemPortion had been missed.

We will have to fix it in the documentation so that it will be taken by the code generator to update the SDK.

jenschude commented 1 year ago

Just released 14.0.0 of the SDK which adds the DirectDiscountReference and should correctly deserialize the cart now.