Skip to content

Commit

Permalink
build(codegen): updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed May 30, 2024
1 parent 55689ba commit bd35b80
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- changed property `stores` of type `BusinessUnit` to be optional
- changed property `stores` of type `Company` to be optional
- changed property `stores` of type `Division` to be optional
- changed property `isOnStock` of type `ProductVariantAvailability` to be optional
</details>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import javax.annotation.Nullable;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
Expand All @@ -22,7 +21,6 @@
* <div class=code-example>
* <pre><code class='java'>
* ProductVariantAvailability productVariantAvailability = ProductVariantAvailability.builder()
* .isOnStock(true)
* .build()
* </code></pre>
* </div>
Expand All @@ -43,7 +41,7 @@ public interface ProductVariantAvailability {
* <p>Indicates whether a Product Variant is in stock.</p>
* @return isOnStock
*/
@NotNull

@JsonProperty("isOnStock")
public Boolean getIsOnStock();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* <div class=code-example>
* <pre><code class='java'>
* ProductVariantAvailability productVariantAvailability = ProductVariantAvailability.builder()
* .isOnStock(true)
* .build()
* </code></pre>
* </div>
Expand All @@ -27,6 +26,7 @@ public class ProductVariantAvailabilityBuilder implements Builder<ProductVariant
@Nullable
private com.commercetools.api.models.product.ProductVariantChannelAvailabilityMap channels;

@Nullable
private Boolean isOnStock;

@Nullable
Expand Down Expand Up @@ -86,7 +86,7 @@ public ProductVariantAvailabilityBuilder channels(
* @return Builder
*/

public ProductVariantAvailabilityBuilder isOnStock(final Boolean isOnStock) {
public ProductVariantAvailabilityBuilder isOnStock(@Nullable final Boolean isOnStock) {
this.isOnStock = isOnStock;
return this;
}
Expand Down Expand Up @@ -150,6 +150,7 @@ public com.commercetools.api.models.product.ProductVariantChannelAvailabilityMap
* @return isOnStock
*/

@Nullable
public Boolean getIsOnStock() {
return this.isOnStock;
}
Expand Down Expand Up @@ -199,7 +200,6 @@ public Long getVersion() {
* @return ProductVariantAvailability
*/
public ProductVariantAvailability build() {
Objects.requireNonNull(isOnStock, ProductVariantAvailability.class + ": isOnStock is missing");
return new ProductVariantAvailabilityImpl(channels, isOnStock, restockableInDays, availableQuantity, id,
version);
}
Expand Down
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,4 @@ f1d13dc3acf6960cda08494da701d04a46f9eb3f
eac13cfcb88a83f4f4e977ba51c0b11e458cff61
6abab3f555aab9f5aa5b8a1b551235188fbb9201
1b650bc8eb1a78c3487484900b1e36d06226c6e2
9f96ac14ba13a3702b5d59c67900ee92b5416075

0 comments on commit bd35b80

Please sign in to comment.