Skip to content

Update generated SDKs #885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@
- :warning: changed property `actions` of type `MyBusinessUnitUpdate` from type `BusinessUnitUpdateAction[]` to `MyBusinessUnitUpdateAction[]`
</details>


<details>
<summary>Added Property(s)</summary>

- added property `published` to type `ShoppingListLineItem`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -13688,6 +13688,7 @@ type ShoppingListLineItem {
variantId: Int
productTypeRef: Reference!
productType: ProductTypeDefinition!
published: Boolean!
quantity: Int!
addedAt: DateTime!
name(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* .name(nameBuilder -> nameBuilder)
* .productId("{productId}")
* .productType(productTypeBuilder -> productTypeBuilder)
* .published(true)
* .quantity(0.3)
* .build()
* </code></pre>
Expand Down Expand Up @@ -111,6 +112,15 @@ public interface ShoppingListLineItem extends com.commercetools.api.models.Custo
@JsonProperty("productType")
public ProductTypeReference getProductType();

/**
* <p>Whether the related Product is published or not.</p>
* <p>This data is updated in an eventual consistent manner when the Product's published status changes.</p>
* @return published
*/
@NotNull
@JsonProperty("published")
public Boolean getPublished();

/**
* <p>Number of Products in the ShoppingListLineItem.</p>
* @return quantity
Expand Down Expand Up @@ -203,6 +213,14 @@ public interface ShoppingListLineItem extends com.commercetools.api.models.Custo

public void setProductType(final ProductTypeReference productType);

/**
* <p>Whether the related Product is published or not.</p>
* <p>This data is updated in an eventual consistent manner when the Product's published status changes.</p>
* @param published value to be set
*/

public void setPublished(final Boolean published);

/**
* <p>Number of Products in the ShoppingListLineItem.</p>
* @param quantity value to be set
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* .name(nameBuilder -> nameBuilder)
* .productId("{productId}")
* .productType(productTypeBuilder -> productTypeBuilder)
* .published(true)
* .quantity(0.3)
* .build()
* </code></pre>
Expand Down Expand Up @@ -48,6 +49,8 @@ public class ShoppingListLineItemBuilder implements Builder<ShoppingListLineItem

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

private Boolean published;

private Long quantity;

@Nullable
Expand Down Expand Up @@ -225,6 +228,18 @@ public ShoppingListLineItemBuilder productType(
return this;
}

/**
* <p>Whether the related Product is published or not.</p>
* <p>This data is updated in an eventual consistent manner when the Product's published status changes.</p>
* @param published value to be set
* @return Builder
*/

public ShoppingListLineItemBuilder published(final Boolean published) {
this.published = published;
return this;
}

/**
* <p>Number of Products in the ShoppingListLineItem.</p>
* @param quantity value to be set
Expand Down Expand Up @@ -402,6 +417,16 @@ public com.commercetools.api.models.product_type.ProductTypeReference getProduct
return this.productType;
}

/**
* <p>Whether the related Product is published or not.</p>
* <p>This data is updated in an eventual consistent manner when the Product's published status changes.</p>
* @return published
*/

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

/**
* <p>Number of Products in the ShoppingListLineItem.</p>
* @return quantity
Expand Down Expand Up @@ -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);
}

/**
Expand All @@ -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);
}

/**
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -147,6 +151,15 @@ public com.commercetools.api.models.product_type.ProductTypeReference getProduct
return this.productType;
}

/**
* <p>Whether the related Product is published or not.</p>
* <p>This data is updated in an eventual consistent manner when the Product's published status changes.</p>
*/

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

/**
* <p>Number of Products in the ShoppingListLineItem.</p>
*/
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -276,6 +295,7 @@ public int hashCode() {
.append(name)
.append(productId)
.append(productType)
.append(published)
.append(quantity)
.append(variantId)
.append(variant)
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
ShoppingListLineItemQueryBuilderDsl::of);
}

public BooleanComparisonPredicateBuilder<ShoppingListLineItemQueryBuilderDsl> published() {
return new BooleanComparisonPredicateBuilder<>(
BinaryQueryPredicate.of().left(new ConstantQueryPredicate("published")),
p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemQueryBuilderDsl::of));

Check warning on line 75 in commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/shopping_list/ShoppingListLineItemQueryBuilderDsl.java

View check run for this annotation

Codecov / codecov/patch

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

Added lines #L73 - L75 were not covered by tests
}

public LongComparisonPredicateBuilder<ShoppingListLineItemQueryBuilderDsl> quantity() {
return new LongComparisonPredicateBuilder<>(
BinaryQueryPredicate.of().left(new ConstantQueryPredicate("quantity")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -401,3 +401,4 @@ f2c3348614fec5fe51dfb7adac8744e033626b8b
f0288f95a5fe33fd2973df3f8290defb15129192
21aedcd93ff144743f0570a5fd0b65af601baa76
761762c7caad45bc86b08db7021a033fff18ba90
dec65e707130185745930bde27ce78ae64ab29c1