InvoiceModel
Version: v1.0.0
Stored entity
Partition key pk, sort key sk
Overview
Xero Invoice model for validation
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
pk | str | ✅ | — | — |
sk | str | ✅ | — | — |
tenant_id | str | ✅ | — | — |
invoice_id | str | ✅ | — | — |
type | str | ✅ | — | — |
status | str | ✅ | — | — |
error | str | ❌ | — | — |
updated_at | str | ✅ | — | — |
created_at | str | ✅ | — | — |
xero_invoice_id | str | ❌ | — | — |
line_item_mapping | dict | ❌ | — | — |
APIs / Triggers
| Trigger | Endpoint / Source | Detail | Handler |
|---|---|---|---|
| Stream | DynamoDB stream | table items where type = XERO_CONTACT | src/xero_opensearch_sync.py |
| Event | EventBridge | InvoicePaymentCreated, InvoicePaymentXeroSyncRequested | src/payment/xero_payment_post.py |
| Event | EventBridge | InvoicePaymentDeleted | src/payment/xero_payment_delete.py |
| Event | EventBridge | InvoiceCashRefundDeleted | src/cash_refund/xero_cash_refund_delete.py |
| Event | EventBridge | InvoiceCashRefundCreated, InvoiceCashRefundXeroSyncRequested | src/cash_refund/xero_cash_refund_post.py |
| Event | EventBridge | InvoiceCreditAllocated | src/credit/xero_credit_allocate.py |
| Event | EventBridge | InvoiceEmailed | src/invoice/xero_invoice_mark_as_emailed.py |
| Event | EventBridge | InvoiceCreditDeallocated | src/credit/xero_credit_deallocation.py |
| Event | EventBridge | InvoiceCreated, XeroInvoiceCreateRetried | src/invoice/xero_invoice_post.py |
| Event | EventBridge | InvoiceVoided | src/invoice/xero_invoice_void.py |
| Event | EventBridge | InvoiceDeleted | src/invoice/xero_invoice_delete.py |
| Event | EventBridge | InvoiceApproved | src/invoice/xero_invoice_approve.py |
| Event | EventBridge | InvoiceWithPaymentUpdated | src/invoice/xero_invoice_with_payment_update.py |
| Event | EventBridge | InvoiceWithoutPaymentUpdated | src/invoice/xero_invoice_without_payment_update.py |
| Event | EventBridge | InvoiceCreditCreated | src/credit/xero_credit_post.py |
| Event | EventBridge | InvoiceCreditDeleted | src/credit/xero_credit_delete.py |
| API | POST /newxero/SyncAccountsToXero | — | src/account/xero_account_sync_account_to_xero.py |
| Event | EventBridge | ContactCreated, XeroContactCreateRetried | src/contact/xero_contact_post.py |
| Event | EventBridge | ContactUpdated | src/contact/xero_contact_put.py |
| Event | EventBridge | ContactArchived | src/contact/xero_contact_archive.py |
| Event | EventBridge | XeroWebHookContactCreated | src/contact/xero_contact_created_web_hook.py |
| API | GET /newxero/contact/dismantly | — | src/contact/xero_get_only_dismantly_contacts.py |
| API | POST /newxero/search | — | src/contact/xero_contact_search.py |
| API | GET /newxero/totals | — | src/contact/xero_contact_totals.py |
| API | GET /newxero/contact/xero | — | src/contact/xero_get_only_xero_contacts.py |
| API | POST /newxero/contact/reconcile | — | src/contact/xero_reconcile_contacts.py |
| Event | EventBridge | XeroWebHookContactUpdated | src/contact/xero_contact_updated_web_hook.py |
| Event | EventBridge | XeroWebHookInvoiceUpdated | src/invoice/xero_invoice_updated_web_hook.py |
| API | GET /newxero/account | — | src/account/xero_account_status_get.py |
| API | GET /newxero/contact | — | src/contact/xero_contact_status_get.py |
| API | POST /newxero/invoice/validate | — | src/invoice/xero_invoice_validate.py |
| API | GET /newxero/contact/validate | — | src/contact/xero_contact_put_validate.py |
| API | GET /newxero/contact/validateAttributes | — | src/contact/xero_contact_validate.py |
| API | GET /newxero/contact/validate/email | — | src/contact/xero_contact_validate_email.py |
| API | GET /newxero/payment | — | src/payment/xero_payment_status_get.py |
| API | GET /newxero/cashRefund | — | src/cash_refund/xero_cash_refund_status_get.py |
| API | GET /newxero/invoice | — | src/invoice/xero_invoice_status_get.py |
| API | POST /newxero/invoice/invoices | — | src/invoice/xero_invoice_get_invoices.py |
| API | GET /newxero/invoice/pdf | — | src/invoice/xero_invoice_pdf_get.py |
| API | PUT /newxero/invoice/email | — | src/invoice/xero_invoice_email.py |
| API | GET /newxero/credit | — | src/credit/xero_credit_status_get.py |
| Event | EventBridge | InvoiceAccountCreated | src/account/xero_account_post.py |
| Event | EventBridge | InvoiceAccountUpdated | src/account/xero_account_put.py |
| Event | EventBridge | InvoiceAccountArchived | src/account/xero_account_archive.py |
| Event | EventBridge | InvoiceAccountRestored | src/account/xero_account_restore.py |
| Event | EventBridge | XeroWebhookPaymentsEvent | src/xero_process_payments.py |
Change history
v1.0.0 · 2025-12-23 · Olaniyi Ajayi · 2917b804f
Add new validation workflows for Xero microservice, including functions for fetching tenants, tenant records, and generating final reports. Implement state machines with error handling and pagination in ASL definitions for invoice, payment, credit note, and contact validations.
- Initial version.
Generated from
dismantly-backend/Microservices/Xero/dependencies/models.py. Do not edit by hand.