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.
62605 62606 62607 62608 62609 62610 62611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62605 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.
62603 62604 62605 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62603 def carrier @carrier end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
62603 62604 62605 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62603 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
62603 62604 62605 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62603 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
62617 62618 62619 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62617 def copy(incoming={}) RatecardServiceSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
62621 62622 62623 62624 62625 62626 62627 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62621 def to_hash { :id => id, :name => name, :carrier => carrier.to_hash } end |
#to_json ⇒ Object
62613 62614 62615 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62613 def to_json JSON.dump(to_hash) end |