Class: Io::Flow::V0::Models::RatecardSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RatecardSummary
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#ratecard_owner ⇒ Object
readonly
Returns the value of attribute ratecard_owner.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ RatecardSummary
constructor
A new instance of RatecardSummary.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ RatecardSummary
47381 47382 47383 47384 47385 47386 47387 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47381 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :number, :ratecard_owner], 'RatecardSummary') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String) @ratecard_owner = (x = opts.delete(:ratecard_owner); x.is_a?(::Io::Flow::V0::Models::RatecardOwner) ? x : ::Io::Flow::V0::Models::RatecardOwner.apply(x)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
47379 47380 47381 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47379 def id @id end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
47379 47380 47381 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47379 def number @number end |
#ratecard_owner ⇒ Object (readonly)
Returns the value of attribute ratecard_owner.
47379 47380 47381 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47379 def ratecard_owner @ratecard_owner end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
47393 47394 47395 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47393 def copy(incoming={}) RatecardSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
47397 47398 47399 47400 47401 47402 47403 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47397 def to_hash { :id => id, :number => number, :ratecard_owner => ratecard_owner.value } end |
#to_json ⇒ Object
47389 47390 47391 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47389 def to_json JSON.dump(to_hash) end |