Importer

public protocol Importer

Protocol to represent an Importer, regardless of type

  • User friendly name of the importer

    Can be used in the help

    Declaration

    Swift

    static var importerName: String { get }
  • Help text for the importer

    Declaration

    Swift

    static var helpText: String { get }
  • A description of the import, e.g. a file name together with the importer name

    Can be used in the UI when an importer requests more information, e.g. account selection or credentials

    Declaration

    Swift

    var importName: String { get }
  • Delegate to request input

    Declaration

    Swift

    var delegate: ImporterDelegate? { get set }
  • Loads the data to import

    You must call this method before you call nextTransaction(). You might want to show a loading indicator during the loading, as depending on the importer this might take some time.

    Declaration

    Swift

    func load()
  • Returns the next ImportedTransaction

    You must call load before you call this function. Returns nil when there are no more lines left.

    Declaration

    Swift

    func nextTransaction() -> ImportedTransaction?
  • Returns balances to be imported

    Only some importer can import balances, so it might return an empty array Only call this function after you received all transactions

    Declaration

    Swift

    func balancesToImport() -> [Balance]
  • Returns prices to be imported

    Only some importer can import prices, so it might return an empty array Only call this function after you received all transactions

    Declaration

    Swift

    func pricesToImport() -> [Price]