Struct square_api_client::models::CatalogStockConversion
source · [−]pub struct CatalogStockConversion {
pub stockable_item_variation_id: String,
pub stockable_quantity: String,
pub nonstockable_quantity: String,
}
Expand description
Represents the rule of conversion between a stockable [CatalogItemVariation] and a non-stockable
sell-by or receive-by CatalogItemVariation
that share the same underlying stock.
Fields
stockable_item_variation_id: String
References to the stockable [CatalogItemVariation] for this stock conversion. Selling,
receiving or recounting the non-stockable CatalogItemVariation
defined with a stock
conversion results in adjustments of this stockable CatalogItemVariation
. This immutable
field must reference a stockable CatalogItemVariation
that shares the parent [CatalogItem]
of the converted CatalogItemVariation
.
Min Length 1
stockable_quantity: String
The quantity of the stockable item variation (as identified by
stockable_item_variation_id
) equivalent to the non-stockable item variation quantity (as
specified in nonstockable_quantity
) as defined by this stock conversion. It accepts a
decimal number in a string format that can take up to 10 digits before the decimal point and
up to 5 digits after the decimal point.
Min Length 1 Max Length 16
nonstockable_quantity: String
The converted equivalent quantity of the non-stockable [CatalogItemVariation] in its
measurement unit. The stockable_quantity
value and this nonstockable_quantity
value
together define the conversion ratio between stockable item variation and the non-stockable
item variation. It accepts a decimal number in a string format that can take up to 10 digits
before the decimal point and up to 5 digits after the decimal point.
Min Length 1 Max Length 16
Trait Implementations
sourceimpl Clone for CatalogStockConversion
impl Clone for CatalogStockConversion
sourcefn clone(&self) -> CatalogStockConversion
fn clone(&self) -> CatalogStockConversion
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for CatalogStockConversion
impl Debug for CatalogStockConversion
sourceimpl Default for CatalogStockConversion
impl Default for CatalogStockConversion
sourcefn default() -> CatalogStockConversion
fn default() -> CatalogStockConversion
sourceimpl<'de> Deserialize<'de> for CatalogStockConversion
impl<'de> Deserialize<'de> for CatalogStockConversion
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
sourceimpl PartialEq<CatalogStockConversion> for CatalogStockConversion
impl PartialEq<CatalogStockConversion> for CatalogStockConversion
sourcefn eq(&self, other: &CatalogStockConversion) -> bool
fn eq(&self, other: &CatalogStockConversion) -> bool
sourceimpl Serialize for CatalogStockConversion
impl Serialize for CatalogStockConversion
impl Eq for CatalogStockConversion
impl StructuralEq for CatalogStockConversion
impl StructuralPartialEq for CatalogStockConversion
Auto Trait Implementations
impl RefUnwindSafe for CatalogStockConversion
impl Send for CatalogStockConversion
impl Sync for CatalogStockConversion
impl Unpin for CatalogStockConversion
impl UnwindSafe for CatalogStockConversion
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.