stripe/model/treasury_transaction_entry.rs
1use serde::{Serialize, Deserialize};
2use super::TreasuryTransactionsResourceBalanceImpact;
3///TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).
4#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5pub struct TreasuryTransactionEntry {
6 ///Change to a FinancialAccount's balance
7 pub balance_impact: TreasuryTransactionsResourceBalanceImpact,
8 ///Time at which the object was created. Measured in seconds since the Unix epoch.
9 pub created: i64,
10 ///Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
11 pub currency: String,
12 ///When the TransactionEntry will impact the FinancialAccount's balance.
13 pub effective_at: i64,
14 ///The FinancialAccount associated with this object.
15 pub financial_account: String,
16 ///Token of the flow associated with the TransactionEntry.
17 #[serde(skip_serializing_if = "Option::is_none")]
18 pub flow: Option<String>,
19 ///Details of the flow associated with the TransactionEntry.
20 #[serde(skip_serializing_if = "Option::is_none")]
21 pub flow_details: Option<serde_json::Value>,
22 ///Type of the flow associated with the TransactionEntry.
23 pub flow_type: String,
24 ///Unique identifier for the object.
25 pub id: String,
26 ///Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
27 pub livemode: bool,
28 ///String representing the object's type. Objects of the same type share the same value.
29 pub object: String,
30 ///The Transaction associated with this object.
31 pub transaction: serde_json::Value,
32 ///The specific money movement that generated the TransactionEntry.
33 #[serde(rename = "type")]
34 pub type_: String,
35}
36impl std::fmt::Display for TreasuryTransactionEntry {
37 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
38 write!(f, "{}", serde_json::to_string(self).unwrap())
39 }
40}