Class: AftershipAPI::Model::UpdateTrackingByIdRequestDeliveryType

Inherits:
Object
  • Object
show all
Defined in:
lib/aftership-tracking-sdk/models/update_tracking_by_id_request_delivery_type.rb

Constant Summary collapse

PICKUP_AT_STORE =
"pickup_at_store".freeze
PICKUP_AT_COURIER =
"pickup_at_courier".freeze
DOOR_TO_DOOR =
"door_to_door".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



8
9
10
# File 'lib/aftership-tracking-sdk/models/update_tracking_by_id_request_delivery_type.rb', line 8

def self.all_vars
  @all_vars ||= [PICKUP_AT_STORE, PICKUP_AT_COURIER, DOOR_TO_DOOR,].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • value (String)

    The enum value in the form of the string

Returns:

  • (String)

    The enum value



15
16
17
# File 'lib/aftership-tracking-sdk/models/update_tracking_by_id_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

Parameters:

  • value (String)

    The enum value in the form of the string

Returns:

  • (String)

    The enum value



22
23
24
25
# File 'lib/aftership-tracking-sdk/models/update_tracking_by_id_request_delivery_type.rb', line 22

def build_from_hash(value)
  return value if UpdateTrackingByIdRequestDeliveryType.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #UpdateTrackingByIdRequestDeliveryType"
end