Interface InventoryEntryDraft

All Superinterfaces:
CustomizableDraft<InventoryEntryDraft>, Draft<InventoryEntryDraft>, WithKey

public interface InventoryEntryDraft extends CustomizableDraft<InventoryEntryDraft>, WithKey, Draft<InventoryEntryDraft>
InventoryEntryDraft
Example to create an instance using the builder pattern

     InventoryEntryDraft inventoryEntryDraft = InventoryEntryDraft.builder()
             .sku("{sku}")
             .quantityOnStock(0.3)
             .build()
 
  • Method Details

    • getSku

      @NotNull @NotNull String getSku()

      ProductVariant sku of the InventoryEntry.

      Returns:
      sku
    • getKey

      String getKey()

      User-defined unique identifier for the InventoryEntry.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getSupplyChannel

      @Valid @Valid ChannelResourceIdentifier getSupplyChannel()

      Channel that supplies this InventoryEntry.

      Returns:
      supplyChannel
    • getQuantityOnStock

      @NotNull @NotNull Long getQuantityOnStock()

      Overall amount of stock.

      Returns:
      quantityOnStock
    • getRestockableInDays

      Long getRestockableInDays()

      How often the InventoryEntry is restocked (in days).

      Returns:
      restockableInDays
    • getExpectedDelivery

      ZonedDateTime getExpectedDelivery()

      Date and time of the next restock.

      Returns:
      expectedDelivery
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields of the InventoryEntry.

      Specified by:
      getCustom in interface CustomizableDraft<InventoryEntryDraft>
      Returns:
      custom
    • setSku

      void setSku(String sku)

      ProductVariant sku of the InventoryEntry.

      Parameters:
      sku - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier for the InventoryEntry.

      Parameters:
      key - value to be set
    • setSupplyChannel

      void setSupplyChannel(ChannelResourceIdentifier supplyChannel)

      Channel that supplies this InventoryEntry.

      Parameters:
      supplyChannel - value to be set
    • setQuantityOnStock

      void setQuantityOnStock(Long quantityOnStock)

      Overall amount of stock.

      Parameters:
      quantityOnStock - value to be set
    • setRestockableInDays

      void setRestockableInDays(Long restockableInDays)

      How often the InventoryEntry is restocked (in days).

      Parameters:
      restockableInDays - value to be set
    • setExpectedDelivery

      void setExpectedDelivery(ZonedDateTime expectedDelivery)

      Date and time of the next restock.

      Parameters:
      expectedDelivery - value to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields of the InventoryEntry.

      Specified by:
      setCustom in interface CustomizableDraft<InventoryEntryDraft>
      Parameters:
      custom - value to be set
    • of

      static InventoryEntryDraft of()
      factory method
      Returns:
      instance of InventoryEntryDraft
    • of

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

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

      static InventoryEntryDraftBuilder builder()
      builder factory method for InventoryEntryDraft
      Returns:
      builder
    • builder

      create builder for InventoryEntryDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withInventoryEntryDraft

      default <T> T withInventoryEntryDraft(Function<InventoryEntryDraft,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<InventoryEntryDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference