Class: AdRoll::Api::User
Class Method Summary collapse
- .deactivate(user:) ⇒ Object
- .edit(u:, username:, first_name:, last_name:, email_preference_general:, email_preference_payment:, email_preference_campaign_notifications:) ⇒ Object
- .get(user:) ⇒ Object
- .grant(u:, advertisables:, organization_role:) ⇒ Object
Class Method Details
.deactivate(user:) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/adroll/user.rb', line 5 def deactivate(user:) params = { user: user }.reject { |_, value| value.nil? } call_api(:get, __method__, params) end |
.edit(u:, username:, first_name:, last_name:, email_preference_general:, email_preference_payment:, email_preference_campaign_notifications:) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/adroll/user.rb', line 13 def edit(u:, username:, first_name:, last_name:, email_preference_general:, email_preference_payment:, email_preference_campaign_notifications:) params = { u: u, username: username, first_name: first_name, last_name: last_name, email_preference_general: email_preference_general, email_preference_payment: email_preference_payment, email_preference_campaign_notifications: email_preference_campaign_notifications }.reject { |_, value| value.nil? } call_api(:put, __method__, params) end |
.get(user:) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/adroll/user.rb', line 28 def get(user:) params = { user: user }.reject { |_, value| value.nil? } call_api(:get, __method__, params) end |
.grant(u:, advertisables:, organization_role:) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/adroll/user.rb', line 36 def grant(u:, advertisables:, organization_role:) params = { u: u, advertisables: advertisables, organization_role: organization_role }.reject { |_, value| value.nil? } call_api(:get, __method__, params) end |