schemas
This commit is contained in:
parent
86ca7411af
commit
f9fcb76ed1
2 changed files with 129 additions and 41 deletions
|
|
@ -477,7 +477,7 @@ models:
|
||||||
- name: reference
|
- name: reference
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: |
|
description: |
|
||||||
The Superhog-set reference for the credit note.
|
The Superhog-set reference for the credit note.
|
||||||
|
|
||||||
- name: credit_note_number
|
- name: credit_note_number
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
|
|
@ -504,7 +504,7 @@ models:
|
||||||
- name: credit_note_currency_iso_4217
|
- name: credit_note_currency_iso_4217
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: |
|
description: |
|
||||||
|
|
||||||
The ISO 4217 code for the currency which this credit note uses as
|
The ISO 4217 code for the currency which this credit note uses as
|
||||||
unit of account.
|
unit of account.
|
||||||
|
|
||||||
|
|
@ -521,7 +521,7 @@ models:
|
||||||
|
|
||||||
- name: total_amount_local_curr
|
- name: total_amount_local_curr
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: |
|
description: |
|
||||||
The total amount to be credited, in the currency the note is
|
The total amount to be credited, in the currency the note is
|
||||||
denominated in.
|
denominated in.
|
||||||
|
|
||||||
|
|
@ -532,8 +532,8 @@ models:
|
||||||
- name: subtotal_local_curr
|
- name: subtotal_local_curr
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: |
|
description: |
|
||||||
The total amount to be credited minus taxes, in the currency the
|
The total amount to be credited minus taxes, in the currency the
|
||||||
note is denominated in.
|
note is denominated in.
|
||||||
|
|
||||||
- name: subtotal_in_gbp
|
- name: subtotal_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
|
|
@ -629,7 +629,7 @@ models:
|
||||||
columns:
|
columns:
|
||||||
- name: id_credit_note
|
- name: id_credit_note
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: Xero's unique identifier for the credit note.
|
description: Xero's unique identifier for the credit note.
|
||||||
|
|
||||||
- name: id_line_item
|
- name: id_line_item
|
||||||
data_type: text
|
data_type: text
|
||||||
|
|
@ -728,7 +728,7 @@ models:
|
||||||
|
|
||||||
- name: fee_category
|
- name: fee_category
|
||||||
data_type: text
|
data_type: text
|
||||||
description: |
|
description: |
|
||||||
A fee category, one of out of booking_fees, listing_fees,
|
A fee category, one of out of booking_fees, listing_fees,
|
||||||
verification_fees, waiver fees.
|
verification_fees, waiver fees.
|
||||||
|
|
||||||
|
|
@ -742,7 +742,7 @@ models:
|
||||||
|
|
||||||
- name: net_fees_in_gbp
|
- name: net_fees_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: |
|
description: |
|
||||||
Net fees are calculated by subtracting credited fees from invoiced
|
Net fees are calculated by subtracting credited fees from invoiced
|
||||||
fees. It might be the case that net fees are negative in some month,
|
fees. It might be the case that net fees are negative in some month,
|
||||||
if it happens to be that we have given back to customers more than we
|
if it happens to be that we have given back to customers more than we
|
||||||
|
|
@ -767,7 +767,7 @@ models:
|
||||||
|
|
||||||
- name: id_deal
|
- name: id_deal
|
||||||
data_type: text
|
data_type: text
|
||||||
description: |
|
description: |
|
||||||
A fee category per deal.
|
A fee category per deal.
|
||||||
|
|
||||||
- name: fees_invoiced_in_gbp
|
- name: fees_invoiced_in_gbp
|
||||||
|
|
@ -780,101 +780,188 @@ models:
|
||||||
|
|
||||||
- name: net_fees_in_gbp
|
- name: net_fees_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: |
|
description: |
|
||||||
Net fees are calculated by subtracting credited fees from invoiced
|
Net fees are calculated by subtracting credited fees from invoiced
|
||||||
fees. It might be the case that net fees are negative in some month,
|
fees. It might be the case that net fees are negative in some month,
|
||||||
if it happens to be that we have given back to customers more than we
|
if it happens to be that we have given back to customers more than we
|
||||||
have invoiced them.
|
have invoiced them.
|
||||||
- name: xero__bank_transactions
|
- name: xero__bank_transactions
|
||||||
description: ""
|
description: |
|
||||||
|
Bank transactions that have happened in any of our bank accounts.
|
||||||
|
|
||||||
|
You can read more here: https://developer.xero.com/documentation/api/accounting/banktransactions
|
||||||
|
|
||||||
columns:
|
columns:
|
||||||
- name: id_bank_transaction
|
- name: id_bank_transaction
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: ""
|
description: Xero's unique identifier for the transaction.
|
||||||
|
tests:
|
||||||
|
- not_null
|
||||||
|
- unique
|
||||||
|
|
||||||
- name: id_prepayment
|
- name: id_prepayment
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: ""
|
description: |
|
||||||
|
Xero generated identifier for a Prepayment (unique within
|
||||||
|
organisations). This will be returned on BankTransactions with a Type
|
||||||
|
of SPEND-PREPAYMENT or RECEIVE-PREPAYMENT.
|
||||||
|
|
||||||
- name: id_overpayment
|
- name: id_overpayment
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: ""
|
description: Xero generated identifier for an Overpayment (unique within
|
||||||
|
organisations). This will be returned on BankTransactions with a Type
|
||||||
|
of SPEND-OVERPAYMENT or RECEIVE-OVERPAYMENT.
|
||||||
|
|
||||||
- name: id_contact
|
- name: id_contact
|
||||||
data_type: text
|
data_type: text
|
||||||
description: ""
|
description: |
|
||||||
|
Xero's unique id for the contact related to this transaction.
|
||||||
|
|
||||||
- name: id_bank_account
|
- name: id_bank_account
|
||||||
data_type: text
|
data_type: text
|
||||||
description: ""
|
description: |
|
||||||
|
Xero's unique id for the bank account related to this transaction.
|
||||||
|
|
||||||
- name: reference
|
- name: reference
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: ""
|
description: |
|
||||||
|
Reference for the transaction. Only supported for SPEND and RECEIVE
|
||||||
|
transactions.
|
||||||
|
|
||||||
- name: transaction_type
|
- name: transaction_type
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: ""
|
description: |
|
||||||
|
What kind of transaction is this record.
|
||||||
|
|
||||||
|
Can be one of: RECEIVE, RECEIVE-OVERPAYMENT, RECEIVE-PREPAYMENT, SPEND, SPEND-OVERPAYMENT, SPEND-PREPAYMENT, RECEIVE-TRANSFER, SPEND-TRANSFER
|
||||||
|
|
||||||
|
You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transactions
|
||||||
|
tests:
|
||||||
|
- not_null
|
||||||
|
- accepted_values:
|
||||||
|
values:
|
||||||
|
- RECEIVE
|
||||||
|
- RECEIVE-OVERPAYMENT
|
||||||
|
- RECEIVE-PREPAYMENT
|
||||||
|
- SPEND
|
||||||
|
- SPEND-OVERPAYMENT
|
||||||
|
- SPEND-PREPAYMENT
|
||||||
|
- RECEIVE-TRANSFER
|
||||||
|
- SPEND-TRANSFER
|
||||||
|
|
||||||
|
|
||||||
- name: transaction_status
|
- name: transaction_status
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: ""
|
description: |
|
||||||
|
The status of this transaction.
|
||||||
|
|
||||||
|
Can be one of: AUTHORISED, DELETED.
|
||||||
|
|
||||||
|
You can read more here: https://developer.xero.com/documentation/api/accounting/types#bank-transaction-status-codes
|
||||||
|
tests:
|
||||||
|
- not_null
|
||||||
|
- accepted_values:
|
||||||
|
values:
|
||||||
|
- AUTHORISED
|
||||||
|
- DELETED
|
||||||
|
|
||||||
- name: transaction_at_utc
|
- name: transaction_at_utc
|
||||||
data_type: timestamp with time zone
|
data_type: timestamp with time zone
|
||||||
description: ""
|
description: When did the transaction happened.
|
||||||
|
|
||||||
- name: transaction_date_utc
|
- name: transaction_date_utc
|
||||||
data_type: date
|
data_type: date
|
||||||
description: ""
|
description: The date on which the transaction happenned.
|
||||||
|
|
||||||
- name: date_string
|
- name: date_string
|
||||||
data_type: timestamp with time zone
|
data_type: timestamp with time zone
|
||||||
description: ""
|
description: When did the transaction happened, as a string.
|
||||||
|
|
||||||
- name: total_amount_local_curr
|
- name: total_amount_local_curr
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: ""
|
description: |
|
||||||
|
Total of bank transaction tax inclusive, in the currency the
|
||||||
|
transaction is denominated in.
|
||||||
|
tests:
|
||||||
|
- not_null
|
||||||
|
|
||||||
- name: total_amount_in_gbp
|
- name: total_amount_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: ""
|
description: |
|
||||||
|
Total of bank transaction tax inclusive, presented in GBP.
|
||||||
|
tests:
|
||||||
|
- not_null
|
||||||
|
|
||||||
- name: total_amount_wo_tax_local_curr
|
- name: total_amount_wo_tax_local_curr
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: ""
|
description: |
|
||||||
|
Total of bank transaction excluding taxes, in the currency the
|
||||||
|
transaction is denominated in.
|
||||||
|
|
||||||
- name: total_amount_wo_tax_in_gbp
|
- name: total_amount_wo_tax_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: ""
|
description: |
|
||||||
|
Total of bank transaction excluding taxes, presented in GBP.
|
||||||
|
|
||||||
- name: total_tax_local_curr
|
- name: total_tax_local_curr
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: ""
|
description: |
|
||||||
|
Total tax on bank transaction, in the currency the transaction is
|
||||||
|
denominated in.
|
||||||
|
|
||||||
- name: total_tax_in_gbp
|
- name: total_tax_in_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: ""
|
description: |
|
||||||
|
Total tax on bank transaction, presented in GBP.
|
||||||
|
|
||||||
- name: transaction_currency_iso_4217
|
- name: transaction_currency_iso_4217
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: ""
|
description: The ISO 4217 code for the currency of the transaction.
|
||||||
|
tests:
|
||||||
|
- not_null
|
||||||
|
- length_between:
|
||||||
|
min_length: 3
|
||||||
|
max_length: 3
|
||||||
|
|
||||||
- name: exchange_rate_to_gbp
|
- name: exchange_rate_to_gbp
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: ""
|
description: |
|
||||||
|
|
||||||
|
ATTENTION! unlike in many other Xero entities, here this field is not
|
||||||
|
completed by Xero always. It has been complemented with the general
|
||||||
|
rates data used in the DWH. Xero's rates are preferent, so DWH rates
|
||||||
|
will only be used where Xero didn't provide a rate.
|
||||||
|
|
||||||
|
The implied exchange rate between the transaction currency and GBP.
|
||||||
|
|
||||||
|
This is the XXX to GBP rate. So the number represented in this field
|
||||||
|
is the units of currency GBP that 1 unit of XXX buys you.
|
||||||
|
|
||||||
|
For example, if the transaction is 135 ZAR, and this rate is 0.0167,
|
||||||
|
the transaction value in GBP is 2.25 (135ZAR * 0.0167GBP/ZAR =
|
||||||
|
2.25GBP).
|
||||||
|
tests:
|
||||||
|
- not_negative
|
||||||
|
- not_null
|
||||||
|
|
||||||
- name: line_amount_tax_inclusiveness
|
- name: line_amount_tax_inclusiveness
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: ""
|
description: |
|
||||||
|
Indicates whether the amounts included in line items are tax
|
||||||
- name: line_items
|
inclusive (Inclusive), tax exclusive (Exclusive) or simply,
|
||||||
data_type: jsonb
|
there are no taxes on the invoice (NoTax).
|
||||||
description: ""
|
tests:
|
||||||
|
- accepted_values:
|
||||||
|
values:
|
||||||
|
- Inclusive
|
||||||
|
- Exclusive
|
||||||
|
- NoTax
|
||||||
|
|
||||||
- name: is_reconciled
|
- name: is_reconciled
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: ""
|
description: A flag indicating if the transaction has been reconciled.
|
||||||
|
tests:
|
||||||
|
- not_null
|
||||||
|
|
||||||
- name: has_attachments
|
- name: has_attachments
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
|
|
|
||||||
|
|
@ -658,11 +658,11 @@ models:
|
||||||
|
|
||||||
- name: transaction_at_utc
|
- name: transaction_at_utc
|
||||||
data_type: timestamp with time zone
|
data_type: timestamp with time zone
|
||||||
description: When did the transaction happen.
|
description: When did the transaction happened.
|
||||||
|
|
||||||
- name: date_string
|
- name: date_string
|
||||||
data_type: timestamp with time zone
|
data_type: timestamp with time zone
|
||||||
description: When did the transaction happen, as a string.
|
description: When did the transaction happened, as a string.
|
||||||
|
|
||||||
- name: total_amount_local_curr
|
- name: total_amount_local_curr
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
|
|
@ -672,7 +672,7 @@ models:
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
- name: subtotal_local_curr
|
- name: total_amount_wo_tax_local_curr
|
||||||
data_type: numeric
|
data_type: numeric
|
||||||
description: |
|
description: |
|
||||||
Total of bank transaction excluding taxes, in the currency the
|
Total of bank transaction excluding taxes, in the currency the
|
||||||
|
|
@ -700,7 +700,7 @@ models:
|
||||||
ATTENTION! unlike in many other Xero entities, here this field is not
|
ATTENTION! unlike in many other Xero entities, here this field is not
|
||||||
completed by Xero always. Some records will have a rate, some won't.
|
completed by Xero always. Some records will have a rate, some won't.
|
||||||
You probably need to complement these rates with some other source if
|
You probably need to complement these rates with some other source if
|
||||||
you want to
|
you want to have no nulls.
|
||||||
|
|
||||||
The implied exchange rate between the transaction currency and GBP.
|
The implied exchange rate between the transaction currency and GBP.
|
||||||
|
|
||||||
|
|
@ -774,6 +774,7 @@ models:
|
||||||
- name: dwh_extracted_at_utc
|
- name: dwh_extracted_at_utc
|
||||||
data_type: timestamp with time zone
|
data_type: timestamp with time zone
|
||||||
description: ""
|
description: ""
|
||||||
|
|
||||||
- name: stg_xero__accounts
|
- name: stg_xero__accounts
|
||||||
description: |
|
description: |
|
||||||
Accounts in our accounting tree.
|
Accounts in our accounting tree.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue