fireblocks_sdk/models/
smart_transfer_create_ticket.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 SmartTransferCreateTicket {
16    #[serde(rename = "createdByNetworkId")]
17    pub created_by_network_id: String,
18    /// **Note:** The `DVP` value is in Early Access and should only be used if
19    /// Fireblocks has enabled it in your workspace. Contact your Customer
20    /// Success Manager for more information.
21    #[serde(rename = "type")]
22    pub r#type: Type,
23    /// Number of hours after which an OPEN ticket will expire if no term is
24    /// funded.
25    #[serde(rename = "expiresIn", skip_serializing_if = "Option::is_none")]
26    pub expires_in: Option<f64>,
27    #[serde(rename = "terms", skip_serializing_if = "Option::is_none")]
28    pub terms: Option<Vec<models::SmartTransferCreateTicketTerm>>,
29    #[serde(rename = "externalRefId", skip_serializing_if = "Option::is_none")]
30    pub external_ref_id: Option<String>,
31    #[serde(rename = "note", skip_serializing_if = "Option::is_none")]
32    pub note: Option<String>,
33    #[serde(rename = "submit", skip_serializing_if = "Option::is_none")]
34    pub submit: Option<bool>,
35}
36
37impl SmartTransferCreateTicket {
38    pub fn new(created_by_network_id: String, r#type: Type) -> SmartTransferCreateTicket {
39        SmartTransferCreateTicket {
40            created_by_network_id,
41            r#type,
42            expires_in: None,
43            terms: None,
44            external_ref_id: None,
45            note: None,
46            submit: None,
47        }
48    }
49}
50/// **Note:** The `DVP` value is in Early Access and should only be used if
51/// Fireblocks has enabled it in your workspace. Contact your Customer Success
52/// Manager for more information.
53#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
54pub enum Type {
55    #[serde(rename = "ASYNC")]
56    Async,
57    #[serde(rename = "DVP")]
58    Dvp,
59}
60
61impl Default for Type {
62    fn default() -> Type {
63        Self::Async
64    }
65}