Class ProductVariantChannelAvailabilityBuilder

java.lang.Object
com.commercetools.api.models.product.ProductVariantChannelAvailabilityBuilder
All Implemented Interfaces:
Builder<ProductVariantChannelAvailability>

public class ProductVariantChannelAvailabilityBuilder extends Object implements Builder<ProductVariantChannelAvailability>
ProductVariantChannelAvailabilityBuilder
Example to create an instance using the builder pattern

     ProductVariantChannelAvailability productVariantChannelAvailability = ProductVariantChannelAvailability.builder()
             .id("{id}")
             .version(0.3)
             .build()
 
  • Constructor Details

    • ProductVariantChannelAvailabilityBuilder

      public ProductVariantChannelAvailabilityBuilder()
  • Method Details

    • isOnStock

      Indicates whether a Product Variant is in stock in a specified Channel.

      Parameters:
      isOnStock - value to be set
      Returns:
      Builder
    • restockableInDays

      public ProductVariantChannelAvailabilityBuilder restockableInDays(@Nullable Long restockableInDays)

      Number of days to restock a Product Variant once it is out of stock in a specified Channel.

      Parameters:
      restockableInDays - value to be set
      Returns:
      Builder
    • availableQuantity

      public ProductVariantChannelAvailabilityBuilder availableQuantity(@Nullable Long availableQuantity)

      Number of items of this Product Variant that are in stock in a specified Channel.

      Parameters:
      availableQuantity - value to be set
      Returns:
      Builder
    • id

      Unique identifier of the InventoryEntry.

      Parameters:
      id - value to be set
      Returns:
      Builder
    • version

      Current version of the InventoryEntry.

      Parameters:
      version - value to be set
      Returns:
      Builder
    • getIsOnStock

      @Nullable public Boolean getIsOnStock()

      Indicates whether a Product Variant is in stock in a specified Channel.

      Returns:
      isOnStock
    • getRestockableInDays

      @Nullable public Long getRestockableInDays()

      Number of days to restock a Product Variant once it is out of stock in a specified Channel.

      Returns:
      restockableInDays
    • getAvailableQuantity

      @Nullable public Long getAvailableQuantity()

      Number of items of this Product Variant that are in stock in a specified Channel.

      Returns:
      availableQuantity
    • getId

      public String getId()

      Unique identifier of the InventoryEntry.

      Returns:
      id
    • getVersion

      public Long getVersion()

      Current version of the InventoryEntry.

      Returns:
      version
    • build

      builds ProductVariantChannelAvailability with checking for non-null required values
      Specified by:
      build in interface Builder<ProductVariantChannelAvailability>
      Returns:
      ProductVariantChannelAvailability
    • buildUnchecked

      public ProductVariantChannelAvailability buildUnchecked()
      builds ProductVariantChannelAvailability without checking for non-null required values
      Returns:
      ProductVariantChannelAvailability
    • of

      factory method for an instance of ProductVariantChannelAvailabilityBuilder
      Returns:
      builder
    • of

      create builder for ProductVariantChannelAvailability instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder