Class: AftershipAPI::Model::TrackingLatestEstimatedDeliverySource

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

Constant Summary collapse

CARRIER_EDD =
"Carrier EDD".freeze
AFTER_SHIP_EDD =
"AfterShip EDD".freeze
CUSTOM_EDD =
"Custom EDD".freeze
ORDER_EDD =
"Order EDD".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



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

def self.all_vars
  @all_vars ||= [CARRIER_EDD, AFTER_SHIP_EDD, CUSTOM_EDD, ORDER_EDD,].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



16
17
18
# File 'lib/aftership-tracking-sdk/models/tracking_latest_estimated_delivery_source.rb', line 16

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



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

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