pub struct UserRuleCreate {
pub account_ids: Vec<i64>,
pub all_accounts: bool,
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
Rule for generating booking suggestions from imported statement movements. Rules belong to an accounting period, not to the currently logged-in person.
Fields§
§account_ids: Vec<i64>Accounts whose statement movements are eligible when allAccounts is false. An empty list then matches no accounts.
all_accounts: boolApply to all statement accounts in this accounting period instead of accountIds.
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.
Allowed values: =, contains, regex.
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.
Allowed values: purpose.
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.
Allowed values: accountId, contraAccountId, costCenterId.
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.