Class: Io::Flow::V0::Models::BillingChannelOrderSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::BillingChannelOrderSummary
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#identifiers ⇒ Object
readonly
Returns the value of attribute identifiers.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ BillingChannelOrderSummary
constructor
A new instance of BillingChannelOrderSummary.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ BillingChannelOrderSummary
Returns a new instance of BillingChannelOrderSummary.
32308 32309 32310 32311 32312 32313 32314 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32308 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:organization, :number], 'BillingChannelOrderSummary') @organization = (x = opts.delete(:organization); x.is_a?(::Io::Flow::V0::Models::BillingChannelOrganizationSummary) ? x : ::Io::Flow::V0::Models::BillingChannelOrganizationSummary.new(x)) @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String) @identifiers = (x = opts.delete(:identifiers); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifiers', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('identifiers', d[1], String); h }) end |
Instance Attribute Details
#identifiers ⇒ Object (readonly)
Returns the value of attribute identifiers.
32306 32307 32308 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32306 def identifiers @identifiers end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
32306 32307 32308 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32306 def number @number end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
32306 32307 32308 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32306 def organization @organization end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
32320 32321 32322 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32320 def copy(incoming={}) BillingChannelOrderSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
32324 32325 32326 32327 32328 32329 32330 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32324 def to_hash { :organization => organization.to_hash, :number => number, :identifiers => identifiers.nil? ? nil : identifiers } end |
#to_json ⇒ Object
32316 32317 32318 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32316 def to_json JSON.dump(to_hash) end |