Class: Tang::RefreshInvoicePdf

Inherits:
Object
  • Object
show all
Defined in:
app/services/tang/refresh_invoice_pdf.rb

Class Method Summary collapse

Class Method Details

.call(invoice) ⇒ Object



3
4
5
6
7
# File 'app/services/tang/refresh_invoice_pdf.rb', line 3

def self.call(invoice)
  stripe_invoice = Stripe::Invoice.retrieve(invoice.stripe_id)
  invoice.update(invoice_pdf: stripe_invoice.invoice_pdf)
  invoice
end