Module: Eco::API::MicroCases::People::ApplyChanges::SetCore::CoreExcluded
- Included in:
- Eco::API::MicroCases::People::ApplyChanges::SetCore
- Defined in:
- lib/eco/api/microcases/people/apply_changes/set_core/core_excluded.rb
Instance Method Summary collapse
-
#core_excluded(person, options) ⇒ Array<String>
The core parameters that should not be included.
Instance Method Details
#core_excluded(person, options) ⇒ Array<String>
Note:
by default supervisor_id is always excluded.
Returns the core parameters that should not be included.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/eco/api/microcases/people/apply_changes/set_core/core_excluded.rb', line 12 def core_excluded(person, ) ['supervisor_id'].tap do |core_excluded| can_exclude = person.new?? ['filter_tags'] : %w[name external_id email filter_tags] exclusions = can_exclude.select do |attr| .dig(:exclude, attr.to_sym) end core_excluded.concat(exclusions) end end |