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.
18740 18741 18742 18743 18744 18745 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18740 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.
18738 18739 18740 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18738 def center_key @center_key end |
#organization_id ⇒ Object (readonly)
Returns the value of attribute organization_id.
18738 18739 18740 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18738 def organization_id @organization_id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
18751 18752 18753 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18751 def copy(incoming={}) CenterReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
18755 18756 18757 18758 18759 18760 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18755 def to_hash { :organization_id => organization_id, :center_key => center_key } end |
#to_json ⇒ Object
18747 18748 18749 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18747 def to_json JSON.dump(to_hash) end |