Class: ThePlaidApi::TotalCanonicalDescription
- Inherits:
-
Object
- Object
- ThePlaidApi::TotalCanonicalDescription
- Defined in:
- lib/the_plaid_api/models/total_canonical_description.rb
Overview
Commonly used term to describe the line item.
Constant Summary collapse
- TOTAL_CANONICAL_DESCRIPTION =
[ # TODO: Write general description for BONUS BONUS = 'BONUS'.freeze, # TODO: Write general description for COMMISSION COMMISSION = 'COMMISSION'.freeze, # TODO: Write general description for OVERTIME OVERTIME = 'OVERTIME'.freeze, # TODO: Write general description for ENUM_PAID_TIME_OFF ENUM_PAID_TIME_OFF = 'PAID TIME OFF'.freeze, # TODO: Write general description for ENUM_REGULAR_PAY ENUM_REGULAR_PAY = 'REGULAR PAY'.freeze, # TODO: Write general description for VACATION VACATION = 'VACATION'.freeze, # TODO: Write general description for ENUM_EMPLOYEE_MEDICARE ENUM_EMPLOYEE_MEDICARE = 'EMPLOYEE MEDICARE'.freeze, # TODO: Write general description for FICA FICA = 'FICA'.freeze, # TODO: Write general description for ENUM_SOCIAL_SECURITY_EMPLOYEE_TAX ENUM_SOCIAL_SECURITY_EMPLOYEE_TAX = 'SOCIAL SECURITY EMPLOYEE TAX'.freeze, # TODO: Write general description for MEDICAL MEDICAL = 'MEDICAL'.freeze, # TODO: Write general description for VISION VISION = 'VISION'.freeze, # TODO: Write general description for DENTAL DENTAL = 'DENTAL'.freeze, # TODO: Write general description for ENUM_NET_PAY ENUM_NET_PAY = 'NET PAY'.freeze, # TODO: Write general description for TAXES TAXES = 'TAXES'.freeze, # TODO: Write general description for NOT_FOUND NOT_FOUND = 'NOT_FOUND'.freeze, # TODO: Write general description for OTHER OTHER = 'OTHER'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = BONUS) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/the_plaid_api/models/total_canonical_description.rb', line 65 def self.from_value(value, default_value = BONUS) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'bonus' then BONUS when 'commission' then COMMISSION when 'overtime' then OVERTIME when 'enum_paid_time_off' then ENUM_PAID_TIME_OFF when 'enum_regular_pay' then ENUM_REGULAR_PAY when 'vacation' then VACATION when 'enum_employee_medicare' then ENUM_EMPLOYEE_MEDICARE when 'fica' then FICA when 'enum_social_security_employee_tax' then ENUM_SOCIAL_SECURITY_EMPLOYEE_TAX when 'medical' then MEDICAL when 'vision' then VISION when 'dental' then DENTAL when 'enum_net_pay' then ENUM_NET_PAY when 'taxes' then TAXES when 'not_found' then NOT_FOUND when 'other' then OTHER else default_value end end |
.validate(value) ⇒ Object
59 60 61 62 63 |
# File 'lib/the_plaid_api/models/total_canonical_description.rb', line 59 def self.validate(value) return false if value.nil? TOTAL_CANONICAL_DESCRIPTION.include?(value) end |