pub struct PromotionLineItemInput {
pub id: String,
pub product_id: Option<String>,
pub variant_id: Option<String>,
pub sku: Option<String>,
pub category_ids: Option<Vec<String>>,
pub quantity: i32,
pub unit_price: f64,
pub line_total: f64,
}Expand description
Line item input for promotion calculation
Fields§
§id: String§product_id: Option<String>§variant_id: Option<String>§sku: Option<String>§category_ids: Option<Vec<String>>§quantity: i32§unit_price: f64§line_total: f64Trait Implementations§
Source§impl FromNapiValue for PromotionLineItemInput
impl FromNapiValue for PromotionLineItemInput
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for PromotionLineItemInput
impl ToNapiValue for PromotionLineItemInput
Source§unsafe fn to_napi_value(
env: napi_env,
val: PromotionLineItemInput,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: PromotionLineItemInput, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for PromotionLineItemInput
impl TypeName for PromotionLineItemInput
Source§impl ValidateNapiValue for PromotionLineItemInput
impl ValidateNapiValue for PromotionLineItemInput
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for PromotionLineItemInput
impl RefUnwindSafe for PromotionLineItemInput
impl Send for PromotionLineItemInput
impl Sync for PromotionLineItemInput
impl Unpin for PromotionLineItemInput
impl UnsafeUnpin for PromotionLineItemInput
impl UnwindSafe for PromotionLineItemInput
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