square_api_client/models/inventory_transfer.rs
1//! Model struct for InventoryTransfer type
2
3use serde::{Deserialize, Serialize};
4
5use super::{enums::InventoryState, SourceApplication};
6
7/// Represents the transfer of a quantity of product inventory at a particular time from one location to another.
8#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
9pub struct InventoryTransfer {
10 /// A unique ID generated by Square for the InventoryTransfer.
11 pub id: String,
12 /// An optional ID provided by the application to tie the InventoryTransfer to an external system.
13 pub reference_id: String,
14 /// The current inventory state for the related quantity of items.
15 pub state: InventoryState,
16 /// The Square-generated ID of the Location where the related quantity of items is being tracked.
17 pub from_location_id: String,
18 /// The Square-generated ID of the Location where the related quantity of items is being tracked.
19 pub to_location_id: String,
20 /// The Square-generated ID of the CatalogObject being tracked.
21 pub catalog_object_id: String,
22 /// The type of the CatalogObject being tracked.
23 /// The Inventory API supports setting and reading the "catalog_object_type": "ITEM_VARIATION"
24 /// In addition, it can also read the "catalog_object_type": "ITEM"
25 pub catalog_object_type: String,
26 /// The number of items affected by the transfer as a decimal string.
27 /// Can support up to 5 digits after the decimal point.
28 pub quantity: String,
29 /// Read only An RFC 3339-formatted timestamp that indicates when the most recent physical
30 /// count or adjustment affecting the estimated count is received.
31 pub occurred_at: String,
32 /// Read only An RFC 3339-formatted timestamp that indicates when Square received the transfer request.
33 pub created_at: String,
34 /// Read only Information about the application that initiated the inventory transfer.
35 pub source: SourceApplication,
36 /// The Square-generated ID of the Employee responsible for the inventory transfer.
37 pub employee_id: String,
38 /// The Square-generated ID of the Team Member responsible for the inventory transfer.
39 pub team_member_id: String,
40}