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
-
#id ⇒ Object
readonly
Returns the value of attribute 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.
7190 7191 7192 7193 7194 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7190 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id], 'CenterReference') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
7188 7189 7190 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7188 def id @id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
7200 7201 7202 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7200 def copy(incoming={}) CenterReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
7204 7205 7206 7207 7208 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7204 def to_hash { :id => id } end |
#to_json ⇒ Object
7196 7197 7198 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7196 def to_json JSON.dump(to_hash) end |