class Io::Flow::V0::Models::CostEstimateSource
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18091 def CostEstimateSource.ALL @@all ||= [CostEstimateSource.flow, CostEstimateSource.channel] end
apply(value)
click to toggle source
Returns the instance of CostEstimateSource
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 18076 def CostEstimateSource.apply(value) if value.instance_of?(CostEstimateSource) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || CostEstimateSource.new(value)) end end
channel()
click to toggle source
The channel partner calculated the estimated cost for the shipping label
# File lib/flow_commerce/flow_api_v0_client.rb, line 18101 def CostEstimateSource.channel @@_channel ||= CostEstimateSource.new('channel') end
flow()
click to toggle source
Flow
calculated the estimated cost for the shipping label
# File lib/flow_commerce/flow_api_v0_client.rb, line 18096 def CostEstimateSource.flow @@_flow ||= CostEstimateSource.new('flow') end
from_string(value)
click to toggle source
Returns the instance of CostEstimateSource
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 18086 def CostEstimateSource.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) CostEstimateSource.ALL.find { |v| v.value == value } end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18071 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 18105 def to_hash value end