Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GET TaxRates spec #579

Merged
merged 6 commits into from
Feb 19, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 56 additions & 7 deletions xero_accounting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -22752,6 +22745,54 @@ paths:
}
]
}'
"/TaxRates/{TaxType}":
parameters:
- $ref: "#/components/parameters/requiredHeader"
get:
security:
- OAuth2: [accounting.settings, accounting.settings.read]
tags:
- Accounting
operationId: getTaxRateByTaxType
Copy link
Contributor

@0GH4J 0GH4J Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jvcudis - can you update the operationId to "getTaxRateByTaxType"? This is how the other GETs by a given field are labelled in the spec. Also, "getTaxRates" causes an error because it is already used as the operationId for GET /TaxRates

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0GH4J - thanks for reviewing the PR 😄
I updated the operationId value as requested.

summary: Retrieves a specific tax rate according to given 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": [
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please indent the example JSON?

"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'
Expand Down Expand Up @@ -23669,6 +23710,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
Expand Down