SaveTransaction
public struct SaveTransaction : Codable, Equatable, Sendable
A model representing a transaction to be saved or updated
-
The ID of the transaction (only used when updating an existing transaction)
Declaration
Swift
public let id: String? -
The account ID for the transaction
Declaration
Swift
public let accountId: String? -
The transaction date in ISO format (e.g. 2016-12-01). Future dates not permitted.
Declaration
Swift
public let date: String? -
The transaction amount in milliunits format
Declaration
Swift
public let amount: Int? -
The payee ID for the transaction
Declaration
Swift
public let payeeId: String? -
The payee name. If provided and payeeId is null, will be used to resolve or create payee.
Declaration
Swift
public let payeeName: String? -
The category ID for the transaction
Declaration
Swift
public let categoryId: String? -
A memo for the transaction
Declaration
Swift
public let memo: String? -
The cleared status of the transaction
Declaration
Swift
public let cleared: ClearedStatus? -
Whether the transaction is approved
Declaration
Swift
public let approved: Bool? -
The transaction flag color
Declaration
Swift
public let flagColor: FlagColor? -
The subtransactions for a split transaction
Declaration
Swift
public let subtransactions: [SaveSubTransaction]? -
The import ID if this is an imported transaction
Declaration
Swift
public let importId: String? -
init(id:accountId: date: amount: payeeId: payeeName: categoryId: memo: cleared: approved: flagColor: subtransactions: importId: ) Creates a new SaveTransaction instance
Declaration
Swift
public init( id: String? = nil, accountId: String? = nil, date: String? = nil, amount: Int? = nil, payeeId: String? = nil, payeeName: String? = nil, categoryId: String? = nil, memo: String? = nil, cleared: ClearedStatus? = nil, approved: Bool? = nil, flagColor: FlagColor? = nil, subtransactions: [SaveSubTransaction]? = nil, importId: String? = nil )Parameters
idThe ID of the transaction (only used when updating an existing transaction)
accountIdThe account ID for the transaction
dateThe transaction date in ISO format (e.g. 2016-12-01). Future dates not permitted.
amountThe transaction amount in milliunits format
payeeIdThe payee ID for the transaction
payeeNameThe payee name (used if payeeId is nil)
categoryIdThe category ID
memoA memo for the transaction
clearedThe cleared status
approvedWhether the transaction is approved
flagColorThe transaction flag color
subtransactionsThe subtransactions for a split transaction
importIdThe import ID for imported transactions
View on GitHub