Class InventoryEntryIdentifier


  • public final class InventoryEntryIdentifier
    extends java.lang.Object
    This class provides as a container of the unique identifier of an InventoryEntry for the sync which is a combination of both the SKU of the inventory entry and the supply channel key of this inventory entry.
    • Method Detail

      • of

        public static InventoryEntryIdentifier of​(@Nonnull
                                                  io.sphere.sdk.inventory.InventoryEntryDraft inventoryEntryDraft)
        Builds an InventoryEntryIdentifier instance given an InventoryEntryDraft using its sku and supply channel key.
        Parameters:
        inventoryEntryDraft - the draft to take the sku and channel key value from.
        Returns:
        an instance of InventoryEntryIdentifier for the given draft.
      • of

        public static InventoryEntryIdentifier of​(@Nonnull
                                                  io.sphere.sdk.inventory.InventoryEntry inventoryEntry)
        Builds an InventoryEntryIdentifier instance given an InventoryEntry 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.
      • of

        public static InventoryEntryIdentifier of​(@Nonnull
                                                  java.lang.String inventoryEntrySku,
                                                  @Nullable
                                                  java.lang.String inventoryEntryChannelKey)
        Builds an InventoryEntryIdentifier instance given an sku and supply channel id.
        Parameters:
        inventoryEntrySku - the SKU of the inventory entry.
        inventoryEntryChannelKey - the channel key of the inventory entry.
        Returns:
        an instance of InventoryEntryIdentifier for the given entry.
      • getInventoryEntrySku

        public java.lang.String getInventoryEntrySku()
      • getInventoryEntryChannelKey

        public java.lang.String getInventoryEntryChannelKey()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object