Class: Io::Flow::V0::Models::CustomerInvoice
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CustomerInvoice
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CustomerInvoice
constructor
A new instance of CustomerInvoice.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CustomerInvoice
Returns a new instance of CustomerInvoice.
29111 29112 29113 29114 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29111 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @address = (x = opts.delete(:address); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::BillingAddress) ? x : ::Io::Flow::V0::Models::BillingAddress.new(x))) end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
29109 29110 29111 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29109 def address @address end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29120 29121 29122 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29120 def copy(incoming={}) CustomerInvoice.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
29124 29125 29126 29127 29128 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29124 def to_hash { :address => address.nil? ? nil : address.to_hash } end |
#to_json ⇒ Object
29116 29117 29118 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29116 def to_json JSON.dump(to_hash) end |