Interface ProductVariantAvailability


public interface ProductVariantAvailability

The InventoryEntry information of the Product Variant. If there is a supply Channel for the InventoryEntry, then channels is returned. If not, then isOnStock, restockableInDays, and quantityOnStock are returned.


Example to create an instance using the builder pattern

     ProductVariantAvailability productVariantAvailability = ProductVariantAvailability.builder()
             .build()
 
  • Method Details

    • getChannels

      @Valid @Valid ProductVariantChannelAvailabilityMap getChannels()

      For each InventoryEntry with a supply Channel, an entry is added to channels.

      Returns:
      channels
    • getIsOnStock

      Boolean getIsOnStock()

      Indicates whether a Product Variant is in stock.

      Returns:
      isOnStock
    • getRestockableInDays

      Long getRestockableInDays()

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

      Returns:
      restockableInDays
    • getAvailableQuantity

      Long getAvailableQuantity()

      Number of items of the Product Variant that are in stock.

      Returns:
      availableQuantity
    • getId

      String getId()

      Unique identifier of the InventoryEntry.

      Returns:
      id
    • getVersion

      Long getVersion()

      Current version of the InventoryEntry.

      Returns:
      version
    • setChannels

      void setChannels(ProductVariantChannelAvailabilityMap channels)

      For each InventoryEntry with a supply Channel, an entry is added to channels.

      Parameters:
      channels - value to be set
    • setIsOnStock

      void setIsOnStock(Boolean isOnStock)

      Indicates whether a Product Variant is in stock.

      Parameters:
      isOnStock - value to be set
    • setRestockableInDays

      void setRestockableInDays(Long restockableInDays)

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

      Parameters:
      restockableInDays - value to be set
    • setAvailableQuantity

      void setAvailableQuantity(Long availableQuantity)

      Number of items of the Product Variant that are in stock.

      Parameters:
      availableQuantity - value to be set
    • setId

      void setId(String id)

      Unique identifier of the InventoryEntry.

      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the InventoryEntry.

      Parameters:
      version - value to be set
    • of

      factory method
      Returns:
      instance of ProductVariantAvailability
    • of

      factory method to create a shallow copy ProductVariantAvailability
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ProductVariantAvailability
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductVariantAvailability
      Returns:
      builder
    • builder

      create builder for ProductVariantAvailability instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductVariantAvailability

      default <T> T withProductVariantAvailability(Function<ProductVariantAvailability,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ProductVariantAvailability> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference