pub struct CouponCommission {Show 14 fields
pub markets: Vec<String>,
pub rebate_rate: String,
pub bz_types: Vec<CouponTargetType>,
pub bz_types_raw: Vec<i32>,
pub commission_balance: Option<Decimal>,
pub commission_duration: i64,
pub unlimited: CommissionUnlimitedType,
pub unlimited_raw: Option<i32>,
pub commission_expired_time: Option<OffsetDateTime>,
pub usage_count: i64,
pub lave_usage_count: i64,
pub settlement_model: String,
pub amount_limit: i64,
pub superposition: bool,
}Expand description
Commission terms of a commission coupon (commission)
Fields§
§markets: Vec<String>Markets the coupon applies to
rebate_rate: StringRebate rate, as returned by the server
bz_types: Vec<CouponTargetType>Instrument types the coupon applies to
bz_types_raw: Vec<i32>The server’s numeric codes of bz_types, including codes this SDK
does not know (Unknown in bz_types); always the same length and
order as bz_types (elements that are neither a code nor a known name
are left out of both)
commission_balance: Option<Decimal>Remaining commission balance
commission_duration: i64Commission duration in seconds (the app reads 200 years or more as lifetime free commission)
unlimited: CommissionUnlimitedTypeKind of commission coupon (the server’s unlimited code)
unlimited_raw: Option<i32>The server’s numeric code of unlimited, also when it is a code this
SDK does not know (unlimited is then Unknown); None when the value
is missing or is not a code
commission_expired_time: Option<OffsetDateTime>Commission expiry time (None when not set)
usage_count: i64Number of times used
lave_usage_count: i64Number of uses left
settlement_model: StringSettlement model, as returned by the server
amount_limit: i64Amount cap per use of a per-use discount card
(CommissionUnlimitedType::ByRatePer), as returned by the server
superposition: boolWhether the coupon can be combined with other coupons
Implementations§
Source§impl CouponCommission
impl CouponCommission
pub fn serialize<__S>(
__self: &CouponCommission,
__serializer: __S,
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Source§impl<'de> CouponCommissionwhere
CouponCommission: Default,
impl<'de> CouponCommissionwhere
CouponCommission: Default,
pub fn deserialize<__D>(
__deserializer: __D,
) -> Result<CouponCommission, __D::Error>where
__D: Deserializer<'de>,
Trait Implementations§
Source§impl Clone for CouponCommission
impl Clone for CouponCommission
Source§impl Debug for CouponCommission
impl Debug for CouponCommission
Source§impl Default for CouponCommission
impl Default for CouponCommission
Source§impl<'de> Deserialize<'de> for CouponCommission
impl<'de> Deserialize<'de> for CouponCommission
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Auto Trait Implementations§
impl Freeze for CouponCommission
impl RefUnwindSafe for CouponCommission
impl Send for CouponCommission
impl Sync for CouponCommission
impl Unpin for CouponCommission
impl UnsafeUnpin for CouponCommission
impl UnwindSafe for CouponCommission
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more