class Io::Flow::V0::Models::DeliveryOptionCostDetailSource
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18737 def DeliveryOptionCostDetailSource.ALL @@all ||= [DeliveryOptionCostDetailSource.center, DeliveryOptionCostDetailSource.ratecard] end
apply(value)
click to toggle source
Returns the instance of DeliveryOptionCostDetailSource
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 18722 def DeliveryOptionCostDetailSource.apply(value) if value.instance_of?(DeliveryOptionCostDetailSource) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || DeliveryOptionCostDetailSource.new(value)) end end
center()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18741 def DeliveryOptionCostDetailSource.center @@_center ||= DeliveryOptionCostDetailSource.new('center') end
from_string(value)
click to toggle source
Returns the instance of DeliveryOptionCostDetailSource
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 18732 def DeliveryOptionCostDetailSource.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) DeliveryOptionCostDetailSource.ALL.find { |v| v.value == value } end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18717 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
ratecard()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18745 def DeliveryOptionCostDetailSource.ratecard @@_ratecard ||= DeliveryOptionCostDetailSource.new('ratecard') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18749 def to_hash value end