fireblocks_sdk/models/
custom_routing_dest.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 CustomRoutingDest {
16    /// The network routing logic.
17    #[serde(rename = "scheme")]
18    pub scheme: Scheme,
19    /// The account the funds are being sent to.
20    #[serde(rename = "dstType")]
21    pub dst_type: DstType,
22    /// The ID of the account the funds are being sent to.
23    #[serde(rename = "dstId")]
24    pub dst_id: String,
25}
26
27impl CustomRoutingDest {
28    pub fn new(scheme: Scheme, dst_type: DstType, dst_id: String) -> CustomRoutingDest {
29        CustomRoutingDest {
30            scheme,
31            dst_type,
32            dst_id,
33        }
34    }
35}
36/// The network routing logic.
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum Scheme {
39    #[serde(rename = "CUSTOM")]
40    Custom,
41}
42
43impl Default for Scheme {
44    fn default() -> Scheme {
45        Self::Custom
46    }
47}
48/// The account the funds are being sent to.
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum DstType {
51    #[serde(rename = "FIAT_ACCOUNT")]
52    FiatAccount,
53    #[serde(rename = "VAULT")]
54    Vault,
55    #[serde(rename = "EXCHANGE")]
56    Exchange,
57}
58
59impl Default for DstType {
60    fn default() -> DstType {
61        Self::FiatAccount
62    }
63}