class Io::Flow::V0::Models::TierEstimateType
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27648 def TierEstimateType.ALL @@all ||= [TierEstimateType.calculated, TierEstimateType.custom] end
apply(value)
click to toggle source
Returns the instance of TierEstimateType
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 27633 def TierEstimateType.apply(value) if value.instance_of?(TierEstimateType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || TierEstimateType.new(value)) end end
calculated()
click to toggle source
Displays the calculated delivery window estimate next to the shipping tier name.
# File lib/flow_commerce/flow_api_v0_client.rb, line 27654 def TierEstimateType.calculated @@_calculated ||= TierEstimateType.new('calculated') end
custom()
click to toggle source
Shows a custom label next to the shipping tier name instead of a delivery window estimate.
# File lib/flow_commerce/flow_api_v0_client.rb, line 27660 def TierEstimateType.custom @@_custom ||= TierEstimateType.new('custom') end
from_string(value)
click to toggle source
Returns the instance of TierEstimateType
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 27643 def TierEstimateType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) TierEstimateType.ALL.find { |v| v.value == value } end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27628 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27664 def to_hash value end