fireblocks_sdk/models/
swap_operation_request.rs

1// Fireblocks API
2//
3// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SwapOperationRequest {
16    /// An identifier that uniquely identifies the received quote
17    #[serde(rename = "providerQuoteId")]
18    pub provider_quote_id: uuid::Uuid,
19    /// The fee level of the transaction
20    #[serde(rename = "feeLevel", skip_serializing_if = "Option::is_none")]
21    pub fee_level: Option<FeeLevel>,
22    /// user note on the transaction
23    #[serde(rename = "txNote", skip_serializing_if = "Option::is_none")]
24    pub tx_note: Option<String>,
25}
26
27impl SwapOperationRequest {
28    pub fn new(provider_quote_id: uuid::Uuid) -> SwapOperationRequest {
29        SwapOperationRequest {
30            provider_quote_id,
31            fee_level: None,
32            tx_note: None,
33        }
34    }
35}
36/// The fee level of the transaction
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum FeeLevel {
39    #[serde(rename = "LOW")]
40    Low,
41    #[serde(rename = "MEDIUM")]
42    Medium,
43    #[serde(rename = "HIGH")]
44    High,
45}
46
47impl Default for FeeLevel {
48    fn default() -> FeeLevel {
49        Self::Low
50    }
51}