Class: Remitmd::BountySubmission

Inherits:
Model
  • Object
show all
Defined in:
lib/remitmd/models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#inspect, #to_h

Constructor Details

#initialize(attrs) ⇒ BountySubmission

Returns a new instance of BountySubmission.



310
311
312
313
314
315
316
317
318
# File 'lib/remitmd/models.rb', line 310

def initialize(attrs)
  h = attrs.transform_keys(&:to_s)
  @id           = h["id"]
  @bounty_id    = h["bounty_id"]
  @submitter    = h["submitter"]
  @evidence_uri = h["evidence_uri"] || h["evidence_hash"]
  @accepted     = h.key?("accepted") ? h["accepted"] : h["status"]
  @created_at   = parse_time(h["created_at"])
end

Instance Attribute Details

#acceptedObject (readonly) Also known as: status

Returns the value of attribute accepted.



320
321
322
# File 'lib/remitmd/models.rb', line 320

def accepted
  @accepted
end

#bounty_idObject (readonly)

Returns the value of attribute bounty_id.



320
321
322
# File 'lib/remitmd/models.rb', line 320

def bounty_id
  @bounty_id
end

#created_atObject (readonly)

Returns the value of attribute created_at.



320
321
322
# File 'lib/remitmd/models.rb', line 320

def created_at
  @created_at
end

#evidence_uriObject (readonly) Also known as: evidence_hash

Returns the value of attribute evidence_uri.



320
321
322
# File 'lib/remitmd/models.rb', line 320

def evidence_uri
  @evidence_uri
end

#idObject (readonly)

Returns the value of attribute id.



320
321
322
# File 'lib/remitmd/models.rb', line 320

def id
  @id
end

#submitterObject (readonly)

Returns the value of attribute submitter.



320
321
322
# File 'lib/remitmd/models.rb', line 320

def submitter
  @submitter
end