Class: Io::Flow::V0::Models::FlowCenterReference

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ FlowCenterReference

Returns a new instance of FlowCenterReference.



32188
32189
32190
32191
32192
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32188

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

#keyObject (readonly)

Returns the value of attribute key.



32186
32187
32188
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32186

def key
  @key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



32198
32199
32200
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32198

def copy(incoming={})
  FlowCenterReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



32202
32203
32204
32205
32206
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32202

def to_hash
  {
    :key => key
  }
end

#to_jsonObject



32194
32195
32196
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32194

def to_json
  JSON.dump(to_hash)
end