Class: Bob::Employee::CustomTables
- Inherits:
-
API
- Object
- API
- Bob::Employee::CustomTables
show all
- Defined in:
- lib/bob/api/employee/custom_tables.rb
Constant Summary
Constants inherited
from API
API::BASE_URL, API::SANDBOX_URL
Class Method Summary
collapse
Methods inherited from API
build_url, create_csv, delete, get, headers, post, post_file, post_media, put
Class Method Details
.add_row(employee_id, table_id, row_data) ⇒ Object
11
12
13
|
# File 'lib/bob/api/employee/custom_tables.rb', line 11
def self.add_row(employee_id, table_id, row_data)
post("people/custom-tables/#{employee_id}/#{table_id}", { values: row_data })
end
|
.remove_row(employee_id, table_id, row_id) ⇒ Object
19
20
21
|
# File 'lib/bob/api/employee/custom_tables.rb', line 19
def self.remove_row(employee_id, table_id, row_id)
delete("people/custom-tables/#{employee_id}/#{table_id}/#{row_id}")
end
|
.rows(employee_id, table_id, options = { includeHumanReadable: true }) ⇒ Object
6
7
8
9
|
# File 'lib/bob/api/employee/custom_tables.rb', line 6
def self.rows(employee_id, table_id, options = { includeHumanReadable: true })
response = get("people/custom-tables/#{employee_id}/#{table_id}", options)
TableParser.new(response).rows
end
|
.update_row(employee_id, table_id, row_id, row_data) ⇒ Object
15
16
17
|
# File 'lib/bob/api/employee/custom_tables.rb', line 15
def self.update_row(employee_id, table_id, row_id, row_data)
put("people/custom-tables/#{employee_id}/#{table_id}/#{row_id}", row_data)
end
|