Class: Io::Flow::V0::Models::Ference

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 = {}) ⇒ Ference

Returns a new instance of Ference.



16774
16775
16776
16777
16778
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16774

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id], 'Ference')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



16772
16773
16774
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16772

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



16784
16785
16786
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16784

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

#to_hashObject



16788
16789
16790
16791
16792
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16788

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



16780
16781
16782
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16780

def to_json
  JSON.dump(to_hash)
end