square_api_client/models/inventory_change.rs
1//! Model struct for InventoryChange type
2
3use serde::{Deserialize, Serialize};
4
5use super::{
6 enums::InventoryChangeType, CatalogMeasurementUnit, InventoryAdjustment,
7 InventoryPhysicalCount, InventoryTransfer,
8};
9
10/// Changes created for the request.
11#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
12pub struct InventoryChange {
13 /// Contains details about the inventory adjustment when type is ADJUSTMENT,
14 /// and is unset for all other change types.
15 pub adjustment: InventoryAdjustment,
16 /// Read only The CatalogMeasurementUnit object representing the catalog measurement unit
17 pub measurement_unit: CatalogMeasurementUnit,
18 /// ID of the CatalogMeasurementUnit object representing the catalog measurement unit
19 pub measurement_unit_id: String,
20 /// Contains details about the physical count when type is PHYSICAL_COUNT,
21 /// and is unset for all other change types.
22 pub physical_count: InventoryPhysicalCount,
23 /// TContains details about the inventory transfer when type is TRANSFER,
24 /// and is unset for all other change types.
25 pub transfer: InventoryTransfer,
26 /// Indicates how the inventory change is applied.
27 /// See InventoryChangeType for all possible values.
28 pub change_type: InventoryChangeType,
29}