class Io::Flow::V0::Models::LevyInclusion
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22156 def LevyInclusion.ALL @@all ||= [LevyInclusion.tax, LevyInclusion.duty] end
apply(value)
click to toggle source
Returns the instance of LevyInclusion
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 22141 def LevyInclusion.apply(value) if value.instance_of?(LevyInclusion) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || LevyInclusion.new(value)) end end
duty()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22164 def LevyInclusion.duty @@_duty ||= LevyInclusion.new('duty') end
from_string(value)
click to toggle source
Returns the instance of LevyInclusion
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 22151 def LevyInclusion.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) LevyInclusion.ALL.find { |v| v.value == value } end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22136 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
tax()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22160 def LevyInclusion.tax @@_tax ||= LevyInclusion.new('tax') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22168 def to_hash value end