class Io::Flow::V0::Models::HopV2
Attributes
hop_estimate[R]
hop_number[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 45070 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:hop_number, :hop_estimate], 'HopV2') @hop_number = HttpClient::Preconditions.assert_class('hop_number', opts.delete(:hop_number), Integer) @hop_estimate = (x = opts.delete(:hop_estimate); x.is_a?(::Io::Flow::V0::Models::HopEstimateV2) ? x : ::Io::Flow::V0::Models::HopEstimateV2.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 45081 def copy(incoming={}) HopV2.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 45085 def to_hash { :hop_number => hop_number, :hop_estimate => hop_estimate.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 45077 def to_json JSON.dump(to_hash) end