Skip to content

feat(api): [AB#151] QuickBooks data sync — clients, invoices, and payments#322

Merged
bllr777 merged 1 commit into
mainfrom
feature/151-quickbooks-sync
May 24, 2026
Merged

feat(api): [AB#151] QuickBooks data sync — clients, invoices, and payments#322
bllr777 merged 1 commit into
mainfrom
feature/151-quickbooks-sync

Conversation

@bllr777
Copy link
Copy Markdown
Collaborator

@bllr777 bllr777 commented May 24, 2026

Changes

  • Add \IQuickBooksSyncService\ interface to Business layer
  • Implement \QuickBooksSyncService\ in Infrastructure (QB Accounting REST API)
    • \SyncClientAsync\ — create or sparse-update QB Customer; stores \QuickBooksCustomerId\ back on \OrganizationClient\
    • \SyncInvoiceAsync\ — create or sparse-update QB Invoice (line items mapped); stores \QuickBooksInvoiceId\ back on \Invoice; auto-syncs client first if not yet synced
    • \SyncPaymentAsync\ — create QB Payment linked to the QB Invoice
  • Add \QuickBooksCustomerId\ to \OrganizationClient, \QuickBooksInvoiceId\ to \Invoice\
  • Migration: \AddQuickBooksExternalIds\
  • Inject sync into \InvoiceService\ (UpsertInvoice, UpdateInvoice, MarkPaid) and \OrganizationClientService\ (UpsertClient) as optional dependency — fire-and-forget safe via internal try/catch
  • Supports sandbox and production QB environments via \IQuickBooksSettings.UseSandbox\

Behaviour

  • No-ops silently if org has no QB connection
  • QB failures are logged but never fail the JobFlow operation

Testing

  • Build: 0 warnings, 0 errors
  • Unit tests: 54/54 passed
  • Migration applied locally

@bllr777 bllr777 merged commit 90cc8b7 into main May 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant