Skip to content

Commit 5676b65

Browse files
Merge branch 'dev' into feature/jc-withdrawn
2 parents 46b4203 + 4fc818b commit 5676b65

File tree

5 files changed

+379
-9
lines changed

5 files changed

+379
-9
lines changed

docs/Topcoder-bookings-api.postman_collection.json

Lines changed: 293 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info": {
3-
"_postman_id": "87477d86-2d08-40b6-93c6-99a394193e28",
3+
"_postman_id": "0bd597ba-4bc2-4ea1-be33-45776b80c1ce",
44
"name": "Topcoder-bookings-api",
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
66
},
@@ -11647,6 +11647,11 @@
1164711647
"key": "projectIds",
1164811648
"value": "111, 16705",
1164911649
"disabled": true
11650+
},
11651+
{
11652+
"key": "billingAccountId",
11653+
"value": "0",
11654+
"disabled": true
1165011655
}
1165111656
]
1165211657
}
@@ -11725,6 +11730,11 @@
1172511730
"key": "status",
1172611731
"value": "assigned",
1172711732
"disabled": true
11733+
},
11734+
{
11735+
"key": "billingAccountId",
11736+
"value": "0",
11737+
"disabled": true
1172811738
}
1172911739
]
1173011740
}
@@ -11797,6 +11807,11 @@
1179711807
{
1179811808
"key": "sortOrder",
1179911809
"value": "desc"
11810+
},
11811+
{
11812+
"key": "billingAccountId",
11813+
"value": "0",
11814+
"disabled": true
1180011815
}
1180111816
]
1180211817
}
@@ -11867,6 +11882,11 @@
1186711882
{
1186811883
"key": "sortOrder",
1186911884
"value": "desc"
11885+
},
11886+
{
11887+
"key": "billingAccountId",
11888+
"value": "0",
11889+
"disabled": true
1187011890
}
1187111891
]
1187211892
}
@@ -12537,6 +12557,278 @@
1253712557
},
1253812558
"response": []
1253912559
},
12560+
{
12561+
"name": "search resource bookings with parameters 13",
12562+
"event": [
12563+
{
12564+
"listen": "test",
12565+
"script": {
12566+
"exec": [
12567+
"pm.test('Status code is 200', function () {\r",
12568+
" pm.response.to.have.status(200);\r",
12569+
"});"
12570+
],
12571+
"type": "text/javascript"
12572+
}
12573+
}
12574+
],
12575+
"request": {
12576+
"method": "GET",
12577+
"header": [
12578+
{
12579+
"key": "Authorization",
12580+
"type": "text",
12581+
"value": "Bearer {{token_bookingManager}}"
12582+
}
12583+
],
12584+
"url": {
12585+
"raw": "{{URL}}/resourceBookings?fields=id,startDate,endDate,billingAccountId,workPeriods&billingAccountId=80000071&workPeriods.startDate=2021-01-03&workPeriods.isFirstWeek=true",
12586+
"host": [
12587+
"{{URL}}"
12588+
],
12589+
"path": [
12590+
"resourceBookings"
12591+
],
12592+
"query": [
12593+
{
12594+
"key": "fields",
12595+
"value": "id,startDate,endDate,billingAccountId,workPeriods"
12596+
},
12597+
{
12598+
"key": "billingAccountId",
12599+
"value": "80000071"
12600+
},
12601+
{
12602+
"key": "workPeriods.startDate",
12603+
"value": "2021-01-03"
12604+
},
12605+
{
12606+
"key": "workPeriods.isFirstWeek",
12607+
"value": "true"
12608+
}
12609+
]
12610+
}
12611+
},
12612+
"response": []
12613+
},
12614+
{
12615+
"name": "search resource bookings with parameters 14",
12616+
"event": [
12617+
{
12618+
"listen": "test",
12619+
"script": {
12620+
"exec": [
12621+
"pm.test('Status code is 200', function () {\r",
12622+
" pm.response.to.have.status(200);\r",
12623+
"});"
12624+
],
12625+
"type": "text/javascript"
12626+
}
12627+
}
12628+
],
12629+
"request": {
12630+
"method": "GET",
12631+
"header": [
12632+
{
12633+
"key": "Authorization",
12634+
"type": "text",
12635+
"value": "Bearer {{token_bookingManager}}"
12636+
}
12637+
],
12638+
"url": {
12639+
"raw": "{{URL}}/resourceBookings?fields=id,startDate,endDate,billingAccountId,workPeriods&billingAccountId=80000071&workPeriods.startDate=2021-02-07&workPeriods.isLastWeek=true",
12640+
"host": [
12641+
"{{URL}}"
12642+
],
12643+
"path": [
12644+
"resourceBookings"
12645+
],
12646+
"query": [
12647+
{
12648+
"key": "fields",
12649+
"value": "id,startDate,endDate,billingAccountId,workPeriods"
12650+
},
12651+
{
12652+
"key": "billingAccountId",
12653+
"value": "80000071"
12654+
},
12655+
{
12656+
"key": "workPeriods.startDate",
12657+
"value": "2021-02-07"
12658+
},
12659+
{
12660+
"key": "workPeriods.isLastWeek",
12661+
"value": "true"
12662+
}
12663+
]
12664+
}
12665+
},
12666+
"response": []
12667+
},
12668+
{
12669+
"name": "search resource bookings with parameters 15",
12670+
"event": [
12671+
{
12672+
"listen": "test",
12673+
"script": {
12674+
"exec": [
12675+
"pm.test('Status code is 400', function () {\r",
12676+
" pm.response.to.have.status(400);\r",
12677+
" const response = pm.response.json()\r",
12678+
" pm.expect(response.message).to.eq(\"Cannot filter by \\\"isLastWeek\\\" without \\\"startDate\\\"\")\r",
12679+
"});"
12680+
],
12681+
"type": "text/javascript"
12682+
}
12683+
}
12684+
],
12685+
"request": {
12686+
"method": "GET",
12687+
"header": [
12688+
{
12689+
"key": "Authorization",
12690+
"type": "text",
12691+
"value": "Bearer {{token_bookingManager}}"
12692+
}
12693+
],
12694+
"url": {
12695+
"raw": "{{URL}}/resourceBookings?fields=id,startDate,endDate,billingAccountId,workPeriods&billingAccountId=80000071&workPeriods.isLastWeek=true",
12696+
"host": [
12697+
"{{URL}}"
12698+
],
12699+
"path": [
12700+
"resourceBookings"
12701+
],
12702+
"query": [
12703+
{
12704+
"key": "fields",
12705+
"value": "id,startDate,endDate,billingAccountId,workPeriods"
12706+
},
12707+
{
12708+
"key": "billingAccountId",
12709+
"value": "80000071"
12710+
},
12711+
{
12712+
"key": "workPeriods.isLastWeek",
12713+
"value": "true"
12714+
}
12715+
]
12716+
}
12717+
},
12718+
"response": []
12719+
},
12720+
{
12721+
"name": "search resource bookings with parameters 16",
12722+
"event": [
12723+
{
12724+
"listen": "test",
12725+
"script": {
12726+
"exec": [
12727+
"pm.test('Status code is 400', function () {\r",
12728+
" pm.response.to.have.status(400);\r",
12729+
" const response = pm.response.json()\r",
12730+
" pm.expect(response.message).to.eq(\"Cannot filter by \\\"isFirstWeek\\\" without \\\"startDate\\\"\")\r",
12731+
"});"
12732+
],
12733+
"type": "text/javascript"
12734+
}
12735+
}
12736+
],
12737+
"request": {
12738+
"method": "GET",
12739+
"header": [
12740+
{
12741+
"key": "Authorization",
12742+
"type": "text",
12743+
"value": "Bearer {{token_bookingManager}}"
12744+
}
12745+
],
12746+
"url": {
12747+
"raw": "{{URL}}/resourceBookings?fields=id,startDate,endDate,billingAccountId,workPeriods&billingAccountId=80000071&workPeriods.isFirstWeek=true",
12748+
"host": [
12749+
"{{URL}}"
12750+
],
12751+
"path": [
12752+
"resourceBookings"
12753+
],
12754+
"query": [
12755+
{
12756+
"key": "fields",
12757+
"value": "id,startDate,endDate,billingAccountId,workPeriods"
12758+
},
12759+
{
12760+
"key": "billingAccountId",
12761+
"value": "80000071"
12762+
},
12763+
{
12764+
"key": "workPeriods.isFirstWeek",
12765+
"value": "true"
12766+
}
12767+
]
12768+
}
12769+
},
12770+
"response": []
12771+
},
12772+
{
12773+
"name": "search resource bookings with parameters 17",
12774+
"event": [
12775+
{
12776+
"listen": "test",
12777+
"script": {
12778+
"exec": [
12779+
"pm.test('Status code is 400', function () {\r",
12780+
" pm.response.to.have.status(400);\r",
12781+
" const response = pm.response.json()\r",
12782+
" pm.expect(response.message).to.eq(\"Cannot filter by both \\\"isFirstWeek\\\" and \\\"isLastWeek\\\" set to \\\"true\\\"\")\r",
12783+
"});"
12784+
],
12785+
"type": "text/javascript"
12786+
}
12787+
}
12788+
],
12789+
"request": {
12790+
"method": "GET",
12791+
"header": [
12792+
{
12793+
"key": "Authorization",
12794+
"type": "text",
12795+
"value": "Bearer {{token_bookingManager}}"
12796+
}
12797+
],
12798+
"url": {
12799+
"raw": "{{URL}}/resourceBookings?fields=id,startDate,endDate,billingAccountId,workPeriods&billingAccountId=80000071&workPeriods.startDate=2021-02-07&workPeriods.isLastWeek=true&workPeriods.isFirstWeek=true",
12800+
"host": [
12801+
"{{URL}}"
12802+
],
12803+
"path": [
12804+
"resourceBookings"
12805+
],
12806+
"query": [
12807+
{
12808+
"key": "fields",
12809+
"value": "id,startDate,endDate,billingAccountId,workPeriods"
12810+
},
12811+
{
12812+
"key": "billingAccountId",
12813+
"value": "80000071"
12814+
},
12815+
{
12816+
"key": "workPeriods.startDate",
12817+
"value": "2021-02-07"
12818+
},
12819+
{
12820+
"key": "workPeriods.isLastWeek",
12821+
"value": "true"
12822+
},
12823+
{
12824+
"key": "workPeriods.isFirstWeek",
12825+
"value": "true"
12826+
}
12827+
]
12828+
}
12829+
},
12830+
"response": []
12831+
},
1254012832
{
1254112833
"name": "put resource booking with booking manager",
1254212834
"event": [

docs/swagger.yaml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,12 @@ paths:
15061506
schema:
15071507
type: string
15081508
description: comma separated project ids.
1509+
- in: query
1510+
name: billingAccountId
1511+
required: false
1512+
schema:
1513+
type: integer
1514+
description: billing account id. 0 represents null value.
15091515
- in: query
15101516
name: workPeriods.paymentStatus
15111517
required: false
@@ -1527,21 +1533,41 @@ paths:
15271533
type: string
15281534
format: date
15291535
pattern: '^\d{4}-\d{2}-\d{2}$'
1530-
description: The work period start date.
1536+
description: The work period start date. Should be Sunday.
15311537
- in: query
15321538
name: workPeriods.endDate
15331539
required: false
15341540
schema:
15351541
type: string
15361542
format: date
15371543
pattern: '^\d{4}-\d{2}-\d{2}$'
1538-
description: The work period end date.
1544+
description: The work period end date. Should be Saturday.
15391545
- in: query
15401546
name: workPeriods.userHandle
15411547
required: false
15421548
schema:
15431549
type: string
15441550
description: The user handle.
1551+
- in: query
1552+
name: workPeriods.isFirstWeek
1553+
required: false
1554+
schema:
1555+
type: boolean
1556+
default: false
1557+
description: |
1558+
the week which matches workPeriods.startDate is the first one in the RB.
1559+
workPeriods.startDate is required.
1560+
only one of workPeriods.isFirstWeek and workPeriods.isLastWeek is allowed.
1561+
- in: query
1562+
name: workPeriods.isLastWeek
1563+
required: false
1564+
schema:
1565+
type: boolean
1566+
default: false
1567+
description: |
1568+
the week which matches workPeriods.startDate is the last one in the RB.
1569+
workPeriods.startDate is required.
1570+
only one of workPeriods.isFirstWeek and workPeriods.isLastWeek is allowed.
15451571
- in: query
15461572
name: workPeriods.payments.status
15471573
required: false

0 commit comments

Comments
 (0)