Class: FdxV660Api::RecurringPaymentDurationType2
- Inherits:
-
Object
- Object
- FdxV660Api::RecurringPaymentDurationType2
- Defined in:
- lib/fdx_v660_api/models/recurring_payment_duration_type2.rb
Overview
Type of duration
Constant Summary collapse
- RECURRING_PAYMENT_DURATION_TYPE2 =
[ # TODO: Write general description for ENDDATE ENDDATE = 'ENDDATE'.freeze, # TODO: Write general description for NOEND NOEND = 'NOEND'.freeze, # TODO: Write general description for NUMBEROFTIMES NUMBEROFTIMES = 'NUMBEROFTIMES'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ENDDATE) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/fdx_v660_api/models/recurring_payment_duration_type2.rb', line 26 def self.from_value(value, default_value = ENDDATE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'enddate' then ENDDATE when 'noend' then NOEND when 'numberoftimes' then NUMBEROFTIMES else default_value end end |
.validate(value) ⇒ Object
20 21 22 23 24 |
# File 'lib/fdx_v660_api/models/recurring_payment_duration_type2.rb', line 20 def self.validate(value) return false if value.nil? true end |