From c5a9da963ae901ac9c2a092fbc9548a1ce5b13a4 Mon Sep 17 00:00:00 2001 From: Github Actions Date: Mon, 4 Nov 2024 12:35:16 +0000 Subject: [PATCH] Changes for Node while replacing Binary to Byte (#336) * Changes for Node while replacing Binary to Byte * fixed review comments: removed RequestDetailedFile as it is not being used * remove string as a type in Request File --------- Co-authored-by: vigneshk-tw --- docs/accounting/index.html | 1046 ++++++++++++++++++++++-- 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 | 508 +----------- 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 | 5 + src/gen/model/appstore/models.ts | 5 + src/gen/model/assets/models.ts | 5 + src/gen/model/bankfeeds/models.ts | 5 + src/gen/model/files/models.ts | 5 + src/gen/model/finance/models.ts | 5 + src/gen/model/payroll-au/models.ts | 5 + src/gen/model/payroll-nz/employee.ts | 8 +- src/gen/model/payroll-nz/employment.ts | 6 +- src/gen/model/payroll-nz/models.ts | 5 + src/gen/model/payroll-uk/employee.ts | 12 +- src/gen/model/payroll-uk/employment.ts | 8 +- src/gen/model/payroll-uk/models.ts | 5 + src/gen/model/projects/models.ts | 5 + 31 files changed, 1636 insertions(+), 654 deletions(-) diff --git a/docs/accounting/index.html b/docs/accounting/index.html index d5196aef..7d0eec57 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 @@ -7792,7 +7797,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -7959,7 +7968,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 +8186,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 @@ -8544,7 +8612,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -8715,7 +8787,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 +9014,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -9103,7 +9200,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 @@ -9452,7 +9557,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/ContactGroups" }, - "example" : "{ \"ContactGroups\": [{ \"Name\": \"VIPs\" }]}" + "example" : { + "ContactGroups" : [ { + "Name" : "VIPs" + } ] + } } }, "required" : true @@ -9631,7 +9740,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 +9925,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -9965,7 +10084,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 +10357,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 @@ -10617,7 +10804,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -10781,7 +10972,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 +11175,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 +11325,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 +11539,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -11482,7 +11702,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 @@ -11893,7 +12124,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -12069,7 +12304,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 +12549,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -12450,7 +12708,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 +12907,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 @@ -13022,7 +13295,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -13186,7 +13463,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 +13695,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 +13912,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -13763,7 +14073,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 +14264,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -14089,7 +14415,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 +14579,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 +14805,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 +15020,11 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -15212,7 +15573,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 @@ -15622,7 +15996,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -15784,7 +16162,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 +16369,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 @@ -16388,7 +16798,11 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -16909,7 +17327,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 +17541,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 +17690,9 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/TrackingOption" }, - "example" : "{ name: \" Bar\" }" + "example" : { + "name" : " Bar" + } } }, "required" : true @@ -17659,7 +18124,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 +18297,9 @@

Parameters

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

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/RequestEmpty" }, - "example" : "{}" + "example" : { } } }, "required" : true @@ -38076,7 +38550,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 +38759,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 @@ -38663,7 +39178,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 @@ -39278,7 +39863,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 @@ -39661,7 +40251,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/ContactGroups" }, - "example" : "{ \"ContactGroups\":[ { \"Name\":\"Suppliers\" } ] }" + "example" : { + "ContactGroups" : [ { + "Name" : "Suppliers" + } ] + } } }, "required" : true @@ -39860,7 +40454,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 @@ -40283,7 +40894,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 +41084,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 @@ -40873,7 +41503,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 +41714,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 +41915,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 @@ -41645,7 +42291,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 +42508,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 +42719,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 +42929,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 +43131,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 +43345,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 +43562,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 +43768,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 +43969,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 +44147,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 +44387,13 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PurchaseOrders" }, - "example" : "{ \"PurchaseOrders\": [ { \"AttentionTo\": \"Peter Parker\", \"LineItems\": [], \"Contact\": {} } ] }" + "example" : { + "PurchaseOrders" : [ { + "AttentionTo" : "Peter Parker", + "LineItems" : [ ], + "Contact" : { } + } ] + } } }, "required" : true @@ -43966,7 +44782,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 @@ -44356,7 +45180,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 @@ -44757,7 +45589,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 @@ -45112,7 +45990,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 +46174,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/TrackingCategory" }, - "example" : "{ \"Name\": \"Avengers\" }" + "example" : { + "Name" : "Avengers" + } } }, "required" : true @@ -45487,7 +46377,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..596f0ea1 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"; @@ -247,8 +247,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createAccountAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -278,26 +277,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -357,8 +336,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createBankTransactionAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -388,26 +366,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -708,8 +666,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createBankTransferAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -739,26 +696,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -1143,8 +1080,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createContactAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -1174,26 +1110,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -1660,8 +1576,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createCreditNoteAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + if (includeOnline !== undefined) { localVarQueryParameters['IncludeOnline'] = ObjectSerializer.serialize(includeOnline, "boolean"); } @@ -1695,26 +1610,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -2254,8 +2149,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createInvoiceAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + if (includeOnline !== undefined) { localVarQueryParameters['IncludeOnline'] = ObjectSerializer.serialize(includeOnline, "boolean"); } @@ -2289,26 +2183,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -2777,8 +2651,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createManualJournalAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -2808,26 +2681,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -3699,8 +3552,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createPurchaseOrderAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -3730,26 +3582,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -3971,8 +3803,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createQuoteAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -4002,26 +3833,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -4323,8 +4134,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createReceiptAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -4354,26 +4164,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -4515,8 +4305,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createRepeatingInvoiceAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -4546,26 +4335,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -16537,8 +16306,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateAccountAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -16568,26 +16336,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -16734,8 +16482,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateBankTransactionAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -16765,26 +16512,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -16843,8 +16570,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateBankTransferAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -16874,26 +16600,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -17034,8 +16740,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateContactAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -17065,26 +16770,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -17313,8 +16998,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateCreditNoteAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -17344,26 +17028,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -17592,8 +17256,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateInvoiceAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -17623,26 +17286,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -17953,8 +17596,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateManualJournalAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -17984,26 +17626,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -18965,8 +18587,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updatePurchaseOrderAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -18996,26 +18617,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -19157,8 +18758,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateQuoteAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -19188,26 +18788,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -19354,8 +18934,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateReceiptAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -19385,26 +18964,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { @@ -19546,8 +19105,7 @@ export class AccountingApi { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updateRepeatingInvoiceAttachmentByFileName.'); } - this.binaryHeaders = {'Accept': 'application/json'}; - (Object).assign(localVarHeaderParams, this.binaryHeaders); + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['Idempotency-Key'] = ObjectSerializer.serialize(idempotencyKey, "string"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -19577,26 +19135,6 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - }).then(() => { - // Reads file stream as chunks so we can put it in body of request. - // This collects the whole file into memory, which is why we do it _after_ authentication. - return new Promise((resolve, reject) => { - let bodyStream; - bodyStream = Buffer.isBuffer(body) ? Readable.from(body) : body - const fileContents: any[] = []; - bodyStream.on('data', (chunk) => { - fileContents.push(chunk); - }); - bodyStream.on('end', () => { - resolve(fileContents); - }); - bodyStream.on('error', (err) => { - reject(err); - }) - }); - }).then((fileContents) => { - const file = Buffer.concat(fileContents); - localVarRequestOptions.data = file; return new Promise<{ response: AxiosResponse; body: Attachments; }>(async (resolve, reject) => { let body = null try { 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..9db7b137 100644 --- a/src/gen/model/accounting/models.ts +++ b/src/gen/model/accounting/models.ts @@ -272,6 +272,11 @@ import { User } from '././user'; import { Users } from '././users'; import { ValidationError } from '././validationError'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export type RequestFile = Buffer | fs.ReadStream | 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..9f6d16e2 100644 --- a/src/gen/model/appstore/models.ts +++ b/src/gen/model/appstore/models.ts @@ -20,6 +20,11 @@ import { UpdateUsageRecord } from '././updateUsageRecord'; import { UsageRecord } from '././usageRecord'; import { UsageRecordsList } from '././usageRecordsList'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export type RequestFile = Buffer | fs.ReadStream | 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..5dfe0b1a 100644 --- a/src/gen/model/assets/models.ts +++ b/src/gen/model/assets/models.ts @@ -24,6 +24,11 @@ import { Pagination } from '././pagination'; import { ResourceValidationErrorsElement } from '././resourceValidationErrorsElement'; import { Setting } from '././setting'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export type RequestFile = Buffer | fs.ReadStream | 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..c725a02f 100644 --- a/src/gen/model/bankfeeds/models.ts +++ b/src/gen/model/bankfeeds/models.ts @@ -24,6 +24,11 @@ import { Statement } from '././statement'; import { StatementLine } from '././statementLine'; import { Statements } from '././statements'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export type RequestFile = Buffer | fs.ReadStream | 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..b871bba2 100644 --- a/src/gen/model/files/models.ts +++ b/src/gen/model/files/models.ts @@ -18,6 +18,11 @@ import { ObjectType } from '././objectType'; import { UploadObject } from '././uploadObject'; import { User } from '././user'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export type RequestFile = Buffer | fs.ReadStream | 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..c827e47a 100644 --- a/src/gen/model/finance/models.ts +++ b/src/gen/model/finance/models.ts @@ -108,6 +108,11 @@ import { TrialBalanceResponse } from '././trialBalanceResponse'; import { UserActivitiesResponse } from '././userActivitiesResponse'; import { UserResponse } from '././userResponse'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export type RequestFile = Buffer | fs.ReadStream | 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..1146ac66 100644 --- a/src/gen/model/payroll-au/models.ts +++ b/src/gen/model/payroll-au/models.ts @@ -176,6 +176,11 @@ import { Timesheets } from '././timesheets'; import { ValidationError } from '././validationError'; import { WorkCondition } from '././workCondition'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export type RequestFile = Buffer | fs.ReadStream | 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..1ebc2d5b 100644 --- a/src/gen/model/payroll-nz/models.ts +++ b/src/gen/model/payroll-nz/models.ts @@ -210,6 +210,11 @@ import { TrackingCategories } from '././trackingCategories'; import { TrackingCategory } from '././trackingCategory'; import { WorkingWeek } from '././workingWeek'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export type RequestFile = Buffer | fs.ReadStream | 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..7c02a47c 100644 --- a/src/gen/model/payroll-uk/models.ts +++ b/src/gen/model/payroll-uk/models.ts @@ -180,6 +180,11 @@ import { Timesheets } from '././timesheets'; import { TrackingCategories } from '././trackingCategories'; import { TrackingCategory } from '././trackingCategory'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export type RequestFile = Buffer | fs.ReadStream | 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..44ed8647 100644 --- a/src/gen/model/projects/models.ts +++ b/src/gen/model/projects/models.ts @@ -36,6 +36,11 @@ import { TimeEntries } from '././timeEntries'; import { TimeEntry } from '././timeEntry'; import { TimeEntryCreateOrUpdate } from '././timeEntryCreateOrUpdate'; +import * as fs from 'fs'; +import { Readable } from "stream"; + +export type RequestFile = Buffer | fs.ReadStream | Readable; + /* tslint:disable:no-unused-variable */ let primitives = [ "string",