pub struct GetQuoteResponseData {
pub error: Vec<Value>,
pub errors: Vec<Value>,
pub result: Option<GetQuoteResponseDataResult>,
}Expand description
GetQuoteResponseData
JSON schema
{
"type": "object",
"required": [
"result"
],
"properties": {
"error": {
"type": "array",
"items": {}
},
"errors": {
"type": "array",
"items": {}
},
"result": {
"type": [
"object",
"null"
],
"required": [
"expires",
"quote_id",
"quoted_receive",
"quoted_spend",
"quoted_unit_price",
"receive",
"spend",
"status",
"transaction_id",
"type",
"unit_price"
],
"properties": {
"expires": {
"type": "string",
"format": "date-time"
},
"quote_id": {
"type": "string"
},
"quoted_receive": {
"type": [
"object",
"null"
],
"required": [
"asset",
"asset_class",
"fee",
"subtotal",
"total"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"fee": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"subtotal": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"total": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
},
"quoted_spend": {
"type": [
"object",
"null"
],
"required": [
"asset",
"asset_class",
"fee",
"subtotal",
"total"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"fee": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"subtotal": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"total": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
},
"quoted_unit_price": {
"type": [
"object",
"null"
],
"required": [
"asset",
"asset_class",
"denomination_asset",
"denomination_asset_class",
"unit_price"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"denomination_asset": {
"type": "string",
"maxLength": 16
},
"denomination_asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"unit_price": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
},
"receive": {
"type": "object",
"required": [
"asset",
"asset_class",
"fee",
"subtotal",
"total"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"fee": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"subtotal": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"total": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
},
"spend": {
"type": "object",
"required": [
"asset",
"asset_class",
"fee",
"subtotal",
"total"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"fee": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"subtotal": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"total": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
},
"status": {
"oneOf": [
{
"type": "string",
"enum": [
"accepted",
"credit_transfer_complete",
"new",
"order_complete",
"quote_cancelled",
"quote_execution_failed"
]
},
{
"type": "object",
"required": [
"unknown"
],
"properties": {
"unknown": {
"type": "string"
}
}
}
]
},
"transaction_id": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"receive",
"spend"
]
},
"unit_price": {
"type": "object",
"required": [
"asset",
"asset_class",
"denomination_asset",
"denomination_asset_class",
"unit_price"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"denomination_asset": {
"type": "string",
"maxLength": 16
},
"denomination_asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"unit_price": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
}
}
}
}
}Fields§
§error: Vec<Value>§errors: Vec<Value>§result: Option<GetQuoteResponseDataResult>Trait Implementations§
Source§impl Clone for GetQuoteResponseData
impl Clone for GetQuoteResponseData
Source§fn clone(&self) -> GetQuoteResponseData
fn clone(&self) -> GetQuoteResponseData
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 GetQuoteResponseData
impl Debug for GetQuoteResponseData
Source§impl<'de> Deserialize<'de> for GetQuoteResponseData
impl<'de> Deserialize<'de> for GetQuoteResponseData
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<&GetQuoteResponseData> for GetQuoteResponseData
impl From<&GetQuoteResponseData> for GetQuoteResponseData
Source§fn from(value: &GetQuoteResponseData) -> Self
fn from(value: &GetQuoteResponseData) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GetQuoteResponseData
impl RefUnwindSafe for GetQuoteResponseData
impl Send for GetQuoteResponseData
impl Sync for GetQuoteResponseData
impl Unpin for GetQuoteResponseData
impl UnwindSafe for GetQuoteResponseData
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