pub struct TierCreate {
pub display_name: TierCreateDisplayName,
pub models: Vec<TierModelCreate>,
pub price_amount_cents: Option<u64>,
pub price_interval: Option<PriceInterval>,
pub spend_limit_cents: u64,
pub tier_code: TierCode,
pub trial_days: Option<u32>,
}Expand description
TierCreate
JSON schema
{
"type": "object",
"required": [
"display_name",
"models",
"spend_limit_cents",
"tier_code"
],
"properties": {
"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"
},
"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§
§display_name: TierCreateDisplayNameHuman-readable tier name
models: Vec<TierModelCreate>§price_amount_cents: Option<u64>Subscription price amount in cents (paid tiers)
price_interval: Option<PriceInterval>§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 TierCreate
impl Clone for TierCreate
Source§fn clone(&self) -> TierCreate
fn clone(&self) -> TierCreate
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TierCreate
impl Debug for TierCreate
Source§impl<'de> Deserialize<'de> for TierCreate
impl<'de> Deserialize<'de> for TierCreate
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<&TierCreate> for TierCreate
impl From<&TierCreate> for TierCreate
Source§fn from(value: &TierCreate) -> Self
fn from(value: &TierCreate) -> Self
Converts to this type from the input type.
Source§impl From<TierCreate> for ModelRelayApi
impl From<TierCreate> for ModelRelayApi
Source§fn from(value: TierCreate) -> Self
fn from(value: TierCreate) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TierCreate
impl PartialEq for TierCreate
Source§impl Serialize for TierCreate
impl Serialize for TierCreate
impl StructuralPartialEq for TierCreate
Auto Trait Implementations§
impl Freeze for TierCreate
impl RefUnwindSafe for TierCreate
impl Send for TierCreate
impl Sync for TierCreate
impl Unpin for TierCreate
impl UnwindSafe for TierCreate
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)