class Io::Flow::V0::Models::LaneLandedCost
The tariff codes, duty rates and tax rates associated with an origin/destination pair. Does not take into account sales province
Attributes
destination[R]
effective_duty[R]
origin[R]
tariff_code[R]
tax[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 48333 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:origin, :destination, :tariff_code, :effective_duty, :tax], 'LaneLandedCost') @origin = HttpClient::Preconditions.assert_class('origin', opts.delete(:origin), String) @destination = HttpClient::Preconditions.assert_class('destination', opts.delete(:destination), String) @tariff_code = HttpClient::Preconditions.assert_class('tariff_code', opts.delete(:tariff_code), String) @effective_duty = (x = opts.delete(:effective_duty); x.is_a?(::Io::Flow::V0::Models::Duty) ? x : ::Io::Flow::V0::Models::Duty.new(x)) @tax = (x = opts.delete(:tax); x.is_a?(::Io::Flow::V0::Models::Tax) ? x : ::Io::Flow::V0::Models::Tax.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 48347 def copy(incoming={}) LaneLandedCost.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 48351 def to_hash { :origin => origin, :destination => destination, :tariff_code => tariff_code, :effective_duty => effective_duty.to_hash, :tax => tax.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 48343 def to_json JSON.dump(to_hash) end