Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/controllers/accountify/contact_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Accountify
class ContactController < AccountifyController
def create
contact = Contact.create(
contact = ContactService.create(
user_id: user_id,
tenant_id: tenant_id,
organisation_id: params[:organisation_id],
Expand All @@ -13,7 +13,7 @@ def create
end

def show
contact = Contact.find_by_id(
contact = ContactService.find_by_id(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id])
Expand All @@ -22,7 +22,7 @@ def show
end

def update
contact = Contact.update(
contact = ContactService.update(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id],
Expand All @@ -34,7 +34,7 @@ def update
end

def destroy
contact = Contact.delete(
contact = ContactService.delete(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id])
Expand Down
14 changes: 7 additions & 7 deletions app/controllers/accountify/invoice_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Accountify
class InvoiceController < AccountifyController
def create
invoice = Invoice.draft(
invoice = InvoiceService.draft(
user_id: user_id,
tenant_id: tenant_id,
organisation_id: params[:organisation_id],
Expand All @@ -14,7 +14,7 @@ def create
end

def show
invoice = Invoice.find_by_id(
invoice = InvoiceService.find_by_id(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id])
Expand All @@ -23,7 +23,7 @@ def show
end

def update
invoice = Invoice.update(
invoice = InvoiceService.update(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id],
Expand All @@ -36,7 +36,7 @@ def update
end

def destroy
invoice = Invoice.delete(
invoice = InvoiceService.delete(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id])
Expand All @@ -45,7 +45,7 @@ def destroy
end

def issue
invoice = Invoice.issue(
invoice = InvoiceService.issue(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id])
Expand All @@ -54,7 +54,7 @@ def issue
end

def paid
invoice = Invoice.paid(
invoice = InvoiceService.paid(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id])
Expand All @@ -63,7 +63,7 @@ def paid
end

def void
invoice = Invoice.void(
invoice = InvoiceService.void(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id])
Expand Down
8 changes: 4 additions & 4 deletions app/controllers/accountify/organisation_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Accountify
class OrganisationController < AccountifyController
def create
organisation = Organisation.create(
organisation = OrganisationService.create(
user_id: user_id,
tenant_id: tenant_id,
name: params[:name])
Expand All @@ -10,7 +10,7 @@ def create
end

def show
organisation = Organisation.find_by_id(
organisation = OrganisationService.find_by_id(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id])
Expand All @@ -19,7 +19,7 @@ def show
end

def update
organisation = Organisation.update(
organisation = OrganisationService.update(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id],
Expand All @@ -29,7 +29,7 @@ def update
end

def destroy
organisation = Organisation.delete(
organisation = OrganisationService.delete(
user_id: user_id,
tenant_id: tenant_id,
id: params[:id])
Expand Down
11 changes: 0 additions & 11 deletions app/domains/accountify/models/contact.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/contact/created_event.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/contact/deleted_event.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/contact/updated_event.rb

This file was deleted.

15 changes: 0 additions & 15 deletions app/domains/accountify/models/invoice.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/invoice/deleted_event.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/invoice/drafted_event.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/invoice/issued_event.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/invoice/line_item.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/invoice/paid_event.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/invoice/updated_event.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/invoice/voided_event.rb

This file was deleted.

30 changes: 0 additions & 30 deletions app/domains/accountify/models/invoice_status_summary.rb

This file was deleted.

11 changes: 0 additions & 11 deletions app/domains/accountify/models/organisation.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/organisation/created_event.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/organisation/deleted_event.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/domains/accountify/models/organisation/updated_event.rb

This file was deleted.

21 changes: 0 additions & 21 deletions app/domains/models/event.rb

This file was deleted.

11 changes: 11 additions & 0 deletions app/jobs/accountify/generate_invoice_status_summary_job.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module Accountify
class GenerateInvoiceStatusSummaryJob
include Sidekiq::Job

sidekiq_options queue: 'reporting', backtrace: true

def perform(args)
InvoiceStatusSummary.generate(event_id: args['event_id'])
end
end
end
13 changes: 0 additions & 13 deletions app/jobs/accountify/invoice/deleted_job.rb

This file was deleted.

13 changes: 0 additions & 13 deletions app/jobs/accountify/invoice/drafted_job.rb

This file was deleted.

Loading
Loading