InventoryAdjustment

Struct InventoryAdjustment 

Source
pub struct InventoryAdjustment {
Show 19 fields pub id: Option<String>, pub reference_id: Option<String>, pub from_state: Option<InventoryState>, pub to_state: Option<InventoryState>, pub location_id: Option<String>, pub catalog_object_id: Option<String>, pub catalog_object_type: Option<CatalogObjectType>, pub quantity: Option<String>, pub total_price_money: Option<Money>, pub occurred_at: Option<DateTime>, pub created_at: Option<DateTime>, pub source: Option<SourceApplication>, pub employee_id: Option<String>, pub team_member_id: Option<String>, pub transaction_id: Option<String>, pub refund_id: Option<String>, pub purchase_order_id: Option<String>, pub goods_receipt_id: Option<String>, pub adjustment_group: Option<InventoryAdjustmentGroup>,
}
Expand description

Represents a change in state or quantity of product inventory at a particular time and location.

Fields§

§id: Option<String>

A unique ID generated by Square for the InventoryAdjustment.

§reference_id: Option<String>

An optional ID provided by the application to tie the InventoryAdjustment

§from_state: Option<InventoryState>

The current inventory state for the related quantity of items.

§to_state: Option<InventoryState>

The current inventory state for the related quantity of items.

§location_id: Option<String>

The Square-generated ID of the Location where the related quantity of items is being tracked.

§catalog_object_id: Option<String>

The Square-generated ID of the CatalogObject being tracked.

§catalog_object_type: Option<CatalogObjectType>

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”

§quantity: Option<String>

The number of items affected by the estimated count as a decimal string.

§total_price_money: Option<Money>

Read only The total price paid for goods associated with the adjustment. Present if and only if to_state is SOLD. Always non-negative.

§occurred_at: Option<DateTime>

Read only An RFC 3339-formatted timestamp that indicates when the most recent physical count or adjustment affecting the estimated count is received.

§created_at: Option<DateTime>

Read only RFC 3339-formatted timestamp that indicates when the inventory adjustment is received.

§source: Option<SourceApplication>

The current inventory state for the related quantity of items.

§employee_id: Option<String>

The Square-generated ID of the Employee responsible for the inventory adjustment.

§team_member_id: Option<String>

The Square-generated ID of the Team Member responsible for the inventory adjustment.

§transaction_id: Option<String>

Read only The Square-generated ID of the Transaction that caused the adjustment. Only relevant for payment-related state transitions.

§refund_id: Option<String>

Read only The Square-generated ID of the Refund that caused the adjustment. Only relevant for refund-related state transitions.

§purchase_order_id: Option<String>

Read only The Square-generated ID of the purchase order that caused the adjustment. Only relevant for state transitions from the Square for Retail app.

§goods_receipt_id: Option<String>

Read only The Square-generated ID of the goods receipt that caused the adjustment. Only relevant for state transitions from the Square for Retail app.

§adjustment_group: Option<InventoryAdjustmentGroup>

Read only An adjustment group bundling the related adjustments of item variations through stock conversions in a single inventory event.

Trait Implementations§

Source§

impl Clone for InventoryAdjustment

Source§

fn clone(&self) -> InventoryAdjustment

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InventoryAdjustment

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for InventoryAdjustment

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for InventoryAdjustment

Source§

fn eq(&self, other: &InventoryAdjustment) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for InventoryAdjustment

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for InventoryAdjustment

Source§

impl StructuralPartialEq for InventoryAdjustment

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,