Skip to content

Commit 7ce6457

Browse files
committed
Fix Enums and JournalLine
Some ENUMS needed an EMPTY value which equates to '' JournalLine was missing several properties
1 parent d1fb7ed commit 7ce6457

File tree

2 files changed

+131
-60
lines changed

2 files changed

+131
-60
lines changed

spec/v3/Xero_accounting_2.0.0_swagger.json

Lines changed: 60 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8548,9 +8548,7 @@
85488548
"format" : "uuid"
85498549
},
85508550
"Type" : {
8551-
"description" : "See Account Types",
8552-
"type" : "string",
8553-
"enum" : [ "BANK", "CURRENT", "CURRLIAB", "DEPRECIATN", "DIRECTCOSTS", "EQUITY", "EXPENSE", "FIXED", "INVENTORY", "LIABILITY", "NONCURRENT", "OTHERINCOME", "OVERHEADS", "PREPAYMENT", "REVENUE", "SALES", "TERMLIAB", "PAYGLIABILITY", "PAYG", "SUPERANNUATIONEXPENSE", "SUPERANNUATIONLIABILITY", "WAGESEXPENSE" ]
8551+
"$ref" : "#/components/schemas/AccountType"
85548552
},
85558553
"BankAccountNumber" : {
85568554
"description" : "For bank accounts only (Account Type BANK)",
@@ -8568,7 +8566,7 @@
85688566
"BankAccountType" : {
85698567
"description" : "For bank accounts only. See Bank Account types",
85708568
"type" : "string",
8571-
"enum" : [ "BANK", "CREDITCARD", "PAYPAL" ]
8569+
"enum" : [ "BANK", "CREDITCARD", "PAYPAL", "" ]
85728570
},
85738571
"CurrencyCode" : {
85748572
"$ref" : "#/components/schemas/CurrencyCode"
@@ -8594,7 +8592,7 @@
85948592
"description" : "If this is a system account then this element is returned. See System Account types. Note that non-system accounts may have this element set as either “” or null.",
85958593
"readOnly" : true,
85968594
"type" : "string",
8597-
"enum" : [ "DEBTORS", "CREDITORS", "BANKCURRENCYGAIN", "GST", "GSTONIMPORTS", "HISTORICAL", "REALISEDCURRENCYGAIN", "RETAINEDEARNINGS", "ROUNDING", "TRACKINGTRANSFERS", "UNPAIDEXPCLM", "UNREALISEDCURRENCYGAIN", "WAGEPAYABLES" ]
8595+
"enum" : [ "DEBTORS", "CREDITORS", "BANKCURRENCYGAIN", "GST", "GSTONIMPORTS", "HISTORICAL", "REALISEDCURRENCYGAIN", "RETAINEDEARNINGS", "ROUNDING", "TRACKINGTRANSFERS", "UNPAIDEXPCLM", "UNREALISEDCURRENCYGAIN", "WAGEPAYABLES", "" ]
85988596
},
85998597
"ReportingCode" : {
86008598
"description" : "Shown if set",
@@ -8619,6 +8617,11 @@
86198617
}
86208618
}
86218619
},
8620+
"AccountType" : {
8621+
"description" : "See Account Types",
8622+
"type" : "string",
8623+
"enum" : [ "BANK", "CURRENT", "CURRLIAB", "DEPRECIATN", "DIRECTCOSTS", "EQUITY", "EXPENSE", "FIXED", "INVENTORY", "LIABILITY", "NONCURRENT", "OTHERINCOME", "OVERHEADS", "PREPAYMENT", "REVENUE", "SALES", "TERMLIAB", "PAYGLIABILITY", "PAYG", "SUPERANNUATIONEXPENSE", "SUPERANNUATIONLIABILITY", "WAGESEXPENSE" ]
8624+
},
86228625
"Attachments" : {
86238626
"type" : "object",
86248627
"properties" : {
@@ -10184,39 +10187,74 @@
1018410187
},
1018510188
"JournalLine" : {
1018610189
"externalDocs" : {
10187-
"url" : "http://developer.xero.com/documentation/api/manual-journals/"
10190+
"url" : "https://developer.xero.com/documentation/api/journals#JournalLines"
1018810191
},
1018910192
"properties" : {
10190-
"LineAmount" : {
10191-
"description" : "total for line. Debits are positive, credits are negative value",
10192-
"type" : "string"
10193+
"JournalLineID" : {
10194+
"description" : "Xero identifier for Journal",
10195+
"type" : "string",
10196+
"format" : "uuid",
10197+
"example" : "7be9db36-3598-4755-ba5c-c2dbc8c4a7a2"
10198+
},
10199+
"AccountID" : {
10200+
"description" : "See Accounts",
10201+
"type" : "string",
10202+
"format" : "uuid",
10203+
"example" : "ceef66a5-a545-413b-9312-78a53caadbc4"
1019310204
},
1019410205
"AccountCode" : {
1019510206
"description" : "See Accounts",
10196-
"type" : "string"
10207+
"type" : "string",
10208+
"example" : 90.0
10209+
},
10210+
"AccountType" : {
10211+
"$ref" : "#/components/schemas/AccountType"
10212+
},
10213+
"AccountName" : {
10214+
"description" : "See AccountCodes",
10215+
"type" : "string",
10216+
"example" : "Checking Account"
1019710217
},
1019810218
"Description" : {
10199-
"description" : "Description for journal line",
10200-
"type" : "string"
10219+
"description" : "The description from the source transaction line item. Only returned if populated.",
10220+
"type" : "string",
10221+
"example" : "My business checking account"
10222+
},
10223+
"NetAmount" : {
10224+
"description" : "Net amount of journal line. This will be a positive value for a debit and negative for a credit",
10225+
"type" : "number",
10226+
"format" : "float",
10227+
"example" : 4130.98
10228+
},
10229+
"GrossAmount" : {
10230+
"description" : "Gross amount of journal line (NetAmount + TaxAmount).",
10231+
"type" : "number",
10232+
"format" : "float",
10233+
"example" : 4130.98
10234+
},
10235+
"TaxAmount" : {
10236+
"description" : "Total tax on a journal line",
10237+
"type" : "number",
10238+
"format" : "float",
10239+
"readOnly" : true,
10240+
"example" : 0.0
1020110241
},
1020210242
"TaxType" : {
1020310243
"$ref" : "#/components/schemas/TaxType"
1020410244
},
10205-
"Tracking" : {
10245+
"TaxName" : {
10246+
"description" : "see TaxRates",
10247+
"type" : "string",
10248+
"example" : "Tax Exempt"
10249+
},
10250+
"TrackingCategories" : {
1020610251
"description" : "Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 <TrackingCategory> elements.",
1020710252
"type" : "array",
1020810253
"items" : {
1020910254
"$ref" : "#/components/schemas/TrackingCategory"
1021010255
}
10211-
},
10212-
"TaxAmount" : {
10213-
"description" : "The calculated tax amount based on the TaxType and LineAmount",
10214-
"readOnly" : true,
10215-
"type" : "number",
10216-
"format" : "float"
1021710256
}
1021810257
},
10219-
"required" : [ "LineAmount", "AccountCode" ],
1022010258
"type" : "object"
1022110259
},
1022210260
"LinkedTransactions" : {
@@ -11536,7 +11574,8 @@
1153611574
"type" : "string"
1153711575
},
1153811576
"TaxType" : {
11539-
"$ref" : "#/components/schemas/TaxType"
11577+
"description" : "The tax type",
11578+
"type" : "string"
1154011579
},
1154111580
"TaxComponents" : {
1154211581
"description" : "See TaxComponents",

spec/v3/Xero_accounting_2.0.0_swagger.yaml

Lines changed: 71 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5990,31 +5990,7 @@ components:
59905990
type: string
59915991
format: uuid
59925992
Type:
5993-
description: See Account Types
5994-
type: string
5995-
enum:
5996-
- BANK
5997-
- CURRENT
5998-
- CURRLIAB
5999-
- DEPRECIATN
6000-
- DIRECTCOSTS
6001-
- EQUITY
6002-
- EXPENSE
6003-
- FIXED
6004-
- INVENTORY
6005-
- LIABILITY
6006-
- NONCURRENT
6007-
- OTHERINCOME
6008-
- OVERHEADS
6009-
- PREPAYMENT
6010-
- REVENUE
6011-
- SALES
6012-
- TERMLIAB
6013-
- PAYGLIABILITY
6014-
- PAYG
6015-
- SUPERANNUATIONEXPENSE
6016-
- SUPERANNUATIONLIABILITY
6017-
- WAGESEXPENSE
5993+
$ref: '#/components/schemas/AccountType'
60185994
BankAccountNumber:
60195995
description: For bank accounts only (Account Type BANK)
60205996
type: string
@@ -6037,6 +6013,7 @@ components:
60376013
- BANK
60386014
- CREDITCARD
60396015
- PAYPAL
6016+
- ''
60406017
CurrencyCode:
60416018
$ref: '#/components/schemas/CurrencyCode'
60426019
TaxType:
@@ -6080,6 +6057,7 @@ components:
60806057
- UNPAIDEXPCLM
60816058
- UNREALISEDCURRENCYGAIN
60826059
- WAGEPAYABLES
6060+
- ''
60836061
ReportingCode:
60846062
description: Shown if set
60856063
readOnly: true
@@ -6097,6 +6075,32 @@ components:
60976075
readOnly: true
60986076
type: string
60996077
format: date-time
6078+
AccountType:
6079+
description: See Account Types
6080+
type: string
6081+
enum:
6082+
- BANK
6083+
- CURRENT
6084+
- CURRLIAB
6085+
- DEPRECIATN
6086+
- DIRECTCOSTS
6087+
- EQUITY
6088+
- EXPENSE
6089+
- FIXED
6090+
- INVENTORY
6091+
- LIABILITY
6092+
- NONCURRENT
6093+
- OTHERINCOME
6094+
- OVERHEADS
6095+
- PREPAYMENT
6096+
- REVENUE
6097+
- SALES
6098+
- TERMLIAB
6099+
- PAYGLIABILITY
6100+
- PAYG
6101+
- SUPERANNUATIONEXPENSE
6102+
- SUPERANNUATIONLIABILITY
6103+
- WAGESEXPENSE
61006104
Attachments:
61016105
type: object
61026106
properties:
@@ -7555,32 +7559,59 @@ components:
75557559
type: object
75567560
JournalLine:
75577561
externalDocs:
7558-
url: 'http://developer.xero.com/documentation/api/manual-journals/'
7562+
url: 'https://developer.xero.com/documentation/api/journals#JournalLines'
75597563
properties:
7560-
LineAmount:
7561-
description: 'total for line. Debits are positive, credits are negative value'
7564+
JournalLineID:
7565+
description: Xero identifier for Journal
7566+
type: string
7567+
format: uuid
7568+
example: 7be9db36-3598-4755-ba5c-c2dbc8c4a7a2
7569+
AccountID:
7570+
description: See Accounts
75627571
type: string
7572+
format: uuid
7573+
example: ceef66a5-a545-413b-9312-78a53caadbc4
75637574
AccountCode:
75647575
description: See Accounts
75657576
type: string
7577+
example: 090
7578+
AccountType:
7579+
$ref: '#/components/schemas/AccountType'
7580+
AccountName:
7581+
description: See AccountCodes
7582+
type: string
7583+
example: Checking Account
75667584
Description:
7567-
description: Description for journal line
7585+
description: The description from the source transaction line item. Only returned if populated.
75687586
type: string
7587+
example: My business checking account
7588+
NetAmount:
7589+
description: Net amount of journal line. This will be a positive value for a debit and negative for a credit
7590+
type: number
7591+
format: float
7592+
example: 4130.98
7593+
GrossAmount:
7594+
description: Gross amount of journal line (NetAmount + TaxAmount).
7595+
type: number
7596+
format: float
7597+
example: 4130.98
7598+
TaxAmount:
7599+
description: Total tax on a journal line
7600+
type: number
7601+
format: float
7602+
readOnly: true
7603+
example: 0.00
75697604
TaxType:
75707605
$ref: '#/components/schemas/TaxType'
7571-
Tracking:
7606+
TaxName:
7607+
description: see TaxRates
7608+
type: string
7609+
example: Tax Exempt
7610+
TrackingCategories:
75727611
description: Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 <TrackingCategory> elements.
75737612
type: array
75747613
items:
75757614
$ref: '#/components/schemas/TrackingCategory'
7576-
TaxAmount:
7577-
description: The calculated tax amount based on the TaxType and LineAmount
7578-
readOnly: true
7579-
type: number
7580-
format: float
7581-
required:
7582-
- LineAmount
7583-
- AccountCode
75847615
type: object
75857616
LinkedTransactions:
75867617
type: object
@@ -9102,7 +9133,8 @@ components:
91029133
description: Name of tax rate
91039134
type: string
91049135
TaxType:
9105-
$ref: '#/components/schemas/TaxType'
9136+
description: The tax type
9137+
type: string
91069138
TaxComponents:
91079139
description: See TaxComponents
91089140
type: array

0 commit comments

Comments
 (0)