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.



22386
22387
22388
22389
22390
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22386

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.



22384
22385
22386
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22384

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



22396
22397
22398
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22396

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

#to_hashObject



22400
22401
22402
22403
22404
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22400

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



22392
22393
22394
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22392

def to_json
  JSON.dump(to_hash)
end