@apideck/node
Version:
Apideck Node.js SDK
290 lines (289 loc) • 7.68 kB
TypeScript
/**
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.13.0
* Contact: support@apideck.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { BankAccount } from './BankAccount';
import { BillLineItem } from './BillLineItem';
import { Currency } from './Currency';
import { CustomField } from './CustomField';
import { LinkedLedgerAccount } from './LinkedLedgerAccount';
import { LinkedSupplier } from './LinkedSupplier';
import { LinkedTrackingCategories } from './LinkedTrackingCategories';
import { PassThroughBody } from './PassThroughBody';
/**
*
* @export
* @interface Bill
*/
export interface Bill {
/**
* A unique identifier for an object.
* @type {string}
* @memberof Bill
*/
readonly id?: string;
/**
* The third-party API ID of original entity
* @type {string}
* @memberof Bill
*/
readonly downstream_id?: string | null;
/**
* Reference to supplier bill number
* @type {string}
* @memberof Bill
*/
bill_number?: string | null;
/**
*
* @type {LinkedSupplier}
* @memberof Bill
*/
supplier?: LinkedSupplier | null;
/**
* The company or subsidiary id the transaction belongs to
* @type {string}
* @memberof Bill
*/
company_id?: string | null;
/**
*
* @type {Currency}
* @memberof Bill
*/
currency?: Currency | null;
/**
* Currency Exchange Rate at the time entity was recorded/generated.
* @type {number}
* @memberof Bill
*/
currency_rate?: number | null;
/**
* Amounts are including tax
* @type {boolean}
* @memberof Bill
*/
tax_inclusive?: boolean | null;
/**
* Date bill was issued - YYYY-MM-DD.
* @type {Date}
* @memberof Bill
*/
bill_date?: Date | null;
/**
* The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD.
* @type {Date}
* @memberof Bill
*/
due_date?: Date | null;
/**
* The paid date is the date on which a payment was sent to the supplier - YYYY-MM-DD.
* @type {Date}
* @memberof Bill
*/
paid_date?: Date | null;
/**
* A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order.
* @type {string}
* @memberof Bill
*/
po_number?: string | null;
/**
* Optional bill reference.
* @type {string}
* @memberof Bill
*/
reference?: string | null;
/**
*
* @type {Array<BillLineItem>}
* @memberof Bill
*/
line_items?: Array<BillLineItem>;
/**
* Terms of payment.
* @type {string}
* @memberof Bill
*/
terms?: string | null;
/**
* Balance of bill due.
* @type {number}
* @memberof Bill
*/
balance?: number | null;
/**
* Amount of deposit made to this bill.
* @type {number}
* @memberof Bill
*/
deposit?: number | null;
/**
* Sub-total amount, normally before tax.
* @type {number}
* @memberof Bill
*/
sub_total?: number | null;
/**
* Total tax amount applied to this bill.
* @type {number}
* @memberof Bill
*/
total_tax?: number | null;
/**
* Total amount of bill, including tax.
* @type {number}
* @memberof Bill
*/
total?: number | null;
/**
* Applicable tax id/code override if tax is not supplied on a line item basis.
* @type {string}
* @memberof Bill
*/
tax_code?: string | null;
/**
*
* @type {string}
* @memberof Bill
*/
notes?: string | null;
/**
* Invoice status
* @type {string}
* @memberof Bill
*/
status?: BillStatus;
/**
*
* @type {LinkedLedgerAccount}
* @memberof Bill
*/
ledger_account?: LinkedLedgerAccount | null;
/**
* Payment method used for the transaction, such as cash, credit card, bank transfer, or check
* @type {string}
* @memberof Bill
*/
payment_method?: string | null;
/**
* The channel through which the transaction is processed.
* @type {string}
* @memberof Bill
*/
channel?: string | null;
/**
* language code according to ISO 639-1. For the United States - EN
* @type {string}
* @memberof Bill
*/
language?: string | null;
/**
* Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row.
* @type {boolean}
* @memberof Bill
*/
accounting_by_row?: boolean | null;
/**
*
* @type {BankAccount}
* @memberof Bill
*/
bank_account?: BankAccount;
/**
* Discount percentage applied to this transaction.
* @type {number}
* @memberof Bill
*/
discount_percentage?: number | null;
/**
* URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
* @type {string}
* @memberof Bill
*/
source_document_url?: string | null;
/**
*
* @type {LinkedTrackingCategories}
* @memberof Bill
*/
tracking_categories?: LinkedTrackingCategories | null;
/**
* The user who last updated the object.
* @type {string}
* @memberof Bill
*/
readonly updated_by?: string | null;
/**
* The user who created the object.
* @type {string}
* @memberof Bill
*/
readonly created_by?: string | null;
/**
* The date and time when the object was last updated.
* @type {Date}
* @memberof Bill
*/
readonly updated_at?: Date | null;
/**
* The date and time when the object was created.
* @type {Date}
* @memberof Bill
*/
readonly created_at?: Date | null;
/**
* A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
* @type {string}
* @memberof Bill
*/
row_version?: string | null;
/**
*
* @type {Array<CustomField>}
* @memberof Bill
*/
custom_fields?: Array<CustomField>;
/**
* When custom mappings are configured on the resource, the result is included here.
* @type {object}
* @memberof Bill
*/
readonly custom_mappings?: object | null;
/**
*
* @type {PassThroughBody}
* @memberof Bill
*/
pass_through?: PassThroughBody;
/**
* Accounting period
* @type {string}
* @memberof Bill
*/
accounting_period?: string | null;
}
/**
* @export
* @enum {string}
*/
export declare enum BillStatus {
draft = "draft",
submitted = "submitted",
authorised = "authorised",
partially_paid = "partially_paid",
paid = "paid",
void = "void",
credit = "credit",
deleted = "deleted"
}
export declare function BillFromJSON(json: any): Bill;
export declare function BillFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bill;
export declare function BillToJSON(value?: Bill | null): any;