getMatchingRules retrieves a list of matching rules by their IDs. Parameters: - ctx: The context for managing the request. - matchingRuleIDs: The list of matching rule IDs to retrieve. Returns a list of matching rules, or an error if retrieval fails.
(ctx context.Context, matchingRuleIDs []string)
| 1298 | // - matchingRuleIDs: The list of matching rule IDs to retrieve. |
| 1299 | // Returns a list of matching rules, or an error if retrieval fails. |
| 1300 | func (s *LedgerForge) getMatchingRules(ctx context.Context, matchingRuleIDs []string) ([]model.MatchingRule, error) { |
| 1301 | var rules []model.MatchingRule |
| 1302 | for _, id := range matchingRuleIDs { |
| 1303 | rule, err := s.GetMatchingRule(ctx, id) |
| 1304 | if err != nil { |
| 1305 | return nil, err |
| 1306 | } |
| 1307 | rules = append(rules, *rule) |
| 1308 | } |
| 1309 | return rules, nil |
| 1310 | } |
| 1311 | |
| 1312 | // matchesString compares the external and internal string values based on the matching criteria. |
| 1313 | // Parameters: |
no test coverage detected