Class: SimpleInvoice::Services::ProcessSubscription
- Inherits:
-
Object
- Object
- SimpleInvoice::Services::ProcessSubscription
- Defined in:
- lib/simple_invoice/services/process_subscription.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call(date, subscription) ⇒ nil, SimpleInvoice::Invoice
8 9 10 |
# File 'lib/simple_invoice/services/process_subscription.rb', line 8 def self.call date, subscription new(date, subscription).maybe_invoice end |
Instance Method Details
#maybe_invoice ⇒ nil, SimpleInvoice::Invoice
13 14 15 16 17 18 19 |
# File 'lib/simple_invoice/services/process_subscription.rb', line 13 def maybe_invoice if should_create_an_invoice_today? create_invoice else nil end end |