Class: Io::Flow::V0::Models::RatecardServiceSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RatecardServiceSummary
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#carrier ⇒ Object
readonly
Returns the value of attribute carrier.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ RatecardServiceSummary
constructor
A new instance of RatecardServiceSummary.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ RatecardServiceSummary
Returns a new instance of RatecardServiceSummary.
41579 41580 41581 41582 41583 41584 41585 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41579 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :name, :carrier], 'RatecardServiceSummary') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) @carrier = (x = opts.delete(:carrier); x.is_a?(::Io::Flow::V0::Models::RatecardCarrierSummary) ? x : ::Io::Flow::V0::Models::RatecardCarrierSummary.new(x)) end |
Instance Attribute Details
#carrier ⇒ Object (readonly)
Returns the value of attribute carrier.
41577 41578 41579 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41577 def carrier @carrier end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
41577 41578 41579 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41577 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
41577 41578 41579 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41577 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
41591 41592 41593 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41591 def copy(incoming={}) RatecardServiceSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
41595 41596 41597 41598 41599 41600 41601 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41595 def to_hash { :id => id, :name => name, :carrier => carrier.to_hash } end |
#to_json ⇒ Object
41587 41588 41589 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41587 def to_json JSON.dump(to_hash) end |