Skip to content

Commit a2c688b

Browse files
committed
Fix several methods
getInvoiceAsPdf and getCreditNoteAsPdf - removed "contentType" param as it's unnecessary - changed response content type from application/octet-stream to application/pdf because it will alway return a pdf. Update createEmployees - add summarizeErrors param Remove createEmployee method (singular - as this path/method) /Employees POST is needed for updateOrCreateEmployees Add updateOrCreateEmployees method - with summarizeErrors param Update createManualJournals - add summarizeErrors param Remove createManualJournal method (singular - as this path/method) /ManualJournals POST is needed for updateOrCreateManualJournals Add updateOrCreateManualJournals method - with summarizeErrors param Remove createOverpaymentAllocation method Add createOverpaymentAllocations method - with summarizeErrors param Add createPrepaymentAllocations method - with summarizeErrors param Add missing attributes of Employee object StatusAttributeString ValidationErrors array Add missing attributes of Invoice object Warnings array Add missing attributes of ManualJournal object StatusAttributeString
1 parent bc82341 commit a2c688b

File tree

1 file changed

+81
-93
lines changed

1 file changed

+81
-93
lines changed

accounting-yaml/Xero_accounting_2.0.0_swagger.yaml

Lines changed: 81 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.0.0
22
info:
33
title: Accounting API
4-
version: "2.0.0"
4+
version: "2.0.1"
55
termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
66
contact:
77
name: "Xero Platform Team"
@@ -4952,18 +4952,11 @@ paths:
49524952
schema:
49534953
type: string
49544954
format: uuid
4955-
- required: true
4956-
in: header
4957-
name: contentType
4958-
description: The mime type of the attachment file you are retrieving i.e application/pdf
4959-
example: application/pdf
4960-
schema:
4961-
type: string
49624955
responses:
49634956
'200':
49644957
description: Success - return response of binary data from the Attachment to a Credit Note
49654958
content:
4966-
application/octet-stream:
4959+
application/pdf:
49674960
schema:
49684961
type: string
49694962
format: binary
@@ -5223,6 +5216,8 @@ paths:
52235216
- Accounting
52245217
operationId: createEmployees
52255218
summary: Allows you to create new employees used in Xero payrun
5219+
parameters:
5220+
- $ref: '#/components/parameters/summarizeErrors'
52265221
responses:
52275222
'200':
52285223
description: Success - return response of type Employees array with new Employee
@@ -5274,9 +5269,10 @@ paths:
52745269
- OAuth2: [accounting.settings]
52755270
tags:
52765271
- Accounting
5277-
operationId: createEmployee
5272+
operationId: updateOrCreateEmployees
52785273
summary: Allows you to create a single new employees used in Xero payrun
5279-
x-method: PUT
5274+
parameters:
5275+
- $ref: '#/components/parameters/summarizeErrors'
52805276
responses:
52815277
'200':
52825278
description: Success - return response of type Employees array with new Employee
@@ -5307,12 +5303,22 @@ paths:
53075303
$ref: '#/components/responses/400Error'
53085304
requestBody:
53095305
required: true
5310-
description: Employee object in body of request
5306+
description: Employees with array of Employee object in body of request
53115307
content:
53125308
application/json:
53135309
schema:
5314-
$ref: '#/components/schemas/Employee'
5315-
example: '{ firstName:"Nick", lastName:"Fury", externalLink:{ url:"http://twitter.com/#!/search/Nick+Fury" } }'
5310+
$ref: '#/components/schemas/Employees'
5311+
example: '{
5312+
employees:[
5313+
{
5314+
firstName:"Nick",
5315+
lastName:"Fury",
5316+
externalLink:{
5317+
url:"http://twitter.com/#!/search/Nick+Fury"
5318+
}
5319+
}
5320+
]
5321+
}'
53165322
'/Employees/{EmployeeID}':
53175323
parameters:
53185324
- $ref: '#/components/parameters/requiredHeader'
@@ -6690,18 +6696,11 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
66906696
schema:
66916697
type: string
66926698
format: uuid
6693-
- required: true
6694-
in: header
6695-
name: contentType
6696-
description: The mime type of the attachment file you are retrieving
6697-
example: application/pdf
6698-
schema:
6699-
type: string
67006699
responses:
67016700
'200':
67026701
description: Success - return response of byte array pdf version of specified Invoices
67036702
content:
6704-
application/octet-stream:
6703+
application/pdf:
67056704
schema:
67066705
type: string
67076706
format: binary
@@ -8076,6 +8075,8 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
80768075
- Accounting
80778076
operationId: createManualJournals
80788077
summary: Allows you to create one or more manual journals
8078+
parameters:
8079+
- $ref: '#/components/parameters/summarizeErrors'
80798080
responses:
80808081
'200':
80818082
description: Success - return response of type ManualJournals array with newly created ManualJournal
@@ -8177,9 +8178,10 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
81778178
- OAuth2: [accounting.transactions]
81788179
tags:
81798180
- Accounting
8180-
operationId: createManualJournal
8181+
operationId: updateOrCreateManualJournals
81818182
summary: Allows you to create a single manual journal
8182-
x-method: PUT
8183+
parameters:
8184+
- $ref: '#/components/parameters/summarizeErrors'
81838185
responses:
81848186
'200':
81858187
description: Success - return response of type ManualJournals array with newly created ManualJournal
@@ -8245,12 +8247,37 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
82458247
$ref: '#/components/responses/400Error'
82468248
requestBody:
82478249
required: true
8248-
description: ManualJournal object in body of request
8250+
description: ManualJournals array with ManualJournal object in body of request
82498251
content:
82508252
application/json:
82518253
schema:
8252-
$ref: '#/components/schemas/ManualJournal'
8253-
example: '{ narration:"Foo bar", journalLines:[ { lineAmount:100.0, accountCode:"400", description:"Hello there" }, { lineAmount:-100.0, accountCode:"400", description:"Goodbye", tracking:[ { name:"Simpsons", option:"Bart" } ] } ], date:"2019-03-14" }'
8254+
$ref: '#/components/schemas/ManualJournals'
8255+
example: '{
8256+
manualJournals:[
8257+
{
8258+
narration:"Foo bar",
8259+
journalLines:[
8260+
{
8261+
lineAmount:100.0,
8262+
accountCode:"400",
8263+
description:"Hello there"
8264+
},
8265+
{
8266+
lineAmount:-100.0,
8267+
accountCode:"400",
8268+
description:"Goodbye",
8269+
tracking:[
8270+
{
8271+
name:"Simpsons",
8272+
option:"Bart"
8273+
}
8274+
]
8275+
}
8276+
],
8277+
date:"2019-03-14"
8278+
}
8279+
]
8280+
}'
82548281
'/ManualJournals/{ManualJournalID}':
82558282
parameters:
82568283
- $ref: '#/components/parameters/requiredHeader'
@@ -9093,6 +9120,7 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
90939120
schema:
90949121
type: string
90959122
format: uuid
9123+
- $ref: '#/components/parameters/summarizeErrors'
90969124
responses:
90979125
'200':
90989126
description: Success - return response of type Allocations array with all Allocation for Overpayments
@@ -9149,69 +9177,6 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
91499177
}
91509178
]
91519179
}'
9152-
post:
9153-
security:
9154-
- OAuth2: [accounting.transactions]
9155-
tags:
9156-
- Accounting
9157-
operationId: createOverpaymentAllocation
9158-
summary: Allows you to create a single allocations for overpayments
9159-
x-method: PUT
9160-
parameters:
9161-
- required: true
9162-
in: path
9163-
name: OverpaymentID
9164-
description: Unique identifier for a Overpayment
9165-
example: "00000000-0000-0000-000-000000000000"
9166-
schema:
9167-
type: string
9168-
format: uuid
9169-
responses:
9170-
'200':
9171-
description: Success - return response of type Allocations array with all Allocation for Overpayments
9172-
content:
9173-
application/json:
9174-
schema:
9175-
$ref: '#/components/schemas/Allocations'
9176-
example: '{
9177-
"Id": "3b7f7be2-384a-4703-bcfb-c56e9116c914",
9178-
"Status": "OK",
9179-
"ProviderName": "Java Partner Example",
9180-
"DateTimeUTC": "\/Date(1552428952968)\/",
9181-
"Allocations": [
9182-
{
9183-
"Amount": 1.00,
9184-
"Date": "\/Date(1552348800000+0000)\/",
9185-
"Invoice": {
9186-
"InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841",
9187-
"Payments": [],
9188-
"CreditNotes": [],
9189-
"Prepayments": [],
9190-
"Overpayments": [],
9191-
"HasErrors": false,
9192-
"IsDiscounted": false,
9193-
"LineItems": [],
9194-
"ValidationErrors": []
9195-
},
9196-
"Overpayment": {
9197-
"OverpaymentID": "ed7f6041-c915-4667-bd1d-54c48e92161e",
9198-
"ID": "ed7f6041-c915-4667-bd1d-54c48e92161e",
9199-
"LineItems": []
9200-
},
9201-
"ValidationErrors": []
9202-
}
9203-
]
9204-
}'
9205-
'400':
9206-
$ref: '#/components/responses/400Error'
9207-
requestBody:
9208-
required: true
9209-
description: Allocation object in body of request
9210-
content:
9211-
application/json:
9212-
schema:
9213-
$ref: '#/components/schemas/Allocation'
9214-
example: '{ invoice:{ invoiceID:"00000000-0000-0000-000-000000000000", lineItems:[], contact: {}, type: Invoice.TypeEnum.ACCPAY }, amount:1.0, date:"2019-03-12" }'
92159180
'/Overpayments/{OverpaymentID}/History':
92169181
parameters:
92179182
- $ref: '#/components/parameters/requiredHeader'
@@ -9507,8 +9472,7 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
95079472
tags:
95089473
- Accounting
95099474
operationId: createPayment
9510-
summary: Allows you to create a single payment for invoices or credit notes
9511-
x-method: PUT
9475+
summary: Allows you to create a single payment for invoices or credit notes
95129476
responses:
95139477
'200':
95149478
description: Success - return response of type Payments array for newly created Payment
@@ -10207,7 +10171,7 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
1020710171
- OAuth2: [accounting.transactions]
1020810172
tags:
1020910173
- Accounting
10210-
operationId: createPrepaymentAllocation
10174+
operationId: createPrepaymentAllocations
1021110175
summary: Allows you to create an Allocation for prepayments
1021210176
parameters:
1021310177
- required: true
@@ -10218,6 +10182,7 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
1021810182
schema:
1021910183
type: string
1022010184
format: uuid
10185+
- $ref: '#/components/parameters/summarizeErrors'
1022110186
responses:
1022210187
'200':
1022310188
description: Success - return response of type Allocations array of Allocation for all Prepayment
@@ -18845,6 +18810,15 @@ components:
1884518810
type: string
1884618811
format: date-time
1884718812
example: 2019-11-12T00:00:00
18813+
StatusAttributeString:
18814+
description: A string to indicate if a invoice status
18815+
type: string
18816+
example: ERROR
18817+
ValidationErrors:
18818+
description: Displays array of validation error messages from the API
18819+
type: array
18820+
items:
18821+
$ref: '#/components/schemas/ValidationError'
1884818822
type: object
1884918823
ExpenseClaims:
1885018824
type: object
@@ -19137,6 +19111,11 @@ components:
1913719111
type: array
1913819112
items:
1913919113
$ref: '#/components/schemas/ValidationError'
19114+
Warnings:
19115+
description: Displays array of warning messages from the API
19116+
type: array
19117+
items:
19118+
$ref: '#/components/schemas/ValidationError'
1914019119
type: object
1914119120
OnlineInvoices:
1914219121
type: object
@@ -19525,6 +19504,10 @@ components:
1952519504
description: The Xero identifier for a Manual Journal
1952619505
type: string
1952719506
format: uuid
19507+
StatusAttributeString:
19508+
description: A string to indicate if a invoice status
19509+
type: string
19510+
example: ERROR
1952819511
Warnings:
1952919512
description: Displays array of warning messages from the API
1953019513
type: array
@@ -20781,6 +20764,11 @@ components:
2078120764
type: array
2078220765
items:
2078320766
$ref: '#/components/schemas/ValidationError'
20767+
Warnings:
20768+
description: Displays array of warning messages from the API
20769+
type: array
20770+
items:
20771+
$ref: '#/components/schemas/ValidationError'
2078420772
Attachments:
2078520773
description: Displays array of attachments from the API
2078620774
type: array

0 commit comments

Comments
 (0)