Proposal
A Teller could hold one of the following states:
- inactive
- Teller is ready to be opened
- active
- Teller is opened and ready to use for postings and settling
- pending
- Teller is settled and needs to be closed
To ease the reporting of Transactions and the related Teller Journal all postings are stored in the related account and an entity Transaction is created.
A Transaction could be one of the following types:
- opens the Teller with amounts for debit and credit
- Teller gets closed but needs balance verification
- Teller is closed and all postings are cleared to the related accounts
The Journal collects all related transaction information and provides a summary for the Teller.
Activity Diagram
Definition
Teller
{
"id" : 1,
"officeId" : 1
"debitAccountId" : 1,
"creditAccountId" : 2,
"name" : "T1-O1-D1-C2",
"description" : null,
"startDate" : "2014-01-01T00:00:00",
"endDate" : "2014-12-31T23:59:59",
"status" : "active",
"hasTransactions" : true,
"hasMappedCashiers" : true
}
Resource /tellers
HTTP Method | Query Parameter | Request Body | Response Body | HTTP Status Code |
---|
GET | officeId | NA | List<Teller> | 200, 404, 500 |
POST | NA | Teller | NA | 201, 400, 404, 500 |
Resource /tellers/{id}
HTTP Method | Query Parameter | Request Body | Response Body | HTTP Status Code |
---|
GET | NA | NA | Teller | 200, 404, 500 |
PUT | NA | Teller | Teller | 201, 400, 404, 500 |
PATCH | NA | TellerChangeRequest | NA | 200, 400, 404, 500 |
DELETE | NA | NA | NA | 200, 404, 500 |
Class Diagram
Because of simplicity, implementations are omitted!
Cashier
{
"id" : 1,
"officeId" : 1,
"staffId" : 1,
"tellerId" : 1,
"descriptio" : null,
"startDate" : "2014-01-01T00:00:00",
"endDate" : "2014-12-31T23:59:59",
"partTime" : true,
"fromTime" : "08:00:00",
"toTime" : "11:59:59"
}
Resource /cashiers
HTTP Method | Query Parameter | Request Body | Response Body | HTTP Status Code |
---|
GET | officeId tellerId statffId date = today | NA | List<Cashier> | 200, 404, 500 |
Resource /tellers/{id}/cashiers
HTTP Method | Query Parameter | Request Body | Response Body | HTTP Status Code |
---|
GET | date = today | NA | List<Cashier> | 200, 404, 500 |
POST | NA | Cashier | NA | 201, 400, 404, 500 |
Resource /tellers/{id}/cashiers/{id}
HTTP Method | Query Parameter | Request Body | Response Body | HTTP Status Code |
---|
GET | NA | NA | Cashier | 200, 404, 500 |
PUT | NA | Cashier | Cashier | 201, 400, 404, 500 |
DELETE | NA | NA | NA | 200, 404, 500 |
Class Diagram
Because of simplicity, implementations are omitted!
Transaction
{
"id" : 1
"officeId" : 1,
"tellerId" : 1,
"cashierId" : 1,
"accountId" : 1,
"type" : "reciept",
"amount" : 123.45,
"postingDate" : "2014-05-07T19:45:38"
}
Resource /tellers/{id}/transactions
HTTP Method | Query Parameter | Request Body | Response Body | HTTP Status Code |
---|
GET | cashierId dateRange = today | NA | List<Transaction> | 200, 404, 500 |
POST | NA | Transaction | NA | 201, 400, 404, 500 |
Resource /tellers/{id}/transactions/{id}
HTTP Method | Query Parameter | Request Body | Response Body | HTTP Status Code |
---|
GET | NA | NA | Transaction | 200, 404, 500 |
Class Diagram
Because of simplicity, implementations are omitted!
Journal
{
"officeId" : 1,
"tellerId" : 1,
"date" : "2014-01-01T00:00:00",
"openingBalance" : 123.45,
"settledBalance" : 123.45,
"closingBalance" : 123.45,
"sumReceipts" : 123.45,
"sumPayments" : 123.45,
}
Resource /journals
HTTP Method | Query Parameter | Request Body | Response Body | HTTP Status Code |
---|
GET | officeId tellerId cashierId dateRange = today | NA | List<Journal> | 200, 404, 500 |
Resource /teller/{id}/journals
HTTP Method | Query Parameter | Request Body | Response Body | HTTP Status Code |
---|
GET | cashierId dateRange = today | NA | List<Journal> | 200, 404, 500 |
Class Diagram
Because of simplicity, implementations are omitted!
Query Parameters
dateRange
A date range parameter could be one date (eg. 2014-05-07) and will return all transaction of this day or, it could be a range (eg. 2014-04-01..2014-04-30) and will return all transaction within this range including the end date.