pub struct ApplyPromotionsInput {
pub cart_id: Option<String>,
pub customer_id: Option<String>,
pub coupon_codes: Option<Vec<String>>,
pub line_items: Vec<PromotionLineItemInput>,
pub subtotal: f64,
pub shipping_amount: Option<f64>,
pub shipping_country: Option<String>,
pub shipping_state: Option<String>,
pub currency: Option<String>,
}Expand description
Input for applying promotions
Fields§
§cart_id: Option<String>§customer_id: Option<String>§coupon_codes: Option<Vec<String>>§line_items: Vec<PromotionLineItemInput>§subtotal: f64§shipping_amount: Option<f64>§shipping_country: Option<String>§shipping_state: Option<String>§currency: Option<String>Trait Implementations§
Source§impl FromNapiValue for ApplyPromotionsInput
impl FromNapiValue for ApplyPromotionsInput
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 ApplyPromotionsInput
impl ToNapiValue for ApplyPromotionsInput
Source§unsafe fn to_napi_value(
env: napi_env,
val: ApplyPromotionsInput,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: ApplyPromotionsInput, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for ApplyPromotionsInput
impl TypeName for ApplyPromotionsInput
Source§impl ValidateNapiValue for ApplyPromotionsInput
impl ValidateNapiValue for ApplyPromotionsInput
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 ApplyPromotionsInput
impl RefUnwindSafe for ApplyPromotionsInput
impl Send for ApplyPromotionsInput
impl Sync for ApplyPromotionsInput
impl Unpin for ApplyPromotionsInput
impl UnsafeUnpin for ApplyPromotionsInput
impl UnwindSafe for ApplyPromotionsInput
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