class Io::Flow::V0::Models::ShippingLabelHopSummary
Attributes
cost[R]
lane[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 66529 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:lane, :cost], 'ShippingLabelHopSummary') @lane = (x = opts.delete(:lane); x.is_a?(::Io::Flow::V0::Models::ShippingLabelLaneSummary) ? x : ::Io::Flow::V0::Models::ShippingLabelLaneSummary.new(x)) @cost = (x = opts.delete(:cost); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 66540 def copy(incoming={}) ShippingLabelHopSummary.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 66544 def to_hash { :lane => lane.to_hash, :cost => cost.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 66536 def to_json JSON.dump(to_hash) end