diff --git a/.github/actions/notify-slack/action.yml b/.github/actions/notify-slack/action.yml new file mode 100644 index 000000000..add9673f1 --- /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 000000000..b308cb3bd --- /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 000000000..66fb13cae --- /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-lint-test.yml b/.github/workflows/build-lint-test.yml new file mode 100644 index 000000000..336d8d073 --- /dev/null +++ b/.github/workflows/build-lint-test.yml @@ -0,0 +1,42 @@ +name: Java Build, Lint and Test + +on: + push: + branches: + - master + pull_request: + types: [opened, reopened, synchronize] + +jobs: + build-test-lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout Xero-Java repo + uses: actions/checkout@v4 + with: + path: Xero-Java + + - name: Set up JDK environment + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '11' + cache: maven + + - 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-Java/src/test/java/com/xero/api/util + + - name: Build and test post generation + run: | + mvn clean verify -Dgpg.skip + working-directory: Xero-Java diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..a3e2715c4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,176 @@ +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-Java repo + uses: actions/checkout@v4 + with: + repository: XeroAPI/Xero-Java + path: Xero-Java + + - name: Set up JDK environment + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '11' + cache: maven + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-passphrase: GPG_PASSPHRASE + + - 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-Java + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Import GPG Key + run: | + echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import + env: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY}} + + - name: Publish to OSSRH Staging API + run: | + export GPG_TTY=$(tty) + mvn clean deploy -DskipTests=true + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_TOKEN }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + working-directory: Xero-Java + + # This needs to run from the same IP address that the mvn deploy ran on. + # Once this is complete you will need to log in to https://central.sonatype.com/publishing + # to finish the publish. We can supply publishing_type as 'automatic' instead to skip this step. + # See docs: https://central.sonatype.org/publish/publish-portal-ossrh-staging-api + - name: OSSRH Staging API publish + run: | + curl -i -X POST -u "$MAVEN_USERNAME:$MAVEN_PASSWORD" https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/com.github.xeroapi?publishing_type=user_managed + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_TOKEN }} + working-directory: Xero-Java + + notify-slack-on-success: + runs-on: ubuntu-latest + needs: publish + if: success() + permissions: + contents: read + steps: + - name: Checkout Xero-Java repo + uses: actions/checkout@v4 + with: + repository: XeroAPI/Xero-Java + path: Xero-Java + + - name: Send slack notification on success + uses: ./Xero-Java/.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-Java repo + uses: actions/checkout@v4 + with: + repository: XeroAPI/Xero-Java + path: Xero-Java + + - name: Send slack notification on failure + uses: ./Xero-Java/.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-Java + path: Xero-Java + + - name: Install octokit dependencies + run: npm i + working-directory: Xero-Java/.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-Java/.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": "java", + "cab_key": "${{ github.event.inputs.cab_id }}" + } + }' diff --git a/.gitignore b/.gitignore index ef3f2934c..2b3e1bb50 100644 --- a/.gitignore +++ b/.gitignore @@ -139,4 +139,6 @@ dist/ nbdist/ .nb-gradle/ *.log -.build_notes.md \ No newline at end of file +.build_notes.md + +.vscode diff --git a/README.md b/README.md index e2e838648..b3e15156a 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ The **Xero-Java** SDK makes it easy for developers to access Xero's APIs in thei - [App Store Subscriptions](#app-store-subscriptions) - [API Clients](#api-clients) - [Usage Examples](#usage-examples) +- [Running Test(s) in Local](#running-tests-in-local) - [SDK conventions](#sdk-conventions) - [Participating in Xero’s developer community](#participating-in-xeros-developoer-community) @@ -677,7 +678,17 @@ try { System.out.println(e.getMessage()); } ``` +## 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 **Xero-Java--> src--> test--> util** folder in the terminal +* Execute the script **./start-prism.sh** +* This will start the PRISM Server in Local +* Run **mvn clean verify -DskipTests=false** to build the Java code along with Test Cases. +--- ## SDK conventions ### Working with dates diff --git a/docs/v4/accounting/index.html b/docs/v4/accounting/index.html index 1283a6574..ae0a51890 100644 --- a/docs/v4/accounting/index.html +++ b/docs/v4/accounting/index.html @@ -987,7 +987,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "accounts" }; defs["AccountsPayable"] = { "title" : "", @@ -1054,7 +1054,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "actions" }; defs["Address"] = { "title" : "", @@ -1243,7 +1243,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "allocations" }; defs["Attachment"] = { "title" : "", @@ -1296,7 +1296,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "attachments" }; defs["BalanceDetails"] = { "title" : "", @@ -1463,6 +1463,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" : { @@ -1471,7 +1481,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "bank_transactions" }; defs["BankTransfer"] = { "title" : "", @@ -1550,6 +1560,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", @@ -1562,6 +1592,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" : "", @@ -1575,7 +1642,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" : "", @@ -1765,7 +1846,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "batch_payments" }; defs["Bill"] = { "title" : "", @@ -1835,7 +1916,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "branding_themes" }; defs["Budget"] = { "title" : "", @@ -1948,7 +2029,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "budgets" }; defs["CISOrgSetting"] = { "title" : "", @@ -1986,7 +2067,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "cis_settings" }; defs["CISSetting"] = { "title" : "", @@ -2020,7 +2101,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "cis_settings" }; defs["Contact"] = { "title" : "", @@ -2092,6 +2173,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" @@ -2286,7 +2372,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "contact_groups" }; defs["ContactPerson"] = { "title" : "", @@ -2318,6 +2404,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" : { @@ -2326,7 +2422,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "contacts" }; defs["ConversionBalances"] = { "title" : "", @@ -2449,6 +2545,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" }, @@ -2472,7 +2574,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" : { @@ -2542,6 +2644,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" : "", @@ -2553,6 +2662,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" : { @@ -2561,7 +2680,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "credit_notes" }; defs["Currencies"] = { "title" : "", @@ -2575,7 +2694,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "currencies" }; defs["Currency"] = { "title" : "", @@ -2598,7 +2717,7 @@ "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", "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", "" ], + "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"] = { @@ -2710,7 +2829,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "employees" }; defs["Error"] = { "title" : "", @@ -2834,7 +2953,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "expense_claims" }; defs["ExternalLink"] = { "title" : "", @@ -2899,7 +3018,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "history_records" }; defs["ImportSummary"] = { "title" : "", @@ -3184,11 +3303,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", @@ -3227,12 +3352,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" : "", @@ -3260,12 +3436,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" : { @@ -3274,7 +3460,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "invoices" }; defs["Item"] = { "title" : "", @@ -3331,10 +3517,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", @@ -3376,7 +3574,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "items" }; defs["Journal"] = { "title" : "", @@ -3512,6 +3710,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" : { @@ -3520,7 +3725,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "journals" }; defs["LineAmountTypes"] = { "title" : "", @@ -3611,6 +3816,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" : "", @@ -3753,7 +3974,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "linked_transactions" }; defs["ManualJournal"] = { "title" : "", @@ -3902,6 +4123,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" : { @@ -3910,7 +4141,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "manual_journals" }; defs["OnlineInvoice"] = { "title" : "", @@ -3938,7 +4169,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "online_invoices" }; defs["Organisation"] = { "title" : "", @@ -3974,7 +4205,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" @@ -4051,7 +4282,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", @@ -4060,7 +4291,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", "ULTIMATE", "LITE" ] + "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", @@ -4113,7 +4344,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "organisations" }; defs["Overpayment"] = { "title" : "", @@ -4172,6 +4403,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" }, @@ -4219,6 +4456,11 @@ "example" : false, "default" : false }, + "Reference" : { + "type" : "string", + "description" : "An optional description for Overpayment", + "example" : "Ref for payment" + }, "Attachments" : { "type" : "array", "description" : "See Attachments", @@ -4236,6 +4478,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" : { @@ -4244,7 +4496,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" : "", @@ -4329,6 +4600,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", @@ -4375,6 +4652,13 @@ "items" : { "$ref" : "#/components/schemas/ValidationError" } + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } } }, "description" : "", @@ -4447,7 +4731,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "payment_services" }; defs["PaymentTerm"] = { "title" : "", @@ -4475,6 +4759,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" : { @@ -4483,7 +4777,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "payments" }; defs["Phone"] = { "title" : "", @@ -4569,6 +4863,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", @@ -4576,6 +4875,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" }, @@ -4584,6 +4889,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", @@ -4640,6 +4951,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" : { @@ -4648,7 +4969,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "prepayments" }; defs["Purchase"] = { "title" : "", @@ -4839,6 +5160,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" : { @@ -4847,7 +5178,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "purchase_orders" }; defs["Quote"] = { "title" : "", @@ -5006,7 +5337,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "quotes" }; defs["Receipt"] = { "title" : "", @@ -5127,7 +5458,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "receipts" }; defs["RepeatingInvoice"] = { "title" : "", @@ -5255,7 +5586,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "repeating_invoices" }; defs["Report"] = { "title" : "", @@ -5467,7 +5798,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "reports" }; defs["RequestEmpty"] = { "title" : "", @@ -5574,6 +5905,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" : "", @@ -5630,7 +6010,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", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "CAPEXINPUT", "UNDEFINED", "CAPEXOUTPUT", "ZEROEXPOUTPUT", "GOODSIMPORT", "NONEINPUT", "NOTREPORTED", "SROVRRS", "SROVRLVG", "SRLVG", "IM", "IMESS", "IMN33", "IMRE", "BADDEBTRECOVERY" ] + "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", @@ -5689,13 +6069,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", "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" ] + "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" : "", @@ -5849,7 +6229,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "tracking_categories" }; defs["TrackingCategory"] = { "title" : "", @@ -5935,7 +6315,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" : "", @@ -5972,7 +6384,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" : "", @@ -5992,7 +6404,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "users" }; defs["ValidationError"] = { "title" : "", @@ -6044,6 +6456,7 @@ + @@ -6089,7 +6502,7 @@