Class: AftershipAPI::Model::Tag
- Inherits:
-
Object
- Object
- AftershipAPI::Model::Tag
- Defined in:
- lib/aftership-tracking-sdk/models/tag.rb
Constant Summary collapse
- PENDING =
"Pending".freeze
- INFO_RECEIVED =
"InfoReceived".freeze
- IN_TRANSIT =
"InTransit".freeze
- OUT_FOR_DELIVERY =
"OutForDelivery".freeze
- ATTEMPT_FAIL =
"AttemptFail".freeze
- DELIVERED =
"Delivered".freeze
- AVAILABLE_FOR_PICKUP =
"AvailableForPickup".freeze
- EXCEPTION =
"Exception".freeze
- EXPIRED =
"Expired".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
14 15 16 |
# File 'lib/aftership-tracking-sdk/models/tag.rb', line 14 def self.all_vars @all_vars ||= [PENDING, INFO_RECEIVED, IN_TRANSIT, OUT_FOR_DELIVERY, ATTEMPT_FAIL, DELIVERED, AVAILABLE_FOR_PICKUP, EXCEPTION, EXPIRED,].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
21 22 23 |
# File 'lib/aftership-tracking-sdk/models/tag.rb', line 21 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
28 29 30 31 |
# File 'lib/aftership-tracking-sdk/models/tag.rb', line 28 def build_from_hash(value) return value if Tag.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #Tag" end |