Class: Io::Flow::V0::Models::CenterReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CenterReference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#center_key ⇒ Object
readonly
Returns the value of attribute center_key.
-
#organization_id ⇒ Object
readonly
Returns the value of attribute organization_id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CenterReference
constructor
A new instance of CenterReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CenterReference
Returns a new instance of CenterReference.
17044 17045 17046 17047 17048 17049 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17044 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:organization_id, :center_key], 'CenterReference') @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String) @center_key = HttpClient::Preconditions.assert_class('center_key', opts.delete(:center_key), String) end |
Instance Attribute Details
#center_key ⇒ Object (readonly)
Returns the value of attribute center_key.
17042 17043 17044 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17042 def center_key @center_key end |
#organization_id ⇒ Object (readonly)
Returns the value of attribute organization_id.
17042 17043 17044 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17042 def organization_id @organization_id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
17055 17056 17057 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17055 def copy(incoming={}) CenterReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
17059 17060 17061 17062 17063 17064 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17059 def to_hash { :organization_id => organization_id, :center_key => center_key } end |
#to_json ⇒ Object
17051 17052 17053 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17051 def to_json JSON.dump(to_hash) end |