Class: Bandwidth::ProductTypeEnum
- Inherits:
-
Object
- Object
- Bandwidth::ProductTypeEnum
- Defined in:
- lib/bandwidth-sdk/models/product_type_enum.rb
Constant Summary collapse
- LOCAL_A2_P =
'LOCAL_A2P'.freeze
- P2_P =
'P2P'.freeze
- SHORT_CODE_REACH =
'SHORT_CODE_REACH'.freeze
- TOLL_FREE =
'TOLL_FREE'.freeze
- HOSTED_SHORT_CODE =
'HOSTED_SHORT_CODE'.freeze
- ALPHA_NUMERIC =
'ALPHA_NUMERIC'.freeze
- RBM_MEDIA =
'RBM_MEDIA'.freeze
- RBM_RICH =
'RBM_RICH'.freeze
- RBM_CONVERSATIONAL =
'RBM_CONVERSATIONAL'.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
28 29 30 |
# File 'lib/bandwidth-sdk/models/product_type_enum.rb', line 28 def self.all_vars @all_vars ||= [LOCAL_A2_P, P2_P, SHORT_CODE_REACH, TOLL_FREE, HOSTED_SHORT_CODE, ALPHA_NUMERIC, RBM_MEDIA, RBM_RICH, RBM_CONVERSATIONAL].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
35 36 37 |
# File 'lib/bandwidth-sdk/models/product_type_enum.rb', line 35 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
42 43 44 45 |
# File 'lib/bandwidth-sdk/models/product_type_enum.rb', line 42 def build_from_hash(value) return value if ProductTypeEnum.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #ProductTypeEnum" end |