Class: Io::Flow::V0::Models::FlowCenterReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FlowCenterReference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ FlowCenterReference
constructor
A new instance of FlowCenterReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ FlowCenterReference
Returns a new instance of FlowCenterReference.
28715 28716 28717 28718 28719 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28715 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:key], 'FlowCenterReference') @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String) end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
28713 28714 28715 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28713 def key @key end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
28725 28726 28727 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28725 def copy(incoming={}) FlowCenterReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
28729 28730 28731 28732 28733 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28729 def to_hash { :key => key } end |
#to_json ⇒ Object
28721 28722 28723 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28721 def to_json JSON.dump(to_hash) end |