RTSDK
    Preparing search index...

    Class InventoryItemFactory

    Factory for creating InventoryItem instances. Use this factory to work with inventory items in the Topia platform.

    This factory should be instantiated once per application and reused across your codebase.

    inventory, factory, create, get, item

    // In your initialization file (e.g., utils/topiaInit.ts)
    import { Topia, InventoryItemFactory } from "@rtsdk/topia";
    const topia = new Topia({ config });
    export const Inventory = new InventoryItemFactory(topia);
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    topia: Topia

    Methods

    • Instantiate a new instance of InventoryItem class for an inventory item.

      Parameters

      • id: string
      • Optionaloptions: object

      Returns InventoryItem

      Returns a new InventoryItem object for interacting with the specified item.

      const item = Inventory.create("item-id-123", { credentials });
      
    • Retrieve an inventory item and all its properties.

      Parameters

      • id: string
      • Optionaloptions: object

      Returns Promise<InventoryItem>

      Returns a new InventoryItem object with all properties.

      const item = await Inventory.get("item-id-123", { credentials });