The following document is in draft and subject to change.

All UML Diagrams created with UMLet, attached you'll find all design files.

Proposal

A Teller could hold one of the following states:

 

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:

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 MethodQuery ParameterRequest BodyResponse BodyHTTP Status Code
GETofficeIdNAList<Teller>200, 404, 500
POSTNATellerNA201, 400, 404, 500

Resource /tellers/{id}

HTTP MethodQuery ParameterRequest BodyResponse BodyHTTP Status Code
GETNANATeller200, 404, 500
PUTNATellerTeller201, 400, 404, 500
PATCHNATellerChangeRequestNA200, 400, 404, 500
DELETENANANA200, 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 MethodQuery ParameterRequest BodyResponse BodyHTTP Status Code
GET

officeId

tellerId

statffId

date = today

NAList<Cashier>200, 404, 500

Resource /tellers/{id}/cashiers

HTTP MethodQuery ParameterRequest BodyResponse BodyHTTP Status Code

GET

date = todayNAList<Cashier>200, 404, 500
POSTNACashierNA201, 400, 404, 500

Resource /tellers/{id}/cashiers/{id}

HTTP MethodQuery ParameterRequest BodyResponse BodyHTTP Status Code
GETNANACashier200, 404, 500
PUTNACashierCashier201, 400, 404, 500
DELETENANANA200, 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 MethodQuery ParameterRequest BodyResponse BodyHTTP Status Code

GET

cashierId

dateRange = today

NAList<Transaction>200, 404, 500
POSTNATransactionNA201, 400, 404, 500

Resource /tellers/{id}/transactions/{id}

HTTP MethodQuery ParameterRequest BodyResponse BodyHTTP Status Code

GET

NA

NATransaction200, 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 MethodQuery ParameterRequest BodyResponse BodyHTTP Status Code

GET

officeId

tellerId

cashierId

dateRange = today

NAList<Journal>200, 404, 500

Resource /teller/{id}/journals

HTTP MethodQuery ParameterRequest BodyResponse BodyHTTP Status Code

GET

cashierId

dateRange = today

NAList<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.