Class: Sisense::Group
Constant Summary
collapse
- RESOURCE_NAME =
"groups".freeze
Class Method Summary
collapse
api_client, class_name, descendants, #initialize, resource_base_path, #to_h
Class Method Details
.create(params:) ⇒ Object
17
18
19
20
21
|
# File 'lib/sisense/group.rb', line 17
def self.create(params:)
path = resource_base_path
response = api_client.post(path, params: params)
api_client.parsed_response(response, object_class: self)
end
|
.delete(id:) ⇒ Object
29
30
31
32
|
# File 'lib/sisense/group.rb', line 29
def self.delete(id:)
path = [resource_base_path, id].join("/")
api_client.delete(path)
end
|
.list(params: nil) ⇒ Object
5
6
7
8
9
|
# File 'lib/sisense/group.rb', line 5
def self.list(params: nil)
path = resource_base_path
response = api_client.get(path, params: params)
api_client.parsed_response(response, object_class: self)
end
|
.retrieve(id:, params: nil) ⇒ Object
11
12
13
14
15
|
# File 'lib/sisense/group.rb', line 11
def self.retrieve(id:, params: nil)
path = [resource_base_path, id].join("/")
response = api_client.get(path, params: params)
api_client.parsed_response(response, object_class: self)
end
|
.update(id:, params:) ⇒ Object
23
24
25
26
27
|
# File 'lib/sisense/group.rb', line 23
def self.update(id:, params:)
path = [resource_base_path(use_legacy_api: true), id].join("/")
response = api_client.put(path, params: params)
api_client.parsed_response(response, object_class: self)
end
|