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