Skip to content

Commit 2279adb

Browse files
committed
feat: enable enums to be open for xero-projects.yaml
BREAKING CHANGE: open enums
1 parent b876589 commit 2279adb

1 file changed

Lines changed: 35 additions & 14 deletions

File tree

xero-projects.yaml

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,14 +1206,20 @@ components:
12061206
format: double
12071207
x-is-money: true
12081208
example: 1.00
1209-
ProjectStatus:
1209+
ProjectStatusClosed:
12101210
description: Status for project
1211-
example: INPROGRESS
12121211
type: string
12131212
enum:
12141213
- INPROGRESS
12151214
- CLOSED
1216-
CurrencyCode:
1215+
example: INPROGRESS
1216+
ProjectStatus:
1217+
description: Status for project
1218+
anyOf:
1219+
- $ref: '#/components/schemas/ProjectStatusClosed'
1220+
- type: string
1221+
example: INPROGRESS
1222+
CurrencyCodeClosed:
12171223
description: 3 letter alpha code for the ISO-4217 currency code, e.g. USD, AUD.
12181224
example: AUD
12191225
type: string
@@ -1381,6 +1387,12 @@ components:
13811387
- ZMW
13821388
- ZMK
13831389
- ZWD
1390+
CurrencyCode:
1391+
description: 3 letter alpha code for the ISO-4217 currency code, e.g. USD, AUD.
1392+
anyOf:
1393+
- $ref: '#/components/schemas/CurrencyCodeClosed'
1394+
- type: string
1395+
example: AUD
13841396
Error:
13851397
externalDocs:
13861398
url: https://developer.xero.com/documentation/projects/projects-response-codes
@@ -1455,19 +1467,26 @@ components:
14551467
$ref: '#/components/schemas/Amount'
14561468
type: number
14571469
status:
1458-
type: string
1459-
enum:
1460-
- ACTIVE
1461-
- INVOICED
1462-
- LOCKED
1470+
anyOf:
1471+
- type: string
1472+
enum:
1473+
- ACTIVE
1474+
- INVOICED
1475+
- LOCKED
1476+
- type: string
14631477
description: Status of the task. When a task of ChargeType is `FIXED` and the rate amount is invoiced the status will be set to `INVOICED` and can't be modified. A task with ChargeType of `TIME` or `NON_CHARGEABLE` cannot have a status of `INVOICED`. A `LOCKED` state indicates that the task is currently changing state (for example being invoiced) and can't be modified.
1464-
ChargeType:
1478+
ChargeTypeClosed:
14651479
description: Can be `TIME`, `FIXED` or `NON_CHARGEABLE`, defines how the task will be charged. Use `TIME` when you want to charge per hour and `FIXED` to charge as a fixed amount. If the task will not be charged use `NON_CHARGEABLE`.
14661480
type: string
14671481
enum:
14681482
- TIME
14691483
- FIXED
14701484
- NON_CHARGEABLE
1485+
ChargeType:
1486+
description: Can be `TIME`, `FIXED` or `NON_CHARGEABLE`, defines how the task will be charged. Use `TIME` when you want to charge per hour and `FIXED` to charge as a fixed amount. If the task will not be charged use `NON_CHARGEABLE`.
1487+
anyOf:
1488+
- $ref: '#/components/schemas/ChargeTypeClosed'
1489+
- type: string
14711490
TaskCreateOrUpdate:
14721491
externalDocs:
14731492
url: https://developer.xero.com/documentation/projects/projects
@@ -1541,11 +1560,13 @@ components:
15411560
type: string
15421561
description: A description of the time entry.
15431562
status:
1544-
type: string
1545-
enum:
1546-
- ACTIVE
1547-
- LOCKED
1548-
- INVOICED
1563+
anyOf:
1564+
- type: string
1565+
enum:
1566+
- ACTIVE
1567+
- LOCKED
1568+
- INVOICED
1569+
- type: string
15491570
description: Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced.
15501571
TimeEntryCreateOrUpdate:
15511572
externalDocs:

0 commit comments

Comments
 (0)