Class: Beanie::WorkCentreGroup

Inherits:
Api
  • Object
show all
Defined in:
lib/beanie/work_centre_group.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Api

all, build_url, #construct_path, delete, #extract, #field_name, find, get, #object_name, #populate, post, put, #save!, set_headers

Constructor Details

#initializeWorkCentreGroup

Initialize instance variables



36
37
38
39
40
41
# File 'lib/beanie/work_centre_group.rb', line 36

def initialize
  @id = nil
  @code = nil
  @name = nil
  @description = nil
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



32
33
34
# File 'lib/beanie/work_centre_group.rb', line 32

def code
  @code
end

#descriptionObject

Returns the value of attribute description.



32
33
34
# File 'lib/beanie/work_centre_group.rb', line 32

def description
  @description
end

#idObject

Returns the value of attribute id.



32
33
34
# File 'lib/beanie/work_centre_group.rb', line 32

def id
  @id
end

#nameObject

Returns the value of attribute name.



32
33
34
# File 'lib/beanie/work_centre_group.rb', line 32

def name
  @name
end

Class Method Details

.find_by_code(code) ⇒ Object

Find a work centre group by code



45
46
47
48
# File 'lib/beanie/work_centre_group.rb', line 45

def self.find_by_code(code)
  data = self.get(:code => code)
  new.populate(data['work_centre_group'])
end