Class: Io::Flow::V0::Models::LaneSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::LaneSummary
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#ratecard ⇒ Object
readonly
Returns the value of attribute ratecard.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ LaneSummary
constructor
A new instance of LaneSummary.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ LaneSummary
Returns a new instance of LaneSummary.
48367 48368 48369 48370 48371 48372 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48367 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :ratecard], 'LaneSummary') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @ratecard = (x = opts.delete(:ratecard); x.is_a?(::Io::Flow::V0::Models::RatecardSummary) ? x : ::Io::Flow::V0::Models::RatecardSummary.new(x)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
48365 48366 48367 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48365 def id @id end |
#ratecard ⇒ Object (readonly)
Returns the value of attribute ratecard.
48365 48366 48367 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48365 def ratecard @ratecard end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
48378 48379 48380 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48378 def copy(incoming={}) LaneSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
48382 48383 48384 48385 48386 48387 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48382 def to_hash { :id => id, :ratecard => ratecard.to_hash } end |
#to_json ⇒ Object
48374 48375 48376 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48374 def to_json JSON.dump(to_hash) end |