pub struct LocationOffering {
pub location_id: LocationId,
pub product: Product,
pub status: OfferingStatus,
pub usage: Usage,
pub pos: Policy,
pub inventory: Policy,
pub reorder: Policy,
}Expand description
Location-specific product offering with POS, inventory, and reorder policies attached.
Fields§
§location_id: LocationIdSource-derived location id carried by this retail contract.
product: ProductSource-derived product carried by this retail contract.
status: OfferingStatusSource-derived status carried by this retail contract.
usage: UsageSource-derived usage carried by this retail contract.
pos: PolicySource-derived pos carried by this retail contract.
inventory: PolicySource-derived inventory carried by this retail contract.
reorder: PolicySource-derived reorder carried by this retail contract.
Implementations§
Source§impl LocationOffering
impl LocationOffering
Sourcepub fn builder() -> LocationOfferingBuilder
pub fn builder() -> LocationOfferingBuilder
Create an instance of LocationOffering using the builder syntax
Source§impl LocationOffering
impl LocationOffering
Sourcepub fn can_be_sold_to_customer(&self) -> bool
pub fn can_be_sold_to_customer(&self) -> bool
Reports whether the product is active and customer-sellable at this location.
Sourcepub fn has_available_sale_units(&self, quantity: Quantity) -> bool
pub fn has_available_sale_units(&self, quantity: Quantity) -> bool
Checks tracked inventory before allowing a POS sale draft for the requested quantity.
Trait Implementations§
Source§impl Clone for LocationOffering
impl Clone for LocationOffering
Source§fn clone(&self) -> LocationOffering
fn clone(&self) -> LocationOffering
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocationOffering
impl Debug for LocationOffering
Source§impl<'de> Deserialize<'de> for LocationOffering
impl<'de> Deserialize<'de> for LocationOffering
Source§fn 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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LocationOffering
impl PartialEq for LocationOffering
Source§impl Serialize for LocationOffering
impl Serialize for LocationOffering
impl Eq for LocationOffering
impl StructuralPartialEq for LocationOffering
Auto Trait Implementations§
impl Freeze for LocationOffering
impl RefUnwindSafe for LocationOffering
impl Send for LocationOffering
impl Sync for LocationOffering
impl Unpin for LocationOffering
impl UnsafeUnpin for LocationOffering
impl UnwindSafe for LocationOffering
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more