pub struct PriceParams {
pub amount_type: AmountType,
pub price_currency: Option<String>,
pub price_amount: Option<u32>,
pub minimum_amount: Option<u32>,
pub maximum_amount: Option<u32>,
pub preset_amount: Option<u32>,
pub meter_id: Option<Uuid>,
pub unit_amount: Option<String>,
pub cap_amount: Option<u32>,
}Fields§
§amount_type: AmountType§price_currency: Option<String>The currency. Not required for amount_type: Free.
price_amount: Option<u32>The price in cents. Only for amount_type: Fixed.
minimum_amount: Option<u32>The minimum amount the customer can pay. Only for amount_type: Custom.
maximum_amount: Option<u32>The maximum amount the customer can pay. Only for amount_type: Custom.
preset_amount: Option<u32>The initial amount shown to the customer. Only for amount_type: Custom.
meter_id: Option<Uuid>The ID of the meter associated to the price. Only for amount_type: MeteredUnit.
unit_amount: Option<String>The price per unit in cents. Only for amount_type: MeteredUnit.
cap_amount: Option<u32>The maximum amount in cents that can be charged, regardless of the number of units consumed. Only for amount_type: MeteredUnit.
Trait Implementations§
Source§impl Default for PriceParams
impl Default for PriceParams
Source§fn default() -> PriceParams
fn default() -> PriceParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PriceParams
impl<'de> Deserialize<'de> for PriceParams
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
Auto Trait Implementations§
impl Freeze for PriceParams
impl RefUnwindSafe for PriceParams
impl Send for PriceParams
impl Sync for PriceParams
impl Unpin for PriceParams
impl UnwindSafe for PriceParams
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