Module: Teamlab::PeopleReassign

Included in:
People
Defined in:
lib/teamlab/modules/people/people_reassign.rb

Overview

Module for people reassign data

Instance Method Summary collapse

Instance Method Details

#reassign_progress(from_user_id) ⇒ Hash

Returns the progress of the started reassign process

Parameters:

  • from_user_id (String)

    User ID (guid) whose data is reassigned

Returns:

  • (Hash)

    reassign progress data



18
19
20
# File 'lib/teamlab/modules/people/people_reassign.rb', line 18

def reassign_progress(from_user_id)
  @request.get(%w[reassign progress], userId: from_user_id)
end

#start_reassign_user_data(from_user_id, to_user_id, delete_profile = true) ⇒ Hash

Start a reassign process

Parameters:

  • from_user_id (String)

    guid of user from whom reassign

  • to_user_id (String)

    guid of user to whom reassign

  • delete_profile (True, False) (defaults to: true)

    Delete profile when reassignment will be finished

Returns:

  • (Hash)

    reassign progress data



11
12
13
# File 'lib/teamlab/modules/people/people_reassign.rb', line 11

def start_reassign_user_data(from_user_id, to_user_id, delete_profile = true)
  @request.post(%w[reassign start], fromUserId: from_user_id, toUserId: to_user_id, deleteProfile: delete_profile)
end

#terminate_reassign(user_id) ⇒ Void

Terminate reassign process

Parameters:

  • user_id (String)

    User ID (guid) whose data is reassigned

Returns:

  • (Void)


25
26
27
# File 'lib/teamlab/modules/people/people_reassign.rb', line 25

def terminate_reassign(user_id)
  @request.put(%w[reassign terminate], userId: user_id)
end