Module: Impermium::Account

Included in:
User
Defined in:
lib/impermium/user/account.rb

Constant Summary collapse

REPORTER_USER_TYPE_VALUES =

> default first

["ENDUSER", "MODERATOR"]

Instance Method Summary collapse

Instance Method Details

#account(user_id, enduser_ip, options = {}, &block) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/impermium/user/account.rb', line 5

def (user_id, enduser_ip, options={}, &block)
  options.merge!(
    :user_id => user_id,
    :enduser_ip => enduser_ip
    )
  post("account", options, &block)
end

#account_analyst_feedback(analyst_id, user_id, desired_result, options = {}, &block) ⇒ Object



28
29
30
31
32
33
34
35
# File 'lib/impermium/user/account.rb', line 28

def (analyst_id, user_id, desired_result, options={}, &block)
  options.merge!(
    :analyst_id => analyst_id,
    :user_id => user_id,
    :desired_result => desired_result
    )
  post("account/analyst_feedback", options, &block)
end

#account_attempt(enduser_ip, options = {}, &block) ⇒ Object



13
14
15
16
17
18
# File 'lib/impermium/user/account.rb', line 13

def (enduser_ip, options={}, &block)
  options.merge!(
    :enduser_ip => enduser_ip
    )
  post("account/attempt", options, &block)
end

#account_login(user_id, enduser_ip, options = {}, &block) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/impermium/user/account.rb', line 20

def (user_id, enduser_ip, options={}, &block)
  options.merge!(
    :user_id => user_id,
    :enduser_ip => enduser_ip
    )
  post("account/login", options, &block)
end

#account_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, user_id, desired_result, options = {}, &block) ⇒ Object



37
38
39
40
41
42
43
44
45
46
# File 'lib/impermium/user/account.rb', line 37

def (rep_usr_id, rep_usr_type, reporter_ip, user_id, desired_result, options={}, &block)
  options.merge!(
    :reporter_user_id => rep_usr_id,
    :reporter_user_type => REPORTER_USER_TYPE_VALUES.include?(rep_usr_type) ? rep_usr_type : REPORTER_USER_TYPE_VALUES.first,
    :reporter_ip => reporter_ip,
    :user_id => user_id,
    :desired_result => desired_result
    )
  post("account/user_feedback", options, &block)
end