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.



36098
36099
36100
36101
36102
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36098

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.



36096
36097
36098
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36096

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



36108
36109
36110
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36108

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

#to_hashObject



36112
36113
36114
36115
36116
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36112

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



36104
36105
36106
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36104

def to_json
  JSON.dump(to_hash)
end