Class: Io::Flow::V0::Models::AllocationCurrencies
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AllocationCurrencies
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ AllocationCurrencies
constructor
A new instance of AllocationCurrencies.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ AllocationCurrencies
Returns a new instance of AllocationCurrencies.
9321 9322 9323 9324 9325 9326 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9321 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:base, :target], 'AllocationCurrencies') @base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String) @target = HttpClient::Preconditions.assert_class('target', opts.delete(:target), String) end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
9319 9320 9321 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9319 def base @base end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
9319 9320 9321 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9319 def target @target end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
9332 9333 9334 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9332 def copy(incoming={}) AllocationCurrencies.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
9336 9337 9338 9339 9340 9341 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9336 def to_hash { :base => base, :target => target } end |
#to_json ⇒ Object
9328 9329 9330 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9328 def to_json JSON.dump(to_hash) end |