Interface InventoryImport

All Superinterfaces:
ImportResource

public interface InventoryImport extends ImportResource

The data representation for an Inventory to be imported that is persisted as a Inventory in the Project.


Example to create an instance using the builder pattern

     InventoryImport inventoryImport = InventoryImport.builder()
             .key("{key}")
             .sku("{sku}")
             .quantityOnStock(0.3)
             .build()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier. If an InventoryEntry with this key exists, it will be updated with the imported data.

      Specified by:
      getKey in interface ImportResource
      Returns:
      key
    • getSku

      @NotNull @NotNull String getSku()

      Maps to Inventory.sku

      Returns:
      sku
    • getQuantityOnStock

      @NotNull @NotNull Long getQuantityOnStock()

      Maps to Inventory.quantityOnStock

      Returns:
      quantityOnStock
    • getRestockableInDays

      Long getRestockableInDays()

      Maps to Inventory.restockableInDays

      Returns:
      restockableInDays
    • getExpectedDelivery

      ZonedDateTime getExpectedDelivery()

      Maps to Inventory.expectedDelivery

      Returns:
      expectedDelivery
    • getSupplyChannel

      @Valid @Valid ChannelKeyReference getSupplyChannel()

      Maps to Inventory.supplyChannel

      Returns:
      supplyChannel
    • getCustom

      @Valid @Valid Custom getCustom()

      Maps to Inventory.custom.

      Returns:
      custom
    • setKey

      void setKey(String key)

      User-defined unique identifier. If an InventoryEntry with this key exists, it will be updated with the imported data.

      Specified by:
      setKey in interface ImportResource
      Parameters:
      key - value to be set
    • setSku

      void setSku(String sku)

      Maps to Inventory.sku

      Parameters:
      sku - value to be set
    • setQuantityOnStock

      void setQuantityOnStock(Long quantityOnStock)

      Maps to Inventory.quantityOnStock

      Parameters:
      quantityOnStock - value to be set
    • setRestockableInDays

      void setRestockableInDays(Long restockableInDays)

      Maps to Inventory.restockableInDays

      Parameters:
      restockableInDays - value to be set
    • setExpectedDelivery

      void setExpectedDelivery(ZonedDateTime expectedDelivery)

      Maps to Inventory.expectedDelivery

      Parameters:
      expectedDelivery - value to be set
    • setSupplyChannel

      void setSupplyChannel(ChannelKeyReference supplyChannel)

      Maps to Inventory.supplyChannel

      Parameters:
      supplyChannel - value to be set
    • setCustom

      void setCustom(Custom custom)

      Maps to Inventory.custom.

      Parameters:
      custom - value to be set
    • of

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

      static InventoryImport of(InventoryImport template)
      factory method to create a shallow copy InventoryImport
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static InventoryImport deepCopy(@Nullable InventoryImport template)
      factory method to create a deep copy of InventoryImport
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static InventoryImportBuilder builder()
      builder factory method for InventoryImport
      Returns:
      builder
    • builder

      static InventoryImportBuilder builder(InventoryImport template)
      create builder for InventoryImport instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withInventoryImport

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