Class: AftershipAPI::Model::CreateTrackingRequestDeliveryType
- Inherits:
-
Object
- Object
- AftershipAPI::Model::CreateTrackingRequestDeliveryType
- Defined in:
- lib/aftership-tracking-sdk/models/create_tracking_request_delivery_type.rb
Constant Summary collapse
- PICKUP_AT_STORE =
"pickup_at_store".freeze
- DOOR_TO_DOOR =
"door_to_door".freeze
- PICKUP_AT_COURIER =
"pickup_at_courier".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
8 9 10 |
# File 'lib/aftership-tracking-sdk/models/create_tracking_request_delivery_type.rb', line 8 def self.all_vars @all_vars ||= [PICKUP_AT_STORE, DOOR_TO_DOOR, PICKUP_AT_COURIER,].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
15 16 17 |
# File 'lib/aftership-tracking-sdk/models/create_tracking_request_delivery_type.rb', line 15 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
22 23 24 25 |
# File 'lib/aftership-tracking-sdk/models/create_tracking_request_delivery_type.rb', line 22 def build_from_hash(value) return value if CreateTrackingRequestDeliveryType.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #CreateTrackingRequestDeliveryType" end |