-
Notifications
You must be signed in to change notification settings - Fork 125
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
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
459d3b3
Remove TaxType query from GET TaxRates
jvcudis 637c187
Add TaxType parameter ref
jvcudis 904212b
Add spec for /TaxRates/:TaxType endpoint
jvcudis 112d36b
Update description
jvcudis 24b0d22
Update operationId value
jvcudis e5d81b7
Fix json indentation
jvcudis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -22752,6 +22745,54 @@ paths: | |
} | ||
] | ||
}' | ||
"/TaxRates/{TaxType}": | ||
parameters: | ||
- $ref: "#/components/parameters/requiredHeader" | ||
get: | ||
security: | ||
- OAuth2: [accounting.settings, accounting.settings.read] | ||
tags: | ||
- Accounting | ||
operationId: getTaxRateByTaxType | ||
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": [ | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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' | ||
|
@@ -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 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.