import type * as Square from "../index"; /** * Represents a change in state or quantity of product inventory at a * particular time and location. */ export interface InventoryAdjustment { /** * A unique ID generated by Square for the * `InventoryAdjustment`. */ id?: string; /** * An optional ID provided by the application to tie the * `InventoryAdjustment` to an external * system. */ referenceId?: string | null; /** * The [inventory state](entity:InventoryState) of the related quantity * of items before the adjustment. * See [InventoryState](#type-inventorystate) for possible values */ fromState?: Square.InventoryState; /** * The [inventory state](entity:InventoryState) of the related quantity * of items after the adjustment. * See [InventoryState](#type-inventorystate) for possible values */ toState?: Square.InventoryState; /** * The Square-generated ID of the [Location](entity:Location) where the related * quantity of items is being tracked before the adjustment. */ fromLocationId?: string | null; /** * The Square-generated ID of the [Location](entity:Location) where the related * quantity of items is being tracked after the adjustment. */ toLocationId?: string | null; /** * The Square-generated ID of the * [CatalogObject](entity:CatalogObject) being tracked. */ catalogObjectId?: string | null; /** * The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked. * * The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value. * In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app. */ catalogObjectType?: string | null; /** * The number of items affected by the adjustment as a decimal string. * Can support up to 5 digits after the decimal point. */ quantity?: string | null; /** * The total price paid for goods associated with the * adjustment. Present if and only if `to_state` is `SOLD`. Always * non-negative. */ totalPriceMoney?: Square.Money; /** * A client-generated RFC 3339-formatted timestamp that indicates when * the inventory adjustment took place. For inventory adjustment updates, the `occurred_at` * timestamp cannot be older than 24 hours or in the future relative to the * time of the request. */ occurredAt?: string | null; /** An RFC 3339-formatted timestamp that indicates when the inventory adjustment is received. */ createdAt?: string; /** * Information about the application that caused the * inventory adjustment. */ source?: Square.SourceApplication; /** * The Square-generated ID of the [Employee](entity:Employee) responsible for the * inventory adjustment. */ employeeId?: string | null; /** * The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the * inventory adjustment. */ teamMemberId?: string | null; /** * The Square-generated ID of the [Transaction](entity:Transaction) that * caused the adjustment. Only relevant for payment-related state * transitions. */ transactionId?: string; /** * The Square-generated ID of the [Refund](entity:Refund) that * caused the adjustment. Only relevant for refund-related state * transitions. */ refundId?: string; /** * The Square-generated ID of the purchase order that caused the * adjustment. Only relevant for state transitions from the Square for Retail * app. */ purchaseOrderId?: string; /** * The Square-generated ID of the goods receipt that caused the * adjustment. Only relevant for state transitions from the Square for Retail * app. */ goodsReceiptId?: string; /** An adjustment group bundling the related adjustments of item variations through stock conversions in a single inventory event. */ adjustmentGroup?: Square.InventoryAdjustmentGroup; /** * The total amount paid by the merchant to the supplying vendor for these units of the product. * This field is only applicable for stock receive adjustments that introduce stock into the system (from_state is NONE or UNLINKED_RETURN). * May be empty. * This field will only accept writes if the merchant has an active subscription for either Retail Plus, Restaurants Plus, or Restaurants Premium. */ costMoney?: Square.Money; /** * The Square-generated ID of the Vendor from which the merchant purchased this product. * This field is only applicable for stock receive adjustments that introduce stock into the system (from_state is NONE or UNLINKED_RETURN). * This field will only accept writes if the merchant has an active subscription for either Retail Plus, Restaurants Plus, or Restaurants Premium. */ vendorId?: string | null; /** * The Square-generated ID of the InventoryPhysicalCount (recount) that generated this adjustment, if applicable. * The quantity of an adjustment generated by a physical count cannot be edited. */ physicalCountId?: string; /** Identifies the reason for this inventory adjustment. */ reasonId?: Square.InventoryAdjustmentReasonId; }