[][src]Struct firefly_iii::models::transaction_split::TransactionSplit

pub struct TransactionSplit {
    pub user: Option<i32>,
    pub transaction_journal_id: Option<i32>,
    pub _type: Option<Type>,
    pub date: String,
    pub amount: f64,
    pub description: String,
    pub order: Option<i32>,
    pub currency_id: Option<i32>,
    pub currency_code: Option<String>,
    pub currency_symbol: Option<String>,
    pub currency_name: Option<String>,
    pub currency_decimal_places: Option<i32>,
    pub foreign_amount: Option<f64>,
    pub foreign_currency_id: Option<i32>,
    pub foreign_currency_code: Option<String>,
    pub foreign_currency_symbol: Option<String>,
    pub foreign_currency_decimal_places: Option<i32>,
    pub budget_id: Option<i32>,
    pub budget_name: Option<String>,
    pub category_id: Option<i32>,
    pub category_name: Option<String>,
    pub source_id: Option<i32>,
    pub source_name: Option<String>,
    pub source_iban: Option<String>,
    pub source_type: Option<AccountTypeProperty>,
    pub destination_id: Option<i32>,
    pub destination_name: Option<String>,
    pub destination_iban: Option<String>,
    pub destination_type: Option<AccountTypeProperty>,
    pub reconciled: Option<bool>,
    pub piggy_bank_id: Option<i32>,
    pub piggy_bank_name: Option<String>,
    pub bill_id: Option<i32>,
    pub bill_name: Option<String>,
    pub tags: Option<Vec<String>>,
    pub notes: Option<String>,
    pub internal_reference: Option<String>,
    pub external_id: Option<String>,
    pub original_source: Option<String>,
    pub recurrence_id: Option<i32>,
    pub bunq_payment_id: Option<String>,
    pub import_hash_v2: Option<String>,
    pub sepa_cc: Option<String>,
    pub sepa_ct_op: Option<String>,
    pub sepa_ct_id: Option<String>,
    pub sepa_db: Option<String>,
    pub sepa_country: Option<String>,
    pub sepa_ep: Option<String>,
    pub sepa_ci: Option<String>,
    pub sepa_batch_id: Option<String>,
    pub interest_date: Option<String>,
    pub book_date: Option<String>,
    pub process_date: Option<String>,
    pub due_date: Option<String>,
    pub payment_date: Option<String>,
    pub invoice_date: Option<String>,
}

Fields

user: Option<i32>

User ID

transaction_journal_id: Option<i32>

ID of the underlying transaction journal. Each transaction consists of a transaction group (see the top ID) and one or more journals making up the splits of the transaction.

_type: Option<Type>

Type of transaction.

date: String

Date of the transaction

amount: f64

Amount of the transaction.

description: String

Description of the transaction. Will only be used if more than one split is submitted.

order: Option<i32>

Order of this entry in the list of transactions.

currency_id: Option<i32>

Currency ID. Default is the source account's currency, or the user's default currency. Can be used instead of currency_code.

currency_code: Option<String>

Currency code. Default is the source account's currency, or the user's default currency. Can be used instead of currency_id.

currency_symbol: Option<String>currency_name: Option<String>currency_decimal_places: Option<i32>

Number of decimals used in this currency.

foreign_amount: Option<f64>

The amount in a foreign currency.

foreign_currency_id: Option<i32>

Currency ID. Default is null. Is required when you submit a foreign amount.

foreign_currency_code: Option<String>

Currency code. Default is NULL. Can be used instead of the foreign_currency_id, but either is required when submitting a foreign amount.

foreign_currency_symbol: Option<String>foreign_currency_decimal_places: Option<i32>

Number of decimals in the currency

budget_id: Option<i32>

The budget ID for this transaction.

budget_name: Option<String>

The name of the budget to be used. If the budget name is unknown, the ID will be used or the value will be ignored.

category_id: Option<i32>

The category ID for this transaction.

category_name: Option<String>

The name of the category to be used. If the category is unknown, it will be created. If the ID and the name point to different categories, the ID overrules the name.

source_id: Option<i32>

ID of the source account. For a withdrawal or a transfer, this must always be an asset account. For deposits, this must be a revenue account.

source_name: Option<String>

Name of the source account. For a withdrawal or a transfer, this must always be an asset account. For deposits, this must be a revenue account. Can be used instead of the source_id. If the transaction is a deposit, the source_name can be filled in freely: the account will be created based on the name.

source_iban: Option<String>source_type: Option<AccountTypeProperty>destination_id: Option<i32>

ID of the destination account. For a deposit or a transfer, this must always be an asset account. For withdrawals this must be an expense account.

destination_name: Option<String>

Name of the destination account. You can submit the name instead of the ID. For everything except transfers, the account will be auto-generated if unknown, so submitting a name is enough.

destination_iban: Option<String>destination_type: Option<AccountTypeProperty>reconciled: Option<bool>

If the transaction has been reconciled already. When you set this, the amount can no longer be edited by the user.

piggy_bank_id: Option<i32>

Optional. Use either this or the piggy_bank_name

piggy_bank_name: Option<String>

Optional. Use either this or the piggy_bank_id

bill_id: Option<i32>

Optional. Use either this or the bill_name

bill_name: Option<String>

Optional. Use either this or the bill_id

tags: Option<Vec<String>>

Array of tags.

notes: Option<String>internal_reference: Option<String>

Reference to internal reference of other systems.

external_id: Option<String>

Reference to external ID in other systems.

original_source: Option<String>

System generated identifier for original creator of transaction.

recurrence_id: Option<i32>

Reference to recurrence that made the transaction.

bunq_payment_id: Option<String>

Internal ID of bunq transaction.

import_hash_v2: Option<String>

Hash value of original import transaction (for duplicate detection).

sepa_cc: Option<String>

SEPA Clearing Code

sepa_ct_op: Option<String>

SEPA Opposing Account Identifier

sepa_ct_id: Option<String>

SEPA end-to-end Identifier

sepa_db: Option<String>

SEPA mandate identifier

sepa_country: Option<String>

SEPA Country

sepa_ep: Option<String>

SEPA External Purpose indicator

sepa_ci: Option<String>

SEPA Creditor Identifier

sepa_batch_id: Option<String>

SEPA Batch ID

interest_date: Option<String>book_date: Option<String>process_date: Option<String>due_date: Option<String>payment_date: Option<String>invoice_date: Option<String>

Methods

impl TransactionSplit[src]

pub fn new(
    date: String,
    amount: f64,
    description: String,
    source_id: Option<i32>,
    destination_id: Option<i32>
) -> TransactionSplit
[src]

Trait Implementations

impl Debug for TransactionSplit[src]

impl<'de> Deserialize<'de> for TransactionSplit[src]

impl PartialEq<TransactionSplit> for TransactionSplit[src]

impl Serialize for TransactionSplit[src]

impl StructuralPartialEq for TransactionSplit[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.