pub struct PersonalOfferView {
pub title: String,
pub price: Option<f64>,
pub price_unit: Option<String>,
pub normal_price: Option<f64>,
pub discount_percentage: Option<String>,
pub remaining_quantity: Option<u32>,
pub valid_until: Option<String>,
pub products: Vec<PersonalOfferProductView>,
}Fields§
§title: String§price: Option<f64>§price_unit: Option<String>What price buys, e.g. “3 kpl” for a buy-three bundle. Read this before
treating price as a per-item price – it usually is not for a bundle offer.
normal_price: Option<f64>§discount_percentage: Option<String>§remaining_quantity: Option<u32>§valid_until: Option<String>§products: Vec<PersonalOfferProductView>Any one of these that is available redeems the offer – pass an available EAN
to add_to_cart. is_available still has to be checked here, same as
search_products: an offer can list a product this store does not stock.
Every offer observed so far was already loaded onto the account’s Plussa card
with no separate activation call; not verified as a universal K-Ruoka guarantee.
Trait Implementations§
Source§impl Clone for PersonalOfferView
impl Clone for PersonalOfferView
Source§fn clone(&self) -> PersonalOfferView
fn clone(&self) -> PersonalOfferView
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PersonalOfferView
impl Debug for PersonalOfferView
Source§impl From<PersonalOffer> for PersonalOfferView
impl From<PersonalOffer> for PersonalOfferView
Source§fn from(o: PersonalOffer) -> Self
fn from(o: PersonalOffer) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for PersonalOfferView
impl JsonSchema for PersonalOfferView
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for PersonalOfferView
impl RefUnwindSafe for PersonalOfferView
impl Send for PersonalOfferView
impl Sync for PersonalOfferView
impl Unpin for PersonalOfferView
impl UnsafeUnpin for PersonalOfferView
impl UnwindSafe for PersonalOfferView
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