Class: FdxV660Api::ConsentDurationType2
- Inherits:
-
Object
- Object
- FdxV660Api::ConsentDurationType2
- Defined in:
- lib/fdx_v660_api/models/consent_duration_type2.rb
Overview
The type of duration of the consent
Constant Summary collapse
- CONSENT_DURATION_TYPE2 =
[ # TODO: Write general description for ONE_TIME ONE_TIME = 'ONE_TIME'.freeze, # TODO: Write general description for PERSISTENT PERSISTENT = 'PERSISTENT'.freeze, # TODO: Write general description for TIME_BOUND TIME_BOUND = 'TIME_BOUND'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ONE_TIME) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/fdx_v660_api/models/consent_duration_type2.rb', line 26 def self.from_value(value, default_value = ONE_TIME) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'one_time' then ONE_TIME when 'persistent' then PERSISTENT when 'time_bound' then TIME_BOUND else default_value end end |
.validate(value) ⇒ Object
20 21 22 23 24 |
# File 'lib/fdx_v660_api/models/consent_duration_type2.rb', line 20 def self.validate(value) return false if value.nil? true end |