From e6a3be74f74e8102935e25909348e47ff1363aa5 Mon Sep 17 00:00:00 2001
From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com>
Date: Wed, 21 Jan 2026 10:27:40 +0000
Subject: [PATCH] build(codegen): updating SDK
---
changes.md | 3 +
.../main/resources/graphql/schema.graphqls | 14 +++
.../commercetools/api/models/cart/Cart.java | 17 +++
.../api/models/cart/CartBuilder.java | 37 +++++-
.../api/models/cart/CartFreezeCartAction.java | 27 +++-
.../cart/CartFreezeCartActionBuilder.java | 32 ++++-
.../models/cart/CartFreezeCartActionImpl.java | 46 ++++++-
.../api/models/cart/CartImpl.java | 20 +++
.../CartSetCustomShippingMethodAction.java | 1 +
...CartSetCustomShippingMethodActionImpl.java | 1 +
.../cart/CartSetShippingMethodAction.java | 1 +
.../cart/CartSetShippingMethodActionImpl.java | 1 +
.../api/models/cart/CartState.java | 5 +
.../api/models/cart/FreezeStrategy.java | 115 ++++++++++++++++++
.../CartFreezeCartActionQueryBuilderDsl.java | 6 +
.../query/cart/CartQueryBuilderDsl.java | 6 +
.../models/cart/CartFreezeCartActionTest.java | 24 ++++
.../api/models/cart/CartTest.java | 10 ++
references.txt | 1 +
19 files changed, 352 insertions(+), 15 deletions(-)
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/FreezeStrategy.java
diff --git a/changes.md b/changes.md
index d7144499e1e..c055a88c920 100644
--- a/changes.md
+++ b/changes.md
@@ -4,6 +4,7 @@
Added Property(s)
+- added property `freezeStrategy` to type `Cart`
- added property `lock` to type `Cart`
- added property `purchaseOrderNumber` to type `Cart`
- added property `purchaseOrderNumber` to type `CartDraft`
+- added property `strategy` to type `CartFreezeCartAction`
Determines freezing behavior when cartState is Frozen.
Billing address associated with the Cart.
* @return billingAddress @@ -640,6 +648,13 @@ public interface Cart extends BaseResource, CartMixin, com.commercetools.api.mod public void setCartState(final CartState cartState); + /** + *Determines freezing behavior when cartState is Frozen.
Billing address associated with the Cart.
* @param billingAddress value to be set @@ -902,6 +917,7 @@ public static Cart of(final Cart template) { instance.setTaxCalculationMode(template.getTaxCalculationMode()); instance.setInventoryMode(template.getInventoryMode()); instance.setCartState(template.getCartState()); + instance.setFreezeStrategy(template.getFreezeStrategy()); instance.setBillingAddress(template.getBillingAddress()); instance.setShippingAddress(template.getShippingAddress()); instance.setShippingMode(template.getShippingMode()); @@ -978,6 +994,7 @@ public static Cart deepCopy(@Nullable final Cart template) { instance.setTaxCalculationMode(template.getTaxCalculationMode()); instance.setInventoryMode(template.getInventoryMode()); instance.setCartState(template.getCartState()); + instance.setFreezeStrategy(template.getFreezeStrategy()); instance.setBillingAddress(com.commercetools.api.models.common.Address.deepCopy(template.getBillingAddress())); instance.setShippingAddress( com.commercetools.api.models.common.Address.deepCopy(template.getShippingAddress())); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartBuilder.java index ea89fbec313..4b8a1d6e68b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartBuilder.java @@ -102,6 +102,9 @@ public class CartBuilder implements BuilderDetermines freezing behavior when cartState is Frozen.
Billing address associated with the Cart.
* @param builder function to build the billingAddress value @@ -1914,6 +1928,16 @@ public com.commercetools.api.models.cart.CartState getCartState() { return this.cartState; } + /** + *Determines freezing behavior when cartState is Frozen.
Billing address associated with the Cart.
* @return billingAddress @@ -2172,9 +2196,9 @@ public Cart build() { return new CartImpl(id, version, createdAt, lastModifiedAt, key, customerId, customerEmail, customerGroup, anonymousId, businessUnit, store, lineItems, customLineItems, totalLineItemQuantity, totalPrice, taxedPrice, taxedShippingPrice, discountOnTotalPrice, taxMode, priceRoundingMode, taxRoundingMode, taxCalculationMode, - inventoryMode, cartState, billingAddress, shippingAddress, shippingMode, shippingKey, shippingInfo, - shippingRateInput, shippingCustomFields, shipping, itemShippingAddresses, discountCodes, directDiscounts, - refusedGifts, paymentInfo, country, locale, origin, custom, discountTypeCombination, lock, + inventoryMode, cartState, freezeStrategy, billingAddress, shippingAddress, shippingMode, shippingKey, + shippingInfo, shippingRateInput, shippingCustomFields, shipping, itemShippingAddresses, discountCodes, + directDiscounts, refusedGifts, paymentInfo, country, locale, origin, custom, discountTypeCombination, lock, deleteDaysAfterLastModification, purchaseOrderNumber, lastModifiedBy, createdBy); } @@ -2186,9 +2210,9 @@ public Cart buildUnchecked() { return new CartImpl(id, version, createdAt, lastModifiedAt, key, customerId, customerEmail, customerGroup, anonymousId, businessUnit, store, lineItems, customLineItems, totalLineItemQuantity, totalPrice, taxedPrice, taxedShippingPrice, discountOnTotalPrice, taxMode, priceRoundingMode, taxRoundingMode, taxCalculationMode, - inventoryMode, cartState, billingAddress, shippingAddress, shippingMode, shippingKey, shippingInfo, - shippingRateInput, shippingCustomFields, shipping, itemShippingAddresses, discountCodes, directDiscounts, - refusedGifts, paymentInfo, country, locale, origin, custom, discountTypeCombination, lock, + inventoryMode, cartState, freezeStrategy, billingAddress, shippingAddress, shippingMode, shippingKey, + shippingInfo, shippingRateInput, shippingCustomFields, shipping, itemShippingAddresses, discountCodes, + directDiscounts, refusedGifts, paymentInfo, country, locale, origin, custom, discountTypeCombination, lock, deleteDaysAfterLastModification, purchaseOrderNumber, lastModifiedBy, createdBy); } @@ -2231,6 +2255,7 @@ public static CartBuilder of(final Cart template) { builder.taxCalculationMode = template.getTaxCalculationMode(); builder.inventoryMode = template.getInventoryMode(); builder.cartState = template.getCartState(); + builder.freezeStrategy = template.getFreezeStrategy(); builder.billingAddress = template.getBillingAddress(); builder.shippingAddress = template.getShippingAddress(); builder.shippingMode = template.getShippingMode(); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartAction.java index e14fe0715ac..228dfc0b97f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartAction.java @@ -13,8 +13,14 @@ import io.vrap.rmf.base.client.utils.Generated; /** - *Changes the CartState from Active to Frozen. Results in a Frozen Cart. Fails with InvalidOperation error when the Cart is empty.
Freezing a Cart produces the CartFrozen Message.
+ *Freezes the Cart based on the provided FreezeStrategy.
+ *The following behavior occurs:
+ *Active to Frozen.freezeStrategy field.If the Cart is empty, an InvalidOperation error is returned.
* *Strategy that determines the freezing behavior.
+ * @return strategy + */ + + @JsonProperty("strategy") + public FreezeStrategy getStrategy(); + + /** + *Strategy that determines the freezing behavior.
+ * @param strategy value to be set + */ + + public void setStrategy(final FreezeStrategy strategy); + /** * factory method * @return instance of CartFreezeCartAction @@ -50,6 +71,7 @@ public static CartFreezeCartAction of() { */ public static CartFreezeCartAction of(final CartFreezeCartAction template) { CartFreezeCartActionImpl instance = new CartFreezeCartActionImpl(); + instance.setStrategy(template.getStrategy()); return instance; } @@ -66,6 +88,7 @@ public static CartFreezeCartAction deepCopy(@Nullable final CartFreezeCartAction return null; } CartFreezeCartActionImpl instance = new CartFreezeCartActionImpl(); + instance.setStrategy(template.getStrategy()); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartActionBuilder.java index dd24bf829f1..dfb20916e5d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartActionBuilder.java @@ -3,6 +3,8 @@ import java.util.*; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -20,12 +22,37 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CartFreezeCartActionBuilder implements BuilderStrategy that determines the freezing behavior.
+ * @param strategy value to be set + * @return Builder + */ + + public CartFreezeCartActionBuilder strategy( + @Nullable final com.commercetools.api.models.cart.FreezeStrategy strategy) { + this.strategy = strategy; + return this; + } + + /** + *Strategy that determines the freezing behavior.
+ * @return strategy + */ + + @Nullable + public com.commercetools.api.models.cart.FreezeStrategy getStrategy() { + return this.strategy; + } + /** * builds CartFreezeCartAction with checking for non-null required values * @return CartFreezeCartAction */ public CartFreezeCartAction build() { - return new CartFreezeCartActionImpl(); + return new CartFreezeCartActionImpl(strategy); } /** @@ -33,7 +60,7 @@ public CartFreezeCartAction build() { * @return CartFreezeCartAction */ public CartFreezeCartAction buildUnchecked() { - return new CartFreezeCartActionImpl(); + return new CartFreezeCartActionImpl(strategy); } /** @@ -51,6 +78,7 @@ public static CartFreezeCartActionBuilder of() { */ public static CartFreezeCartActionBuilder of(final CartFreezeCartAction template) { CartFreezeCartActionBuilder builder = new CartFreezeCartActionBuilder(); + builder.strategy = template.getStrategy(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartActionImpl.java index 29823be2c9d..6902ee1456d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartActionImpl.java @@ -5,6 +5,7 @@ import java.util.*; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.*; import io.vrap.rmf.base.client.ModelBase; @@ -16,18 +17,35 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *Changes the CartState from Active to Frozen. Results in a Frozen Cart. Fails with InvalidOperation error when the Cart is empty.
Freezing a Cart produces the CartFrozen Message.
+ *Freezes the Cart based on the provided FreezeStrategy.
+ *The following behavior occurs:
+ *Active to Frozen.freezeStrategy field.If the Cart is empty, an InvalidOperation error is returned.
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CartFreezeCartActionImpl implements CartFreezeCartAction, ModelBase { private String action; + private com.commercetools.api.models.cart.FreezeStrategy strategy; + /** * create instance with all properties */ @JsonCreator + CartFreezeCartActionImpl( + @JsonProperty("strategy") final com.commercetools.api.models.cart.FreezeStrategy strategy) { + this.strategy = strategy; + this.action = FREEZE_CART; + } + + /** + * create empty instance + */ public CartFreezeCartActionImpl() { this.action = FREEZE_CART; } @@ -40,6 +58,18 @@ public String getAction() { return this.action; } + /** + *Strategy that determines the freezing behavior.
+ */ + + public com.commercetools.api.models.cart.FreezeStrategy getStrategy() { + return this.strategy; + } + + public void setStrategy(final com.commercetools.api.models.cart.FreezeStrategy strategy) { + this.strategy = strategy; + } + @Override public boolean equals(Object o) { if (this == o) @@ -50,17 +80,23 @@ public boolean equals(Object o) { CartFreezeCartActionImpl that = (CartFreezeCartActionImpl) o; - return new EqualsBuilder().append(action, that.action).append(action, that.action).isEquals(); + return new EqualsBuilder().append(action, that.action) + .append(strategy, that.strategy) + .append(action, that.action) + .append(strategy, that.strategy) + .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(action).toHashCode(); + return new HashCodeBuilder(17, 37).append(action).append(strategy).toHashCode(); } @Override public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action).build(); + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("strategy", strategy) + .build(); } @Override diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartImpl.java index dea392ecfba..4e0da3cc227 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartImpl.java @@ -70,6 +70,8 @@ public class CartImpl implements Cart, ModelBase { private com.commercetools.api.models.cart.CartState cartState; + private com.commercetools.api.models.cart.FreezeStrategy freezeStrategy; + private com.commercetools.api.models.common.Address billingAddress; private com.commercetools.api.models.common.Address shippingAddress; @@ -142,6 +144,7 @@ public class CartImpl implements Cart, ModelBase { @JsonProperty("taxCalculationMode") final com.commercetools.api.models.cart.TaxCalculationMode taxCalculationMode, @JsonProperty("inventoryMode") final com.commercetools.api.models.cart.InventoryMode inventoryMode, @JsonProperty("cartState") final com.commercetools.api.models.cart.CartState cartState, + @JsonProperty("freezeStrategy") final com.commercetools.api.models.cart.FreezeStrategy freezeStrategy, @JsonProperty("billingAddress") final com.commercetools.api.models.common.Address billingAddress, @JsonProperty("shippingAddress") final com.commercetools.api.models.common.Address shippingAddress, @JsonProperty("shippingMode") final com.commercetools.api.models.cart.ShippingMode shippingMode, @@ -188,6 +191,7 @@ public class CartImpl implements Cart, ModelBase { this.taxCalculationMode = taxCalculationMode; this.inventoryMode = inventoryMode; this.cartState = cartState; + this.freezeStrategy = freezeStrategy; this.billingAddress = billingAddress; this.shippingAddress = shippingAddress; this.shippingMode = shippingMode; @@ -417,6 +421,14 @@ public com.commercetools.api.models.cart.CartState getCartState() { return this.cartState; } + /** + *Determines freezing behavior when cartState is Frozen.
Billing address associated with the Cart.
*/ @@ -716,6 +728,10 @@ public void setCartState(final com.commercetools.api.models.cart.CartState cartS this.cartState = cartState; } + public void setFreezeStrategy(final com.commercetools.api.models.cart.FreezeStrategy freezeStrategy) { + this.freezeStrategy = freezeStrategy; + } + public void setBillingAddress(final com.commercetools.api.models.common.Address billingAddress) { this.billingAddress = billingAddress; } @@ -868,6 +884,7 @@ public boolean equals(Object o) { .append(taxCalculationMode, that.taxCalculationMode) .append(inventoryMode, that.inventoryMode) .append(cartState, that.cartState) + .append(freezeStrategy, that.freezeStrategy) .append(billingAddress, that.billingAddress) .append(shippingAddress, that.shippingAddress) .append(shippingMode, that.shippingMode) @@ -915,6 +932,7 @@ public boolean equals(Object o) { .append(taxCalculationMode, that.taxCalculationMode) .append(inventoryMode, that.inventoryMode) .append(cartState, that.cartState) + .append(freezeStrategy, that.freezeStrategy) .append(billingAddress, that.billingAddress) .append(shippingAddress, that.shippingAddress) .append(shippingMode, that.shippingMode) @@ -967,6 +985,7 @@ public int hashCode() { .append(taxCalculationMode) .append(inventoryMode) .append(cartState) + .append(freezeStrategy) .append(billingAddress) .append(shippingAddress) .append(shippingMode) @@ -1019,6 +1038,7 @@ public String toString() { .append("taxCalculationMode", taxCalculationMode) .append("inventoryMode", inventoryMode) .append("cartState", cartState) + .append("freezeStrategy", freezeStrategy) .append("billingAddress", billingAddress) .append("shippingAddress", shippingAddress) .append("shippingMode", shippingMode) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomShippingMethodAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomShippingMethodAction.java index 0d37250e6b1..57ab871edb1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomShippingMethodAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomShippingMethodAction.java @@ -21,6 +21,7 @@ /** *To set the Cart's custom Shipping Method (independent of the ShippingMethods managed through the Shipping Methods API) the Cart must have the Single ShippingMode and a shippingAddress.
To unset a custom Shipping Method on a Cart, use the Set ShippingMethod update action without the shippingMethod field instead.
This update is not allowed when the Cart is frozen with the HardFreeze FreezeStrategy.
To set the Cart's custom Shipping Method (independent of the ShippingMethods managed through the Shipping Methods API) the Cart must have the Single ShippingMode and a shippingAddress.
To unset a custom Shipping Method on a Cart, use the Set ShippingMethod update action without the shippingMethod field instead.
This update is not allowed when the Cart is frozen with the HardFreeze FreezeStrategy.
To set the Cart's Shipping Method the Cart must have the Single ShippingMode and a shippingAddress.
This update is not allowed when the Cart is frozen with the HardFreeze FreezeStrategy.
To set the Cart's Shipping Method the Cart must have the Single ShippingMode and a shippingAddress.
This update is not allowed when the Cart is frozen with the HardFreeze FreezeStrategy.
Additionally, when using the HardFreeze FreezeStrategy, the following update actions are also not allowed:
Indicates how a Cart freeze behaves. For detailed behavior on each of these strategies, see Freeze a Cart.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface FreezeStrategy extends JsonEnum { + + /** +More lenient Cart freeze strategy that locks prices as they were when the Cart was frozen. This is the default strategy when not explicitly specified, ensuring backwards compatibility.
*/ + FreezeStrategy SOFT_FREEZE = FreezeStrategyEnum.SOFT_FREEZE; + /** +Stricter Cart freeze strategy that, in addition to the SoftFreeze behavior, also freezes Cart Discounts, Discount Codes, and Shipping Methods, ensuring the final price remains unchanged.