From 8d982fc0444baf86899a269b1def745d93d80944 Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:31:47 +0000 Subject: [PATCH] build(codegen): updating SDK --- changes.md | 13 +----- .../api/models/me/MyCartDraft.java | 24 +++++++++++ .../api/models/me/MyCartDraftBuilder.java | 40 +++++++++++++++++-- .../api/models/me/MyCartDraftImpl.java | 23 +++++++++++ .../query/me/MyCartDraftQueryBuilderDsl.java | 6 +++ .../api/models/me/MyCartDraftTest.java | 10 +++++ references.txt | 1 + 7 files changed, 102 insertions(+), 15 deletions(-) diff --git a/changes.md b/changes.md index e925826e5fd..9d6922d508d 100644 --- a/changes.md +++ b/changes.md @@ -1,17 +1,8 @@ **Api changes**
-Added Type(s) +Added Property(s) -- added type `CartDiscountCreatedMessage` -- added type `CartDiscountDeletedMessage` -- added type `CartDiscountStoreAddedMessage` -- added type `CartDiscountStoreRemovedMessage` -- added type `CartDiscountStoresSetMessage` -- added type `CartDiscountCreatedMessagePayload` -- added type `CartDiscountDeletedMessagePayload` -- added type `CartDiscountStoreAddedMessagePayload` -- added type `CartDiscountStoreRemovedMessagePayload` -- added type `CartDiscountStoresSetMessagePayload` +- added property `shippingMode` to type `MyCartDraft`
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraft.java index 7bda3b43e5c..260602f004b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraft.java @@ -12,6 +12,7 @@ import com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier; import com.commercetools.api.models.cart.InventoryMode; +import com.commercetools.api.models.cart.ShippingMode; import com.commercetools.api.models.cart.TaxMode; import com.commercetools.api.models.common.BaseAddress; import com.commercetools.api.models.shipping_method.ShippingMethodResourceIdentifier; @@ -129,6 +130,17 @@ public interface MyCartDraft extends com.commercetools.api.models.CustomizableDr @JsonProperty("itemShippingAddresses") public List getItemShippingAddresses(); + /** + * + * @return shippingMode + */ + + @JsonProperty("shippingMode") + public ShippingMode getShippingMode(); + /** *

code of the existing DiscountCodes to add to the Cart.

* @return discountCodes @@ -265,6 +277,16 @@ public interface MyCartDraft extends com.commercetools.api.models.CustomizableDr public void setItemShippingAddresses(final List itemShippingAddresses); + /** + * + * @param shippingMode value to be set + */ + + public void setShippingMode(final ShippingMode shippingMode); + /** *

code of the existing DiscountCodes to add to the Cart.

* @param discountCodes values to be set @@ -335,6 +357,7 @@ public static MyCartDraft of(final MyCartDraft template) { instance.setShippingAddress(template.getShippingAddress()); instance.setShippingMethod(template.getShippingMethod()); instance.setItemShippingAddresses(template.getItemShippingAddresses()); + instance.setShippingMode(template.getShippingMode()); instance.setDiscountCodes(template.getDiscountCodes()); instance.setCountry(template.getCountry()); instance.setLocale(template.getLocale()); @@ -377,6 +400,7 @@ public static MyCartDraft deepCopy(@Nullable final MyCartDraft template) { .map(com.commercetools.api.models.common.BaseAddress::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setShippingMode(template.getShippingMode()); instance.setDiscountCodes(Optional.ofNullable(template.getDiscountCodes()).map(ArrayList::new).orElse(null)); instance.setCountry(template.getCountry()); instance.setLocale(template.getLocale()); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraftBuilder.java index 85a231c5964..ecd8f5910e2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraftBuilder.java @@ -56,6 +56,9 @@ public class MyCartDraftBuilder implements Builder { @Nullable private java.util.List itemShippingAddresses; + @Nullable + private com.commercetools.api.models.cart.ShippingMode shippingMode; + @Nullable private java.util.List discountCodes; @@ -487,6 +490,21 @@ public MyCartDraftBuilder setItemShippingAddresses( return itemShippingAddresses(builder.apply(com.commercetools.api.models.common.BaseAddressBuilder.of())); } + /** + *
    + *
  • If set to Single, only a single Shipping Method can be added to the Cart.
  • + *
  • If set to Multiple, multiple Shipping Methods can be added to the Cart.
  • + *
+ * @param shippingMode value to be set + * @return Builder + */ + + public MyCartDraftBuilder shippingMode( + @Nullable final com.commercetools.api.models.cart.ShippingMode shippingMode) { + this.shippingMode = shippingMode; + return this; + } + /** *

code of the existing DiscountCodes to add to the Cart.

* @param discountCodes value to be set @@ -702,6 +720,19 @@ public java.util.List getItemSh return this.itemShippingAddresses; } + /** + *
    + *
  • If set to Single, only a single Shipping Method can be added to the Cart.
  • + *
  • If set to Multiple, multiple Shipping Methods can be added to the Cart.
  • + *
+ * @return shippingMode + */ + + @Nullable + public com.commercetools.api.models.cart.ShippingMode getShippingMode() { + return this.shippingMode; + } + /** *

code of the existing DiscountCodes to add to the Cart.

* @return discountCodes @@ -760,8 +791,8 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { public MyCartDraft build() { Objects.requireNonNull(currency, MyCartDraft.class + ": currency is missing"); return new MyCartDraftImpl(currency, customerEmail, businessUnit, store, lineItems, taxMode, inventoryMode, - billingAddress, shippingAddress, shippingMethod, itemShippingAddresses, discountCodes, country, locale, - deleteDaysAfterLastModification, custom); + billingAddress, shippingAddress, shippingMethod, itemShippingAddresses, shippingMode, discountCodes, + country, locale, deleteDaysAfterLastModification, custom); } /** @@ -770,8 +801,8 @@ public MyCartDraft build() { */ public MyCartDraft buildUnchecked() { return new MyCartDraftImpl(currency, customerEmail, businessUnit, store, lineItems, taxMode, inventoryMode, - billingAddress, shippingAddress, shippingMethod, itemShippingAddresses, discountCodes, country, locale, - deleteDaysAfterLastModification, custom); + billingAddress, shippingAddress, shippingMethod, itemShippingAddresses, shippingMode, discountCodes, + country, locale, deleteDaysAfterLastModification, custom); } /** @@ -800,6 +831,7 @@ public static MyCartDraftBuilder of(final MyCartDraft template) { builder.shippingAddress = template.getShippingAddress(); builder.shippingMethod = template.getShippingMethod(); builder.itemShippingAddresses = template.getItemShippingAddresses(); + builder.shippingMode = template.getShippingMode(); builder.discountCodes = template.getDiscountCodes(); builder.country = template.getCountry(); builder.locale = template.getLocale(); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraftImpl.java index c1333bc0792..fe58e19dae0 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartDraftImpl.java @@ -44,6 +44,8 @@ public class MyCartDraftImpl implements MyCartDraft, ModelBase { private java.util.List itemShippingAddresses; + private com.commercetools.api.models.cart.ShippingMode shippingMode; + private java.util.List discountCodes; private String country; @@ -69,6 +71,7 @@ public class MyCartDraftImpl implements MyCartDraft, ModelBase { @JsonProperty("shippingAddress") final com.commercetools.api.models.common.BaseAddress shippingAddress, @JsonProperty("shippingMethod") final com.commercetools.api.models.shipping_method.ShippingMethodResourceIdentifier shippingMethod, @JsonProperty("itemShippingAddresses") final java.util.List itemShippingAddresses, + @JsonProperty("shippingMode") final com.commercetools.api.models.cart.ShippingMode shippingMode, @JsonProperty("discountCodes") final java.util.List discountCodes, @JsonProperty("country") final String country, @JsonProperty("locale") final String locale, @JsonProperty("deleteDaysAfterLastModification") final Long deleteDaysAfterLastModification, @@ -84,6 +87,7 @@ public class MyCartDraftImpl implements MyCartDraft, ModelBase { this.shippingAddress = shippingAddress; this.shippingMethod = shippingMethod; this.itemShippingAddresses = itemShippingAddresses; + this.shippingMode = shippingMode; this.discountCodes = discountCodes; this.country = country; this.locale = locale; @@ -186,6 +190,17 @@ public java.util.List getItemSh return this.itemShippingAddresses; } + /** + *
    + *
  • If set to Single, only a single Shipping Method can be added to the Cart.
  • + *
  • If set to Multiple, multiple Shipping Methods can be added to the Cart.
  • + *
+ */ + + public com.commercetools.api.models.cart.ShippingMode getShippingMode() { + return this.shippingMode; + } + /** *

code of the existing DiscountCodes to add to the Cart.

*/ @@ -283,6 +298,10 @@ public void setItemShippingAddresses( this.itemShippingAddresses = itemShippingAddresses; } + public void setShippingMode(final com.commercetools.api.models.cart.ShippingMode shippingMode) { + this.shippingMode = shippingMode; + } + public void setDiscountCodes(final String... discountCodes) { this.discountCodes = new ArrayList<>(Arrays.asList(discountCodes)); } @@ -328,6 +347,7 @@ public boolean equals(Object o) { .append(shippingAddress, that.shippingAddress) .append(shippingMethod, that.shippingMethod) .append(itemShippingAddresses, that.itemShippingAddresses) + .append(shippingMode, that.shippingMode) .append(discountCodes, that.discountCodes) .append(country, that.country) .append(locale, that.locale) @@ -344,6 +364,7 @@ public boolean equals(Object o) { .append(shippingAddress, that.shippingAddress) .append(shippingMethod, that.shippingMethod) .append(itemShippingAddresses, that.itemShippingAddresses) + .append(shippingMode, that.shippingMode) .append(discountCodes, that.discountCodes) .append(country, that.country) .append(locale, that.locale) @@ -365,6 +386,7 @@ public int hashCode() { .append(shippingAddress) .append(shippingMethod) .append(itemShippingAddresses) + .append(shippingMode) .append(discountCodes) .append(country) .append(locale) @@ -386,6 +408,7 @@ public String toString() { .append("shippingAddress", shippingAddress) .append("shippingMethod", shippingMethod) .append("itemShippingAddresses", itemShippingAddresses) + .append("shippingMode", shippingMode) .append("discountCodes", discountCodes) .append("country", country) .append("locale", locale) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartDraftQueryBuilderDsl.java index 3fa16da022c..b829d23dafc 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartDraftQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartDraftQueryBuilderDsl.java @@ -114,6 +114,12 @@ public CollectionPredicateBuilder itemShippingAddres p -> new CombinationQueryPredicate<>(p, MyCartDraftQueryBuilderDsl::of)); } + public StringComparisonPredicateBuilder shippingMode() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("shippingMode")), + p -> new CombinationQueryPredicate<>(p, MyCartDraftQueryBuilderDsl::of)); + } + public StringCollectionPredicateBuilder discountCodes() { return new StringCollectionPredicateBuilder<>( BinaryQueryPredicate.of().left(new ConstantQueryPredicate("discountCodes")), diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartDraftTest.java index 95a1f9ad087..f8a08e0f591 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartDraftTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartDraftTest.java @@ -52,6 +52,8 @@ public static Object[][] objectBuilder() { MyCartDraft.builder() .itemShippingAddresses(Collections .singletonList(new com.commercetools.api.models.common.BaseAddressImpl())) }, + new Object[] { MyCartDraft.builder() + .shippingMode(com.commercetools.api.models.cart.ShippingMode.findEnum("Single")) }, new Object[] { MyCartDraft.builder().discountCodes(Collections.singletonList("discountCodes")) }, new Object[] { MyCartDraft.builder().country("country") }, new Object[] { MyCartDraft.builder().locale("locale") }, @@ -147,6 +149,14 @@ public void itemShippingAddresses() { .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.BaseAddressImpl())); } + @Test + public void shippingMode() { + MyCartDraft value = MyCartDraft.of(); + value.setShippingMode(com.commercetools.api.models.cart.ShippingMode.findEnum("Single")); + Assertions.assertThat(value.getShippingMode()) + .isEqualTo(com.commercetools.api.models.cart.ShippingMode.findEnum("Single")); + } + @Test public void discountCodes() { MyCartDraft value = MyCartDraft.of(); diff --git a/references.txt b/references.txt index 0db36847c86..68f9b9603a8 100644 --- a/references.txt +++ b/references.txt @@ -188,3 +188,4 @@ c640bc7c38e111f9df252979cc5c2ab22568a3d8 2e6876d6e80db67518bc18caed1e630372cae607 455326d83ec0750dfaec9afc7ec640f15412a68f bbed21a27bf83c8ac16f323969d71a8855623523 +e3a178953d3d929a58092a0c86d666fee6400c75