Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed typos and improvements in examples #149

Merged
merged 3 commits into from
Jan 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 15 additions & 10 deletions doc/appendix-de-kassensichv/examples/cbReference.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
# Business action examples using `cbReceiptReference` and `cbPreviousReceiptReference`

Examples of using `cbReceiptReference` and `cbPreviousReceiptReference` to connect requests representing a business action:

1. Simple
## Simple

| **Action** | **receipt case** | **`cbReceiptReference`** | **`cbPreviousReceiptReference`** | **Description** |
|---------------------------|---------------|-----------------------------------|---------------------------------------------------------------------------------------------------------|-------------|
| Check-In | `info-internal` | "10001" | empty | Family checks in into the hotel. |
| Consumption | `info-order` | "10001" | empty | Family stays over night. |
| Consumption | `info-order` | "10001" | empty | Family consumes breakfirst. |
| Consumption | `info-order` | "10001" | empty | Family consumes breakfast. |
| Check-Out Payment | `pos-receipt` | "10001" | empty | Family pays the bill. |

2. Split
## Split

The bill is being split.

| **Action** | **receipt case** | **`cbReceiptReference`** | **`cbPreviousReceiptReference`** | **Description** |
|---------------------------|---------------|-----------------------------------|---------------------------------------------------------------------------------------------------------|-------------|
| Check-In | `info-internal` | "10001" | empty | Family checks in into the hotel. |
| Consumption | `info-order` | "10001" | empty | Family stays over night. |
| Consumption | `info-order` | "10001" | empty | Family consumes breakfirst. |
| Consumption | `info-order` | "10001" | empty | Family consumes breakfast. |
| Check-Out Payment 1 | `pos-receipt` | "567" | "10001" | Wife pays half of the bill. |
| Check-Out Payment 2 | `pos-receipt` | "568" | "10001" | Husband pays other half of the bill. |
| Check-Out Payment 2 | `pos-receipt` | "568" | "10001" | Husband pays the other half of the bill. |

3. Merge (one pays for himself and for others)
## Merge

One pays for himself and others.

| **Action** | **receipt case** | **`cbReceiptReference`** | **`cbPreviousReceiptReference`** | **Description** |
|---------------------------|---------------|-----------------------------------|---------------------------------------------------------------------------------------------------------|-------------|
| Check-In | `info-internal` | "10001" | empty | Family 1 checks in into the hotel. |
| Check-In | `info-internal` | "10002" | empty | Family 2 checks in into the hotel. |
| Consumption | `info-order` | "10001" | empty | Family 1 stays over night. |
| Consumption | `info-order` | "10002" | empty | Family 2 stays over night. |
| Consumption | `info-order` | "10001" | empty | Family 1 consumes breakfirst. |
| Consumption | `info-order` | "10002" | empty | Family 2 consumes breakfirst. |
| Consumption | `info-order` | "10001" | empty | Family 1 consumes breakfast. |
| Consumption | `info-order` | "10002" | empty | Family 2 consumes breakfast. |
| Merge Step 1 | `info-internal` | "567" | "10001" | Merge action of Family 1 into new action "567" |
| Merge Step 2 | `info-internal` | "567" | "10002" | Merge action of Family 2 into new action "567" |
| Check-Out Payment | `pos-receipt` | "567" | empty | Family 1 pays bill for themselves and for Family 2 |

| Check-Out Payment | `pos-receipt` | "567" | empty | Family 1 pays the bill for themselves and for Family 2 |
10 changes: 5 additions & 5 deletions doc/appendix-de-kassensichv/examples/info-order.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Info-Order - Implicit Flow
# Info-order - implicit flow examples

This is used to persist orders
The info-order implicit flow is used to persist orders.

Same `cbReceiptReference` in multiple receiptrequest/receiptresponse (sign-calls) can be used to connect multiple actions into a business-action. each `cbReceiptReference` can only be used once within a explicit flow. this also meanse only one time start-transaction can be done with one specific `cbReceiptReference`, because it is mapped 1:1 to the ongoing transaction of the (tse).
the implicit flow uses start-transaction and finish-transaction within the same receiptrequest/receiptresponse. therefore in this case the `cbReceiptReference` has no impact on already ongoing transactions as long as there wasn't a start-transaction with same `cbReceiptReference` before.
`cbReceiptReference` can be used in multiple receipt-request/receipt-response (sign-calls) to connect multiple actions into a business-action. Each `cbReceiptReference` can only be used once within an explicit flow. Only one "start-transaction" can be done with one specific `cbReceiptReference` because it is mapped 1:1 to the TSE's ongoing transaction.
The implicit flow uses "start-transaction" and "finish-transaction" within the same receipt-request/receipt-response. Therefore, the `cbReceiptReference` has no impact on ongoing transactions, as long as there wasn't a "start-transaction" with the same `cbReceiptReference` before.

An additional method to connect multiple actions to a ongoing business-action is to reference a previouse action by `cbPreviouseReceiptReference`.
An additional method to connect multiple actions to an ongoing business-action is to reference a previous action by `cbPreviouseReceiptReference`.
aedler-ft marked this conversation as resolved.
Show resolved Hide resolved

```json
{
Expand Down
58 changes: 23 additions & 35 deletions doc/appendix-de-kassensichv/examples/pos-receipt.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Pos-receipt examples

## Implicit flow

implicit flow
#### Receipt request

ReciptRequest

`
```json
{
"ftCashBoxID": "cashboxid-guid",
"ftPosSystemId": "possystemid-guid",
Expand Down Expand Up @@ -77,12 +77,11 @@ ReciptRequest
"cbArea": "Tisch 01",
"cbSettlement": "Test1"
}
`

```

ReceiptResponse
#### Receipt response

`
```json
{
"ftCashBoxID": "cashboxid-guid",
"ftQueueID": "queueid-guid",
Expand Down Expand Up @@ -217,22 +216,15 @@ ReceiptResponse
//0x4445 0000 0000 0000
"ftState": 4919338167972134912
}
`





```

## Explicit flow

### Start-transaction

explicit flow
#### Receipt request

- start-transaction

ReciptRequest

`
```json
{
"ftCashBoxID": "cashboxid-guid",
"ftPosSystemId": "possystemid-guid",
Expand All @@ -247,12 +239,11 @@ ReciptRequest
"cbArea": "Tisch 01",
"cbSettlement": "Test1"
}
`
```

#### Receipt response

ReceiptResponse

`
```json
{
"ftCashBoxID": "cashboxid-guid",
"ftQueueID": "queueid-guid",
Expand All @@ -275,14 +266,13 @@ ReceiptResponse
//0x4445 0000 0000 0000
"ftState": 4919338167972134912
}
```

### Pos-receipt

#### Receipt request

- pos-receipt

ReciptRequest

`
```json
{
"ftCashBoxID": "cashboxid-guid",
"ftPosSystemId": "possystemid-guid",
Expand Down Expand Up @@ -355,12 +345,11 @@ ReciptRequest
"cbArea": "Tisch 01",
"cbSettlement": "Test1"
}
`

```

ReceiptResponse
#### Receipt response

`
```json
{
"ftCashBoxID": "cashboxid-guid",
"ftQueueID": "queueid-guid",
Expand Down Expand Up @@ -481,5 +470,4 @@ ReceiptResponse
//0x4445 0000 0000 0000
"ftState": 4919338167972134912
}
`

```
32 changes: 17 additions & 15 deletions doc/appendix-de-kassensichv/examples/returnables.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Returnables
# Returnables

### Income from returnables (DE: Pfand)
## Income from returnables (DE: Pfand)

#### Transport aid (income)
### Transport aid (income)

Request:
#### Receipt request

```json
{
Expand Down Expand Up @@ -43,7 +43,7 @@ Request:
}
```

Response:
#### Receipt response

```json
{
Expand Down Expand Up @@ -169,9 +169,9 @@ Response:
"ftState": 4919338167972134912
}
```
#### Encirclement of goods (income)
### Encirclement of goods (income)

Request:
#### Receipt request

```json
{
Expand Down Expand Up @@ -209,7 +209,7 @@ Request:
"ftReceiptCase":4919338172267102209
}
```
Response:
#### Receipt response

```json
{
Expand Down Expand Up @@ -335,11 +335,12 @@ Response:
"ftState": 4919338167972134912
}
```
### Return with settlement of the pledged amount (DE: Pfandrückzahlung)
## Return with settlement of the pledged amount (DE: Pfandrückzahlung)

#### Transport aid (return)
### Transport aid (return)

#### Receipt request

Request:
```json
{
"ftCashBoxID": "a489fec1-9f6d-4413-9a28-285a37519d67",
Expand Down Expand Up @@ -369,7 +370,7 @@ Request:
"ftReceiptCase":4919338172267102209
}
```
Response:
#### Receipt response

```json
{
Expand Down Expand Up @@ -496,9 +497,10 @@ Response:
}
```

#### Encirclement of goods (return)
### Encirclement of goods (return)

#### Receipt request

Request:
```json
{
"ftCashBoxID": "a489fec1-9f6d-4413-9a28-285a37519d67",
Expand Down Expand Up @@ -528,7 +530,7 @@ Request:
"ftReceiptCase":4919338172267102209
}
```
Response:
#### Receipt response

```json
{
Expand Down