@@ -80,7 +80,8 @@ docker-compose exec php-fpm ./vendor/bin/phpunit --coverage-html ./storage/repor
80
80
- Request URL: ` http://localhost:8081/api/orders?start=0&end=2&sort_column=id&sort_type=asc `
81
81
- Method: ` GET `
82
82
- Path: ` /orders `
83
- - Request Parameters: ` start, end, sort_column, sort_type `
83
+ - Headers: ` Accept:application/json, Content-Type:application/json `
84
+ - Parameters: ` start, end, sort_column, sort_type `
84
85
- Status Code: ` 200 `
85
86
- Response:
86
87
``` json
@@ -118,7 +119,8 @@ docker-compose exec php-fpm ./vendor/bin/phpunit --coverage-html ./storage/repor
118
119
- Request URL: ` http://localhost:8081/api/orders `
119
120
- Method: ` POST `
120
121
- Path: ` /orders `
121
- - Request Parameters: ` agency_name, rental_date, guest_count, transport_count, user_name, email, phone `
122
+ - Headers: ` Accept:application/json, Content-Type:application/json `
123
+ - Parameters: ` agency_name, rental_date, guest_count, transport_count, user_name, email, phone `
122
124
- Status Code: ` 201 `
123
125
- Response:
124
126
``` json
@@ -143,3 +145,94 @@ docker-compose exec php-fpm ./vendor/bin/phpunit --coverage-html ./storage/repor
143
145
}
144
146
}
145
147
```
148
+
149
+ ### Order Details
150
+ - Request URL: ` http://localhost:8081/api/orders/10000011 `
151
+ - Method: ` GET `
152
+ - Path: ` /orders/{id} `
153
+ - Headers: ` Accept:application/json, Content-Type:application/json `
154
+ - Status Code: ` 200 `
155
+ - Response:
156
+ ``` json
157
+ {
158
+ "data" : {
159
+ "id" : 10000011 ,
160
+ "agency_name" : " Test Agency Name" ,
161
+ "status" : " waiting" ,
162
+ "is_confirmed" : false ,
163
+ "is_checked" : false ,
164
+ "rental_date" : " 22-12-2023" ,
165
+ "user_name" : " Test User Name" ,
166
+ "transport_count" : 1 ,
167
+ "guest_count" : 1 ,
168
+ "admin_note" : null ,
169
+ "note" : null ,
170
+
171
+ "phone" : " 71437854547" ,
172
+ "confirmed_at" : null ,
173
+ "created_at" : " 21-12-2023 12:22:33" ,
174
+ "updated_at" : " 21-12-2023 12:22:33"
175
+ }
176
+ }
177
+ ```
178
+
179
+ ### Update Order
180
+ - Request URL: ` http://localhost:8081/api/orders/10000011 `
181
+ - Method: ` PUT `
182
+ - Path: ` /orders/{id} `
183
+ - Headers: ` Accept:application/json, Content-Type:application/json `
184
+ - Parameters: ` guest_count, transport_count, user_name, email, phone `
185
+ - Status Code: ` 200 `
186
+ - Response:
187
+ ``` json
188
+ {
189
+ "data" : {
190
+ "id" : 10000011 ,
191
+ "agency_name" : " Test Agency Name" ,
192
+ "status" : " waiting" ,
193
+ "is_confirmed" : false ,
194
+ "is_checked" : false ,
195
+ "rental_date" : " 22-12-2023" ,
196
+ "user_name" : " Test User Name" ,
197
+ "transport_count" : 1 ,
198
+ "guest_count" : 1 ,
199
+ "admin_note" : null ,
200
+ "note" : null ,
201
+
202
+ "phone" : " 70000000001" ,
203
+ "confirmed_at" : null ,
204
+ "created_at" : " 21-12-2023 12:22:33" ,
205
+ "updated_at" : " 21-12-2023 15:03:33"
206
+ }
207
+ }
208
+ ```
209
+
210
+ ### Delete Order
211
+ - Request URL: ` http://localhost:8081/api/orders/10000011 `
212
+ - Method: ` DELETE `
213
+ - Path: ` /orders/{id} `
214
+ - Headers: ` Accept:application/json, Content-Type:application/json `
215
+ - Status Code: ` 200 `
216
+ - Response:
217
+ ``` json
218
+ {
219
+ "data" : {
220
+ "id" : 10000011 ,
221
+ "agency_name" : " Test Agency Name" ,
222
+ "status" : " waiting" ,
223
+ "is_confirmed" : false ,
224
+ "is_checked" : false ,
225
+ "rental_date" : " 22-12-2023" ,
226
+ "user_name" : " Test User Name" ,
227
+ "transport_count" : 1 ,
228
+ "guest_count" : 1 ,
229
+ "admin_note" : null ,
230
+ "note" : null ,
231
+
232
+ "phone" : " 70000000001" ,
233
+ "confirmed_at" : null ,
234
+ "created_at" : " 21-12-2023 12:22:33" ,
235
+ "updated_at" : " 21-12-2023 15:13:30"
236
+ }
237
+ }
238
+ ```
0 commit comments