Class: FdxV660Api::ConsentResourceType
- Inherits:
-
Object
- Object
- FdxV660Api::ConsentResourceType
- Defined in:
- lib/fdx_v660_api/models/consent_resource_type.rb
Overview
Resource for which data may be permissioned; can be extended to support additional types of resources
Constant Summary collapse
- CONSENT_RESOURCE_TYPE =
[ # TODO: Write general description for ACCOUNT ACCOUNT = 'ACCOUNT'.freeze, # TODO: Write general description for CUSTOMER CUSTOMER = 'CUSTOMER'.freeze, # TODO: Write general description for DOCUMENT DOCUMENT = 'DOCUMENT'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ACCOUNT) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/fdx_v660_api/models/consent_resource_type.rb', line 27 def self.from_value(value, default_value = ACCOUNT) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'account' then ACCOUNT when 'customer' then CUSTOMER when 'document' then DOCUMENT else default_value end end |
.validate(value) ⇒ Object
21 22 23 24 25 |
# File 'lib/fdx_v660_api/models/consent_resource_type.rb', line 21 def self.validate(value) return false if value.nil? true end |