class Io::Flow::V0::Models::TaxDutyQuoteSimpleShipping
An ordered quantity of goods for tax and duty calculation.
Attributes
ship_from[R]
values[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 70157 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:values, :ship_from], 'TaxDutyQuoteSimpleShipping') @values = (x = opts.delete(:values); x.is_a?(::Io::Flow::V0::Models::TaxDutyQuoteValues) ? x : ::Io::Flow::V0::Models::TaxDutyQuoteValues.new(x)) @ship_from = (x = opts.delete(:ship_from); x.is_a?(::Io::Flow::V0::Models::StreetAddress) ? x : ::Io::Flow::V0::Models::StreetAddress.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 70168 def copy(incoming={}) TaxDutyQuoteSimpleShipping.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 70172 def to_hash { :values => values.to_hash, :ship_from => ship_from.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 70164 def to_json JSON.dump(to_hash) end