ImportedTransaction

public struct ImportedTransaction : Equatable

Struct describing a transaction which has been imported

  • Transaction which has been imported

    Declaration

    Swift

    public let transaction: Transaction
  • Transaction from the ledger of which the imported transaction might be a duplicate

    Declaration

    Swift

    public let possibleDuplicate: Transaction?
  • Indicates if the app should allow the user to edit the imported transaction.

    Some importer output transactions which normally do not require edits e.g. from stock purchases. These indicate this by settings this value to false.

    Declaration

    Swift

    public let shouldAllowUserToEdit: Bool
  • AccountName of the account the import is for

    You can use this to detect which posting the user should not edit Note: Not set on imported transactions which have shouldAllowUserToEdit set to false

    Declaration

    Swift

    public let accountName: AccountName?
  • Saves a mapping of an imported transaction description to a different description, payee as well as account name

    Note: You should ask to user if they want to save the mapping, ideally separately for the account and description/payee

    Declaration

    Swift

    public func saveMapped(description: String, payee: String, accountName: AccountName?)

    Parameters

    description

    new description to use next time a transaction with the same origial description is imported

    payee

    new payee to use next time a transaction with the same origial description is imported

    accountName

    accountName to use next time a transaction with this payee is imported