pub struct PromoCode {
pub code: String,
pub program: Option<String>,
pub owner_tenant_id: String,
pub reward_tokens_per_subscription: i64,
pub subscriber_bonus_tokens: Option<i64>,
pub discount_percent: Option<f64>,
pub target_plan_id: Option<String>,
pub max_uses: Option<i64>,
pub uses: i64,
pub active: bool,
pub created_at: String,
pub updated_at: String,
}Expand description
PromoCode model.
Fields§
§code: StringUpper-cased.
program: Option<String>Absent when unset.
owner_tenant_id: StringThe tenant that earns the reward.
reward_tokens_per_subscription: i64§subscriber_bonus_tokens: Option<i64>Welcome grant to the redeeming tenant. Absent when unset.
discount_percent: Option<f64>Absent when unset.
target_plan_id: Option<String>Scopes the code to ONE plan: the reward is skipped when it is set and does not match the plan being paid for. Absent means the code pays out on every plan.
max_uses: Option<i64>Absent means unlimited.
uses: i64Server-maintained; carried across a replacing write.
active: bool§created_at: StringCarried across a replacing write.
updated_at: StringTrait Implementations§
Source§impl<'de> Deserialize<'de> for PromoCode
impl<'de> Deserialize<'de> for PromoCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for PromoCode
Auto Trait Implementations§
impl Freeze for PromoCode
impl RefUnwindSafe for PromoCode
impl Send for PromoCode
impl Sync for PromoCode
impl Unpin for PromoCode
impl UnsafeUnpin for PromoCode
impl UnwindSafe for PromoCode
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