fireblocks_sdk/models/
order_details.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 OrderDetails {
16    #[serde(rename = "id")]
17    pub id: String,
18    #[serde(rename = "via")]
19    pub via: models::AccessType,
20    #[serde(rename = "status")]
21    pub status: models::OrderStatus,
22    #[serde(rename = "createdAt")]
23    pub created_at: String,
24    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
25    pub updated_at: Option<String>,
26    #[serde(rename = "receipt", skip_serializing_if = "Option::is_none")]
27    pub receipt: Option<models::TransferReceipt>,
28    #[serde(rename = "generalFees", skip_serializing_if = "Option::is_none")]
29    pub general_fees: Option<Vec<models::Fee>>,
30    #[serde(rename = "executionSteps")]
31    pub execution_steps: Vec<models::ExecutionStep>,
32    #[serde(rename = "executionResponseDetails")]
33    pub execution_response_details: models::ExecutionResponseDetails,
34    #[serde(rename = "settlement")]
35    pub settlement: models::Settlement,
36    #[serde(
37        rename = "participantsIdentification",
38        skip_serializing_if = "Option::is_none"
39    )]
40    pub participants_identification: Option<models::ParticipantsIdentification>,
41    /// Payment instructions for the order, the client can use one of these to
42    /// pay the order.
43    #[serde(
44        rename = "paymentInstructions",
45        skip_serializing_if = "Option::is_none"
46    )]
47    pub payment_instructions: Option<Vec<models::PaymentInstructions>>,
48    /// The ID of the user who created the order
49    #[serde(rename = "createdBy")]
50    pub created_by: String,
51    /// Internal reference ID for the customer
52    #[serde(
53        rename = "customerInternalReferenceId",
54        skip_serializing_if = "Option::is_none"
55    )]
56    pub customer_internal_reference_id: Option<String>,
57    /// Optional note for the Order
58    #[serde(rename = "note", skip_serializing_if = "Option::is_none")]
59    pub note: Option<String>,
60    #[serde(rename = "expiresAt", skip_serializing_if = "Option::is_none")]
61    pub expires_at: Option<String>,
62}
63
64impl OrderDetails {
65    pub fn new(
66        id: String,
67        via: models::AccessType,
68        status: models::OrderStatus,
69        created_at: String,
70        execution_steps: Vec<models::ExecutionStep>,
71        execution_response_details: models::ExecutionResponseDetails,
72        settlement: models::Settlement,
73        created_by: String,
74    ) -> OrderDetails {
75        OrderDetails {
76            id,
77            via,
78            status,
79            created_at,
80            updated_at: None,
81            receipt: None,
82            general_fees: None,
83            execution_steps,
84            execution_response_details,
85            settlement,
86            participants_identification: None,
87            payment_instructions: None,
88            created_by,
89            customer_internal_reference_id: None,
90            note: None,
91            expires_at: None,
92        }
93    }
94}