Skip to main content

AddRateV1BodyCommitRate

Struct AddRateV1BodyCommitRate 

Source
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

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for AddRateV1BodyCommitRate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AddRateV1BodyCommitRate

Source§

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 Serialize for AddRateV1BodyCommitRate

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more