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.
42936 42937 42938 42939 42940 42941 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42936 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.
42934 42935 42936 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42934 def id @id end |
#ratecard ⇒ Object (readonly)
Returns the value of attribute ratecard.
42934 42935 42936 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42934 def ratecard @ratecard end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
42947 42948 42949 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42947 def copy(incoming={}) LaneSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
42951 42952 42953 42954 42955 42956 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42951 def to_hash { :id => id, :ratecard => ratecard.to_hash } end |
#to_json ⇒ Object
42943 42944 42945 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42943 def to_json JSON.dump(to_hash) end |