Settings

public enum Settings

Constants releated to settings of the importer

  • A Storage which saves the settings

    Default value is UserDefaults.standard

    Declaration

    Swift

    public static var storage: SettingsStorage
  • Mappings of descriptions the user saved when importing previous transactions

    These are automatically applied when importing and are only exported to allow apps to offer a settings screen to view and modify them.

    Keys are the original descriptions from the importer and the value are the new descriptions the user mapped them to

    Declaration

    Swift

    public static var allDescriptionMappings: [String : String] { get }
  • Mappings of payees the user saved when importing previous transactions

    These are automatically applied when importing and are only exported to allow apps to offer a settings screen to view and modify them.

    Keys are the original descriptions from the importer and the values are the new payees the user mapped them to

    Declaration

    Swift

    public static var allPayeeMappings: [String : String] { get }
  • Mappings of accounts the user saved when importing previous transactions

    These are automatically applied when importing and are only exported to allow apps to offer a settings screen to view and modify them.

    Keys are payees and the values are account name strings the user mapped them to

    Declaration

    Swift

    public static var allAccountMappings: [String : String] { get }
  • See also dateToleranceInDays which offers this value as Int

    Declaration

    Swift

    public static var dateTolerance: TimeInterval { get }
  • Date tolerance in days to check for duplicate transactions when importing

    See also dateTolerance which offers this value as TimeInterval

    Declaration

    Swift

    public static var dateToleranceInDays: Int { get set }
  • Save a new mapping of a description the user wants to automatically apply to new transactions

    Note: Do not use this function to save the mapping for an imported transaction (use the functions on ImportedTransaction instead), but only for adjustments made on a settings screen.

    Declaration

    Swift

    public static func setDescriptionMapping(key: String, description: String?)

    Parameters

    key

    original description of the imported transaction

    description

    new description - Use nil to delete a mapping.

  • Save a new mapping of a payee the user wants to automatically apply to new transactions with a certain description

    Note: Do not use this function to save the mapping for an imported transaction (use the functions on ImportedTransaction instead), but only for adjustments made on a settings screen.

    Declaration

    Swift

    public static func setPayeeMapping(key: String, payee: String?)

    Parameters

    key

    original description of an imported transaction

    payee

    payee to map transactions with this description to. Use nil to delete a mapping.

  • Save a new mapping of an account the user wants to automatically apply to new transactions from a certain payee

    Note: Do not use this function to save the mapping for an imported transaction (use the functions on ImportedTransaction instead), but only for adjustments made on a settings screen.

    Declaration

    Swift

    public static func setAccountMapping(key: String, account: String?)

    Parameters

    key

    payee

    account

    account name string - Use nil to delete a mapping