diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml index 14acf9cb..14722dcc 100644 --- a/.github/workflows/build-test-lint.yml +++ b/.github/workflows/build-test-lint.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Python environment uses: actions/setup-python@v5 - with: + with: python-version: '3.8' cache: 'pip' @@ -27,20 +27,37 @@ jobs: pip install --upgrade pip pip install black sudo pip install flake8 + sudo pip install pip-audit pip install -r requirements.txt -r requirements/dev.txt working-directory: xero-python - + - name: Run Flake8 run: flake8 xero_python working-directory: xero-python - + - name: Build package run: python setup.py sdist working-directory: xero-python - # - name: Run Test - # run: | - # source venv/bin/activate - # pip install -r requirements/test.txt - # pytest -v - # working-directory: xero-python \ No newline at end of file + - name: Set up Node environment + uses: actions/setup-node@v2 + with: + node-version: 20 + + - name: Install Prism + run: npm install -g @stoplight/prism-cli + + - name: Start PRISM Server + run: ./start-prism.sh & sleep 15 + working-directory: xero-python/tests/utils + + - name: Run Test + run: | + source venv/bin/activate + pytest -v + working-directory: xero-python + + - name: Stop PRISM + if: success() || failure() + run: pkill -f prism + working-directory: xero-python diff --git a/README.md b/README.md index bc6bbf51..2bfd07da 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ The xero-python SDK makes it easy for developers to access Xero's APIs in their - [Helper Methods](#helper-methods) - [Usage Examples](#usage-examples) - [SDK conventions](#sdk-conventions) +- [Running Test(s) in Local](#running-tests-in-local) - [Participating in Xero’s developer community](#participating-in-xeros-developer-community) - [Contributing](#contributing) @@ -540,6 +541,18 @@ created_invoice_attachments_by_file_name = accounting_api.create_invoice_attachm --- ## SDK conventions + +--- +## Running Test(s) in Local +For Running Test cases PRISM Mock Server needs to be started in the local machine. +Steps to Run Test(s) +* Install PRISM from npm using the command: **npm install -g @stoplight/prism-cli** +* Verify Installation: **prism --version** +* Navigate to **tests--> utils--> ** folder in the terminal +* Execute the script **./start-prism.sh** +* This will start the PRISM Server in Local +* Run **pytest** to run the dotnet test cases. + ### Querying & Filtering Describe the support for query options and filtering diff --git a/docs/v1/accounting/index.html b/docs/v1/accounting/index.html index a5e158a8..896c6e70 100644 --- a/docs/v1/accounting/index.html +++ b/docs/v1/accounting/index.html @@ -7214,7 +7214,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 @@ -7267,10 +7272,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.create_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, body, idempotency_key) print(api_response) @@ -7406,7 +7407,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -7423,7 +7424,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -7477,10 +7478,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.create_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body, idempotency_key) print(api_response) @@ -7616,7 +7613,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -7633,7 +7630,7 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -7995,7 +7996,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 @@ -8204,7 +8221,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 @@ -8257,10 +8317,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.create_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body, idempotency_key) print(api_response) @@ -8396,7 +8452,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -8413,7 +8469,7 @@

Parameters

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

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -9185,7 +9270,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 @@ -9238,10 +9331,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.create_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, body, idempotency_key) print(api_response) @@ -9377,7 +9466,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -9394,7 +9483,7 @@

Parameters

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

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -10089,7 +10192,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 @@ -10311,7 +10473,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 @@ -10392,10 +10563,6 @@

Usage and SDK Samples

include_online = 'True' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.create_credit_note_attachment_by_file_name(xero_tenant_id, credit_note_id, file_name, body, include_online, idempotency_key) print(api_response) @@ -10531,7 +10698,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -10548,7 +10715,7 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -10935,7 +11106,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 @@ -11134,7 +11319,10 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/Currency" }, - "example" : "{ \"Code\": \"USD\", \"Description\": \"United States Dollar\" }" + "example" : { + "Code" : "USD", + "Description" : "United States Dollar" + } } }, "required" : true @@ -11290,7 +11478,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 @@ -11505,7 +11701,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -11672,7 +11872,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 @@ -11726,10 +11937,6 @@

Usage and SDK Samples

include_online = 'True' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.create_invoice_attachment_by_file_name(xero_tenant_id, invoice_id, file_name, body, include_online, idempotency_key) print(api_response) @@ -11865,7 +12072,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -11882,7 +12089,7 @@

Parameters

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

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -12678,7 +12912,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 @@ -12877,7 +13121,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 @@ -12930,10 +13179,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.create_manual_journal_attachment_by_file_name(xero_tenant_id, manual_journal_id, file_name, body, idempotency_key) print(api_response) @@ -13069,7 +13314,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -13086,7 +13331,7 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -13447,7 +13696,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 @@ -13669,7 +13936,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 @@ -13884,7 +14162,11 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -14392,7 +14690,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 @@ -14557,7 +14861,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 @@ -14779,7 +15095,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 @@ -14994,7 +15319,11 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -15047,10 +15376,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.create_purchase_order_attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, body, idempotency_key) print(api_response) @@ -15186,7 +15511,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -15203,7 +15528,7 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -15562,7 +15891,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 @@ -15642,10 +15984,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.create_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, body, idempotency_key) print(api_response) @@ -15781,7 +16119,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -15798,7 +16136,7 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -16157,7 +16499,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 @@ -16357,7 +16712,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 @@ -16437,10 +16811,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.create_receipt_attachment_by_file_name(xero_tenant_id, receipt_id, file_name, body, idempotency_key) print(api_response) @@ -16576,7 +16946,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -16593,7 +16963,7 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -16835,10 +17209,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.create_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, body, idempotency_key) print(api_response) @@ -16974,7 +17344,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -16991,7 +17361,7 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/HistoryRecords" }, - "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }" + "example" : { + "HistoryRecords" : [ { + "Details" : "Hello World" + } ] + } } }, "required" : true @@ -17329,7 +17703,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 @@ -17518,7 +17927,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 @@ -17669,7 +18086,9 @@

Parameters

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

Parameters

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

Parameters

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

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/RequestEmpty" }, - "example" : "{}" + "example" : { } } }, "required" : true @@ -40052,7 +40482,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 @@ -40244,7 +40700,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 @@ -40297,10 +40768,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.update_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, body, idempotency_key) print(api_response) @@ -40436,7 +40903,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -40453,7 +40920,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -40660,7 +41127,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 @@ -40740,10 +41277,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.update_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body, idempotency_key) print(api_response) @@ -40879,7 +41412,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -40896,7 +41429,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -40950,10 +41483,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.update_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body, idempotency_key) print(api_response) @@ -41089,7 +41618,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -41106,7 +41635,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -41296,7 +41825,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 @@ -41349,10 +41883,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.update_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, body, idempotency_key) print(api_response) @@ -41488,7 +42018,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -41505,7 +42035,7 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/ContactGroups" }, - "example" : "{ \"ContactGroups\":[ { \"Name\":\"Suppliers\" } ] }" + "example" : { + "ContactGroups" : [ { + "Name" : "Suppliers" + } ] + } } }, "required" : true @@ -41900,7 +42434,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 @@ -41980,10 +42531,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.update_credit_note_attachment_by_file_name(xero_tenant_id, credit_note_id, file_name, body, idempotency_key) print(api_response) @@ -42119,7 +42666,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -42136,7 +42683,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -42337,7 +42884,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 @@ -42524,7 +43082,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 @@ -42604,10 +43170,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.update_invoice_attachment_by_file_name(xero_tenant_id, invoice_id, file_name, body, idempotency_key) print(api_response) @@ -42743,7 +43305,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -42760,7 +43322,7 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/Items" }, - "example" : "{ \"Items\": [ { \"Code\": \"ItemCode123\", \"Description\": \"Description 123\" } ] }" + "example" : { + "Items" : [ { + "Code" : "ItemCode123", + "Description" : "Description 123" + } ] + } } }, "required" : true @@ -43164,7 +43731,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 @@ -43368,7 +43940,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 @@ -43421,10 +43999,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.update_manual_journal_attachment_by_file_name(xero_tenant_id, manual_journal_id, file_name, body, idempotency_key) print(api_response) @@ -43560,7 +44134,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -43577,7 +44151,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -43750,7 +44324,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 @@ -43960,7 +44550,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 @@ -44158,7 +44768,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 @@ -44361,7 +44987,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 @@ -44562,7 +45196,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 @@ -44765,7 +45418,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 @@ -44984,7 +45643,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 @@ -45180,7 +45857,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 @@ -45376,7 +46066,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 @@ -45552,7 +46255,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 @@ -45766,7 +46504,13 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PurchaseOrders" }, - "example" : "{ \"PurchaseOrders\": [ { \"AttentionTo\": \"Peter Parker\", \"LineItems\": [], \"Contact\": {} } ] }" + "example" : { + "PurchaseOrders" : [ { + "AttentionTo" : "Peter Parker", + "LineItems" : [ ], + "Contact" : { } + } ] + } } }, "required" : true @@ -45819,10 +46563,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.update_purchase_order_attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, body, idempotency_key) print(api_response) @@ -45958,7 +46698,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -45975,7 +46715,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -46169,7 +46909,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 @@ -46222,10 +46970,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.update_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, body, idempotency_key) print(api_response) @@ -46361,7 +47105,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -46378,7 +47122,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -46572,7 +47316,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 @@ -46652,10 +47404,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.update_receipt_attachment_by_file_name(xero_tenant_id, receipt_id, file_name, body, idempotency_key) print(api_response) @@ -46791,7 +47539,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -46808,7 +47556,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -46990,7 +47738,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 @@ -47043,10 +47837,6 @@

Usage and SDK Samples

file_name = 'xero-dev.jpg' idempotency_key = 'KEY_VALUE' - path_to_upload = Path(__file__).resolve().parent.joinpath(fileName) - open_file = open(path_to_upload, 'rb') - body = open_file.read() - try: api_response = api_instance.update_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, body, idempotency_key) print(api_response) @@ -47182,7 +47972,7 @@

Parameters

- byte[] + File
Byte array of file in body of request @@ -47199,7 +47989,7 @@

Parameters

"application/octet-stream" : { "schema" : { "type" : "string", - "format" : "byte" + "format" : "binary" } } }, @@ -47361,7 +48151,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 @@ -47545,7 +48345,9 @@

Parameters

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

Parameters

"schema" : { "$ref" : "#/components/schemas/TrackingOption" }, - "example" : "{ name: \"Vision\" }" + "example" : { + "name" : "Vision" + } } }, "required" : true diff --git a/docs/v1/appstore/index.html b/docs/v1/appstore/index.html index 62e29247..8fcce44b 100644 --- a/docs/v1/appstore/index.html +++ b/docs/v1/appstore/index.html @@ -1634,7 +1634,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 @@ -1846,7 +1849,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/UpdateUsageRecord" }, - "example" : "{ \"quantity\": 10 }" + "example" : { + "quantity" : 10 + } } }, "required" : true diff --git a/docs/v1/assets/index.html b/docs/v1/assets/index.html index 65ff8f58..f85b4cd6 100644 --- a/docs/v1/assets/index.html +++ b/docs/v1/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", @@ -1573,7 +1571,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 @@ -1734,7 +1753,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/v1/payroll-au/index.html b/docs/v1/payroll-au/index.html index 4b959733..9a384145 100644 --- a/docs/v1/payroll-au/index.html +++ b/docs/v1/payroll-au/index.html @@ -4173,7 +4173,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 @@ -8365,7 +8383,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/v1/payroll-nz/index.html b/docs/v1/payroll-nz/index.html index 18d98093..2c9b88cb 100644 --- a/docs/v1/payroll-nz/index.html +++ b/docs/v1/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" : { @@ -2463,7 +2463,7 @@ }; defs["Employment"] = { "title" : "", - "required" : [ "EngagementType", "PayrollCalendarID", "StartDate" ], + "required" : [ "engagementType", "payrollCalendarID", "startDate" ], "type" : "object", "properties" : { "payrollCalendarID" : { @@ -4610,7 +4610,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 @@ -4762,7 +4766,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 @@ -4922,7 +4932,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 @@ -5114,7 +5137,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 @@ -5304,7 +5332,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 @@ -5498,7 +5531,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 @@ -5685,7 +5727,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 @@ -6067,6 +6119,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" + } ] } } }, @@ -6254,7 +6318,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 @@ -6445,7 +6519,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 @@ -6633,7 +6718,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 @@ -6785,7 +6875,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 @@ -7128,7 +7222,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 @@ -7282,7 +7384,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 @@ -7435,7 +7542,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 @@ -7590,7 +7702,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 @@ -7745,7 +7864,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 @@ -7934,7 +8067,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 @@ -13982,7 +14119,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 @@ -14201,7 +14351,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 @@ -14416,7 +14570,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 @@ -14630,7 +14795,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 @@ -14825,6 +15000,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 } } }, @@ -15013,7 +15206,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PayRun" }, - "example" : "{ \"paymentDate\": \"2019-07-01\" }" + "example" : { + "paymentDate" : "2019-07-01" + } } }, "required" : true @@ -15208,7 +15403,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 @@ -15424,7 +15693,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/v1/payroll-uk/index.html b/docs/v1/payroll-uk/index.html index 417d72a3..d8a45b7e 100644 --- a/docs/v1/payroll-uk/index.html +++ b/docs/v1/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" : { @@ -4118,7 +4118,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 @@ -4271,7 +4279,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 @@ -4424,7 +4437,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 @@ -4584,7 +4603,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 @@ -4963,7 +4995,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 @@ -5150,7 +5187,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 @@ -5338,7 +5379,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 @@ -5530,7 +5578,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 @@ -5718,7 +5773,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 @@ -5873,7 +5937,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 @@ -6213,7 +6285,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 @@ -6559,7 +6635,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 @@ -6710,7 +6791,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 @@ -6865,7 +6949,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 @@ -7054,7 +7152,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 @@ -13287,7 +13389,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 @@ -13506,7 +13622,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 @@ -13721,7 +13841,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 @@ -13909,7 +14040,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 @@ -14124,7 +14262,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 @@ -14312,7 +14458,9 @@

Parameters

"schema" : { "$ref" : "#/components/schemas/PayRun" }, - "example" : "{ \"paymentDate\": \"2020-05-01\" }" + "example" : { + "paymentDate" : "2020-05-01" + } } }, "required" : true @@ -14528,7 +14676,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/v1/projects/index.html b/docs/v1/projects/index.html index 03ba1d1f..34717203 100644 --- a/docs/v1/projects/index.html +++ b/docs/v1/projects/index.html @@ -2032,7 +2032,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 @@ -4482,7 +4488,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/requirements.txt b/requirements.txt index 11231fa7..f1163e77 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ python-dateutil>=2.7 urllib3 certifi +setuptools>=75.1.0 diff --git a/tests/utils/start-prism.sh b/tests/utils/start-prism.sh new file mode 100755 index 00000000..be7c09e3 --- /dev/null +++ b/tests/utils/start-prism.sh @@ -0,0 +1,12 @@ +#!/bin/bash +branchName=${1:-"master"} + +prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/$branchName/xero_accounting.yaml --host 127.0.0.1 --port 4010 & +prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/$branchName/xero-app-store.yaml --host 127.0.0.1 --port 4011 & +prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/$branchName/xero_assets.yaml --host 127.0.0.1 --port 4012 & +prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/$branchName/xero_bankfeeds.yaml --host 127.0.0.1 --port 4013 & +prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/$branchName/xero-finance.yaml --host 127.0.0.1 --port 4014 & +prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/$branchName/xero-payroll-uk.yaml --host 127.0.0.1 --port 4015 & +prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/$branchName/xero-payroll-nz.yaml --host 127.0.0.1 --port 4016 & +prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/$branchName/xero-payroll-au.yaml --host 127.0.0.1 --port 4017 & +prism mock https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/refs/heads/$branchName/xero-projects.yaml --host 127.0.0.1 --port 4018 diff --git a/xero_python/accounting/api/accounting_api.py b/xero_python/accounting/api/accounting_api.py index 03550422..ffe5eb71 100644 --- a/xero_python/accounting/api/accounting_api.py +++ b/xero_python/accounting/api/accounting_api.py @@ -156,7 +156,7 @@ def create_account_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str account_id: Unique identifier for Account object (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -261,7 +261,7 @@ def create_bank_transaction_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str bank_transaction_id: Xero generated unique identifier for a bank transaction (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -642,7 +642,7 @@ def create_bank_transfer_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str bank_transfer_id: Xero generated unique identifier for a bank transfer (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -1126,7 +1126,7 @@ def create_contact_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str contact_id: Unique identifier for a Contact (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -1696,7 +1696,7 @@ def create_credit_note_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str credit_note_id: Unique identifier for a Credit Note (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param bool include_online: Allows an attachment to be seen by the end customer within their online invoice :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only @@ -2349,7 +2349,7 @@ def create_invoice_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str invoice_id: Unique identifier for an Invoice (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param bool include_online: Allows an attachment to be seen by the end customer within their online invoice :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only @@ -2917,7 +2917,7 @@ def create_manual_journal_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str manual_journal_id: Unique identifier for a ManualJournal (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -3950,7 +3950,7 @@ def create_purchase_order_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str purchase_order_id: Unique identifier for an Purchase Order (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -4242,7 +4242,7 @@ def create_quote_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str quote_id: Unique identifier for an Quote (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -4619,7 +4619,7 @@ def create_receipt_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str receipt_id: Unique identifier for a Receipt (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -4818,7 +4818,7 @@ def create_repeating_invoice_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str repeating_invoice_id: Unique identifier for a Repeating Invoice (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -17382,7 +17382,7 @@ def update_account_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str account_id: Unique identifier for Account object (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -17586,7 +17586,7 @@ def update_bank_transaction_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str bank_transaction_id: Xero generated unique identifier for a bank transaction (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -17693,7 +17693,7 @@ def update_bank_transfer_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str bank_transfer_id: Xero generated unique identifier for a bank transfer (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -17894,7 +17894,7 @@ def update_contact_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str contact_id: Unique identifier for a Contact (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -18192,7 +18192,7 @@ def update_credit_note_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str credit_note_id: Unique identifier for a Credit Note (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -18492,7 +18492,7 @@ def update_invoice_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str invoice_id: Unique identifier for an Invoice (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -18882,7 +18882,7 @@ def update_manual_journal_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str manual_journal_id: Unique identifier for a ManualJournal (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -20003,7 +20003,7 @@ def update_purchase_order_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str purchase_order_id: Unique identifier for an Purchase Order (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -20203,7 +20203,7 @@ def update_quote_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str quote_id: Unique identifier for an Quote (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -20407,7 +20407,7 @@ def update_receipt_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str receipt_id: Unique identifier for a Receipt (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models @@ -20606,7 +20606,7 @@ def update_repeating_invoice_attachment_by_file_name( :param str xero_tenant_id: Xero identifier for Tenant (required) :param str repeating_invoice_id: Unique identifier for a Repeating Invoice (required) :param str file_name: Name of the attachment (required) - :param str body: Byte array of file in body of request (required) + :param file body: Byte array of file in body of request (required) :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models diff --git a/xero_python/accounting/docs/AccountingApi.md b/xero_python/accounting/docs/AccountingApi.md index a08ba308..5d11b0a9 100644 --- a/xero_python/accounting/docs/AccountingApi.md +++ b/xero_python/accounting/docs/AccountingApi.md @@ -275,7 +275,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -account = { "Code":"123456", "Name":"Foobar", "Type":"EXPENSE", "Description":"Hello World" } # Account | Account object in body of request +account = {"Code":"123456","Name":"Foobar","Type":"EXPENSE","Description":"Hello World"} # Account | Account object in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new chart of accounts @@ -342,7 +342,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant account_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for Account object file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an attachment on a specific account @@ -359,7 +359,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **account_id** | [**str**](.md)| Unique identifier for Account object | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -411,7 +411,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant bank_transaction_id = '00000000-0000-0000-0000-000000000000' # str | Xero generated unique identifier for a bank transaction file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an attachment for a specific bank transaction by filename @@ -428,7 +428,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **bank_transaction_id** | [**str**](.md)| Xero generated unique identifier for a bank transaction | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -479,7 +479,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant bank_transaction_id = '00000000-0000-0000-0000-000000000000' # str | Xero generated unique identifier for a bank transaction -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific bank transactions @@ -545,7 +545,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -bank_transactions = { 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" }}]} # BankTransactions | BankTransactions with an array of BankTransaction objects in body of request +bank_transactions = {"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"}}]} # BankTransactions | BankTransactions with an array of BankTransaction objects in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) @@ -614,7 +614,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -bank_transfers = { "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" } ] } # BankTransfers | BankTransfers with array of BankTransfer objects in request body +bank_transfers = {"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"}]} # BankTransfers | BankTransfers with array of BankTransfer objects in request body idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a bank transfer @@ -681,7 +681,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant bank_transfer_id = '00000000-0000-0000-0000-000000000000' # str | Xero generated unique identifier for a bank transfer file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: api_response = api_instance.create_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body, idempotency_key=idempotency_key) @@ -697,7 +697,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **bank_transfer_id** | [**str**](.md)| Xero generated unique identifier for a bank transfer | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -748,7 +748,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant bank_transfer_id = '00000000-0000-0000-0000-000000000000' # str | Xero generated unique identifier for a bank transfer -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific bank transfer @@ -814,7 +814,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -batch_payments = { "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" } } ] } ] } # BatchPayments | BatchPayments with an array of Payments in body of request +batch_payments = {"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"}}]}]} # BatchPayments | BatchPayments with an array of Payments in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -882,7 +882,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant batch_payment_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for BatchPayment -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific batch payment @@ -949,7 +949,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant branding_theme_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Branding Theme -payment_services = { "PaymentServices": [ { "PaymentServiceID": "54b3b4f6-0443-4fba-bcd1-61ec0c35ca55", "PaymentServiceName": "PayUpNow", "PaymentServiceUrl": "https://www.payupnow.com/", "PaymentServiceType": "Custom", "PayNowText": "Time To Pay" } ] } # PaymentServices | PaymentServices array with PaymentService object in body of request +payment_services = {"PaymentServices":[{"PaymentServiceID":"54b3b4f6-0443-4fba-bcd1-61ec0c35ca55","PaymentServiceName":"PayUpNow","PaymentServiceUrl":"https://www.payupnow.com/","PaymentServiceType":"Custom","PayNowText":"Time To Pay"}]} # PaymentServices | PaymentServices array with PaymentService object in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new custom payment service for a specific branding theme @@ -1017,7 +1017,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant contact_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Contact file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: api_response = api_instance.create_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, body, idempotency_key=idempotency_key) @@ -1033,7 +1033,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **contact_id** | [**str**](.md)| Unique identifier for a Contact | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -1083,7 +1083,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -contact_groups = { "ContactGroups": [{ "Name": "VIPs" }]} # ContactGroups | ContactGroups with an array of names in request body +contact_groups = {"ContactGroups":[{"Name":"VIPs"}]} # ContactGroups | ContactGroups with an array of names in request body idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a contact group @@ -1149,7 +1149,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant contact_group_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Contact Group -contacts = { "Contacts": [ { "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7" }, { "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3" } ] } # Contacts | Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request +contacts = {"Contacts":[{"ContactID":"a3675fc4-f8dd-4f03-ba5b-f1870566bcd7"},{"ContactID":"4e1753b9-018a-4775-b6aa-1bc7871cfee3"}]} # Contacts | Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates contacts to a specific contact group @@ -1216,7 +1216,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant contact_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Contact -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new history record for a specific contact @@ -1282,7 +1282,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -contacts = { "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": [] } ] } # Contacts | Contacts with an array of Contact objects to create in body of request +contacts = {"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":[]}]} # Contacts | Contacts with an array of Contact objects to create in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -1350,7 +1350,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant credit_note_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Credit Note -allocations = { "Allocations": [ { "Invoice": { "LineItems": [], "InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841" }, "Amount": 1, "Date": "2019-03-05" } ] } # Allocations | Allocations with array of Allocation object in body of request. +allocations = {"Allocations":[{"Invoice":{"LineItems":[],"InvoiceID":"c45720a1-ade3-4a38-a064-d15489be6841"},"Amount":1,"Date":"2019-03-05"}]} # Allocations | Allocations with array of Allocation object in body of request. summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -1420,7 +1420,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant credit_note_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Credit Note file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request include_online = False # bool | Allows an attachment to be seen by the end customer within their online invoice (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -1438,7 +1438,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **credit_note_id** | [**str**](.md)| Unique identifier for a Credit Note | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **include_online** | **bool**| Allows an attachment to be seen by the end customer within their online invoice | [optional] [default to False] **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] @@ -1490,7 +1490,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant credit_note_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Credit Note -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Retrieves history records of a specific credit note @@ -1556,7 +1556,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -credit_notes = { "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" } ] } ] } # CreditNotes | Credit Notes with array of CreditNote object in body of request +credit_notes = {"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"}]}]} # CreditNotes | Credit Notes with array of CreditNote object in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) @@ -1625,7 +1625,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -currency = { "Code": "USD", "Description": "United States Dollar" } # Currency | Currency object in the body of request +currency = {"Code":"USD","Description":"United States Dollar"} # Currency | Currency object in the body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Create a new currency for a Xero organisation @@ -1690,7 +1690,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -employees = { "Employees": [ { "FirstName": "Nick", "LastName": "Fury", "ExternalLink": { "Url": "http://twitter.com/#!/search/Nick+Fury" } } ] } # Employees | Employees with array of Employee object in body of request +employees = {"Employees":[{"FirstName":"Nick","LastName":"Fury","ExternalLink":{"Url":"http://twitter.com/#!/search/Nick+Fury"}}]} # Employees | Employees with array of Employee object in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -1758,7 +1758,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant expense_claim_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a ExpenseClaim -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific expense claim @@ -1824,7 +1824,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -expense_claims = { "ExpenseClaims": [ { "Status": "SUBMITTED", "User": { "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273" }, "Receipts": [ { "Lineitems": [], "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816" } ] } ] } # ExpenseClaims | ExpenseClaims with array of ExpenseClaim object in body of request +expense_claims = {"ExpenseClaims":[{"Status":"SUBMITTED","User":{"UserID":"d1164823-0ac1-41ad-987b-b4e30fe0b273"},"Receipts":[{"Lineitems":[],"ReceiptID":"dc1c7f6d-0a4c-402f-acac-551d62ce5816"}]}]} # ExpenseClaims | ExpenseClaims with array of ExpenseClaim object in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates expense claims @@ -1891,7 +1891,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant invoice_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Invoice file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request include_online = False # bool | Allows an attachment to be seen by the end customer within their online invoice (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -1909,7 +1909,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **invoice_id** | [**str**](.md)| Unique identifier for an Invoice | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **include_online** | **bool**| Allows an attachment to be seen by the end customer within their online invoice | [optional] [default to False] **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] @@ -1961,7 +1961,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant invoice_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Invoice -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific invoice @@ -2027,7 +2027,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -invoices = { "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" } ] } # Invoices | Invoices with an array of invoice objects in body of request +invoices = {"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"}]} # Invoices | Invoices with an array of invoice objects in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) @@ -2097,7 +2097,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant item_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Item -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific item @@ -2163,7 +2163,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -items = { "Items": [ { "Code": "code123", "Name": "Item Name XYZ", "Description": "Foobar", "InventoryAssetAccountCode": "140", "PurchaseDetails": { "COGSAccountCode": "500" } } ] } # Items | Items with an array of Item objects in body of request +items = {"Items":[{"Code":"code123","Name":"Item Name XYZ","Description":"Foobar","InventoryAssetAccountCode":"140","PurchaseDetails":{"COGSAccountCode":"500"}}]} # Items | Items with an array of Item objects in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) @@ -2232,7 +2232,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -linked_transaction = { "LinkedTransactions": [ { "SourceTransactionID": "a848644a-f20f-4630-98c3-386bd7505631", "SourceLineItemID": "b0df260d-3cc8-4ced-9bd6-41924f624ed3" } ] } # LinkedTransaction | LinkedTransaction object in body of request +linked_transaction = {"LinkedTransactions":[{"SourceTransactionID":"a848644a-f20f-4630-98c3-386bd7505631","SourceLineItemID":"b0df260d-3cc8-4ced-9bd6-41924f624ed3"}]} # LinkedTransaction | LinkedTransaction object in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates linked transactions (billable expenses) @@ -2299,7 +2299,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant manual_journal_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a ManualJournal file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a specific attachment for a specific manual journal by file name @@ -2316,7 +2316,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **manual_journal_id** | [**str**](.md)| Unique identifier for a ManualJournal | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -2367,7 +2367,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant manual_journal_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a ManualJournal -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific manual journal @@ -2433,7 +2433,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -manual_journals = { "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" } ] } # ManualJournals | ManualJournals array with ManualJournal object in body of request +manual_journals = {"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"}]} # ManualJournals | ManualJournals array with ManualJournal object in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -2501,7 +2501,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant overpayment_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Overpayment -allocations = { "Allocations": [ { "Invoice": { "InvoiceID": "00000000-0000-0000-0000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" }, "Amount": 10.00, "Date": "2019-03-12" } ] } # Allocations | Allocations array with Allocation object in body of request +allocations = {"Allocations":[{"Invoice":{"InvoiceID":"00000000-0000-0000-0000-000000000000","LineItems":[],"Contact":{},"Type":"ACCPAY"},"Amount":10.0,"Date":"2019-03-12"}]} # Allocations | Allocations array with Allocation object in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -2570,7 +2570,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant overpayment_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Overpayment -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific overpayment @@ -2636,7 +2636,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -payment = { "Payments": [ { "Invoice": { "LineItems": [], "InvoiceID": "00000000-0000-0000-0000-000000000000" }, "Account": { "Code": "970" }, "Date": "2019-03-12", "Amount": 1 } ] } # Payment | Request body with a single Payment object +payment = {"Payments":[{"Invoice":{"LineItems":[],"InvoiceID":"00000000-0000-0000-0000-000000000000"},"Account":{"Code":"970"},"Date":"2019-03-12","Amount":1}]} # Payment | Request body with a single Payment object idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a single payment for invoice or credit notes @@ -2702,7 +2702,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant payment_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Payment -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific payment @@ -2768,7 +2768,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -payment_services = { "PaymentServices": [ { "PaymentServiceName": "PayUpNow", "PaymentServiceUrl": "https://www.payupnow.com/", "PayNowText": "Time To Pay" } ] } # PaymentServices | PaymentServices array with PaymentService object in body of request +payment_services = {"PaymentServices":[{"PaymentServiceName":"PayUpNow","PaymentServiceUrl":"https://www.payupnow.com/","PayNowText":"Time To Pay"}]} # PaymentServices | PaymentServices array with PaymentService object in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a payment service @@ -2833,7 +2833,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -payments = { "Payments": [ { "Invoice": { "LineItems": [], "InvoiceID": "00000000-0000-0000-0000-000000000000" }, "Account": { "Code": "970" }, "Date": "2019-03-12", "Amount": 1 } ] } # Payments | Payments array with Payment object in body of request +payments = {"Payments":[{"Invoice":{"LineItems":[],"InvoiceID":"00000000-0000-0000-0000-000000000000"},"Account":{"Code":"970"},"Date":"2019-03-12","Amount":1}]} # Payments | Payments array with Payment object in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -2901,7 +2901,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant prepayment_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a PrePayment -allocations = { "Allocations": [ { "Invoice": { "LineItems": [], "InvoiceID": "00000000-0000-0000-0000-000000000000" }, "Amount": 1, "Date": "2019-01-10" } ] } # Allocations | Allocations with an array of Allocation object in body of request +allocations = {"Allocations":[{"Invoice":{"LineItems":[],"InvoiceID":"00000000-0000-0000-0000-000000000000"},"Amount":1,"Date":"2019-01-10"}]} # Allocations | Allocations with an array of Allocation object in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -2970,7 +2970,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant prepayment_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a PrePayment -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific prepayment @@ -3038,7 +3038,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant purchase_order_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Purchase Order file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates attachment for a specific purchase order @@ -3055,7 +3055,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **purchase_order_id** | [**str**](.md)| Unique identifier for an Purchase Order | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -3106,7 +3106,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant purchase_order_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Purchase Order -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific purchase orders @@ -3172,7 +3172,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -purchase_orders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "710" } ], "Date": "2019-03-13" } ] } # PurchaseOrders | PurchaseOrders with an array of PurchaseOrder object in body of request +purchase_orders = {"PurchaseOrders":[{"Contact":{"ContactID":"00000000-0000-0000-0000-000000000000"},"LineItems":[{"Description":"Foobar","Quantity":1,"UnitAmount":20,"AccountCode":"710"}],"Date":"2019-03-13"}]} # PurchaseOrders | PurchaseOrders with an array of PurchaseOrder object in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -3241,7 +3241,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant quote_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Quote file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates attachment for a specific quote @@ -3258,7 +3258,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **quote_id** | [**str**](.md)| Unique identifier for an Quote | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -3309,7 +3309,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant quote_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Quote -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific quote @@ -3375,7 +3375,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "12775" } ], "Date": "2020-02-01" } ] } # Quotes | Quotes with an array of Quote object in body of request +quotes = {"Quotes":[{"Contact":{"ContactID":"00000000-0000-0000-0000-000000000000"},"LineItems":[{"Description":"Foobar","Quantity":1,"UnitAmount":20,"AccountCode":"12775"}],"Date":"2020-02-01"}]} # Quotes | Quotes with an array of Quote object in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -3442,7 +3442,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -receipts = { "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" } ] } # Receipts | Receipts with an array of Receipt object in body of request +receipts = {"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"}]} # Receipts | Receipts with an array of Receipt object in body of request unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -3511,7 +3511,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant receipt_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Receipt file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an attachment on a specific expense claim receipts by file name @@ -3528,7 +3528,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **receipt_id** | [**str**](.md)| Unique identifier for a Receipt | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -3579,7 +3579,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant receipt_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Receipt -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific receipt @@ -3647,7 +3647,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant repeating_invoice_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Repeating Invoice file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an attachment from a specific repeating invoices by file name @@ -3664,7 +3664,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **repeating_invoice_id** | [**str**](.md)| Unique identifier for a Repeating Invoice | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -3715,7 +3715,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant repeating_invoice_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Repeating Invoice -history_records = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request +history_records = {"HistoryRecords":[{"Details":"Hello World"}]} # HistoryRecords | HistoryRecords containing an array of HistoryRecord objects in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a history record for a specific repeating invoice @@ -3781,7 +3781,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -repeating_invoices = { "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" } ] } # RepeatingInvoices | RepeatingInvoices with an array of repeating invoice objects in body of request +repeating_invoices = {"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"}]} # RepeatingInvoices | RepeatingInvoices with an array of repeating invoice objects in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -3848,7 +3848,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -tax_rates = { "TaxRates": [ { "Name": "CA State Tax", "TaxComponents": [ { "Name": "State Tax", "Rate": 2.25 } ] } ] } # TaxRates | TaxRates array with TaxRate object in body of request +tax_rates = {"TaxRates":[{"Name":"CA State Tax","TaxComponents":[{"Name":"State Tax","Rate":2.25}]}]} # TaxRates | TaxRates array with TaxRate object in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates one or more tax rates @@ -3913,7 +3913,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -tracking_category = { name: "FooBar" } # TrackingCategory | TrackingCategory object in body of request +tracking_category = {"name":"FooBar"} # TrackingCategory | TrackingCategory object in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Create tracking categories @@ -3979,7 +3979,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant tracking_category_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a TrackingCategory -tracking_option = { name: " Bar" } # TrackingOption | TrackingOption object in body of request +tracking_option = {"name":" Bar"} # TrackingOption | TrackingOption object in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates options for a specific tracking category @@ -4108,7 +4108,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -batch_payment_delete = { "BatchPaymentID": "9bf296e9-0748-4d29-a3dc-24dde1098030", "Status":"DELETED" } # BatchPaymentDelete | +batch_payment_delete = {"BatchPaymentID":"9bf296e9-0748-4d29-a3dc-24dde1098030","Status":"DELETED"} # BatchPaymentDelete | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific batch payment for invoices and credit notes @@ -4174,7 +4174,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant batch_payment_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for BatchPayment -batch_payment_delete_by_url_param = { "Status":"DELETED" } # BatchPaymentDeleteByUrlParam | +batch_payment_delete_by_url_param = {"Status":"DELETED"} # BatchPaymentDeleteByUrlParam | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific batch payment for invoices and credit notes @@ -4621,7 +4621,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant payment_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Payment -payment_delete = { "Payments":[ { "Status":"DELETED" } ] } # PaymentDelete | +payment_delete = {"Payments":[{"Status":"DELETED"}]} # PaymentDelete | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific payment for invoices and credit notes @@ -13344,7 +13344,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -setup = { "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" } ] } # Setup | Object including an accounts array, a conversion balances array and a conversion date object in body of request +setup = {"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"}]} # Setup | Object including an accounts array, a conversion balances array and a conversion date object in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Sets the chart of accounts, the conversion date and conversion balances @@ -13410,7 +13410,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant account_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for Account object -accounts = { "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" } ] } # Accounts | Request of type Accounts array with one Account +accounts = {"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"}]} # Accounts | Request of type Accounts array with one Account idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a chart of accounts @@ -13478,7 +13478,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant account_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for Account object file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates attachment on a specific account by filename @@ -13495,7 +13495,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **account_id** | [**str**](.md)| Unique identifier for Account object | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -13546,7 +13546,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant bank_transaction_id = '00000000-0000-0000-0000-000000000000' # str | Xero generated unique identifier for a bank transaction -bank_transactions = { "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" } ] } # BankTransactions | +bank_transactions = {"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"}]} # BankTransactions | unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -13616,7 +13616,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant bank_transaction_id = '00000000-0000-0000-0000-000000000000' # str | Xero generated unique identifier for a bank transaction file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific attachment from a specific bank transaction by filename @@ -13633,7 +13633,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **bank_transaction_id** | [**str**](.md)| Xero generated unique identifier for a bank transaction | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -13685,7 +13685,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant bank_transfer_id = '00000000-0000-0000-0000-000000000000' # str | Xero generated unique identifier for a bank transfer file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: api_response = api_instance.update_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body, idempotency_key=idempotency_key) @@ -13701,7 +13701,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **bank_transfer_id** | [**str**](.md)| Xero generated unique identifier for a bank transfer | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -13752,7 +13752,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant contact_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Contact -contacts = { "Contacts": [{ "ContactID": "00000000-0000-0000-0000-000000000000", "Name": "Thanos" }]} # Contacts | an array of Contacts containing single Contact object with properties to update +contacts = {"Contacts":[{"ContactID":"00000000-0000-0000-0000-000000000000","Name":"Thanos"}]} # Contacts | an array of Contacts containing single Contact object with properties to update idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific contact in a Xero organisation @@ -13820,7 +13820,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant contact_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Contact file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: api_response = api_instance.update_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, body, idempotency_key=idempotency_key) @@ -13836,7 +13836,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **contact_id** | [**str**](.md)| Unique identifier for a Contact | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -13887,7 +13887,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant contact_group_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Contact Group -contact_groups = { "ContactGroups":[ { "Name":"Suppliers" } ] } # ContactGroups | an array of Contact groups with Name of specific group to update +contact_groups = {"ContactGroups":[{"Name":"Suppliers"}]} # ContactGroups | an array of Contact groups with Name of specific group to update idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific contact group @@ -13954,7 +13954,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant credit_note_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Credit Note -credit_notes = { "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" } ] } ] } # CreditNotes | an array of Credit Notes containing credit note details to update +credit_notes = {"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"}]}]} # CreditNotes | an array of Credit Notes containing credit note details to update unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -14024,7 +14024,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant credit_note_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Credit Note file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates attachments on a specific credit note by file name @@ -14041,7 +14041,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **credit_note_id** | [**str**](.md)| Unique identifier for a Credit Note | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -14092,7 +14092,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant expense_claim_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a ExpenseClaim -expense_claims = { "ExpenseClaims": [ { "Status": "SUBMITTED", "User": { "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273" }, "Receipts": [ { "Lineitems": [], "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816" } ] } ] } # ExpenseClaims | +expense_claims = {"ExpenseClaims":[{"Status":"SUBMITTED","User":{"UserID":"d1164823-0ac1-41ad-987b-b4e30fe0b273"},"Receipts":[{"Lineitems":[],"ReceiptID":"dc1c7f6d-0a4c-402f-acac-551d62ce5816"}]}]} # ExpenseClaims | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific expense claims @@ -14159,7 +14159,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant invoice_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Invoice -invoices = { "Invoices": [{ Reference: "May the force be with you", "InvoiceID": "00000000-0000-0000-0000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" }]} # Invoices | +invoices = {"Invoices":[{"Reference":"May the force be with you","InvoiceID":"00000000-0000-0000-0000-000000000000","LineItems":[],"Contact":{},"Type":"ACCPAY"}]} # Invoices | unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -14229,7 +14229,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant invoice_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Invoice file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates an attachment from a specific invoices or purchase bill by filename @@ -14246,7 +14246,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **invoice_id** | [**str**](.md)| Unique identifier for an Invoice | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -14297,7 +14297,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant item_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Item -items = { "Items": [ { "Code": "ItemCode123", "Description": "Description 123" } ] } # Items | +items = {"Items":[{"Code":"ItemCode123","Description":"Description 123"}]} # Items | unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -14366,7 +14366,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant linked_transaction_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a LinkedTransaction -linked_transactions = { "LinkedTransactions": [ { "SourceTransactionID": "00000000-0000-0000-0000-000000000000", "SourceLineItemID": "00000000-0000-0000-0000-000000000000" } ] } # LinkedTransactions | +linked_transactions = {"LinkedTransactions":[{"SourceTransactionID":"00000000-0000-0000-0000-000000000000","SourceLineItemID":"00000000-0000-0000-0000-000000000000"}]} # LinkedTransactions | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific linked transactions (billable expenses) @@ -14433,7 +14433,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant manual_journal_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a ManualJournal -manual_journals = { "ManualJournals": [ { "Narration": "Hello Xero", "ManualJournalID": "00000000-0000-0000-0000-000000000000", "JournalLines": [] } ] } # ManualJournals | +manual_journals = {"ManualJournals":[{"Narration":"Hello Xero","ManualJournalID":"00000000-0000-0000-0000-000000000000","JournalLines":[]}]} # ManualJournals | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific manual journal @@ -14501,7 +14501,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant manual_journal_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a ManualJournal file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific attachment from a specific manual journal by file name @@ -14518,7 +14518,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **manual_journal_id** | [**str**](.md)| Unique identifier for a ManualJournal | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -14568,7 +14568,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -bank_transactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "400" } ], "BankAccount": { "Code": "088" } } ] } # BankTransactions | +bank_transactions = {"BankTransactions":[{"Type":"SPEND","Contact":{"ContactID":"00000000-0000-0000-0000-000000000000"},"Lineitems":[{"Description":"Foobar","Quantity":1,"UnitAmount":20,"AccountCode":"400"}],"BankAccount":{"Code":"088"}}]} # BankTransactions | summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) @@ -14637,7 +14637,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -contacts = { "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" } } } ] } # Contacts | +contacts = {"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"}}}]} # Contacts | summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -14704,7 +14704,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -credit_notes = { "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" } ] } ] } # CreditNotes | an array of Credit Notes with a single CreditNote object. +credit_notes = {"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"}]}]} # CreditNotes | an array of Credit Notes with a single CreditNote object. summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) @@ -14773,7 +14773,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -employees = { "Employees": [ { "FirstName": "Nick", "LastName": "Fury", "ExternalLink": { "Url": "http://twitter.com/#!/search/Nick+Fury" } } ] } # Employees | Employees with array of Employee object in body of request +employees = {"Employees":[{"FirstName":"Nick","LastName":"Fury","ExternalLink":{"Url":"http://twitter.com/#!/search/Nick+Fury"}}]} # Employees | Employees with array of Employee object in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -14840,7 +14840,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -invoices = { "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" } ] } # Invoices | +invoices = {"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"}]} # Invoices | summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) @@ -14909,7 +14909,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -items = { "Items": [ { "Code": "ItemCode123", "Name": "ItemName XYZ", "Description": "Item Description ABC" } ] } # Items | +items = {"Items":[{"Code":"ItemCode123","Name":"ItemName XYZ","Description":"Item Description ABC"}]} # Items | summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) @@ -14978,7 +14978,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -manual_journals = { "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" } ] } # ManualJournals | ManualJournals array with ManualJournal object in body of request +manual_journals = {"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"}]} # ManualJournals | ManualJournals array with ManualJournal object in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -15045,7 +15045,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -purchase_orders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "710" } ], "Date": "2019-03-13" } ] } # PurchaseOrders | +purchase_orders = {"PurchaseOrders":[{"Contact":{"ContactID":"00000000-0000-0000-0000-000000000000"},"LineItems":[{"Description":"Foobar","Quantity":1,"UnitAmount":20,"AccountCode":"710"}],"Date":"2019-03-13"}]} # PurchaseOrders | summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -15112,7 +15112,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "12775" } ], "Date": "2020-02-01" } ] } # Quotes | +quotes = {"Quotes":[{"Contact":{"ContactID":"00000000-0000-0000-0000-000000000000"},"LineItems":[{"Description":"Foobar","Quantity":1,"UnitAmount":20,"AccountCode":"12775"}],"Date":"2020-02-01"}]} # Quotes | summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -15179,7 +15179,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -repeating_invoices = { "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" } ] } # RepeatingInvoices | RepeatingInvoices with an array of repeating invoice objects in body of request +repeating_invoices = {"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"}]} # RepeatingInvoices | RepeatingInvoices with an array of repeating invoice objects in body of request summarize_errors = False # bool | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to False) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -15247,7 +15247,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant purchase_order_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Purchase Order -purchase_orders = { "PurchaseOrders": [ { "AttentionTo": "Peter Parker", "LineItems": [], "Contact": {} } ] } # PurchaseOrders | +purchase_orders = {"PurchaseOrders":[{"AttentionTo":"Peter Parker","LineItems":[],"Contact":{}}]} # PurchaseOrders | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific purchase order @@ -15315,7 +15315,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant purchase_order_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Purchase Order file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific attachment for a specific purchase order by filename @@ -15332,7 +15332,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **purchase_order_id** | [**str**](.md)| Unique identifier for an Purchase Order | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -15383,7 +15383,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant quote_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Quote -quotes = { "Quotes": [ { "Reference": "I am an update", "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "Date": "2020-02-01" } ] } # Quotes | +quotes = {"Quotes":[{"Reference":"I am an update","Contact":{"ContactID":"00000000-0000-0000-0000-000000000000"},"Date":"2020-02-01"}]} # Quotes | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific quote @@ -15451,7 +15451,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant quote_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for an Quote file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific attachment from a specific quote by filename @@ -15468,7 +15468,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **quote_id** | [**str**](.md)| Unique identifier for an Quote | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -15519,7 +15519,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant receipt_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Receipt -receipts = { "Receipts": [ { "Lineitems": [], "User": { "UserID": "00000000-0000-0000-0000-000000000000" }, "Reference": "Foobar" } ] } # Receipts | +receipts = {"Receipts":[{"Lineitems":[],"User":{"UserID":"00000000-0000-0000-0000-000000000000"},"Reference":"Foobar"}]} # Receipts | unitdp = 4 # int | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: @@ -15589,7 +15589,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant receipt_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Receipt file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific attachment on a specific expense claim receipts by file name @@ -15606,7 +15606,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **receipt_id** | [**str**](.md)| Unique identifier for a Receipt | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -15657,7 +15657,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant repeating_invoice_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Repeating Invoice -repeating_invoices = { "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" } # RepeatingInvoices | +repeating_invoices = {"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"} # RepeatingInvoices | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Deletes a specific repeating invoice template @@ -15725,7 +15725,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant repeating_invoice_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Repeating Invoice file_name = 'xero-dev.jpg' # str | Name of the attachment -body = 'body_example' # str | Byte array of file in body of request +body = '/path/to/file' # file | Byte array of file in body of request idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific attachment from a specific repeating invoices by file name @@ -15742,7 +15742,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **str**| Xero identifier for Tenant | **repeating_invoice_id** | [**str**](.md)| Unique identifier for a Repeating Invoice | **file_name** | **str**| Name of the attachment | - **body** | **str**| Byte array of file in body of request | + **body** | **file**| Byte array of file in body of request | **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] ### Return type @@ -15792,7 +15792,7 @@ api_client = ApiClient( api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -tax_rates = { "TaxRates": [ { "Name": "State Tax NY", "TaxComponents": [ { "Name": "State Tax", "Rate": 2.25 } ], "Status": "DELETED", "ReportTaxType": "INPUT" } ] } # TaxRates | +tax_rates = {"TaxRates":[{"Name":"State Tax NY","TaxComponents":[{"Name":"State Tax","Rate":2.25}],"Status":"DELETED","ReportTaxType":"INPUT"}]} # TaxRates | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates tax rates @@ -15858,7 +15858,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant tracking_category_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a TrackingCategory -tracking_category = { "Name": "Avengers" } # TrackingCategory | +tracking_category = {"Name":"Avengers"} # TrackingCategory | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific tracking category @@ -15926,7 +15926,7 @@ api_instance = AccountingApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant tracking_category_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a TrackingCategory tracking_option_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for a Tracking Option -tracking_option = { name: "Vision" } # TrackingOption | +tracking_option = {"name":"Vision"} # TrackingOption | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific option for a specific tracking category diff --git a/xero_python/appstore/docs/AppStoreApi.md b/xero_python/appstore/docs/AppStoreApi.md index b245c476..bb2d56d1 100644 --- a/xero_python/appstore/docs/AppStoreApi.md +++ b/xero_python/appstore/docs/AppStoreApi.md @@ -165,7 +165,7 @@ api_instance = AppStoreApi(api_client) subscription_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for Subscription object subscription_item_id = '00000000-0000-0000-0000-000000000000' # str | The unique identifier of the subscriptionItem -create_usage_record = { "timestamp": "2022-01-21T13:01:00", "quantity": 10 } # CreateUsageRecord | Contains the quantity for the usage record to create +create_usage_record = {"timestamp":"2022-01-21T13:01:00","quantity":10} # CreateUsageRecord | Contains the quantity for the usage record to create idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Send metered usage belonging to this subscription and subscription item @@ -233,7 +233,7 @@ api_instance = AppStoreApi(api_client) subscription_id = '00000000-0000-0000-0000-000000000000' # str | Unique identifier for Subscription object subscription_item_id = '00000000-0000-0000-0000-000000000000' # str | The unique identifier of the subscriptionItem usage_record_id = '00000000-0000-0000-0000-000000000000' # str | The unique identifier of the usage record -update_usage_record = { "quantity": 10 } # UpdateUsageRecord | Contains the quantity for the usage record to update +update_usage_record = {"quantity":10} # UpdateUsageRecord | Contains the quantity for the usage record to update idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Update and existing metered usage belonging to this subscription and subscription item diff --git a/xero_python/assets/docs/AssetApi.md b/xero_python/assets/docs/AssetApi.md index c8d6ad37..7ff31045 100644 --- a/xero_python/assets/docs/AssetApi.md +++ b/xero_python/assets/docs/AssetApi.md @@ -46,7 +46,7 @@ api_client = ApiClient( api_instance = AssetApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -asset = { "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 } # Asset | Fixed asset you are creating +asset = {"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} # Asset | Fixed asset you are creating idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # adds a fixed asset @@ -113,7 +113,7 @@ api_client = ApiClient( api_instance = AssetApi(api_client) xero_tenant_id = 'YOUR_XERO_TENANT_ID' # str | Xero identifier for Tenant -asset_type = { "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" } } # AssetType | Asset type to add +asset_type = {"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"}} # AssetType | Asset type to add idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # adds a fixed asset type diff --git a/xero_python/payrollau/docs/PayrollAuApi.md b/xero_python/payrollau/docs/PayrollAuApi.md index a71dc4d8..e23f5727 100644 --- a/xero_python/payrollau/docs/PayrollAuApi.md +++ b/xero_python/payrollau/docs/PayrollAuApi.md @@ -265,7 +265,7 @@ api_client = ApiClient( api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -pay_item = { "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" } ] } # PayItem | +pay_item = {"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"}]} # PayItem | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a pay item @@ -1982,7 +1982,7 @@ api_instance = PayrollAuApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant payslip_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Payslip id for single object -payslip_lines = { "Payslip": { "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", "DeductionLines": [ { "DeductionTypeID": "727af5e8-b347-4ae7-85fc-9b82266d0aec", "CalculationType": "FIXEDAMOUNT", "NumberOfUnits": 10 } ] } } # list[PayslipLines] | +payslip_lines = {"Payslip":{"EmployeeID":"cdfb8371-0b21-4b8a-8903-1024df6c391e","DeductionLines":[{"DeductionTypeID":"727af5e8-b347-4ae7-85fc-9b82266d0aec","CalculationType":"FIXEDAMOUNT","NumberOfUnits":10}]}} # list[PayslipLines] | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a payslip diff --git a/xero_python/payrollnz/docs/Employee.md b/xero_python/payrollnz/docs/Employee.md index 4b458d5f..2cb3d04f 100644 --- a/xero_python/payrollnz/docs/Employee.md +++ b/xero_python/payrollnz/docs/Employee.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employee_id** | **str** | Xero unique identifier for the employee | [optional] **title** | **str** | Title of the employee | [optional] -**first_name** | **str** | First name of employee | [optional] -**last_name** | **str** | Last name of employee | [optional] -**date_of_birth** | **date** | Date of birth of the employee (YYYY-MM-DD) | [optional] -**address** | [**Address**](Address.md) | | [optional] +**first_name** | **str** | First name of employee | +**last_name** | **str** | Last name of employee | +**date_of_birth** | **date** | Date of birth of the employee (YYYY-MM-DD) | +**address** | [**Address**](Address.md) | | **email** | **str** | The email address for the employee | [optional] **gender** | **str** | The employee’s gender | [optional] **phone_number** | **str** | Employee phone number | [optional] diff --git a/xero_python/payrollnz/docs/Employment.md b/xero_python/payrollnz/docs/Employment.md index 1cbcb869..7b236418 100644 --- a/xero_python/payrollnz/docs/Employment.md +++ b/xero_python/payrollnz/docs/Employment.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payroll_calendar_id** | **str** | Xero unique identifier for the payroll calendar of the employee | [optional] +**payroll_calendar_id** | **str** | Xero unique identifier for the payroll calendar of the employee | **pay_run_calendar_id** | **str** | Xero unique identifier for the payrun calendar for the employee (Deprecated in version 1.1.6) | [optional] -**start_date** | **date** | Start date of the employment (YYYY-MM-DD) | [optional] -**engagement_type** | **str** | Engagement type of the employee | [optional] +**start_date** | **date** | Start date of the employment (YYYY-MM-DD) | +**engagement_type** | **str** | Engagement type of the employee | **fixed_term_end_date** | **date** | End date for an employee with a fixed-term engagement type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/payrollnz/docs/PayrollNZApi.md b/xero_python/payrollnz/docs/PayrollNZApi.md index 1c205d76..39f294b1 100644 --- a/xero_python/payrollnz/docs/PayrollNZApi.md +++ b/xero_python/payrollnz/docs/PayrollNZApi.md @@ -175,7 +175,7 @@ api_client = ApiClient( api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -deduction = { "deductionName": "My new deduction", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" } # Deduction | +deduction = {"deductionName":"My new deduction","deductionCategory":"NzOther","liabilityAccountId":"568f2e9a-0870-46cc-8678-f83f132ed4e3"} # Deduction | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new deduction for a specific employee @@ -240,7 +240,7 @@ api_client = ApiClient( api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -earnings_rate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" } # EarningsRate | +earnings_rate = {"name":"My Earnings Rate","earningsType":"RegularEarnings","rateType":"RatePerUnit","typeOfUnits":"hours","expenseAccountID":"e4eb36f6-97e3-4427-a394-dd4e1b355c2e"} # EarningsRate | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new earnings rate @@ -305,7 +305,7 @@ api_client = ApiClient( api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -employee = { "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" } # Employee | +employee = {"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"} # Employee | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an employees @@ -371,7 +371,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -earnings_template = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" } # EarningsTemplate | +earnings_template = {"ratePerUnit":20,"numberOfUnits":8,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5","name":"My New One"} # EarningsTemplate | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates earnings template records for an employee @@ -438,7 +438,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee_leave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Description", "startDate": "2020-04-24", "endDate": "2020-04-26" } # EmployeeLeave | +employee_leave = {"leaveTypeID":"b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4","description":"Creating a Description","startDate":"2020-04-24","endDate":"2020-04-26"} # EmployeeLeave | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates leave records for a specific employee @@ -505,7 +505,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee_leave_setup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10, "sickLeaveScheduleOfAccrual": "OnAnniversaryDate", "sickLeaveAnniversaryDate": "2023-12-31", "annualLeaveAnniversaryDate": "2023-12-31" } # EmployeeLeaveSetup | +employee_leave_setup = {"holidayPayOpeningBalance":10,"annualLeaveOpeningBalance":100,"sickLeaveHoursToAccrueAnnually":20,"sickLeaveToAccrueAnnually":20,"sickLeaveOpeningBalance":10,"sickLeaveScheduleOfAccrual":"OnAnniversaryDate","sickLeaveAnniversaryDate":"2023-12-31","annualLeaveAnniversaryDate":"2023-12-31"} # EmployeeLeaveSetup | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a leave set-up for a specific employee. This is required before viewing, configuring and requesting leave for an employee @@ -572,7 +572,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee_leave_type = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "unitsAccruedAnnually": 10, "typeOfUnitsToAccrue": "Hours", "openingBalanceTypeOfUnits": "Hours" "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 } # EmployeeLeaveType | +employee_leave_type = {"leaveTypeID":"35da97ae-05b9-427f-9a98-69157ba42cec","scheduleOfAccrual":"AnnuallyAfter6Months","hoursAccruedAnnually":10,"unitsAccruedAnnually":10,"typeOfUnitsToAccrue":"Hours","openingBalanceTypeOfUnits":"Hours","maximumToAccrue":80,"openingBalance":100,"rateAccruedHourly":3.5} # EmployeeLeaveType | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates leave type records for a specific employee @@ -706,7 +706,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -payment_method = xero_python.payrollnz.PaymentMethod() # PaymentMethod | +payment_method = {"bankAccounts":[{"accountName":"Casual Worker","accountNumber":"0607050201419000","sortCode":null,"particulars":null,"code":null,"dollarAmount":null,"reference":"","calculationType":"Balance"}]} # PaymentMethod | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a payment method for an employee @@ -773,7 +773,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -salary_and_wage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" } # SalaryAndWage | +salary_and_wage = {"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5","numberOfUnitsPerWeek":2,"ratePerUnit":10,"numberOfUnitsPerDay":2,"daysPerWeek":1,"effectiveFrom":"2020-05-01","annualSalary":100,"status":"Active","paymentType":"Salary"} # SalaryAndWage | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an employee salary and wage record @@ -840,7 +840,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee_working_pattern_with_working_weeks_request = { "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 } ] } # EmployeeWorkingPatternWithWorkingWeeksRequest | +employee_working_pattern_with_working_weeks_request = {"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}]} # EmployeeWorkingPatternWithWorkingWeeksRequest | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an employee working pattern @@ -907,7 +907,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02", "engagementType": "FixedTerm", "fixedTermEndDate": "2026-01-01" } # Employment | +employment = {"payrollCalendarID":"9aa56064-990f-4ad3-a189-d966d8f6a030","startDate":"2020-09-02","engagementType":"FixedTerm","fixedTermEndDate":"2026-01-01"} # Employment | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an employment detail for a specific employee @@ -973,7 +973,7 @@ api_client = ApiClient( api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -leave_type = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true } # LeaveType | +leave_type = {"name":"My wqwhhiktun Leave","isPaidLeave":false,"showOnPayslip":true} # LeaveType | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new leave type @@ -1105,7 +1105,7 @@ api_client = ApiClient( api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -pay_run = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" } # PayRun | +pay_run = {"payrollCalendarID":"9aa56064-990f-4ad3-a189-d966d8f6a030","periodStartDate":"2020-09-08","periodEndDate":"2020-09-15","paymentDate":"2020-09-20","payRunStatus":"Draft","payRunType":"Scheduled","calendarType":"Weekly"} # PayRun | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a pay run @@ -1170,7 +1170,7 @@ api_client = ApiClient( api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -pay_run_calendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" } # PayRunCalendar | +pay_run_calendar = {"name":"My Weekly Cal","calendarType":"Weekly","periodStartDate":"2020-05-01","paymentDate":"2020-05-15"} # PayRunCalendar | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new payrun calendar @@ -1235,7 +1235,7 @@ api_client = ApiClient( api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" } # Reimbursement | +reimbursement = {"name":"My new Reimburse","accountID":"fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488","reimbursementCategory":"GSTInclusive","calculationType":"FixedAmount"} # Reimbursement | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new reimbursement @@ -1300,7 +1300,7 @@ api_client = ApiClient( api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 } # Benefit | +benefit = {"name":"SidSaver","category":"Other","liabilityAccountId":"568f2e9a-0870-46cc-8678-f83f132ed4e3","expenseAccountId":"e4eb36f6-97e3-4427-a394-dd4e1b355c2e","CalculationTypeNZ":"FixedAmount","standardAmount":10} # Benefit | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new superannuation @@ -1365,7 +1365,7 @@ api_client = ApiClient( api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -timesheet = { "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 } ] } # Timesheet | +timesheet = {"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}]} # Timesheet | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new timesheet @@ -1431,7 +1431,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant timesheet_id = 'timesheet_id_example' # str | Identifier for the timesheet -timesheet_line = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 } # TimesheetLine | +timesheet_line = {"date":"2020-08-03","earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5","numberOfUnits":1} # TimesheetLine | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Create a new timesheet line for a specific time sheet @@ -4243,7 +4243,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee = { "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" } # Employee | +employee = {"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"} # Employee | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates an existing employee @@ -4311,7 +4311,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object pay_template_earning_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' # str | Id for single pay template earnings object -earnings_template = { "ratePerUnit": 25, "numberOfUnits": 4, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5" } # EarningsTemplate | +earnings_template = {"ratePerUnit":25,"numberOfUnits":4,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"} # EarningsTemplate | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates an earnings template records for an employee @@ -4380,7 +4380,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object leave_id = 'c4be24e5-e840-4c92-9eaa-2d86cd596314' # str | Leave id for single object -employee_leave = { "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" } ] } # EmployeeLeave | +employee_leave = {"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"}]} # EmployeeLeave | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates leave records for a specific employee @@ -4449,7 +4449,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object salary_and_wages_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' # str | Id for single pay template earnings object -salary_and_wage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 3, "ratePerUnit": 11, "numberOfUnitsPerDay": 3, "daysPerWeek": 1, "effectiveFrom": "2020-05-15", "annualSalary": 101, "status": "Active", "paymentType": "Salary" } # SalaryAndWage | +salary_and_wage = {"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5","numberOfUnitsPerWeek":3,"ratePerUnit":11,"numberOfUnitsPerDay":3,"daysPerWeek":1,"effectiveFrom":"2020-05-15","annualSalary":101,"status":"Active","paymentType":"Salary"} # SalaryAndWage | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates an employee's salary and wages record @@ -4517,7 +4517,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee_tax = xero_python.payrollnz.EmployeeTax() # EmployeeTax | +employee_tax = {"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} # EmployeeTax | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates the tax records for a specific employee @@ -4584,7 +4584,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant pay_run_id = 'pay_run_id_example' # str | Identifier for the pay run -pay_run = { "paymentDate": "2019-07-01" } # PayRun | +pay_run = {"paymentDate":"2019-07-01"} # PayRun | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a pay run @@ -4651,7 +4651,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant pay_slip_id = 'pay_slip_id_example' # str | Identifier for the payslip -pay_slip = { "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 } } # PaySlip | +pay_slip = {"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}} # PaySlip | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an employee pay slip @@ -4719,7 +4719,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant timesheet_id = 'timesheet_id_example' # str | Identifier for the timesheet timesheet_line_id = 'timesheet_line_id_example' # str | Identifier for the timesheet line -timesheet_line = { "date": "2020-08-04", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 2 } # TimesheetLine | +timesheet_line = {"date":"2020-08-04","earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5","numberOfUnits":2} # TimesheetLine | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a timesheet line for a specific timesheet diff --git a/xero_python/payrollnz/models/employee.py b/xero_python/payrollnz/models/employee.py index 2d507fb3..b2376cfd 100644 --- a/xero_python/payrollnz/models/employee.py +++ b/xero_python/payrollnz/models/employee.py @@ -114,14 +114,10 @@ def __init__( self.employee_id = employee_id if title is not None: self.title = title - if first_name is not None: - self.first_name = first_name - if last_name is not None: - self.last_name = last_name - if date_of_birth is not None: - self.date_of_birth = date_of_birth - if address is not None: - self.address = address + self.first_name = first_name + self.last_name = last_name + self.date_of_birth = date_of_birth + self.address = address if email is not None: self.email = email if gender is not None: @@ -211,6 +207,10 @@ def first_name(self, first_name): :param first_name: The first_name of this Employee. # noqa: E501 :type: str """ + if first_name is None: + raise ValueError( + "Invalid value for `first_name`, must not be `None`" + ) # noqa: E501 self._first_name = first_name @@ -234,6 +234,10 @@ def last_name(self, last_name): :param last_name: The last_name of this Employee. # noqa: E501 :type: str """ + if last_name is None: + raise ValueError( + "Invalid value for `last_name`, must not be `None`" + ) # noqa: E501 self._last_name = last_name @@ -257,6 +261,10 @@ def date_of_birth(self, date_of_birth): :param date_of_birth: The date_of_birth of this Employee. # noqa: E501 :type: date """ + if date_of_birth is None: + raise ValueError( + "Invalid value for `date_of_birth`, must not be `None`" + ) # noqa: E501 self._date_of_birth = date_of_birth @@ -278,6 +286,10 @@ def address(self, address): :param address: The address of this Employee. # noqa: E501 :type: Address """ + if address is None: + raise ValueError( + "Invalid value for `address`, must not be `None`" + ) # noqa: E501 self._address = address diff --git a/xero_python/payrollnz/models/employment.py b/xero_python/payrollnz/models/employment.py index d520d46e..7f84f1fc 100644 --- a/xero_python/payrollnz/models/employment.py +++ b/xero_python/payrollnz/models/employment.py @@ -62,14 +62,11 @@ def __init__( self._fixed_term_end_date = None self.discriminator = None - if payroll_calendar_id is not None: - self.payroll_calendar_id = payroll_calendar_id + self.payroll_calendar_id = payroll_calendar_id if pay_run_calendar_id is not None: self.pay_run_calendar_id = pay_run_calendar_id - if start_date is not None: - self.start_date = start_date - if engagement_type is not None: - self.engagement_type = engagement_type + self.start_date = start_date + self.engagement_type = engagement_type if fixed_term_end_date is not None: self.fixed_term_end_date = fixed_term_end_date @@ -93,6 +90,10 @@ def payroll_calendar_id(self, payroll_calendar_id): :param payroll_calendar_id: The payroll_calendar_id of this Employment. # noqa: E501 :type: str """ + if payroll_calendar_id is None: + raise ValueError( + "Invalid value for `payroll_calendar_id`, must not be `None`" + ) # noqa: E501 self._payroll_calendar_id = payroll_calendar_id @@ -139,6 +140,10 @@ def start_date(self, start_date): :param start_date: The start_date of this Employment. # noqa: E501 :type: date """ + if start_date is None: + raise ValueError( + "Invalid value for `start_date`, must not be `None`" + ) # noqa: E501 self._start_date = start_date @@ -162,6 +167,10 @@ def engagement_type(self, engagement_type): :param engagement_type: The engagement_type of this Employment. # noqa: E501 :type: str """ + if engagement_type is None: + raise ValueError( + "Invalid value for `engagement_type`, must not be `None`" + ) # noqa: E501 self._engagement_type = engagement_type diff --git a/xero_python/payrolluk/docs/Employee.md b/xero_python/payrolluk/docs/Employee.md index ccbab019..ad711576 100644 --- a/xero_python/payrolluk/docs/Employee.md +++ b/xero_python/payrolluk/docs/Employee.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employee_id** | **str** | Xero unique identifier for the employee | [optional] -**title** | **str** | Title of the employee | [optional] -**first_name** | **str** | First name of employee | [optional] -**last_name** | **str** | Last name of employee | [optional] -**date_of_birth** | **date** | Date of birth of the employee (YYYY-MM-DD) | [optional] -**address** | [**Address**](Address.md) | | [optional] +**title** | **str** | Title of the employee | +**first_name** | **str** | First name of employee | +**last_name** | **str** | Last name of employee | +**date_of_birth** | **date** | Date of birth of the employee (YYYY-MM-DD) | +**address** | [**Address**](Address.md) | | **email** | **str** | The email address for the employee | [optional] -**gender** | **str** | The employee’s gender | [optional] +**gender** | **str** | The employee’s gender | **phone_number** | **str** | Employee phone number | [optional] **start_date** | **date** | Employment start date of the employee at the time it was requested | [optional] **end_date** | **date** | Employment end date of the employee at the time it was requested | [optional] diff --git a/xero_python/payrolluk/docs/PayrollUkApi.md b/xero_python/payrolluk/docs/PayrollUkApi.md index 9f8e4fce..6a4134ca 100644 --- a/xero_python/payrolluk/docs/PayrollUkApi.md +++ b/xero_python/payrolluk/docs/PayrollUkApi.md @@ -173,7 +173,7 @@ api_client = ApiClient( api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -benefit = { "name": "My Big Bennie", "category": "StakeholderPension", "liabilityAccountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", "expenseAccountId": "4b03500d-32fd-4616-8d70-e1e56e0519c6", "standardAmount": 50, "percentage": 25, "calculationType": "PercentageOfGross" } # Benefit | +benefit = {"name":"My Big Bennie","category":"StakeholderPension","liabilityAccountId":"e0faa299-ca0d-4b0a-9e32-0dfabdf9179a","expenseAccountId":"4b03500d-32fd-4616-8d70-e1e56e0519c6","standardAmount":50,"percentage":25,"calculationType":"PercentageOfGross"} # Benefit | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new employee benefit @@ -238,7 +238,7 @@ api_client = ApiClient( api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -deduction = { "deductionName": "My new deduction", "deductionCategory": "SalarySacrifice", "liabilityAccountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", "calculationType": "FixedAmount" } # Deduction | +deduction = {"deductionName":"My new deduction","deductionCategory":"SalarySacrifice","liabilityAccountId":"e0faa299-ca0d-4b0a-9e32-0dfabdf9179a","calculationType":"FixedAmount"} # Deduction | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new deduction @@ -303,7 +303,7 @@ api_client = ApiClient( api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -earnings_rate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "4b03500d-32fd-4616-8d70-e1e56e0519c6" } # EarningsRate | +earnings_rate = {"name":"My Earnings Rate","earningsType":"RegularEarnings","rateType":"RatePerUnit","typeOfUnits":"hours","expenseAccountID":"4b03500d-32fd-4616-8d70-e1e56e0519c6"} # EarningsRate | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new earnings rate @@ -368,7 +368,7 @@ api_client = ApiClient( api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -employee = { "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" } } # Employee | +employee = {"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"}} # Employee | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates employees @@ -501,7 +501,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee_leave = { "leaveTypeID": "1d2778ee-86ea-45c0-bbf8-1045485f6b3f", "description": "Creating a Description", "startDate": "2020-03-24", "endDate": "2020-03-26" } # EmployeeLeave | +employee_leave = {"leaveTypeID":"1d2778ee-86ea-45c0-bbf8-1045485f6b3f","description":"Creating a Description","startDate":"2020-03-24","endDate":"2020-03-26"} # EmployeeLeave | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates leave records for a specific employee @@ -568,7 +568,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee_leave_type = { "leaveTypeID": "4918f233-bd31-43f9-9633-bcc6de1178f2", "scheduleOfAccrual": "BeginningOfCalendarYear", "hoursAccruedAnnually": 10 } # EmployeeLeaveType | +employee_leave_type = {"leaveTypeID":"4918f233-bd31-43f9-9633-bcc6de1178f2","scheduleOfAccrual":"BeginningOfCalendarYear","hoursAccruedAnnually":10} # EmployeeLeaveType | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates employee leave type records @@ -635,7 +635,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee_opening_balances = { "statutoryAdoptionPay": 10, "statutoryMaternityPay": 10, "statutoryPaternityPay": 10, "statutorySharedParentalPay": 10, "statutorySickPay": 10, "priorEmployeeNumber": 10 } # EmployeeOpeningBalances | +employee_opening_balances = {"statutoryAdoptionPay":10,"statutoryMaternityPay":10,"statutoryPaternityPay":10,"statutorySharedParentalPay":10,"statutorySickPay":10,"priorEmployeeNumber":10} # EmployeeOpeningBalances | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an opening balance for a specific employee @@ -702,7 +702,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -payment_method = { "paymentMethod": "Electronically", "bankAccounts": [ { "accountName": "Sid BofA", "accountNumber": "24987654", "sortCode": "287654" } ] } # PaymentMethod | +payment_method = {"paymentMethod":"Electronically","bankAccounts":[{"accountName":"Sid BofA","accountNumber":"24987654","sortCode":"287654"}]} # PaymentMethod | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an employee payment method @@ -769,7 +769,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -salary_and_wage = { "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "ACTIVE", "paymentType": "Salary" } # SalaryAndWage | +salary_and_wage = {"earningsRateID":"87f5b43a-cf51-4b74-92de-94c819e82d27","numberOfUnitsPerWeek":2,"ratePerUnit":10,"numberOfUnitsPerDay":2,"effectiveFrom":"2020-05-01","annualSalary":100,"status":"ACTIVE","paymentType":"Salary"} # SalaryAndWage | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a salary and wage record for a specific employee @@ -835,7 +835,7 @@ api_client = ApiClient( api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -employee_statutory_sick_leave = { "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 } # EmployeeStatutorySickLeave | +employee_statutory_sick_leave = {"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} # EmployeeStatutorySickLeave | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates statutory sick leave records @@ -967,7 +967,7 @@ api_client = ApiClient( api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -leave_type = { "name": "My opebvwbfxf Leave", "isPaidLeave": false, "showOnPayslip": true } # LeaveType | +leave_type = {"name":"My opebvwbfxf Leave","isPaidLeave":false,"showOnPayslip":true} # LeaveType | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new leave type @@ -1099,7 +1099,7 @@ api_client = ApiClient( api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -pay_run_calendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" } # PayRunCalendar | +pay_run_calendar = {"name":"My Weekly Cal","calendarType":"Weekly","periodStartDate":"2020-05-01","paymentDate":"2020-05-15"} # PayRunCalendar | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new payrun calendar @@ -1164,7 +1164,7 @@ api_client = ApiClient( api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -reimbursement = { "name": "My new Reimburse", "accountID": "9ee28149-32a9-4661-8eab-a28738696983" } # Reimbursement | +reimbursement = {"name":"My new Reimburse","accountID":"9ee28149-32a9-4661-8eab-a28738696983"} # Reimbursement | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new reimbursement @@ -1229,7 +1229,7 @@ api_client = ApiClient( api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant -timesheet = { "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 } ] } # Timesheet | +timesheet = {"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}]} # Timesheet | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new timesheet @@ -1295,7 +1295,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant timesheet_id = 'timesheet_id_example' # str | Identifier for the timesheet -timesheet_line = { "date": "2020-04-14", "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", "numberOfUnits": 1 } # TimesheetLine | +timesheet_line = {"date":"2020-04-14","earningsRateID":"87f5b43a-cf51-4b74-92de-94c819e82d27","numberOfUnits":1} # TimesheetLine | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a new timesheet line for a specific timesheet using a unique timesheet ID @@ -4172,7 +4172,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee = { "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" } } # Employee | +employee = {"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"}} # Employee | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific employee's detail @@ -4240,7 +4240,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object pay_template_earning_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' # str | Id for single pay template earnings object -earnings_template = { "ratePerUnit": 30, "numberOfUnits": 4, "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27" } # EarningsTemplate | +earnings_template = {"ratePerUnit":30,"numberOfUnits":4,"earningsRateID":"87f5b43a-cf51-4b74-92de-94c819e82d27"} # EarningsTemplate | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific employee's earnings template records @@ -4309,7 +4309,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object leave_id = 'c4be24e5-e840-4c92-9eaa-2d86cd596314' # str | Leave id for single object -employee_leave = { "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" } ] } # EmployeeLeave | +employee_leave = {"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"}]} # EmployeeLeave | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific employee's leave records @@ -4377,7 +4377,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee_opening_balances = { "statutoryAdoptionPay": 20, "statutoryMaternityPay": 20, "statutoryPaternityPay": 20, "statutorySharedParentalPay": 20, "statutorySickPay": 20, "priorEmployeeNumber": 20 } # EmployeeOpeningBalances | +employee_opening_balances = {"statutoryAdoptionPay":20,"statutoryMaternityPay":20,"statutoryPaternityPay":20,"statutorySharedParentalPay":20,"statutorySickPay":20,"priorEmployeeNumber":20} # EmployeeOpeningBalances | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific employee's opening balances @@ -4445,7 +4445,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object salary_and_wages_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' # str | Id for single pay template earnings object -salary_and_wage = { "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", "numberOfUnitsPerWeek": 3, "ratePerUnit": 11, "effectiveFrom": "2020-05-15", "annualSalary": 101, "status": "ACTIVE", "paymentType": "Salary" } # SalaryAndWage | +salary_and_wage = {"earningsRateID":"87f5b43a-cf51-4b74-92de-94c819e82d27","numberOfUnitsPerWeek":3,"ratePerUnit":11,"effectiveFrom":"2020-05-15","annualSalary":101,"status":"ACTIVE","paymentType":"Salary"} # SalaryAndWage | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates salary and wages record for a specific employee @@ -4513,7 +4513,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant pay_run_id = 'pay_run_id_example' # str | Identifier for the pay run -pay_run = { "paymentDate": "2020-05-01" } # PayRun | +pay_run = {"paymentDate":"2020-05-01"} # PayRun | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific pay run @@ -4581,7 +4581,7 @@ api_instance = PayrollUkApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant timesheet_id = 'timesheet_id_example' # str | Identifier for the timesheet timesheet_line_id = 'timesheet_line_id_example' # str | Identifier for the timesheet line -timesheet_line = { "date": "2020-04-14", "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", "numberOfUnits": 2 } # TimesheetLine | +timesheet_line = {"date":"2020-04-14","earningsRateID":"87f5b43a-cf51-4b74-92de-94c819e82d27","numberOfUnits":2} # TimesheetLine | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a specific timesheet line for a specific timesheet diff --git a/xero_python/payrolluk/models/employee.py b/xero_python/payrolluk/models/employee.py index cd5fa99f..efa10163 100644 --- a/xero_python/payrolluk/models/employee.py +++ b/xero_python/payrolluk/models/employee.py @@ -116,20 +116,14 @@ def __init__( if employee_id is not None: self.employee_id = employee_id - if title is not None: - self.title = title - if first_name is not None: - self.first_name = first_name - if last_name is not None: - self.last_name = last_name - if date_of_birth is not None: - self.date_of_birth = date_of_birth - if address is not None: - self.address = address + self.title = title + self.first_name = first_name + self.last_name = last_name + self.date_of_birth = date_of_birth + self.address = address if email is not None: self.email = email - if gender is not None: - self.gender = gender + self.gender = gender if phone_number is not None: self.phone_number = phone_number if start_date is not None: @@ -194,6 +188,10 @@ def title(self, title): :param title: The title of this Employee. # noqa: E501 :type: str """ + if title is None: + raise ValueError( + "Invalid value for `title`, must not be `None`" + ) # noqa: E501 self._title = title @@ -217,6 +215,10 @@ def first_name(self, first_name): :param first_name: The first_name of this Employee. # noqa: E501 :type: str """ + if first_name is None: + raise ValueError( + "Invalid value for `first_name`, must not be `None`" + ) # noqa: E501 self._first_name = first_name @@ -240,6 +242,10 @@ def last_name(self, last_name): :param last_name: The last_name of this Employee. # noqa: E501 :type: str """ + if last_name is None: + raise ValueError( + "Invalid value for `last_name`, must not be `None`" + ) # noqa: E501 self._last_name = last_name @@ -263,6 +269,10 @@ def date_of_birth(self, date_of_birth): :param date_of_birth: The date_of_birth of this Employee. # noqa: E501 :type: date """ + if date_of_birth is None: + raise ValueError( + "Invalid value for `date_of_birth`, must not be `None`" + ) # noqa: E501 self._date_of_birth = date_of_birth @@ -284,6 +294,10 @@ def address(self, address): :param address: The address of this Employee. # noqa: E501 :type: Address """ + if address is None: + raise ValueError( + "Invalid value for `address`, must not be `None`" + ) # noqa: E501 self._address = address @@ -330,6 +344,10 @@ def gender(self, gender): :param gender: The gender of this Employee. # noqa: E501 :type: str """ + if gender is None: + raise ValueError( + "Invalid value for `gender`, must not be `None`" + ) # noqa: E501 allowed_values = ["M", "F", "None"] # noqa: E501 if gender: diff --git a/xero_python/project/docs/ProjectApi.md b/xero_python/project/docs/ProjectApi.md index af542f1a..3828acb0 100644 --- a/xero_python/project/docs/ProjectApi.md +++ b/xero_python/project/docs/ProjectApi.md @@ -191,7 +191,7 @@ api_instance = ProjectApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant project_id = 'project_id_example' # str | You can specify an individual project by appending the projectId to the endpoint -time_entry_create_or_update = { "userId": "00000000-0000-0000-0000-000000000000", "taskId": "00000000-0000-0000-0000-000000000000", "dateUtc": "2020-02-26T15:00:00Z", "duration":30, "description": "My description" } # TimeEntryCreateOrUpdate | The time entry object you are creating +time_entry_create_or_update = {"userId":"00000000-0000-0000-0000-000000000000","taskId":"00000000-0000-0000-0000-000000000000","dateUtc":"2020-02-26T15:00:00Z","duration":30,"description":"My description"} # TimeEntryCreateOrUpdate | The time entry object you are creating idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a time entry for a specific project @@ -1096,7 +1096,7 @@ api_instance = ProjectApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant project_id = 'project_id_example' # str | You can specify an individual project by appending the projectId to the endpoint time_entry_id = 'time_entry_id_example' # str | You can specify an individual time entry by appending the id to the endpoint -time_entry_create_or_update = { "userId": "00000000-0000-0000-0000-000000000000", "taskId": "00000000-0000-0000-0000-000000000000", "dateUtc": "2020-02-27T15:00:00Z", "duration":45, "description": "My UPDATED description" } # TimeEntryCreateOrUpdate | The time entry object you are updating +time_entry_create_or_update = {"userId":"00000000-0000-0000-0000-000000000000","taskId":"00000000-0000-0000-0000-000000000000","dateUtc":"2020-02-27T15:00:00Z","duration":45,"description":"My UPDATED description"} # TimeEntryCreateOrUpdate | The time entry object you are updating idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Updates a time entry for a specific project