pub struct CreatePromotionCodeRestrictions<'a> {
pub currency_options: Option<&'a HashMap<Currency, CreatePromotionCodeRestrictionsCurrencyOptions>>,
pub first_time_transaction: Option<bool>,
pub minimum_amount: Option<i64>,
pub minimum_amount_currency: Option<Currency>,
}
Available on crate feature
products
only.Expand description
Settings that restrict the redemption of the promotion code.
Fields§
§currency_options: Option<&'a HashMap<Currency, CreatePromotionCodeRestrictionsCurrencyOptions>>
Promotion codes defined in each available currency option.
Each key must be a three-letter ISO currency code and a supported currency.
first_time_transaction: Option<bool>
A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices.
minimum_amount: Option<i64>
Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
minimum_amount_currency: Option<Currency>
Three-letter ISO code for minimum_amount.
Implementations§
Source§impl<'a> CreatePromotionCodeRestrictions<'a>
impl<'a> CreatePromotionCodeRestrictions<'a>
Trait Implementations§
Source§impl<'a> Clone for CreatePromotionCodeRestrictions<'a>
impl<'a> Clone for CreatePromotionCodeRestrictions<'a>
Source§fn clone(&self) -> CreatePromotionCodeRestrictions<'a>
fn clone(&self) -> CreatePromotionCodeRestrictions<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for CreatePromotionCodeRestrictions<'a>
impl<'a> Debug for CreatePromotionCodeRestrictions<'a>
Source§impl<'a> Default for CreatePromotionCodeRestrictions<'a>
impl<'a> Default for CreatePromotionCodeRestrictions<'a>
Source§fn default() -> CreatePromotionCodeRestrictions<'a>
fn default() -> CreatePromotionCodeRestrictions<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> Serialize for CreatePromotionCodeRestrictions<'a>
impl<'a> Serialize for CreatePromotionCodeRestrictions<'a>
impl<'a> Copy for CreatePromotionCodeRestrictions<'a>
Auto Trait Implementations§
impl<'a> Freeze for CreatePromotionCodeRestrictions<'a>
impl<'a> RefUnwindSafe for CreatePromotionCodeRestrictions<'a>
impl<'a> Send for CreatePromotionCodeRestrictions<'a>
impl<'a> Sync for CreatePromotionCodeRestrictions<'a>
impl<'a> Unpin for CreatePromotionCodeRestrictions<'a>
impl<'a> UnwindSafe for CreatePromotionCodeRestrictions<'a>
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