Class: Io::Flow::V0::Models::AccountReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AccountReference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ AccountReference
constructor
A new instance of AccountReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ AccountReference
Returns a new instance of AccountReference.
28896 28897 28898 28899 28900 28901 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28896 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :currency], 'AccountReference') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String) end |
Instance Attribute Details
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
28894 28895 28896 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28894 def currency @currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
28894 28895 28896 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28894 def id @id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
28907 28908 28909 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28907 def copy(incoming={}) AccountReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
28911 28912 28913 28914 28915 28916 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28911 def to_hash { :id => id, :currency => currency } end |
#to_json ⇒ Object
28903 28904 28905 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28903 def to_json JSON.dump(to_hash) end |