diff --git a/.github/actions/notify-slack/action.yml b/.github/actions/notify-slack/action.yml new file mode 100644 index 00000000..add9673f --- /dev/null +++ b/.github/actions/notify-slack/action.yml @@ -0,0 +1,103 @@ +name: slack-alert-action +description: "Action to send slack payload to public-sdk-events channel" + +inputs: + heading_text: + required: true + description: "Heading of the slack payload" + alert_type: + required: true + description: "type of the slack alert" + job_status: + required: true + description: "status of the job" + XERO_SLACK_WEBHOOK_URL: + required: true + description: "webhook url for channel - public-sdk-events" + job_url: + required: true + description: "job run id link" + button_type: + required: true + description: "color for the check logs button" + package_version: + required: true + description: "released package version" + repo_link: + required: true + description: "link of the repo" + + +runs: + using: "composite" + + steps: + + - name: Send slack notification + id: slack + uses: slackapi/slack-github-action@v1.27.0 + env: + SLACK_WEBHOOK_URL: ${{inputs.XERO_SLACK_WEBHOOK_URL}} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + with: + payload: | + { + "blocks": [ + { + "type": "rich_text", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "text", + "text": "${{inputs.heading_text}} ", + "style": { + "bold": true + } + }, + { + "type": "emoji", + "name": "${{inputs.alert_type}}" + } + ] + } + ] + }, + { + "type": "divider" + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Repository:* \n ${{inputs.repo_link}}" + }, + { + "type": "mrkdwn", + "text": "*Status:*\n ${{inputs.job_status}}" + }, + { + "type": "mrkdwn", + "text": "*Package Version:*\n ${{inputs.package_version}}" + } + ] + }, + { + "type": "actions", + "elements": [ + { + "type": "button", + "text": { + "type": "plain_text", + "text": "Check the logs", + "emoji": true + }, + "style": "${{inputs.button_type}}", + "url": "${{inputs.job_url}}" + } + ] + } + ] + } diff --git a/.github/octokit/index.js b/.github/octokit/index.js new file mode 100644 index 00000000..b308cb3b --- /dev/null +++ b/.github/octokit/index.js @@ -0,0 +1,30 @@ +import {Octokit} from "@octokit/rest"; +import {createAppAuth} from "@octokit/auth-app" + +export const getAccessToken = async () => { + + const {GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY} = process.env + + const octoKitInstance = new Octokit({ + authStrategy: createAppAuth, + auth: { + appId: GITHUB_APP_ID, + privateKey: GITHUB_APP_PRIVATE_KEY + } + }); + + const {data: installations} = await octoKitInstance.rest.apps.listInstallations() + + console.log("installations -----", installations); + + + if(!installations.length) { + throw new Error("No Installations found for this github app") + } + + const installationId = installations[0].id; + + const installationAccessToken = await octoKitInstance.rest.apps.createInstallationAccessToken({installation_id: installationId}) + + return installationAccessToken.data.token +} \ No newline at end of file diff --git a/.github/octokit/package.json b/.github/octokit/package.json new file mode 100644 index 00000000..66fb13ca --- /dev/null +++ b/.github/octokit/package.json @@ -0,0 +1,16 @@ +{ + "name": "xero-octokit", + "version": "1.0.0", + "description": "", + "main": "index.js", + "type": "module", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@octokit/auth-app": "^7.1.1", + "@octokit/rest": "^21.0.2" + } + } \ No newline at end of file diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml new file mode 100644 index 00000000..14722dcc --- /dev/null +++ b/.github/workflows/build-test-lint.yml @@ -0,0 +1,63 @@ +name: Python Build, Lint + +on: + push: + +jobs: + build-test-lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout xero-python repo + uses: actions/checkout@v4 + with: + repository: XeroAPI/xero-python + path: xero-python + + - name: Set up Python environment + uses: actions/setup-python@v5 + with: + python-version: '3.8' + cache: 'pip' + + - name: Install dependencies + run: | + python -m venv venv + source venv/bin/activate + 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: 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/.github/workflows/jira_create_issue.yml b/.github/workflows/jira_create_issue.yml new file mode 100644 index 00000000..c8534823 --- /dev/null +++ b/.github/workflows/jira_create_issue.yml @@ -0,0 +1,11 @@ +name: Create Issue in Jira + +on: + issues: + types: + - opened + +jobs: + create_jira_issue: + uses: XeroAPI/Xero-OpenAPI/.github/workflows/jira_create_issue.yml@master + secrets: inherit diff --git a/.github/workflows/jira_update_issue_closed.yml b/.github/workflows/jira_update_issue_closed.yml new file mode 100644 index 00000000..a9f6ac31 --- /dev/null +++ b/.github/workflows/jira_update_issue_closed.yml @@ -0,0 +1,11 @@ +name: Update Jira Ticket Status To Done + +on: + issues: + types: + - closed + +jobs: + create_jira_issue: + uses: XeroAPI/Xero-OpenAPI/.github/workflows/jira_update_issue_closed.yml@master + secrets: inherit diff --git a/.github/workflows/jira_update_issue_reopen.yml b/.github/workflows/jira_update_issue_reopen.yml new file mode 100644 index 00000000..e883ac68 --- /dev/null +++ b/.github/workflows/jira_update_issue_reopen.yml @@ -0,0 +1,11 @@ +name: Update Jira Ticket Status To Backlog + +on: + issues: + types: + - reopened + +jobs: + create_jira_issue: + uses: XeroAPI/Xero-OpenAPI/.github/workflows/jira_update_issue_reopen.yml@master + secrets: inherit diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..9335c48f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,161 @@ +name: Publish & Release SDK +on: + workflow_dispatch: + inputs: + cab_id: + description: "CAB id for the change/release" + required: true + type: string + +jobs: + publish: + runs-on: ubuntu-latest + environment: prod + outputs: + release_number: ${{steps.get_latest_release_number.outputs.release_tag}} + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout xero-python repo + uses: actions/checkout@v4 + with: + repository: XeroAPI/xero-python + path: xero-python + + - name: Set up Python environment + uses: actions/setup-python@v5 + with: + python-version: '3.8' + cache: 'pip' + + - name: Install dependencies + run: | + python -m venv venv + source venv/bin/activate + pip install --upgrade pip + pip install twine + echo "$PWD/venv/bin" >> "$GITHUB_PATH" + working-directory: xero-python + + - name: Fetch Latest release number + id: get_latest_release_number + run: | + latest_version=$(gh release view --json tagName --jq '.tagName') + echo "Latest release version is - $latest_version" + echo "::set-output name=release_tag::$latest_version" + working-directory: xero-python + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Build Package + run: python setup.py sdist + working-directory: xero-python + + - name: Publish to PyPi + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} + run: twine upload dist/* + working-directory: xero-python + + notify-slack-on-success: + runs-on: ubuntu-latest + needs: publish + if: success() + permissions: + contents: read + steps: + - name: Checkout xero-pythonrepo + uses: actions/checkout@v4 + with: + repository: XeroAPI/xero-python + path: xero-python + + - name: Send slack notification on success + uses: ./xero-python/.github/actions/notify-slack + with: + heading_text: "Publish job has succeeded !" + alert_type: "thumbsup" + job_status: "Success" + XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} + job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" + button_type: "primary" + package_version: ${{needs.publish.outputs.release_number}} + repo_link: ${{github.server_url}}/${{github.repository}} + + notify-slack-on-failure: + runs-on: ubuntu-latest + needs: publish + if: failure() + permissions: + contents: read + steps: + - name: Checkout xero-python repo + uses: actions/checkout@v4 + with: + repository: XeroAPI/xero-python + path: xero-python + + - name: Send slack notification on failure + uses: ./xero-python/.github/actions/notify-slack + with: + heading_text: "Publish job has failed !" + alert_type: "alert" + job_status: "Failed" + XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} + job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" + button_type: "danger" + package_version: ${{needs.publish.outputs.release_number}} + repo_link: ${{github.server_url}}/${{github.repository}} + + notify-codegen-repo: + needs: publish + if: always() + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + repository: XeroAPI/xero-python + path: xero-python + + - name: Install octokit dependencies + run: npm i + working-directory: xero-python/.github/octokit + + - name: Get github app access token + id: get_access_token + env: + GITHUB_APP_ID: ${{ secrets.XERO_CODEGEN_BOT_APPLICATION_ID }} + GITHUB_APP_PRIVATE_KEY: ${{ secrets.XERO_CODEGEN_BOT_APPLICATION_KEY }} + uses: actions/github-script@v7 + with: + result-encoding: string + script: | + const { getAccessToken } = await import('${{ github.workspace }}/xero-python/.github/octokit/index.js') + const token = await getAccessToken() + return token + + - name: Notify codegen repo + run: | + curl -X POST -H "Authorization: token ${{ steps.get_access_token.outputs.result }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Content-Type: application/json" \ + https://api.github.com/repos/xero-internal/xeroapi-sdk-codegen/actions/workflows/notify-sdk-publish.yml/dispatches \ + -d '{ + "ref": "master", + "inputs": { + "commit": "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}", + "status": "${{needs.publish.result}}", + "deployer": "xero-codegen-bot", + "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", + "environment": "prod", + "sdk_type": "python", + "cab_key": "${{ github.event.inputs.cab_id }}" + } + }' diff --git a/README.md b/README.md index 8aa293d8..060fac4b 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) @@ -222,7 +223,7 @@ It is recommended that you store this token set JSON in a datastore in relation | access_token: | "xxx.yyy.zzz" | [Bearer token](https://oauth.net/2/jwt/) with a 30 minute expiration required for all API calls | | expires_in: | 1800 | Time in seconds till the token expires - 1800s is 30m | | refresh_token: | "XXXXXXX" | Alphanumeric string used to obtain a new Token Set w/ a fresh access_token - 60 day expiry | -| scope: | "email profile openid accounting.transactions offline_access" | The Xero permissions that are embedded in the `access_token` | +| scope: | ["email", "profile", "openid", "accounting.transactions", "offline_access"] | The Xero permissions that are embedded in the `access_token` | Example Token Set JSON: ``` @@ -232,12 +233,12 @@ Example Token Set JSON: "expires_in": 1800, "token_type": "Bearer", "refresh_token": "xxxxxxxxx", - "scope": "email profile openid accounting.transactions offline_access" + "scope": ["email", "profile", "openid", "accounting.transactions", "offline_access"] } ``` --- -## Custom Connections +## Custom Connections Custom Connections are a Xero [premium option](https://developer.xero.com/documentation/oauth2/custom-connections) used for building M2M integrations to a single organisation. A custom connection uses OAuth 2.0's [`client_credentials`](https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/) grant which eliminates the step of exchanging the temporary code for a token set. @@ -335,7 +336,7 @@ Because Custom Connections are only valid for a single organisation you don't ne --- -## App Store Subscriptions +## App Store Subscriptions If you are implementing subscriptions to participate in Xero's App Store you will need to setup [App Store subscriptions](https://developer.xero.com/documentation/guides/how-to-guides/xero-app-store-referrals/) endpoints. @@ -457,7 +458,7 @@ store_xero_oauth2_token(token_set) # refresh token set on the api client api_client.refresh_oauth2_token() - + # call the Xero API accounting_api = AccountingApi(api_client) read_accounts = accounting_api.get_accounts(xero_tenant_id) @@ -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 Python test cases. + ### Querying & Filtering Describe the support for query options and filtering @@ -571,7 +584,7 @@ def accounting_get_invoices(): include_archived = 'true' created_by_my_app = 'false' summary_only = 'true' - + api_response = api_instance.get_invoices( xero_tenant_id, if_modified_since, @@ -593,11 +606,11 @@ api_response = api_instance.get_invoices( ## Participating in Xero’s developer community -This SDK is one of a number of SDK’s that the Xero Developer team builds and maintains. We are grateful for all the contributions that the community makes. +This SDK is one of a number of SDK’s that the Xero Developer team builds and maintains. We are grateful for all the contributions that the community makes. Here are a few things you should be aware of as a contributor: * Xero has adopted the Contributor Covenant [Code of Conduct](https://github.com/XeroAPI/xero-python/blob/master/CODE_OF_CONDUCT.md), we expect all contributors in our community to adhere to it -* If you raise an issue then please make sure to fill out the Github issue template, doing so helps us help you +* If you raise an issue then please make sure to fill out the Github issue template, doing so helps us help you * You’re welcome to raise PRs. As our SDKs are generated we may use your code in the core SDK build instead of merging your code * We have a [contribution guide](https://github.com/XeroAPI/xero-python/blob/master/CONTRIBUTING.md) for you to follow when contributing to this SDK * Curious about how we generate our SDK’s? Have a [read of our process](https://devblog.xero.com/building-sdks-for-the-future-b79ff726dfd6) and have a look at our [OpenAPISpec](https://github.com/XeroAPI/Xero-OpenAPI) diff --git a/bin/post-generation-hook.sh b/bin/post-generation-hook.sh index 4e89c606..6742b8ea 100755 --- a/bin/post-generation-hook.sh +++ b/bin/post-generation-hook.sh @@ -2,8 +2,11 @@ SCRIPT_DIR=$(dirname "$0") PROJECT_ROOT=$(realpath "${SCRIPT_DIR}/..") # expects script in bin/ -PATH=${PROJECT_ROOT}/venv/bin:$PATH # expects python environment in venv/ +PATH=${PROJECT_ROOT}/venv/Scripts:$PATH # expects python environment in venv/ command -v black >/dev/null 2>&1 || { echo >&2 "'black' required, but not found. Please read 'Local installation' section in ${PROJECT_ROOT}/CONTRIBUTING.md file. Aborting."; exit 1; } command -v flake8 >/dev/null 2>&1 || { echo >&2 "'flake8' required, but not found. Please read 'Local installation' section in ${PROJECT_ROOT}/CONTRIBUTING.md file. Aborting."; exit 1; } cd "${PROJECT_ROOT}" && black xero_python && flake8 xero_python -python bin/get_yaml_value.py "${1}" "${2}" | xargs python bin/bumpversion.py + +# python bin/get_yaml_value.py "${1}" "packageVersion" | xargs python ./bin/bumpversion.py + +python ./bin/bumpversion.py $2 diff --git a/docs/v1/accounting/index.html b/docs/v1/accounting/index.html index e22cfd89..dae37327 100644 --- a/docs/v1/accounting/index.html +++ b/docs/v1/accounting/index.html @@ -909,7 +909,7 @@ }, "TaxType" : { "type" : "string", - "description" : "The tax type from TaxRates" + "description" : "The tax type from taxRates" }, "EnablePaymentsToAccount" : { "type" : "boolean", @@ -975,7 +975,7 @@ "title" : "", "type" : "string", "description" : "See Account Types", - "enum" : [ "BANK", "CURRENT", "CURRLIAB", "DEPRECIATN", "DIRECTCOSTS", "EQUITY", "EXPENSE", "FIXED", "INVENTORY", "LIABILITY", "NONCURRENT", "OTHERINCOME", "OVERHEADS", "PREPAYMENT", "REVENUE", "SALES", "TERMLIAB", "PAYGLIABILITY", "PAYG", "SUPERANNUATIONEXPENSE", "SUPERANNUATIONLIABILITY", "WAGESEXPENSE" ] + "enum" : [ "BANK", "CURRENT", "CURRLIAB", "DEPRECIATN", "DIRECTCOSTS", "EQUITY", "EXPENSE", "FIXED", "INVENTORY", "LIABILITY", "NONCURRENT", "OTHERINCOME", "OVERHEADS", "PREPAYMENT", "REVENUE", "SALES", "TERMLIAB", "PAYG" ] }; defs["Accounts"] = { "title" : "", @@ -989,7 +989,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "accounts" }; defs["AccountsPayable"] = { "title" : "", @@ -1056,7 +1056,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "actions" }; defs["Address"] = { "title" : "", @@ -1183,6 +1183,11 @@ "required" : [ "Amount", "Date", "Invoice" ], "type" : "object", "properties" : { + "AllocationID" : { + "type" : "string", + "description" : "Xero generated unique identifier", + "format" : "uuid" + }, "Invoice" : { "$ref" : "#/components/schemas/Invoice" }, @@ -1206,6 +1211,11 @@ "description" : "the date the allocation is applied YYYY-MM-DD.", "x-is-msdate" : true }, + "IsDeleted" : { + "type" : "boolean", + "description" : "A flag that returns true when the allocation is succesfully deleted", + "readOnly" : true + }, "StatusAttributeString" : { "type" : "string", "description" : "A string to indicate if a invoice status" @@ -1235,7 +1245,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "allocations" }; defs["Attachment"] = { "title" : "", @@ -1288,7 +1298,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "attachments" }; defs["BalanceDetails"] = { "title" : "", @@ -1455,6 +1465,16 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "BankTransactions" : { "type" : "array", "items" : { @@ -1463,7 +1483,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "bank_transactions" }; defs["BankTransfer"] = { "title" : "", @@ -1542,6 +1562,26 @@ "example" : "/Date(1573755038314)/", "x-is-msdate-time" : true }, + "Status" : { + "type" : "string", + "description" : "AUTHORISED or DELETED (read-only). New bank transfers will have a status of AUTHORISED.", + "readOnly" : true, + "enum" : [ "AUTHORISED", "DELETED" ] + }, + "FromTracking" : { + "type" : "array", + "description" : "Optional Tracking Category for the source account – see Tracking. A bank transfer can have a maximum of 2 tracking categories per account.", + "items" : { + "$ref" : "#/components/schemas/TrackingReference" + } + }, + "ToTracking" : { + "type" : "array", + "description" : "Optional Tracking Category for the destination account – see Tracking. A bank transfer can have a maximum of 2 tracking categories per account.", + "items" : { + "$ref" : "#/components/schemas/TrackingReference" + } + }, "ValidationErrors" : { "type" : "array", "description" : "Displays array of validation error messages from the API", @@ -1554,6 +1594,43 @@ "externalDocs" : { "url" : "http://developer.xero.com/documentation/api/bank-transfers/" } +}; + defs["BankTransferDelete"] = { + "title" : "", + "required" : [ "BankTransferID", "Status" ], + "type" : "object", + "properties" : { + "BankTransferID" : { + "type" : "string", + "description" : "The Xero identifier for a bank transfer", + "format" : "uuid" + }, + "Status" : { + "type" : "string", + "description" : "The status of the bank transfer.", + "default" : "DELETED" + } + }, + "description" : "", + "externalDocs" : { + "url" : "http://developer.xero.com/documentation/api/bank-transfers/" + } +}; + defs["BankTransferDeleteByUrlParam"] = { + "title" : "", + "required" : [ "Status" ], + "type" : "object", + "properties" : { + "Status" : { + "type" : "string", + "description" : "The status of the bank transfer.", + "default" : "DELETED" + } + }, + "description" : "", + "externalDocs" : { + "url" : "http://developer.xero.com/documentation/api/bank-transfers/" + } }; defs["BankTransfers"] = { "title" : "", @@ -1567,7 +1644,21 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "bank_transfers" +}; + defs["BankTransfersDelete"] = { + "title" : "", + "type" : "object", + "properties" : { + "BankTransfers" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BankTransferDelete" + } + } + }, + "description" : "", + "x-objectArrayKey" : "bank_transfers" }; defs["BatchPayment"] = { "title" : "", @@ -1641,9 +1732,11 @@ "enum" : [ "AUTHORISED", "DELETED" ] }, "TotalAmount" : { - "type" : "string", + "type" : "number", "description" : "The total of the payments that make up the batch (read-only)", - "readOnly" : true + "format" : "double", + "readOnly" : true, + "x-is-money" : true }, "UpdatedDateUTC" : { "type" : "string", @@ -1653,7 +1746,7 @@ "x-is-msdate-time" : true }, "IsReconciled" : { - "type" : "string", + "type" : "boolean", "description" : "Booelan that tells you if the batch payment has been reconciled (read-only)", "readOnly" : true }, @@ -1669,6 +1762,43 @@ "externalDocs" : { "url" : "http://developer.xero.com/documentation/api/BatchPayments/" } +}; + defs["BatchPaymentDelete"] = { + "title" : "", + "required" : [ "BatchPaymentID", "Status" ], + "type" : "object", + "properties" : { + "BatchPaymentID" : { + "type" : "string", + "description" : "The Xero generated unique identifier for the bank transaction (read-only)", + "format" : "uuid" + }, + "Status" : { + "type" : "string", + "description" : "The status of the batch payment.", + "default" : "DELETED" + } + }, + "description" : "", + "externalDocs" : { + "url" : "http://developer.xero.com/documentation/api/accounting/batchpayments" + } +}; + defs["BatchPaymentDeleteByUrlParam"] = { + "title" : "", + "required" : [ "Status" ], + "type" : "object", + "properties" : { + "Status" : { + "type" : "string", + "description" : "The status of the batch payment.", + "default" : "DELETED" + } + }, + "description" : "", + "externalDocs" : { + "url" : "http://developer.xero.com/documentation/api/accounting/batchpayments" + } }; defs["BatchPaymentDetails"] = { "title" : "", @@ -1718,7 +1848,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "batch_payments" }; defs["Bill"] = { "title" : "", @@ -1788,7 +1918,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "branding_themes" }; defs["Budget"] = { "title" : "", @@ -1901,7 +2031,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "budgets" }; defs["CISOrgSetting"] = { "title" : "", @@ -1939,7 +2069,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "cis_settings" }; defs["CISSetting"] = { "title" : "", @@ -1973,7 +2103,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "cis_settings" }; defs["Contact"] = { "title" : "", @@ -2029,10 +2159,6 @@ "type" : "string", "description" : "Email address of contact person (umlauts not supported) (max length = 255)" }, - "SkypeUserName" : { - "type" : "string", - "description" : "Skype user name of contact" - }, "ContactPersons" : { "type" : "array", "description" : "See contact persons", @@ -2049,6 +2175,11 @@ "type" : "string", "description" : "Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)" }, + "TaxNumberType" : { + "type" : "string", + "description" : "Identifier of the regional type of tax number, such as US, UK, or other regional tax identifiers", + "enum" : [ "SSN", "EIN", "ITIN", "ATIN" ] + }, "AccountsReceivableTaxType" : { "type" : "string", "description" : "The tax type from TaxRates" @@ -2243,7 +2374,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "contact_groups" }; defs["ContactPerson"] = { "title" : "", @@ -2275,6 +2406,16 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Contacts" : { "type" : "array", "items" : { @@ -2283,7 +2424,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "contacts" }; defs["ConversionBalances"] = { "title" : "", @@ -2406,6 +2547,12 @@ "example" : "/Date(1573755038314)/", "x-is-msdate-time" : true }, + "UpdatedDateUTCString" : { + "type" : "string", + "description" : "UTC ISO-8601 formatted timestamp of last update to the credit note", + "readOnly" : true, + "example" : "2019-11-14T18:10:38Z" + }, "CurrencyCode" : { "$ref" : "#/components/schemas/CurrencyCode" }, @@ -2429,7 +2576,7 @@ }, "SentToContact" : { "type" : "boolean", - "description" : "boolean to indicate if a credit note has been sent to a contact via the Xero app (currently read only)", + "description" : "Boolean to set whether the credit note in the Xero app should be marked as “sent”. This can be set only on credit notes that have been approved", "readOnly" : true }, "CurrencyRate" : { @@ -2499,6 +2646,13 @@ "items" : { "$ref" : "#/components/schemas/ValidationError" } + }, + "InvoiceAddresses" : { + "type" : "array", + "description" : "An array of addresses used to auto calculate sales tax", + "items" : { + "$ref" : "#/components/schemas/InvoiceAddress" + } } }, "description" : "", @@ -2510,6 +2664,16 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "CreditNotes" : { "type" : "array", "items" : { @@ -2518,7 +2682,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "credit_notes" }; defs["Currencies"] = { "title" : "", @@ -2532,7 +2696,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "currencies" }; defs["Currency"] = { "title" : "", @@ -2555,8 +2719,8 @@ "title" : "", "type" : "string", "description" : "3 letter alpha code for the currency – see list of currency codes", - "enum" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD", "" ], - "x-enum-varnames" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY_LIRA", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD", "EMPTY_CURRENCY" ] + "enum" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BYR", "BZD", "CAD", "CDF", "CHF", "CLF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EEK", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SKK", "SLE", "SLL", "SOS", "SRD", "STD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VES", "VND", "VUV", "WST", "XAF", "XCD", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD" ], + "x-enum-varnames" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BYR", "BZD", "CAD", "CDF", "CHF", "CLF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EEK", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SKK", "SLE", "SLL", "SOS", "SRD", "STN", "STD", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY_LIRA", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VES", "VND", "VUV", "WST", "XAF", "XCD", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD", "EMPTY_CURRENCY" ] }; defs["Element"] = { "title" : "", @@ -2667,7 +2831,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "employees" }; defs["Error"] = { "title" : "", @@ -2791,7 +2955,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "expense_claims" }; defs["ExternalLink"] = { "title" : "", @@ -2856,7 +3020,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "history_records" }; defs["ImportSummary"] = { "title" : "", @@ -3141,11 +3305,17 @@ }, "UpdatedDateUTC" : { "type" : "string", - "description" : "Last modified date UTC format", + "description" : "UTC timestamp of last update to the invoice", "readOnly" : true, "example" : "/Date(1573755038314)/", "x-is-msdate-time" : true }, + "UpdatedDateUTCString" : { + "type" : "string", + "description" : "UTC ISO-8601 formatted timestamp of last update to the invoice", + "readOnly" : true, + "example" : "2019-11-14T18:10:38Z" + }, "CreditNotes" : { "type" : "array", "description" : "Details of credit notes that have been applied to an invoice", @@ -3184,12 +3354,63 @@ "items" : { "$ref" : "#/components/schemas/ValidationError" } + }, + "InvoiceAddresses" : { + "type" : "array", + "description" : "An array of addresses used to auto calculate sales tax", + "items" : { + "$ref" : "#/components/schemas/InvoiceAddress" + } } }, "description" : "", "externalDocs" : { "url" : "http://developer.xero.com/documentation/api/invoices/" } +}; + defs["InvoiceAddress"] = { + "title" : "", + "type" : "object", + "properties" : { + "InvoiceAddressType" : { + "type" : "string", + "description" : "Indicates whether the address is defined as origin (FROM) or destination (TO)", + "enum" : [ "FROM", "TO" ] + }, + "AddressLine1" : { + "type" : "string", + "description" : "First line of a physical address" + }, + "AddressLine2" : { + "type" : "string", + "description" : "Second line of a physical address" + }, + "AddressLine3" : { + "type" : "string", + "description" : "Third line of a physical address" + }, + "AddressLine4" : { + "type" : "string", + "description" : "Fourth line of a physical address" + }, + "City" : { + "type" : "string", + "description" : "City of a physical address" + }, + "Region" : { + "type" : "string", + "description" : "Region or state of a physical address" + }, + "PostalCode" : { + "type" : "string", + "description" : "Postal code of a physical address" + }, + "Country" : { + "type" : "string", + "description" : "Country of a physical address" + } + }, + "description" : "" }; defs["InvoiceReminder"] = { "title" : "", @@ -3217,12 +3438,22 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "invoice_reminders" }; defs["Invoices"] = { "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Invoices" : { "type" : "array", "items" : { @@ -3231,7 +3462,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "invoices" }; defs["Item"] = { "title" : "", @@ -3288,10 +3519,22 @@ }, "QuantityOnHand" : { "type" : "number", - "description" : "The quantity of the item on hand", + "description" : "The quantity of the item on hand. This will be 0 if `QuantityOnBackOrder` is greater than 0.", "format" : "double", "x-is-money" : true }, + "QuantityAvailable" : { + "type" : "number", + "description" : "The quantity of the item available. This is equal to `QuantityOnHand` - `QuantityOnBackOrder`. This value will be negative if `QuantityOnBackOrder` is greater than 0.", + "format" : "double", + "readOnly" : true + }, + "QuantityOnBackOrder" : { + "type" : "number", + "description" : "The quantity of the item on backorder. This will be 0 if `QuantityOnHand` is greater than 0.", + "format" : "double", + "readOnly" : true + }, "UpdatedDateUTC" : { "type" : "string", "description" : "Last modified date in UTC format", @@ -3333,7 +3576,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "items" }; defs["Journal"] = { "title" : "", @@ -3445,7 +3688,7 @@ }, "TaxType" : { "type" : "string", - "description" : "The tax type from TaxRates" + "description" : "The tax type from taxRates" }, "TaxName" : { "type" : "string", @@ -3469,6 +3712,13 @@ "title" : "", "type" : "object", "properties" : { + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Journals" : { "type" : "array", "items" : { @@ -3477,7 +3727,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "journals" }; defs["LineAmountTypes"] = { "title" : "", @@ -3540,7 +3790,7 @@ }, "LineAmount" : { "type" : "number", - "description" : "If you wish to omit either of the or you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if a DiscountRate has been used . i.e LineAmount = Quantity * Unit Amount * ((100 – DiscountRate)/100)", + "description" : "If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount", "format" : "double", "x-is-money" : true }, @@ -3559,7 +3809,7 @@ }, "DiscountAmount" : { "type" : "number", - "description" : "Discount amount being applied to a line item. Only supported on ACCREC invoices - ACCPAY invoices and credit notes in Xero do not support discounts.", + "description" : "Discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts.", "format" : "double", "x-is-money" : true }, @@ -3568,6 +3818,22 @@ "description" : "The Xero identifier for a Repeating Invoice", "format" : "uuid", "example" : "00000000-0000-0000-0000-000000000000" + }, + "Taxability" : { + "type" : "string", + "description" : "The type of taxability", + "enum" : [ "TAXABLE", "NON_TAXABLE", "EXEMPT", "PART_TAXABLE", "NOT_APPLICABLE" ] + }, + "SalesTaxCodeId" : { + "type" : "number", + "description" : "The ID of the sales tax code" + }, + "TaxBreakdown" : { + "type" : "array", + "description" : "An array of tax components defined for this line item", + "items" : { + "$ref" : "#/components/schemas/TaxBreakdownComponent" + } } }, "description" : "", @@ -3710,7 +3976,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "linked_transactions" }; defs["ManualJournal"] = { "title" : "", @@ -3859,6 +4125,16 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "ManualJournals" : { "type" : "array", "items" : { @@ -3867,7 +4143,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "manual_journals" }; defs["OnlineInvoice"] = { "title" : "", @@ -3895,7 +4171,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "online_invoices" }; defs["Organisation"] = { "title" : "", @@ -3931,7 +4207,7 @@ "OrganisationType" : { "type" : "string", "description" : "Organisation Type", - "enum" : [ "ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "INDIVIDUAL", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST" ] + "enum" : [ "ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "INDIVIDUAL", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST", "PERSONAL", "SINGLEMEMBERLLC", "CCORPORATIONLLC", "PARTNERSHIPLLC", "SCORPORATIONLLC", "LLC", "NOTLLC", "UNSPECIFIED" ] }, "BaseCurrency" : { "$ref" : "#/components/schemas/CurrencyCode" @@ -4008,7 +4284,7 @@ "OrganisationEntityType" : { "type" : "string", "description" : "Organisation Entity Type", - "enum" : [ "ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "INDIVIDUAL", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST" ] + "enum" : [ "ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "INDIVIDUAL", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST", "PERSONAL", "SINGLEMEMBERLLC", "CCORPORATIONLLC", "PARTNERSHIPLLC", "SCORPORATIONLLC", "LLC", "NOTLLC", "UNSPECIFIED" ] }, "ShortCode" : { "type" : "string", @@ -4017,7 +4293,7 @@ "Class" : { "type" : "string", "description" : "Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)", - "enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK" ] + "enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE", "SIMPLE", "BASICLITE", "ULTRA" ] }, "Edition" : { "type" : "string", @@ -4070,7 +4346,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "organisations" }; defs["Overpayment"] = { "title" : "", @@ -4129,6 +4405,12 @@ "example" : "/Date(1573755038314)/", "x-is-msdate-time" : true }, + "UpdatedDateUTCString" : { + "type" : "string", + "description" : "UTC ISO-8601 formatted timestamp of last update to the overpayment", + "readOnly" : true, + "example" : "2019-11-14T18:10:38Z" + }, "CurrencyCode" : { "$ref" : "#/components/schemas/CurrencyCode" }, @@ -4176,6 +4458,11 @@ "example" : false, "default" : false }, + "Reference" : { + "type" : "string", + "description" : "An optional description for Overpayment", + "example" : "Ref for payment" + }, "Attachments" : { "type" : "array", "description" : "See Attachments", @@ -4193,6 +4480,16 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Overpayments" : { "type" : "array", "items" : { @@ -4201,7 +4498,26 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "overpayments" +}; + defs["Pagination"] = { + "title" : "", + "type" : "object", + "properties" : { + "page" : { + "type" : "integer" + }, + "pageSize" : { + "type" : "integer" + }, + "pageCount" : { + "type" : "integer" + }, + "itemCount" : { + "type" : "integer" + } + }, + "description" : "" }; defs["Payment"] = { "title" : "", @@ -4227,6 +4543,9 @@ "type" : "string", "description" : "Number of invoice or credit note you are applying payment to e.g. INV-4003" }, + "BatchPayment" : { + "$ref" : "#/components/schemas/BatchPayment" + }, "Account" : { "$ref" : "#/components/schemas/Account" }, @@ -4283,6 +4602,12 @@ "example" : "/Date(1573755038314)/", "x-is-msdate-time" : true }, + "UpdatedDateUTCString" : { + "type" : "string", + "description" : "UTC ISO-8601 formatted timestamp of last update to the payment", + "readOnly" : true, + "example" : "2019-11-14T18:10:38Z" + }, "PaymentID" : { "type" : "string", "description" : "The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9", @@ -4329,6 +4654,13 @@ "items" : { "$ref" : "#/components/schemas/ValidationError" } + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } } }, "description" : "", @@ -4401,7 +4733,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "payment_services" }; defs["PaymentTerm"] = { "title" : "", @@ -4429,6 +4761,16 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Payments" : { "type" : "array", "items" : { @@ -4437,7 +4779,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "payments" }; defs["Phone"] = { "title" : "", @@ -4523,6 +4865,11 @@ "description" : "Returns Invoice number field. Reference field isn't available.", "readOnly" : true }, + "InvoiceNumber" : { + "type" : "string", + "description" : "Returns Invoice number for prepayment receive document only.", + "readOnly" : true + }, "UpdatedDateUTC" : { "type" : "string", "description" : "UTC timestamp of last update to the prepayment", @@ -4530,6 +4877,12 @@ "example" : "/Date(1573755038314)/", "x-is-msdate-time" : true }, + "UpdatedDateUTCString" : { + "type" : "string", + "description" : "UTC ISO-8601 formatted timestamp of last update to the prepayment", + "readOnly" : true, + "example" : "2019-11-14T18:10:38Z" + }, "CurrencyCode" : { "$ref" : "#/components/schemas/CurrencyCode" }, @@ -4538,6 +4891,12 @@ "description" : "Xero generated unique identifier", "format" : "uuid" }, + "BrandingThemeID" : { + "type" : "string", + "description" : "The unique identifier of the branding template applied to a receive prepayment", + "format" : "uuid", + "readOnly" : true + }, "CurrencyRate" : { "type" : "number", "description" : "The currency rate for a multicurrency prepayment. If no rate is specified, the XE.com day rate is used", @@ -4594,6 +4953,16 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Prepayments" : { "type" : "array", "items" : { @@ -4602,7 +4971,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "prepayments" }; defs["Purchase"] = { "title" : "", @@ -4793,6 +5162,16 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "PurchaseOrders" : { "type" : "array", "items" : { @@ -4801,7 +5180,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "purchase_orders" }; defs["Quote"] = { "title" : "", @@ -4960,7 +5339,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "quotes" }; defs["Receipt"] = { "title" : "", @@ -5081,7 +5460,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "receipts" }; defs["RepeatingInvoice"] = { "title" : "", @@ -5155,7 +5534,7 @@ }, "HasAttachments" : { "type" : "boolean", - "description" : "boolean to indicate if an invoice has an attachment", + "description" : "Boolean to indicate if an invoice has an attachment", "readOnly" : true, "example" : false, "default" : false @@ -5166,6 +5545,30 @@ "items" : { "$ref" : "#/components/schemas/Attachment" } + }, + "ApprovedForSending" : { + "type" : "boolean", + "description" : "Boolean to indicate whether the invoice has been approved for sending", + "example" : false, + "default" : false + }, + "SendCopy" : { + "type" : "boolean", + "description" : "Boolean to indicate whether a copy is sent to sender's email", + "example" : false, + "default" : false + }, + "MarkAsSent" : { + "type" : "boolean", + "description" : "Boolean to indicate whether the invoice in the Xero app displays as \"sent\"", + "example" : false, + "default" : false + }, + "IncludePDF" : { + "type" : "boolean", + "description" : "Boolean to indicate whether to include PDF attachment", + "example" : false, + "default" : false } }, "description" : "", @@ -5185,7 +5588,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "repeating_invoices" }; defs["Report"] = { "title" : "", @@ -5397,7 +5800,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "reports" }; defs["RequestEmpty"] = { "title" : "", @@ -5504,6 +5907,55 @@ "externalDocs" : { "url" : "https://developer.xero.com/documentation/api-guides/conversions" } +}; + defs["TaxBreakdownComponent"] = { + "title" : "", + "type" : "object", + "properties" : { + "TaxComponentId" : { + "type" : "string", + "description" : "The unique ID number of this component", + "format" : "uuid" + }, + "Type" : { + "type" : "string", + "description" : "The type of the jurisdiction", + "enum" : [ "SYSGST/USCOUNTRY", "SYSGST/USSTATE", "SYSGST/USCOUNTY", "SYSGST/USCITY", "SYSGST/USSPECIAL" ] + }, + "Name" : { + "type" : "string", + "description" : "The name of the jurisdiction" + }, + "TaxPercentage" : { + "type" : "number", + "description" : "The percentage of the tax" + }, + "TaxAmount" : { + "type" : "number", + "description" : "The amount of the tax" + }, + "TaxableAmount" : { + "type" : "number", + "description" : "The amount that is taxable" + }, + "NonTaxableAmount" : { + "type" : "number", + "description" : "The amount that is not taxable" + }, + "ExemptAmount" : { + "type" : "number", + "description" : "The amount that is exempt" + }, + "StateAssignedNo" : { + "type" : "string", + "description" : "The state assigned number of the jurisdiction" + }, + "JurisdictionRegion" : { + "type" : "string", + "description" : "Name identifying the region within the country" + } + }, + "description" : "" }; defs["TaxComponent"] = { "title" : "", @@ -5560,7 +6012,7 @@ "ReportTaxType" : { "type" : "string", "description" : "See ReportTaxTypes", - "enum" : [ "AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT" ] + "enum" : [ "AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "CAPEXINPUT", "UNDEFINED", "CAPEXOUTPUT", "ZEROEXPOUTPUT", "GOODSIMPORT", "NONEINPUT", "NOTREPORTED", "SROVRRS", "SROVRLVG", "SRLVG", "IM", "IMESS", "IMN33", "IMRE", "BADDEBTRECOVERY", "USSALESTAX", "BLINPUT3" ] }, "CanApplyToAssets" : { "type" : "boolean", @@ -5619,13 +6071,13 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "tax_rates" }; defs["TaxType"] = { "title" : "", "type" : "string", "description" : "See Tax Types – can only be used on update calls", - "enum" : [ "OUTPUT", "INPUT", "CAPEXINPUT", "EXEMPTEXPORT", "EXEMPTEXPENSES", "EXEMPTCAPITAL", "EXEMPTOUTPUT", "INPUTTAXED", "BASEXCLUDED", "GSTONCAPIMPORTS", "GSTONIMPORTS", "NONE", "INPUT2", "ZERORATED", "OUTPUT2", "CAPEXINPUT2", "CAPEXOUTPUT", "CAPEXOUTPUT2", "CAPEXSRINPUT", "CAPEXSROUTPUT", "ECACQUISITIONS", "ECZRINPUT", "ECZROUTPUT", "ECZROUTPUTSERVICES", "EXEMPTINPUT", "REVERSECHARGES", "RRINPUT", "RROUTPUT", "SRINPUT", "SROUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "BLINPUT", "DSOUTPUT", "EPINPUT", "ES33OUTPUT", "ESN33OUTPUT", "IGDSINPUT2", "IMINPUT2", "MEINPUT", "NRINPUT", "OPINPUT", "OSOUTPUT", "TXESSINPUT", "TXN33INPUT", "TXPETINPUT", "TXREINPUT", "INPUT3", "INPUT4", "OUTPUT3", "OUTPUT4", "SROUTPUT2", "TXCA", "SRCAS", "BLINPUT2", "DRCHARGESUPPLY20", "DRCHARGE20", "DRCHARGESUPPLY5", "DRCHARGE5" ] + "enum" : [ "OUTPUT", "INPUT", "CAPEXINPUT", "EXEMPTEXPORT", "EXEMPTEXPENSES", "EXEMPTCAPITAL", "EXEMPTOUTPUT", "INPUTTAXED", "BASEXCLUDED", "GSTONCAPIMPORTS", "GSTONIMPORTS", "NONE", "INPUT2", "ZERORATED", "OUTPUT2", "CAPEXINPUT2", "CAPEXOUTPUT", "CAPEXOUTPUT2", "CAPEXSRINPUT", "CAPEXSROUTPUT", "ECACQUISITIONS", "ECZRINPUT", "ECZROUTPUT", "ECZROUTPUTSERVICES", "EXEMPTINPUT", "REVERSECHARGES", "RRINPUT", "RROUTPUT", "SRINPUT", "SROUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "BLINPUT", "DSOUTPUT", "EPINPUT", "ES33OUTPUT", "ESN33OUTPUT", "IGDSINPUT2", "IMINPUT2", "MEINPUT", "NRINPUT", "OPINPUT", "OSOUTPUT", "TXESSINPUT", "TXN33INPUT", "TXPETINPUT", "TXREINPUT", "INPUT3", "INPUT4", "OUTPUT3", "OUTPUT4", "SROUTPUT2", "TXCA", "SRCAS", "BLINPUT2", "DRCHARGESUPPLY20", "DRCHARGE20", "DRCHARGESUPPLY5", "DRCHARGE5", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "OUTPUTY23", "DSOUTPUTY23", "INPUTY23", "IMINPUT2Y23", "IGDSINPUT2Y23", "TXPETINPUTY23", "TXESSINPUTY23", "TXN33INPUTY23", "TXREINPUTY23", "TXCAY23", "BADDEBTRELIEFY23", "IGDSINPUT3Y23", "SROVRRSY23", "SROVRLVGY23", "SRLVGY23", "TXRCN33Y23", "TXRCREY23", "TXRCESSY23", "TXRCTSY23", "IM", "IMY23", "IMESS", "IMESSY23", "IMN33", "IMN33Y23", "IMRE", "IMREY23", "BADDEBTRECOVERY", "BADDEBTRECOVERYY23", "OUTPUTY24", "DSOUTPUTY24", "INPUTY24", "IGDSINPUT2Y24", "TXPETINPUTY24", "TXESSINPUTY24", "TXN33INPUTY24", "TXREINPUTY24", "TXCAY24", "BADDEBTRELIEFY24", "IGDSINPUT3Y24", "SROVRRSY24", "SROVRLVGY24", "SRLVGY24", "TXRCTSY24", "TXRCESSY24", "TXRCN33Y24", "TXRCREY24", "IMY24", "IMESSY24", "IMN33Y24", "IMREY24", "BADDEBTRECOVERYY24", "OSOUTPUT2", "BLINPUT3", "BLINPUT3Y23", "BLINPUT3Y24" ] }; defs["TenNinetyNineContact"] = { "title" : "", @@ -5744,6 +6196,19 @@ "type" : "string", "description" : "Contact contact id", "format" : "uuid" + }, + "LegalName" : { + "type" : "string", + "description" : "Contact legal name" + }, + "BusinessName" : { + "type" : "string", + "description" : "Contact business name" + }, + "FederalTaxClassification" : { + "type" : "string", + "description" : "Contact federal tax classification", + "enum" : [ "SOLE_PROPRIETOR", "PARTNERSHIP", "TRUST_OR_ESTATE", "NONPROFIT", "C_CORP", "S_CORP", "OTHER" ] } }, "description" : "" @@ -5752,7 +6217,7 @@ "title" : "", "type" : "string", "description" : "Timezone specifications", - "enum" : [ "MOROCCOSTANDARDTIME", "UTC", "GMTSTANDARDTIME", "GREENWICHSTANDARDTIME", "WEUROPESTANDARDTIME", "CENTRALEUROPESTANDARDTIME", "ROMANCESTANDARDTIME", "CENTRALEUROPEANSTANDARDTIME", "WCENTRALAFRICASTANDARDTIME", "NAMIBIASTANDARDTIME", "JORDANSTANDARDTIME", "GTBSTANDARDTIME", "MIDDLEEASTSTANDARDTIME", "EGYPTSTANDARDTIME", "SYRIASTANDARDTIME", "EEUROPESTANDARDTIME", "SOUTHAFRICASTANDARDTIME", "FLESTANDARDTIME", "TURKEYSTANDARDTIME", "ISRAELSTANDARDTIME", "KALININGRADSTANDARDTIME", "LIBYASTANDARDTIME", "ARABICSTANDARDTIME", "ARABSTANDARDTIME", "BELARUSSTANDARDTIME", "RUSSIANSTANDARDTIME", "EAFRICASTANDARDTIME", "IRANSTANDARDTIME", "ARABIANSTANDARDTIME", "AZERBAIJANSTANDARDTIME", "RUSSIATIMEZONE3", "MAURITIUSSTANDARDTIME", "GEORGIANSTANDARDTIME", "CAUCASUSSTANDARDTIME", "AFGHANISTANSTANDARDTIME", "WESTASIASTANDARDTIME", "EKATERINBURGSTANDARDTIME", "PAKISTANSTANDARDTIME", "INDIASTANDARDTIME", "SRILANKASTANDARDTIME", "NEPALSTANDARDTIME", "CENTRALASIASTANDARDTIME", "BANGLADESHSTANDARDTIME", "NCENTRALASIASTANDARDTIME", "MYANMARSTANDARDTIME", "SEASIASTANDARDTIME", "NORTHASIASTANDARDTIME", "CHINASTANDARDTIME", "NORTHASIAEASTSTANDARDTIME", "SINGAPORESTANDARDTIME", "WAUSTRALIASTANDARDTIME", "TAIPEISTANDARDTIME", "ULAANBAATARSTANDARDTIME", "TOKYOSTANDARDTIME", "KOREASTANDARDTIME", "YAKUTSKSTANDARDTIME", "CENAUSTRALIASTANDARDTIME", "AUSCENTRALSTANDARDTIME", "EAUSTRALIASTANDARDTIME", "AUSEASTERNSTANDARDTIME", "WESTPACIFICSTANDARDTIME", "TASMANIASTANDARDTIME", "MAGADANSTANDARDTIME", "VLADIVOSTOKSTANDARDTIME", "RUSSIATIMEZONE10", "CENTRALPACIFICSTANDARDTIME", "RUSSIATIMEZONE11", "NEWZEALANDSTANDARDTIME", "UTC+12", "UTC+13", "FIJISTANDARDTIME", "KAMCHATKASTANDARDTIME", "TONGASTANDARDTIME", "SAMOASTANDARDTIME", "LINEISLANDSSTANDARDTIME", "AZORESSTANDARDTIME", "CAPEVERDESTANDARDTIME", "UTC02", "MIDATLANTICSTANDARDTIME", "ESOUTHAMERICASTANDARDTIME", "ARGENTINASTANDARDTIME", "SAEASTERNSTANDARDTIME", "GREENLANDSTANDARDTIME", "MONTEVIDEOSTANDARDTIME", "BAHIASTANDARDTIME", "NEWFOUNDLANDSTANDARDTIME", "PARAGUAYSTANDARDTIME", "ATLANTICSTANDARDTIME", "CENTRALBRAZILIANSTANDARDTIME", "SAWESTERNSTANDARDTIME", "PACIFICSASTANDARDTIME", "VENEZUELASTANDARDTIME", "SAPACIFICSTANDARDTIME", "EASTERNSTANDARDTIME", "USEASTERNSTANDARDTIME", "CENTRALAMERICASTANDARDTIME", "CENTRALSTANDARDTIME", "CENTRALSTANDARDTIME(MEXICO)", "CANADACENTRALSTANDARDTIME", "USMOUNTAINSTANDARDTIME", "MOUNTAINSTANDARDTIME(MEXICO)", "MOUNTAINSTANDARDTIME", "PACIFICSTANDARDTIME(MEXICO)", "PACIFICSTANDARDTIME", "ALASKANSTANDARDTIME", "HAWAIIANSTANDARDTIME", "UTC11", "DATELINESTANDARDTIME", "EASTERISLANDSTANDARDTIME" ] + "enum" : [ "AFGHANISTANSTANDARDTIME", "ALASKANSTANDARDTIME", "ALEUTIANSTANDARDTIME", "ALTAISTANDARDTIME", "ARABIANSTANDARDTIME", "ARABICSTANDARDTIME", "ARABSTANDARDTIME", "ARGENTINASTANDARDTIME", "ASTRAKHANSTANDARDTIME", "ATLANTICSTANDARDTIME", "AUSCENTRALSTANDARDTIME", "AUSCENTRALWSTANDARDTIME", "AUSEASTERNSTANDARDTIME", "AZERBAIJANSTANDARDTIME", "AZORESSTANDARDTIME", "BAHIASTANDARDTIME", "BANGLADESHSTANDARDTIME", "BELARUSSTANDARDTIME", "BOUGAINVILLESTANDARDTIME", "CANADACENTRALSTANDARDTIME", "CAPEVERDESTANDARDTIME", "CAUCASUSSTANDARDTIME", "CENAUSTRALIASTANDARDTIME", "CENTRALAMERICASTANDARDTIME", "CENTRALASIASTANDARDTIME", "CENTRALBRAZILIANSTANDARDTIME", "CENTRALEUROPEANSTANDARDTIME", "CENTRALEUROPESTANDARDTIME", "CENTRALPACIFICSTANDARDTIME", "CENTRALSTANDARDTIME", "CENTRALSTANDARDTIME(MEXICO)", "CHATHAMISLANDSSTANDARDTIME", "CHINASTANDARDTIME", "CUBASTANDARDTIME", "DATELINESTANDARDTIME", "EAFRICASTANDARDTIME", "EASTERISLANDSTANDARDTIME", "EASTERNSTANDARDTIME", "EASTERNSTANDARDTIME(MEXICO)", "EAUSTRALIASTANDARDTIME", "EEUROPESTANDARDTIME", "EGYPTSTANDARDTIME", "EKATERINBURGSTANDARDTIME", "ESOUTHAMERICASTANDARDTIME", "FIJISTANDARDTIME", "FLESTANDARDTIME", "GEORGIANSTANDARDTIME", "GMTSTANDARDTIME", "GREENLANDSTANDARDTIME", "GREENWICHSTANDARDTIME", "GTBSTANDARDTIME", "HAITISTANDARDTIME", "HAWAIIANSTANDARDTIME", "INDIASTANDARDTIME", "IRANSTANDARDTIME", "ISRAELSTANDARDTIME", "JORDANSTANDARDTIME", "KALININGRADSTANDARDTIME", "KAMCHATKASTANDARDTIME", "KOREASTANDARDTIME", "LIBYASTANDARDTIME", "LINEISLANDSSTANDARDTIME", "LORDHOWESTANDARDTIME", "MAGADANSTANDARDTIME", "MAGALLANESSTANDARDTIME", "MARQUESASSTANDARDTIME", "MAURITIUSSTANDARDTIME", "MIDATLANTICSTANDARDTIME", "MIDDLEEASTSTANDARDTIME", "MONTEVIDEOSTANDARDTIME", "MOROCCOSTANDARDTIME", "MOUNTAINSTANDARDTIME", "MOUNTAINSTANDARDTIME(MEXICO)", "MYANMARSTANDARDTIME", "NAMIBIASTANDARDTIME", "NCENTRALASIASTANDARDTIME", "NEPALSTANDARDTIME", "NEWFOUNDLANDSTANDARDTIME", "NEWZEALANDSTANDARDTIME", "NORFOLKSTANDARDTIME", "NORTHASIAEASTSTANDARDTIME", "NORTHASIASTANDARDTIME", "NORTHKOREASTANDARDTIME", "OMSKSTANDARDTIME", "PACIFICSASTANDARDTIME", "PACIFICSTANDARDTIME", "PACIFICSTANDARDTIME(MEXICO)", "PAKISTANSTANDARDTIME", "PARAGUAYSTANDARDTIME", "QYZYLORDASTANDARDTIME", "ROMANCESTANDARDTIME", "RUSSIANSTANDARDTIME", "RUSSIATIMEZONE10", "RUSSIATIMEZONE11", "RUSSIATIMEZONE3", "SAEASTERNSTANDARDTIME", "SAINTPIERRESTANDARDTIME", "SAKHALINSTANDARDTIME", "SAMOASTANDARDTIME", "SAOTOMESTANDARDTIME", "SAPACIFICSTANDARDTIME", "SARATOVSTANDARDTIME", "SAWESTERNSTANDARDTIME", "SEASIASTANDARDTIME", "SINGAPORESTANDARDTIME", "SOUTHAFRICASTANDARDTIME", "SOUTHSUDANSTANDARDTIME", "SRILANKASTANDARDTIME", "SUDANSTANDARDTIME", "SYRIASTANDARDTIME", "TAIPEISTANDARDTIME", "TASMANIASTANDARDTIME", "TOCANTINSSTANDARDTIME", "TOKYOSTANDARDTIME", "TOMSKSTANDARDTIME", "TONGASTANDARDTIME", "TRANSBAIKALSTANDARDTIME", "TURKEYSTANDARDTIME", "TURKSANDCAICOSSTANDARDTIME", "ULAANBAATARSTANDARDTIME", "USEASTERNSTANDARDTIME", "USMOUNTAINSTANDARDTIME", "UTC", "UTC+12", "UTC+13", "UTC02", "UTC08", "UTC09", "UTC11", "VENEZUELASTANDARDTIME", "VLADIVOSTOKSTANDARDTIME", "VOLGOGRADSTANDARDTIME", "WAUSTRALIASTANDARDTIME", "WCENTRALAFRICASTANDARDTIME", "WESTASIASTANDARDTIME", "WESTBANKSTANDARDTIME", "WESTPACIFICSTANDARDTIME", "WEUROPESTANDARDTIME", "WMONGOLIASTANDARDTIME", "YAKUTSKSTANDARDTIME", "YUKONSTANDARDTIME" ] }; defs["TrackingCategories"] = { "title" : "", @@ -5766,7 +6231,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "tracking_categories" }; defs["TrackingCategory"] = { "title" : "", @@ -5852,7 +6317,39 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "options" +}; + defs["TrackingReference"] = { + "title" : "", + "required" : [ "TrackingCategoryID", "TrackingOptionID" ], + "type" : "object", + "properties" : { + "TrackingCategoryID" : { + "type" : "string", + "description" : "The Xero identifier for a tracking category", + "format" : "uuid" + }, + "TrackingOptionID" : { + "type" : "string", + "description" : "The Xero identifier for a tracking category option", + "format" : "uuid" + }, + "Name" : { + "maxLength" : 100, + "type" : "string", + "description" : "The name of the tracking category", + "readOnly" : true + }, + "Option" : { + "type" : "string", + "description" : "See Tracking Options", + "readOnly" : true + } + }, + "description" : "", + "externalDocs" : { + "url" : "http://developer.xero.com/documentation/api/tracking-categories/" + } }; defs["User"] = { "title" : "", @@ -5889,7 +6386,7 @@ "OrganisationRole" : { "type" : "string", "description" : "User role that defines permissions in Xero and via API (READONLY, INVOICEONLY, STANDARD, FINANCIALADVISER, etc)", - "enum" : [ "READONLY", "INVOICEONLY", "STANDARD", "FINANCIALADVISER", "MANAGEDCLIENT", "CASHBOOKCLIENT", "UNKNOWN" ] + "enum" : [ "READONLY", "INVOICEONLY", "STANDARD", "FINANCIALADVISER", "MANAGEDCLIENT", "CASHBOOKCLIENT", "UNKNOWN", "REMOVED" ] } }, "description" : "", @@ -5909,7 +6406,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "users" }; defs["ValidationError"] = { "title" : "", @@ -5964,6 +6461,7 @@ + @@ -6008,7 +6506,7 @@