xero-node
Version:
Xero NodeJS OAuth 2.0 client for xero-node
1,083 lines • 159 kB
TypeScript
/**
* Xero Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 12.0.0
* 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.
*/
import fs = require('fs');
import { Account } from '../model/accounting/account';
import { Accounts } from '../model/accounting/accounts';
import { Actions } from '../model/accounting/actions';
import { Allocation } from '../model/accounting/allocation';
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 { BatchPaymentDelete } from '../model/accounting/batchPaymentDelete';
import { BatchPaymentDeleteByUrlParam } from '../model/accounting/batchPaymentDeleteByUrlParam';
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 { 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 { AxiosResponse } from 'axios';
import { Readable } from "stream";
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createAccount(xeroTenantId: string, account: Account, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createAccountAttachmentByFileName(xeroTenantId: string, accountID: string, fileName: string, body: fs.ReadStream | Readable | Buffer, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createBankTransactionAttachmentByFileName(xeroTenantId: string, bankTransactionID: string, fileName: string, body: fs.ReadStream | Readable | Buffer, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createBankTransactionHistoryRecord(xeroTenantId: string, bankTransactionID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createBankTransactions(xeroTenantId: string, bankTransactions: BankTransactions, summarizeErrors?: boolean, unitdp?: number, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: BankTransactions;
}>;
/**
*
* @summary Creates a bank transfer
* @param xeroTenantId Xero identifier for Tenant
* @param bankTransfers BankTransfers with array of BankTransfer objects in request body
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createBankTransfer(xeroTenantId: string, bankTransfers: BankTransfers, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createBankTransferAttachmentByFileName(xeroTenantId: string, bankTransferID: string, fileName: string, body: fs.ReadStream | Readable | Buffer, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createBankTransferHistoryRecord(xeroTenantId: string, bankTransferID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createBatchPayment(xeroTenantId: string, batchPayments: BatchPayments, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createBatchPaymentHistoryRecord(xeroTenantId: string, batchPaymentID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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 paymentServices PaymentServices array with PaymentService object in body of request
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createBrandingThemePaymentServices(xeroTenantId: string, brandingThemeID: string, paymentServices: PaymentServices, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createContactAttachmentByFileName(xeroTenantId: string, contactID: string, fileName: string, body: fs.ReadStream | Readable | Buffer, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: Attachments;
}>;
/**
*
* @summary Creates a contact group
* @param xeroTenantId Xero identifier for Tenant
* @param contactGroups ContactGroups with an array of names in request body
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createContactGroup(xeroTenantId: string, contactGroups: ContactGroups, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createContactGroupContacts(xeroTenantId: string, contactGroupID: string, contacts: Contacts, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createContactHistory(xeroTenantId: string, contactID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createContacts(xeroTenantId: string, contacts: Contacts, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createCreditNoteAllocation(xeroTenantId: string, creditNoteID: string, allocations: Allocations, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createCreditNoteAttachmentByFileName(xeroTenantId: string, creditNoteID: string, fileName: string, body: fs.ReadStream | Readable | Buffer, includeOnline?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createCreditNoteHistory(xeroTenantId: string, creditNoteID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createCreditNotes(xeroTenantId: string, creditNotes: CreditNotes, summarizeErrors?: boolean, unitdp?: number, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createCurrency(xeroTenantId: string, currency: Currency, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: Currencies;
}>;
/**
* This endpoint is deprecated and will be removed April 28, 2026
* @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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createEmployees(xeroTenantId: string, employees: Employees, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createExpenseClaimHistory(xeroTenantId: string, expenseClaimID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: HistoryRecords;
}>;
/**
*
* @summary Creates expense claims
* @param xeroTenantId Xero identifier for Tenant
* @param expenseClaims ExpenseClaims with array of ExpenseClaim object in body of request
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createExpenseClaims(xeroTenantId: string, expenseClaims: ExpenseClaims, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createInvoiceAttachmentByFileName(xeroTenantId: string, invoiceID: string, fileName: string, body: fs.ReadStream | Readable | Buffer, includeOnline?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createInvoiceHistory(xeroTenantId: string, invoiceID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createInvoices(xeroTenantId: string, invoices: Invoices, summarizeErrors?: boolean, unitdp?: number, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createItemHistory(xeroTenantId: string, itemID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createItems(xeroTenantId: string, items: Items, summarizeErrors?: boolean, unitdp?: number, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: Items;
}>;
/**
*
* @summary Creates linked transactions (billable expenses)
* @param xeroTenantId Xero identifier for Tenant
* @param linkedTransaction LinkedTransaction object in body of request
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createLinkedTransaction(xeroTenantId: string, linkedTransaction: LinkedTransaction, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createManualJournalAttachmentByFileName(xeroTenantId: string, manualJournalID: string, fileName: string, body: fs.ReadStream | Readable | Buffer, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createManualJournalHistoryRecord(xeroTenantId: string, manualJournalID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createManualJournals(xeroTenantId: string, manualJournals: ManualJournals, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createOverpaymentAllocations(xeroTenantId: string, overpaymentID: string, allocations: Allocations, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createOverpaymentHistory(xeroTenantId: string, overpaymentID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createPayment(xeroTenantId: string, payment: Payment, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createPaymentHistory(xeroTenantId: string, paymentID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: HistoryRecords;
}>;
/**
*
* @summary Creates a payment service
* @param xeroTenantId Xero identifier for Tenant
* @param paymentServices PaymentServices array with PaymentService object in body of request
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createPaymentService(xeroTenantId: string, paymentServices: PaymentServices, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createPayments(xeroTenantId: string, payments: Payments, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createPrepaymentAllocations(xeroTenantId: string, prepaymentID: string, allocations: Allocations, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createPrepaymentHistory(xeroTenantId: string, prepaymentID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createPurchaseOrderAttachmentByFileName(xeroTenantId: string, purchaseOrderID: string, fileName: string, body: fs.ReadStream | Readable | Buffer, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createPurchaseOrderHistory(xeroTenantId: string, purchaseOrderID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createPurchaseOrders(xeroTenantId: string, purchaseOrders: PurchaseOrders, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createQuoteAttachmentByFileName(xeroTenantId: string, quoteID: string, fileName: string, body: fs.ReadStream | Readable | Buffer, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createQuoteHistory(xeroTenantId: string, quoteID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createQuotes(xeroTenantId: string, quotes: Quotes, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createReceipt(xeroTenantId: string, receipts: Receipts, unitdp?: number, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createReceiptAttachmentByFileName(xeroTenantId: string, receiptID: string, fileName: string, body: fs.ReadStream | Readable | Buffer, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createReceiptHistory(xeroTenantId: string, receiptID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createRepeatingInvoiceAttachmentByFileName(xeroTenantId: string, repeatingInvoiceID: string, fileName: string, body: fs.ReadStream | Readable | Buffer, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createRepeatingInvoiceHistory(xeroTenantId: string, repeatingInvoiceID: string, historyRecords: HistoryRecords, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: HistoryRecords;
}>;
/**
*
* @summary Creates one or more repeating invoice templates
* @param xeroTenantId Xero identifier for Tenant
* @param repeatingInvoices RepeatingInvoices with an array of repeating 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 idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createRepeatingInvoices(xeroTenantId: string, repeatingInvoices: RepeatingInvoices, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: RepeatingInvoices;
}>;
/**
*
* @summary Creates one or more tax rates
* @param xeroTenantId Xero identifier for Tenant
* @param taxRates TaxRates array with TaxRate object in body of request
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createTaxRates(xeroTenantId: string, taxRates: TaxRates, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: TaxRates;
}>;
/**
*
* @summary Create tracking categories
* @param xeroTenantId Xero identifier for Tenant
* @param trackingCategory TrackingCategory object in body of request
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createTrackingCategory(xeroTenantId: string, trackingCategory: TrackingCategory, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
createTrackingOptions(xeroTenantId: string, trackingCategoryID: string, trackingOption: TrackingOption, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
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: AxiosResponse;
body: Accounts;
}>;
/**
*
* @summary Updates a specific batch payment for invoices and credit notes
* @param xeroTenantId Xero identifier for Tenant
* @param batchPaymentDelete
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
deleteBatchPayment(xeroTenantId: string, batchPaymentDelete: BatchPaymentDelete, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: BatchPayments;
}>;
/**
*
* @summary Updates a specific batch payment for invoices and credit notes
* @param xeroTenantId Xero identifier for Tenant
* @param batchPaymentID Unique identifier for BatchPayment
* @param batchPaymentDeleteByUrlParam
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
*/
deleteBatchPaymentByUrlParam(xeroTenantId: string, batchPaymentID: string, batchPaymentDeleteByUrlParam: BatchPaymentDeleteByUrlParam, idempotencyKey?: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: BatchPayments;
}>;
/**
*
* @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: AxiosResponse;
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: AxiosResponse;
body?: any;
}>;
/**
*
* @summary Deletes an Allocation from a Credit Note
* @param xeroTenantId Xero identifier for Tenant
* @param creditNoteID Unique identifier for a Credit Note
* @param allocationID Unique identifier for Allocation object
*/
deleteCreditNoteAllocations(xeroTenantId: string, creditNoteID: string, allocationID: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: AxiosResponse;
body: Allocation;
}>;
/**
*
* @summary Deletes a specific it