Class: Remitmd::Webhook

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) ⇒ Webhook

Returns a new instance of Webhook.



411
412
413
414
415
416
417
418
419
420
421
# File 'lib/remitmd/models.rb', line 411

def initialize(attrs)
  h = attrs.transform_keys(&:to_s)
  @id         = h["id"]
  @wallet     = h["wallet"]
  @url        = h["url"]
  @events     = h["events"] || []
  @chains     = h["chains"] || []
  @active     = h["active"] == true
  @created_at = parse_time(h["created_at"])
  @updated_at = parse_time(h["updated_at"])
end

Instance Attribute Details

#activeObject (readonly)

Returns the value of attribute active.



423
424
425
# File 'lib/remitmd/models.rb', line 423

def active
  @active
end

#chainsObject (readonly)

Returns the value of attribute chains.



423
424
425
# File 'lib/remitmd/models.rb', line 423

def chains
  @chains
end

#created_atObject (readonly)

Returns the value of attribute created_at.



423
424
425
# File 'lib/remitmd/models.rb', line 423

def created_at
  @created_at
end

#eventsObject (readonly)

Returns the value of attribute events.



423
424
425
# File 'lib/remitmd/models.rb', line 423

def events
  @events
end

#idObject (readonly)

Returns the value of attribute id.



423
424
425
# File 'lib/remitmd/models.rb', line 423

def id
  @id
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



423
424
425
# File 'lib/remitmd/models.rb', line 423

def updated_at
  @updated_at
end

#urlObject (readonly)

Returns the value of attribute url.



423
424
425
# File 'lib/remitmd/models.rb', line 423

def url
  @url
end

#walletObject (readonly)

Returns the value of attribute wallet.



423
424
425
# File 'lib/remitmd/models.rb', line 423

def wallet
  @wallet
end