1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* 1Click Swap API
*
* API for One-Click Swaps
*
* The version of the OpenAPI document: 0.1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct QuoteResponse {
/// Timestamp in ISO format that took part in the deposit address derivation
#[serde(rename = "timestamp")]
pub timestamp: String,
/// Signature of the 1Click service confirming the quote for the specific deposit address. Must be saved on the client side (along with the whole quote) in order to resolve any disputes or mistakes.
#[serde(rename = "signature")]
pub signature: String,
/// User request
#[serde(rename = "quoteRequest")]
pub quote_request: Box<models::QuoteRequest>,
/// Response that contains the deposit address to send \"amount\" of `originAsset` and possible output amount.
#[serde(rename = "quote")]
pub quote: Box<models::Quote>,
}
impl QuoteResponse {
pub fn new(timestamp: String, signature: String, quote_request: models::QuoteRequest, quote: models::Quote) -> QuoteResponse {
QuoteResponse {
timestamp,
signature,
quote_request: Box::new(quote_request),
quote: Box::new(quote),
}
}
}