Sha256: b750ddcddd2dd129f42ea09b30404ff141a6863d0d1b3399ec6c2d93a73e27bc

Contents?: true

Size: 595 Bytes

Versions: 19

Compression:

Stored size: 595 Bytes

Contents

class Eco::API::UseCases::Default::People::Amend::ReinviteTransCase < Eco::API::Common::Loaders::UseCase
  name "reinvite"
  type :transform

  def main(*_args)
    reinvite(people.users)
  end

  private

  def reinvite(users)
    invite = session.new_job("main", "invite", :update, usecase, :account)
    users.each do |person|
      if force_invite?
        person.account.force_send_invites = true
      else
        person.account.send_invites = true
      end
      invite.add(person)
    end
  end

  def force_invite?
    options.dig(:force, :invite)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
eco-helpers-3.0.4 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-3.0.3 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-3.0.2 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-3.0.1 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-3.0.0 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.25 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.24 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.23 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.22 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.21 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.20 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.19 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.18 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.17 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.16 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.15 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.14 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.13 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
eco-helpers-2.7.12 lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb