pub struct OnrampQuote {
pub destination_network: String,
pub exchange_rate: String,
pub fees: Vec<OnrampOrderFee>,
pub payment_currency: String,
pub payment_subtotal: String,
pub payment_total: String,
pub purchase_amount: String,
pub purchase_currency: String,
}Expand description
Quote information with pricing details for the crypto purchase.
JSON schema
{
"description": "Quote information with pricing details for the crypto purchase.",
"examples": [
{
"destinationNetwork": "base",
"exchangeRate": "1",
"fees": [
{
"amount": "0.5",
"currency": "USD",
"type": "FEE_TYPE_EXCHANGE"
},
{
"amount": "0.25",
"currency": "USD",
"type": "FEE_TYPE_NETWORK"
}
],
"paymentCurrency": "USD",
"paymentSubtotal": "100.00",
"paymentTotal": "100.75",
"purchaseAmount": "100.000000",
"purchaseCurrency": "USDC"
}
],
"type": "object",
"required": [
"destinationNetwork",
"exchangeRate",
"fees",
"paymentCurrency",
"paymentSubtotal",
"paymentTotal",
"purchaseAmount",
"purchaseCurrency"
],
"properties": {
"destinationNetwork": {
"description": "The network to send the crypto on.",
"examples": [
"base"
],
"type": "string"
},
"exchangeRate": {
"description": "The exchange rate used to convert fiat to crypto i.e. the crypto value of one fiat.",
"examples": [
"1"
],
"type": "string"
},
"fees": {
"description": "The fees associated with the quote.",
"examples": [
[
{
"amount": "0.5",
"currency": "USD",
"type": "FEE_TYPE_EXCHANGE"
},
{
"amount": "0.25",
"currency": "USD",
"type": "FEE_TYPE_NETWORK"
}
]
],
"type": "array",
"items": {
"$ref": "#/components/schemas/OnrampOrderFee"
}
},
"paymentCurrency": {
"description": "The fiat currency to be converted to crypto.",
"examples": [
"USD"
],
"type": "string"
},
"paymentSubtotal": {
"description": "The amount of fiat to be converted to crypto.",
"examples": [
"100.00"
],
"type": "string"
},
"paymentTotal": {
"description": "The total amount of fiat to be paid, inclusive of any fees.",
"examples": [
"100.75"
],
"type": "string"
},
"purchaseAmount": {
"description": "The amount of crypto to be purchased.",
"examples": [
"100.000000"
],
"type": "string"
},
"purchaseCurrency": {
"description": "The crypto currency to be purchased.",
"examples": [
"USDC"
],
"type": "string"
}
}
}Fields§
§destination_network: StringThe network to send the crypto on.
exchange_rate: StringThe exchange rate used to convert fiat to crypto i.e. the crypto value of one fiat.
fees: Vec<OnrampOrderFee>The fees associated with the quote.
payment_currency: StringThe fiat currency to be converted to crypto.
payment_subtotal: StringThe amount of fiat to be converted to crypto.
payment_total: StringThe total amount of fiat to be paid, inclusive of any fees.
purchase_amount: StringThe amount of crypto to be purchased.
purchase_currency: StringThe crypto currency to be purchased.
Implementations§
Source§impl OnrampQuote
impl OnrampQuote
pub fn builder() -> OnrampQuote
Trait Implementations§
Source§impl Clone for OnrampQuote
impl Clone for OnrampQuote
Source§fn clone(&self) -> OnrampQuote
fn clone(&self) -> OnrampQuote
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 OnrampQuote
impl Debug for OnrampQuote
Source§impl<'de> Deserialize<'de> for OnrampQuote
impl<'de> Deserialize<'de> for OnrampQuote
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<&OnrampQuote> for OnrampQuote
impl From<&OnrampQuote> for OnrampQuote
Source§fn from(value: &OnrampQuote) -> Self
fn from(value: &OnrampQuote) -> Self
Converts to this type from the input type.
Source§impl From<OnrampQuote> for OnrampQuote
impl From<OnrampQuote> for OnrampQuote
Source§fn from(value: OnrampQuote) -> Self
fn from(value: OnrampQuote) -> Self
Converts to this type from the input type.
Source§impl Serialize for OnrampQuote
impl Serialize for OnrampQuote
Source§impl TryFrom<OnrampQuote> for OnrampQuote
impl TryFrom<OnrampQuote> for OnrampQuote
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: OnrampQuote) -> Result<Self, ConversionError>
fn try_from(value: OnrampQuote) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for OnrampQuote
impl RefUnwindSafe for OnrampQuote
impl Send for OnrampQuote
impl Sync for OnrampQuote
impl Unpin for OnrampQuote
impl UnwindSafe for OnrampQuote
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