pub struct CreateCouponInput {
pub promotion_id: String,
pub code: String,
pub usage_limit: Option<i32>,
pub per_customer_limit: Option<i32>,
pub starts_at: Option<String>,
pub ends_at: Option<String>,
pub metadata: Option<String>,
}Expand description
Input for creating a coupon code
Fields§
§promotion_id: StringPromotion ID this coupon is for
code: StringThe coupon code customers enter
usage_limit: Option<i32>Usage limit for this coupon
per_customer_limit: Option<i32>Per customer limit
starts_at: Option<String>Start date (RFC3339)
ends_at: Option<String>End date (RFC3339)
metadata: Option<String>Metadata as JSON
Trait Implementations§
Source§impl FromNapiValue for CreateCouponInput
impl FromNapiValue for CreateCouponInput
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 CreateCouponInput
impl ToNapiValue for CreateCouponInput
Source§unsafe fn to_napi_value(
env: napi_env,
val: CreateCouponInput,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: CreateCouponInput, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for CreateCouponInput
impl TypeName for CreateCouponInput
Source§impl ValidateNapiValue for CreateCouponInput
impl ValidateNapiValue for CreateCouponInput
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 CreateCouponInput
impl RefUnwindSafe for CreateCouponInput
impl Send for CreateCouponInput
impl Sync for CreateCouponInput
impl Unpin for CreateCouponInput
impl UnsafeUnpin for CreateCouponInput
impl UnwindSafe for CreateCouponInput
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