Class: Io::Flow::V0::Models::PartnerReference

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

Returns a new instance of PartnerReference.



31671
31672
31673
31674
31675
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31671

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



31669
31670
31671
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31669

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



31681
31682
31683
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31681

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

#to_hashObject



31685
31686
31687
31688
31689
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31685

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



31677
31678
31679
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31677

def to_json
  JSON.dump(to_hash)
end