Class: Actions
- Inherits:
-
Base
show all
- Defined in:
- lib/zapix/proxies/actions.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Constructor Details
This class inherits a constructor from Base
Instance Method Details
#create(options) ⇒ Object
8
9
10
|
# File 'lib/zapix/proxies/actions.rb', line 8
def create(options)
client.action_create(options) unless exists?(options)
end
|
#delete(*action_ids) ⇒ Object
18
19
20
|
# File 'lib/zapix/proxies/actions.rb', line 18
def delete(*action_ids)
client.action_delete(action_ids)
end
|
#exists?(options) ⇒ Boolean
4
5
6
|
# File 'lib/zapix/proxies/actions.rb', line 4
def exists?(options)
client.action_exists(options)
end
|
#get_id(options) ⇒ Object
12
13
14
15
16
|
# File 'lib/zapix/proxies/actions.rb', line 12
def get_id(options)
result = client.action_get({
'filter' => {'name' => options['name']}})
result.first['actionid']
end
|