Class: FdxV660Api::EarningType
- Inherits:
-
Object
- Object
- FdxV660Api::EarningType
- Defined in:
- lib/fdx_v660_api/models/earning_type.rb
Overview
The GSE Mapping for a specific earning component. For a Government Sponsored Enterprise (GSE), such as Fannie Mae or Freddie Mac. One of BASE, BONUS, COMMISSION, OTHER, OVERTIME
Constant Summary collapse
- EARNING_TYPE =
[ # TODO: Write general description for BASE BASE = 'BASE'.freeze, # TODO: Write general description for BONUS BONUS = 'BONUS'.freeze, # TODO: Write general description for COMMISSION COMMISSION = 'COMMISSION'.freeze, # TODO: Write general description for OTHER OTHER = 'OTHER'.freeze, # TODO: Write general description for OVERTIME OVERTIME = 'OVERTIME'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = BASE) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/fdx_v660_api/models/earning_type.rb', line 34 def self.from_value(value, default_value = BASE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'base' then BASE when 'bonus' then BONUS when 'commission' then COMMISSION when 'other' then OTHER when 'overtime' then OVERTIME else default_value end end |
.validate(value) ⇒ Object
28 29 30 31 32 |
# File 'lib/fdx_v660_api/models/earning_type.rb', line 28 def self.validate(value) return false if value.nil? true end |