Class: AftershipAPI::Model::SlugGroupV1
- Inherits:
-
Object
- Object
- AftershipAPI::Model::SlugGroupV1
- Defined in:
- lib/aftership-tracking-sdk/models/slug_group_v1.rb
Constant Summary collapse
- AMAZON_GROUP =
"amazon-group".freeze
- FEDEX_GROUP =
"fedex-group".freeze
- TOLL_GROUP =
"toll-group".freeze
- TAQBIN_GROUP =
"taqbin-group".freeze
- TNT_GROUP =
"tnt-group".freeze
- CJ_GROUP =
"cj-group".freeze
- HERMES_GROUP =
"hermes-group".freeze
- DPD_GROUP =
"dpd-group".freeze
- GLS_GROUP =
"gls-group".freeze
- DHL_GROUP =
"dhl-group".freeze
- FASTWAY_GROUP =
"fastway-group".freeze
- ASENDIA_GROUP =
"asendia-group".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
18 19 20 |
# File 'lib/aftership-tracking-sdk/models/slug_group_v1.rb', line 18 def self.all_vars @all_vars ||= [AMAZON_GROUP,FEDEX_GROUP,TOLL_GROUP,TAQBIN_GROUP,TNT_GROUP,CJ_GROUP,HERMES_GROUP,DPD_GROUP,GLS_GROUP,DHL_GROUP,FASTWAY_GROUP,ASENDIA_GROUP,].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
25 26 27 |
# File 'lib/aftership-tracking-sdk/models/slug_group_v1.rb', line 25 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
32 33 34 35 |
# File 'lib/aftership-tracking-sdk/models/slug_group_v1.rb', line 32 def build_from_hash(value) return value if SlugGroupV1.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #SlugGroupV1" end |