From 459d3b3f7b394e51c1b8f6a71914f863d99fd1ba Mon Sep 17 00:00:00 2001 From: Ann Cudis Date: Fri, 19 Jan 2024 15:16:16 +1300 Subject: [PATCH 1/6] Remove TaxType query from GET TaxRates --- xero_accounting.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/xero_accounting.yaml b/xero_accounting.yaml index 773986570..69a4c0f05 100644 --- a/xero_accounting.yaml +++ b/xero_accounting.yaml @@ -22354,13 +22354,6 @@ paths: example: "Name ASC" schema: type: string - - in: query - name: TaxType - x-snake: tax_type - description: Filter by tax type - example: "INPUT" - schema: - type: string responses: '200': description: Success - return response of type TaxRates array with TaxRates From 637c187495a8cc7c3bfd1741c4e5eb61a7d32e5e Mon Sep 17 00:00:00 2001 From: Ann Cudis Date: Fri, 19 Jan 2024 15:22:53 +1300 Subject: [PATCH 2/6] Add TaxType parameter ref --- xero_accounting.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xero_accounting.yaml b/xero_accounting.yaml index 69a4c0f05..f04dd4bef 100644 --- a/xero_accounting.yaml +++ b/xero_accounting.yaml @@ -23662,6 +23662,14 @@ components: schema: type: string format: uuid + TaxType: + required: true + in: path + name: TaxType + description: A valid TaxType code + example: "INPUT2" + schema: + type: string responses: 400Error: description: A failed request due to validation error From 904212b65a133f6bd06b5311439135006e7ad780 Mon Sep 17 00:00:00 2001 From: Ann Cudis Date: Fri, 19 Jan 2024 15:25:08 +1300 Subject: [PATCH 3/6] Add spec for /TaxRates/:TaxType endpoint --- xero_accounting.yaml | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/xero_accounting.yaml b/xero_accounting.yaml index f04dd4bef..110473c60 100644 --- a/xero_accounting.yaml +++ b/xero_accounting.yaml @@ -22745,6 +22745,54 @@ paths: } ] }' + "/TaxRates/{TaxType}": + parameters: + - $ref: "#/components/parameters/requiredHeader" + get: + security: + - OAuth2: [accounting.settings, accounting.settings.read] + tags: + - Accounting + operationId: getTaxRates + summary: Retrieves a single tax rate by using a unique TaxType code + parameters: + - $ref: "#/components/parameters/TaxType" + responses: + "200": + description: Success - return response of type TaxRates array with one TaxRate + content: + application/json: + schema: + $ref: "#/components/schemas/TaxRates" + example: '{ + "Id": "455d494d-9706-465b-b584-7086ca406b27", + "Status": "OK", + "ProviderName": "Xero API Partner", + "DateTimeUTC": "\/Date(1550797359081)\/", + "TaxRates": [ + { + "Name": "15% GST on Expenses", + "TaxType": "INPUT2", + "ReportTaxType": "INPUT", + "CanApplyToAssets": true, + "CanApplyToEquity": true, + "CanApplyToExpenses": true, + "CanApplyToLiabilities": true, + "CanApplyToRevenue": false, + "DisplayTaxRate": 15.0000, + "EffectiveRate": 15.0000, + "Status": "ACTIVE", + "TaxComponents": [ + { + "Name": "GST", + "Rate": 15.0000, + "IsCompound": false, + "IsNonRecoverable": false + } + ] + } + ] + }' /TrackingCategories: parameters: - $ref: '#/components/parameters/requiredHeader' From 112d36bede186bbac0296c40b12987e11f081d18 Mon Sep 17 00:00:00 2001 From: Ann Cudis Date: Fri, 19 Jan 2024 15:29:23 +1300 Subject: [PATCH 4/6] Update description --- xero_accounting.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xero_accounting.yaml b/xero_accounting.yaml index 110473c60..3b8d44903 100644 --- a/xero_accounting.yaml +++ b/xero_accounting.yaml @@ -22754,7 +22754,7 @@ paths: tags: - Accounting operationId: getTaxRates - summary: Retrieves a single tax rate by using a unique TaxType code + summary: Retrieves a specific tax rate according to given TaxType code parameters: - $ref: "#/components/parameters/TaxType" responses: From 24b0d22108ac3ec33b6d0cb34e7cfd2839ad3dbb Mon Sep 17 00:00:00 2001 From: jvcudis Date: Thu, 8 Feb 2024 10:10:36 +1300 Subject: [PATCH 5/6] Update operationId value --- xero_accounting.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xero_accounting.yaml b/xero_accounting.yaml index 3b8d44903..d36217f28 100644 --- a/xero_accounting.yaml +++ b/xero_accounting.yaml @@ -22753,7 +22753,7 @@ paths: - OAuth2: [accounting.settings, accounting.settings.read] tags: - Accounting - operationId: getTaxRates + operationId: getTaxRateByTaxType summary: Retrieves a specific tax rate according to given TaxType code parameters: - $ref: "#/components/parameters/TaxType" From e5d81b7fd7539916352671da13dd7e56255b43a5 Mon Sep 17 00:00:00 2001 From: jvcudis Date: Mon, 19 Feb 2024 10:04:47 +1300 Subject: [PATCH 6/6] Fix json indentation --- xero_accounting.yaml | 56 ++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/xero_accounting.yaml b/xero_accounting.yaml index d36217f28..503e5e740 100644 --- a/xero_accounting.yaml +++ b/xero_accounting.yaml @@ -22765,34 +22765,34 @@ paths: schema: $ref: "#/components/schemas/TaxRates" example: '{ - "Id": "455d494d-9706-465b-b584-7086ca406b27", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "\/Date(1550797359081)\/", - "TaxRates": [ - { - "Name": "15% GST on Expenses", - "TaxType": "INPUT2", - "ReportTaxType": "INPUT", - "CanApplyToAssets": true, - "CanApplyToEquity": true, - "CanApplyToExpenses": true, - "CanApplyToLiabilities": true, - "CanApplyToRevenue": false, - "DisplayTaxRate": 15.0000, - "EffectiveRate": 15.0000, - "Status": "ACTIVE", - "TaxComponents": [ - { - "Name": "GST", - "Rate": 15.0000, - "IsCompound": false, - "IsNonRecoverable": false - } - ] - } - ] - }' + "Id": "455d494d-9706-465b-b584-7086ca406b27", + "Status": "OK", + "ProviderName": "Xero API Partner", + "DateTimeUTC": "\/Date(1550797359081)\/", + "TaxRates": [ + { + "Name": "15% GST on Expenses", + "TaxType": "INPUT2", + "ReportTaxType": "INPUT", + "CanApplyToAssets": true, + "CanApplyToEquity": true, + "CanApplyToExpenses": true, + "CanApplyToLiabilities": true, + "CanApplyToRevenue": false, + "DisplayTaxRate": 15.0000, + "EffectiveRate": 15.0000, + "Status": "ACTIVE", + "TaxComponents": [ + { + "Name": "GST", + "Rate": 15.0000, + "IsCompound": false, + "IsNonRecoverable": false + } + ] + } + ] + }' /TrackingCategories: parameters: - $ref: '#/components/parameters/requiredHeader'