#[non_exhaustive]pub struct Transaction {Show 19 fields
pub account_id: String,
pub amount: i64,
pub amount_is_pending: bool,
pub can_add_to_tab: bool,
pub can_be_excluded_from_breakdown: bool,
pub can_be_made_subscription: bool,
pub can_split_the_bill: bool,
pub category: String,
pub created: DateTime<Utc>,
pub currency: String,
pub description: String,
pub id: String,
pub include_in_spending: bool,
pub merchant: Option<MerchantInfo>,
pub metadata: HashMap<String, String>,
pub notes: String,
pub decline_reason: Option<DeclineReason>,
pub is_load: bool,
pub settled: Option<DateTime<Utc>>,
}
Expand description
A Monzo transaction
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.account_id: String
The unique ID of the account associated with the transaction
amount: i64
The amount of the transaction, in the smallest unit of currency (ie. ‘pence’ or ‘cents’)
amount_is_pending: bool
Whether the transaction is pending, or complete
can_add_to_tab: bool
Whether the transaction can be added to a tab
can_be_excluded_from_breakdown: bool
Whether the transaction can be excluded from breakdown
can_be_made_subscription: bool
Whether the transaction can be made into a recurring subscription
can_split_the_bill: bool
Whether the transaction can be split
category: String
The transaction category
created: DateTime<Utc>
The timestamp when the transaction was created
currency: String
The three-letter currency string for the transaction
description: String
The transaction description
id: String
The unique transaction ID
include_in_spending: bool
Whether transaction is included in spending
merchant: Option<MerchantInfo>
This can be either None, the merchant ID, or an object containing the merchant details
metadata: HashMap<String, String>
Any custom metadata which has been added to the transaction
notes: String
User-added transaction notes
decline_reason: Option<DeclineReason>
If the transaction was declined, this enum will encode the reason
is_load: bool
Top-ups to an account are represented as transactions with a positive
amount and is_load
= true. Other transactions such as refunds,
reversals or chargebacks may have a positive amount but is_load
=
false
settled: Option<DateTime<Utc>>
The timestamp at which the transaction was settled
This is None
if the transaction is authorised, but not yet complete.
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more