mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
added jobs for send e invoice data to billing system and received response
This commit is contained in:
parent
3242fb1da0
commit
5e0d1ff619
9 changed files with 117 additions and 3 deletions
16
app/controllers/eis_billing/e_invoice_response_controller.rb
Normal file
16
app/controllers/eis_billing/e_invoice_response_controller.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
class EisBilling::EInvoiceResponseController < ApplicationController
|
||||
def update
|
||||
invoice_number = params[:invoice_number]
|
||||
date = params[:date]
|
||||
|
||||
set_e_invoice_sent_at(date, invoice_number)
|
||||
render status: 200, json: { messege: 'Response received', status: :ok }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_e_invoice_sent_at(date, invoice_number)
|
||||
invoice = Invoice.find_by(number: invoice_number)
|
||||
invoice.update(e_invoice_sent_at: Time.zone.now)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue