Class: Freshworks::User
- Inherits:
-
Base
- Object
- Base
- Freshworks::User
show all
- Defined in:
- lib/freshworks/user.rb
Constant Summary
Constants inherited
from Base
Base::BASE_URI, Base::REQUIRED_PARAMS, Base::VERSION_URI
Instance Attribute Summary
Attributes inherited from Base
#raw_response
Class Method Summary
collapse
Methods inherited from Base
endpoint, #initialize, json_data, json_headers, request_helper, #to_json
#serialize, #to_h, #unserialize
Class Method Details
.bulk_insert_modify(accounts) ⇒ Object
10
11
12
|
# File 'lib/freshworks/user.rb', line 10
def self.bulk_insert_modify(accounts)
post([], json_data(Freshworks.to_records_json(accounts)))
end
|
.deactivate(id, account_id = nil) ⇒ Object
18
19
20
|
# File 'lib/freshworks/user.rb', line 18
def self.deactivate(id, account_id=nil)
delete([id, account_id])
end
|
.endpoint_path ⇒ Object
22
23
24
|
# File 'lib/freshworks/user.rb', line 22
def self.endpoint_path
['account_users']
end
|
.modify(id, account) ⇒ Object
14
15
16
|
# File 'lib/freshworks/user.rb', line 14
def self.modify(id, account)
put([id], json_data(account.to_json))
end
|
.retrieve(id, account_id = nil) ⇒ Object
6
7
8
|
# File 'lib/freshworks/user.rb', line 6
def self.retrieve(id, account_id=nil)
get([id, account_id])
end
|
.retrieve_all ⇒ Object
2
3
4
|
# File 'lib/freshworks/user.rb', line 2
def self.retrieve_all
get
end
|