square_api_client/models/
inventory_count.rs

1//! Model struct for InventoryCount type
2
3use serde::Deserialize;
4
5use super::enums::InventoryState;
6
7/// The current calculated inventory counts for the requested object and locations.
8#[derive(Clone, Debug, Deserialize, Eq, PartialEq)]
9pub struct InventoryCount {
10    /// Read only An RFC 3339-formatted timestamp that indicates when the most recent physical
11    /// count or adjustment affecting the estimated count is received.
12    pub calculated_at: String,
13    /// The Square-generated ID of the CatalogObject being tracked.
14    pub catalog_object_id: String,
15    /// The type of the CatalogObject being tracked.
16    /// The Inventory API supports setting and reading the "catalog_object_type": "ITEM_VARIATION"
17    /// In addition, it can also read the "catalog_object_type": "ITEM"
18    pub catalog_object_type: String,
19    /// Read only Whether the inventory count is for composed variation (TRUE) or not (FALSE).
20    pub is_estimated: bool,
21    /// The Square-generated ID of the Location where the related quantity of items is being tracked.
22    pub location_id: String,
23    /// The number of items affected by the estimated count as a decimal string.
24    pub quantity: String,
25    /// The current inventory state for the related quantity of items.
26    pub state: InventoryState,
27}