Skip to content

Commit 7c9a38f

Browse files
Merge pull request #885 from commercetools/gen-sdk-updates
Update generated SDKs
2 parents 8d9d3fd + cb9d3ca commit 7c9a38f

File tree

8 files changed

+94
-3
lines changed

8 files changed

+94
-3
lines changed

changes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@
66
- :warning: changed property `actions` of type `MyBusinessUnitUpdate` from type `BusinessUnitUpdateAction[]` to `MyBusinessUnitUpdateAction[]`
77
</details>
88

9+
10+
<details>
11+
<summary>Added Property(s)</summary>
12+
13+
- added property `published` to type `ShoppingListLineItem`
14+
</details>
15+

commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13688,6 +13688,7 @@ type ShoppingListLineItem {
1368813688
variantId: Int
1368913689
productTypeRef: Reference!
1369013690
productType: ProductTypeDefinition!
13691+
published: Boolean!
1369113692
quantity: Int!
1369213693
addedAt: DateTime!
1369313694
name(

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItem.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* .name(nameBuilder -> nameBuilder)
3535
* .productId("{productId}")
3636
* .productType(productTypeBuilder -> productTypeBuilder)
37+
* .published(true)
3738
* .quantity(0.3)
3839
* .build()
3940
* </code></pre>
@@ -111,6 +112,15 @@ public interface ShoppingListLineItem extends com.commercetools.api.models.Custo
111112
@JsonProperty("productType")
112113
public ProductTypeReference getProductType();
113114

115+
/**
116+
* <p>Whether the related Product is published or not.</p>
117+
* <p>This data is updated in an eventual consistent manner when the Product's published status changes.</p>
118+
* @return published
119+
*/
120+
@NotNull
121+
@JsonProperty("published")
122+
public Boolean getPublished();
123+
114124
/**
115125
* <p>Number of Products in the ShoppingListLineItem.</p>
116126
* @return quantity
@@ -203,6 +213,14 @@ public interface ShoppingListLineItem extends com.commercetools.api.models.Custo
203213

204214
public void setProductType(final ProductTypeReference productType);
205215

216+
/**
217+
* <p>Whether the related Product is published or not.</p>
218+
* <p>This data is updated in an eventual consistent manner when the Product's published status changes.</p>
219+
* @param published value to be set
220+
*/
221+
222+
public void setPublished(final Boolean published);
223+
206224
/**
207225
* <p>Number of Products in the ShoppingListLineItem.</p>
208226
* @param quantity value to be set
@@ -256,6 +274,7 @@ public static ShoppingListLineItem of(final ShoppingListLineItem template) {
256274
instance.setName(template.getName());
257275
instance.setProductId(template.getProductId());
258276
instance.setProductType(template.getProductType());
277+
instance.setPublished(template.getPublished());
259278
instance.setQuantity(template.getQuantity());
260279
instance.setVariantId(template.getVariantId());
261280
instance.setVariant(template.getVariant());
@@ -283,6 +302,7 @@ public static ShoppingListLineItem deepCopy(@Nullable final ShoppingListLineItem
283302
instance.setProductId(template.getProductId());
284303
instance.setProductType(
285304
com.commercetools.api.models.product_type.ProductTypeReference.deepCopy(template.getProductType()));
305+
instance.setPublished(template.getPublished());
286306
instance.setQuantity(template.getQuantity());
287307
instance.setVariantId(template.getVariantId());
288308
instance.setVariant(com.commercetools.api.models.product.ProductVariant.deepCopy(template.getVariant()));

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemBuilder.java

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* .name(nameBuilder -> nameBuilder)
2222
* .productId("{productId}")
2323
* .productType(productTypeBuilder -> productTypeBuilder)
24+
* .published(true)
2425
* .quantity(0.3)
2526
* .build()
2627
* </code></pre>
@@ -48,6 +49,8 @@ public class ShoppingListLineItemBuilder implements Builder<ShoppingListLineItem
4849

4950
private com.commercetools.api.models.product_type.ProductTypeReference productType;
5051

52+
private Boolean published;
53+
5154
private Long quantity;
5255

5356
@Nullable
@@ -225,6 +228,18 @@ public ShoppingListLineItemBuilder productType(
225228
return this;
226229
}
227230

231+
/**
232+
* <p>Whether the related Product is published or not.</p>
233+
* <p>This data is updated in an eventual consistent manner when the Product's published status changes.</p>
234+
* @param published value to be set
235+
* @return Builder
236+
*/
237+
238+
public ShoppingListLineItemBuilder published(final Boolean published) {
239+
this.published = published;
240+
return this;
241+
}
242+
228243
/**
229244
* <p>Number of Products in the ShoppingListLineItem.</p>
230245
* @param quantity value to be set
@@ -402,6 +417,16 @@ public com.commercetools.api.models.product_type.ProductTypeReference getProduct
402417
return this.productType;
403418
}
404419

420+
/**
421+
* <p>Whether the related Product is published or not.</p>
422+
* <p>This data is updated in an eventual consistent manner when the Product's published status changes.</p>
423+
* @return published
424+
*/
425+
426+
public Boolean getPublished() {
427+
return this.published;
428+
}
429+
405430
/**
406431
* <p>Number of Products in the ShoppingListLineItem.</p>
407432
* @return quantity
@@ -453,9 +478,10 @@ public ShoppingListLineItem build() {
453478
Objects.requireNonNull(name, ShoppingListLineItem.class + ": name is missing");
454479
Objects.requireNonNull(productId, ShoppingListLineItem.class + ": productId is missing");
455480
Objects.requireNonNull(productType, ShoppingListLineItem.class + ": productType is missing");
481+
Objects.requireNonNull(published, ShoppingListLineItem.class + ": published is missing");
456482
Objects.requireNonNull(quantity, ShoppingListLineItem.class + ": quantity is missing");
457483
return new ShoppingListLineItemImpl(addedAt, custom, deactivatedAt, id, key, name, productId, productType,
458-
quantity, variantId, variant, productSlug);
484+
published, quantity, variantId, variant, productSlug);
459485
}
460486

461487
/**
@@ -464,7 +490,7 @@ public ShoppingListLineItem build() {
464490
*/
465491
public ShoppingListLineItem buildUnchecked() {
466492
return new ShoppingListLineItemImpl(addedAt, custom, deactivatedAt, id, key, name, productId, productType,
467-
quantity, variantId, variant, productSlug);
493+
published, quantity, variantId, variant, productSlug);
468494
}
469495

470496
/**
@@ -490,6 +516,7 @@ public static ShoppingListLineItemBuilder of(final ShoppingListLineItem template
490516
builder.name = template.getName();
491517
builder.productId = template.getProductId();
492518
builder.productType = template.getProductType();
519+
builder.published = template.getPublished();
493520
builder.quantity = template.getQuantity();
494521
builder.variantId = template.getVariantId();
495522
builder.variant = template.getVariant();

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemImpl.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public class ShoppingListLineItemImpl implements ShoppingListLineItem, ModelBase
3939

4040
private com.commercetools.api.models.product_type.ProductTypeReference productType;
4141

42+
private Boolean published;
43+
4244
private Long quantity;
4345

4446
private Long variantId;
@@ -58,7 +60,8 @@ public class ShoppingListLineItemImpl implements ShoppingListLineItem, ModelBase
5860
@JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name,
5961
@JsonProperty("productId") final String productId,
6062
@JsonProperty("productType") final com.commercetools.api.models.product_type.ProductTypeReference productType,
61-
@JsonProperty("quantity") final Long quantity, @JsonProperty("variantId") final Long variantId,
63+
@JsonProperty("published") final Boolean published, @JsonProperty("quantity") final Long quantity,
64+
@JsonProperty("variantId") final Long variantId,
6265
@JsonProperty("variant") final com.commercetools.api.models.product.ProductVariant variant,
6366
@JsonProperty("productSlug") final com.commercetools.api.models.common.LocalizedString productSlug) {
6467
this.addedAt = addedAt;
@@ -69,6 +72,7 @@ public class ShoppingListLineItemImpl implements ShoppingListLineItem, ModelBase
6972
this.name = name;
7073
this.productId = productId;
7174
this.productType = productType;
75+
this.published = published;
7276
this.quantity = quantity;
7377
this.variantId = variantId;
7478
this.variant = variant;
@@ -147,6 +151,15 @@ public com.commercetools.api.models.product_type.ProductTypeReference getProduct
147151
return this.productType;
148152
}
149153

154+
/**
155+
* <p>Whether the related Product is published or not.</p>
156+
* <p>This data is updated in an eventual consistent manner when the Product's published status changes.</p>
157+
*/
158+
159+
public Boolean getPublished() {
160+
return this.published;
161+
}
162+
150163
/**
151164
* <p>Number of Products in the ShoppingListLineItem.</p>
152165
*/
@@ -213,6 +226,10 @@ public void setProductType(final com.commercetools.api.models.product_type.Produ
213226
this.productType = productType;
214227
}
215228

229+
public void setPublished(final Boolean published) {
230+
this.published = published;
231+
}
232+
216233
public void setQuantity(final Long quantity) {
217234
this.quantity = quantity;
218235
}
@@ -247,6 +264,7 @@ public boolean equals(Object o) {
247264
.append(name, that.name)
248265
.append(productId, that.productId)
249266
.append(productType, that.productType)
267+
.append(published, that.published)
250268
.append(quantity, that.quantity)
251269
.append(variantId, that.variantId)
252270
.append(variant, that.variant)
@@ -259,6 +277,7 @@ public boolean equals(Object o) {
259277
.append(name, that.name)
260278
.append(productId, that.productId)
261279
.append(productType, that.productType)
280+
.append(published, that.published)
262281
.append(quantity, that.quantity)
263282
.append(variantId, that.variantId)
264283
.append(variant, that.variant)
@@ -276,6 +295,7 @@ public int hashCode() {
276295
.append(name)
277296
.append(productId)
278297
.append(productType)
298+
.append(published)
279299
.append(quantity)
280300
.append(variantId)
281301
.append(variant)
@@ -293,6 +313,7 @@ public String toString() {
293313
.append("name", name)
294314
.append("productId", productId)
295315
.append("productType", productType)
316+
.append("published", published)
296317
.append("quantity", quantity)
297318
.append("variantId", variantId)
298319
.append("variant", variant)

commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/shopping_list/ShoppingListLineItemQueryBuilderDsl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ public CombinationQueryPredicate<ShoppingListLineItemQueryBuilderDsl> productTyp
6969
ShoppingListLineItemQueryBuilderDsl::of);
7070
}
7171

72+
public BooleanComparisonPredicateBuilder<ShoppingListLineItemQueryBuilderDsl> published() {
73+
return new BooleanComparisonPredicateBuilder<>(
74+
BinaryQueryPredicate.of().left(new ConstantQueryPredicate("published")),
75+
p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemQueryBuilderDsl::of));
76+
}
77+
7278
public LongComparisonPredicateBuilder<ShoppingListLineItemQueryBuilderDsl> quantity() {
7379
return new LongComparisonPredicateBuilder<>(
7480
BinaryQueryPredicate.of().left(new ConstantQueryPredicate("quantity")),

commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public static Object[][] objectBuilder() {
3838
new Object[] { ShoppingListLineItem.builder().productId("productId") },
3939
new Object[] { ShoppingListLineItem.builder()
4040
.productType(new com.commercetools.api.models.product_type.ProductTypeReferenceImpl()) },
41+
new Object[] { ShoppingListLineItem.builder().published(true) },
4142
new Object[] { ShoppingListLineItem.builder().quantity(8L) },
4243
new Object[] { ShoppingListLineItem.builder().variantId(5L) },
4344
new Object[] { ShoppingListLineItem.builder()
@@ -103,6 +104,13 @@ public void productType() {
103104
.isEqualTo(new com.commercetools.api.models.product_type.ProductTypeReferenceImpl());
104105
}
105106

107+
@Test
108+
public void published() {
109+
ShoppingListLineItem value = ShoppingListLineItem.of();
110+
value.setPublished(true);
111+
Assertions.assertThat(value.getPublished()).isEqualTo(true);
112+
}
113+
106114
@Test
107115
public void quantity() {
108116
ShoppingListLineItem value = ShoppingListLineItem.of();

references.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,3 +401,4 @@ f2c3348614fec5fe51dfb7adac8744e033626b8b
401401
f0288f95a5fe33fd2973df3f8290defb15129192
402402
21aedcd93ff144743f0570a5fd0b65af601baa76
403403
761762c7caad45bc86b08db7021a033fff18ba90
404+
dec65e707130185745930bde27ce78ae64ab29c1

0 commit comments

Comments
 (0)