Commit 4d76bbfb authored by Angelo Veltens's avatar Angelo Veltens

draft requirements

parent 45a41ccd
# Ticket Scanner Code Kata
https://ccd-school.de/coding-dojo/application-katas/ticket-scanner/
## Register valid ticket / generate code
```http request
POST /codes
```
### Request data
```xml
<ticket id="e7358ae2-d3db-4069-9602-b9e0055bb8f3">
<event id="36937a9d-ee73-4f43-b2ee-c17c0d1eba30">
<name>Hamlet</name>
</event>
<validity>
<from>2019-10-02 06:00</from>
<to>2019-10-03 10:00</from>
</validity>
<seats>
<seat>
<row>45</row>
<number>4</number>
</seat>
<seat>
<row>45</row>
<number>5</number>
</seat>
</seats>
</ticket>
```
### Response
```xml
<code id="ABC123">
<ticket id="e7358ae2-d3db-4069-9602-b9e0055bb8f3" />
</ticket>
```
## Check in
QR-Code is scanned and causes a http request:
```http request
GET /codes/ABC123
```
### Response
```xml
<code id="ABC123">
<ticket id="e7358ae2-d3db-4069-9602-b9e0055bb8f3">
<event id="36937a9d-ee73-4f43-b2ee-c17c0d1eba30">
<name>Hamlet</name>
</event>
<validity>
<from>2019-10-02 06:00</from>
<to>2019-10-03 10:00</from>
</validity>
<seats>
<seat>
<row>45</row>
<number>4</number>
</seat>
<seat>
<row>45</row>
<number>5</number>
</seat>
</seats>
</ticket>
</ticket>
```
The data is shown on the scanning device, and the check in is confirmed by sending:
```http request
DELETE /codes/ABC123
```
The code is thereby invalidated and he seats are marked as "in-use".
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment