boy scout: tests for invoices

This commit is contained in:
Pablo Martin 2024-06-20 15:00:59 +02:00
parent 34b678df26
commit 7aa667f7cf

View file

@ -198,6 +198,9 @@ models:
- name: id_invoice
data_type: character varying
description: Xero's unique identifier for the invoice.
tests:
- not_null
- unique
- name: invoice_url
data_type: character varying
@ -212,26 +215,42 @@ models:
description: |
This field indicates whether the invoice is from Superhog towards a customer
(value is "ACCREC") or from a supplier towards Superhog (value is "ACCPAY").
tests:
- not_null
- accepted_values:
values:
- "ACCREC"
- "ACCPAY"
- name: total_amount_local_curr
data_type: numeric
description: The total amount to be paid, in the currency the invoice is denominated in.
tests:
- not_null
- name: total_amount_wo_tax_local_curr
data_type: numeric
description: The total amount to be paid minus taxes, in the currency the invoice is denominated in.
tests:
- not_null
- name: total_tax_local_curr
data_type: numeric
description: The total tax, in the currency the invoice is denominated in.
tests:
- not_null
- name: total_due_local_curr
data_type: numeric
description: The total amount outstanding right now, in the currency the invoice is denominated in.
tests:
- not_null
- name: total_paid_local_curr
data_type: numeric
description: The total amount that has already been paid, in the currency the invoice is denominated in.
tests:
- not_null
- name: invoice_status
data_type: character varying
@ -241,13 +260,25 @@ models:
Can be one of: PAID, VOIDED, DRAFT, DELETED, AUTHORISED, SUBMITTED.
You can read more here: https://developer.xero.com/documentation/api/accounting/types#invoices
tests:
- not_null
- accepted_values:
values:
- PAID
- VOIDED
- DRAFT
- DELETED
- AUTHORISED
- SUBMITTED
- name: contact
- name: full_contact_details
data_type: jsonb
description: |
The contact related to this invoice.
The customer if it's an Accounts Receivables one, the supplier if it's an Accounts Payables one.
tests:
- not_null
- name: invoice_due_date_utc
data_type: timestamp with time zone
@ -265,6 +296,8 @@ models:
- name: line_items
data_type: jsonb
description: An array with all the line items and their details.
tests:
- not_null
- name: reference
data_type: character varying