diff --git a/changes.md b/changes.md index 03f906bc288..4479d518b79 100644 --- a/changes.md +++ b/changes.md @@ -6,3 +6,10 @@ - :warning: changed property `actions` of type `MyBusinessUnitUpdate` from type `BusinessUnitUpdateAction[]` to `MyBusinessUnitUpdateAction[]` + +
+Added Property(s) + +- added property `published` to type `ShoppingListLineItem` +
+ diff --git a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls index 5766b167135..9e4f54890e0 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -13688,6 +13688,7 @@ type ShoppingListLineItem { variantId: Int productTypeRef: Reference! productType: ProductTypeDefinition! + published: Boolean! quantity: Int! addedAt: DateTime! name( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItem.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItem.java index 7ffdfc92550..0d0a90b6a00 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItem.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItem.java @@ -34,6 +34,7 @@ * .name(nameBuilder -> nameBuilder) * .productId("{productId}") * .productType(productTypeBuilder -> productTypeBuilder) + * .published(true) * .quantity(0.3) * .build() * @@ -111,6 +112,15 @@ public interface ShoppingListLineItem extends com.commercetools.api.models.Custo @JsonProperty("productType") public ProductTypeReference getProductType(); + /** + *

Whether the related Product is published or not.

+ *

This data is updated in an eventual consistent manner when the Product's published status changes.

+ * @return published + */ + @NotNull + @JsonProperty("published") + public Boolean getPublished(); + /** *

Number of Products in the ShoppingListLineItem.

* @return quantity @@ -203,6 +213,14 @@ public interface ShoppingListLineItem extends com.commercetools.api.models.Custo public void setProductType(final ProductTypeReference productType); + /** + *

Whether the related Product is published or not.

+ *

This data is updated in an eventual consistent manner when the Product's published status changes.

+ * @param published value to be set + */ + + public void setPublished(final Boolean published); + /** *

Number of Products in the ShoppingListLineItem.

* @param quantity value to be set @@ -256,6 +274,7 @@ public static ShoppingListLineItem of(final ShoppingListLineItem template) { instance.setName(template.getName()); instance.setProductId(template.getProductId()); instance.setProductType(template.getProductType()); + instance.setPublished(template.getPublished()); instance.setQuantity(template.getQuantity()); instance.setVariantId(template.getVariantId()); instance.setVariant(template.getVariant()); @@ -283,6 +302,7 @@ public static ShoppingListLineItem deepCopy(@Nullable final ShoppingListLineItem instance.setProductId(template.getProductId()); instance.setProductType( com.commercetools.api.models.product_type.ProductTypeReference.deepCopy(template.getProductType())); + instance.setPublished(template.getPublished()); instance.setQuantity(template.getQuantity()); instance.setVariantId(template.getVariantId()); instance.setVariant(com.commercetools.api.models.product.ProductVariant.deepCopy(template.getVariant())); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemBuilder.java index 98df7dcf352..74eedbe1764 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemBuilder.java @@ -21,6 +21,7 @@ * .name(nameBuilder -> nameBuilder) * .productId("{productId}") * .productType(productTypeBuilder -> productTypeBuilder) + * .published(true) * .quantity(0.3) * .build() * @@ -48,6 +49,8 @@ public class ShoppingListLineItemBuilder implements BuilderWhether the related Product is published or not.

+ *

This data is updated in an eventual consistent manner when the Product's published status changes.

+ * @param published value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder published(final Boolean published) { + this.published = published; + return this; + } + /** *

Number of Products in the ShoppingListLineItem.

* @param quantity value to be set @@ -402,6 +417,16 @@ public com.commercetools.api.models.product_type.ProductTypeReference getProduct return this.productType; } + /** + *

Whether the related Product is published or not.

+ *

This data is updated in an eventual consistent manner when the Product's published status changes.

+ * @return published + */ + + public Boolean getPublished() { + return this.published; + } + /** *

Number of Products in the ShoppingListLineItem.

* @return quantity @@ -453,9 +478,10 @@ public ShoppingListLineItem build() { Objects.requireNonNull(name, ShoppingListLineItem.class + ": name is missing"); Objects.requireNonNull(productId, ShoppingListLineItem.class + ": productId is missing"); Objects.requireNonNull(productType, ShoppingListLineItem.class + ": productType is missing"); + Objects.requireNonNull(published, ShoppingListLineItem.class + ": published is missing"); Objects.requireNonNull(quantity, ShoppingListLineItem.class + ": quantity is missing"); return new ShoppingListLineItemImpl(addedAt, custom, deactivatedAt, id, key, name, productId, productType, - quantity, variantId, variant, productSlug); + published, quantity, variantId, variant, productSlug); } /** @@ -464,7 +490,7 @@ public ShoppingListLineItem build() { */ public ShoppingListLineItem buildUnchecked() { return new ShoppingListLineItemImpl(addedAt, custom, deactivatedAt, id, key, name, productId, productType, - quantity, variantId, variant, productSlug); + published, quantity, variantId, variant, productSlug); } /** @@ -490,6 +516,7 @@ public static ShoppingListLineItemBuilder of(final ShoppingListLineItem template builder.name = template.getName(); builder.productId = template.getProductId(); builder.productType = template.getProductType(); + builder.published = template.getPublished(); builder.quantity = template.getQuantity(); builder.variantId = template.getVariantId(); builder.variant = template.getVariant(); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemImpl.java index d1a73ac04b9..723845e607b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemImpl.java @@ -39,6 +39,8 @@ public class ShoppingListLineItemImpl implements ShoppingListLineItem, ModelBase private com.commercetools.api.models.product_type.ProductTypeReference productType; + private Boolean published; + private Long quantity; private Long variantId; @@ -58,7 +60,8 @@ public class ShoppingListLineItemImpl implements ShoppingListLineItem, ModelBase @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, @JsonProperty("productId") final String productId, @JsonProperty("productType") final com.commercetools.api.models.product_type.ProductTypeReference productType, - @JsonProperty("quantity") final Long quantity, @JsonProperty("variantId") final Long variantId, + @JsonProperty("published") final Boolean published, @JsonProperty("quantity") final Long quantity, + @JsonProperty("variantId") final Long variantId, @JsonProperty("variant") final com.commercetools.api.models.product.ProductVariant variant, @JsonProperty("productSlug") final com.commercetools.api.models.common.LocalizedString productSlug) { this.addedAt = addedAt; @@ -69,6 +72,7 @@ public class ShoppingListLineItemImpl implements ShoppingListLineItem, ModelBase this.name = name; this.productId = productId; this.productType = productType; + this.published = published; this.quantity = quantity; this.variantId = variantId; this.variant = variant; @@ -147,6 +151,15 @@ public com.commercetools.api.models.product_type.ProductTypeReference getProduct return this.productType; } + /** + *

Whether the related Product is published or not.

+ *

This data is updated in an eventual consistent manner when the Product's published status changes.

+ */ + + public Boolean getPublished() { + return this.published; + } + /** *

Number of Products in the ShoppingListLineItem.

*/ @@ -213,6 +226,10 @@ public void setProductType(final com.commercetools.api.models.product_type.Produ this.productType = productType; } + public void setPublished(final Boolean published) { + this.published = published; + } + public void setQuantity(final Long quantity) { this.quantity = quantity; } @@ -247,6 +264,7 @@ public boolean equals(Object o) { .append(name, that.name) .append(productId, that.productId) .append(productType, that.productType) + .append(published, that.published) .append(quantity, that.quantity) .append(variantId, that.variantId) .append(variant, that.variant) @@ -259,6 +277,7 @@ public boolean equals(Object o) { .append(name, that.name) .append(productId, that.productId) .append(productType, that.productType) + .append(published, that.published) .append(quantity, that.quantity) .append(variantId, that.variantId) .append(variant, that.variant) @@ -276,6 +295,7 @@ public int hashCode() { .append(name) .append(productId) .append(productType) + .append(published) .append(quantity) .append(variantId) .append(variant) @@ -293,6 +313,7 @@ public String toString() { .append("name", name) .append("productId", productId) .append("productType", productType) + .append("published", published) .append("quantity", quantity) .append("variantId", variantId) .append("variant", variant) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/shopping_list/ShoppingListLineItemQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/shopping_list/ShoppingListLineItemQueryBuilderDsl.java index 6d827b2919e..bea0dcd7d8f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/shopping_list/ShoppingListLineItemQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/shopping_list/ShoppingListLineItemQueryBuilderDsl.java @@ -69,6 +69,12 @@ public CombinationQueryPredicate productTyp ShoppingListLineItemQueryBuilderDsl::of); } + public BooleanComparisonPredicateBuilder published() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("published")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemQueryBuilderDsl::of)); + } + public LongComparisonPredicateBuilder quantity() { return new LongComparisonPredicateBuilder<>( BinaryQueryPredicate.of().left(new ConstantQueryPredicate("quantity")), diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemTest.java index 60525d52b6d..d43b87a72e5 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemTest.java @@ -38,6 +38,7 @@ public static Object[][] objectBuilder() { new Object[] { ShoppingListLineItem.builder().productId("productId") }, new Object[] { ShoppingListLineItem.builder() .productType(new com.commercetools.api.models.product_type.ProductTypeReferenceImpl()) }, + new Object[] { ShoppingListLineItem.builder().published(true) }, new Object[] { ShoppingListLineItem.builder().quantity(8L) }, new Object[] { ShoppingListLineItem.builder().variantId(5L) }, new Object[] { ShoppingListLineItem.builder() @@ -103,6 +104,13 @@ public void productType() { .isEqualTo(new com.commercetools.api.models.product_type.ProductTypeReferenceImpl()); } + @Test + public void published() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setPublished(true); + Assertions.assertThat(value.getPublished()).isEqualTo(true); + } + @Test public void quantity() { ShoppingListLineItem value = ShoppingListLineItem.of(); diff --git a/references.txt b/references.txt index 647393c6996..0befbaee454 100644 --- a/references.txt +++ b/references.txt @@ -401,3 +401,4 @@ f2c3348614fec5fe51dfb7adac8744e033626b8b f0288f95a5fe33fd2973df3f8290defb15129192 21aedcd93ff144743f0570a5fd0b65af601baa76 761762c7caad45bc86b08db7021a033fff18ba90 +dec65e707130185745930bde27ce78ae64ab29c1