Class: XeroRuby::PayrollNz::TaxCode
- Inherits:
-
Object
- Object
- XeroRuby::PayrollNz::TaxCode
- Defined in:
- lib/xero-ruby/models/payroll_nz/tax_code.rb
Class Method Summary collapse
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.build_from_hash(value) ⇒ String
Builds the enum from string
40 41 42 |
# File 'lib/xero-ruby/models/payroll_nz/tax_code.rb', line 40 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
47 48 49 50 51 |
# File 'lib/xero-ruby/models/payroll_nz/tax_code.rb', line 47 def build_from_hash(value) constantValues = TaxCode.constants.select { |c| TaxCode::const_get(c) == value } raise "Invalid ENUM value #{value} for class #TaxCode" if constantValues.empty? value end |