Class InventoryEntryIdentifier
- java.lang.Object
-
- com.commercetools.sync.inventories.helpers.InventoryEntryIdentifier
-
public final class InventoryEntryIdentifier extends java.lang.Object
This class provides as a container of the unique identifier of anInventoryEntry
for the sync which is a combination of the SKU and the supply channel id of this inventory entry.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
java.lang.String
getSku()
java.lang.String
getSupplyChannelId()
int
hashCode()
static InventoryEntryIdentifier
of(com.commercetools.api.models.inventory.InventoryEntry inventoryEntry)
Builds anInventoryEntryIdentifier
instance given anInventoryEntry
using it's sku and supply channel id.static InventoryEntryIdentifier
of(com.commercetools.api.models.inventory.InventoryEntryDraft inventoryEntryDraft)
Builds anInventoryEntryIdentifier
instance given anInventoryEntryDraft
using its sku and supply channel id.java.lang.String
toString()
-
-
-
Method Detail
-
of
public static InventoryEntryIdentifier of(@Nonnull com.commercetools.api.models.inventory.InventoryEntryDraft inventoryEntryDraft)
Builds anInventoryEntryIdentifier
instance given anInventoryEntryDraft
using its sku and supply channel id.- Parameters:
inventoryEntryDraft
- the draft to take the sku and supply channel id value from.- Returns:
- an instance of
InventoryEntryIdentifier
for the given draft.
-
of
public static InventoryEntryIdentifier of(@Nonnull com.commercetools.api.models.inventory.InventoryEntry inventoryEntry)
Builds anInventoryEntryIdentifier
instance given anInventoryEntry
using it's sku and supply channel id.- Parameters:
inventoryEntry
- the entry to take the sku and channel id value from.- Returns:
- an instance of
InventoryEntryIdentifier
for the given entry.
-
getSku
public java.lang.String getSku()
-
getSupplyChannelId
public java.lang.String getSupplyChannelId()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-