Class: ServiceNow::Client::Tables

Inherits:
Api
  • Object
show all
Defined in:
lib/servicenow/client/tables.rb

Instance Attribute Summary

Attributes inherited from Api

#connection

Instance Method Summary collapse

Methods inherited from Api

#delete, #get_many, #get_one, #patch, #post, #put

Constructor Details

#initialize(connection, table_name) ⇒ Tables

Returns a new instance of Tables.



3
4
5
6
# File 'lib/servicenow/client/tables.rb', line 3

def initialize(connection, table_name)
  super(connection)
  @table_name = table_name
end

Instance Method Details

#all(params = {}) ⇒ Object



8
9
10
# File 'lib/servicenow/client/tables.rb', line 8

def all(params = {})
  get_many "table/#{@table_name}", params
end

#create(params = {}) ⇒ Object



16
17
18
# File 'lib/servicenow/client/tables.rb', line 16

def create(params = {})
  post "table/#{@table_name}", params
end

#find(id) ⇒ Object



12
13
14
# File 'lib/servicenow/client/tables.rb', line 12

def find(id)
  get_one "table/#{@table_name}/#{id}"
end