pub struct CreateRateCardV1Body {
pub aliases: Vec<CreateRateCardV1BodyAliasesItem>,
pub credit_type_conversions: Vec<CreateRateCardV1BodyCreditTypeConversionsItem>,
pub custom_fields: HashMap<String, String>,
pub description: Option<String>,
pub fiat_credit_type_id: Option<Uuid>,
pub name: String,
}Expand description
CreateRateCardV1Body
JSON schema
{
"type": "object",
"required": [
"name"
],
"properties": {
"aliases": {
"description": "Reference this alias when creating a contract. If
the same alias is assigned to multiple rate cards, it will reference the
rate card to which it was most recently assigned. It is not exposed to
end customers.",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"ending_before": {
"type": "string",
"format": "date-time"
},
"name": {
"type": "string"
},
"starting_at": {
"type": "string",
"format": "date-time"
}
}
}
},
"credit_type_conversions": {
"description": "Required when using custom pricing units in
rates.",
"type": "array",
"items": {
"type": "object",
"required": [
"custom_credit_type_id",
"fiat_per_custom_credit"
],
"properties": {
"custom_credit_type_id": {
"type": "string",
"format": "uuid"
},
"fiat_per_custom_credit": {
"type": "number"
}
}
}
},
"custom_fields": {
"description": "Custom fields to be added eg. { \"key1\":
\"value1\", \"key2\": \"value2\" }",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"description": {
"type": "string"
},
"fiat_credit_type_id": {
"description": "The Metronome ID of the credit type to associate
with the rate card, defaults to USD (cents) if not passed.",
"examples": [
"2714e483-4ff1-48e4-9e25-ac732e8f24f2"
],
"type": "string",
"format": "uuid"
},
"name": {
"description": "Used only in UI/API. It is not exposed to end
customers.",
"type": "string"
}
}
}Fields§
§aliases: Vec<CreateRateCardV1BodyAliasesItem>Reference this alias when creating a contract. If the same alias is assigned to multiple rate cards, it will reference the rate card to which it was most recently assigned. It is not exposed to end customers.
credit_type_conversions: Vec<CreateRateCardV1BodyCreditTypeConversionsItem>Required when using custom pricing units in rates.
custom_fields: HashMap<String, String>Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }
description: Option<String>§fiat_credit_type_id: Option<Uuid>The Metronome ID of the credit type to associate with the rate card, defaults to USD (cents) if not passed.
name: StringUsed only in UI/API. It is not exposed to end customers.
Trait Implementations§
Source§impl Clone for CreateRateCardV1Body
impl Clone for CreateRateCardV1Body
Source§fn clone(&self) -> CreateRateCardV1Body
fn clone(&self) -> CreateRateCardV1Body
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 CreateRateCardV1Body
impl Debug for CreateRateCardV1Body
Source§impl<'de> Deserialize<'de> for CreateRateCardV1Body
impl<'de> Deserialize<'de> for CreateRateCardV1Body
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 CreateRateCardV1Body
impl RefUnwindSafe for CreateRateCardV1Body
impl Send for CreateRateCardV1Body
impl Sync for CreateRateCardV1Body
impl Unpin for CreateRateCardV1Body
impl UnsafeUnpin for CreateRateCardV1Body
impl UnwindSafe for CreateRateCardV1Body
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