mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Updated REPP API for new registrar portal
This commit is contained in:
parent
e17b21436d
commit
a5ffce290d
61 changed files with 1269 additions and 408 deletions
15
app/interactions/actions/invoice_cancel.rb
Normal file
15
app/interactions/actions/invoice_cancel.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
module Actions
|
||||
class InvoiceCancel
|
||||
attr_reader :invoice
|
||||
|
||||
def initialize(invoice)
|
||||
@invoice = invoice
|
||||
end
|
||||
|
||||
def call
|
||||
return false unless @invoice.can_be_cancelled?
|
||||
|
||||
@invoice.update(cancelled_at: Time.zone.now)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue