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
Returns a new instance of RatecardSummary.
46021 46022 46023 46024 46025 46026 46027 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46021 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.
46019 46020 46021 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46019 def id @id end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
46019 46020 46021 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46019 def number @number end |
#ratecard_owner ⇒ Object (readonly)
Returns the value of attribute ratecard_owner.
46019 46020 46021 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46019 def ratecard_owner @ratecard_owner end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
46033 46034 46035 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46033 def copy(incoming={}) RatecardSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
46037 46038 46039 46040 46041 46042 46043 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46037 def to_hash { :id => id, :number => number, :ratecard_owner => ratecard_owner.value } end |
#to_json ⇒ Object
46029 46030 46031 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46029 def to_json JSON.dump(to_hash) end |