pub struct TierUpdate {
pub billing_provider: Option<BillingProvider>,
pub display_name: TierUpdateDisplayName,
pub models: Vec<TierModelCreate>,
pub price_amount_cents: Option<u64>,
pub price_interval: Option<PriceInterval>,
pub promo_credits_cents: Option<u64>,
pub spend_limit_cents: u64,
pub tier_code: TierCode,
pub trial_days: Option<u32>,
}Expand description
TierUpdate
JSON schema
{
"type": "object",
"required": [
"display_name",
"spend_limit_cents",
"tier_code"
],
"properties": {
"billing_provider": {
"$ref": "#/$defs/BillingProvider"
},
"display_name": {
"description": "Human-readable tier name",
"type": "string",
"maxLength": 255,
"minLength": 1
},
"models": {
"type": "array",
"items": {
"$ref": "#/$defs/TierModelCreate"
},
"minItems": 1
},
"price_amount_cents": {
"description": "Subscription price amount in cents (paid tiers)",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"price_interval": {
"$ref": "#/$defs/PriceInterval"
},
"promo_credits_cents": {
"description": "One-time promotional credits in cents applied when a customer first subscribes to the tier.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"spend_limit_cents": {
"description": "Monthly spend limit in cents (e.g., 2000 = $20/month). Must be non-negative.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"tier_code": {
"$ref": "#/$defs/TierCode"
},
"trial_days": {
"description": "Number of trial days for new subscriptions (paid tiers)",
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
}Fields§
§billing_provider: Option<BillingProvider>§display_name: TierUpdateDisplayNameHuman-readable tier name
models: Vec<TierModelCreate>§price_amount_cents: Option<u64>Subscription price amount in cents (paid tiers)
price_interval: Option<PriceInterval>§promo_credits_cents: Option<u64>One-time promotional credits in cents applied when a customer first subscribes to the tier.
spend_limit_cents: u64Monthly spend limit in cents (e.g., 2000 = $20/month). Must be non-negative.
tier_code: TierCode§trial_days: Option<u32>Number of trial days for new subscriptions (paid tiers)
Trait Implementations§
Source§impl Clone for TierUpdate
impl Clone for TierUpdate
Source§fn clone(&self) -> TierUpdate
fn clone(&self) -> TierUpdate
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 Debug for TierUpdate
impl Debug for TierUpdate
Source§impl<'de> Deserialize<'de> for TierUpdate
impl<'de> Deserialize<'de> for TierUpdate
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
Source§impl From<&TierUpdate> for TierUpdate
impl From<&TierUpdate> for TierUpdate
Source§fn from(value: &TierUpdate) -> Self
fn from(value: &TierUpdate) -> Self
Converts to this type from the input type.
Source§impl From<TierUpdate> for ModelRelayApi
impl From<TierUpdate> for ModelRelayApi
Source§fn from(value: TierUpdate) -> Self
fn from(value: TierUpdate) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TierUpdate
impl PartialEq for TierUpdate
Source§impl Serialize for TierUpdate
impl Serialize for TierUpdate
impl StructuralPartialEq for TierUpdate
Auto Trait Implementations§
impl Freeze for TierUpdate
impl RefUnwindSafe for TierUpdate
impl Send for TierUpdate
impl Sync for TierUpdate
impl Unpin for TierUpdate
impl UnwindSafe for TierUpdate
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