Class: Io::Flow::V0::Models::IssuerReference

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

Returns a new instance of IssuerReference.



35950
35951
35952
35953
35954
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35950

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



35948
35949
35950
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35948

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



35960
35961
35962
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35960

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

#to_hashObject



35964
35965
35966
35967
35968
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35964

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



35956
35957
35958
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35956

def to_json
  JSON.dump(to_hash)
end