pub struct CreatePlanTiers {
pub flat_amount: Option<i64>,
pub flat_amount_decimal: Option<String>,
pub unit_amount: Option<i64>,
pub unit_amount_decimal: Option<String>,
pub up_to: CreatePlanTiersUpTo,
}
Expand description
Each element represents a pricing tier.
This parameter requires billing_scheme
to be set to tiered
.
See also the documentation for billing_scheme
.
Fields§
§flat_amount: Option<i64>
The flat billing amount for an entire tier, regardless of the number of units in the tier.
flat_amount_decimal: Option<String>
Same as flat_amount
, but accepts a decimal value representing an integer in the minor units of the currency.
Only one of flat_amount
and flat_amount_decimal
can be set.
unit_amount: Option<i64>
The per unit billing amount for each individual unit for which this tier applies.
unit_amount_decimal: Option<String>
Same as unit_amount
, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places.
Only one of unit_amount
and unit_amount_decimal
can be set.
up_to: CreatePlanTiersUpTo
Specifies the upper bound of this tier.
The lower bound of a tier is the upper bound of the previous tier adding one.
Use inf
to define a fallback tier.
Implementations§
Source§impl CreatePlanTiers
impl CreatePlanTiers
pub fn new(up_to: impl Into<CreatePlanTiersUpTo>) -> Self
Trait Implementations§
Source§impl Clone for CreatePlanTiers
impl Clone for CreatePlanTiers
Source§fn clone(&self) -> CreatePlanTiers
fn clone(&self) -> CreatePlanTiers
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more