pub struct RequestQuoteResponseData {
pub error: Vec<Value>,
pub errors: Vec<Value>,
pub result: Option<RequestQuoteResponseDataResult>,
}Expand description
RequestQuoteResponseData
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",
"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"
}
}
}
]
},
"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<RequestQuoteResponseDataResult>Trait Implementations§
Source§impl Clone for RequestQuoteResponseData
impl Clone for RequestQuoteResponseData
Source§fn clone(&self) -> RequestQuoteResponseData
fn clone(&self) -> RequestQuoteResponseData
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 RequestQuoteResponseData
impl Debug for RequestQuoteResponseData
Source§impl<'de> Deserialize<'de> for RequestQuoteResponseData
impl<'de> Deserialize<'de> for RequestQuoteResponseData
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<&RequestQuoteResponseData> for RequestQuoteResponseData
impl From<&RequestQuoteResponseData> for RequestQuoteResponseData
Source§fn from(value: &RequestQuoteResponseData) -> Self
fn from(value: &RequestQuoteResponseData) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RequestQuoteResponseData
impl RefUnwindSafe for RequestQuoteResponseData
impl Send for RequestQuoteResponseData
impl Sync for RequestQuoteResponseData
impl Unpin for RequestQuoteResponseData
impl UnwindSafe for RequestQuoteResponseData
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