Class: PCPServerSDK::Models::CancelType
- Inherits:
-
Object
- Object
- PCPServerSDK::Models::CancelType
- Defined in:
- lib/PCP-server-Ruby-SDK/models/cancel_type.rb
Constant Summary collapse
- FULL =
"FULL".freeze
- PARTIAL =
"PARTIAL".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
10 11 12 |
# File 'lib/PCP-server-Ruby-SDK/models/cancel_type.rb', line 10 def self.all_vars @all_vars ||= [FULL, PARTIAL].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
17 18 19 |
# File 'lib/PCP-server-Ruby-SDK/models/cancel_type.rb', line 17 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
24 25 26 27 |
# File 'lib/PCP-server-Ruby-SDK/models/cancel_type.rb', line 24 def build_from_hash(value) return value if CancelType.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #CancelType" end |