pub struct AddRateV1BodyCommitRate {
pub minimum_config: Option<AddRateV1BodyCommitRateMinimumConfig>,
pub price: Option<f64>,
pub rate_type: String,
pub tiers: Vec<AddRateV1BodyCommitRateTiersItem>,
}Expand description
A distinct rate on the rate card. You can choose to use this rate rather than list rate when consuming a credit or commit.
JSON schema
{
"description": "A distinct rate on the rate card. You can choose to use
this rate rather than list rate when consuming a credit or commit.",
"type": "object",
"required": [
"rate_type"
],
"properties": {
"minimum_config": {
"description": "Only set for TIERED_PERCENTAGE or PERCENTAGE
rate_type. Any commit-specific overrides will not apply if there is a
minimum set on the rate/applied override.",
"type": "object",
"required": [
"minimum"
],
"properties": {
"minimum": {
"type": "number"
}
},
"x-mint": {
"groups": [
"ff:support-charge-ga"
]
},
"x-stainless-skip": true
},
"price": {
"description": "Commit rate price. For FLAT rate_type, this must be
>=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1
for 10%; this must be >=0 and <=1.",
"type": "number"
},
"rate_type": {
"type": "string",
"x-mint-enum": {
"CUSTOM": [
"client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be",
"client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560",
"client_id:f157d376-0781-4ef3-9db9-775a9052148e",
"client_id:7dd2f652-7629-4925-9069-77f5c5d3db37",
"client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5",
"client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33",
"client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7"
],
"PERCENTAGE": [
"client_id:11db091c-975b-4908-9f67-b1ceb126acdf"
],
"SUBSCRIPTION": [
"client_id:11db091c-975b-4908-9f67-b1ceb126acdf"
],
"TIERED_PERCENTAGE": [
"ff:support-charge-ga"
],
"custom": [
"client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be",
"client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560",
"client_id:f157d376-0781-4ef3-9db9-775a9052148e",
"client_id:7dd2f652-7629-4925-9069-77f5c5d3db37",
"client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5",
"client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33",
"client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7"
],
"percentage": [
"client_id:11db091c-975b-4908-9f67-b1ceb126acdf"
],
"subscription": [
"client_id:11db091c-975b-4908-9f67-b1ceb126acdf"
],
"tiered_percentage": [
"ff:support-charge-ga"
]
}
},
"tiers": {
"description": "Only set for TIERED rate_type.",
"type": "array",
"items": {
"type": "object",
"required": [
"price"
],
"properties": {
"price": {
"type": "number"
},
"size": {
"type": "number"
}
}
}
}
}
}Fields§
§minimum_config: Option<AddRateV1BodyCommitRateMinimumConfig>§price: Option<f64>Commit rate price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
rate_type: String§tiers: Vec<AddRateV1BodyCommitRateTiersItem>Only set for TIERED rate_type.
Trait Implementations§
Source§impl Clone for AddRateV1BodyCommitRate
impl Clone for AddRateV1BodyCommitRate
Source§fn clone(&self) -> AddRateV1BodyCommitRate
fn clone(&self) -> AddRateV1BodyCommitRate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AddRateV1BodyCommitRate
impl Debug for AddRateV1BodyCommitRate
Source§impl<'de> Deserialize<'de> for AddRateV1BodyCommitRate
impl<'de> Deserialize<'de> for AddRateV1BodyCommitRate
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 AddRateV1BodyCommitRate
impl RefUnwindSafe for AddRateV1BodyCommitRate
impl Send for AddRateV1BodyCommitRate
impl Sync for AddRateV1BodyCommitRate
impl Unpin for AddRateV1BodyCommitRate
impl UnsafeUnpin for AddRateV1BodyCommitRate
impl UnwindSafe for AddRateV1BodyCommitRate
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