From b95d128e2d8f14fd1aee07d246a5f542a8ecea1a Mon Sep 17 00:00:00 2001
From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com>
Date: Wed, 20 Nov 2024 07:31:34 +0000
Subject: [PATCH] build(codegen): updating SDK
---
changes.md | 2 ++
.../commercetools/api/models/order/Order.java | 9 +++---
.../api/models/order/OrderBuilder.java | 29 ++++++++++++++-----
.../api/models/order/OrderImpl.java | 8 ++---
.../api/models/order_edit/StagedOrder.java | 3 +-
.../models/order_edit/StagedOrderBuilder.java | 29 ++++++++++++++-----
.../models/order_edit/StagedOrderImpl.java | 8 ++---
.../query/order/OrderQueryBuilderDsl.java | 9 +++---
.../StagedOrderQueryBuilderDsl.java | 9 +++---
.../api/models/order/OrderTest.java | 7 +++--
references.txt | 1 +
11 files changed, 72 insertions(+), 42 deletions(-)
diff --git a/changes.md b/changes.md
index 7b038d2ae2d..048f1ace496 100644
--- a/changes.md
+++ b/changes.md
@@ -5,6 +5,8 @@
- :warning: changed property `line` of type `GraphQLErrorLocation` from type `integer` to `number`
- :warning: changed property `column` of type `GraphQLErrorLocation` from type `integer` to `number`
+- :warning: changed property `totalPrice` of type `StagedOrder` from type `TypedMoney` to `CentPrecisionMoney`
+- :warning: changed property `totalPrice` of type `Order` from type `TypedMoney` to `CentPrecisionMoney`
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/Order.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/Order.java
index 345a614b692..cf456944fa7 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/Order.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/Order.java
@@ -29,9 +29,9 @@
import com.commercetools.api.models.cart_discount.CartDiscountReference;
import com.commercetools.api.models.common.Address;
import com.commercetools.api.models.common.BaseResource;
+import com.commercetools.api.models.common.CentPrecisionMoney;
import com.commercetools.api.models.common.CreatedBy;
import com.commercetools.api.models.common.LastModifiedBy;
-import com.commercetools.api.models.common.TypedMoney;
import com.commercetools.api.models.customer_group.CustomerGroupReference;
import com.commercetools.api.models.quote.QuoteReference;
import com.commercetools.api.models.state.StateReference;
@@ -183,7 +183,7 @@ public interface Order extends BaseResource, OrderMixin, com.commercetools.api.m
@NotNull
@Valid
@JsonProperty("totalPrice")
- public TypedMoney getTotalPrice();
+ public CentPrecisionMoney getTotalPrice();
/**
*
@@ -608,7 +608,7 @@ public interface Order extends BaseResource, OrderMixin, com.commercetools.api.m
* @param totalPrice value to be set
*/
- public void setTotalPrice(final TypedMoney totalPrice);
+ public void setTotalPrice(final CentPrecisionMoney totalPrice);
/**
*
@@ -1049,7 +1049,8 @@ public static Order deepCopy(@Nullable final Order template) {
.map(com.commercetools.api.models.cart.CustomLineItem::deepCopy)
.collect(Collectors.toList()))
.orElse(null));
- instance.setTotalPrice(com.commercetools.api.models.common.TypedMoney.deepCopy(template.getTotalPrice()));
+ instance.setTotalPrice(
+ com.commercetools.api.models.common.CentPrecisionMoney.deepCopy(template.getTotalPrice()));
instance.setTaxedPrice(com.commercetools.api.models.cart.TaxedPrice.deepCopy(template.getTaxedPrice()));
instance.setTaxedShippingPrice(
com.commercetools.api.models.cart.TaxedPrice.deepCopy(template.getTaxedShippingPrice()));
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderBuilder.java
index bda6393453c..4084de448bc 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderBuilder.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderBuilder.java
@@ -72,7 +72,7 @@ public class OrderBuilder implements Builder {
private java.util.List customLineItems;
- private com.commercetools.api.models.common.TypedMoney totalPrice;
+ private com.commercetools.api.models.common.CentPrecisionMoney totalPrice;
@Nullable
private com.commercetools.api.models.cart.TaxedPrice taxedPrice;
@@ -566,12 +566,13 @@ public OrderBuilder setCustomLineItems(
/**
* Sum of the totalPrice
field of all LineItems and CustomLineItems, and if available, the price
field of ShippingInfo. If a discount applies on totalPrice
, this field holds the discounted value.
* Taxes are included if TaxRate includedInPrice
is true
for each price.
- * @param totalPrice value to be set
+ * @param builder function to build the totalPrice value
* @return Builder
*/
- public OrderBuilder totalPrice(final com.commercetools.api.models.common.TypedMoney totalPrice) {
- this.totalPrice = totalPrice;
+ public OrderBuilder totalPrice(
+ Function builder) {
+ this.totalPrice = builder.apply(com.commercetools.api.models.common.CentPrecisionMoneyBuilder.of()).build();
return this;
}
@@ -582,9 +583,21 @@ public OrderBuilder totalPrice(final com.commercetools.api.models.common.TypedMo
* @return Builder
*/
- public OrderBuilder totalPrice(
- Function> builder) {
- this.totalPrice = builder.apply(com.commercetools.api.models.common.TypedMoneyBuilder.of()).build();
+ public OrderBuilder withTotalPrice(
+ Function builder) {
+ this.totalPrice = builder.apply(com.commercetools.api.models.common.CentPrecisionMoneyBuilder.of());
+ return this;
+ }
+
+ /**
+ * Sum of the totalPrice
field of all LineItems and CustomLineItems, and if available, the price
field of ShippingInfo. If a discount applies on totalPrice
, this field holds the discounted value.
+ * Taxes are included if TaxRate includedInPrice
is true
for each price.
+ * @param totalPrice value to be set
+ * @return Builder
+ */
+
+ public OrderBuilder totalPrice(final com.commercetools.api.models.common.CentPrecisionMoney totalPrice) {
+ this.totalPrice = totalPrice;
return this;
}
@@ -2045,7 +2058,7 @@ public java.util.List getCusto
* @return totalPrice
*/
- public com.commercetools.api.models.common.TypedMoney getTotalPrice() {
+ public com.commercetools.api.models.common.CentPrecisionMoney getTotalPrice() {
return this.totalPrice;
}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderImpl.java
index 71717c24506..781af8403a2 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderImpl.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderImpl.java
@@ -50,7 +50,7 @@ public class OrderImpl implements Order, ModelBase {
private java.util.List customLineItems;
- private com.commercetools.api.models.common.TypedMoney totalPrice;
+ private com.commercetools.api.models.common.CentPrecisionMoney totalPrice;
private com.commercetools.api.models.cart.TaxedPrice taxedPrice;
@@ -142,7 +142,7 @@ public class OrderImpl implements Order, ModelBase {
@JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store,
@JsonProperty("lineItems") final java.util.List lineItems,
@JsonProperty("customLineItems") final java.util.List customLineItems,
- @JsonProperty("totalPrice") final com.commercetools.api.models.common.TypedMoney totalPrice,
+ @JsonProperty("totalPrice") final com.commercetools.api.models.common.CentPrecisionMoney totalPrice,
@JsonProperty("taxedPrice") final com.commercetools.api.models.cart.TaxedPrice taxedPrice,
@JsonProperty("taxedShippingPrice") final com.commercetools.api.models.cart.TaxedPrice taxedShippingPrice,
@JsonProperty("discountOnTotalPrice") final com.commercetools.api.models.cart.DiscountOnTotalPrice discountOnTotalPrice,
@@ -355,7 +355,7 @@ public java.util.List getCusto
* Taxes are included if TaxRate includedInPrice
is true
for each price.
*/
- public com.commercetools.api.models.common.TypedMoney getTotalPrice() {
+ public com.commercetools.api.models.common.CentPrecisionMoney getTotalPrice() {
return this.totalPrice;
}
@@ -723,7 +723,7 @@ public void setCustomLineItems(
this.customLineItems = customLineItems;
}
- public void setTotalPrice(final com.commercetools.api.models.common.TypedMoney totalPrice) {
+ public void setTotalPrice(final com.commercetools.api.models.common.CentPrecisionMoney totalPrice) {
this.totalPrice = totalPrice;
}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrder.java
index b438b8fc8e6..cacd041fa05 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrder.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrder.java
@@ -147,7 +147,8 @@ public static StagedOrder deepCopy(@Nullable final StagedOrder template) {
.map(com.commercetools.api.models.cart.CustomLineItem::deepCopy)
.collect(Collectors.toList()))
.orElse(null));
- instance.setTotalPrice(com.commercetools.api.models.common.TypedMoney.deepCopy(template.getTotalPrice()));
+ instance.setTotalPrice(
+ com.commercetools.api.models.common.CentPrecisionMoney.deepCopy(template.getTotalPrice()));
instance.setTaxedPrice(com.commercetools.api.models.cart.TaxedPrice.deepCopy(template.getTaxedPrice()));
instance.setTaxedShippingPrice(
com.commercetools.api.models.cart.TaxedPrice.deepCopy(template.getTaxedShippingPrice()));
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderBuilder.java
index 0085a7fe658..6a500d17e52 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderBuilder.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderBuilder.java
@@ -72,7 +72,7 @@ public class StagedOrderBuilder implements Builder {
private java.util.List customLineItems;
- private com.commercetools.api.models.common.TypedMoney totalPrice;
+ private com.commercetools.api.models.common.CentPrecisionMoney totalPrice;
@Nullable
private com.commercetools.api.models.cart.TaxedPrice taxedPrice;
@@ -568,12 +568,13 @@ public StagedOrderBuilder setCustomLineItems(
/**
* Sum of the totalPrice
field of all LineItems and CustomLineItems, and if available, the price
field of ShippingInfo. If a discount applies on totalPrice
, this field holds the discounted value.
* Taxes are included if TaxRate includedInPrice
is true
for each price.
- * @param totalPrice value to be set
+ * @param builder function to build the totalPrice value
* @return Builder
*/
- public StagedOrderBuilder totalPrice(final com.commercetools.api.models.common.TypedMoney totalPrice) {
- this.totalPrice = totalPrice;
+ public StagedOrderBuilder totalPrice(
+ Function builder) {
+ this.totalPrice = builder.apply(com.commercetools.api.models.common.CentPrecisionMoneyBuilder.of()).build();
return this;
}
@@ -584,9 +585,21 @@ public StagedOrderBuilder totalPrice(final com.commercetools.api.models.common.T
* @return Builder
*/
- public StagedOrderBuilder totalPrice(
- Function> builder) {
- this.totalPrice = builder.apply(com.commercetools.api.models.common.TypedMoneyBuilder.of()).build();
+ public StagedOrderBuilder withTotalPrice(
+ Function builder) {
+ this.totalPrice = builder.apply(com.commercetools.api.models.common.CentPrecisionMoneyBuilder.of());
+ return this;
+ }
+
+ /**
+ * Sum of the totalPrice
field of all LineItems and CustomLineItems, and if available, the price
field of ShippingInfo. If a discount applies on totalPrice
, this field holds the discounted value.
+ * Taxes are included if TaxRate includedInPrice
is true
for each price.
+ * @param totalPrice value to be set
+ * @return Builder
+ */
+
+ public StagedOrderBuilder totalPrice(final com.commercetools.api.models.common.CentPrecisionMoney totalPrice) {
+ this.totalPrice = totalPrice;
return this;
}
@@ -2054,7 +2067,7 @@ public java.util.List getCusto
* @return totalPrice
*/
- public com.commercetools.api.models.common.TypedMoney getTotalPrice() {
+ public com.commercetools.api.models.common.CentPrecisionMoney getTotalPrice() {
return this.totalPrice;
}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderImpl.java
index 158dccff396..88e169c8d9e 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderImpl.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderImpl.java
@@ -50,7 +50,7 @@ public class StagedOrderImpl implements StagedOrder, ModelBase {
private java.util.List customLineItems;
- private com.commercetools.api.models.common.TypedMoney totalPrice;
+ private com.commercetools.api.models.common.CentPrecisionMoney totalPrice;
private com.commercetools.api.models.cart.TaxedPrice taxedPrice;
@@ -142,7 +142,7 @@ public class StagedOrderImpl implements StagedOrder, ModelBase {
@JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store,
@JsonProperty("lineItems") final java.util.List lineItems,
@JsonProperty("customLineItems") final java.util.List customLineItems,
- @JsonProperty("totalPrice") final com.commercetools.api.models.common.TypedMoney totalPrice,
+ @JsonProperty("totalPrice") final com.commercetools.api.models.common.CentPrecisionMoney totalPrice,
@JsonProperty("taxedPrice") final com.commercetools.api.models.cart.TaxedPrice taxedPrice,
@JsonProperty("taxedShippingPrice") final com.commercetools.api.models.cart.TaxedPrice taxedShippingPrice,
@JsonProperty("discountOnTotalPrice") final com.commercetools.api.models.cart.DiscountOnTotalPrice discountOnTotalPrice,
@@ -355,7 +355,7 @@ public java.util.List getCusto
* Taxes are included if TaxRate includedInPrice
is true
for each price.
*/
- public com.commercetools.api.models.common.TypedMoney getTotalPrice() {
+ public com.commercetools.api.models.common.CentPrecisionMoney getTotalPrice() {
return this.totalPrice;
}
@@ -723,7 +723,7 @@ public void setCustomLineItems(
this.customLineItems = customLineItems;
}
- public void setTotalPrice(final com.commercetools.api.models.common.TypedMoney totalPrice) {
+ public void setTotalPrice(final com.commercetools.api.models.common.CentPrecisionMoney totalPrice) {
this.totalPrice = totalPrice;
}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order/OrderQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order/OrderQueryBuilderDsl.java
index 16c4671a510..b66277e3c1b 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order/OrderQueryBuilderDsl.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order/OrderQueryBuilderDsl.java
@@ -122,11 +122,10 @@ public CollectionPredicateBuilder customLineItems() {
}
public CombinationQueryPredicate totalPrice(
- Function> fn) {
- return new CombinationQueryPredicate<>(
- ContainerQueryPredicate.of()
- .parent(ConstantQueryPredicate.of().constant("totalPrice"))
- .inner(fn.apply(com.commercetools.api.predicates.query.common.TypedMoneyQueryBuilderDsl.of())),
+ Function> fn) {
+ return new CombinationQueryPredicate<>(ContainerQueryPredicate.of()
+ .parent(ConstantQueryPredicate.of().constant("totalPrice"))
+ .inner(fn.apply(com.commercetools.api.predicates.query.common.CentPrecisionMoneyQueryBuilderDsl.of())),
OrderQueryBuilderDsl::of);
}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderQueryBuilderDsl.java
index d19a62ba814..bce97a27fd1 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderQueryBuilderDsl.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderQueryBuilderDsl.java
@@ -122,11 +122,10 @@ public CollectionPredicateBuilder customLineItems()
}
public CombinationQueryPredicate totalPrice(
- Function> fn) {
- return new CombinationQueryPredicate<>(
- ContainerQueryPredicate.of()
- .parent(ConstantQueryPredicate.of().constant("totalPrice"))
- .inner(fn.apply(com.commercetools.api.predicates.query.common.TypedMoneyQueryBuilderDsl.of())),
+ Function> fn) {
+ return new CombinationQueryPredicate<>(ContainerQueryPredicate.of()
+ .parent(ConstantQueryPredicate.of().constant("totalPrice"))
+ .inner(fn.apply(com.commercetools.api.predicates.query.common.CentPrecisionMoneyQueryBuilderDsl.of())),
StagedOrderQueryBuilderDsl::of);
}
diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order/OrderTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order/OrderTest.java
index 4e8fcc9b194..b9430707ace 100644
--- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order/OrderTest.java
+++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order/OrderTest.java
@@ -44,7 +44,8 @@ public static Object[][] objectBuilder() {
Order.builder()
.customLineItems(Collections
.singletonList(new com.commercetools.api.models.cart.CustomLineItemImpl())) },
- new Object[] { Order.builder().totalPrice(new com.commercetools.api.models.common.TypedMoneyImpl()) },
+ new Object[] {
+ Order.builder().totalPrice(new com.commercetools.api.models.common.CentPrecisionMoneyImpl()) },
new Object[] { Order.builder().taxedPrice(new com.commercetools.api.models.cart.TaxedPriceImpl()) },
new Object[] {
Order.builder().taxedShippingPrice(new com.commercetools.api.models.cart.TaxedPriceImpl()) },
@@ -206,9 +207,9 @@ public void customLineItems() {
@Test
public void totalPrice() {
Order value = Order.of();
- value.setTotalPrice(new com.commercetools.api.models.common.TypedMoneyImpl());
+ value.setTotalPrice(new com.commercetools.api.models.common.CentPrecisionMoneyImpl());
Assertions.assertThat(value.getTotalPrice())
- .isEqualTo(new com.commercetools.api.models.common.TypedMoneyImpl());
+ .isEqualTo(new com.commercetools.api.models.common.CentPrecisionMoneyImpl());
}
@Test
diff --git a/references.txt b/references.txt
index 3f4d07df0d0..f604fcc2844 100644
--- a/references.txt
+++ b/references.txt
@@ -332,3 +332,4 @@ f254d17f05343dcc4299fc53ff9b335b5ef63d69
a639dbb1cfe5b434c350e7b47ca717c69b3aa369
6a8624fb41168a6a78ac836b7208c2790a686608
971c1b4ce06c29fcb8c2402dc2ca523b2907352c
+b747e1fa4f246b748a89bccbfd8a43f5b6f51175