diff --git a/changes.md b/changes.md
index a939cf9750e..aa8cd10ff7e 100644
--- a/changes.md
+++ b/changes.md
@@ -8,26 +8,29 @@
Changed Property(s)
+Required Property(s)
-- :warning: changed property `includedDiscounts` of type `DiscountedLineItemPriceDraft` from type `DiscountedLineItemPortion[]` to `DiscountedLineItemPortionDraft[]`
+- :warning: changed property `isOnStock` of type `ProductVariantAvailability` to be required
+- changed property `priceMode` of type `CustomLineItemDraft` to be optional
+- changed property `oldShipmentState` of type `OrderShipmentStateChangedMessage` to be optional
+- changed property `oldOrderState` of type `OrderStateChangedMessage` to be optional
+- changed property `oldShipmentState` of type `OrderShipmentStateChangedMessagePayload` to be optional
+- changed property `oldOrderState` of type `OrderStateChangedMessagePayload` to be optional
Added Property(s)
+Changed Property(s)
-- added property `totalTax` to type `TaxedPriceDraft`
+- :warning: changed property `includedDiscounts` of type `DiscountedLineItemPriceDraft` from type `DiscountedLineItemPortion[]` to `DiscountedLineItemPortionDraft[]`
Required Property(s)
+Added Property(s)
-- changed property `priceMode` of type `CustomLineItemDraft` to be optional
-- changed property `oldShipmentState` of type `OrderShipmentStateChangedMessage` to be optional
-- changed property `oldOrderState` of type `OrderStateChangedMessage` to be optional
-- changed property `oldShipmentState` of type `OrderShipmentStateChangedMessagePayload` to be optional
-- changed property `oldOrderState` of type `OrderStateChangedMessagePayload` to be optional
+- added property `totalTax` to type `TaxedPriceDraft`
+- added property `id` to type `ProductVariantAvailability`
+- added property `version` to type `ProductVariantAvailability`
* ProductVariantAvailability productVariantAvailability = ProductVariantAvailability.builder()
+ * .isOnStock(true)
* .build()
*
* Indicates whether a Product Variant is in stock.
* @return isOnStock */ - + @NotNull @JsonProperty("isOnStock") public Boolean getIsOnStock(); @@ -61,6 +63,22 @@ public interface ProductVariantAvailability { @JsonProperty("availableQuantity") public Long getAvailableQuantity(); + /** + *Unique identifier of the InventoryEntry.
+ * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *Current version of the InventoryEntry.
+ * @return version + */ + + @JsonProperty("version") + public Long getVersion(); + /** *For each InventoryEntry with a supply Channel, an entry is added to channels
.
Unique identifier of the InventoryEntry.
+ * @param id value to be set + */ + + public void setId(final String id); + + /** + *Current version of the InventoryEntry.
+ * @param version value to be set + */ + + public void setVersion(final Long version); + /** * factory method * @return instance of ProductVariantAvailability @@ -108,6 +140,8 @@ public static ProductVariantAvailability of(final ProductVariantAvailability tem instance.setIsOnStock(template.getIsOnStock()); instance.setRestockableInDays(template.getRestockableInDays()); instance.setAvailableQuantity(template.getAvailableQuantity()); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); return instance; } @@ -127,6 +161,8 @@ public static ProductVariantAvailability deepCopy(@Nullable final ProductVariant instance.setIsOnStock(template.getIsOnStock()); instance.setRestockableInDays(template.getRestockableInDays()); instance.setAvailableQuantity(template.getAvailableQuantity()); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantAvailabilityBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantAvailabilityBuilder.java index b98840fe00f..0fb42ecba68 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantAvailabilityBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantAvailabilityBuilder.java @@ -16,6 +16,7 @@ *
* ProductVariantAvailability productVariantAvailability = ProductVariantAvailability.builder()
+ * .isOnStock(true)
* .build()
*
* channels
.
* @param builder function to build the channels value
@@ -80,7 +86,7 @@ public ProductVariantAvailabilityBuilder channels(
* @return Builder
*/
- public ProductVariantAvailabilityBuilder isOnStock(@Nullable final Boolean isOnStock) {
+ public ProductVariantAvailabilityBuilder isOnStock(final Boolean isOnStock) {
this.isOnStock = isOnStock;
return this;
}
@@ -107,6 +113,28 @@ public ProductVariantAvailabilityBuilder availableQuantity(@Nullable final Long
return this;
}
+ /**
+ * Unique identifier of the InventoryEntry.
+ * @param id value to be set + * @return Builder + */ + + public ProductVariantAvailabilityBuilder id(@Nullable final String id) { + this.id = id; + return this; + } + + /** + *Current version of the InventoryEntry.
+ * @param version value to be set + * @return Builder + */ + + public ProductVariantAvailabilityBuilder version(@Nullable final Long version) { + this.version = version; + return this; + } + /** *For each InventoryEntry with a supply Channel, an entry is added to channels
.
Unique identifier of the InventoryEntry.
+ * @return id + */ + + @Nullable + public String getId() { + return this.id; + } + + /** + *Current version of the InventoryEntry.
+ * @return version + */ + + @Nullable + public Long getVersion() { + return this.version; + } + /** * builds ProductVariantAvailability with checking for non-null required values * @return ProductVariantAvailability */ public ProductVariantAvailability build() { - return new ProductVariantAvailabilityImpl(channels, isOnStock, restockableInDays, availableQuantity); + Objects.requireNonNull(isOnStock, ProductVariantAvailability.class + ": isOnStock is missing"); + return new ProductVariantAvailabilityImpl(channels, isOnStock, restockableInDays, availableQuantity, id, + version); } /** @@ -160,7 +209,8 @@ public ProductVariantAvailability build() { * @return ProductVariantAvailability */ public ProductVariantAvailability buildUnchecked() { - return new ProductVariantAvailabilityImpl(channels, isOnStock, restockableInDays, availableQuantity); + return new ProductVariantAvailabilityImpl(channels, isOnStock, restockableInDays, availableQuantity, id, + version); } /** @@ -182,6 +232,8 @@ public static ProductVariantAvailabilityBuilder of(final ProductVariantAvailabil builder.isOnStock = template.getIsOnStock(); builder.restockableInDays = template.getRestockableInDays(); builder.availableQuantity = template.getAvailableQuantity(); + builder.id = template.getId(); + builder.version = template.getVersion(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantAvailabilityImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantAvailabilityImpl.java index d869c8b64ed..190a249069f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantAvailabilityImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantAvailabilityImpl.java @@ -30,6 +30,10 @@ public class ProductVariantAvailabilityImpl implements ProductVariantAvailabilit private Long availableQuantity; + private String id; + + private Long version; + /** * create instance with all properties */ @@ -38,11 +42,14 @@ public class ProductVariantAvailabilityImpl implements ProductVariantAvailabilit @JsonProperty("channels") final com.commercetools.api.models.product.ProductVariantChannelAvailabilityMap channels, @JsonProperty("isOnStock") final Boolean isOnStock, @JsonProperty("restockableInDays") final Long restockableInDays, - @JsonProperty("availableQuantity") final Long availableQuantity) { + @JsonProperty("availableQuantity") final Long availableQuantity, @JsonProperty("id") final String id, + @JsonProperty("version") final Long version) { this.channels = channels; this.isOnStock = isOnStock; this.restockableInDays = restockableInDays; this.availableQuantity = availableQuantity; + this.id = id; + this.version = version; } /** @@ -83,6 +90,22 @@ public Long getAvailableQuantity() { return this.availableQuantity; } + /** + *Unique identifier of the InventoryEntry.
+ */ + + public String getId() { + return this.id; + } + + /** + *Current version of the InventoryEntry.
+ */ + + public Long getVersion() { + return this.version; + } + public void setChannels(final com.commercetools.api.models.product.ProductVariantChannelAvailabilityMap channels) { this.channels = channels; } @@ -99,6 +122,14 @@ public void setAvailableQuantity(final Long availableQuantity) { this.availableQuantity = availableQuantity; } + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + @Override public boolean equals(Object o) { if (this == o) @@ -113,10 +144,14 @@ public boolean equals(Object o) { .append(isOnStock, that.isOnStock) .append(restockableInDays, that.restockableInDays) .append(availableQuantity, that.availableQuantity) + .append(id, that.id) + .append(version, that.version) .append(channels, that.channels) .append(isOnStock, that.isOnStock) .append(restockableInDays, that.restockableInDays) .append(availableQuantity, that.availableQuantity) + .append(id, that.id) + .append(version, that.version) .isEquals(); } @@ -126,6 +161,8 @@ public int hashCode() { .append(isOnStock) .append(restockableInDays) .append(availableQuantity) + .append(id) + .append(version) .toHashCode(); } @@ -135,6 +172,8 @@ public String toString() { .append("isOnStock", isOnStock) .append("restockableInDays", restockableInDays) .append("availableQuantity", availableQuantity) + .append("id", id) + .append("version", version) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product/ProductVariantAvailabilityQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product/ProductVariantAvailabilityQueryBuilderDsl.java index 4776a8a1616..3007d7db5f1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product/ProductVariantAvailabilityQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product/ProductVariantAvailabilityQueryBuilderDsl.java @@ -41,4 +41,15 @@ public LongComparisonPredicateBuilder