fireblocks_sdk/models/
source_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/// SourceTransferPeerPathResponse : Source of the transaction.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SourceTransferPeerPathResponse {
17    #[serde(rename = "type")]
18    pub r#type: models::TransferPeerPathType,
19    /// In case the type is set to `EXCHANGE_ACCOUNT` or `FIAT_ACCOUNT`, the
20    /// specific exchange vendor name or fiat vendor name. In case the type is
21    /// set to `INTERNAL_WALLET` or `EXTERNAL_WALLET`, the subType is set to
22    /// `Internal` or `External`.
23    #[serde(rename = "subType", skip_serializing_if = "Option::is_none")]
24    pub sub_type: Option<String>,
25    /// 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/get_vault-accounts-paged), [listing exchange account](https://developers.fireblocks.com/reference/get_exchange-accounts), [listing fiat accounts](https://developers.fireblocks.com/reference/get_fiat-accounts), [listing internal wallets](https://developers.fireblocks.com/reference/get_internal-wallets), [listing external wallets](https://developers.fireblocks.com/reference/get_external-wallets), [listing network connections](https://developers.fireblocks.com/reference/get_network-connections). For the other types, this parameter is not needed.
26    #[serde(
27        rename = "id",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub id: Option<Option<String>>,
33    /// The name of the peer
34    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
35    pub name: Option<String>,
36    #[serde(rename = "walletId", skip_serializing_if = "Option::is_none")]
37    pub wallet_id: Option<uuid::Uuid>,
38    /// If this transaction is an exchange internal transfer, this field will be
39    /// populated with the type of that trading account.
40    #[serde(
41        rename = "tradingAccount",
42        default,
43        with = "::serde_with::rust::double_option",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub trading_account: Option<Option<String>>,
47}
48
49impl SourceTransferPeerPathResponse {
50    /// Source of the transaction.
51    pub fn new(r#type: models::TransferPeerPathType) -> SourceTransferPeerPathResponse {
52        SourceTransferPeerPathResponse {
53            r#type,
54            sub_type: None,
55            id: None,
56            name: None,
57            wallet_id: None,
58            trading_account: None,
59        }
60    }
61}