pub struct ApplyPromotionsOutput {
pub original_subtotal: f64,
pub total_discount: f64,
pub discounted_subtotal: f64,
pub original_shipping: f64,
pub shipping_discount: f64,
pub final_shipping: f64,
pub grand_total: f64,
pub applied_promotions: Vec<AppliedPromotionOutput>,
}Expand description
Result of applying promotions
Fields§
§original_subtotal: f64§total_discount: f64§discounted_subtotal: f64§original_shipping: f64§shipping_discount: f64§final_shipping: f64§grand_total: f64§applied_promotions: Vec<AppliedPromotionOutput>Trait Implementations§
Source§impl From<ApplyPromotionsResult> for ApplyPromotionsOutput
impl From<ApplyPromotionsResult> for ApplyPromotionsOutput
Source§fn from(r: ApplyPromotionsResult) -> Self
fn from(r: ApplyPromotionsResult) -> Self
Converts to this type from the input type.
Source§impl FromNapiValue for ApplyPromotionsOutput
impl FromNapiValue for ApplyPromotionsOutput
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 ApplyPromotionsOutput
impl ToNapiValue for ApplyPromotionsOutput
Source§unsafe fn to_napi_value(
env: napi_env,
val: ApplyPromotionsOutput,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: ApplyPromotionsOutput, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for ApplyPromotionsOutput
impl TypeName for ApplyPromotionsOutput
Source§impl ValidateNapiValue for ApplyPromotionsOutput
impl ValidateNapiValue for ApplyPromotionsOutput
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 ApplyPromotionsOutput
impl RefUnwindSafe for ApplyPromotionsOutput
impl Send for ApplyPromotionsOutput
impl Sync for ApplyPromotionsOutput
impl Unpin for ApplyPromotionsOutput
impl UnsafeUnpin for ApplyPromotionsOutput
impl UnwindSafe for ApplyPromotionsOutput
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