Class: Freshworks::User

Inherits:
Base
  • Object
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

Methods included from Serializable

#serialize, #to_h, #unserialize

Constructor Details

This class inherits a constructor from Freshworks::Base

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, =nil)
  delete([id, ])
end

.endpoint_pathObject



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, )
  put([id], json_data(.to_json))
end

.retrieve(id, account_id = nil) ⇒ Object



6
7
8
# File 'lib/freshworks/user.rb', line 6

def self.retrieve(id, =nil)
  get([id, ])
end

.retrieve_allObject



2
3
4
# File 'lib/freshworks/user.rb', line 2

def self.retrieve_all
  get
end