class Io::Flow::V0::Models::TierStrategy
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27694 def TierStrategy.ALL @@all ||= [TierStrategy.fastest, TierStrategy.lowest_cost] end
apply(value)
click to toggle source
Returns the instance of TierStrategy
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 27679 def TierStrategy.apply(value) if value.instance_of?(TierStrategy) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || TierStrategy.new(value)) end end
fastest()
click to toggle source
Optimize for fastest first, then cheapest
# File lib/flow_commerce/flow_api_v0_client.rb, line 27699 def TierStrategy.fastest @@_fastest ||= TierStrategy.new('fastest') end
from_string(value)
click to toggle source
Returns the instance of TierStrategy
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 27689 def TierStrategy.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) TierStrategy.ALL.find { |v| v.value == value } end
lowest_cost()
click to toggle source
Optimize for lowest cost first, then fastest
# File lib/flow_commerce/flow_api_v0_client.rb, line 27704 def TierStrategy.lowest_cost @@_lowest_cost ||= TierStrategy.new('lowest_cost') end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27674 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 27708 def to_hash value end