class Io::Flow::V0::Models::Strategy
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26849 def Strategy.ALL @@all ||= [Strategy.range, Strategy.from, Strategy.to] end
apply(value)
click to toggle source
Returns the instance of Strategy
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 26834 def Strategy.apply(value) if value.instance_of?(Strategy) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || Strategy.new(value)) end end
from()
click to toggle source
Lowest minimum of the ranges
# File lib/flow_commerce/flow_api_v0_client.rb, line 26859 def Strategy.from @@_from ||= Strategy.new('from') end
from_string(value)
click to toggle source
Returns the instance of Strategy
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 26844 def Strategy.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) Strategy.ALL.find { |v| v.value == value } end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26829 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
range()
click to toggle source
Tightest range
# File lib/flow_commerce/flow_api_v0_client.rb, line 26854 def Strategy.range @@_range ||= Strategy.new('range') end
to()
click to toggle source
Lowest maximum of the ranges
# File lib/flow_commerce/flow_api_v0_client.rb, line 26864 def Strategy.to @@_to ||= Strategy.new('to') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26868 def to_hash value end