Skip to content

Commit 55689ba

Browse files
Merge pull request #651 from commercetools/gen-sdk-updates
Update generated SDKs
2 parents 61bf886 + 187ecee commit 55689ba

File tree

8 files changed

+34
-14
lines changed

8 files changed

+34
-14
lines changed

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCartTotalTaxAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import io.vrap.rmf.base.client.utils.Generated;
1818

1919
/**
20-
* <p>This update action results in the <code>taxedPrice</code> field being added to the Cart when the <code>ExternalAmount</code> TaxMode is used.</p>
20+
* <p>Can be used if the Cart has the <code>ExternalAmount</code> TaxMode. This update action adds the <code>taxedPrice</code> field to the Cart and must be used after any price-affecting change occurs within the Cart.</p>
2121
*
2222
* <hr>
2323
* Example to create an instance using the builder pattern

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCartTotalTaxActionImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import org.apache.commons.lang3.builder.ToStringStyle;
1818

1919
/**
20-
* <p>This update action results in the <code>taxedPrice</code> field being added to the Cart when the <code>ExternalAmount</code> TaxMode is used.</p>
20+
* <p>Can be used if the Cart has the <code>ExternalAmount</code> TaxMode. This update action adds the <code>taxedPrice</code> field to the Cart and must be used after any price-affecting change occurs within the Cart.</p>
2121
*/
2222
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2323
public class CartSetCartTotalTaxActionImpl implements CartSetCartTotalTaxAction, ModelBase {

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemTaxAmountAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import io.vrap.rmf.base.client.utils.Generated;
1515

1616
/**
17-
* <p>Can be used if the Cart has the <code>ExternalAmount</code> TaxMode.</p>
17+
* <p>Can be used if the Cart has the <code>ExternalAmount</code> TaxMode. This update action sets the <code>taxedPrice</code> and <code>taxRate</code> on a Line Item and must be used after any price-affecting change occurs.</p>
1818
*
1919
* <hr>
2020
* Example to create an instance using the builder pattern

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemTaxAmountActionImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import org.apache.commons.lang3.builder.ToStringStyle;
1818

1919
/**
20-
* <p>Can be used if the Cart has the <code>ExternalAmount</code> TaxMode.</p>
20+
* <p>Can be used if the Cart has the <code>ExternalAmount</code> TaxMode. This update action sets the <code>taxedPrice</code> and <code>taxRate</code> on a Line Item and must be used after any price-affecting change occurs.</p>
2121
*/
2222
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2323
public class CartSetLineItemTaxAmountActionImpl implements CartSetLineItemTaxAmountAction, ModelBase {

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxMode.java

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,39 @@
1717
public interface TaxMode extends JsonEnum {
1818

1919
/**
20-
<p>Tax Rates are selected automatically from the TaxCategories based on the Cart <code>shippingAddress</code>. This is the default tax mode for a new Cart.</p>
21-
<p><code>totalNet</code>, <code>totalGross</code>, and <code>taxPortions</code> fields are calculated based on the <code>taxRoundingMode</code>.</p> */
20+
<ul>
21+
<li><p>Tax Rates are selected automatically from the TaxCategories based on the Cart <code>shippingAddress</code>. This is the default tax mode for a new Cart.</p></li>
22+
<li><p>The <code>totalNet</code>, <code>totalGross</code>, and <code>taxPortions</code> fields are calculated based on the <code>taxRoundingMode</code>.</p></li>
23+
</ul> */
2224
TaxMode PLATFORM = TaxModeEnum.PLATFORM;
2325
/**
24-
<p>Tax Rates are set externally per ExternalTaxRateDraft. A Cart can be ordered only if all Line Items, Custom Line Items, and the Shipping Method have an external Tax Rate set.</p>
25-
<p><code>totalNet</code>, <code>totalGross</code>, and <code>taxPortions</code> fields are calculated based on the <code>taxRoundingMode</code>.</p> */
26+
<ul>
27+
<li><p>Tax Rates are set externally with ExternalTaxRateDraft. A Cart can be ordered only if all Line Items, Custom Line Items, and the Shipping Method have an external Tax Rate set.</p></li>
28+
<li><p>The <code>totalNet</code>, <code>totalGross</code>, and <code>taxPortions</code> fields are calculated based on the <code>taxRoundingMode</code>.</p></li>
29+
</ul> */
2630
TaxMode EXTERNAL = TaxModeEnum.EXTERNAL;
2731
/**
28-
<p>Tax amounts, Tax Rates, and tax portions are set externally per ExternalTaxAmountDraft. A Cart can be ordered only if the Cart and all Line Items, Custom Line Items, and the Shipping Method have an external tax amount and rate set.</p>
29-
<p>Price-specific update actions on Carts require external recalculation of the total gross price. Hence, the <code>externalTaxAmount</code> is removed in these cases and must be reset with Set LineItem TaxAmount, Set CustomLineItem TaxAmount, or Set ShippingMethod TaxAmount update actions. Also the Cart <code>taxedPrice</code> field must be explicitly set via Set Cart Total Tax. Since the API currently does not offer an update action for setting the <code>taxedShippingPrice</code> field of a Cart with <code>ExternalAmount</code> tax mode, it will always be empty.</p> */
32+
<ul>
33+
<li><p>Tax amounts, Tax Rates, and tax portions are set externally with ExternalTaxAmountDraft. A Cart can be ordered only if the Cart and all Line Items, Custom Line Items, and the Shipping Method have an external tax amount and rate set.</p></li>
34+
<li><p>The Cart <code>taxedPrice</code> field must be set using Set Cart Total Tax. The Cart <code>taxedShippingPrice</code> field is always empty in this tax mode.</p></li>
35+
<li><p>Price-affecting update actions on Carts require external recalculation of the total gross price. In these cases, <code>taxedPrice</code> and <code>taxRate</code> are removed and must be set again. The order in which the individual update actions are issued is important:</p>
36+
<ol>
37+
<li><p>Issue the price-affecting update action(s).</p></li>
38+
<li><p>Update the tax amounts using Set LineItem TaxAmount, Set CustomLineItem TaxAmount, or Set ShippingMethod TaxAmount.</p>
39+
<ul>
40+
<li><p>If the update action changes the Line Item price, for Line Items with <code>Platform</code> LineItemPriceMode, you must issue Set LineItem TaxAmount in a <em>separate</em> request.</p></li>
41+
<li><p>If the update action removes the externally set tax amount for the Shipping Method, you must issue Set ShippingMethod TaxAmount in a <em>separate</em> request.</p></li>
42+
</ul></li>
43+
<li><p>Update the <code>taxedPrice</code> on Cart using Set Cart Total Tax.</p></li>
44+
</ol></li>
45+
<li><p>Tax-inclusive pricing should be avoided when using TaxMode <code>ExternalAmount</code> because <code>taxedItemPrice.totalNet</code> is automatically set by the platform to the Line Item's <code>totalPrice</code>.</p></li>
46+
</ul> */
3047
TaxMode EXTERNAL_AMOUNT = TaxModeEnum.EXTERNAL_AMOUNT;
3148
/**
32-
<p>No taxes are added to the Cart.</p>
33-
<p>Note that this tax mode cannot be set on the My Carts API.</p> */
49+
<ul>
50+
<li>No taxes are added to the Cart.</li>
51+
<li>This tax mode cannot be set on the My Carts API.</li>
52+
</ul> */
3453
TaxMode DISABLED = TaxModeEnum.DISABLED;
3554

3655
/**

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderSetLineItemTaxAmountAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import io.vrap.rmf.base.client.utils.Generated;
1717

1818
/**
19-
* <p>Can be used if the Cart has the <code>ExternalAmount</code> TaxMode.</p>
19+
* <p>Can be used if the Cart has the <code>ExternalAmount</code> TaxMode. This update action sets the <code>taxedPrice</code> and <code>taxRate</code> on a Line Item and must be used after any price-affecting change occurs.</p>
2020
*
2121
* <hr>
2222
* Example to create an instance using the builder pattern

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderSetLineItemTaxAmountActionImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import org.apache.commons.lang3.builder.ToStringStyle;
1818

1919
/**
20-
* <p>Can be used if the Cart has the <code>ExternalAmount</code> TaxMode.</p>
20+
* <p>Can be used if the Cart has the <code>ExternalAmount</code> TaxMode. This update action sets the <code>taxedPrice</code> and <code>taxRate</code> on a Line Item and must be used after any price-affecting change occurs.</p>
2121
*/
2222
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2323
public class StagedOrderSetLineItemTaxAmountActionImpl implements StagedOrderSetLineItemTaxAmountAction, ModelBase {

references.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,4 @@ cdb527e0fe5524d6c7411066fca556e1b3403003
238238
f1d13dc3acf6960cda08494da701d04a46f9eb3f
239239
eac13cfcb88a83f4f4e977ba51c0b11e458cff61
240240
6abab3f555aab9f5aa5b8a1b551235188fbb9201
241+
1b650bc8eb1a78c3487484900b1e36d06226c6e2

0 commit comments

Comments
 (0)