import { SpeakeasyBase } from "../../../internal/utils";
import { InvoiceTo } from "./invoiceto";
import { JournalLine } from "./journalline";
import { JournalRef } from "./journalref";
import { Metadata } from "./metadata";
import { SupplementalData } from "./supplementaldata";
/**
* > **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/accounting-api#/schemas/Journal) data type
*
* @remarks
*
* > View the coverage for journal entries in the Data coverage explorer.
*
* ## Overview
*
* A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/accounting-api#/schemas/Account), when transactions are approved. The journal line items for each journal entry should balance.
*
* A journal entry line item is a single transaction line on the journal entry. For example:
*
* - When a journal entry is recording a receipt of cash, the credit to accounts receivable and the debit to cash are separate line items.
* - When a company needs to recognise revenue from an annual contract on a monthly basis, on receipt of cash for month one, they make a debit to deferred income and a credit to revenue.
*
* In Codat a journal entry contains details of:
*
* - The date on which the entry was created and posted.
* - Itemised lines, including amounts and currency.
* - A reference to the associated accounts.
* - A reference to the underlying record. For example, the invoice, bill, or other data type that triggered the posting of the journal entry to the general ledger.
*
* > **Pushing journal entries**
* > Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency.
*/
export declare class JournalEntry extends SpeakeasyBase {
/**
* In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
*
* @remarks
*
* ```
* 2020-10-08T22:40:50Z
* 2021-01-01T00:00:00
* ```
*
*
*
* When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
*
* - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
* - Unqualified local time: `2021-11-15T01:00:00`
* - UTC time offsets: `2021-11-15T01:00:00-05:00`
*
* > Time zones
* >
* > Not all dates from Codat will contain information about time zones.
* > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
*/
createdOn?: string;
/**
* Optional description of the journal entry.
*/
description?: string;
/**
* Unique identifier of the journal entry for the company in the accounting platform.
*/
id?: string;
/**
* An array of journal lines.
*/
journalLines?: JournalLine[];
/**
* Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals).
*/
journalRef?: JournalRef;
metadata?: Metadata;
modifiedDate?: string;
/**
* In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
*
* @remarks
*
* ```
* 2020-10-08T22:40:50Z
* 2021-01-01T00:00:00
* ```
*
*
*
* When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
*
* - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
* - Unqualified local time: `2021-11-15T01:00:00`
* - UTC time offsets: `2021-11-15T01:00:00-05:00`
*
* > Time zones
* >
* > Not all dates from Codat will contain information about time zones.
* > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
*/
postedOn?: string;
/**
* Links the current record to the underlying record or data type that created it.
*
* @remarks
*
* For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model.
*/
recordRef?: InvoiceTo;
sourceModifiedDate?: string;
/**
* Supplemental data is additional data you can include in our standard data types.
*
* @remarks
*
* It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
*/
supplementalData?: SupplementalData;
/**
* In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
*
* @remarks
*
* ```
* 2020-10-08T22:40:50Z
* 2021-01-01T00:00:00
* ```
*
*
*
* When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
*
* - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
* - Unqualified local time: `2021-11-15T01:00:00`
* - UTC time offsets: `2021-11-15T01:00:00-05:00`
*
* > Time zones
* >
* > Not all dates from Codat will contain information about time zones.
* > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
*/
updatedOn?: string;
}