class Io::Flow::V0::Models::TradeAgreementDuty
The duty rate that applies for a trade agreement.
Attributes
duty[R]
trade_agreement[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 71813 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:trade_agreement, :duty], 'TradeAgreementDuty') @trade_agreement = (x = opts.delete(:trade_agreement); x.is_a?(::Io::Flow::V0::Models::TradeAgreement) ? x : ::Io::Flow::V0::Models::TradeAgreement.new(x)) @duty = (x = opts.delete(:duty); x.is_a?(::Io::Flow::V0::Models::Duty) ? x : ::Io::Flow::V0::Models::Duty.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 71824 def copy(incoming={}) TradeAgreementDuty.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 71828 def to_hash { :trade_agreement => trade_agreement.to_hash, :duty => duty.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 71820 def to_json JSON.dump(to_hash) end