Class: Bob::MetaData::CompanyFields

Inherits:
API
  • Object
show all
Defined in:
lib/bob/api/metadata/company_fields.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

.allObject



6
7
8
9
# File 'lib/bob/api/metadata/company_fields.rb', line 6

def self.all
  response = get('company/people/fields')
  CompanyFieldParser.new(response).fields
end

.create(params = {}) ⇒ Object



11
12
13
# File 'lib/bob/api/metadata/company_fields.rb', line 11

def self.create(params = {})
  post('company/people/fields', params)
end

.remove(field_id) ⇒ Object



19
20
21
# File 'lib/bob/api/metadata/company_fields.rb', line 19

def self.remove(field_id)
  delete("company/people/fields/#{field_id}")
end

.update(field_id, params = {}) ⇒ Object



15
16
17
# File 'lib/bob/api/metadata/company_fields.rb', line 15

def self.update(field_id, params = {})
  put("company/people/fields/#{field_id}", params)
end