Interface InventoryEntry
- All Superinterfaces:
BaseResource
,Customizable<InventoryEntry>
,DomainResource<InventoryEntry>
,Identifiable<InventoryEntry>
,InventoryEntryMixin
,Referencable<InventoryEntry>
,ResourceIdentifiable<InventoryEntry>
,Versioned<InventoryEntry>
,WithKey
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 Summary
Modifier and TypeMethodDescriptionstatic InventoryEntryBuilder
builder()
builder factory method for InventoryEntrystatic InventoryEntryBuilder
builder
(InventoryEntry template) create builder for InventoryEntry instancestatic InventoryEntry
deepCopy
(InventoryEntry template) factory method to create a deep copy of InventoryEntry@NotNull Long
Available amount of stock (quantityOnStock
- reserved).@NotNull ZonedDateTime
Date and time (UTC) the InventoryEntry was initially created.@Valid CreatedBy
IDs and references that created the InventoryEntry.@Valid CustomFields
Custom Fields of the InventoryEntry.Date and time of the next restock.@NotNull String
getId()
Unique identifier of the InventoryEntry.getKey()
User-defined unique identifier of the InventoryEntry.@NotNull ZonedDateTime
Date and time (UTC) the InventoryEntry was last updated.@Valid LastModifiedBy
IDs and references that last modified the InventoryEntry.@NotNull Long
Overall amount of stock (availableQuantity
+ reserved).How often the InventoryEntry is restocked (in days).@NotNull String
getSku()
ProductVariantsku
of the InventoryEntry.@Valid ChannelReference
Channel that supplies this InventoryEntry.@NotNull Long
Current version of the InventoryEntry.static InventoryEntry
of()
factory methodstatic InventoryEntry
of
(InventoryEntry template) factory method to create a shallow copy InventoryEntrystatic ReferenceTypeId
void
setAvailableQuantity
(Long availableQuantity) Available amount of stock (quantityOnStock
- reserved).void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the InventoryEntry was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the InventoryEntry.void
setCustom
(CustomFields custom) Custom Fields of the InventoryEntry.void
setExpectedDelivery
(ZonedDateTime expectedDelivery) Date and time of the next restock.void
Unique identifier of the InventoryEntry.void
User-defined unique identifier of the InventoryEntry.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the InventoryEntry was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the InventoryEntry.void
setQuantityOnStock
(Long quantityOnStock) Overall amount of stock (availableQuantity
+ reserved).void
setRestockableInDays
(Long restockableInDays) How often the InventoryEntry is restocked (in days).void
ProductVariantsku
of the InventoryEntry.void
setSupplyChannel
(ChannelReference supplyChannel) Channel that supplies this InventoryEntry.void
setVersion
(Long version) Current version of the InventoryEntry.static com.fasterxml.jackson.core.type.TypeReference<InventoryEntry>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withInventoryEntry
(Function<InventoryEntry, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface com.commercetools.api.models.inventory.InventoryEntryMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the InventoryEntry.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<InventoryEntry>
- Specified by:
getId
in interfaceIdentifiable<InventoryEntry>
- Specified by:
getId
in interfaceVersioned<InventoryEntry>
- Returns:
- id
-
getVersion
Current version of the InventoryEntry.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<InventoryEntry>
- Specified by:
getVersion
in interfaceVersioned<InventoryEntry>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the InventoryEntry was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the InventoryEntry was last updated.
- Specified by:
getLastModifiedAt
in interfaceBaseResource
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the InventoryEntry.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the InventoryEntry.
- Returns:
- createdBy
-
getKey
String getKey()User-defined unique identifier of the InventoryEntry.
-
getSku
ProductVariant
sku
of the InventoryEntry.- Returns:
- sku
-
getSupplyChannel
Channel that supplies this InventoryEntry.
- Returns:
- supplyChannel
-
getQuantityOnStock
Overall amount of stock (
availableQuantity
+ reserved).- Returns:
- quantityOnStock
-
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
Custom Fields of the InventoryEntry.
- Specified by:
getCustom
in interfaceCustomizable<InventoryEntry>
- Returns:
- custom
-
setId
Unique identifier of the InventoryEntry.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the InventoryEntry.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the InventoryEntry was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the InventoryEntry was last updated.
- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
IDs and references that last modified the InventoryEntry.
- Parameters:
lastModifiedBy
- value to be set
-
setCreatedBy
IDs and references that created the InventoryEntry.
- Parameters:
createdBy
- value to be set
-
setKey
User-defined unique identifier of the InventoryEntry.
- Parameters:
key
- value to be set
-
setSku
ProductVariant
sku
of the InventoryEntry.- Parameters:
sku
- value to be set
-
setSupplyChannel
Channel that supplies this InventoryEntry.
- Parameters:
supplyChannel
- value to be set
-
setQuantityOnStock
Overall amount of stock (
availableQuantity
+ reserved).- Parameters:
quantityOnStock
- value to be set
-
setAvailableQuantity
Available amount of stock (
quantityOnStock
- reserved).- Parameters:
availableQuantity
- value to be set
-
setRestockableInDays
How often the InventoryEntry is restocked (in days).
- Parameters:
restockableInDays
- value to be set
-
setExpectedDelivery
Date and time of the next restock.
- Parameters:
expectedDelivery
- value to be set
-
setCustom
Custom Fields of the InventoryEntry.
- Specified by:
setCustom
in interfaceCustomizable<InventoryEntry>
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of InventoryEntry
-
of
factory method to create a shallow copy InventoryEntry- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of InventoryEntry- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InventoryEntry- Returns:
- builder
-
builder
create builder for InventoryEntry instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withInventoryEntry
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
referenceTypeId
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-