Interface InventoryEntry

All Superinterfaces:
BaseResource, Customizable<InventoryEntry>, DomainResource<InventoryEntry>, Identifiable<InventoryEntry>, InventoryEntryMixin, Referencable<InventoryEntry>, ResourceIdentifiable<InventoryEntry>, Versioned<InventoryEntry>, WithKey

InventoryEntry
Example to create an instance using the builder pattern

     InventoryEntry inventoryEntry = InventoryEntry.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .sku("{sku}")
             .quantityOnStock(0.3)
             .availableQuantity(0.3)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the InventoryEntry.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<InventoryEntry>
      Specified by:
      getId in interface Identifiable<InventoryEntry>
      Specified by:
      getId in interface Versioned<InventoryEntry>
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the InventoryEntry.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<InventoryEntry>
      Specified by:
      getVersion in interface Versioned<InventoryEntry>
      Returns:
      version
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the InventoryEntry was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the InventoryEntry was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the InventoryEntry.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      IDs and references that created the InventoryEntry.

      Returns:
      createdBy
    • getKey

      String getKey()

      User-defined unique identifier of the InventoryEntry.

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

      @NotNull @NotNull String getSku()

      ProductVariant sku of the InventoryEntry.

      Returns:
      sku
    • getSupplyChannel

      @Valid @Valid ChannelReference getSupplyChannel()

      Channel that supplies this InventoryEntry.

      Returns:
      supplyChannel
    • getQuantityOnStock

      @NotNull @NotNull Long getQuantityOnStock()

      Overall amount of stock (availableQuantity + reserved).

      Returns:
      quantityOnStock
    • getAvailableQuantity

      @NotNull @NotNull Long getAvailableQuantity()

      Available amount of stock (quantityOnStock - reserved).

      Returns:
      availableQuantity
    • 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 CustomFields getCustom()

      Custom Fields of the InventoryEntry.

      Specified by:
      getCustom in interface Customizable<InventoryEntry>
      Returns:
      custom
    • setId

      void setId(String id)

      Unique identifier of the InventoryEntry.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the InventoryEntry.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the InventoryEntry was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the InventoryEntry was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      IDs and references that last modified the InventoryEntry.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      IDs and references that created the InventoryEntry.

      Parameters:
      createdBy - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the InventoryEntry.

      Parameters:
      key - value to be set
    • setSku

      void setSku(String sku)

      ProductVariant sku of the InventoryEntry.

      Parameters:
      sku - value to be set
    • setSupplyChannel

      void setSupplyChannel(ChannelReference supplyChannel)

      Channel that supplies this InventoryEntry.

      Parameters:
      supplyChannel - value to be set
    • setQuantityOnStock

      void setQuantityOnStock(Long quantityOnStock)

      Overall amount of stock (availableQuantity + reserved).

      Parameters:
      quantityOnStock - value to be set
    • setAvailableQuantity

      void setAvailableQuantity(Long availableQuantity)

      Available amount of stock (quantityOnStock - reserved).

      Parameters:
      availableQuantity - 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(CustomFields custom)

      Custom Fields of the InventoryEntry.

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

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

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

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

      static InventoryEntryBuilder builder()
      builder factory method for InventoryEntry
      Returns:
      builder
    • builder

      static InventoryEntryBuilder builder(InventoryEntry template)
      create builder for InventoryEntry instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withInventoryEntry

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

      static ReferenceTypeId referenceTypeId()
    • typeReference

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