-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTicket_Allocation.postman_collection.json
102 lines (102 loc) · 2.05 KB
/
Ticket_Allocation.postman_collection.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
"info": {
"name": "Ticket Allocation",
"_postman_id": "c9337a0d-ac26-0331-634f-b7553c9f800c",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get ticket option",
"request": {
"method": "GET",
"header": [],
"body": {},
"url": {
"raw": "localhost:3000/ticket_options/{{ticketOptionID}}",
"host": [
"localhost"
],
"port": "3000",
"path": [
"ticket_options",
"{{ticketOptionID}}"
]
},
"description": "Get Ticket Option"
},
"response": []
},
{
"name": "Create ticket option",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"var data = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"ticketOptionID\", data[\"id\"]);",
""
]
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Test ticket option\",\n \"desc\": \"ticket opion description\",\n \"allocation\": 100\n}"
},
"url": {
"raw": "localhost:3000/ticket_options",
"host": [
"localhost"
],
"port": "3000",
"path": [
"ticket_options"
]
},
"description": "Create Ticket Option"
},
"response": []
},
{
"name": "Create Purchase",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"quantity\": 1,\n\t\"user_id\": \"d6abe829-c28c-44ec-bee6-3183f2c53fef\"\n}"
},
"url": {
"raw": "localhost:3000/ticket_options/{{ticketOptionID}}/purchases",
"host": [
"localhost"
],
"port": "3000",
"path": [
"ticket_options",
"{{ticketOptionID}}",
"purchases"
]
},
"description": "Create Purchase"
},
"response": []
}
]
}