Class: SimpleInvoice::Services::AllocateInvoiceNumber
- Inherits:
-
Object
- Object
- SimpleInvoice::Services::AllocateInvoiceNumber
- Defined in:
- lib/simple_invoice/services/allocate_invoice_number.rb
Class Method Summary collapse
-
.call(invoice) ⇒ String
Allocate invoice number and apply it to invoice object.
Class Method Details
.call(invoice) ⇒ String
Allocate invoice number and apply it to invoice object
8 9 10 11 12 |
# File 'lib/simple_invoice/services/allocate_invoice_number.rb', line 8 def self.call invoice next_invoice_number(invoice).tap do |number| invoice.invoice_number = number end end |