Module: Eco::API::MicroCases::People::ApplyChanges::SetAccount

Includes:
AccountExcluded
Included in:
Eco::API::MicroCases::People::ApplyChanges
Defined in:
lib/eco/api/microcases/people/apply_changes/set_account.rb,
lib/eco/api/microcases/people/apply_changes/set_account/account_excluded.rb

Defined Under Namespace

Modules: AccountExcluded

Instance Method Summary collapse

Methods included from AccountExcluded

#account_excluded

Instance Method Details

#set_account(entry, person, options) ⇒ Object

Parameters:

  • entry (PersonEntry)

    the input entry with the data we should set on person.

  • person (Ecoportal::API::V1::Person)

    the person we want to update, carrying the changes to be done.

  • options (Hash)

    the options.



14
15
16
17
18
19
20
21
22
# File 'lib/eco/api/microcases/people/apply_changes/set_account.rb', line 14

def (entry, person, options)
  return if options.dig(:exclude, :account)

  entry.(person, exclude: micro.(person, options))

  person..send_invites = options[:send_invites] if options.key?(:send_invites)
  micro.refresh_default_tag(entry, person, options)
  micro.fix_default_group(entry, person, options)
end