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