Skip to main content

fireblocks_sdk/models/
destination_transfer_peer_path_response.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/// DestinationTransferPeerPathResponse : Destination of the transaction.
15/// **Note:** In case the transaction is sent to multiple destinations, the
16/// `destinations` parameter is be used instead of this.
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct DestinationTransferPeerPathResponse {
19    #[serde(rename = "type")]
20    pub r#type: models::TransferPeerPathType,
21    /// In case the type is set to `EXCHANGE_ACCOUNT` or `FIAT_ACCOUNT`, the
22    /// specific exchange vendor name or fiat vendor name.In case the type is
23    /// set to `INTERNAL_WALLET` or `EXTERNAL_WALLET`, the subType is set to
24    /// `Internal` or `External`.
25    #[serde(rename = "subType", skip_serializing_if = "Option::is_none")]
26    pub sub_type: Option<String>,
27    /// The ID of the peer. You can retrieve the ID of each venue object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/getpagedvaultaccounts), [listing exchange account](https://developers.fireblocks.com/reference/getexchangeaccounts), [listing fiat accounts](https://developers.fireblocks.com/reference/getfiataccounts), [listing internal wallets](https://developers.fireblocks.com/reference/getinternalwallets), [listing external wallets](https://developers.fireblocks.com/reference/getexternalwallets), [listing network connections](https://developers.fireblocks.com/reference/getnetworkconnections). For the other types, this parameter is not needed.
28    #[serde(
29        rename = "id",
30        default,
31        with = "::serde_with::rust::double_option",
32        skip_serializing_if = "Option::is_none"
33    )]
34    pub id: Option<Option<String>>,
35    /// The name of the peer
36    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
37    pub name: Option<String>,
38    #[serde(rename = "walletId", skip_serializing_if = "Option::is_none")]
39    pub wallet_id: Option<uuid::Uuid>,
40    /// If this transaction is an exchange internal transfer, this field will be
41    /// populated with the type of that trading account.
42    #[serde(
43        rename = "tradingAccount",
44        default,
45        with = "::serde_with::rust::double_option",
46        skip_serializing_if = "Option::is_none"
47    )]
48    pub trading_account: Option<Option<String>>,
49}
50
51impl DestinationTransferPeerPathResponse {
52    /// Destination of the transaction.  **Note:** In case the transaction is
53    /// sent to multiple destinations, the `destinations` parameter is be used
54    /// instead of this.
55    pub fn new(r#type: models::TransferPeerPathType) -> DestinationTransferPeerPathResponse {
56        DestinationTransferPeerPathResponse {
57            r#type,
58            sub_type: None,
59            id: None,
60            name: None,
61            wallet_id: None,
62            trading_account: None,
63        }
64    }
65}