rosetta_types/
related_transaction.rs

1/*
2 * Rosetta
3 *
4 * Build Once. Integrate Your Blockchain Everywhere.
5 *
6 * The version of the OpenAPI document: 1.4.13
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// RelatedTransaction : The related_transaction allows implementations to link together multiple transactions. An unpopulated network identifier indicates that the related transaction is on the same network.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct RelatedTransaction {
15    #[serde(rename = "network_identifier", skip_serializing_if = "Option::is_none")]
16    pub network_identifier: Option<crate::NetworkIdentifier>,
17    #[serde(rename = "transaction_identifier")]
18    pub transaction_identifier: crate::TransactionIdentifier,
19    #[serde(rename = "direction")]
20    pub direction: crate::Direction,
21}
22
23impl RelatedTransaction {
24    /// The related_transaction allows implementations to link together multiple transactions. An unpopulated network identifier indicates that the related transaction is on the same network.
25    pub fn new(
26        transaction_identifier: crate::TransactionIdentifier,
27        direction: crate::Direction,
28    ) -> RelatedTransaction {
29        RelatedTransaction {
30            network_identifier: None,
31            transaction_identifier,
32            direction,
33        }
34    }
35}