Class: PinterestSdkClient::DisclosureType
- Inherits:
-
Object
- Object
- PinterestSdkClient::DisclosureType
- Defined in:
- lib/pinterest_sdk/models/disclosure_type.rb
Constant Summary collapse
- NO_DISCLOSURE =
"NO_DISCLOSURE".freeze
- PRESCRIBING_INFORMATION =
"PRESCRIBING_INFORMATION".freeze
- PRESCRIBING_INFORMATION_BOX_WARNING =
"PRESCRIBING_INFORMATION_BOX_WARNING".freeze
- IMPORTANT_SAFETY_INFO =
"IMPORTANT_SAFETY_INFO".freeze
- MED_GUIDE =
"MED_GUIDE".freeze
- PATIENT_INFORMATION =
"PATIENT_INFORMATION".freeze
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
25 26 27 |
# File 'lib/pinterest_sdk/models/disclosure_type.rb', line 25 def self.all_vars @all_vars ||= [NO_DISCLOSURE, PRESCRIBING_INFORMATION, PRESCRIBING_INFORMATION_BOX_WARNING, IMPORTANT_SAFETY_INFO, MED_GUIDE, PATIENT_INFORMATION].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
32 33 34 |
# File 'lib/pinterest_sdk/models/disclosure_type.rb', line 32 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
39 40 41 42 |
# File 'lib/pinterest_sdk/models/disclosure_type.rb', line 39 def build_from_hash(value) return value if DisclosureType.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #DisclosureType" end |