pub struct UserRule {
pub account_ids: Vec<i64>,
pub accounting_period_id: i64,
pub all_accounts: bool,
pub id: i64,
pub is_income: bool,
pub operator: String,
pub search_string: String,
pub search_type: String,
pub sort_key: i64,
pub suggestion_type: String,
pub suggestion_value: String,
pub extra: Map<String, Value>,
}Expand description
Stored statement suggestion rule. Historical values are returned as stored, including unsupported values accepted by the write validator.
Fields§
§account_ids: Vec<i64>Accounts whose statement movements are eligible when allAccounts is false. An empty list then matches no accounts.
accounting_period_id: i64Accounting period owning these rules.
all_accounts: boolApply to all statement accounts in this accounting period instead of accountIds.
id: i64Generated ID, replaced when the rule set is saved.
is_income: boolTrue matches incoming movements, false matches outgoing movements.
operator: Stringcontains and = compare case-insensitively. regex uses PHP preg_match with the supplied pattern and flags. The storage API also accepts other strings; unsupported search types/operators produce no match.
search_string: StringText to match against the movement purpose, or a complete PHP regular expression including delimiters for regex (for example /donation/i).
search_type: StringMovement field to search. Only purpose is implemented. The storage API also accepts other strings; unsupported search types/operators produce no match.
sort_key: i64Ascending rule order. IDs are regenerated when the complete rule set is replaced.
suggestion_type: StringBooking field for which a value is suggested. The storage API also accepts other strings; unsupported search types/operators produce no match.
suggestion_value: StringSuggested account or cost-center ID encoded as a string. Referenced IDs are not validated when saving the rules.
extra: Map<String, Value>Fields not described by the spec, e.g. instance-specific DB fields.