Class: CirroIOV2::Resources::User
- Inherits:
-
Base
- Object
- Base
- CirroIOV2::Resources::User
show all
- Defined in:
- lib/cirro_io_v2/resources/user.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #resource_root
Instance Method Details
#create(params = nil) ⇒ Object
4
5
6
7
|
# File 'lib/cirro_io_v2/resources/user.rb', line 4
def create(params = nil)
response = client.request_client.request(:post, resource_root, body: params)
CirroIOV2::Responses::UserResponse.new(response.body)
end
|
#delete(id) ⇒ Object
14
15
16
17
|
# File 'lib/cirro_io_v2/resources/user.rb', line 14
def delete(id)
response = client.request_client.request(:delete, "#{resource_root}/#{id}")
Responses::UserDeleteResponse.new(response.body)
end
|
#find(id) ⇒ Object
9
10
11
12
|
# File 'lib/cirro_io_v2/resources/user.rb', line 9
def find(id)
response = client.request_client.request(:get, "#{resource_root}/#{id}")
CirroIOV2::Responses::UserResponse.new(response.body)
end
|
#invitation_attempt(id, params) ⇒ Object
34
35
36
37
|
# File 'lib/cirro_io_v2/resources/user.rb', line 34
def invitation_attempt(id, params)
response = client.request_client.request(:post, "#{resource_root}/#{id}/invitation_attempt", body: params)
CirroIOV2::Responses::UserInvitationAttemptResponse.new(response.body)
end
|
#notification_preference(id) ⇒ Object
#notification_preferences(id, params) ⇒ Object
24
25
26
27
|
# File 'lib/cirro_io_v2/resources/user.rb', line 24
def notification_preferences(id, params)
response = client.request_client.request(:post, "#{resource_root}/#{id}/notification_preferences", body: params)
CirroIOV2::Responses::UserNotificationPreferenceResponse.new(response.body)
end
|
#worker(id, params) ⇒ Object
29
30
31
32
|
# File 'lib/cirro_io_v2/resources/user.rb', line 29
def worker(id, params)
response = client.request_client.request(:post, "#{resource_root}/#{id}/worker", body: params)
CirroIOV2::Responses::UserResponse.new(response.body)
end
|