class Actions
Public Instance Methods
create(options)
click to toggle source
# File lib/zapix/proxies/actions.rb, line 13 def create(options) client.action_create(options) unless exists?(options) end
delete(*action_ids)
click to toggle source
# File lib/zapix/proxies/actions.rb, line 23 def delete(*action_ids) client.action_delete(action_ids) end
exists?(options)
click to toggle source
# File lib/zapix/proxies/actions.rb, line 4 def exists?(options) result = client.action_get('filter' => { 'name' => options['name'] }) if result.nil? || result.empty? return false else return true end end
get_id(options)
click to toggle source
# File lib/zapix/proxies/actions.rb, line 17 def get_id(options) result = client.action_get('filter' => { 'name' => options['name'] }) result.first['actionid'] end