xero-node
Version:
Xero NodeJS OAuth 2.0 client for xero-node
1,256 lines • 138 kB
TypeScript
/**
* Xero Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.17.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/// <reference types="node" />
import http = require('http');
import fs = require('fs');
import { Account } from '../model/accounting/account';
import { Accounts } from '../model/accounting/accounts';
import { Actions } from '../model/accounting/actions';
import { Allocations } from '../model/accounting/allocations';
import { Attachments } from '../model/accounting/attachments';
import { BankTransactions } from '../model/accounting/bankTransactions';
import { BankTransfers } from '../model/accounting/bankTransfers';
import { BatchPayments } from '../model/accounting/batchPayments';
import { BrandingThemes } from '../model/accounting/brandingThemes';
import { Budgets } from '../model/accounting/budgets';
import { CISOrgSettings } from '../model/accounting/cISOrgSettings';
import { CISSettings } from '../model/accounting/cISSettings';
import { ContactGroups } from '../model/accounting/contactGroups';
import { Contacts } from '../model/accounting/contacts';
import { CreditNotes } from '../model/accounting/creditNotes';
import { Currencies } from '../model/accounting/currencies';
import { Currency } from '../model/accounting/currency';
import { Employees } from '../model/accounting/employees';
import { ExpenseClaims } from '../model/accounting/expenseClaims';
import { HistoryRecords } from '../model/accounting/historyRecords';
import { ImportSummaryObject } from '../model/accounting/importSummaryObject';
import { InvoiceReminders } from '../model/accounting/invoiceReminders';
import { Invoices } from '../model/accounting/invoices';
import { Items } from '../model/accounting/items';
import { Journals } from '../model/accounting/journals';
import { LinkedTransaction } from '../model/accounting/linkedTransaction';
import { LinkedTransactions } from '../model/accounting/linkedTransactions';
import { ManualJournals } from '../model/accounting/manualJournals';
import { OnlineInvoices } from '../model/accounting/onlineInvoices';
import { Organisations } from '../model/accounting/organisations';
import { Overpayments } from '../model/accounting/overpayments';
import { Payment } from '../model/accounting/payment';
import { PaymentDelete } from '../model/accounting/paymentDelete';
import { PaymentService } from '../model/accounting/paymentService';
import { PaymentServices } from '../model/accounting/paymentServices';
import { Payments } from '../model/accounting/payments';
import { Prepayments } from '../model/accounting/prepayments';
import { PurchaseOrders } from '../model/accounting/purchaseOrders';
import { Quotes } from '../model/accounting/quotes';
import { Receipts } from '../model/accounting/receipts';
import { RepeatingInvoices } from '../model/accounting/repeatingInvoices';
import { ReportWithRows } from '../model/accounting/reportWithRows';
import { Reports } from '../model/accounting/reports';
import { RequestEmpty } from '../model/accounting/requestEmpty';
import { Setup } from '../model/accounting/setup';
import { TaxRates } from '../model/accounting/taxRates';
import { TrackingCategories } from '../model/accounting/trackingCategories';
import { TrackingCategory } from '../model/accounting/trackingCategory';
import { TrackingOption } from '../model/accounting/trackingOption';
import { TrackingOptions } from '../model/accounting/trackingOptions';
import { Users } from '../model/accounting/users';
import { Authentication } from '../model/accounting/models';
import { OAuth } from '../model/accounting/models';
export declare enum AccountingApiApiKeys {
}
export declare class AccountingApi {
protected _basePath: string;
protected defaultHeaders: any;
protected _useQuerystring: boolean;
protected binaryHeaders: any;
protected authentications: {
default: Authentication;
OAuth2: OAuth;
};
constructor(basePath?: string);
set useQuerystring(value: boolean);
set basePath(basePath: string);
get basePath(): string;
setDefaultAuthentication(auth: Authentication): void;
setApiKey(key: AccountingApiApiKeys, value: string): void;
set accessToken(token: string);
/**
*
* @summary Creates a new chart of accounts
* @param xeroTenantId Xero identifier for Tenant
* @param account Account object in body of request
*/
createAccount(xeroTenantId: string, account: Account, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Accounts;
}>;
/**
*
* @summary Creates an attachment on a specific account
* @param xeroTenantId Xero identifier for Tenant
* @param accountID Unique identifier for Account object
* @param fileName Name of the attachment
* @param body Byte array of file in body of request
*/
createAccountAttachmentByFileName(xeroTenantId: string, accountID: string, fileName: string, body: fs.ReadStream, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Creates an attachment for a specific bank transaction by filename
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransactionID Xero generated unique identifier for a bank transaction
* @param fileName Name of the attachment
* @param body Byte array of file in body of request
*/
createBankTransactionAttachmentByFileName(xeroTenantId: string, bankTransactionID: string, fileName: string, body: fs.ReadStream, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Creates a history record for a specific bank transactions
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransactionID Xero generated unique identifier for a bank transaction
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createBankTransactionHistoryRecord(xeroTenantId: string, bankTransactionID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates one or more spent or received money transaction
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransactions BankTransactions with an array of BankTransaction objects in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
* @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
*/
createBankTransactions(xeroTenantId: string, bankTransactions: BankTransactions, summarizeErrors?: boolean, unitdp?: number, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: BankTransactions;
}>;
/**
*
* @summary Creates a bank transfer
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransfers BankTransfers with array of BankTransfer objects in request body
*/
createBankTransfer(xeroTenantId: string, bankTransfers: BankTransfers, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: BankTransfers;
}>;
/**
*
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransferID Xero generated unique identifier for a bank transfer
* @param fileName Name of the attachment
* @param body Byte array of file in body of request
*/
createBankTransferAttachmentByFileName(xeroTenantId: string, bankTransferID: string, fileName: string, body: fs.ReadStream, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Creates a history record for a specific bank transfer
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransferID Xero generated unique identifier for a bank transfer
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createBankTransferHistoryRecord(xeroTenantId: string, bankTransferID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates one or many batch payments for invoices
* @param xeroTenantId Xero identifier for Tenant
* @param batchPayments BatchPayments with an array of Payments in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
createBatchPayment(xeroTenantId: string, batchPayments: BatchPayments, summarizeErrors?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: BatchPayments;
}>;
/**
*
* @summary Creates a history record for a specific batch payment
* @param xeroTenantId Xero identifier for Tenant
* @param batchPaymentID Unique identifier for BatchPayment
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createBatchPaymentHistoryRecord(xeroTenantId: string, batchPaymentID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates a new custom payment service for a specific branding theme
* @param xeroTenantId Xero identifier for Tenant
* @param brandingThemeID Unique identifier for a Branding Theme
* @param paymentService PaymentService object in body of request
*/
createBrandingThemePaymentServices(xeroTenantId: string, brandingThemeID: string, paymentService: PaymentService, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: PaymentServices;
}>;
/**
*
* @param xeroTenantId Xero identifier for Tenant
* @param contactID Unique identifier for a Contact
* @param fileName Name of the attachment
* @param body Byte array of file in body of request
*/
createContactAttachmentByFileName(xeroTenantId: string, contactID: string, fileName: string, body: fs.ReadStream, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Creates a contact group
* @param xeroTenantId Xero identifier for Tenant
* @param contactGroups ContactGroups with an array of names in request body
*/
createContactGroup(xeroTenantId: string, contactGroups: ContactGroups, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: ContactGroups;
}>;
/**
*
* @summary Creates contacts to a specific contact group
* @param xeroTenantId Xero identifier for Tenant
* @param contactGroupID Unique identifier for a Contact Group
* @param contacts Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request
*/
createContactGroupContacts(xeroTenantId: string, contactGroupID: string, contacts: Contacts, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Contacts;
}>;
/**
*
* @summary Creates a new history record for a specific contact
* @param xeroTenantId Xero identifier for Tenant
* @param contactID Unique identifier for a Contact
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createContactHistory(xeroTenantId: string, contactID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates multiple contacts (bulk) in a Xero organisation
* @param xeroTenantId Xero identifier for Tenant
* @param contacts Contacts with an array of Contact objects to create in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
createContacts(xeroTenantId: string, contacts: Contacts, summarizeErrors?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Contacts;
}>;
/**
*
* @summary Creates allocation for a specific credit note
* @param xeroTenantId Xero identifier for Tenant
* @param creditNoteID Unique identifier for a Credit Note
* @param allocations Allocations with array of Allocation object in body of request.
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
createCreditNoteAllocation(xeroTenantId: string, creditNoteID: string, allocations: Allocations, summarizeErrors?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Allocations;
}>;
/**
*
* @summary Creates an attachment for a specific credit note
* @param xeroTenantId Xero identifier for Tenant
* @param creditNoteID Unique identifier for a Credit Note
* @param fileName Name of the attachment
* @param body Byte array of file in body of request
* @param includeOnline Allows an attachment to be seen by the end customer within their online invoice
*/
createCreditNoteAttachmentByFileName(xeroTenantId: string, creditNoteID: string, fileName: string, body: fs.ReadStream, includeOnline?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Retrieves history records of a specific credit note
* @param xeroTenantId Xero identifier for Tenant
* @param creditNoteID Unique identifier for a Credit Note
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createCreditNoteHistory(xeroTenantId: string, creditNoteID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates a new credit note
* @param xeroTenantId Xero identifier for Tenant
* @param creditNotes Credit Notes with array of CreditNote object in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
* @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
*/
createCreditNotes(xeroTenantId: string, creditNotes: CreditNotes, summarizeErrors?: boolean, unitdp?: number, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: CreditNotes;
}>;
/**
*
* @summary Create a new currency for a Xero organisation
* @param xeroTenantId Xero identifier for Tenant
* @param currency Currency object in the body of request
*/
createCurrency(xeroTenantId: string, currency: Currency, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Currencies;
}>;
/**
*
* @summary Creates new employees used in Xero payrun
* @param xeroTenantId Xero identifier for Tenant
* @param employees Employees with array of Employee object in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
createEmployees(xeroTenantId: string, employees: Employees, summarizeErrors?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Employees;
}>;
/**
*
* @summary Creates a history record for a specific expense claim
* @param xeroTenantId Xero identifier for Tenant
* @param expenseClaimID Unique identifier for a ExpenseClaim
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createExpenseClaimHistory(xeroTenantId: string, expenseClaimID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates expense claims
* @param xeroTenantId Xero identifier for Tenant
* @param expenseClaims ExpenseClaims with array of ExpenseClaim object in body of request
*/
createExpenseClaims(xeroTenantId: string, expenseClaims: ExpenseClaims, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: ExpenseClaims;
}>;
/**
*
* @summary Creates an attachment for a specific invoice or purchase bill by filename
* @param xeroTenantId Xero identifier for Tenant
* @param invoiceID Unique identifier for an Invoice
* @param fileName Name of the attachment
* @param body Byte array of file in body of request
* @param includeOnline Allows an attachment to be seen by the end customer within their online invoice
*/
createInvoiceAttachmentByFileName(xeroTenantId: string, invoiceID: string, fileName: string, body: fs.ReadStream, includeOnline?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Creates a history record for a specific invoice
* @param xeroTenantId Xero identifier for Tenant
* @param invoiceID Unique identifier for an Invoice
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createInvoiceHistory(xeroTenantId: string, invoiceID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates one or more sales invoices or purchase bills
* @param xeroTenantId Xero identifier for Tenant
* @param invoices Invoices with an array of invoice objects in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
* @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
*/
createInvoices(xeroTenantId: string, invoices: Invoices, summarizeErrors?: boolean, unitdp?: number, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Invoices;
}>;
/**
*
* @summary Creates a history record for a specific item
* @param xeroTenantId Xero identifier for Tenant
* @param itemID Unique identifier for an Item
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createItemHistory(xeroTenantId: string, itemID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates one or more items
* @param xeroTenantId Xero identifier for Tenant
* @param items Items with an array of Item objects in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
* @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
*/
createItems(xeroTenantId: string, items: Items, summarizeErrors?: boolean, unitdp?: number, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Items;
}>;
/**
*
* @summary Creates linked transactions (billable expenses)
* @param xeroTenantId Xero identifier for Tenant
* @param linkedTransaction LinkedTransaction object in body of request
*/
createLinkedTransaction(xeroTenantId: string, linkedTransaction: LinkedTransaction, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: LinkedTransactions;
}>;
/**
*
* @summary Creates a specific attachment for a specific manual journal by file name
* @param xeroTenantId Xero identifier for Tenant
* @param manualJournalID Unique identifier for a ManualJournal
* @param fileName Name of the attachment
* @param body Byte array of file in body of request
*/
createManualJournalAttachmentByFileName(xeroTenantId: string, manualJournalID: string, fileName: string, body: fs.ReadStream, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Creates a history record for a specific manual journal
* @param xeroTenantId Xero identifier for Tenant
* @param manualJournalID Unique identifier for a ManualJournal
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createManualJournalHistoryRecord(xeroTenantId: string, manualJournalID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates one or more manual journals
* @param xeroTenantId Xero identifier for Tenant
* @param manualJournals ManualJournals array with ManualJournal object in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
createManualJournals(xeroTenantId: string, manualJournals: ManualJournals, summarizeErrors?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: ManualJournals;
}>;
/**
*
* @summary Creates a single allocation for a specific overpayment
* @param xeroTenantId Xero identifier for Tenant
* @param overpaymentID Unique identifier for a Overpayment
* @param allocations Allocations array with Allocation object in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
createOverpaymentAllocations(xeroTenantId: string, overpaymentID: string, allocations: Allocations, summarizeErrors?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Allocations;
}>;
/**
*
* @summary Creates a history record for a specific overpayment
* @param xeroTenantId Xero identifier for Tenant
* @param overpaymentID Unique identifier for a Overpayment
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createOverpaymentHistory(xeroTenantId: string, overpaymentID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates a single payment for invoice or credit notes
* @param xeroTenantId Xero identifier for Tenant
* @param payment Request body with a single Payment object
*/
createPayment(xeroTenantId: string, payment: Payment, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Payments;
}>;
/**
*
* @summary Creates a history record for a specific payment
* @param xeroTenantId Xero identifier for Tenant
* @param paymentID Unique identifier for a Payment
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createPaymentHistory(xeroTenantId: string, paymentID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates a payment service
* @param xeroTenantId Xero identifier for Tenant
* @param paymentServices PaymentServices array with PaymentService object in body of request
*/
createPaymentService(xeroTenantId: string, paymentServices: PaymentServices, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: PaymentServices;
}>;
/**
*
* @summary Creates multiple payments for invoices or credit notes
* @param xeroTenantId Xero identifier for Tenant
* @param payments Payments array with Payment object in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
createPayments(xeroTenantId: string, payments: Payments, summarizeErrors?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Payments;
}>;
/**
*
* @summary Allows you to create an Allocation for prepayments
* @param xeroTenantId Xero identifier for Tenant
* @param prepaymentID Unique identifier for a PrePayment
* @param allocations Allocations with an array of Allocation object in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
createPrepaymentAllocations(xeroTenantId: string, prepaymentID: string, allocations: Allocations, summarizeErrors?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Allocations;
}>;
/**
*
* @summary Creates a history record for a specific prepayment
* @param xeroTenantId Xero identifier for Tenant
* @param prepaymentID Unique identifier for a PrePayment
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createPrepaymentHistory(xeroTenantId: string, prepaymentID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates attachment for a specific purchase order
* @param xeroTenantId Xero identifier for Tenant
* @param purchaseOrderID Unique identifier for an Purchase Order
* @param fileName Name of the attachment
* @param body Byte array of file in body of request
*/
createPurchaseOrderAttachmentByFileName(xeroTenantId: string, purchaseOrderID: string, fileName: string, body: fs.ReadStream, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Creates a history record for a specific purchase orders
* @param xeroTenantId Xero identifier for Tenant
* @param purchaseOrderID Unique identifier for an Purchase Order
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createPurchaseOrderHistory(xeroTenantId: string, purchaseOrderID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates one or more purchase orders
* @param xeroTenantId Xero identifier for Tenant
* @param purchaseOrders PurchaseOrders with an array of PurchaseOrder object in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
createPurchaseOrders(xeroTenantId: string, purchaseOrders: PurchaseOrders, summarizeErrors?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: PurchaseOrders;
}>;
/**
*
* @summary Creates attachment for a specific quote
* @param xeroTenantId Xero identifier for Tenant
* @param quoteID Unique identifier for an Quote
* @param fileName Name of the attachment
* @param body Byte array of file in body of request
*/
createQuoteAttachmentByFileName(xeroTenantId: string, quoteID: string, fileName: string, body: fs.ReadStream, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Creates a history record for a specific quote
* @param xeroTenantId Xero identifier for Tenant
* @param quoteID Unique identifier for an Quote
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createQuoteHistory(xeroTenantId: string, quoteID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Create one or more quotes
* @param xeroTenantId Xero identifier for Tenant
* @param quotes Quotes with an array of Quote object in body of request
* @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
*/
createQuotes(xeroTenantId: string, quotes: Quotes, summarizeErrors?: boolean, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Quotes;
}>;
/**
*
* @summary Creates draft expense claim receipts for any user
* @param xeroTenantId Xero identifier for Tenant
* @param receipts Receipts with an array of Receipt object in body of request
* @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
*/
createReceipt(xeroTenantId: string, receipts: Receipts, unitdp?: number, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Receipts;
}>;
/**
*
* @summary Creates an attachment on a specific expense claim receipts by file name
* @param xeroTenantId Xero identifier for Tenant
* @param receiptID Unique identifier for a Receipt
* @param fileName Name of the attachment
* @param body Byte array of file in body of request
*/
createReceiptAttachmentByFileName(xeroTenantId: string, receiptID: string, fileName: string, body: fs.ReadStream, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Creates a history record for a specific receipt
* @param xeroTenantId Xero identifier for Tenant
* @param receiptID Unique identifier for a Receipt
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createReceiptHistory(xeroTenantId: string, receiptID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates an attachment from a specific repeating invoices by file name
* @param xeroTenantId Xero identifier for Tenant
* @param repeatingInvoiceID Unique identifier for a Repeating Invoice
* @param fileName Name of the attachment
* @param body Byte array of file in body of request
*/
createRepeatingInvoiceAttachmentByFileName(xeroTenantId: string, repeatingInvoiceID: string, fileName: string, body: fs.ReadStream, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Creates a history record for a specific repeating invoice
* @param xeroTenantId Xero identifier for Tenant
* @param repeatingInvoiceID Unique identifier for a Repeating Invoice
* @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
*/
createRepeatingInvoiceHistory(xeroTenantId: string, repeatingInvoiceID: string, historyRecords: HistoryRecords, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Creates one or more tax rates
* @param xeroTenantId Xero identifier for Tenant
* @param taxRates TaxRates array with TaxRate object in body of request
*/
createTaxRates(xeroTenantId: string, taxRates: TaxRates, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: TaxRates;
}>;
/**
*
* @summary Create tracking categories
* @param xeroTenantId Xero identifier for Tenant
* @param trackingCategory TrackingCategory object in body of request
*/
createTrackingCategory(xeroTenantId: string, trackingCategory: TrackingCategory, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: TrackingCategories;
}>;
/**
*
* @summary Creates options for a specific tracking category
* @param xeroTenantId Xero identifier for Tenant
* @param trackingCategoryID Unique identifier for a TrackingCategory
* @param trackingOption TrackingOption object in body of request
*/
createTrackingOptions(xeroTenantId: string, trackingCategoryID: string, trackingOption: TrackingOption, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: TrackingOptions;
}>;
/**
*
* @summary Deletes a chart of accounts
* @param xeroTenantId Xero identifier for Tenant
* @param accountID Unique identifier for Account object
*/
deleteAccount(xeroTenantId: string, accountID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Accounts;
}>;
/**
*
* @summary Deletes a specific contact from a contact group using a unique contact Id
* @param xeroTenantId Xero identifier for Tenant
* @param contactGroupID Unique identifier for a Contact Group
* @param contactID Unique identifier for a Contact
*/
deleteContactGroupContact(xeroTenantId: string, contactGroupID: string, contactID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body?: any;
}>;
/**
*
* @summary Deletes all contacts from a specific contact group
* @param xeroTenantId Xero identifier for Tenant
* @param contactGroupID Unique identifier for a Contact Group
*/
deleteContactGroupContacts(xeroTenantId: string, contactGroupID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body?: any;
}>;
/**
*
* @summary Deletes a specific item
* @param xeroTenantId Xero identifier for Tenant
* @param itemID Unique identifier for an Item
*/
deleteItem(xeroTenantId: string, itemID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body?: any;
}>;
/**
*
* @summary Deletes a specific linked transactions (billable expenses)
* @param xeroTenantId Xero identifier for Tenant
* @param linkedTransactionID Unique identifier for a LinkedTransaction
*/
deleteLinkedTransaction(xeroTenantId: string, linkedTransactionID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body?: any;
}>;
/**
*
* @summary Updates a specific payment for invoices and credit notes
* @param xeroTenantId Xero identifier for Tenant
* @param paymentID Unique identifier for a Payment
* @param paymentDelete
*/
deletePayment(xeroTenantId: string, paymentID: string, paymentDelete: PaymentDelete, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Payments;
}>;
/**
*
* @summary Deletes a specific tracking category
* @param xeroTenantId Xero identifier for Tenant
* @param trackingCategoryID Unique identifier for a TrackingCategory
*/
deleteTrackingCategory(xeroTenantId: string, trackingCategoryID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: TrackingCategories;
}>;
/**
*
* @summary Deletes a specific option for a specific tracking category
* @param xeroTenantId Xero identifier for Tenant
* @param trackingCategoryID Unique identifier for a TrackingCategory
* @param trackingOptionID Unique identifier for a Tracking Option
*/
deleteTrackingOptions(xeroTenantId: string, trackingCategoryID: string, trackingOptionID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: TrackingOptions;
}>;
/**
*
* @summary Sends a copy of a specific invoice to related contact via email
* @param xeroTenantId Xero identifier for Tenant
* @param invoiceID Unique identifier for an Invoice
* @param requestEmpty
*/
emailInvoice(xeroTenantId: string, invoiceID: string, requestEmpty: RequestEmpty, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body?: any;
}>;
/**
*
* @summary Retrieves a single chart of accounts by using a unique account Id
* @param xeroTenantId Xero identifier for Tenant
* @param accountID Unique identifier for Account object
*/
getAccount(xeroTenantId: string, accountID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Accounts;
}>;
/**
*
* @summary Retrieves an attachment for a specific account by filename
* @param xeroTenantId Xero identifier for Tenant
* @param accountID Unique identifier for Account object
* @param fileName Name of the attachment
* @param contentType The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
*/
getAccountAttachmentByFileName(xeroTenantId: string, accountID: string, fileName: string, contentType: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Buffer;
}>;
/**
*
* @summary Retrieves a specific attachment from a specific account using a unique attachment Id
* @param xeroTenantId Xero identifier for Tenant
* @param accountID Unique identifier for Account object
* @param attachmentID Unique identifier for Attachment object
* @param contentType The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
*/
getAccountAttachmentById(xeroTenantId: string, accountID: string, attachmentID: string, contentType: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Buffer;
}>;
/**
*
* @summary Retrieves attachments for a specific accounts by using a unique account Id
* @param xeroTenantId Xero identifier for Tenant
* @param accountID Unique identifier for Account object
*/
getAccountAttachments(xeroTenantId: string, accountID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Retrieves the full chart of accounts
* @param xeroTenantId Xero identifier for Tenant
* @param ifModifiedSince Only records created or modified since this timestamp will be returned
* @param where Filter by an any element
* @param order Order by an any element
*/
getAccounts(xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Accounts;
}>;
/**
*
* @summary Retrieves a single spent or received money transaction by using a unique bank transaction Id
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransactionID Xero generated unique identifier for a bank transaction
* @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
*/
getBankTransaction(xeroTenantId: string, bankTransactionID: string, unitdp?: number, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: BankTransactions;
}>;
/**
*
* @summary Retrieves a specific attachment from a specific bank transaction by filename
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransactionID Xero generated unique identifier for a bank transaction
* @param fileName Name of the attachment
* @param contentType The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
*/
getBankTransactionAttachmentByFileName(xeroTenantId: string, bankTransactionID: string, fileName: string, contentType: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Buffer;
}>;
/**
*
* @summary Retrieves specific attachments from a specific BankTransaction using a unique attachment Id
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransactionID Xero generated unique identifier for a bank transaction
* @param attachmentID Unique identifier for Attachment object
* @param contentType The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
*/
getBankTransactionAttachmentById(xeroTenantId: string, bankTransactionID: string, attachmentID: string, contentType: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Buffer;
}>;
/**
*
* @summary Retrieves any attachments from a specific bank transactions
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransactionID Xero generated unique identifier for a bank transaction
*/
getBankTransactionAttachments(xeroTenantId: string, bankTransactionID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Attachments;
}>;
/**
*
* @summary Retrieves any spent or received money transactions
* @param xeroTenantId Xero identifier for Tenant
* @param ifModifiedSince Only records created or modified since this timestamp will be returned
* @param where Filter by an any element
* @param order Order by an any element
* @param page Up to 100 bank transactions will be returned in a single API call with line items details
* @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
*/
getBankTransactions(xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: BankTransactions;
}>;
/**
*
* @summary Retrieves history from a specific bank transaction using a unique bank transaction Id
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransactionID Xero generated unique identifier for a bank transaction
*/
getBankTransactionsHistory(xeroTenantId: string, bankTransactionID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: HistoryRecords;
}>;
/**
*
* @summary Retrieves specific bank transfers by using a unique bank transfer Id
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransferID Xero generated unique identifier for a bank transfer
*/
getBankTransfer(xeroTenantId: string, bankTransferID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: BankTransfers;
}>;
/**
*
* @summary Retrieves a specific attachment on a specific bank transfer by file name
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransferID Xero generated unique identifier for a bank transfer
* @param fileName Name of the attachment
* @param contentType The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
*/
getBankTransferAttachmentByFileName(xeroTenantId: string, bankTransferID: string, fileName: string, contentType: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Buffer;
}>;
/**
*
* @summary Retrieves a specific attachment from a specific bank transfer using a unique attachment ID
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransferID Xero generated unique identifier for a bank transfer
* @param attachmentID Unique identifier for Attachment object
* @param contentType The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
*/
getBankTransferAtt