Sha256: bc4460e32f1bdd9098ea728cffb383309e681b6a07a0e700f2bacba9ef9eae0a
Contents?: true
Size: 423 Bytes
Versions: 2
Compression:
Stored size: 423 Bytes
Contents
module Pay module Lago module Webhooks class InvoiceOneOffCreated def call(event) pay_charge = Pay::Lago::Charge.sync(event.invoice.lago_id, object: event.invoice) if pay_charge && Pay.send_email?(:receipt, pay_charge) Pay.mailer.with(pay_customer: pay_charge.customer, pay_charge: pay_charge).receipt.deliver_later end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pay-lago-0.1.1 | lib/pay/lago/webhooks/invoice_one_off_created.rb |
pay-lago-0.1.0 | lib/pay/lago/webhooks/invoice_one_off_created.rb |