From 6b349642df10c43c27f75160f2aee39f9f9fe8f1 Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Mon, 28 Oct 2024 14:40:03 +0530 Subject: [PATCH] feat: Added the code for binary data type --- docs/accounting/index.html | 1376 ++++++++++++++++++------ docs/appstore/index.html | 9 +- docs/assets/index.html | 38 +- docs/payroll-au/index.html | 31 +- docs/payroll-nz/index.html | 327 +++++- docs/payroll-uk/index.html | 207 +++- docs/projects/index.html | 16 +- src/gen/api/accountingApi.ts | 90 +- src/gen/api/appStoreApi.ts | 2 +- src/gen/api/assetApi.ts | 2 +- src/gen/api/bankfeedsApi.ts | 2 +- src/gen/api/filesApi.ts | 8 +- src/gen/api/financeApi.ts | 2 +- src/gen/api/payrollAUApi.ts | 2 +- src/gen/api/payrollNZApi.ts | 2 +- src/gen/api/payrollUKApi.ts | 2 +- src/gen/api/projectApi.ts | 2 +- src/gen/model/accounting/models.ts | 13 + src/gen/model/appstore/models.ts | 13 + src/gen/model/assets/models.ts | 13 + src/gen/model/bankfeeds/models.ts | 13 + src/gen/model/files/models.ts | 13 + src/gen/model/finance/models.ts | 13 + src/gen/model/payroll-au/models.ts | 13 + src/gen/model/payroll-nz/employee.ts | 8 +- src/gen/model/payroll-nz/employment.ts | 6 +- src/gen/model/payroll-nz/models.ts | 13 + src/gen/model/payroll-uk/employee.ts | 12 +- src/gen/model/payroll-uk/employment.ts | 8 +- src/gen/model/payroll-uk/models.ts | 13 + src/gen/model/projects/models.ts | 13 + 31 files changed, 1804 insertions(+), 478 deletions(-) diff --git a/docs/accounting/index.html b/docs/accounting/index.html index d5196aef..f6d7137c 100644 --- a/docs/accounting/index.html +++ b/docs/accounting/index.html @@ -7205,7 +7205,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Account" }, - "example" : "{ \"Code\":\"123456\", \"Name\":\"Foobar\", \"Type\":\"EXPENSE\", \"Description\":\"Hello World\" }" + "example" : { + "Code" : "123456", + "Name" : "Foobar", + "Type" : "EXPENSE", + "Description" : "Hello World" + } } }, "required" : true @@ -7244,18 +7249,9 @@

Usage and SDK Samples

const accountID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.createAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -7390,7 +7386,7 @@

Parameters

- byte[] + File
@@ -7408,7 +7404,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -7448,18 +7444,9 @@

Usage and SDK Samples

const bankTransactionID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.createBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -7594,7 +7581,7 @@

Parameters

- byte[] + File
@@ -7612,7 +7599,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -7792,7 +7779,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -7959,7 +7950,23 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/BankTransactions" }, - "example" : "{ bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: \"00000000-0000-0000-0000-000000000000\" }, lineItems: [{ description: \"Foobar\", quantity: 1.0, unitAmount: 20.0, accountCode: \"000\" } ], bankAccount: { code: \"000\" }}]}" + "example" : { + "bankTransactions" : [ { + "type" : "BankTransaction.TypeEnum.SPEND", + "contact" : { + "contactID" : "00000000-0000-0000-0000-000000000000" + }, + "lineItems" : [ { + "description" : "Foobar", + "quantity" : 1.0, + "unitAmount" : 20.0, + "accountCode" : "000" + } ], + "bankAccount" : { + "code" : "000" + } + } ] + } } }, "required" : true @@ -8161,7 +8168,50 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/BankTransfers" }, - "example" : "{ \"BankTransfers\": [ { \"FromBankAccount\": { \"Code\": \"090\", \"Name\": \"My Savings\", \"AccountID\": \"00000000-0000-0000-0000-000000000000\", \"Type\": \"BANK\", \"BankAccountNumber\": \"123455\", \"Status\": \"ACTIVE\", \"BankAccountType\": \"BANK\", \"CurrencyCode\": \"USD\", \"TaxType\": \"NONE\", \"EnablePaymentsToAccount\": false, \"ShowInExpenseClaims\": false, \"Class\": \"ASSET\", \"ReportingCode\": \"ASS\", \"ReportingCodeName\": \"Assets\", \"HasAttachments\": false, \"UpdatedDateUTC\": \"2016-10-17T13:45:33.993-07:00\" }, \"ToBankAccount\": { \"Code\": \"088\", \"Name\": \"Business Wells Fargo\", \"AccountID\": \"00000000-0000-0000-0000-000000000000\", \"Type\": \"BANK\", \"BankAccountNumber\": \"123455\", \"Status\": \"ACTIVE\", \"BankAccountType\": \"BANK\", \"CurrencyCode\": \"USD\", \"TaxType\": \"NONE\", \"EnablePaymentsToAccount\": false, \"ShowInExpenseClaims\": false, \"Class\": \"ASSET\", \"ReportingCode\": \"ASS\", \"ReportingCodeName\": \"Assets\", \"HasAttachments\": false, \"UpdatedDateUTC\": \"2016-06-03T08:31:14.517-07:00\" }, \"Amount\": \"50.00\", \"FromIsReconciled\": true, \"ToIsReconciled\": true, \"Reference\": \"Sub 098801\" } ] }" + "example" : { + "BankTransfers" : [ { + "FromBankAccount" : { + "Code" : "090", + "Name" : "My Savings", + "AccountID" : "00000000-0000-0000-0000-000000000000", + "Type" : "BANK", + "BankAccountNumber" : "123455", + "Status" : "ACTIVE", + "BankAccountType" : "BANK", + "CurrencyCode" : "USD", + "TaxType" : "NONE", + "EnablePaymentsToAccount" : false, + "ShowInExpenseClaims" : false, + "Class" : "ASSET", + "ReportingCode" : "ASS", + "ReportingCodeName" : "Assets", + "HasAttachments" : false, + "UpdatedDateUTC" : "2016-10-17T13:45:33.993-07:00" + }, + "ToBankAccount" : { + "Code" : "088", + "Name" : "Business Wells Fargo", + "AccountID" : "00000000-0000-0000-0000-000000000000", + "Type" : "BANK", + "BankAccountNumber" : "123455", + "Status" : "ACTIVE", + "BankAccountType" : "BANK", + "CurrencyCode" : "USD", + "TaxType" : "NONE", + "EnablePaymentsToAccount" : false, + "ShowInExpenseClaims" : false, + "Class" : "ASSET", + "ReportingCode" : "ASS", + "ReportingCodeName" : "Assets", + "HasAttachments" : false, + "UpdatedDateUTC" : "2016-06-03T08:31:14.517-07:00" + }, + "Amount" : "50.00", + "FromIsReconciled" : true, + "ToIsReconciled" : true, + "Reference" : "Sub 098801" + } ] + } } }, "required" : true @@ -8200,18 +8250,9 @@

Usage and SDK Samples

const bankTransferID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.createBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -8346,7 +8387,7 @@

Parameters

- byte[] + File
@@ -8364,7 +8405,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -8544,7 +8585,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -8715,7 +8760,28 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/BatchPayments" }, - "example" : "{ \"BatchPayments\": [ { \"Account\": { \"AccountID\": \"00000000-0000-0000-0000-000000000000\" }, \"Reference\": \"ref\", \"Date\": \"2018-08-01\", \"Payments\": [ { \"Account\": { \"Code\": \"001\" }, \"Date\": \"2019-12-31\", \"Amount\": 500, \"Invoice\": { \"InvoiceID\": \"00000000-0000-0000-0000-000000000000\", \"LineItems\": [], \"Contact\": {}, \"Type\": \"ACCPAY\" } } ] } ] }" + "example" : { + "BatchPayments" : [ { + "Account" : { + "AccountID" : "00000000-0000-0000-0000-000000000000" + }, + "Reference" : "ref", + "Date" : "2018-08-01", + "Payments" : [ { + "Account" : { + "Code" : "001" + }, + "Date" : "2019-12-31", + "Amount" : 500, + "Invoice" : { + "InvoiceID" : "00000000-0000-0000-0000-000000000000", + "LineItems" : [ ], + "Contact" : { }, + "Type" : "ACCPAY" + } + } ] + } ] + } } }, "required" : true @@ -8921,7 +8987,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -9103,7 +9173,15 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PaymentServices" }, - "example" : "{ \"PaymentServices\": [ { \"PaymentServiceID\": \"54b3b4f6-0443-4fba-bcd1-61ec0c35ca55\", \"PaymentServiceName\": \"PayUpNow\", \"PaymentServiceUrl\": \"https://www.payupnow.com/\", \"PaymentServiceType\": \"Custom\", \"PayNowText\": \"Time To Pay\" } ] }" + "example" : { + "PaymentServices" : [ { + "PaymentServiceID" : "54b3b4f6-0443-4fba-bcd1-61ec0c35ca55", + "PaymentServiceName" : "PayUpNow", + "PaymentServiceUrl" : "https://www.payupnow.com/", + "PaymentServiceType" : "Custom", + "PayNowText" : "Time To Pay" + } ] + } } }, "required" : true @@ -9142,18 +9220,9 @@

Usage and SDK Samples

const contactID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.createContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -9288,7 +9357,7 @@

Parameters

- byte[] + File
@@ -9306,7 +9375,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -9452,7 +9521,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/ContactGroups" }, - "example" : "{ \"ContactGroups\": [{ \"Name\": \"VIPs\" }]}" + "example" : { + "ContactGroups" : [ { + "Name" : "VIPs" + } ] + } } }, "required" : true @@ -9631,7 +9704,13 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Contacts" }, - "example" : "{ \"Contacts\": [ { \"ContactID\": \"a3675fc4-f8dd-4f03-ba5b-f1870566bcd7\" }, { \"ContactID\": \"4e1753b9-018a-4775-b6aa-1bc7871cfee3\" } ] }" + "example" : { + "Contacts" : [ { + "ContactID" : "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7" + }, { + "ContactID" : "4e1753b9-018a-4775-b6aa-1bc7871cfee3" + } ] + } } }, "required" : true @@ -9810,7 +9889,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -9965,7 +10048,66 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Contacts" }, - "example" : "{ \"Contacts\": [ { \"ContactID\": \"3ff6d40c-af9a-40a3-89ce-3c1556a25591\", \"ContactStatus\": \"ACTIVE\", \"Name\": \"Foo9987\", \"EmailAddress\": \"sid32476@blah.com\", \"BankAccountDetails\": \"\", \"Addresses\": [ { \"AddressType\": \"STREET\", \"City\": \"\", \"Region\": \"\", \"PostalCode\": \"\", \"Country\": \"\" }, { \"AddressType\": \"POBOX\", \"City\": \"\", \"Region\": \"\", \"PostalCode\": \"\", \"Country\": \"\" } ], \"Phones\": [ { \"PhoneType\": \"DEFAULT\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"DDI\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"FAX\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"MOBILE\", \"PhoneNumber\": \"555-1212\", \"PhoneAreaCode\": \"415\", \"PhoneCountryCode\": \"\" } ], \"UpdatedDateUTC\": \"/Date(1551399321043+0000)/\", \"ContactGroups\": [], \"IsSupplier\": false, \"IsCustomer\": false, \"SalesTrackingCategories\": [], \"PurchasesTrackingCategories\": [], \"PaymentTerms\": { \"Bills\": { \"Day\": 15, \"Type\": \"OFCURRENTMONTH\" }, \"Sales\": { \"Day\": 10, \"Type\": \"DAYSAFTERBILLMONTH\" } }, \"ContactPersons\": [] } ] }" + "example" : { + "Contacts" : [ { + "ContactID" : "3ff6d40c-af9a-40a3-89ce-3c1556a25591", + "ContactStatus" : "ACTIVE", + "Name" : "Foo9987", + "EmailAddress" : "sid32476@blah.com", + "BankAccountDetails" : "", + "Addresses" : [ { + "AddressType" : "STREET", + "City" : "", + "Region" : "", + "PostalCode" : "", + "Country" : "" + }, { + "AddressType" : "POBOX", + "City" : "", + "Region" : "", + "PostalCode" : "", + "Country" : "" + } ], + "Phones" : [ { + "PhoneType" : "DEFAULT", + "PhoneNumber" : "", + "PhoneAreaCode" : "", + "PhoneCountryCode" : "" + }, { + "PhoneType" : "DDI", + "PhoneNumber" : "", + "PhoneAreaCode" : "", + "PhoneCountryCode" : "" + }, { + "PhoneType" : "FAX", + "PhoneNumber" : "", + "PhoneAreaCode" : "", + "PhoneCountryCode" : "" + }, { + "PhoneType" : "MOBILE", + "PhoneNumber" : "555-1212", + "PhoneAreaCode" : "415", + "PhoneCountryCode" : "" + } ], + "UpdatedDateUTC" : "/Date(1551399321043+0000)/", + "ContactGroups" : [ ], + "IsSupplier" : false, + "IsCustomer" : false, + "SalesTrackingCategories" : [ ], + "PurchasesTrackingCategories" : [ ], + "PaymentTerms" : { + "Bills" : { + "Day" : 15, + "Type" : "OFCURRENTMONTH" + }, + "Sales" : { + "Day" : 10, + "Type" : "DAYSAFTERBILLMONTH" + } + }, + "ContactPersons" : [ ] + } ] + } } }, "required" : true @@ -10179,7 +10321,16 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Allocations" }, - "example" : "{ \"Allocations\": [ { \"Invoice\": { \"LineItems\": [], \"InvoiceID\": \"c45720a1-ade3-4a38-a064-d15489be6841\" }, \"Amount\": 1, \"Date\": \"2019-03-05\" } ] }" + "example" : { + "Allocations" : [ { + "Invoice" : { + "LineItems" : [ ], + "InvoiceID" : "c45720a1-ade3-4a38-a064-d15489be6841" + }, + "Amount" : 1, + "Date" : "2019-03-05" + } ] + } } }, "required" : true @@ -10246,18 +10397,9 @@

Usage and SDK Samples

const fileName = 'xero-dev.jpg'; const includeOnline = true; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.createCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, includeOnline,idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, includeOnline,idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -10392,7 +10534,7 @@

Parameters

- byte[] + File
@@ -10410,7 +10552,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -10617,7 +10759,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -10781,7 +10927,21 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/CreditNotes" }, - "example" : "{ \"CreditNotes\":[ { \"Type\":\"ACCPAYCREDIT\", \"Contact\":{ \"ContactID\":\"430fa14a-f945-44d3-9f97-5df5e28441b8\" }, \"Date\":\"2019-01-05\", \"LineItems\":[ { \"Description\":\"Foobar\", \"Quantity\":2.0, \"UnitAmount\":20.0, \"AccountCode\":\"400\" } ] } ] }" + "example" : { + "CreditNotes" : [ { + "Type" : "ACCPAYCREDIT", + "Contact" : { + "ContactID" : "430fa14a-f945-44d3-9f97-5df5e28441b8" + }, + "Date" : "2019-01-05", + "LineItems" : [ { + "Description" : "Foobar", + "Quantity" : 2.0, + "UnitAmount" : 20.0, + "AccountCode" : "400" + } ] + } ] + } } }, "required" : true @@ -10970,7 +11130,10 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Currency" }, - "example" : "{ \"Code\": \"USD\", \"Description\": \"United States Dollar\" }" + "example" : { + "Code" : "USD", + "Description" : "United States Dollar" + } } }, "required" : true @@ -11117,7 +11280,15 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Employees" }, - "example" : "{ \"Employees\": [ { \"FirstName\": \"Nick\", \"LastName\": \"Fury\", \"ExternalLink\": { \"Url\": \"http://twitter.com/#!/search/Nick+Fury\" } } ] }" + "example" : { + "Employees" : [ { + "FirstName" : "Nick", + "LastName" : "Fury", + "ExternalLink" : { + "Url" : "http://twitter.com/#!/search/Nick+Fury" + } + } ] + } } }, "required" : true @@ -11323,7 +11494,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -11482,7 +11657,18 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/ExpenseClaims" }, - "example" : "{ \"ExpenseClaims\": [ { \"Status\": \"SUBMITTED\", \"User\": { \"UserID\": \"d1164823-0ac1-41ad-987b-b4e30fe0b273\" }, \"Receipts\": [ { \"Lineitems\": [], \"ReceiptID\": \"dc1c7f6d-0a4c-402f-acac-551d62ce5816\" } ] } ] }" + "example" : { + "ExpenseClaims" : [ { + "Status" : "SUBMITTED", + "User" : { + "UserID" : "d1164823-0ac1-41ad-987b-b4e30fe0b273" + }, + "Receipts" : [ { + "Lineitems" : [ ], + "ReceiptID" : "dc1c7f6d-0a4c-402f-acac-551d62ce5816" + } ] + } ] + } } }, "required" : true @@ -11522,18 +11708,9 @@

Usage and SDK Samples

const fileName = 'xero-dev.jpg'; const includeOnline = true; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.createInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, includeOnline,idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, includeOnline,idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -11668,7 +11845,7 @@

Parameters

- byte[] + File
@@ -11686,7 +11863,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -11893,7 +12070,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -12069,7 +12250,26 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Invoices" }, - "example" : "{ \"Invoices\": [ { \"Type\": \"ACCREC\", \"Contact\": { \"ContactID\": \"430fa14a-f945-44d3-9f97-5df5e28441b8\" }, \"LineItems\": [ { \"Description\": \"Acme Tires\", \"Quantity\": 2, \"UnitAmount\": 20, \"AccountCode\": \"200\", \"TaxType\": \"NONE\", \"LineAmount\": 40 } ], \"Date\": \"2019-03-11\", \"DueDate\": \"2018-12-10\", \"Reference\": \"Website Design\", \"Status\": \"AUTHORISED\" } ] }" + "example" : { + "Invoices" : [ { + "Type" : "ACCREC", + "Contact" : { + "ContactID" : "430fa14a-f945-44d3-9f97-5df5e28441b8" + }, + "LineItems" : [ { + "Description" : "Acme Tires", + "Quantity" : 2, + "UnitAmount" : 20, + "AccountCode" : "200", + "TaxType" : "NONE", + "LineAmount" : 40 + } ], + "Date" : "2019-03-11", + "DueDate" : "2018-12-10", + "Reference" : "Website Design", + "Status" : "AUTHORISED" + } ] + } } }, "required" : true @@ -12295,7 +12495,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -12450,7 +12654,17 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Items" }, - "example" : "{ \"Items\": [ { \"Code\": \"code123\", \"Name\": \"Item Name XYZ\", \"Description\": \"Foobar\", \"InventoryAssetAccountCode\": \"140\", \"PurchaseDetails\": { \"COGSAccountCode\": \"500\" } } ] }" + "example" : { + "Items" : [ { + "Code" : "code123", + "Name" : "Item Name XYZ", + "Description" : "Foobar", + "InventoryAssetAccountCode" : "140", + "PurchaseDetails" : { + "COGSAccountCode" : "500" + } + } ] + } } }, "required" : true @@ -12639,7 +12853,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/LinkedTransaction" }, - "example" : "{ \"LinkedTransactions\": [ { \"SourceTransactionID\": \"a848644a-f20f-4630-98c3-386bd7505631\", \"SourceLineItemID\": \"b0df260d-3cc8-4ced-9bd6-41924f624ed3\" } ] }" + "example" : { + "LinkedTransactions" : [ { + "SourceTransactionID" : "a848644a-f20f-4630-98c3-386bd7505631", + "SourceLineItemID" : "b0df260d-3cc8-4ced-9bd6-41924f624ed3" + } ] + } } }, "required" : true @@ -12678,18 +12897,9 @@

Usage and SDK Samples

const manualJournalID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.createManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -12824,7 +13034,7 @@

Parameters

- byte[] + File
@@ -12842,7 +13052,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -13022,7 +13232,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -13186,7 +13400,25 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/ManualJournals" }, - "example" : "{ \"ManualJournals\": [ { \"Narration\": \"Journal Desc\", \"JournalLines\": [ { \"LineAmount\": 100, \"AccountCode\": \"400\", \"Description\": \"Money Movement\" }, { \"LineAmount\": -100, \"AccountCode\": \"400\", \"Description\": \"Prepayment of things\", \"Tracking\": [ { \"Name\": \"North\", \"Option\": \"Region\" } ] } ], \"Date\": \"2019-03-14\" } ] }" + "example" : { + "ManualJournals" : [ { + "Narration" : "Journal Desc", + "JournalLines" : [ { + "LineAmount" : 100, + "AccountCode" : "400", + "Description" : "Money Movement" + }, { + "LineAmount" : -100, + "AccountCode" : "400", + "Description" : "Prepayment of things", + "Tracking" : [ { + "Name" : "North", + "Option" : "Region" + } ] + } ], + "Date" : "2019-03-14" + } ] + } } }, "required" : true @@ -13400,7 +13632,18 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Allocations" }, - "example" : "{ \"Allocations\": [ { \"Invoice\": { \"InvoiceID\": \"00000000-0000-0000-0000-000000000000\", \"LineItems\": [], \"Contact\": {}, \"Type\": \"ACCPAY\" }, \"Amount\": 10.00, \"Date\": \"2019-03-12\" } ] }" + "example" : { + "Allocations" : [ { + "Invoice" : { + "InvoiceID" : "00000000-0000-0000-0000-000000000000", + "LineItems" : [ ], + "Contact" : { }, + "Type" : "ACCPAY" + }, + "Amount" : 10.0, + "Date" : "2019-03-12" + } ] + } } }, "required" : true @@ -13606,7 +13849,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -13763,7 +14010,19 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Payment" }, - "example" : "{ \"Payments\": [ { \"Invoice\": { \"LineItems\": [], \"InvoiceID\": \"00000000-0000-0000-0000-000000000000\" }, \"Account\": { \"Code\": \"970\" }, \"Date\": \"2019-03-12\", \"Amount\": 1 } ] }" + "example" : { + "Payments" : [ { + "Invoice" : { + "LineItems" : [ ], + "InvoiceID" : "00000000-0000-0000-0000-000000000000" + }, + "Account" : { + "Code" : "970" + }, + "Date" : "2019-03-12", + "Amount" : 1 + } ] + } } }, "required" : true @@ -13942,7 +14201,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -14089,7 +14352,13 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PaymentServices" }, - "example" : "{ \"PaymentServices\": [ { \"PaymentServiceName\": \"PayUpNow\", \"PaymentServiceUrl\": \"https://www.payupnow.com/\", \"PayNowText\": \"Time To Pay\" } ] }" + "example" : { + "PaymentServices" : [ { + "PaymentServiceName" : "PayUpNow", + "PaymentServiceUrl" : "https://www.payupnow.com/", + "PayNowText" : "Time To Pay" + } ] + } } }, "required" : true @@ -14247,7 +14516,19 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Payments" }, - "example" : "{ \"Payments\": [ { \"Invoice\": { \"LineItems\": [], \"InvoiceID\": \"00000000-0000-0000-0000-000000000000\" }, \"Account\": { \"Code\": \"970\" }, \"Date\": \"2019-03-12\", \"Amount\": 1 } ] }" + "example" : { + "Payments" : [ { + "Invoice" : { + "LineItems" : [ ], + "InvoiceID" : "00000000-0000-0000-0000-000000000000" + }, + "Account" : { + "Code" : "970" + }, + "Date" : "2019-03-12", + "Amount" : 1 + } ] + } } }, "required" : true @@ -14461,7 +14742,16 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Allocations" }, - "example" : "{ \"Allocations\": [ { \"Invoice\": { \"LineItems\": [], \"InvoiceID\": \"00000000-0000-0000-0000-000000000000\" }, \"Amount\": 1, \"Date\": \"2019-01-10\" } ] }" + "example" : { + "Allocations" : [ { + "Invoice" : { + "LineItems" : [ ], + "InvoiceID" : "00000000-0000-0000-0000-000000000000" + }, + "Amount" : 1, + "Date" : "2019-01-10" + } ] + } } }, "required" : true @@ -14667,7 +14957,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -14706,18 +15000,9 @@

Usage and SDK Samples

const purchaseOrderID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.createPurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createPurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -14852,7 +15137,7 @@

Parameters

- byte[] + File
@@ -14870,7 +15155,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -15050,7 +15335,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -15212,7 +15501,20 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PurchaseOrders" }, - "example" : "{ \"PurchaseOrders\": [ { \"Contact\": { \"ContactID\": \"00000000-0000-0000-0000-000000000000\" }, \"LineItems\": [ { \"Description\": \"Foobar\", \"Quantity\": 1, \"UnitAmount\": 20, \"AccountCode\": \"710\" } ], \"Date\": \"2019-03-13\" } ] }" + "example" : { + "PurchaseOrders" : [ { + "Contact" : { + "ContactID" : "00000000-0000-0000-0000-000000000000" + }, + "LineItems" : [ { + "Description" : "Foobar", + "Quantity" : 1, + "UnitAmount" : 20, + "AccountCode" : "710" + } ], + "Date" : "2019-03-13" + } ] + } } }, "required" : true @@ -15278,18 +15580,9 @@

Usage and SDK Samples

const quoteID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -15424,7 +15717,7 @@

Parameters

- byte[] + File
@@ -15442,7 +15735,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -15622,7 +15915,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -15784,7 +16081,20 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Quotes" }, - "example" : "{ \"Quotes\": [ { \"Contact\": { \"ContactID\": \"00000000-0000-0000-0000-000000000000\" }, \"LineItems\": [ { \"Description\": \"Foobar\", \"Quantity\": 1, \"UnitAmount\": 20, \"AccountCode\": \"12775\" } ], \"Date\": \"2020-02-01\" } ] }" + "example" : { + "Quotes" : [ { + "Contact" : { + "ContactID" : "00000000-0000-0000-0000-000000000000" + }, + "LineItems" : [ { + "Description" : "Foobar", + "Quantity" : 1, + "UnitAmount" : 20, + "AccountCode" : "12775" + } ], + "Date" : "2020-02-01" + } ] + } } }, "required" : true @@ -15978,7 +16288,26 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Receipts" }, - "example" : "{ \"Receipts\": [ { \"Contact\": { \"ContactID\": \"00000000-0000-0000-0000-000000000000\" }, \"Lineitems\": [ { \"Description\": \"Foobar\", \"Quantity\": 2, \"UnitAmount\": 20, \"AccountCode\": \"400\", \"TaxType\": \"NONE\", \"LineAmount\": 40 } ], \"User\": { \"UserID\": \"00000000-0000-0000-0000-000000000000\" }, \"LineAmountTypes\": \"NoTax\", \"Status\": \"DRAFT\" } ] }" + "example" : { + "Receipts" : [ { + "Contact" : { + "ContactID" : "00000000-0000-0000-0000-000000000000" + }, + "Lineitems" : [ { + "Description" : "Foobar", + "Quantity" : 2, + "UnitAmount" : 20, + "AccountCode" : "400", + "TaxType" : "NONE", + "LineAmount" : 40 + } ], + "User" : { + "UserID" : "00000000-0000-0000-0000-000000000000" + }, + "LineAmountTypes" : "NoTax", + "Status" : "DRAFT" + } ] + } } }, "required" : true @@ -16044,18 +16373,9 @@

Usage and SDK Samples

const receiptID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -16190,7 +16510,7 @@

Parameters

- byte[] + File
@@ -16208,7 +16528,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -16388,7 +16708,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -16427,18 +16751,9 @@

Usage and SDK Samples

const repeatingInvoiceID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -16573,7 +16888,7 @@

Parameters

- byte[] + File
@@ -16591,7 +16906,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -16771,7 +17086,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -16909,7 +17228,42 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/RepeatingInvoices" }, - "example" : "{ \"RepeatingInvoices\": [ { \"Schedule\": { \"Period\": 1, \"Unit\": \"MONTHLY\", \"DueDate\": 10, \"DueDateType\": \"OFFOLLOWINGMONTH\", \"StartDate\": \"\\/Date(1555286400000+0000)\\/\" }, \"Type\": \"ACCREC\", \"Reference\": \"[Week]\", \"ApprovedForSending\": false, \"SendCopy\": false, \"MarkAsSent\": false, \"IncludePDF\": false, \"Contact\": { \"ContactID\": \"430fa14a-f945-44d3-9f97-5df5e28441b8\", \"Name\": \"Liam Gallagher\" }, \"Status\": \"AUTHORISED\", \"LineAmountTypes\": \"Exclusive\", \"LineItems\": [ { \"Description\": \"Guitars Fender Strat\", \"UnitAmount\": 5000.00, \"TaxType\": \"OUTPUT2\", \"TaxAmount\": 750.00, \"LineAmount\": 5000.00, \"AccountCode\": \"200\", \"Tracking\": [], \"Quantity\": 1.0000, \"LineItemID\": \"13a8353c-d2af-4d5b-920c-438449f08900\", \"DiscountEnteredAsPercent\": true } ], \"CurrencyCode\": \"NZD\" } ] }" + "example" : { + "RepeatingInvoices" : [ { + "Schedule" : { + "Period" : 1, + "Unit" : "MONTHLY", + "DueDate" : 10, + "DueDateType" : "OFFOLLOWINGMONTH", + "StartDate" : "/Date(1555286400000+0000)/" + }, + "Type" : "ACCREC", + "Reference" : "[Week]", + "ApprovedForSending" : false, + "SendCopy" : false, + "MarkAsSent" : false, + "IncludePDF" : false, + "Contact" : { + "ContactID" : "430fa14a-f945-44d3-9f97-5df5e28441b8", + "Name" : "Liam Gallagher" + }, + "Status" : "AUTHORISED", + "LineAmountTypes" : "Exclusive", + "LineItems" : [ { + "Description" : "Guitars Fender Strat", + "UnitAmount" : 5000.0, + "TaxType" : "OUTPUT2", + "TaxAmount" : 750.0, + "LineAmount" : 5000.0, + "AccountCode" : "200", + "Tracking" : [ ], + "Quantity" : 1.0, + "LineItemID" : "13a8353c-d2af-4d5b-920c-438449f08900", + "DiscountEnteredAsPercent" : true + } ], + "CurrencyCode" : "NZD" + } ] + } } }, "required" : true @@ -17088,7 +17442,15 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TaxRates" }, - "example" : "{ \"TaxRates\": [ { \"Name\": \"CA State Tax\", \"TaxComponents\": [ { \"Name\": \"State Tax\", \"Rate\": 2.25 } ] } ] }" + "example" : { + "TaxRates" : [ { + "Name" : "CA State Tax", + "TaxComponents" : [ { + "Name" : "State Tax", + "Rate" : 2.25 + } ] + } ] + } } }, "required" : true @@ -17229,7 +17591,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TrackingCategory" }, - "example" : "{ name: \"FooBar\" }" + "example" : { + "name" : "FooBar" + } } }, "required" : true @@ -17404,7 +17768,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TrackingOption" }, - "example" : "{ name: \" Bar\" }" + "example" : { + "name" : " Bar" + } } }, "required" : true @@ -17659,7 +18025,10 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/BatchPaymentDelete" }, - "example" : "{ \"BatchPaymentID\": \"9bf296e9-0748-4d29-a3dc-24dde1098030\", \"Status\":\"DELETED\" }" + "example" : { + "BatchPaymentID" : "9bf296e9-0748-4d29-a3dc-24dde1098030", + "Status" : "DELETED" + } } }, "required" : true @@ -17829,7 +18198,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/BatchPaymentDeleteByUrlParam" }, - "example" : "{ \"Status\":\"DELETED\" }" + "example" : { + "Status" : "DELETED" + } } }, "required" : true @@ -18762,7 +19133,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PaymentDelete" }, - "example" : "{ \"Payments\":[ { \"Status\":\"DELETED\" } ] }" + "example" : { + "Payments" : [ { + "Status" : "DELETED" + } ] + } } }, "required" : true @@ -19327,7 +19702,7 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/RequestEmpty" }, - "example" : "{}" + "example" : { } } }, "required" : true @@ -38076,7 +38451,33 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Setup" }, - "example" : "{ \"ConversionDate\": {}, \"ConversionBalances\": [], \"Accounts\": [ { \"Code\": \"200\", \"Name\": \"Sales\", \"Type\": \"SALES\", \"ReportingCode\": \"REV.TRA.GOO\" }, { \"Code\": \"400\", \"Name\": \"Advertising\", \"Type\": \"OVERHEADS\", \"ReportingCode\": \"EXP\" }, { \"Code\": \"610\", \"Name\": \"Accounts Receivable\", \"Type\": \"CURRENT\", \"SystemAccount\": \"DEBTORS\", \"ReportingCode\": \"ASS.CUR.REC.TRA\" }, { \"Code\": \"800\", \"Name\": \"Accounts Payable\", \"Type\": \"CURRLIAB\", \"SystemAccount\": \"CREDITORS\", \"ReportingCode\": \"LIA.CUR.PAY\" } ] }" + "example" : { + "ConversionDate" : { }, + "ConversionBalances" : [ ], + "Accounts" : [ { + "Code" : "200", + "Name" : "Sales", + "Type" : "SALES", + "ReportingCode" : "REV.TRA.GOO" + }, { + "Code" : "400", + "Name" : "Advertising", + "Type" : "OVERHEADS", + "ReportingCode" : "EXP" + }, { + "Code" : "610", + "Name" : "Accounts Receivable", + "Type" : "CURRENT", + "SystemAccount" : "DEBTORS", + "ReportingCode" : "ASS.CUR.REC.TRA" + }, { + "Code" : "800", + "Name" : "Accounts Payable", + "Type" : "CURRLIAB", + "SystemAccount" : "CREDITORS", + "ReportingCode" : "LIA.CUR.PAY" + } ] + } } }, "required" : true @@ -38259,7 +38660,22 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Accounts" }, - "example" : "{ \"Accounts\":[ { \"Code\":\"123456\", \"Name\":\"BarFoo\", \"AccountID\":\"99ce6032-0678-4aa0-8148-240c75fee33a\", \"Type\":\"EXPENSE\", \"Description\":\"GoodBye World\", \"TaxType\":\"INPUT\", \"EnablePaymentsToAccount\":false, \"ShowInExpenseClaims\":false, \"Class\":\"EXPENSE\", \"ReportingCode\":\"EXP\", \"ReportingCodeName\":\"Expense\", \"UpdatedDateUTC\":\"2019-02-21T16:29:47.96-08:00\" } ] }" + "example" : { + "Accounts" : [ { + "Code" : "123456", + "Name" : "BarFoo", + "AccountID" : "99ce6032-0678-4aa0-8148-240c75fee33a", + "Type" : "EXPENSE", + "Description" : "GoodBye World", + "TaxType" : "INPUT", + "EnablePaymentsToAccount" : false, + "ShowInExpenseClaims" : false, + "Class" : "EXPENSE", + "ReportingCode" : "EXP", + "ReportingCodeName" : "Expense", + "UpdatedDateUTC" : "2019-02-21T16:29:47.96-08:00" + } ] + } } }, "required" : true @@ -38298,18 +38714,9 @@

Usage and SDK Samples

const accountID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -38444,7 +38851,7 @@

Parameters

- byte[] + File
@@ -38462,7 +38869,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -38663,7 +39070,77 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/BankTransactions" }, - "example" : "{ \"BankTransactions\": [ { \"Type\": \"SPEND\", \"Contact\": { \"ContactID\": \"00000000-0000-0000-0000-000000000000\", \"ContactStatus\": \"ACTIVE\", \"Name\": \"Buzz Lightyear\", \"FirstName\": \"Buzz\", \"LastName\": \"Lightyear\", \"EmailAddress\": \"buzz.Lightyear@email.com\", \"ContactPersons\": [], \"BankAccountDetails\": \"\", \"Addresses\": [ { \"AddressType\": \"STREET\", \"City\": \"\", \"Region\": \"\", \"PostalCode\": \"\", \"Country\": \"\" }, { \"AddressType\": \"POBOX\", \"AddressLine1\": \"\", \"AddressLine2\": \"\", \"AddressLine3\": \"\", \"AddressLine4\": \"\", \"City\": \"Palo Alto\", \"Region\": \"CA\", \"PostalCode\": \"94020\", \"Country\": \"United States\" } ], \"Phones\": [ { \"PhoneType\": \"DEFAULT\", \"PhoneNumber\": \"847-1294\", \"PhoneAreaCode\": \"(626)\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"DDI\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"FAX\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"MOBILE\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" } ], \"UpdatedDateUTC\": \"2017-08-21T13:49:04.227-07:00\", \"ContactGroups\": [] }, \"Lineitems\": [], \"BankAccount\": { \"Code\": \"088\", \"Name\": \"Business Wells Fargo\", \"AccountID\": \"00000000-0000-0000-0000-000000000000\" }, \"IsReconciled\": false, \"Date\": \"2019-02-25\", \"Reference\": \"You just updated\", \"CurrencyCode\": \"USD\", \"CurrencyRate\": 1, \"Status\": \"AUTHORISED\", \"LineAmountTypes\": \"Inclusive\", \"TotalTax\": 1.74, \"BankTransactionID\": \"00000000-0000-0000-0000-000000000000\", \"UpdatedDateUTC\": \"2019-02-26T12:39:27.813-08:00\" } ] }" + "example" : { + "BankTransactions" : [ { + "Type" : "SPEND", + "Contact" : { + "ContactID" : "00000000-0000-0000-0000-000000000000", + "ContactStatus" : "ACTIVE", + "Name" : "Buzz Lightyear", + "FirstName" : "Buzz", + "LastName" : "Lightyear", + "EmailAddress" : "buzz.Lightyear@email.com", + "ContactPersons" : [ ], + "BankAccountDetails" : "", + "Addresses" : [ { + "AddressType" : "STREET", + "City" : "", + "Region" : "", + "PostalCode" : "", + "Country" : "" + }, { + "AddressType" : "POBOX", + "AddressLine1" : "", + "AddressLine2" : "", + "AddressLine3" : "", + "AddressLine4" : "", + "City" : "Palo Alto", + "Region" : "CA", + "PostalCode" : "94020", + "Country" : "United States" + } ], + "Phones" : [ { + "PhoneType" : "DEFAULT", + "PhoneNumber" : "847-1294", + "PhoneAreaCode" : "(626)", + "PhoneCountryCode" : "" + }, { + "PhoneType" : "DDI", + "PhoneNumber" : "", + "PhoneAreaCode" : "", + "PhoneCountryCode" : "" + }, { + "PhoneType" : "FAX", + "PhoneNumber" : "", + "PhoneAreaCode" : "", + "PhoneCountryCode" : "" + }, { + "PhoneType" : "MOBILE", + "PhoneNumber" : "", + "PhoneAreaCode" : "", + "PhoneCountryCode" : "" + } ], + "UpdatedDateUTC" : "2017-08-21T13:49:04.227-07:00", + "ContactGroups" : [ ] + }, + "Lineitems" : [ ], + "BankAccount" : { + "Code" : "088", + "Name" : "Business Wells Fargo", + "AccountID" : "00000000-0000-0000-0000-000000000000" + }, + "IsReconciled" : false, + "Date" : "2019-02-25", + "Reference" : "You just updated", + "CurrencyCode" : "USD", + "CurrencyRate" : 1, + "Status" : "AUTHORISED", + "LineAmountTypes" : "Inclusive", + "TotalTax" : 1.74, + "BankTransactionID" : "00000000-0000-0000-0000-000000000000", + "UpdatedDateUTC" : "2019-02-26T12:39:27.813-08:00" + } ] + } } }, "required" : true @@ -38729,18 +39206,9 @@

Usage and SDK Samples

const bankTransactionID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -38875,7 +39343,7 @@

Parameters

- byte[] + File
@@ -38893,7 +39361,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -38933,18 +39401,9 @@

Usage and SDK Samples

const bankTransferID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -39079,7 +39538,7 @@

Parameters

- byte[] + File
@@ -39097,7 +39556,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -39278,7 +39737,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Contacts" }, - "example" : "{ \"Contacts\": [{ \"ContactID\": \"00000000-0000-0000-0000-000000000000\", \"Name\": \"Thanos\" }]}" + "example" : { + "Contacts" : [ { + "ContactID" : "00000000-0000-0000-0000-000000000000", + "Name" : "Thanos" + } ] + } } }, "required" : true @@ -39317,18 +39781,9 @@

Usage and SDK Samples

const contactID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -39463,7 +39918,7 @@

Parameters

- byte[] + File
@@ -39481,7 +39936,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -39661,7 +40116,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/ContactGroups" }, - "example" : "{ \"ContactGroups\":[ { \"Name\":\"Suppliers\" } ] }" + "example" : { + "ContactGroups" : [ { + "Name" : "Suppliers" + } ] + } } }, "required" : true @@ -39860,7 +40319,24 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/CreditNotes" }, - "example" : "{ \"CreditNotes\": [ { \"Type\": \"ACCPAYCREDIT\", \"Contact\": { \"ContactID\": \"430fa14a-f945-44d3-9f97-5df5e28441b8\" }, \"Date\": \"2019-01-05\", \"Status\": \"AUTHORISED\", \"Reference\": \"HelloWorld\", \"SentToContact\": true, \"LineItems\": [ { \"Description\": \"Foobar\", \"Quantity\": 2, \"UnitAmount\": 20, \"AccountCode\": \"400\" } ] } ] }" + "example" : { + "CreditNotes" : [ { + "Type" : "ACCPAYCREDIT", + "Contact" : { + "ContactID" : "430fa14a-f945-44d3-9f97-5df5e28441b8" + }, + "Date" : "2019-01-05", + "Status" : "AUTHORISED", + "Reference" : "HelloWorld", + "SentToContact" : true, + "LineItems" : [ { + "Description" : "Foobar", + "Quantity" : 2, + "UnitAmount" : 20, + "AccountCode" : "400" + } ] + } ] + } } }, "required" : true @@ -39926,18 +40402,9 @@

Usage and SDK Samples

const creditNoteID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -40072,7 +40539,7 @@

Parameters

- byte[] + File
@@ -40090,7 +40557,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -40283,7 +40750,18 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/ExpenseClaims" }, - "example" : "{ \"ExpenseClaims\": [ { \"Status\": \"SUBMITTED\", \"User\": { \"UserID\": \"d1164823-0ac1-41ad-987b-b4e30fe0b273\" }, \"Receipts\": [ { \"Lineitems\": [], \"ReceiptID\": \"dc1c7f6d-0a4c-402f-acac-551d62ce5816\" } ] } ] }" + "example" : { + "ExpenseClaims" : [ { + "Status" : "SUBMITTED", + "User" : { + "UserID" : "d1164823-0ac1-41ad-987b-b4e30fe0b273" + }, + "Receipts" : [ { + "Lineitems" : [ ], + "ReceiptID" : "dc1c7f6d-0a4c-402f-acac-551d62ce5816" + } ] + } ] + } } }, "required" : true @@ -40462,7 +40940,15 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Invoices" }, - "example" : "{ \"Invoices\": [{ Reference: \"May the force be with you\", \"InvoiceID\": \"00000000-0000-0000-0000-000000000000\", \"LineItems\": [], \"Contact\": {}, \"Type\": \"ACCPAY\" }]}" + "example" : { + "Invoices" : [ { + "Reference" : "May the force be with you", + "InvoiceID" : "00000000-0000-0000-0000-000000000000", + "LineItems" : [ ], + "Contact" : { }, + "Type" : "ACCPAY" + } ] + } } }, "required" : true @@ -40528,18 +41014,9 @@

Usage and SDK Samples

const invoiceID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -40674,7 +41151,7 @@

Parameters

- byte[] + File
@@ -40692,7 +41169,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -40873,7 +41350,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Items" }, - "example" : "{ \"Items\": [ { \"Code\": \"ItemCode123\", \"Description\": \"Description 123\" } ] }" + "example" : { + "Items" : [ { + "Code" : "ItemCode123", + "Description" : "Description 123" + } ] + } } }, "required" : true @@ -41079,7 +41561,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/LinkedTransactions" }, - "example" : "{ \"LinkedTransactions\": [ { \"SourceTransactionID\": \"00000000-0000-0000-0000-000000000000\", \"SourceLineItemID\": \"00000000-0000-0000-0000-000000000000\" } ] }" + "example" : { + "LinkedTransactions" : [ { + "SourceTransactionID" : "00000000-0000-0000-0000-000000000000", + "SourceLineItemID" : "00000000-0000-0000-0000-000000000000" + } ] + } } }, "required" : true @@ -41275,7 +41762,13 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/ManualJournals" }, - "example" : "{ \"ManualJournals\": [ { \"Narration\": \"Hello Xero\", \"ManualJournalID\": \"00000000-0000-0000-0000-000000000000\", \"JournalLines\": [] } ] }" + "example" : { + "ManualJournals" : [ { + "Narration" : "Hello Xero", + "ManualJournalID" : "00000000-0000-0000-0000-000000000000", + "JournalLines" : [ ] + } ] + } } }, "required" : true @@ -41314,18 +41807,9 @@

Usage and SDK Samples

const manualJournalID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -41460,7 +41944,7 @@

Parameters

- byte[] + File
@@ -41478,7 +41962,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -41645,7 +42129,23 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/BankTransactions" }, - "example" : "{ \"BankTransactions\": [ { \"Type\": \"SPEND\", \"Contact\": { \"ContactID\": \"00000000-0000-0000-0000-000000000000\" }, \"Lineitems\": [ { \"Description\": \"Foobar\", \"Quantity\": 1, \"UnitAmount\": 20, \"AccountCode\": \"400\" } ], \"BankAccount\": { \"Code\": \"088\" } } ] }" + "example" : { + "BankTransactions" : [ { + "Type" : "SPEND", + "Contact" : { + "ContactID" : "00000000-0000-0000-0000-000000000000" + }, + "Lineitems" : [ { + "Description" : "Foobar", + "Quantity" : 1, + "UnitAmount" : 20, + "AccountCode" : "400" + } ], + "BankAccount" : { + "Code" : "088" + } + } ] + } } }, "required" : true @@ -41846,7 +42346,27 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Contacts" }, - "example" : "{ \"Contacts\": [ { \"Name\": \"Bruce Banner\", \"EmailAddress\": \"hulk@avengers.com\", \"Phones\": [ { \"PhoneType\": \"MOBILE\", \"PhoneNumber\": \"555-1212\", \"PhoneAreaCode\": \"415\" } ], \"PaymentTerms\": { \"Bills\": { \"Day\": 15, \"Type\": \"OFCURRENTMONTH\" }, \"Sales\": { \"Day\": 10, \"Type\": \"DAYSAFTERBILLMONTH\" } } } ] }" + "example" : { + "Contacts" : [ { + "Name" : "Bruce Banner", + "EmailAddress" : "hulk@avengers.com", + "Phones" : [ { + "PhoneType" : "MOBILE", + "PhoneNumber" : "555-1212", + "PhoneAreaCode" : "415" + } ], + "PaymentTerms" : { + "Bills" : { + "Day" : 15, + "Type" : "OFCURRENTMONTH" + }, + "Sales" : { + "Day" : 10, + "Type" : "DAYSAFTERBILLMONTH" + } + } + } ] + } } }, "required" : true @@ -42037,7 +42557,23 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/CreditNotes" }, - "example" : "{ \"CreditNotes\":[ { \"Type\":\"ACCPAYCREDIT\", \"Contact\":{ \"ContactID\":\"430fa14a-f945-44d3-9f97-5df5e28441b8\" }, \"Date\":\"2019-01-05\", \"Status\":\"AUTHORISED\", \"Reference\": \"HelloWorld\", \"LineItems\":[ { \"Description\":\"Foobar\", \"Quantity\":2.0, \"UnitAmount\":20.0, \"AccountCode\":\"400\" } ] } ] }" + "example" : { + "CreditNotes" : [ { + "Type" : "ACCPAYCREDIT", + "Contact" : { + "ContactID" : "430fa14a-f945-44d3-9f97-5df5e28441b8" + }, + "Date" : "2019-01-05", + "Status" : "AUTHORISED", + "Reference" : "HelloWorld", + "LineItems" : [ { + "Description" : "Foobar", + "Quantity" : 2.0, + "UnitAmount" : 20.0, + "AccountCode" : "400" + } ] + } ] + } } }, "required" : true @@ -42231,7 +42767,15 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Employees" }, - "example" : "{ \"Employees\": [ { \"FirstName\": \"Nick\", \"LastName\": \"Fury\", \"ExternalLink\": { \"Url\": \"http://twitter.com/#!/search/Nick+Fury\" } } ] }" + "example" : { + "Employees" : [ { + "FirstName" : "Nick", + "LastName" : "Fury", + "ExternalLink" : { + "Url" : "http://twitter.com/#!/search/Nick+Fury" + } + } ] + } } }, "required" : true @@ -42425,7 +42969,26 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Invoices" }, - "example" : "{ \"Invoices\": [ { \"Type\": \"ACCREC\", \"Contact\": { \"ContactID\": \"430fa14a-f945-44d3-9f97-5df5e28441b8\" }, \"LineItems\": [ { \"Description\": \"Acme Tires\", \"Quantity\": 2, \"UnitAmount\": 20, \"AccountCode\": \"200\", \"TaxType\": \"NONE\", \"LineAmount\": 40 } ], \"Date\": \"2019-03-11\", \"DueDate\": \"2018-12-10\", \"Reference\": \"Website Design\", \"Status\": \"AUTHORISED\" } ] }" + "example" : { + "Invoices" : [ { + "Type" : "ACCREC", + "Contact" : { + "ContactID" : "430fa14a-f945-44d3-9f97-5df5e28441b8" + }, + "LineItems" : [ { + "Description" : "Acme Tires", + "Quantity" : 2, + "UnitAmount" : 20, + "AccountCode" : "200", + "TaxType" : "NONE", + "LineAmount" : 40 + } ], + "Date" : "2019-03-11", + "DueDate" : "2018-12-10", + "Reference" : "Website Design", + "Status" : "AUTHORISED" + } ] + } } }, "required" : true @@ -42620,7 +43183,13 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Items" }, - "example" : "{ \"Items\": [ { \"Code\": \"ItemCode123\", \"Name\": \"ItemName XYZ\", \"Description\": \"Item Description ABC\" } ] }" + "example" : { + "Items" : [ { + "Code" : "ItemCode123", + "Name" : "ItemName XYZ", + "Description" : "Item Description ABC" + } ] + } } }, "required" : true @@ -42831,7 +43400,25 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/ManualJournals" }, - "example" : "{ \"ManualJournals\": [ { \"Narration\": \"Journal Desc\", \"JournalLines\": [ { \"LineAmount\": 100, \"AccountCode\": \"400\", \"Description\": \"Money Movement\" }, { \"LineAmount\": -100, \"AccountCode\": \"400\", \"Description\": \"Prepayment of things\", \"Tracking\": [ { \"Name\": \"North\", \"Option\": \"Region\" } ] } ], \"Date\": \"2019-03-14\" } ] }" + "example" : { + "ManualJournals" : [ { + "Narration" : "Journal Desc", + "JournalLines" : [ { + "LineAmount" : 100, + "AccountCode" : "400", + "Description" : "Money Movement" + }, { + "LineAmount" : -100, + "AccountCode" : "400", + "Description" : "Prepayment of things", + "Tracking" : [ { + "Name" : "North", + "Option" : "Region" + } ] + } ], + "Date" : "2019-03-14" + } ] + } } }, "required" : true @@ -43019,7 +43606,20 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PurchaseOrders" }, - "example" : "{ \"PurchaseOrders\": [ { \"Contact\": { \"ContactID\": \"00000000-0000-0000-0000-000000000000\" }, \"LineItems\": [ { \"Description\": \"Foobar\", \"Quantity\": 1, \"UnitAmount\": 20, \"AccountCode\": \"710\" } ], \"Date\": \"2019-03-13\" } ] }" + "example" : { + "PurchaseOrders" : [ { + "Contact" : { + "ContactID" : "00000000-0000-0000-0000-000000000000" + }, + "LineItems" : [ { + "Description" : "Foobar", + "Quantity" : 1, + "UnitAmount" : 20, + "AccountCode" : "710" + } ], + "Date" : "2019-03-13" + } ] + } } }, "required" : true @@ -43207,7 +43807,20 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Quotes" }, - "example" : "{ \"Quotes\": [ { \"Contact\": { \"ContactID\": \"00000000-0000-0000-0000-000000000000\" }, \"LineItems\": [ { \"Description\": \"Foobar\", \"Quantity\": 1, \"UnitAmount\": 20, \"AccountCode\": \"12775\" } ], \"Date\": \"2020-02-01\" } ] }" + "example" : { + "Quotes" : [ { + "Contact" : { + "ContactID" : "00000000-0000-0000-0000-000000000000" + }, + "LineItems" : [ { + "Description" : "Foobar", + "Quantity" : 1, + "UnitAmount" : 20, + "AccountCode" : "12775" + } ], + "Date" : "2020-02-01" + } ] + } } }, "required" : true @@ -43372,7 +43985,42 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/RepeatingInvoices" }, - "example" : "{ \"RepeatingInvoices\": [ { \"Schedule\": { \"Period\": 1, \"Unit\": \"MONTHLY\", \"DueDate\": 10, \"DueDateType\": \"OFFOLLOWINGMONTH\", \"StartDate\": \"\\/Date(1555286400000+0000)\\/\" }, \"Type\": \"ACCREC\", \"Reference\": \"[Week]\", \"ApprovedForSending\": false, \"SendCopy\": false, \"MarkAsSent\": false, \"IncludePDF\": false, \"Contact\": { \"ContactID\": \"430fa14a-f945-44d3-9f97-5df5e28441b8\", \"Name\": \"Liam Gallagher\" }, \"Status\": \"AUTHORISED\", \"LineAmountTypes\": \"Exclusive\", \"LineItems\": [ { \"Description\": \"Guitars Fender Strat\", \"UnitAmount\": 5000.00, \"TaxType\": \"OUTPUT2\", \"TaxAmount\": 750.00, \"LineAmount\": 5000.00, \"AccountCode\": \"200\", \"Tracking\": [], \"Quantity\": 1.0000, \"LineItemID\": \"13a8353c-d2af-4d5b-920c-438449f08900\", \"DiscountEnteredAsPercent\": true } ], \"CurrencyCode\": \"NZD\" } ] }" + "example" : { + "RepeatingInvoices" : [ { + "Schedule" : { + "Period" : 1, + "Unit" : "MONTHLY", + "DueDate" : 10, + "DueDateType" : "OFFOLLOWINGMONTH", + "StartDate" : "/Date(1555286400000+0000)/" + }, + "Type" : "ACCREC", + "Reference" : "[Week]", + "ApprovedForSending" : false, + "SendCopy" : false, + "MarkAsSent" : false, + "IncludePDF" : false, + "Contact" : { + "ContactID" : "430fa14a-f945-44d3-9f97-5df5e28441b8", + "Name" : "Liam Gallagher" + }, + "Status" : "AUTHORISED", + "LineAmountTypes" : "Exclusive", + "LineItems" : [ { + "Description" : "Guitars Fender Strat", + "UnitAmount" : 5000.0, + "TaxType" : "OUTPUT2", + "TaxAmount" : 750.0, + "LineAmount" : 5000.0, + "AccountCode" : "200", + "Tracking" : [ ], + "Quantity" : 1.0, + "LineItemID" : "13a8353c-d2af-4d5b-920c-438449f08900", + "DiscountEnteredAsPercent" : true + } ], + "CurrencyCode" : "NZD" + } ] + } } }, "required" : true @@ -43577,7 +44225,13 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PurchaseOrders" }, - "example" : "{ \"PurchaseOrders\": [ { \"AttentionTo\": \"Peter Parker\", \"LineItems\": [], \"Contact\": {} } ] }" + "example" : { + "PurchaseOrders" : [ { + "AttentionTo" : "Peter Parker", + "LineItems" : [ ], + "Contact" : { } + } ] + } } }, "required" : true @@ -43616,18 +44270,9 @@

Usage and SDK Samples

const purchaseOrderID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.updatePurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updatePurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -43762,7 +44407,7 @@

Parameters

- byte[] + File
@@ -43780,7 +44425,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -43966,7 +44611,15 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Quotes" }, - "example" : "{ \"Quotes\": [ { \"Reference\": \"I am an update\", \"Contact\": { \"ContactID\": \"00000000-0000-0000-0000-000000000000\" }, \"Date\": \"2020-02-01\" } ] }" + "example" : { + "Quotes" : [ { + "Reference" : "I am an update", + "Contact" : { + "ContactID" : "00000000-0000-0000-0000-000000000000" + }, + "Date" : "2020-02-01" + } ] + } } }, "required" : true @@ -44005,18 +44658,9 @@

Usage and SDK Samples

const quoteID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.updateQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -44151,7 +44795,7 @@

Parameters

- byte[] + File
@@ -44169,7 +44813,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -44356,7 +45000,15 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Receipts" }, - "example" : "{ \"Receipts\": [ { \"Lineitems\": [], \"User\": { \"UserID\": \"00000000-0000-0000-0000-000000000000\" }, \"Reference\": \"Foobar\" } ] }" + "example" : { + "Receipts" : [ { + "Lineitems" : [ ], + "User" : { + "UserID" : "00000000-0000-0000-0000-000000000000" + }, + "Reference" : "Foobar" + } ] + } } }, "required" : true @@ -44422,18 +45074,9 @@

Usage and SDK Samples

const receiptID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.updateReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -44568,7 +45211,7 @@

Parameters

- byte[] + File
@@ -44586,7 +45229,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -44757,7 +45400,53 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/RepeatingInvoices" }, - "example" : "{ \"Schedule\": { \"Period\": 1, \"Unit\": \"MONTHLY\", \"DueDate\": 10, \"DueDateType\": \"OFFOLLOWINGMONTH\", \"StartDate\": \"\\/Date(1555286400000+0000)\\/\", \"EndDate\": \"\\/Date(1569801600000+0000)\\/\", \"NextScheduledDate\": \"\\/Date(1555286400000+0000)\\/\" }, \"RepeatingInvoiceID\": \"428c0d75-909f-4b04-8403-a48dc27283b0\", \"Type\": \"ACCREC\", \"Reference\": \"[Week]\", \"HasAttachments\": true, \"ApprovedForSending\": false, \"SendCopy\": false, \"MarkAsSent\": false, \"IncludePDF\": false, \"ID\": \"428c0d75-909f-4b04-8403-a48dc27283b0\", \"Contact\": { \"ContactID\": \"430fa14a-f945-44d3-9f97-5df5e28441b8\", \"Name\": \"Liam Gallagher\", \"Addresses\": [], \"Phones\": [], \"ContactGroups\": [], \"ContactPersons\": [], \"HasValidationErrors\": false }, \"Status\": \"DELETED\", \"LineAmountTypes\": \"Exclusive\", \"LineItems\": [ { \"Description\": \"Guitars Fender Strat\", \"UnitAmount\": 5000.00, \"TaxType\": \"OUTPUT2\", \"TaxAmount\": 750.00, \"LineAmount\": 5000.00, \"AccountCode\": \"200\", \"Tracking\": [], \"Quantity\": 1.0000, \"LineItemID\": \"13a8353c-d2af-4d5b-920c-438449f08900\", \"DiscountEnteredAsPercent\": true } ], \"SubTotal\": 5000.00, \"TotalTax\": 750.00, \"Total\": 5750.00, \"CurrencyCode\": \"NZD\" }" + "example" : { + "Schedule" : { + "Period" : 1, + "Unit" : "MONTHLY", + "DueDate" : 10, + "DueDateType" : "OFFOLLOWINGMONTH", + "StartDate" : "/Date(1555286400000+0000)/", + "EndDate" : "/Date(1569801600000+0000)/", + "NextScheduledDate" : "/Date(1555286400000+0000)/" + }, + "RepeatingInvoiceID" : "428c0d75-909f-4b04-8403-a48dc27283b0", + "Type" : "ACCREC", + "Reference" : "[Week]", + "HasAttachments" : true, + "ApprovedForSending" : false, + "SendCopy" : false, + "MarkAsSent" : false, + "IncludePDF" : false, + "ID" : "428c0d75-909f-4b04-8403-a48dc27283b0", + "Contact" : { + "ContactID" : "430fa14a-f945-44d3-9f97-5df5e28441b8", + "Name" : "Liam Gallagher", + "Addresses" : [ ], + "Phones" : [ ], + "ContactGroups" : [ ], + "ContactPersons" : [ ], + "HasValidationErrors" : false + }, + "Status" : "DELETED", + "LineAmountTypes" : "Exclusive", + "LineItems" : [ { + "Description" : "Guitars Fender Strat", + "UnitAmount" : 5000.0, + "TaxType" : "OUTPUT2", + "TaxAmount" : 750.0, + "LineAmount" : 5000.0, + "AccountCode" : "200", + "Tracking" : [ ], + "Quantity" : 1.0, + "LineItemID" : "13a8353c-d2af-4d5b-920c-438449f08900", + "DiscountEnteredAsPercent" : true + } ], + "SubTotal" : 5000.0, + "TotalTax" : 750.0, + "Total" : 5750.0, + "CurrencyCode" : "NZD" + } } }, "required" : true @@ -44796,18 +45485,9 @@

Usage and SDK Samples

const repeatingInvoiceID = '00000000-0000-0000-0000-000000000000'; const fileName = 'xero-dev.jpg'; const idempotencyKey = 'KEY_VALUE'; -const path = require("path"); -const mime = require("mime-types"); -const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response = await xero.accountingApi.updateRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, idempotencyKey, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, idempotencyKey); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -44942,7 +45622,7 @@

Parameters

- byte[] + File
@@ -44960,7 +45640,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -45112,7 +45792,17 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TaxRates" }, - "example" : "{ \"TaxRates\": [ { \"Name\": \"State Tax NY\", \"TaxComponents\": [ { \"Name\": \"State Tax\", \"Rate\": 2.25 } ], \"Status\": \"DELETED\", \"ReportTaxType\": \"INPUT\" } ] }" + "example" : { + "TaxRates" : [ { + "Name" : "State Tax NY", + "TaxComponents" : [ { + "Name" : "State Tax", + "Rate" : 2.25 + } ], + "Status" : "DELETED", + "ReportTaxType" : "INPUT" + } ] + } } }, "required" : true @@ -45286,7 +45976,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TrackingCategory" }, - "example" : "{ \"Name\": \"Avengers\" }" + "example" : { + "Name" : "Avengers" + } } }, "required" : true @@ -45487,7 +46179,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TrackingOption" }, - "example" : "{ name: \"Vision\" }" + "example" : { + "name" : "Vision" + } } }, "required" : true diff --git a/docs/appstore/index.html b/docs/appstore/index.html index 91b318e9..8dbe6d7a 100644 --- a/docs/appstore/index.html +++ b/docs/appstore/index.html @@ -1602,7 +1602,10 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/CreateUsageRecord" }, - "example" : "{ \"timestamp\": \"2022-01-21T13:01:00\", \"quantity\": 10 }" + "example" : { + "timestamp" : "2022-01-21T13:01:00", + "quantity" : 10 + } } }, "required" : true @@ -1803,7 +1806,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/UpdateUsageRecord" }, - "example" : "{ \"quantity\": 10 }" + "example" : { + "quantity" : 10 + } } }, "required" : true diff --git a/docs/assets/index.html b/docs/assets/index.html index 344058b1..27d2ed99 100644 --- a/docs/assets/index.html +++ b/docs/assets/index.html @@ -1030,7 +1030,6 @@ }; defs["BookDepreciationDetail"] = { "title" : "", - "required" : [ "name" ], "properties" : { "currentCapitalGain" : { "type" : "number", @@ -1084,7 +1083,6 @@ }; defs["BookDepreciationSetting"] = { "title" : "", - "required" : [ "name" ], "properties" : { "depreciationMethod" : { "type" : "string", @@ -1564,7 +1562,28 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Asset" }, - "example" : "{ \"assetName\":\"Computer74863\", \"assetNumber\":\"123477544\", \"purchaseDate\":\"2020-01-01\", \"purchasePrice\":100.0, \"disposalPrice\":23.23, \"assetStatus\":\"Draft\", \"bookDepreciationSetting\":{ \"depreciationMethod\":\"StraightLine\", \"averagingMethod\":\"ActualDays\", \"depreciationRate\":0.5, \"depreciationCalculationMethod\":\"None\" }, \"bookDepreciationDetail\":{ \"currentCapitalGain\":5.32, \"currentGainLoss\":3.88, \"depreciationStartDate\":\"2020-01-02\", \"costLimit\":100.0, \"currentAccumDepreciationAmount\":2.25 }, \"AccountingBookValue\":99.5 }" + "example" : { + "assetName" : "Computer74863", + "assetNumber" : "123477544", + "purchaseDate" : "2020-01-01", + "purchasePrice" : 100.0, + "disposalPrice" : 23.23, + "assetStatus" : "Draft", + "bookDepreciationSetting" : { + "depreciationMethod" : "StraightLine", + "averagingMethod" : "ActualDays", + "depreciationRate" : 0.5, + "depreciationCalculationMethod" : "None" + }, + "bookDepreciationDetail" : { + "currentCapitalGain" : 5.32, + "currentGainLoss" : 3.88, + "depreciationStartDate" : "2020-01-02", + "costLimit" : 100.0, + "currentAccumDepreciationAmount" : 2.25 + }, + "AccountingBookValue" : 99.5 + } } }, "required" : true @@ -1716,7 +1735,18 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/AssetType" }, - "example" : "{ \"assetTypeName\":\"Machinery11004\", \"fixedAssetAccountId\":\"3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82\", \"depreciationExpenseAccountId\":\"d1602f69-f900-4616-8d34-90af393fa368\", \"accumulatedDepreciationAccountId\":\"9195cadd-8645-41e6-9f67-7bcd421defe8\", \"bookDepreciationSetting\":{ \"depreciationMethod\":\"DiminishingValue100\", \"averagingMethod\":\"ActualDays\", \"depreciationRate\":0.05, \"depreciationCalculationMethod\":\"None\" } }" + "example" : { + "assetTypeName" : "Machinery11004", + "fixedAssetAccountId" : "3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82", + "depreciationExpenseAccountId" : "d1602f69-f900-4616-8d34-90af393fa368", + "accumulatedDepreciationAccountId" : "9195cadd-8645-41e6-9f67-7bcd421defe8", + "bookDepreciationSetting" : { + "depreciationMethod" : "DiminishingValue100", + "averagingMethod" : "ActualDays", + "depreciationRate" : 0.05, + "depreciationCalculationMethod" : "None" + } + } } }, "required" : true diff --git a/docs/payroll-au/index.html b/docs/payroll-au/index.html index 2e0283fc..d5f5a004 100644 --- a/docs/payroll-au/index.html +++ b/docs/payroll-au/index.html @@ -4134,7 +4134,25 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PayItem" }, - "example" : "{ \"EarningsRates\": [ { \"Name\": \"MyRate\", \"AccountCode\": \"400\", \"TypeOfUnits\": \"4.00\", \"IsExemptFromTax\": true, \"IsExemptFromSuper\": true, \"IsReportableAsW1\": false, \"AllowanceContributesToAnnualLeaveRate\": false, \"AllowanceContributesToOvertimeRate\": false, \"EarningsType\": \"ORDINARYTIMEEARNINGS\", \"EarningsRateID\": \"1fa4e226-b711-46ba-a8a7-4344c9c5fb87\", \"RateType\": \"MULTIPLE\", \"RatePerUnit\": \"10.0\", \"Multiplier\": 1.5, \"Amount\": 5, \"EmploymentTerminationPaymentType\": \"O\" } ] }" + "example" : { + "EarningsRates" : [ { + "Name" : "MyRate", + "AccountCode" : "400", + "TypeOfUnits" : "4.00", + "IsExemptFromTax" : true, + "IsExemptFromSuper" : true, + "IsReportableAsW1" : false, + "AllowanceContributesToAnnualLeaveRate" : false, + "AllowanceContributesToOvertimeRate" : false, + "EarningsType" : "ORDINARYTIMEEARNINGS", + "EarningsRateID" : "1fa4e226-b711-46ba-a8a7-4344c9c5fb87", + "RateType" : "MULTIPLE", + "RatePerUnit" : "10.0", + "Multiplier" : 1.5, + "Amount" : 5, + "EmploymentTerminationPaymentType" : "O" + } ] + } } }, "required" : true @@ -8055,7 +8073,16 @@

Parameters

"$ref" : "#/components/schemas/PayslipLines" } }, - "example" : "{ \"Payslip\": { \"EmployeeID\": \"cdfb8371-0b21-4b8a-8903-1024df6c391e\", \"DeductionLines\": [ { \"DeductionTypeID\": \"727af5e8-b347-4ae7-85fc-9b82266d0aec\", \"CalculationType\": \"FIXEDAMOUNT\", \"NumberOfUnits\": 10 } ] } }" + "example" : { + "Payslip" : { + "EmployeeID" : "cdfb8371-0b21-4b8a-8903-1024df6c391e", + "DeductionLines" : [ { + "DeductionTypeID" : "727af5e8-b347-4ae7-85fc-9b82266d0aec", + "CalculationType" : "FIXEDAMOUNT", + "NumberOfUnits" : 10 + } ] + } + } } }, "required" : true diff --git a/docs/payroll-nz/index.html b/docs/payroll-nz/index.html index 2011dbce..fb7c6d55 100644 --- a/docs/payroll-nz/index.html +++ b/docs/payroll-nz/index.html @@ -1048,7 +1048,7 @@ }; defs["Deduction"] = { "title" : "", - "required" : [ "calculationType", "deductionCategory", "deductionName", "liabilityAccountId" ], + "required" : [ "deductionCategory", "deductionName", "liabilityAccountId" ], "type" : "object", "properties" : { "deductionId" : { @@ -1422,7 +1422,7 @@ }; defs["Employee"] = { "title" : "", - "required" : [ "Address", "DateOfBirth", "FirstName", "LastName" ], + "required" : [ "address", "dateOfBirth", "firstName", "lastName" ], "type" : "object", "properties" : { "employeeID" : { @@ -2428,7 +2428,7 @@ }; defs["Employment"] = { "title" : "", - "required" : [ "EngagementType", "PayrollCalendarID", "StartDate" ], + "required" : [ "engagementType", "payrollCalendarID", "startDate" ], "type" : "object", "properties" : { "payrollCalendarID" : { @@ -4534,7 +4534,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Deduction" }, - "example" : "{ \"deductionName\": \"My new deduction\", \"deductionCategory\": \"NzOther\", \"liabilityAccountId\": \"568f2e9a-0870-46cc-8678-f83f132ed4e3\" }" + "example" : { + "deductionName" : "My new deduction", + "deductionCategory" : "NzOther", + "liabilityAccountId" : "568f2e9a-0870-46cc-8678-f83f132ed4e3" + } } }, "required" : true @@ -4676,7 +4680,13 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EarningsRate" }, - "example" : "{ \"name\": \"My Earnings Rate\", \"earningsType\": \"RegularEarnings\", \"rateType\": \"RatePerUnit\", \"typeOfUnits\": \"hours\", \"expenseAccountID\": \"e4eb36f6-97e3-4427-a394-dd4e1b355c2e\" }" + "example" : { + "name" : "My Earnings Rate", + "earningsType" : "RegularEarnings", + "rateType" : "RatePerUnit", + "typeOfUnits" : "hours", + "expenseAccountID" : "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" + } } }, "required" : true @@ -4827,7 +4837,20 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Employee" }, - "example" : "{ \"title\": \"Mr\", \"firstName\": \"Mike\", \"lastName\": \"Johntzxzpxhmkgson\", \"dateOfBirth\": \"2000-01-01\", \"address\": { \"addressLine1\": \"101 Green St\", \"city\": \"San Francisco\", \"postCode\": \"4351\", \"countryName\": \"United Kingdom\" }, \"email\": \"83139@starkindustries.com\", \"gender\": \"M\" }" + "example" : { + "title" : "Mr", + "firstName" : "Mike", + "lastName" : "Johntzxzpxhmkgson", + "dateOfBirth" : "2000-01-01", + "address" : { + "addressLine1" : "101 Green St", + "city" : "San Francisco", + "postCode" : "4351", + "countryName" : "United Kingdom" + }, + "email" : "83139@starkindustries.com", + "gender" : "M" + } } }, "required" : true @@ -5008,7 +5031,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EarningsTemplate" }, - "example" : "{ \"ratePerUnit\": 20, \"numberOfUnits\": 8, \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"name\": \"My New One\" }" + "example" : { + "ratePerUnit" : 20, + "numberOfUnits" : 8, + "earningsRateID" : "f9d8f5b5-9049-47f4-8541-35e200f750a5", + "name" : "My New One" + } } }, "required" : true @@ -5188,7 +5216,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EmployeeLeave" }, - "example" : "{ \"leaveTypeID\": \"b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4\", \"description\": \"Creating a Description\", \"startDate\": \"2020-04-24\", \"endDate\": \"2020-04-26\" }" + "example" : { + "leaveTypeID" : "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", + "description" : "Creating a Description", + "startDate" : "2020-04-24", + "endDate" : "2020-04-26" + } } }, "required" : true @@ -5372,7 +5405,16 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EmployeeLeaveSetup" }, - "example" : "{ \"holidayPayOpeningBalance\": 10, \"annualLeaveOpeningBalance\": 100, \"sickLeaveHoursToAccrueAnnually\": 20, \"sickLeaveToAccrueAnnually\": 20, \"sickLeaveOpeningBalance\": 10, \"sickLeaveScheduleOfAccrual\": \"OnAnniversaryDate\", \"sickLeaveAnniversaryDate\": \"2023-12-31\", \"annualLeaveAnniversaryDate\": \"2023-12-31\" }" + "example" : { + "holidayPayOpeningBalance" : 10, + "annualLeaveOpeningBalance" : 100, + "sickLeaveHoursToAccrueAnnually" : 20, + "sickLeaveToAccrueAnnually" : 20, + "sickLeaveOpeningBalance" : 10, + "sickLeaveScheduleOfAccrual" : "OnAnniversaryDate", + "sickLeaveAnniversaryDate" : "2023-12-31", + "annualLeaveAnniversaryDate" : "2023-12-31" + } } }, "required" : true @@ -5549,7 +5591,17 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EmployeeLeaveType" }, - "example" : "{ \"leaveTypeID\": \"35da97ae-05b9-427f-9a98-69157ba42cec\", \"scheduleOfAccrual\": \"AnnuallyAfter6Months\", \"hoursAccruedAnnually\": 10, \"unitsAccruedAnnually\": 10, \"typeOfUnitsToAccrue\": \"Hours\", \"openingBalanceTypeOfUnits\": \"Hours\" \"maximumToAccrue\": 80, \"openingBalance\": 100, \"rateAccruedHourly\": 3.5 }" + "example" : { + "leaveTypeID" : "35da97ae-05b9-427f-9a98-69157ba42cec", + "scheduleOfAccrual" : "AnnuallyAfter6Months", + "hoursAccruedAnnually" : 10, + "unitsAccruedAnnually" : 10, + "typeOfUnitsToAccrue" : "Hours", + "openingBalanceTypeOfUnits" : "Hours", + "maximumToAccrue" : 80, + "openingBalance" : 100, + "rateAccruedHourly" : 3.5 + } } }, "required" : true @@ -5910,6 +5962,18 @@

Parameters

"application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentMethod" + }, + "example" : { + "bankAccounts" : [ { + "accountName" : "Casual Worker", + "accountNumber" : "0607050201419000", + "sortCode" : null, + "particulars" : null, + "code" : null, + "dollarAmount" : null, + "reference" : "", + "calculationType" : "Balance" + } ] } } }, @@ -6087,7 +6151,17 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/SalaryAndWage" }, - "example" : "{ \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"numberOfUnitsPerWeek\": 2, \"ratePerUnit\": 10, \"numberOfUnitsPerDay\": 2, \"daysPerWeek\": 1, \"effectiveFrom\": \"2020-05-01\", \"annualSalary\": 100, \"status\": \"Active\", \"paymentType\": \"Salary\" }" + "example" : { + "earningsRateID" : "f9d8f5b5-9049-47f4-8541-35e200f750a5", + "numberOfUnitsPerWeek" : 2, + "ratePerUnit" : 10, + "numberOfUnitsPerDay" : 2, + "daysPerWeek" : 1, + "effectiveFrom" : "2020-05-01", + "annualSalary" : 100, + "status" : "Active", + "paymentType" : "Salary" + } } }, "required" : true @@ -6268,7 +6342,18 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EmployeeWorkingPatternWithWorkingWeeksRequest" }, - "example" : "{ \"effectiveFrom\": \"2020-01-01T00:00:00\", \"workingWeeks\": [ { \"monday\": 0.0, \"tuesday\": 3.0000, \"wednesday\": 0.0, \"thursday\": 0.0, \"friday\": 0.0, \"saturday\": 0.0, \"sunday\": 0.0 } ] }" + "example" : { + "effectiveFrom" : "2020-01-01T00:00:00", + "workingWeeks" : [ { + "monday" : 0.0, + "tuesday" : 3.0, + "wednesday" : 0.0, + "thursday" : 0.0, + "friday" : 0.0, + "saturday" : 0.0, + "sunday" : 0.0 + } ] + } } }, "required" : true @@ -6446,7 +6531,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Employment" }, - "example" : "{ \"payrollCalendarID\": \"9aa56064-990f-4ad3-a189-d966d8f6a030\", \"startDate\": \"2020-09-02\", \"engagementType\": \"FixedTerm\", \"fixedTermEndDate\": \"2026-01-01\" }" + "example" : { + "payrollCalendarID" : "9aa56064-990f-4ad3-a189-d966d8f6a030", + "startDate" : "2020-09-02", + "engagementType" : "FixedTerm", + "fixedTermEndDate" : "2026-01-01" + } } }, "required" : true @@ -6588,7 +6678,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/LeaveType" }, - "example" : "{ \"name\": \"My wqwhhiktun Leave\", \"isPaidLeave\": false, \"showOnPayslip\": true }" + "example" : { + "name" : "My wqwhhiktun Leave", + "isPaidLeave" : false, + "showOnPayslip" : true + } } }, "required" : true @@ -6910,7 +7004,15 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PayRun" }, - "example" : "{ \"payrollCalendarID\": \"9aa56064-990f-4ad3-a189-d966d8f6a030\", \"periodStartDate\": \"2020-09-08\", \"periodEndDate\": \"2020-09-15\", \"paymentDate\": \"2020-09-20\", \"payRunStatus\": \"Draft\", \"payRunType\": \"Scheduled\", \"calendarType\": \"Weekly\" }" + "example" : { + "payrollCalendarID" : "9aa56064-990f-4ad3-a189-d966d8f6a030", + "periodStartDate" : "2020-09-08", + "periodEndDate" : "2020-09-15", + "paymentDate" : "2020-09-20", + "payRunStatus" : "Draft", + "payRunType" : "Scheduled", + "calendarType" : "Weekly" + } } }, "required" : true @@ -7054,7 +7156,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PayRunCalendar" }, - "example" : "{ \"name\": \"My Weekly Cal\", \"calendarType\": \"Weekly\", \"periodStartDate\": \"2020-05-01\", \"paymentDate\": \"2020-05-15\" }" + "example" : { + "name" : "My Weekly Cal", + "calendarType" : "Weekly", + "periodStartDate" : "2020-05-01", + "paymentDate" : "2020-05-15" + } } }, "required" : true @@ -7198,7 +7305,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Reimbursement" }, - "example" : "{ \"name\": \"My new Reimburse\", \"accountID\": \"fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488\", \"reimbursementCategory\": \"GSTInclusive\", \"calculationType\": \"FixedAmount\" }" + "example" : { + "name" : "My new Reimburse", + "accountID" : "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", + "reimbursementCategory" : "GSTInclusive", + "calculationType" : "FixedAmount" + } } }, "required" : true @@ -7343,7 +7455,14 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Benefit" }, - "example" : "{ \"name\": \"SidSaver\", \"category\": \"Other\", \"liabilityAccountId\": \"568f2e9a-0870-46cc-8678-f83f132ed4e3\", \"expenseAccountId\": \"e4eb36f6-97e3-4427-a394-dd4e1b355c2e\", \"CalculationTypeNZ\": \"FixedAmount\", \"standardAmount\": 10 }" + "example" : { + "name" : "SidSaver", + "category" : "Other", + "liabilityAccountId" : "568f2e9a-0870-46cc-8678-f83f132ed4e3", + "expenseAccountId" : "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", + "CalculationTypeNZ" : "FixedAmount", + "standardAmount" : 10 + } } }, "required" : true @@ -7488,7 +7607,21 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Timesheet" }, - "example" : "{ \"payrollCalendarID\": \"9aa56064-990f-4ad3-a189-d966d8f6a030\", \"employeeID\": \"68342973-c405-4b86-b5d3-d7b877c27995\", \"startDate\": \"2020-04-13\", \"endDate\": \"2020-04-19\", \"timesheetLines\": [ { \"date\": \"2020-04-13\", \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"numberOfUnits\": 8 }, { \"date\": \"2020-04-15\", \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"numberOfUnits\": 6 } ] }" + "example" : { + "payrollCalendarID" : "9aa56064-990f-4ad3-a189-d966d8f6a030", + "employeeID" : "68342973-c405-4b86-b5d3-d7b877c27995", + "startDate" : "2020-04-13", + "endDate" : "2020-04-19", + "timesheetLines" : [ { + "date" : "2020-04-13", + "earningsRateID" : "f9d8f5b5-9049-47f4-8541-35e200f750a5", + "numberOfUnits" : 8 + }, { + "date" : "2020-04-15", + "earningsRateID" : "f9d8f5b5-9049-47f4-8541-35e200f750a5", + "numberOfUnits" : 6 + } ] + } } }, "required" : true @@ -7667,7 +7800,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TimesheetLine" }, - "example" : "{ \"date\": \"2020-08-03\", \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"numberOfUnits\": 1 }" + "example" : { + "date" : "2020-08-03", + "earningsRateID" : "f9d8f5b5-9049-47f4-8541-35e200f750a5", + "numberOfUnits" : 1 + } } }, "required" : true @@ -13245,7 +13382,20 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Employee" }, - "example" : "{ \"title\": \"Mr\", \"firstName\": \"Tony\", \"lastName\": \"Starkgtrzgquusrson\", \"dateOfBirth\": \"1999-01-01\", \"address\": { \"addressLine1\": \"101 Green St\", \"city\": \"San Francisco\", \"postCode\": \"4432\", \"countryName\": \"United Kingdom\" }, \"email\": \"58315@starkindustries.com\", \"gender\": \"M\" }" + "example" : { + "title" : "Mr", + "firstName" : "Tony", + "lastName" : "Starkgtrzgquusrson", + "dateOfBirth" : "1999-01-01", + "address" : { + "addressLine1" : "101 Green St", + "city" : "San Francisco", + "postCode" : "4432", + "countryName" : "United Kingdom" + }, + "email" : "58315@starkindustries.com", + "gender" : "M" + } } }, "required" : true @@ -13453,7 +13603,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EarningsTemplate" }, - "example" : "{ \"ratePerUnit\": 25, \"numberOfUnits\": 4, \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\" }" + "example" : { + "ratePerUnit" : 25, + "numberOfUnits" : 4, + "earningsRateID" : "f9d8f5b5-9049-47f4-8541-35e200f750a5" + } } }, "required" : true @@ -13658,7 +13812,18 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EmployeeLeave" }, - "example" : "{ \"leaveTypeID\": \"b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4\", \"description\": \"Creating a Description\", \"startDate\": \"2020-04-24\", \"endDate\": \"2020-04-26\", \"periods\": [ { \"periodStartDate\": \"2020-04-20\", \"periodEndDate\": \"2020-04-26\", \"numberOfUnits\": 1, \"periodStatus\": \"Approved\" } ] }" + "example" : { + "leaveTypeID" : "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", + "description" : "Creating a Description", + "startDate" : "2020-04-24", + "endDate" : "2020-04-26", + "periods" : [ { + "periodStartDate" : "2020-04-20", + "periodEndDate" : "2020-04-26", + "numberOfUnits" : 1, + "periodStatus" : "Approved" + } ] + } } }, "required" : true @@ -13862,7 +14027,17 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/SalaryAndWage" }, - "example" : "{ \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"numberOfUnitsPerWeek\": 3, \"ratePerUnit\": 11, \"numberOfUnitsPerDay\": 3, \"daysPerWeek\": 1, \"effectiveFrom\": \"2020-05-15\", \"annualSalary\": 101, \"status\": \"Active\", \"paymentType\": \"Salary\" }" + "example" : { + "earningsRateID" : "f9d8f5b5-9049-47f4-8541-35e200f750a5", + "numberOfUnitsPerWeek" : 3, + "ratePerUnit" : 11, + "numberOfUnitsPerDay" : 3, + "daysPerWeek" : 1, + "effectiveFrom" : "2020-05-15", + "annualSalary" : 101, + "status" : "Active", + "paymentType" : "Salary" + } } }, "required" : true @@ -14047,6 +14222,24 @@

Parameters

"application/json" : { "schema" : { "$ref" : "#/components/schemas/EmployeeTax" + }, + "example" : { + "irdNumber" : "111111111", + "taxCode" : "M", + "esctRatePercentage" : 17.5, + "isEligibleForKiwiSaver" : true, + "hasSpecialStudentLoanRate" : false, + "specialStudentLoanRatePercentage" : null, + "specialTaxRatePercentage" : null, + "kiwiSaverContributions" : "MakeContributions", + "kiwiSaverOptOutDate" : null, + "kiwiSaverContributionHolidayEndDate" : null, + "kiwiSaverEmployeeContributionRatePercentage" : 3, + "kiwiSaverEmployerContributionRatePercentage" : 3, + "kiwiSaverEmployerSalarySacrificeContributionRatePercentage" : 0, + "hasStudentLoanBalance" : false, + "studentLoanBalance" : null, + "studentLoanAsAt" : null } } }, @@ -14225,7 +14418,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PayRun" }, - "example" : "{ \"paymentDate\": \"2019-07-01\" }" + "example" : { + "paymentDate" : "2019-07-01" + } } }, "required" : true @@ -14410,7 +14605,81 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PaySlip" }, - "example" : "{ \"earningsLines\": [ { \"earningsLineID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"displayName\": \"Ordinary Time\", \"ratePerUnit\": 25, \"numberOfUnits\": 0, \"amount\": 0, \"isLinkedToTimesheet\": false, \"isSystemGenerated\": true }, { \"earningsLineID\": \"65b83d94-f20f-45e1-85ae-387fcf460c26\", \"earningsRateID\": \"65b83d94-f20f-45e1-85ae-387fcf460c26\", \"displayName\": \"Salary\", \"ratePerUnit\": 0, \"numberOfUnits\": 8, \"amount\": 0, \"isLinkedToTimesheet\": false, \"isSystemGenerated\": false } ], \"leaveEarningsLines\": [ { \"earningsLineID\": \"0441497f-5dc7-4cd3-a90d-f2e07e21b2a6\", \"earningsRateID\": \"39b3560a-5d2f-4538-924a-4349dc86396e\", \"displayName\": \"Holiday Pay\", \"fixedAmount\": 268.8, \"amount\": 268.8, \"isLinkedToTimesheet\": false, \"isSystemGenerated\": true } ], \"deductionLines\": [ { \"deductionTypeID\": \"a3760fe4-68a4-4e38-8326-fe616af7dc74\", \"amount\": 100 } ], \"leaveAccrualLines\": [ { \"leaveTypeID\": \"0441497f-5dc7-4cd3-a90d-f2e07e21b2a6\", \"numberOfUnits\": 268.8 }, { \"leaveTypeID\": \"b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4\", \"numberOfUnits\": 0 }, { \"leaveTypeID\": \"f2f994cf-1899-46f3-ad4f-5d92d78c3719\", \"numberOfUnits\": 0 }, { \"leaveTypeID\": \"34129765-11cb-4d8c-b568-84a2219beda3\", \"numberOfUnits\": 0 } ], \"superannuationLines\": [ { \"superannuationTypeID\": \"563273ea-0dae-4f82-86a4-e0db77c008ea\", \"displayName\": \"KiwiSaver\", \"amount\": 108.86, \"fixedAmount\": 3, \"percentage\": 3, \"manualAdjustment\": false } ], \"employeeTaxLines\": [ { \"taxLineID\": \"1084146b-e890-489c-aed3-06de80f63d84\", \"amount\": 1057.22, \"globalTaxTypeID\": \"11\", \"manualAdjustment\": false } ], \"employerTaxLines\": [ { \"taxLineID\": \"6f9eb8cd-0f4a-440b-939c-bdb0f6ad694c\", \"amount\": 18.9, \"globalTaxTypeID\": \"10\", \"manualAdjustment\": false } ], \"statutoryDeductionLines\": [ { \"statutoryDeductionTypeID\": \"b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3\", \"amount\": 108.86 } ], \"grossEarningsHistory\": { \"daysPaid\": 3, \"unpaidWeeks\": 0 } }" + "example" : { + "earningsLines" : [ { + "earningsLineID" : "f9d8f5b5-9049-47f4-8541-35e200f750a5", + "earningsRateID" : "f9d8f5b5-9049-47f4-8541-35e200f750a5", + "displayName" : "Ordinary Time", + "ratePerUnit" : 25, + "numberOfUnits" : 0, + "amount" : 0, + "isLinkedToTimesheet" : false, + "isSystemGenerated" : true + }, { + "earningsLineID" : "65b83d94-f20f-45e1-85ae-387fcf460c26", + "earningsRateID" : "65b83d94-f20f-45e1-85ae-387fcf460c26", + "displayName" : "Salary", + "ratePerUnit" : 0, + "numberOfUnits" : 8, + "amount" : 0, + "isLinkedToTimesheet" : false, + "isSystemGenerated" : false + } ], + "leaveEarningsLines" : [ { + "earningsLineID" : "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", + "earningsRateID" : "39b3560a-5d2f-4538-924a-4349dc86396e", + "displayName" : "Holiday Pay", + "fixedAmount" : 268.8, + "amount" : 268.8, + "isLinkedToTimesheet" : false, + "isSystemGenerated" : true + } ], + "deductionLines" : [ { + "deductionTypeID" : "a3760fe4-68a4-4e38-8326-fe616af7dc74", + "amount" : 100 + } ], + "leaveAccrualLines" : [ { + "leaveTypeID" : "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", + "numberOfUnits" : 268.8 + }, { + "leaveTypeID" : "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", + "numberOfUnits" : 0 + }, { + "leaveTypeID" : "f2f994cf-1899-46f3-ad4f-5d92d78c3719", + "numberOfUnits" : 0 + }, { + "leaveTypeID" : "34129765-11cb-4d8c-b568-84a2219beda3", + "numberOfUnits" : 0 + } ], + "superannuationLines" : [ { + "superannuationTypeID" : "563273ea-0dae-4f82-86a4-e0db77c008ea", + "displayName" : "KiwiSaver", + "amount" : 108.86, + "fixedAmount" : 3, + "percentage" : 3, + "manualAdjustment" : false + } ], + "employeeTaxLines" : [ { + "taxLineID" : "1084146b-e890-489c-aed3-06de80f63d84", + "amount" : 1057.22, + "globalTaxTypeID" : "11", + "manualAdjustment" : false + } ], + "employerTaxLines" : [ { + "taxLineID" : "6f9eb8cd-0f4a-440b-939c-bdb0f6ad694c", + "amount" : 18.9, + "globalTaxTypeID" : "10", + "manualAdjustment" : false + } ], + "statutoryDeductionLines" : [ { + "statutoryDeductionTypeID" : "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3", + "amount" : 108.86 + } ], + "grossEarningsHistory" : { + "daysPaid" : 3, + "unpaidWeeks" : 0 + } + } } }, "required" : true @@ -14616,7 +14885,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TimesheetLine" }, - "example" : "{ \"date\": \"2020-08-04\", \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"numberOfUnits\": 2 }" + "example" : { + "date" : "2020-08-04", + "earningsRateID" : "f9d8f5b5-9049-47f4-8541-35e200f750a5", + "numberOfUnits" : 2 + } } }, "required" : true diff --git a/docs/payroll-uk/index.html b/docs/payroll-uk/index.html index 0ed33ea3..57017fc7 100644 --- a/docs/payroll-uk/index.html +++ b/docs/payroll-uk/index.html @@ -1514,7 +1514,7 @@ }; defs["Employee"] = { "title" : "", - "required" : [ "Address", "DateOfBirth", "FirstName", "Gender", "LastName", "Title" ], + "required" : [ "address", "dateOfBirth", "firstName", "gender", "lastName", "title" ], "type" : "object", "properties" : { "employeeID" : { @@ -2262,7 +2262,7 @@ }; defs["Employment"] = { "title" : "", - "required" : [ "EmployeeNumber", "NICategory", "PayrollCalendarID", "StartDate" ], + "required" : [ "employeeNumber", "niCategory", "payrollCalendarID", "startDate" ], "type" : "object", "properties" : { "payrollCalendarID" : { @@ -4015,7 +4015,15 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Benefit" }, - "example" : "{ \"name\": \"My Big Bennie\", \"category\": \"StakeholderPension\", \"liabilityAccountId\": \"e0faa299-ca0d-4b0a-9e32-0dfabdf9179a\", \"expenseAccountId\": \"4b03500d-32fd-4616-8d70-e1e56e0519c6\", \"standardAmount\": 50, \"percentage\": 25, \"calculationType\": \"PercentageOfGross\" }" + "example" : { + "name" : "My Big Bennie", + "category" : "StakeholderPension", + "liabilityAccountId" : "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", + "expenseAccountId" : "4b03500d-32fd-4616-8d70-e1e56e0519c6", + "standardAmount" : 50, + "percentage" : 25, + "calculationType" : "PercentageOfGross" + } } }, "required" : true @@ -4158,7 +4166,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Deduction" }, - "example" : "{ \"deductionName\": \"My new deduction\", \"deductionCategory\": \"SalarySacrifice\", \"liabilityAccountId\": \"e0faa299-ca0d-4b0a-9e32-0dfabdf9179a\", \"calculationType\": \"FixedAmount\" }" + "example" : { + "deductionName" : "My new deduction", + "deductionCategory" : "SalarySacrifice", + "liabilityAccountId" : "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", + "calculationType" : "FixedAmount" + } } }, "required" : true @@ -4301,7 +4314,13 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EarningsRate" }, - "example" : "{ \"name\": \"My Earnings Rate\", \"earningsType\": \"RegularEarnings\", \"rateType\": \"RatePerUnit\", \"typeOfUnits\": \"hours\", \"expenseAccountID\": \"4b03500d-32fd-4616-8d70-e1e56e0519c6\" }" + "example" : { + "name" : "My Earnings Rate", + "earningsType" : "RegularEarnings", + "rateType" : "RatePerUnit", + "typeOfUnits" : "hours", + "expenseAccountID" : "4b03500d-32fd-4616-8d70-e1e56e0519c6" + } } }, "required" : true @@ -4452,7 +4471,20 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Employee" }, - "example" : "{ \"title\":\"Mr\", \"firstName\":\"Mike\", \"lastName\":\"Fancy\", \"dateOfBirth\":\"1999-01-01T00:00:00\", \"gender\":\"M\", \"email\":\"mike@starkindustries.com\", \"isOffPayrollWorker\": false, \"address\": { \"addressLine1\": \"171 Midsummer\", \"city\": \"Milton Keyness\", \"postCode\": \"MK9 1EB\" } }" + "example" : { + "title" : "Mr", + "firstName" : "Mike", + "lastName" : "Fancy", + "dateOfBirth" : "1999-01-01T00:00:00", + "gender" : "M", + "email" : "mike@starkindustries.com", + "isOffPayrollWorker" : false, + "address" : { + "addressLine1" : "171 Midsummer", + "city" : "Milton Keyness", + "postCode" : "MK9 1EB" + } + } } }, "required" : true @@ -4810,7 +4842,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EmployeeLeave" }, - "example" : "{ \"leaveTypeID\": \"1d2778ee-86ea-45c0-bbf8-1045485f6b3f\", \"description\": \"Creating a Description\", \"startDate\": \"2020-03-24\", \"endDate\": \"2020-03-26\" }" + "example" : { + "leaveTypeID" : "1d2778ee-86ea-45c0-bbf8-1045485f6b3f", + "description" : "Creating a Description", + "startDate" : "2020-03-24", + "endDate" : "2020-03-26" + } } }, "required" : true @@ -4987,7 +5024,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EmployeeLeaveType" }, - "example" : "{ \"leaveTypeID\": \"4918f233-bd31-43f9-9633-bcc6de1178f2\", \"scheduleOfAccrual\": \"BeginningOfCalendarYear\", \"hoursAccruedAnnually\": 10 }" + "example" : { + "leaveTypeID" : "4918f233-bd31-43f9-9633-bcc6de1178f2", + "scheduleOfAccrual" : "BeginningOfCalendarYear", + "hoursAccruedAnnually" : 10 + } } }, "required" : true @@ -5165,7 +5206,14 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EmployeeOpeningBalances" }, - "example" : "{ \"statutoryAdoptionPay\": 10, \"statutoryMaternityPay\": 10, \"statutoryPaternityPay\": 10, \"statutorySharedParentalPay\": 10, \"statutorySickPay\": 10, \"priorEmployeeNumber\": 10 }" + "example" : { + "statutoryAdoptionPay" : 10, + "statutoryMaternityPay" : 10, + "statutoryPaternityPay" : 10, + "statutorySharedParentalPay" : 10, + "statutorySickPay" : 10, + "priorEmployeeNumber" : 10 + } } }, "required" : true @@ -5347,7 +5395,14 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PaymentMethod" }, - "example" : "{ \"paymentMethod\": \"Electronically\", \"bankAccounts\": [ { \"accountName\": \"Sid BofA\", \"accountNumber\": \"24987654\", \"sortCode\": \"287654\" } ] }" + "example" : { + "paymentMethod" : "Electronically", + "bankAccounts" : [ { + "accountName" : "Sid BofA", + "accountNumber" : "24987654", + "sortCode" : "287654" + } ] + } } }, "required" : true @@ -5525,7 +5580,16 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/SalaryAndWage" }, - "example" : "{ \"earningsRateID\": \"87f5b43a-cf51-4b74-92de-94c819e82d27\", \"numberOfUnitsPerWeek\": 2, \"ratePerUnit\": 10, \"numberOfUnitsPerDay\": 2, \"effectiveFrom\": \"2020-05-01\", \"annualSalary\": 100, \"status\": \"ACTIVE\", \"paymentType\": \"Salary\" }" + "example" : { + "earningsRateID" : "87f5b43a-cf51-4b74-92de-94c819e82d27", + "numberOfUnitsPerWeek" : 2, + "ratePerUnit" : 10, + "numberOfUnitsPerDay" : 2, + "effectiveFrom" : "2020-05-01", + "annualSalary" : 100, + "status" : "ACTIVE", + "paymentType" : "Salary" + } } }, "required" : true @@ -5670,7 +5734,15 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EmployeeStatutorySickLeave" }, - "example" : "{ \"employeeID\": \"aad6b292-7b94-408b-93f6-e489867e3fb0\", \"leaveTypeID\": \"aab78802-e9d3-4bbd-bc87-df858054988f\", \"startDate\": \"2020-04-21\", \"endDate\": \"2020-04-24\", \"workPattern\": [ \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\" ], \"isPregnancyRelated\": false, \"sufficientNotice\": true }" + "example" : { + "employeeID" : "aad6b292-7b94-408b-93f6-e489867e3fb0", + "leaveTypeID" : "aab78802-e9d3-4bbd-bc87-df858054988f", + "startDate" : "2020-04-21", + "endDate" : "2020-04-24", + "workPattern" : [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ], + "isPregnancyRelated" : false, + "sufficientNotice" : true + } } }, "required" : true @@ -5846,7 +5918,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Employment" }, - "example" : "{ \"PayrollCalendarID\": \"216d80e6-af55-47b1-b718-9457c3f5d2fe\", \"StartDate\": \"2020-04-01\", \"EmployeeNumber\": \"123ABC\", \"NICategory\": \"A\" }" + "example" : { + "PayrollCalendarID" : "216d80e6-af55-47b1-b718-9457c3f5d2fe", + "StartDate" : "2020-04-01", + "EmployeeNumber" : "123ABC", + "NICategory" : "A" + } } }, "required" : true @@ -5988,7 +6065,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/LeaveType" }, - "example" : "{ \"name\": \"My opebvwbfxf Leave\", \"isPaidLeave\": false, \"showOnPayslip\": true }" + "example" : { + "name" : "My opebvwbfxf Leave", + "isPaidLeave" : false, + "showOnPayslip" : true + } } }, "required" : true @@ -6313,7 +6394,12 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PayRunCalendar" }, - "example" : "{ \"name\": \"My Weekly Cal\", \"calendarType\": \"Weekly\", \"periodStartDate\": \"2020-05-01\", \"paymentDate\": \"2020-05-15\" }" + "example" : { + "name" : "My Weekly Cal", + "calendarType" : "Weekly", + "periodStartDate" : "2020-05-01", + "paymentDate" : "2020-05-15" + } } }, "required" : true @@ -6454,7 +6540,10 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Reimbursement" }, - "example" : "{ \"name\": \"My new Reimburse\", \"accountID\": \"9ee28149-32a9-4661-8eab-a28738696983\" }" + "example" : { + "name" : "My new Reimburse", + "accountID" : "9ee28149-32a9-4661-8eab-a28738696983" + } } }, "required" : true @@ -6599,7 +6688,21 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Timesheet" }, - "example" : "{ \"payrollCalendarID\": \"216d80e6-af55-47b1-b718-9457c3f5d2fe\", \"employeeID\": \"aad6b292-7b94-408b-93f6-e489867e3fb0\", \"startDate\": \"2020-04-13\", \"endDate\": \"2020-04-19\", \"timesheetLines\": [ { \"date\": \"2020-04-13\", \"earningsRateID\": \"87f5b43a-cf51-4b74-92de-94c819e82d27\", \"numberOfUnits\": 8 }, { \"date\": \"2020-04-15\", \"earningsRateID\": \"87f5b43a-cf51-4b74-92de-94c819e82d27\", \"numberOfUnits\": 6 } ] }" + "example" : { + "payrollCalendarID" : "216d80e6-af55-47b1-b718-9457c3f5d2fe", + "employeeID" : "aad6b292-7b94-408b-93f6-e489867e3fb0", + "startDate" : "2020-04-13", + "endDate" : "2020-04-19", + "timesheetLines" : [ { + "date" : "2020-04-13", + "earningsRateID" : "87f5b43a-cf51-4b74-92de-94c819e82d27", + "numberOfUnits" : 8 + }, { + "date" : "2020-04-15", + "earningsRateID" : "87f5b43a-cf51-4b74-92de-94c819e82d27", + "numberOfUnits" : 6 + } ] + } } }, "required" : true @@ -6778,7 +6881,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TimesheetLine" }, - "example" : "{ \"date\": \"2020-04-14\", \"earningsRateID\": \"87f5b43a-cf51-4b74-92de-94c819e82d27\", \"numberOfUnits\": 1 }" + "example" : { + "date" : "2020-04-14", + "earningsRateID" : "87f5b43a-cf51-4b74-92de-94c819e82d27", + "numberOfUnits" : 1 + } } }, "required" : true @@ -12532,7 +12639,21 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Employee" }, - "example" : "{ \"title\": \"Mr.\", \"firstName\": \"TestDataUK\", \"lastName\": \"Tester\", \"dateOfBirth\": \"1992-11-22T00:00:00\", \"gender\": \"M\", \"email\": \"tester@gmail.com\", \"phoneNumber\": \"0400123456\", \"isOffPayrollWorker\": false, \"address\": { \"addressLine1\": \"171 Midsummer\", \"city\": \"Milton Keyness\", \"postCode\": \"MK9 1EB\" } }" + "example" : { + "title" : "Mr.", + "firstName" : "TestDataUK", + "lastName" : "Tester", + "dateOfBirth" : "1992-11-22T00:00:00", + "gender" : "M", + "email" : "tester@gmail.com", + "phoneNumber" : "0400123456", + "isOffPayrollWorker" : false, + "address" : { + "addressLine1" : "171 Midsummer", + "city" : "Milton Keyness", + "postCode" : "MK9 1EB" + } + } } }, "required" : true @@ -12740,7 +12861,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EarningsTemplate" }, - "example" : "{ \"ratePerUnit\": 30, \"numberOfUnits\": 4, \"earningsRateID\": \"87f5b43a-cf51-4b74-92de-94c819e82d27\" }" + "example" : { + "ratePerUnit" : 30, + "numberOfUnits" : 4, + "earningsRateID" : "87f5b43a-cf51-4b74-92de-94c819e82d27" + } } }, "required" : true @@ -12945,7 +13070,18 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EmployeeLeave" }, - "example" : "{ \"leaveTypeID\": \"ed08dffe-788e-4b24-9630-f0fa2f4d164c\", \"description\": \"Creating a Description\", \"startDate\": \"2020-04-24\", \"endDate\": \"2020-04-26\", \"periods\": [ { \"periodStartDate\": \"2020-04-20\", \"periodEndDate\": \"2020-04-26\", \"numberOfUnits\": 1, \"periodStatus\": \"Approved\" } ] }" + "example" : { + "leaveTypeID" : "ed08dffe-788e-4b24-9630-f0fa2f4d164c", + "description" : "Creating a Description", + "startDate" : "2020-04-24", + "endDate" : "2020-04-26", + "periods" : [ { + "periodStartDate" : "2020-04-20", + "periodEndDate" : "2020-04-26", + "numberOfUnits" : 1, + "periodStatus" : "Approved" + } ] + } } }, "required" : true @@ -13123,7 +13259,14 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/EmployeeOpeningBalances" }, - "example" : "{ \"statutoryAdoptionPay\": 20, \"statutoryMaternityPay\": 20, \"statutoryPaternityPay\": 20, \"statutorySharedParentalPay\": 20, \"statutorySickPay\": 20, \"priorEmployeeNumber\": 20 }" + "example" : { + "statutoryAdoptionPay" : 20, + "statutoryMaternityPay" : 20, + "statutoryPaternityPay" : 20, + "statutorySharedParentalPay" : 20, + "statutorySickPay" : 20, + "priorEmployeeNumber" : 20 + } } }, "required" : true @@ -13328,7 +13471,15 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/SalaryAndWage" }, - "example" : "{ \"earningsRateID\": \"87f5b43a-cf51-4b74-92de-94c819e82d27\", \"numberOfUnitsPerWeek\": 3, \"ratePerUnit\": 11, \"effectiveFrom\": \"2020-05-15\", \"annualSalary\": 101, \"status\": \"ACTIVE\", \"paymentType\": \"Salary\" }" + "example" : { + "earningsRateID" : "87f5b43a-cf51-4b74-92de-94c819e82d27", + "numberOfUnitsPerWeek" : 3, + "ratePerUnit" : 11, + "effectiveFrom" : "2020-05-15", + "annualSalary" : 101, + "status" : "ACTIVE", + "paymentType" : "Salary" + } } }, "required" : true @@ -13506,7 +13657,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PayRun" }, - "example" : "{ \"paymentDate\": \"2020-05-01\" }" + "example" : { + "paymentDate" : "2020-05-01" + } } }, "required" : true @@ -13712,7 +13865,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TimesheetLine" }, - "example" : "{ \"date\": \"2020-04-14\", \"earningsRateID\": \"87f5b43a-cf51-4b74-92de-94c819e82d27\", \"numberOfUnits\": 2 }" + "example" : { + "date" : "2020-04-14", + "earningsRateID" : "87f5b43a-cf51-4b74-92de-94c819e82d27", + "numberOfUnits" : 2 + } } }, "required" : true diff --git a/docs/projects/index.html b/docs/projects/index.html index 5d982425..0585df0a 100644 --- a/docs/projects/index.html +++ b/docs/projects/index.html @@ -2000,7 +2000,13 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TimeEntryCreateOrUpdate" }, - "example" : "{ \"userId\": \"00000000-0000-0000-0000-000000000000\", \"taskId\": \"00000000-0000-0000-0000-000000000000\", \"dateUtc\": \"2020-02-26T15:00:00Z\", \"duration\":30, \"description\": \"My description\" }" + "example" : { + "userId" : "00000000-0000-0000-0000-000000000000", + "taskId" : "00000000-0000-0000-0000-000000000000", + "dateUtc" : "2020-02-26T15:00:00Z", + "duration" : 30, + "description" : "My description" + } } }, "required" : true @@ -4322,7 +4328,13 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TimeEntryCreateOrUpdate" }, - "example" : "{ \"userId\": \"00000000-0000-0000-0000-000000000000\", \"taskId\": \"00000000-0000-0000-0000-000000000000\", \"dateUtc\": \"2020-02-27T15:00:00Z\", \"duration\":45, \"description\": \"My UPDATED description\" }" + "example" : { + "userId" : "00000000-0000-0000-0000-000000000000", + "taskId" : "00000000-0000-0000-0000-000000000000", + "dateUtc" : "2020-02-27T15:00:00Z", + "duration" : 45, + "description" : "My UPDATED description" + } } }, "required" : true diff --git a/src/gen/api/accountingApi.ts b/src/gen/api/accountingApi.ts index e5faf9e9..fa15fe83 100644 --- a/src/gen/api/accountingApi.ts +++ b/src/gen/api/accountingApi.ts @@ -68,7 +68,7 @@ import { TrackingOption } from '../model/accounting/trackingOption'; import { TrackingOptions } from '../model/accounting/trackingOptions'; import { Users } from '../model/accounting/users'; -import { ObjectSerializer, Authentication, VoidAuth } from '../model/accounting/models'; +import { ObjectSerializer, Authentication, VoidAuth, RequestFile } from '../model/accounting/models'; import { ApiError } from '../../model/ApiError'; import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Readable } from "stream"; @@ -215,7 +215,7 @@ export class AccountingApi { * @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. */ - public async createAccountAttachmentByFileName (xeroTenantId: string, accountID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async createAccountAttachmentByFileName (xeroTenantId: string, accountID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/Accounts/{AccountID}/Attachments/{FileName}' .replace('{' + 'AccountID' + '}', encodeURIComponent(String(accountID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -261,7 +261,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -325,7 +325,7 @@ export class AccountingApi { * @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. */ - public async createBankTransactionAttachmentByFileName (xeroTenantId: string, bankTransactionID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async createBankTransactionAttachmentByFileName (xeroTenantId: string, bankTransactionID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/BankTransactions/{BankTransactionID}/Attachments/{FileName}' .replace('{' + 'BankTransactionID' + '}', encodeURIComponent(String(bankTransactionID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -371,7 +371,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -676,7 +676,7 @@ export class AccountingApi { * @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. */ - public async createBankTransferAttachmentByFileName (xeroTenantId: string, bankTransferID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async createBankTransferAttachmentByFileName (xeroTenantId: string, bankTransferID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/BankTransfers/{BankTransferID}/Attachments/{FileName}' .replace('{' + 'BankTransferID' + '}', encodeURIComponent(String(bankTransferID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -722,7 +722,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -1111,7 +1111,7 @@ export class AccountingApi { * @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. */ - public async createContactAttachmentByFileName (xeroTenantId: string, contactID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async createContactAttachmentByFileName (xeroTenantId: string, contactID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/Contacts/{ContactID}/Attachments/{FileName}' .replace('{' + 'ContactID' + '}', encodeURIComponent(String(contactID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -1157,7 +1157,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -1628,7 +1628,7 @@ export class AccountingApi { * @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. */ - public async createCreditNoteAttachmentByFileName (xeroTenantId: string, creditNoteID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , includeOnline?: boolean, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async createCreditNoteAttachmentByFileName (xeroTenantId: string, creditNoteID: string, fileName: string, body: RequestFile, includeOnline?: boolean, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/CreditNotes/{CreditNoteID}/Attachments/{FileName}' .replace('{' + 'CreditNoteID' + '}', encodeURIComponent(String(creditNoteID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -1678,7 +1678,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -2222,7 +2222,7 @@ export class AccountingApi { * @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. */ - public async createInvoiceAttachmentByFileName (xeroTenantId: string, invoiceID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , includeOnline?: boolean, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async createInvoiceAttachmentByFileName (xeroTenantId: string, invoiceID: string, fileName: string, body: RequestFile, includeOnline?: boolean, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/Invoices/{InvoiceID}/Attachments/{FileName}' .replace('{' + 'InvoiceID' + '}', encodeURIComponent(String(invoiceID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -2272,7 +2272,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -2745,7 +2745,7 @@ export class AccountingApi { * @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. */ - public async createManualJournalAttachmentByFileName (xeroTenantId: string, manualJournalID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async createManualJournalAttachmentByFileName (xeroTenantId: string, manualJournalID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/ManualJournals/{ManualJournalID}/Attachments/{FileName}' .replace('{' + 'ManualJournalID' + '}', encodeURIComponent(String(manualJournalID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -2791,7 +2791,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -3667,7 +3667,7 @@ export class AccountingApi { * @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. */ - public async createPurchaseOrderAttachmentByFileName (xeroTenantId: string, purchaseOrderID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async createPurchaseOrderAttachmentByFileName (xeroTenantId: string, purchaseOrderID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}' .replace('{' + 'PurchaseOrderID' + '}', encodeURIComponent(String(purchaseOrderID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -3713,7 +3713,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -3939,7 +3939,7 @@ export class AccountingApi { * @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. */ - public async createQuoteAttachmentByFileName (xeroTenantId: string, quoteID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async createQuoteAttachmentByFileName (xeroTenantId: string, quoteID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/Quotes/{QuoteID}/Attachments/{FileName}' .replace('{' + 'QuoteID' + '}', encodeURIComponent(String(quoteID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -3985,7 +3985,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -4291,7 +4291,7 @@ export class AccountingApi { * @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. */ - public async createReceiptAttachmentByFileName (xeroTenantId: string, receiptID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async createReceiptAttachmentByFileName (xeroTenantId: string, receiptID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/Receipts/{ReceiptID}/Attachments/{FileName}' .replace('{' + 'ReceiptID' + '}', encodeURIComponent(String(receiptID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -4337,7 +4337,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -4483,7 +4483,7 @@ export class AccountingApi { * @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. */ - public async createRepeatingInvoiceAttachmentByFileName (xeroTenantId: string, repeatingInvoiceID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async createRepeatingInvoiceAttachmentByFileName (xeroTenantId: string, repeatingInvoiceID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}' .replace('{' + 'RepeatingInvoiceID' + '}', encodeURIComponent(String(repeatingInvoiceID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -4529,7 +4529,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -16505,7 +16505,7 @@ export class AccountingApi { * @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. */ - public async updateAccountAttachmentByFileName (xeroTenantId: string, accountID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async updateAccountAttachmentByFileName (xeroTenantId: string, accountID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/Accounts/{AccountID}/Attachments/{FileName}' .replace('{' + 'AccountID' + '}', encodeURIComponent(String(accountID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -16551,7 +16551,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -16702,7 +16702,7 @@ export class AccountingApi { * @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. */ - public async updateBankTransactionAttachmentByFileName (xeroTenantId: string, bankTransactionID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async updateBankTransactionAttachmentByFileName (xeroTenantId: string, bankTransactionID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/BankTransactions/{BankTransactionID}/Attachments/{FileName}' .replace('{' + 'BankTransactionID' + '}', encodeURIComponent(String(bankTransactionID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -16748,7 +16748,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -16811,7 +16811,7 @@ export class AccountingApi { * @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. */ - public async updateBankTransferAttachmentByFileName (xeroTenantId: string, bankTransferID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async updateBankTransferAttachmentByFileName (xeroTenantId: string, bankTransferID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/BankTransfers/{BankTransferID}/Attachments/{FileName}' .replace('{' + 'BankTransferID' + '}', encodeURIComponent(String(bankTransferID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -16857,7 +16857,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -17002,7 +17002,7 @@ export class AccountingApi { * @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. */ - public async updateContactAttachmentByFileName (xeroTenantId: string, contactID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async updateContactAttachmentByFileName (xeroTenantId: string, contactID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/Contacts/{ContactID}/Attachments/{FileName}' .replace('{' + 'ContactID' + '}', encodeURIComponent(String(contactID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -17048,7 +17048,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -17281,7 +17281,7 @@ export class AccountingApi { * @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. */ - public async updateCreditNoteAttachmentByFileName (xeroTenantId: string, creditNoteID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async updateCreditNoteAttachmentByFileName (xeroTenantId: string, creditNoteID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/CreditNotes/{CreditNoteID}/Attachments/{FileName}' .replace('{' + 'CreditNoteID' + '}', encodeURIComponent(String(creditNoteID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -17327,7 +17327,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -17560,7 +17560,7 @@ export class AccountingApi { * @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. */ - public async updateInvoiceAttachmentByFileName (xeroTenantId: string, invoiceID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async updateInvoiceAttachmentByFileName (xeroTenantId: string, invoiceID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/Invoices/{InvoiceID}/Attachments/{FileName}' .replace('{' + 'InvoiceID' + '}', encodeURIComponent(String(invoiceID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -17606,7 +17606,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -17921,7 +17921,7 @@ export class AccountingApi { * @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. */ - public async updateManualJournalAttachmentByFileName (xeroTenantId: string, manualJournalID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async updateManualJournalAttachmentByFileName (xeroTenantId: string, manualJournalID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/ManualJournals/{ManualJournalID}/Attachments/{FileName}' .replace('{' + 'ManualJournalID' + '}', encodeURIComponent(String(manualJournalID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -17967,7 +17967,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -18933,7 +18933,7 @@ export class AccountingApi { * @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. */ - public async updatePurchaseOrderAttachmentByFileName (xeroTenantId: string, purchaseOrderID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async updatePurchaseOrderAttachmentByFileName (xeroTenantId: string, purchaseOrderID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}' .replace('{' + 'PurchaseOrderID' + '}', encodeURIComponent(String(purchaseOrderID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -18979,7 +18979,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -19125,7 +19125,7 @@ export class AccountingApi { * @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. */ - public async updateQuoteAttachmentByFileName (xeroTenantId: string, quoteID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async updateQuoteAttachmentByFileName (xeroTenantId: string, quoteID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/Quotes/{QuoteID}/Attachments/{FileName}' .replace('{' + 'QuoteID' + '}', encodeURIComponent(String(quoteID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -19171,7 +19171,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -19322,7 +19322,7 @@ export class AccountingApi { * @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. */ - public async updateReceiptAttachmentByFileName (xeroTenantId: string, receiptID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async updateReceiptAttachmentByFileName (xeroTenantId: string, receiptID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/Receipts/{ReceiptID}/Attachments/{FileName}' .replace('{' + 'ReceiptID' + '}', encodeURIComponent(String(receiptID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -19368,7 +19368,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); @@ -19514,7 +19514,7 @@ export class AccountingApi { * @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. */ - public async updateRepeatingInvoiceAttachmentByFileName (xeroTenantId: string, repeatingInvoiceID: string, fileName: string, body: fs.ReadStream | Readable | Buffer , idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { + public async updateRepeatingInvoiceAttachmentByFileName (xeroTenantId: string, repeatingInvoiceID: string, fileName: string, body: RequestFile, idempotencyKey?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Attachments; }> { const localVarPath = this.basePath + '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}' .replace('{' + 'RepeatingInvoiceID' + '}', encodeURIComponent(String(repeatingInvoiceID))) .replace('{' + 'FileName' + '}', encodeURIComponent(String(fileName))); @@ -19560,7 +19560,7 @@ export class AccountingApi { headers: localVarHeaderParams, url: localVarPath, responseType: responseTypeOption, - data: ObjectSerializer.serialize(body, "string"), + data: ObjectSerializer.serialize(body, "RequestFile"), }; let authenticationPromise = Promise.resolve(); diff --git a/src/gen/api/appStoreApi.ts b/src/gen/api/appStoreApi.ts index be416be0..7b62316c 100644 --- a/src/gen/api/appStoreApi.ts +++ b/src/gen/api/appStoreApi.ts @@ -21,7 +21,7 @@ import { UpdateUsageRecord } from '../model/appstore/updateUsageRecord'; import { UsageRecord } from '../model/appstore/usageRecord'; import { UsageRecordsList } from '../model/appstore/usageRecordsList'; -import { ObjectSerializer, Authentication, VoidAuth } from '../model/appstore/models'; +import { ObjectSerializer, Authentication, VoidAuth, RequestFile } from '../model/appstore/models'; import { ApiError } from '../../model/ApiError'; import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Readable } from "stream"; diff --git a/src/gen/api/assetApi.ts b/src/gen/api/assetApi.ts index f4ab82ec..d0684a25 100644 --- a/src/gen/api/assetApi.ts +++ b/src/gen/api/assetApi.ts @@ -20,7 +20,7 @@ import { AssetType } from '../model/assets/assetType'; import { Assets } from '../model/assets/assets'; import { Setting } from '../model/assets/setting'; -import { ObjectSerializer, Authentication, VoidAuth } from '../model/assets/models'; +import { ObjectSerializer, Authentication, VoidAuth, RequestFile } from '../model/assets/models'; import { ApiError } from '../../model/ApiError'; import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Readable } from "stream"; diff --git a/src/gen/api/bankfeedsApi.ts b/src/gen/api/bankfeedsApi.ts index a1887181..68b49de7 100644 --- a/src/gen/api/bankfeedsApi.ts +++ b/src/gen/api/bankfeedsApi.ts @@ -19,7 +19,7 @@ import { FeedConnections } from '../model/bankfeeds/feedConnections'; import { Statement } from '../model/bankfeeds/statement'; import { Statements } from '../model/bankfeeds/statements'; -import { ObjectSerializer, Authentication, VoidAuth } from '../model/bankfeeds/models'; +import { ObjectSerializer, Authentication, VoidAuth, RequestFile } from '../model/bankfeeds/models'; import { ApiError } from '../../model/ApiError'; import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Readable } from "stream"; diff --git a/src/gen/api/filesApi.ts b/src/gen/api/filesApi.ts index 0e87e135..5df79d74 100644 --- a/src/gen/api/filesApi.ts +++ b/src/gen/api/filesApi.ts @@ -19,7 +19,7 @@ import { FileObject } from '../model/files/fileObject'; import { Files } from '../model/files/files'; import { Folder } from '../model/files/folder'; -import { ObjectSerializer, Authentication, VoidAuth } from '../model/files/models'; +import { ObjectSerializer, Authentication, VoidAuth, RequestFile } from '../model/files/models'; import { ApiError } from '../../model/ApiError'; import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Readable } from "stream"; @@ -1347,8 +1347,7 @@ export class FilesApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling uploadFile.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling uploadFile.'); @@ -1459,8 +1458,7 @@ export class FilesApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling uploadFileToFolder.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling uploadFileToFolder.'); diff --git a/src/gen/api/financeApi.ts b/src/gen/api/financeApi.ts index fcfd7cc4..fb6ce9c3 100644 --- a/src/gen/api/financeApi.ts +++ b/src/gen/api/financeApi.ts @@ -27,7 +27,7 @@ import { ReportHistoryResponse } from '../model/finance/reportHistoryResponse'; import { TrialBalanceResponse } from '../model/finance/trialBalanceResponse'; import { UserActivitiesResponse } from '../model/finance/userActivitiesResponse'; -import { ObjectSerializer, Authentication, VoidAuth } from '../model/finance/models'; +import { ObjectSerializer, Authentication, VoidAuth, RequestFile } from '../model/finance/models'; import { ApiError } from '../../model/ApiError'; import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Readable } from "stream"; diff --git a/src/gen/api/payrollAUApi.ts b/src/gen/api/payrollAUApi.ts index 26d49c1b..eff75af9 100644 --- a/src/gen/api/payrollAUApi.ts +++ b/src/gen/api/payrollAUApi.ts @@ -36,7 +36,7 @@ import { Timesheet } from '../model/payroll-au/timesheet'; import { TimesheetObject } from '../model/payroll-au/timesheetObject'; import { Timesheets } from '../model/payroll-au/timesheets'; -import { ObjectSerializer, Authentication, VoidAuth } from '../model/payroll-au/models'; +import { ObjectSerializer, Authentication, VoidAuth, RequestFile } from '../model/payroll-au/models'; import { ApiError } from '../../model/ApiError'; import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Readable } from "stream"; diff --git a/src/gen/api/payrollNZApi.ts b/src/gen/api/payrollNZApi.ts index b2c8b2d6..83a318e7 100644 --- a/src/gen/api/payrollNZApi.ts +++ b/src/gen/api/payrollNZApi.ts @@ -80,7 +80,7 @@ import { TimesheetObject } from '../model/payroll-nz/timesheetObject'; import { Timesheets } from '../model/payroll-nz/timesheets'; import { TrackingCategories } from '../model/payroll-nz/trackingCategories'; -import { ObjectSerializer, Authentication, VoidAuth } from '../model/payroll-nz/models'; +import { ObjectSerializer, Authentication, VoidAuth, RequestFile } from '../model/payroll-nz/models'; import { ApiError } from '../../model/ApiError'; import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Readable } from "stream"; diff --git a/src/gen/api/payrollUKApi.ts b/src/gen/api/payrollUKApi.ts index 8ec54fc4..602eebbf 100644 --- a/src/gen/api/payrollUKApi.ts +++ b/src/gen/api/payrollUKApi.ts @@ -77,7 +77,7 @@ import { TimesheetObject } from '../model/payroll-uk/timesheetObject'; import { Timesheets } from '../model/payroll-uk/timesheets'; import { TrackingCategories } from '../model/payroll-uk/trackingCategories'; -import { ObjectSerializer, Authentication, VoidAuth } from '../model/payroll-uk/models'; +import { ObjectSerializer, Authentication, VoidAuth, RequestFile } from '../model/payroll-uk/models'; import { ApiError } from '../../model/ApiError'; import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Readable } from "stream"; diff --git a/src/gen/api/projectApi.ts b/src/gen/api/projectApi.ts index 4700fdd5..89e2b990 100644 --- a/src/gen/api/projectApi.ts +++ b/src/gen/api/projectApi.ts @@ -27,7 +27,7 @@ import { TimeEntries } from '../model/projects/timeEntries'; import { TimeEntry } from '../model/projects/timeEntry'; import { TimeEntryCreateOrUpdate } from '../model/projects/timeEntryCreateOrUpdate'; -import { ObjectSerializer, Authentication, VoidAuth } from '../model/projects/models'; +import { ObjectSerializer, Authentication, VoidAuth, RequestFile } from '../model/projects/models'; import { ApiError } from '../../model/ApiError'; import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Readable } from "stream"; diff --git a/src/gen/model/accounting/models.ts b/src/gen/model/accounting/models.ts index 028fc90c..57ffaaea 100644 --- a/src/gen/model/accounting/models.ts +++ b/src/gen/model/accounting/models.ts @@ -272,6 +272,19 @@ import { User } from '././user'; import { Users } from '././users'; import { ValidationError } from '././validationError'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile | Readable; + /* tslint:disable:no-unused-variable */ let primitives = [ "string", diff --git a/src/gen/model/appstore/models.ts b/src/gen/model/appstore/models.ts index e1efdaab..d41df625 100644 --- a/src/gen/model/appstore/models.ts +++ b/src/gen/model/appstore/models.ts @@ -20,6 +20,19 @@ import { UpdateUsageRecord } from '././updateUsageRecord'; import { UsageRecord } from '././usageRecord'; import { UsageRecordsList } from '././usageRecordsList'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile | Readable; + /* tslint:disable:no-unused-variable */ let primitives = [ "string", diff --git a/src/gen/model/assets/models.ts b/src/gen/model/assets/models.ts index aba6faad..2a397f94 100644 --- a/src/gen/model/assets/models.ts +++ b/src/gen/model/assets/models.ts @@ -24,6 +24,19 @@ import { Pagination } from '././pagination'; import { ResourceValidationErrorsElement } from '././resourceValidationErrorsElement'; import { Setting } from '././setting'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile | Readable; + /* tslint:disable:no-unused-variable */ let primitives = [ "string", diff --git a/src/gen/model/bankfeeds/models.ts b/src/gen/model/bankfeeds/models.ts index 109c0065..9877b9dc 100644 --- a/src/gen/model/bankfeeds/models.ts +++ b/src/gen/model/bankfeeds/models.ts @@ -24,6 +24,19 @@ import { Statement } from '././statement'; import { StatementLine } from '././statementLine'; import { Statements } from '././statements'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile | Readable; + /* tslint:disable:no-unused-variable */ let primitives = [ "string", diff --git a/src/gen/model/files/models.ts b/src/gen/model/files/models.ts index ce1fa497..30b798e7 100644 --- a/src/gen/model/files/models.ts +++ b/src/gen/model/files/models.ts @@ -18,6 +18,19 @@ import { ObjectType } from '././objectType'; import { UploadObject } from '././uploadObject'; import { User } from '././user'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile | Readable; + /* tslint:disable:no-unused-variable */ let primitives = [ "string", diff --git a/src/gen/model/finance/models.ts b/src/gen/model/finance/models.ts index 0996263c..618da90d 100644 --- a/src/gen/model/finance/models.ts +++ b/src/gen/model/finance/models.ts @@ -108,6 +108,19 @@ import { TrialBalanceResponse } from '././trialBalanceResponse'; import { UserActivitiesResponse } from '././userActivitiesResponse'; import { UserResponse } from '././userResponse'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile | Readable; + /* tslint:disable:no-unused-variable */ let primitives = [ "string", diff --git a/src/gen/model/payroll-au/models.ts b/src/gen/model/payroll-au/models.ts index 7da3e62f..e9a98e69 100644 --- a/src/gen/model/payroll-au/models.ts +++ b/src/gen/model/payroll-au/models.ts @@ -176,6 +176,19 @@ import { Timesheets } from '././timesheets'; import { ValidationError } from '././validationError'; import { WorkCondition } from '././workCondition'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile | Readable; + /* tslint:disable:no-unused-variable */ let primitives = [ "string", diff --git a/src/gen/model/payroll-nz/employee.ts b/src/gen/model/payroll-nz/employee.ts index d2d32478..92cacdb4 100644 --- a/src/gen/model/payroll-nz/employee.ts +++ b/src/gen/model/payroll-nz/employee.ts @@ -12,16 +12,16 @@ export class Employee { /** * First name of employee */ - 'firstName'?: string; + 'firstName': string; /** * Last name of employee */ - 'lastName'?: string; + 'lastName': string; /** * Date of birth of the employee (YYYY-MM-DD) */ - 'dateOfBirth'?: string; - 'address'?: Address; + 'dateOfBirth': string; + 'address': Address; /** * The email address for the employee */ diff --git a/src/gen/model/payroll-nz/employment.ts b/src/gen/model/payroll-nz/employment.ts index 194f1113..3407edb5 100644 --- a/src/gen/model/payroll-nz/employment.ts +++ b/src/gen/model/payroll-nz/employment.ts @@ -3,7 +3,7 @@ export class Employment { /** * Xero unique identifier for the payroll calendar of the employee */ - 'payrollCalendarID'?: string; + 'payrollCalendarID': string; /** * Xero unique identifier for the payrun calendar for the employee (Deprecated in version 1.1.6) */ @@ -11,11 +11,11 @@ export class Employment { /** * Start date of the employment (YYYY-MM-DD) */ - 'startDate'?: string; + 'startDate': string; /** * Engagement type of the employee */ - 'engagementType'?: string; + 'engagementType': string; /** * End date for an employee with a fixed-term engagement type */ diff --git a/src/gen/model/payroll-nz/models.ts b/src/gen/model/payroll-nz/models.ts index a5eabb2e..25b7802c 100644 --- a/src/gen/model/payroll-nz/models.ts +++ b/src/gen/model/payroll-nz/models.ts @@ -210,6 +210,19 @@ import { TrackingCategories } from '././trackingCategories'; import { TrackingCategory } from '././trackingCategory'; import { WorkingWeek } from '././workingWeek'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile | Readable; + /* tslint:disable:no-unused-variable */ let primitives = [ "string", diff --git a/src/gen/model/payroll-uk/employee.ts b/src/gen/model/payroll-uk/employee.ts index c405e6fe..7c5afd52 100644 --- a/src/gen/model/payroll-uk/employee.ts +++ b/src/gen/model/payroll-uk/employee.ts @@ -8,20 +8,20 @@ export class Employee { /** * Title of the employee */ - 'title'?: string; + 'title': string; /** * First name of employee */ - 'firstName'?: string; + 'firstName': string; /** * Last name of employee */ - 'lastName'?: string; + 'lastName': string; /** * Date of birth of the employee (YYYY-MM-DD) */ - 'dateOfBirth'?: string; - 'address'?: Address; + 'dateOfBirth': string; + 'address': Address; /** * The email address for the employee */ @@ -29,7 +29,7 @@ export class Employee { /** * The employee’s gender */ - 'gender'?: Employee.GenderEnum; + 'gender': Employee.GenderEnum; /** * Employee phone number */ diff --git a/src/gen/model/payroll-uk/employment.ts b/src/gen/model/payroll-uk/employment.ts index af76f3c4..b4c69ccc 100644 --- a/src/gen/model/payroll-uk/employment.ts +++ b/src/gen/model/payroll-uk/employment.ts @@ -3,19 +3,19 @@ export class Employment { /** * Xero unique identifier for the payroll calendar of the employee */ - 'payrollCalendarID'?: string; + 'payrollCalendarID': string; /** * Start date of the employment (YYYY-MM-DD) */ - 'startDate'?: string; + 'startDate': string; /** * The employment number of the employee */ - 'employeeNumber'?: string; + 'employeeNumber': string; /** * The NI Category of the employee */ - 'niCategory'?: Employment.NiCategoryEnum; + 'niCategory': Employment.NiCategoryEnum; static discriminator: string | undefined = undefined; diff --git a/src/gen/model/payroll-uk/models.ts b/src/gen/model/payroll-uk/models.ts index 9b62edfc..7f8c2eb1 100644 --- a/src/gen/model/payroll-uk/models.ts +++ b/src/gen/model/payroll-uk/models.ts @@ -180,6 +180,19 @@ import { Timesheets } from '././timesheets'; import { TrackingCategories } from '././trackingCategories'; import { TrackingCategory } from '././trackingCategory'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile | Readable; + /* tslint:disable:no-unused-variable */ let primitives = [ "string", diff --git a/src/gen/model/projects/models.ts b/src/gen/model/projects/models.ts index 8c0992d0..b7b0b9f6 100644 --- a/src/gen/model/projects/models.ts +++ b/src/gen/model/projects/models.ts @@ -36,6 +36,19 @@ import { TimeEntries } from '././timeEntries'; import { TimeEntry } from '././timeEntry'; import { TimeEntryCreateOrUpdate } from '././timeEntryCreateOrUpdate'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile | Readable; + /* tslint:disable:no-unused-variable */ let primitives = [ "string",