Class: Beanie::Product
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_service ⇒ Object
Returns the value of attribute is_service.
-
#name ⇒ Object
Returns the value of attribute name.
-
#nominal_account_id ⇒ Object
Returns the value of attribute nominal_account_id.
-
#product_category_id ⇒ Object
Returns the value of attribute product_category_id.
-
#unit_of_measure ⇒ Object
Returns the value of attribute unit_of_measure.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Product
constructor
Initialize instance variables.
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
#initialize ⇒ Product
Initialize instance variables
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/beanie/product.rb', line 37 def initialize @id = nil @description = nil @name = nil @code = nil @is_service = nil @nominal_account_id = nil @product_category_id = nil @unit_of_measure = nil end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
32 33 34 |
# File 'lib/beanie/product.rb', line 32 def code @code end |
#description ⇒ Object
Returns the value of attribute description.
32 33 34 |
# File 'lib/beanie/product.rb', line 32 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
32 33 34 |
# File 'lib/beanie/product.rb', line 32 def id @id end |
#is_service ⇒ Object
Returns the value of attribute is_service.
32 33 34 |
# File 'lib/beanie/product.rb', line 32 def is_service @is_service end |
#name ⇒ Object
Returns the value of attribute name.
32 33 34 |
# File 'lib/beanie/product.rb', line 32 def name @name end |
#nominal_account_id ⇒ Object
Returns the value of attribute nominal_account_id.
33 34 35 |
# File 'lib/beanie/product.rb', line 33 def nominal_account_id @nominal_account_id end |
#product_category_id ⇒ Object
Returns the value of attribute product_category_id.
33 34 35 |
# File 'lib/beanie/product.rb', line 33 def product_category_id @product_category_id end |
#unit_of_measure ⇒ Object
Returns the value of attribute unit_of_measure.
33 34 35 |
# File 'lib/beanie/product.rb', line 33 def unit_of_measure @unit_of_measure end |
Class Method Details
.find_by_name(name) ⇒ Object
48 49 50 |
# File 'lib/beanie/product.rb', line 48 def self.find_by_name(name) Beanie.find("products", "name", name) end |