quickbooks-node-promise
Version:
Connect to QuickBooks Online API with OAuth 2 with typescript on entities
1,104 lines • 422 kB
TypeScript
export interface Account_CurrencyRef {
/**
* META: * Required
*
* DESCRIPTION: A three letter string representing the ISO 4217 code for the currency. For example, **USD**, **AUD**, **EUR**, and so on.
*/
value: string;
/**
* META: Optional
*
* DESCRIPTION: The full name of the currency.
*/
name?: string;
}
export interface ReferenceType {
/**
* META: * Required
*
* DESCRIPTION: The ID for the referenced object as found in the Id field of the object payload. The context is set by the type of reference and is specific to the QuickBooks company file.
*/
value: string;
/**
* META: Optional
*
* DESCRIPTION: An identifying name for the object being referenced by **value** and is derived from the field that holds the common name of that object. This varies by context and specific type of object referenced. For example, references to a Customer object use **Customer.DisplayName** to populate this field. Optionally returned in responses, implementation dependent.
*/
name?: string;
}
export interface DateTime {
/**
* DESCRIPTION: Local time zone: **YYYY-MM-DDTHH:MM:SS**
* UTC:
*
* YYYY-MM-DDT
* HH
* :MM:
* SSZ
* Specific time zone:
* **YYYY-MM-DDT** **HH** **:MM:SS** **+/-
* HH
* :MM**
*/
dateTime?: string;
}
export interface ModificationMetaData {
/**
* META: read only ,system defined
*
* ADDON: Local time zone: YYYY-MM-DDTHH:MM:SS UTC: YYYY-MM-DDT HH :MM: SSZ Specific time zone: YYYY-MM-DDT HH :MM:SS +/- HH :MM
*
* DESCRIPTION: Time the entity was created in the source domain.
*/
readonly CreateTime?: string;
/**
* META: read only ,system defined
*
* ADDON: Local time zone: YYYY-MM-DDTHH:MM:SS UTC: YYYY-MM-DDT HH :MM: SSZ Specific time zone: YYYY-MM-DDT HH :MM:SS +/- HH :MM
*
* DESCRIPTION: Time the entity was last updated in the source domain.
*/
readonly LastUpdatedTime?: string;
}
export interface Account {
/**
* META: * Required for update ,read only ,system defined
*
* DESCRIPTION: Unique identifier for this object.
* Sort order is ASC by default.
*/
readonly Id?: string;
/**
* META: * Required ,max character: max 100 characters
*
* DESCRIPTION: User recognizable name for the Account.
* **Account.Name** attribute must not contain double quotes (") or colon (:).
*/
Name: string;
/**
* META: * Required for update ,read only ,system defined
*
* DESCRIPTION: Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its **SyncToken** is incremented. Attempts to modify an object specifying an older **SyncToken** fails. Only the latest version of the object is maintained by QuickBooks Online.
*/
readonly SyncToken?: string;
/**
* META: * Conditionally required ,
*
* DESCRIPTION: User-defined account number to help the user in identifying the account within the chart-of-accounts and in deciding what should be posted to the account. The **Account.AcctNum** attribute must not contain colon (:). Name must be unique.,For French Locales: Length must be between 6 and 20 characters,Must start with the account number from the master category list.,Name limited to alpha-numeric characters.,
* Max length for **Account.AcctNum**: AU & CA: 20 characters.,US, UK & IN: 7 characters,
*/
AcctNum?: string;
/**
* META: Optional
*
* DESCRIPTION: Reference to the currency in which this account holds amounts.
*/
CurrencyRef?: Account_CurrencyRef;
/**
* META: Optional
*
* DESCRIPTION: Specifies the Parent AccountId if this represents a SubAccount.
*/
ParentRef?: ReferenceType;
/**
* META: Optional ,max character: maximum of 100 chars
*
* DESCRIPTION: User entered description for the account, which may include user entered information to guide bookkeepers/accountants in deciding what journal entries to post to the account.
*/
Description?: string;
/**
* META: Optional
*
* DESCRIPTION: Whether or not active inactive accounts may be hidden from most display purposes and may not be posted to.
*/
Active?: boolean;
/**
* META: Optional
*
* DESCRIPTION: Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
*/
MetaData?: ModificationMetaData;
/**
* META: read only ,system defined
*
* DESCRIPTION: Specifies whether this object represents a parent (false) or subaccount (true). Please note that accounts of these types - **OpeningBalanceEquity**, **UndepositedFunds**, **RetainedEarnings**, **CashReceiptIncome**, **CashExpenditureExpense**, **ExchangeGainOrLoss** cannot have a sub account and cannot be a sub account of another account.
*/
readonly SubAccount?: boolean;
/**
* META: read only ,system defined
*
* DESCRIPTION: The classification of an account. Not supported for non-posting accounts.
* Valid values include: **Asset**, **Equity**, **Expense**, **Liability**, **Revenue**
*/
readonly Classification?: string;
/**
* META: read only ,system defined
*
* DESCRIPTION: Fully qualified name of the object; derived from **Name** and **ParentRef**. The fully qualified name prepends the topmost parent, followed by each subaccount separated by colons and takes the form of **Parent:Account1:SubAccount1:SubAccount2**. System generated. Limited to 5 levels.
*/
readonly FullyQualifiedName?: string;
/**
* META: minorVersion: 5 ,
*
* DESCRIPTION: The account location. Valid values include: **WithinFrance**, **FranceOverseas**, **OutsideFranceWithEU**, **OutsideEU**,
*
* For France locales, only.
*/
TxnLocationType?: string;
/**
* ADDON: null
*
* No values given for enum
*
* DESCRIPTION: A detailed account classification that specifies the use of this account. The type is based on the Classification.
*/
AccountType?: string;
/**
* META: read only
*
* ADDON: Decimal
*
* DESCRIPTION: Specifies the cumulative balance amount for the current Account and all its sub-accounts.
*/
readonly CurrentBalanceWithSubAccounts?: number;
/**
* META: minorVersion: 5 ,
*
* DESCRIPTION: A user friendly name for the account. It must be unique across all account categories. For France locales, only.
* For example, if an account is created under category 211 with **AccountAlias** of **Terrains**, then the system does not allow creation of an account with same **AccountAlias** of **Terrains** for any other category except 211. In other words, 211001 and 215001 accounts cannot have same AccountAlias because both belong to different account category.
* For France locales, only.
*/
AccountAlias?: string;
/**
* META: minorVersion: 3 ,
*
* DESCRIPTION: Reference to the default tax code used by this account. Tax codes are referenced by the **TaxCode.Id** in the TaxCode object. Available when endpoint is invoked with the **minorversion=3** query parameter. For global locales, only.
*/
TaxCodeRef?: ReferenceType;
/**
* DESCRIPTION: The account sub-type classification and is based on the AccountType value.
*/
AccountSubType?: string;
/**
* META: read only
*
* ADDON: Decimal
*
* DESCRIPTION: Specifies the balance amount for the current Account. Valid for Balance Sheet accounts.
*/
readonly CurrentBalance?: number;
}
export interface CustomField {
/**
* META: * Required ,read only ,system defined
*
* DESCRIPTION: Unique identifier of the CustomFieldDefinition that corresponds to this CustomField.
*/
readonly DefinitionId: string;
/**
* META: Optional
*
* DESCRIPTION: The value for the **StringType** custom field.
*/
StringValue?: string;
/**
* META: Optional ,read only
*
* DESCRIPTION: Name of the custom field.
*/
readonly Name?: string;
/**
* META: read only
*
* DESCRIPTION: Data type of custom field. Only one type is currently supported: **StringType**.
*/
readonly Type?: "StringType";
}
export interface Attachable_AttachableRef {
/**
* META: Optional
*
* DESCRIPTION: Used when **EntityRef.type** references a transaction object. This field indicates whether or not the attachment is sent with the transaction when **Save and Send** button is clicked in the QuickBooks UI or when the Send endpoint (send email) is invoked for the object.
*/
IncludeOnSend?: boolean;
/**
* META: Optional
*
* DESCRIPTION: For transaction objects, used to reference a transaction detail line.
*/
LineInfo?: string;
/**
* META: Optional
*
* DESCRIPTION: Indicates whether or not to find attachable records that have no references to any entity. Combine with **AttachableRef.Inactive** to return hidden references.
*/
NoRefOnly?: boolean;
/**
* META: Optional
*
* DESCRIPTION: If the user tries to fetch a record without permission, the permission denied message is conveyed through this field.
*/
CustomField?: CustomField[];
/**
* META: Optional
*
* DESCRIPTION: Indicates whether or not to include references to hidden entities when filtering. When set to **true** , hidden references are returned in the result set.
* For filtering results, it works with **AttachableRef.EntityRef.Type** , **AttachableRef.EntityRef.Value** and **AttachableRef.NoRefOnly** filters in combination.
*/
Inactive?: boolean;
/**
* META: Optional
*
* DESCRIPTION: Object reference to which this attachment is linked.
* Set **EntityRef.value** with the **Id** of the target object as returned in its response body when queried.,
* Set **EntityRef.type** with the specific type of the target object. For example, **invoice**, **bill**, **item**, etc.,
*/
EntityRef?: ReferenceType;
}
export interface Attachable {
/**
* META: * Required for update ,read only ,system defined
*
* ADDON: Id Type
*
* DESCRIPTION: Unique Identifier for an Intuit entity (object).
* Required for the update operation.
*/
readonly Id?: number;
/**
* META: * Required for update ,read only ,system defined
*
* DESCRIPTION: Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its **SyncToken** is incremented. Attempts to modify an object specifying an older **SyncToken** fails. Only the latest version of the object is maintained by QuickBooks Online.
*/
readonly SyncToken?: string;
/**
* META: * Conditionally required , ,max character: maximum 1000 chars
*
* DESCRIPTION: FileName of the attachment. Required for file attachments.
*/
FileName?: string;
/**
* META: * Conditionally required , ,max character: max 2000 chars
*
* DESCRIPTION: This note is either related to the attachment specified by **FileName** or is a standalone note. Required for standalone notes.
*/
Note?: string;
/**
* META: Optional ,max character: max 100 chars
*
* DESCRIPTION: Category of the attachment. Valid values include (case sensitive): **Contact Photo**, **Document**, **Image**, **Receipt**, **Signature**, **Sound**, **Other**.
*/
Category?: string;
/**
* META: Optional ,max character: max 100 chars
*
* DESCRIPTION: ContentType of the attachment. Returned for file attachments.
*/
ContentType?: string;
/**
* META: Optional ,max character: max 2000 chars
*
* DESCRIPTION: PlaceName from where the attachment was requested.
*/
PlaceName?: string;
/**
* META: Optional
*
* DESCRIPTION: Specifies the transaction object to which this attachable file is to be linked.
*/
AttachableRef?: Attachable_AttachableRef[];
/**
* META: Optional ,max character: max 100 chars
*
* DESCRIPTION: Longitude from where the attachment was requested.
*/
Long?: string;
/**
* META: Optional ,max character: max 2000 chars
*
* DESCRIPTION: Tag name for the requested attachment.
*/
Tag?: string;
/**
* META: Optional ,max character: max 100 chars
*
* DESCRIPTION: Latitude from where the attachment was requested.
*/
Lat?: string;
/**
* META: Optional
*
* DESCRIPTION: Descriptive information about the entity. The MetaData values are set by Data Services and are read only for all applications.
*/
MetaData?: ModificationMetaData;
/**
* META: read only ,system defined
*
* DESCRIPTION: FullPath FileAccess URI of the attachment. Returned for file attachments.
*/
readonly FileAccessUri?: string;
/**
* META: read only ,system defined
*
* ADDON: Decimal
*
* DESCRIPTION: Size of the attachment. Returned for file attachments.
*/
readonly Size?: number;
/**
* META: read only ,system defined
*
* DESCRIPTION: FullPath FileAccess URI of the attachment thumbnail if the attachment file is of a content type with thumbnail support. Returned for file attachments.
*/
readonly ThumbnailFileAccessUri?: string;
/**
* META: read only ,system defined
*
* DESCRIPTION: TempDownload URI which can be directly downloaded by clients. Returned for file attachments.
*/
readonly TempDownloadUri?: string;
/**
* META: read only ,system defined
*
* DESCRIPTION: Thumbnail TempDownload URI which can be directly downloaded by clients. This is only available if the attachment file is of a content type with thumbnail support. Returned for file attachments.
*/
readonly ThumbnailTempDownloadUri?: string;
}
export interface MarkupInfo {
/**
* META: Optional
*
* DESCRIPTION: Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
*/
PriceLevelRef?: ReferenceType;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
*/
Percent?: number;
/**
* META: Optional ,read only ,system defined
*
* DESCRIPTION: The account associated with the markup. Available with invoice objects, only, and when linktxn specified a **ReimburseCharge**.
*/
readonly MarkUpIncomeAccountRef?: ReferenceType;
}
export interface ItemBasedExpenseLineDetail {
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: The total amount of the line item including tax.
* Constraints: Available when endpoint is evoked with the **minorversion=1** query parameter.
*/
TaxInclusiveAmt?: number;
/**
* META: Optional
*
* DESCRIPTION: Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use **Item.Id** and **Item.Name** from that object for **ItemRef.value** and **ItemRef.name**, respectively. When a line lacks an ItemRef it is treated as documentation and the **Line.Amount** attribute is ignored.
* For France locales: The account associated with the referenced Item object is looked up in the account category list.
* If this account has same location as specified in the transaction by the **TransactionLocationType** attribute and the same VAT as in the line item **TaxCodeRef** attribute, then the item account is used.,
* If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.,
* If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.,
*/
ItemRef?: ReferenceType;
/**
* META: Optional
*
* DESCRIPTION: Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use **Customer.Id** and **Customer.DisplayName** from that object for **CustomerRef.value** and **CustomerRef.name**, respectively.
*/
CustomerRef?: ReferenceType;
/**
* META: Optional
*
* DESCRIPTION: Reference to the PriceLevel of the service or item for the line. Support for this element will be available in the coming months.
*/
PriceLevelRef?: ReferenceType;
/**
* META: Optional
*
* DESCRIPTION: Reference to the Class associated with the expense. Available if **Preferences.AccountingInfoPrefs.ClassTrackingPerLine** is set to **true**. Query the Class name list resource to determine the appropriate Class object for this reference. Use **Class.Id** and **Class.Name** from that object for **ClassRef.value** and **ClassRef.name**, respectively.
*/
ClassRef?: ReferenceType;
/**
* META: Optional
*
* DESCRIPTION: Reference to the **TaxCode** for this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use **TaxCode.Id** and **TaxCode.Name** from that object for **TaxCodeRef.value** and **TaxCodeRef.name**, respectively.
*/
TaxCodeRef?: ReferenceType;
/**
* META: Optional
*
* DESCRIPTION: Markup information for the expense.
*/
MarkupInfo?: MarkupInfo;
/**
* META: Optional
*
* DESCRIPTION: The billable status of the expense.
* Valid values: **Billable**, **NotBillable**, **HasBeenBilled**
*/
BillableStatus?: "Billable" | "NotBillable" | "HasBeenBilled";
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: Number of items for the line.
*/
Qty?: number;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: Unit price of the subject item as referenced by **ItemRef**. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
* If used for unit price, the monetary value of the service or product, as expressed in the home currency.
* If used for a discount or tax rate, express the percentage as a fraction. For example, specify **0.4** for 40% tax.
*/
UnitPrice?: number;
}
export interface Bill_Line_ItemBasedExpenseLine {
/**
* META: * Required for update ,read only ,system defined
*
* DESCRIPTION: The Id of the line item. Its use in requests is as folllows:
* If **Id** is greater than zero and exists for the company, the request is considered an update operation for a line item.,
* If no **Id** is provided, the **Id** provided is less than or equal to zero, or the **Id** provided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.,
*
* Available in all objects that use lines and support the update operation.
*/
readonly Id?: string;
/**
* META: * Required
*/
ItemBasedExpenseLineDetail: ItemBasedExpenseLineDetail;
/**
* META: * Required ,max character: Max 15 digits in 10.5 format
*
* ADDON: Decimal
*
* DESCRIPTION: The amount of the line item.
*/
Amount: number;
/**
* META: * Required
*
* DESCRIPTION: Set to **ItemBasedExpenseLineDetail** for this type of line.
*/
DetailType: "ItemBasedExpenseLineDetail";
/**
* META: Optional
*
* DESCRIPTION: Zero or more transactions linked to this object. The **LinkedTxn.TxnType** can be set to **PurchaseOrder** or if using Minor Version 55 and above it can also be set to **ReimburseCharge**. Use **LinkedTxn.TxnId** as the ID of the transaction. When updating an existing Bill to link to a PurchaseOrder a new Line must be created. This behavior matches the QuickBooks UI as it does not allow the linking of an existing line, but rather a new line must be added to link the PurchaseOrder. Over the API this is achieved by simply updating the Bill **Line.Id** to something new. This will ensure old bill line is deleted and the new line is linked to the PurchaseOrder. Please be aware that for this PurchaseOrder-Bill linking to work all LinkedTxn child attributes are required. See child attributes below.
*/
LinkedTxn?: any[];
/**
* META: Optional ,max character: Max 4000 chars
*
* DESCRIPTION: Free form text description of the line item that appears in the printed record.
*/
Description?: string;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: Specifies the position of the line in the collection of transaction lines. Positive integer.
*/
LineNum?: number;
}
export interface AccountBasedExpense {
/**
* META: * Required
*
* DESCRIPTION: Reference to the Expense account associated with this item. Query the Account name list resource to determine the appropriate Account object for this reference, where **Account.AccountType=Expense**. Use **Account.Id** and **Account.Name** from that object for **AccountRef.value** and **AccountRef.name**, respectively.
* For France locales: The account associated with the referenced Account object is looked up in the account category list.
* If this account has same location as specified in the transaction by the **TransactionLocationType** attribute and the same VAT as in the line item **TaxCodeRef** attribute, then this account is used.,
* If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.,
* If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.,
*/
AccountRef: ReferenceType;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: Sales tax paid as part of the expense.
*/
TaxAmount?: number;
/**
* META: Optional ,minorVersion: 1
*
* ADDON: Decimal
*
* DESCRIPTION: The total amount of the line item including tax.
* Constraints: Available when endpoint is evoked with the **minorversion=1** query parameter.
*/
TaxInclusiveAmt?: number;
/**
* META: Optional
*
* DESCRIPTION: Reference to the Class associated with the expense. Available if **Preferences.AccountingInfoPrefs.ClassTrackingPerLine** is set to **true**. Query the Class name list resource to determine the appropriate Class object for this reference. Use **Class.Id** and **Class.Name** from that object for **ClassRef.value** and **ClassRef.name**, respectively.
*/
ClassRef?: ReferenceType;
/**
* META: Optional
*
* DESCRIPTION: The **TaxCode** associated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use **TaxCode.Id** and **TaxCode.Name** from that object for **TaxCodeRef.value** and **TaxCodeRef.name**, respectively.
*/
TaxCodeRef?: ReferenceType;
/**
* META: Optional
*
* DESCRIPTION: Markup information for the expense.
*/
MarkupInfo?: MarkupInfo;
/**
* META: Optional
*
* DESCRIPTION: The billable status of the expense.
* Valid values: **Billable**, **NotBillable**, **HasBeenBilled**
*/
BillableStatus?: "Billable" | "NotBillable" | "HasBeenBilled";
/**
* META: Optional
*
* DESCRIPTION: Reference to the Customer associated with the expense. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use **Customer.Id** and **Customer.DisplayName** from that object for **CustomerRef.value** and **CustomerRef.name**, respectively.
*/
CustomerRef?: ReferenceType;
}
export interface Bill_Line_AccountBasedExpenseLine {
/**
* META: * Required for update ,read only ,system defined
*
* DESCRIPTION: The Id of the line item. Its use in requests is as folllows:
* If **Id** is greater than zero and exists for the company, the request is considered an update operation for a line item.,
* If no **Id** is provided, the **Id** provided is less than or equal to zero, or the **Id** provided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.,
*
* Available in all objects that use lines and support the update operation.
*/
readonly Id?: string;
/**
* META: * Required
*
* DESCRIPTION: Set to **AccountBasedExpenseLineDetail** for this type of line.
*/
DetailType: "AccountBasedExpenseLineDetail";
/**
* META: * Required ,max character: max 15 digits in 10.5 format
*
* ADDON: Decimal
*
* DESCRIPTION: The amount of the line item.
*/
Amount: number;
/**
* META: * Required
*
* DESCRIPTION: **LineDetail**
*/
AccountBasedExpenseLineDetail: AccountBasedExpense;
/**
* META: Optional
*
* DESCRIPTION: Zero or more PurchaseOrder transactions linked to this Bill object. The **LinkedTxn.TxnType** should always be set to **PurchaseOrder**. Use **LinkedTxn.TxnId** as the ID of the PurchaseOrder. When updating an existing Bill to link to a PurchaseOrder a new Line must be created. This behavior matches the QuickBooks UI as it does not allow the linking of an existing line, but rather a new line must be added to link the PurchaseOrder. Over the API this is achieved by simply updating the Bill **Line.Id** to something new. This will ensure old bill line is deleted and the new line is linked to the PurchaseOrder.
*/
LinkedTxn?: any[];
/**
* META: Optional ,max character: max 4000 chars
*
* DESCRIPTION: Free form text description of the line item that appears in the printed record.
*/
Description?: string;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: Specifies the position of the line in the collection of transaction lines. Positive Integer.
*/
LineNum?: number;
}
export interface CurrencyRefType {
/**
* META: * Required
*
* DESCRIPTION: A three letter string representing the ISO 4217 code for the currency. For example, **USD**, **AUD**, **EUR**, and so on.
*/
value: string;
/**
* META: Optional
*
* DESCRIPTION: The full name of the currency.
*/
name?: string;
}
export interface Bill_LinkedTxn {
/**
* META: * Required
*
* DESCRIPTION: Transaction Id of the related transaction.
*/
TxnId: string;
/**
* META: * Required
*
* DESCRIPTION: Transaction type of the linked object.
*/
TxnType: string;
/**
* META: * Conditionally required ,
*
* DESCRIPTION: Required for Deposit and Bill entities. The line number of a specific line of the linked transaction. If supplied, the **TxnId** and **TxnType** attributes of the linked transaction must also be populated.
*/
TxnLineId?: string;
}
export interface Date {
/**
* DESCRIPTION: Local timezone: **YYYY-MM-DD** UTC: **YYYY-MM-DDZ**
* Specific time zone: **YYYY-MM-DD+/-HH:MM** The date format follows the {@link https://www.w3.org/TR/xmlschema-2/ | XML Schema standard.}
*/
date?: string;
}
export interface TaxLineDetail {
/**
* META: * Required
*
* DESCRIPTION: Reference to a TaxRate to apply to the entire transaction. Query the TaxRate name list resource to determine the appropriate TaxRage object for this reference. Use **TaxRate.Id** and **TaxRate.Name** from that object for **TaxRateRef.value** and **TaxRateRef.name**, respectively.
* For non-US versions of QuickBooks, the TaxRate referenced here must also be one of the rates in the referenced tax code's rate list—either the SalesTaxRateList or the PurchaseTaxRateList—as applies to the transaction type. Any given rate may only be listed once.
*/
TaxRateRef: ReferenceType;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: This is the taxable amount on the total of the applicable tax rates. If TaxRate is applicable on two lines, this attribute represents the total of the two lines for which this rate is applied. This is different from the **Line.Amount** , which represents the final tax amount after the tax has been applied.
*
* Default Value: **Null**
*/
NetAmountTaxable?: number;
/**
* META: Optional
*
* DESCRIPTION: **True**—sales tax rate is expressed as a percentage., **False**—sales tax rate is expressed as a number amount.,
*/
PercentBased?: boolean;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: This is the total amount, including tax.
*/
TaxInclusiveAmount?: number;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: The difference between the actual tax and the overridden amount supplied by the user.
*/
OverrideDeltaAmount?: number;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: Numerical expression of the sales tax percent. For example, use "8.5" not "0.085".
*/
TaxPercent?: number;
}
export interface Bill_TxnTaxDetail_TaxLine_Line {
/**
* META: * Required
*
* DESCRIPTION: Set to **TaxLineDetail** for this type of line.
*/
DetailType: "TaxLineDetail";
/**
* META: * Required
*
* DESCRIPTION: **TaxLineDetail**
*/
TaxLineDetail: TaxLineDetail;
/**
* META: Optional ,max character: Max 15 digits in 10.5 format
*
* ADDON: Decimal
*
* DESCRIPTION: The amount of tax for this tax line. This value is negative for JournalEntry objects with **PostingType** set to **Credit.**
*/
Amount?: number;
}
export interface TxnTaxDetail {
/**
* META: Optional
*
* DESCRIPTION: Reference to the transaction tax code. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use **TaxCode.Id** and **TaxCode.Name** from that object for **TaxCodeRef.value** and **TaxCodeRef.name**, respectively. If specified and sales tax is disabled (**Preferences.TaxPrefs.UsingSalesTax** is set to **false**), this element is ignored and not returned. For sales transactions, only: if automated sales tax is enabled (**Preferences.TaxPrefs.PartnerTaxEnabled** is set to **true**) the supplied transaction tax code is replaced by the automated sales tax engine recommendation.
*/
TxnTaxCodeRef?: ReferenceType;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: Total tax calculated for the transaction, excluding any tax lines manually inserted into the transaction line list.
*/
TotalTax?: number;
/**
* META: Optional
*/
TaxLine?: Bill_TxnTaxDetail_TaxLine_Line[];
}
export interface Bill {
/**
* META: * Required for update ,read only ,system defined
*
* DESCRIPTION: Unique identifier for this object.
* Sort order is ASC by default.
*/
readonly Id?: string;
/**
* META: * Required
*
* DESCRIPTION: Reference to the vendor for this transaction. Query the Vendor name list resource to determine the appropriate Vendor object for this reference. Use **Vendor.Id** and **Vendor.Name** from that object for **VendorRef.value** and **VendorRef.name**, respectively.
*/
VendorRef: ReferenceType;
/**
* META: * Required
*
* DESCRIPTION: Individual line items of a transaction.
* Valid **Line** types include: **ItemBasedExpenseLine** and **AccountBasedExpenseLine**
*/
Line: (Bill_Line_ItemBasedExpenseLine | Bill_Line_AccountBasedExpenseLine)[];
/**
* META: * Required for update ,read only ,system defined
*
* DESCRIPTION: Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its **SyncToken** is incremented. Attempts to modify an object specifying an older **SyncToken** fails. Only the latest version of the object is maintained by QuickBooks Online.
*/
readonly SyncToken?: string;
/**
* META: * Conditionally required ,
*
* DESCRIPTION: Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
* Multicurrency is enabled for the company if **Preferences.MultiCurrencyEnabled** is set to **true**. Read more about multicurrency support {@link https://developer.intuit.com/app/developer/qbo/docs/develop/tutorials/manage-multiple-currencies | here}. Required if multicurrency is enabled for the company.
*/
CurrencyRef?: CurrencyRefType;
/**
* META: Optional
*
* ADDON: Local timezone: YYYY-MM-DD UTC: YYYY-MM-DDZ Specific time zone: YYYY-MM-DD+/-HH:MM
*
* DESCRIPTION: The date entered by the user when this transaction occurred.
* For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
* Sort order is ASC by default.
*/
TxnDate?: string;
/**
* META: Optional
*
* DESCRIPTION: Specifies to which AP account the bill is credited. Query the Account name list resource to determine the appropriate Account object for this reference. Use **Account.Id** and **Account.Name** from that object for **APAccountRef.value** and **APAccountRef.name**, respectively. The specified account must have **Account.Classification** set to **Liability** and **Account.AccountSubType** set to **AccountsPayable**.
* If the company has a single AP account, the account is implied. However, it is recommended that the AP Account be explicitly specified in all cases to prevent unexpected errors when relating transactions to each other.
*/
APAccountRef?: ReferenceType;
/**
* META: Optional
*
* DESCRIPTION: Reference to the Term associated with the transaction. Query the Term name list resource to determine the appropriate Term object for this reference. Use **Term.Id** and **Term.Name** from that object for **SalesTermRef.value** and **SalesTermRef.name**, respectively.
*/
SalesTermRef?: ReferenceType;
/**
* META: Optional
*
* DESCRIPTION: Zero or more transactions linked to this Bill object. The **LinkedTxn.TxnType** can be set to **PurchaseOrder**, **BillPaymentCheck** or if using Minor Version 55 and above **ReimburseCharge**. Use **LinkedTxn.TxnId** as the ID of the transaction.
*/
LinkedTxn?: Bill_LinkedTxn[];
/**
* META: Optional ,
*
* DESCRIPTION: Method in which tax is applied. Allowed values are: **TaxExcluded**, **TaxInclusive**, and **NotApplicable**.
*/
GlobalTaxCalculation?: "TaxExcluded" | "TaxInclusive" | "NotApplicable";
/**
* META: Optional ,read only
*
* ADDON: Big Decimal
*
* DESCRIPTION: Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
*/
readonly TotalAmt?: number;
/**
* META: Optional ,minorVersion: 4 ,
*
* DESCRIPTION: The account location. Valid values include: **WithinFrance**, **FranceOverseas**, **OutsideFranceWithEU**, **OutsideEU**,
*
* For France locales, only.
*/
TransactionLocationType?: string;
/**
* META: Optional
*
* ADDON: Local timezone: YYYY-MM-DD UTC: YYYY-MM-DDZ Specific time zone: YYYY-MM-DD+/-HH:MM
*
* DESCRIPTION: Date when the payment of the transaction is due. If date is not provided, the number of days specified in **SalesTermRef** added the transaction date will be used.
*/
DueDate?: string;
/**
* META: Optional
*
* DESCRIPTION: Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
*/
MetaData?: ModificationMetaData;
/**
* META: Optional ,max character: maximum of 21 chars
*
* DESCRIPTION: Reference number for the transaction. If not explicitly provided at create time, a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
* Throws an error when duplicate DocNumber is sent in the request.
* Recommended best practice: check the setting of **Preferences:OtherPrefs** before setting DocNumber. If a duplicate DocNumber needs to be supplied, add the query parameter name/value pair, **include=allowduplicatedocnum** to the URI.
* Sort order is ASC by default.
*/
DocNumber?: string;
/**
* META: Optional ,max character: max of 4000 chars
*
* DESCRIPTION: User entered, organization-private note about the transaction. This note does not appear on the invoice to the customer. This field maps to the Memo field on the Invoice form.
*/
PrivateNote?: string;
/**
* META: Optional ,
*
* DESCRIPTION: This data type provides information for taxes charged on the transaction as a whole. It captures the details of all taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction.
* If sales tax is disabled (**Preferences.TaxPrefs.UsingSalesTax** is set to **false**) then **TxnTaxDetail** is ignored and not stored.
*/
TxnTaxDetail?: TxnTaxDetail;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: The number of home currency units it takes to equal one unit of currency specified by **CurrencyRef**. Applicable if multicurrency is enabled for the company.
*/
ExchangeRate?: number;
/**
* META: Optional
*
* DESCRIPTION: A reference to a Department object specifying the location of the transaction, as defined using location tracking in QuickBooks Online. Query the Department name list resource to determine the appropriate department object for this reference. Use **Department.Id** and **Department.Name** from that object for **DepartmentRef.value** and **DepartmentRef.name**, respectively.
*/
DepartmentRef?: ReferenceType;
/**
* META: Optional ,minorVersion: 40 ,
*
* DESCRIPTION: Include the supplier in the annual TPAR. TPAR stands for Taxable Payments Annual Report. The TPAR is mandated by ATO to get the details payments that businesses make to contractors for providing services. Some government entities also need to report the grants they have paid in a TPAR.
*/
IncludeInAnnualTPAR?: boolean;
/**
* META: read only ,minorVersion: 3
*
* ADDON: Decimal
*
* DESCRIPTION: Convenience field containing the amount in **Balance** expressed in terms of the home currency. Calculated by QuickBooks business logic. Value is valid only when **CurrencyRef** is specified and available when endpoint is evoked with the **minorversion=3** query parameter. Applicable if multicurrency is enabled for the company.
*/
readonly HomeBalance?: number;
/**
* META: read only ,minorVersion: 52
*
* DESCRIPTION: A reference to the Recurring Transaction. It captures what recurring transaction template the **Bill** was created from.
*/
readonly RecurDataRef?: ReferenceType;
/**
* META: read only
*
* ADDON: Decimal
*
* DESCRIPTION: The balance reflecting any payments made against the transaction. Initially set to the value of **TotalAmt**. A Balance of 0 indicates the bill is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
*/
readonly Balance?: number;
}
export interface BillPayment_Line_LinkedTxn {
/**
* META: * Required
*
* DESCRIPTION: Transaction Id of the related transaction.
*/
TxnId: string;
/**
* META: * Required
*
* DESCRIPTION: Transaction type of the linked object.
*/
TxnType: string;
/**
* META: * Conditionally required ,
*
* DESCRIPTION: Required for Deposit and Bill entities. The line number of a specific line of the linked transaction. If supplied, the **TxnId** and **TxnType** attributes of the linked transaction must also be populated.
*/
TxnLineId?: string;
}
export interface BillPayment_Line {
/**
* META: * Required ,max character: Max 15 digits in 10.5 format
*
* ADDON: Decimal
*
* DESCRIPTION: The amount of the line item.
*/
Amount: number;
/**
* META: * Required
*
* DESCRIPTION: Transaction to which the current entity is related. For example, a billpayment line links to the originating bill object for which the billpayment is applied.
*/
LinkedTxn: BillPayment_Line_LinkedTxn[];
}
export interface BillPayment_CheckPayment_BillPaymentCheck {
/**
* META: * Required
*
* DESCRIPTION: Reference to the bank account. Query the Account name list resource to determine the appropriate Account object for this reference. Use **Account.Id** and **Account.Name** from that object for **APAccountRef.value** and **APAccountRef.name**, respectively. The specified account must have **Account.AccountType** set to **Bank** and **Account.AccountSubType** set to **Checking**.
*/
BankAccountRef: ReferenceType;
/**
* META: Optional
*
* DESCRIPTION: **NeedToPrint**
* Printing status of the invoice.
* Valid values: **NotSet**, **NeedToPrint**, **PrintComplete**.
*/
PrintStatus?: "NeedToPrint" | "NotSet" | "PrintComplete";
}
export interface BillPayment_CreditCardPayment_BillPaymentCreditCard {
/**
* META: * Required
*
* DESCRIPTION: Reference to the credit card account. Query the Account name list resource to determine the appropriate Account object for this reference. Use **Account.Id** and **Account.Name** from that object for **CCAccountRef.value** and **CCAccountRef.name**, respectively. The specified account must have **Account.AccountType** set to **Credit Card** and **Account.AccountSubType** set to **CreditCard**.
* Inject with data only if the payment was transacted through Intuit Payments API.
*/
CCAccountRef: ReferenceType;
}
export interface BillPayment {
/**
* META: * Required for update ,read only ,system defined
*
* DESCRIPTION: Unique Identifier for an Intuit entity (object).
* Sort order is ASC by default.
*/
readonly Id?: string;
/**
* META: * Required
*
* DESCRIPTION: Reference to the vendor for this transaction. Query the Vendor name list resource to determine the appropriate Vendor object for this reference. Use **Vendor.Id** and **Vendor.Name** from that object for **VendorRef.value** and **VendorRef.name**, respectively.
*/
VendorRef: ReferenceType;
/**
* META: * Required
*
* DESCRIPTION: Individual line items representing zero or more **Bill**, **VendorCredit**, and **JournalEntry** objects linked to this BillPayment object.
* Use **Line.LinkedTxn.TxnId** as the ID in a separate Bill, VendorCredit, or JournalEntry read request to retrieve details of the linked object.
* LinkedTxnLine:
*/
Line: BillPayment_Line[];
/**
* META: * Required
*
* ADDON: Big Decimal
*
* DESCRIPTION: Indicates the total amount associated with this payment. This includes the total of all the payments from the payment line details. If **TotalAmt** is greater than the total on the lines being paid, the overpayment is treated as a credit and exposed as such on the QuickBooks UI. It cannot be negative.
*/
TotalAmt: number;
/**
* META: * Required
*
* DESCRIPTION: The payment type. Valid values include: **Check**, **CreditCard**
*/
PayType: "Check" | "CreditCard";
/**
* META: * Required for update ,read only ,system defined
*
* DESCRIPTION: Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its **SyncToken** is incremented. Attempts to modify an object specifying an older **SyncToken** fails. Only the latest version of the object is maintained by QuickBooks Online.
*/
readonly SyncToken?: string;
/**
* META: * Conditionally required ,
*
* DESCRIPTION: Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
* Multicurrency is enabled for the company if **Preferences.MultiCurrencyEnabled** is set to **true**. Read more about multicurrency support {@link https://developer.intuit.com/app/developer/qbo/docs/develop/tutorials/manage-multiple-currencies | here}.Required if multicurrency is enabled for the company
*/
CurrencyRef?: CurrencyRefType;
/**
* META: Optional ,max character: maximum of 21 chars
*
* DESCRIPTION: Reference number for the transaction. If not explicitly provided at create time, a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
* Throws an error when duplicate DocNumber is sent in the request.
* Recommended best practice: check the setting of **Preferences:OtherPrefs** before setting DocNumber. If a duplicate DocNumber needs to be supplied, add the query parameter name/value pair, **include=allowduplicatedocnum** to the URI.
* Sort order is ASC by default.
*/
DocNumber?: string;
/**
* META: Optional ,max character: max of 4000 chars
*
* DESCRIPTION: User entered, organization-private note about the transaction. This note does not appear on the invoice to the customer. This field maps to the Memo field on the form.
*/
PrivateNote?: string;
/**
* META: Optional
*
* ADDON: Local timezone: YYYY-MM-DD UTC: YYYY-MM-DDZ Specific time zone: YYYY-MM-DD+/-HH:MM
*
* DESCRIPTION: The date entered by the user when this transaction occurred.
* For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
* Sort order is ASC by default.
*/
TxnDate?: string;
/**
* META: Optional
*
* ADDON: Decimal
*
* DESCRIPTION: The number of home currency units it takes to equal one unit of currency specified by **CurrencyRef**. Applicable if multicurrency is enabled for the company.
*/
ExchangeRate?: number;
/**
* META: Optional
*
* DESCRIPTION: Specifies to which AP account the bill is credited. Query the Account name list resource to determine the appropriate Account object for this reference. Use **Account.Id** and **Account.Name** from that object for **APAccountRef.value** and **APAccountRef.name**, respectively. The specified account must have **Account.Classification** set to **Liability** and **Account.AccountSubType** set to **AccountsPayable**.
* If the company has a single AP account, the account is implied. However, it is recommended that the AP Account be explicitly specified in all cases to prevent unexpected errors when relating transactions to each other.
*/
APAccountRef?: ReferenceType;
/**
* META: Optional
*
* DESCRIPTION: A reference to a Department object specifying the location of the transaction, as defined using location tracking in QuickBooks Online. Query the Department name list resource to determine the appropriate department object for this reference. Use **Department.Id** and **Department.Name** from that object for **DepartmentRef.value** and **DepartmentRef.name**, respectively.
*/
DepartmentRef?: ReferenceType;
/**
* META: Optional ,minorVersion: 4 ,
*
* DESCRIPTION: The account location. Valid values include: **WithinFrance**, **FranceOverseas**, **OutsideFranceWithEU**, **OutsideEU**,
*
* For France locales, only.
*/
TransactionLocationType?: string;
/**
* META: Optional
*
* DESCRIPTION: Indicates that the payment should be processed by merchant account service. Valid for QuickBooks companies with credit card processing.
*/
ProcessBillPayment?: boolean;
/**
* META: Optional
*
* DESCRIPTION: Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
*/
MetaData?: ModificationMetaData;
/**
* DESCRIPTION: Information about a check payment for the transaction. Not applicable to Estimate and SalesOrder. Used when PayType is **Check**.
*/
CheckPayment?: BillPayment_CheckPayment_BillPaymentCheck;
/**
* DESCRIPTION: Information about a credit card payment for the transaction. Not a