Class: Fortnox::API::Model::Row
- Defined in:
- lib/fortnox/api/models/row.rb
Constant Summary collapse
- DISCOUNT_TYPES =
%w(AMOUNT PERCENT)- HOUSE_WORK_TYPES =
%w(CONSTRUCTION ELECTRICITY GLASSMETALWORK GROUNDDRAINAGEWORK MASONRY PAINTINGWALLPAPERING HVAC CLEANING TEXTILECLOTHING COOKING SNOWPLOWING GARDENING BABYSITTING OTHERCARE TUTORING OTHERCOSTS)
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#==, attribute, #initialize, #new?, #saved?, #update
Constructor Details
This class inherits a constructor from Fortnox::API::Model::Base
Instance Method Details
#discount_type=(raw_discount_type) ⇒ Object
70 71 72 73 |
# File 'lib/fortnox/api/models/row.rb', line 70 def discount_type=( raw_discount_type ) discount_type = raw_discount_type.upcase super discount_type if DISCOUNT_TYPES.include? discount_type end |
#house_work_type=(raw_house_work_type) ⇒ Object
75 76 77 78 |
# File 'lib/fortnox/api/models/row.rb', line 75 def house_work_type=( raw_house_work_type ) house_work_type = raw_house_work_type.upcase super house_work_type if HOUSE_WORK_TYPES.include? house_work_type end |