Class: Webhookdb::Messages::Verification

Inherits:
Webhookdb::Message::Template show all
Defined in:
lib/webhookdb/messages/verification.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Webhookdb::Message::Template

#dispatch, #dispatch_email, #extra_fields, #full_template_name, #layout, #layout_path, #liquify, #template_folder, #template_name, #template_path

Constructor Details

#initialize(reset_code) ⇒ Verification

Returns a new instance of Verification.



11
12
13
14
# File 'lib/webhookdb/messages/verification.rb', line 11

def initialize(reset_code)
  @reset_code = reset_code
  super()
end

Class Method Details

.fixtured(recipient) ⇒ Object



6
7
8
9
# File 'lib/webhookdb/messages/verification.rb', line 6

def self.fixtured(recipient)
  code = Webhookdb::Fixtures.reset_code(customer: recipient).create
  return self.new(code)
end

Instance Method Details

#liquid_dropsObject



16
17
18
19
20
21
22
# File 'lib/webhookdb/messages/verification.rb', line 16

def liquid_drops
  return super.merge(
    expire_at: @reset_code.expire_at,
    token: @reset_code.token,
    email: @reset_code.customer.email,
  )
end