From 6ba69b5e38b5bea548ea4ad223cc45ec124c193d Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 08:47:41 +0000 Subject: [PATCH] build(codegen): updating SDK --- changes.md | 7 +++ .../api/models/cart/TaxedPriceDraft.java | 18 ++++++++ .../models/cart/TaxedPriceDraftBuilder.java | 44 ++++++++++++++++++- .../api/models/cart/TaxedPriceDraftImpl.java | 27 +++++++++++- .../cart/TaxedPriceDraftQueryBuilderDsl.java | 9 ++++ .../api/models/cart/TaxedPriceDraftTest.java | 15 ++++++- references.txt | 1 + 7 files changed, 115 insertions(+), 6 deletions(-) diff --git a/changes.md b/changes.md index 6a05cd0eb59..a939cf9750e 100644 --- a/changes.md +++ b/changes.md @@ -14,6 +14,13 @@ +
+Added Property(s) + +- added property `totalTax` to type `TaxedPriceDraft` +
+ +
Required Property(s) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraft.java index 9d2eb81fcfe..d7423662ace 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraft.java @@ -11,6 +11,7 @@ import javax.validation.constraints.NotNull; import com.commercetools.api.models.common.Money; +import com.commercetools.api.models.common.TypedMoneyDraft; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -63,6 +64,14 @@ public interface TaxedPriceDraft extends io.vrap.rmf.base.client.Draft getTaxPortions(); + /** + *

Total tax applicable for the Cart or Order.

+ * @return totalTax + */ + @Valid + @JsonProperty("totalTax") + public TypedMoneyDraft getTotalTax(); + /** *

Total net price of the Cart or Order.

* @param totalNet value to be set @@ -94,6 +103,13 @@ public interface TaxedPriceDraft extends io.vrap.rmf.base.client.Draft taxPortions); + /** + *

Total tax applicable for the Cart or Order.

+ * @param totalTax value to be set + */ + + public void setTotalTax(final TypedMoneyDraft totalTax); + /** * factory method * @return instance of TaxedPriceDraft @@ -112,6 +128,7 @@ public static TaxedPriceDraft of(final TaxedPriceDraft template) { instance.setTotalNet(template.getTotalNet()); instance.setTotalGross(template.getTotalGross()); instance.setTaxPortions(template.getTaxPortions()); + instance.setTotalTax(template.getTotalTax()); return instance; } @@ -133,6 +150,7 @@ public static TaxedPriceDraft deepCopy(@Nullable final TaxedPriceDraft template) .map(com.commercetools.api.models.cart.TaxPortionDraft::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setTotalTax(com.commercetools.api.models.common.TypedMoneyDraft.deepCopy(template.getTotalTax())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftBuilder.java index 9328edae371..4cd00aa2551 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -30,6 +32,9 @@ public class TaxedPriceDraftBuilder implements Builder { private java.util.List taxPortions; + @Nullable + private com.commercetools.api.models.common.TypedMoneyDraft totalTax; + /** *

Total net price of the Cart or Order.

* @param builder function to build the totalNet value @@ -195,6 +200,30 @@ public TaxedPriceDraftBuilder setTaxPortions( return taxPortions(builder.apply(com.commercetools.api.models.cart.TaxPortionDraftBuilder.of())); } + /** + *

Total tax applicable for the Cart or Order.

+ * @param totalTax value to be set + * @return Builder + */ + + public TaxedPriceDraftBuilder totalTax( + @Nullable final com.commercetools.api.models.common.TypedMoneyDraft totalTax) { + this.totalTax = totalTax; + return this; + } + + /** + *

Total tax applicable for the Cart or Order.

+ * @param builder function to build the totalTax value + * @return Builder + */ + + public TaxedPriceDraftBuilder totalTax( + Function> builder) { + this.totalTax = builder.apply(com.commercetools.api.models.common.TypedMoneyDraftBuilder.of()).build(); + return this; + } + /** *

Total net price of the Cart or Order.

* @return totalNet @@ -223,6 +252,16 @@ public java.util.List getTaxP return this.taxPortions; } + /** + *

Total tax applicable for the Cart or Order.

+ * @return totalTax + */ + + @Nullable + public com.commercetools.api.models.common.TypedMoneyDraft getTotalTax() { + return this.totalTax; + } + /** * builds TaxedPriceDraft with checking for non-null required values * @return TaxedPriceDraft @@ -231,7 +270,7 @@ public TaxedPriceDraft build() { Objects.requireNonNull(totalNet, TaxedPriceDraft.class + ": totalNet is missing"); Objects.requireNonNull(totalGross, TaxedPriceDraft.class + ": totalGross is missing"); Objects.requireNonNull(taxPortions, TaxedPriceDraft.class + ": taxPortions is missing"); - return new TaxedPriceDraftImpl(totalNet, totalGross, taxPortions); + return new TaxedPriceDraftImpl(totalNet, totalGross, taxPortions, totalTax); } /** @@ -239,7 +278,7 @@ public TaxedPriceDraft build() { * @return TaxedPriceDraft */ public TaxedPriceDraft buildUnchecked() { - return new TaxedPriceDraftImpl(totalNet, totalGross, taxPortions); + return new TaxedPriceDraftImpl(totalNet, totalGross, taxPortions, totalTax); } /** @@ -260,6 +299,7 @@ public static TaxedPriceDraftBuilder of(final TaxedPriceDraft template) { builder.totalNet = template.getTotalNet(); builder.totalGross = template.getTotalGross(); builder.taxPortions = template.getTaxPortions(); + builder.totalTax = template.getTotalTax(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftImpl.java index dbf4ee43f23..b3bb5a4b930 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftImpl.java @@ -28,16 +28,20 @@ public class TaxedPriceDraftImpl implements TaxedPriceDraft, ModelBase { private java.util.List taxPortions; + private com.commercetools.api.models.common.TypedMoneyDraft totalTax; + /** * create instance with all properties */ @JsonCreator TaxedPriceDraftImpl(@JsonProperty("totalNet") final com.commercetools.api.models.common.Money totalNet, @JsonProperty("totalGross") final com.commercetools.api.models.common.Money totalGross, - @JsonProperty("taxPortions") final java.util.List taxPortions) { + @JsonProperty("taxPortions") final java.util.List taxPortions, + @JsonProperty("totalTax") final com.commercetools.api.models.common.TypedMoneyDraft totalTax) { this.totalNet = totalNet; this.totalGross = totalGross; this.taxPortions = taxPortions; + this.totalTax = totalTax; } /** @@ -71,6 +75,14 @@ public java.util.List getTaxP return this.taxPortions; } + /** + *

Total tax applicable for the Cart or Order.

+ */ + + public com.commercetools.api.models.common.TypedMoneyDraft getTotalTax() { + return this.totalTax; + } + public void setTotalNet(final com.commercetools.api.models.common.Money totalNet) { this.totalNet = totalNet; } @@ -87,6 +99,10 @@ public void setTaxPortions(final java.util.List taxPortions() p -> new CombinationQueryPredicate<>(p, TaxedPriceDraftQueryBuilderDsl::of)); } + public CombinationQueryPredicate totalTax( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("totalTax")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.TypedMoneyDraftQueryBuilderDsl.of())), + TaxedPriceDraftQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftTest.java index d19ccc84a26..2809df1beae 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/TaxedPriceDraftTest.java @@ -31,9 +31,12 @@ public static Object[][] objectBuilder() { TaxedPriceDraft.builder().totalNet(new com.commercetools.api.models.common.MoneyImpl()) }, new Object[] { TaxedPriceDraft.builder().totalGross(new com.commercetools.api.models.common.MoneyImpl()) }, + new Object[] { + TaxedPriceDraft.builder() + .taxPortions(Collections + .singletonList(new com.commercetools.api.models.cart.TaxPortionDraftImpl())) }, new Object[] { TaxedPriceDraft.builder() - .taxPortions( - Collections.singletonList(new com.commercetools.api.models.cart.TaxPortionDraftImpl())) } }; + .totalTax(new com.commercetools.api.models.common.TypedMoneyDraftImpl()) } }; } @Test @@ -57,4 +60,12 @@ public void taxPortions() { Assertions.assertThat(value.getTaxPortions()) .isEqualTo(Collections.singletonList(new com.commercetools.api.models.cart.TaxPortionDraftImpl())); } + + @Test + public void totalTax() { + TaxedPriceDraft value = TaxedPriceDraft.of(); + value.setTotalTax(new com.commercetools.api.models.common.TypedMoneyDraftImpl()); + Assertions.assertThat(value.getTotalTax()) + .isEqualTo(new com.commercetools.api.models.common.TypedMoneyDraftImpl()); + } } diff --git a/references.txt b/references.txt index 2a7faa32b59..38232cc393f 100644 --- a/references.txt +++ b/references.txt @@ -201,3 +201,4 @@ ffed231e91d01608e1bb08ecc1883cf00d9d9293 85b828533f486b4a2906e3b93c08761f9d723732 65619eef7e065950cbb92467d72eaacc68004a14 4aa1e888d0003de63e2b21493c61c1c5e342bfe4 +48bbac8851ae864319c404607e9f10b874df0e3f