Skip to content

Commit

Permalink
Added Control Transaction (Application, Business, Document, Operator,…
Browse files Browse the repository at this point in the history
… Financial)
  • Loading branch information
Leonid Rubakhin committed Jun 22, 2023
1 parent d06d27b commit 89a009a
Show file tree
Hide file tree
Showing 8 changed files with 414 additions and 3 deletions.
41 changes: 41 additions & 0 deletions application-control-transaction.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
ApplicationControlTransaction:
description: |
A type of Transaction that records application activity.
It tracks changes in the status of an application that
generates transactions.
type: object
properties:
typeCode:
description: |
A code that describes the type of the Application Control Transaction.
$ref: "#/ApplicationControlTransactionTypeCodeEnum"
customTypeCode:
description: |
Type code for custom application control transaction type.
typeCode should be set to Custom.
type: string
controlledOperation:
description: |
Additional control information about Application Control Transaction.
$ref: ./ControlledOperation.v1.yaml
additionalProperties: false
required:
- typeCode

ApplicationControlTransactionTypeCodeEnum:
description: |
Type code that indicates the type of application control transaction.
Launch - application got opened
Terminate - application got closed
Lock - application got locked
Unlock - application got unlocked
LogUpload - upload log
Custom - custom application control transaction type
type: string
enum:
- Launch
- Terminate
- Lock
- UnLock
- LogUpload
- Custom
43 changes: 43 additions & 0 deletions business-control-transaction.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
BusinessControlTransaction:
description: |
A type of Transaction that contols business status.
It that tracks changes in the status of business such as
Start/End of business day.
type: object
properties:
typeCode:
description: |
A code that describes the type of the Business Control Transaction.
$ref: "#/BusinessControlTransactionTypeCodeEnum"
customTypeCode:
description: |
Type code for custom business control transaction type.
typeCode should be set to Custom.
type: string
controlledOperation:
description: |
Additional control information about Business Control Transaction.
$ref: "common.yaml#/ControlledOperation"
additionalProperties: false
required:
- typeCode

BusinessControlTransactionTypeCodeEnum:
description: |
Type code that indicates the type of business control transaction.
Open - open application to do business operations
Close - close application, business operation no longer allowed
SOD - Start Of Day for busines unit
EOD - End Of Day for business unit
EOM - End Of Month for business unit
EOY - End of Year for business unit
Custom - custom business control transaction type
type: string
enum:
- Open
- Close
- SOD
- EOD
- EOM
- EOY
- Custom
21 changes: 21 additions & 0 deletions document-control-transaction.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
DocumentControlTransaction:
description: |
A type of Transaction that records activity with documents.
It includes generating, printing, sending, etc. of different
documents such as receipts, invoices, account statements, etc.
This transaction type does not include document-related activities
that happen as part of another type of transaction. For example,
printing a receipt as part of a retail transaction is not a
document control transaction but re-printing the receipt at some
later point in time is.
type: object
properties:
relatedTransaction:
description: |
Reference to transaction related to this document transaction.
$ref: "common.yaml#/TransactionLink"
relatedFiscalData:
description: |
Fiscal data from the related transaction.
$ref: "fiscal.yaml#/FiscalData"
additionalProperties: false
131 changes: 131 additions & 0 deletions financial-transaction-lineitem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
FinancialTransactionLineItem:
description: |
A detail line about financial transaction.
type: object
properties:
sequenceNumber:
description: |
A line item sequence number. It is an identifier of
the line item within transaction.
type: integer
format: int32
lineItemType:
description: |
Type of line item.
$ref: "#/FinancialTransactionLineItemTypeEnum"
beginDateTime:
description: |
Datetime when line item entry began.
type: string
format: date-time
endDateTime:
description: |
Datetime when line item entry ended.
type: string
format: date-time
accountID:
description: |
Globaly unique account identifier.
This identifer of account associated with financial transaction
line item. It does not have to be meaningful. It could GUID
type: string
accountNumber:
description: |
Meaningful account identifier.
Account number is used on financial documents.
type: string
voidedInProcessFlag:
description: |
A flag that indicates that the line was voided in
process.
type: boolean
default: false
voidInProcess:
description: |
Details of void operation if Line Item was voided in process.
$ref: "void.yaml#/Void"
paidIn:
$ref: "#/PaidInLineItem"
paidOut:
$ref: "#/PaidOutLineItem"
additionalProperties: false
required:
- sequenceNumber
- lineItemType

FinancialTransactionLineItemTypeEnum:
description: |
Type code that indicates the type of business control transaction.
PaidIn - Money added to till
PaidOut - Money taken from till
type: string
enum:
- PaidIn
- PaidOut

PaidInLineItem:
description: |
A Line Item that represents a funds moving into the retailer's account.
This is not related to sales.
For example, a customer may turn in money found on the floor or
an associate may return funds previously given to make some purchases.
type: object
properties:
relatedPaidOut:
description: |
Link to the related financial PaidOut transaction.
$ref: "common.yaml#/TransactionLink"
paidInID:
description: |
Identifier of Paid In.
type: string
paidInName:
description: |
A name of the PaidIn.
type: string
paidInDescription:
description: |
A description of the PaidIn.
type: string
tender:
description: |
Information about Tender within Transaction.
$ref: "transaction-tender.yaml#/TransactionTender"
additionalProperties: false
required:
- tender

PaidOutLineItem:
description: |
A Line Item that represents a funds moving out of the retailer's account.
This is not related to returns.
For example, money can be give to an associate to buy some supplies or
to pay somebody for services.
type: object
properties:
paidOutID:
description: |
Identifier of Paid Out.
type: string
paidOutName:
description: |
A name of the PaidOut.
type: string
paidOutDescription:
description: |
A description of the PaidOut.
type: string
tender:
description: |
Information about Tender within Transaction.
$ref: "transaction-tender.yaml#/TransactionTender"
additionalProperties: false
required:
- tender

FinancialTransactionLineItemCollection:
type: array
items:
$ref: "#/FinancialTransactionLineItem"


71 changes: 71 additions & 0 deletions financial-transaction.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
FinancialTransaction:
description: |
A type of Transaction that records non-sale transfer of funds to/from retailer.
Financial transaction record movement of money, typically cash, in/out of
Till inside POS associated with non-sale activities. Based on the type of
such money transfer, it could be mapped to a financial transaction inside
retailer's accounting system.
It includes activities such as paidIn and paidOut
type: object
properties:
typeCode:
description: |
A code that describes the type of the Financial Transaction.
This type describes the transfer of funds. For exmple it could be
PaidOut to buy some stationery or collecting donations as part of
a fundraiser.
$ref: "#/FinancialTransactionTypeCodeEnum"
accountableAssociate:
description: |
Associate accountable for the funds in financial transaction.
It could be different from the performing associate.
For example, if funds were given to a particular associate to
make some purchase associate information can be captured here.
$ref: ./Associate.v1.yaml
tillID:
description: |
An ID for the till associated with the financial transaction.
Till is a tender repository that is assigned a unique
ID within a business unit (e.g. a store). It can be moved around
the business unit and can be inserted inside a cash drawer.
type: string
tillNumber:
description: |
A unique identifier for the till within store.
This is unique per business unit, meaningful number.
type: integer
format: int32
cashDrawerID:
description: |
Cash drawer identifier captured as part of financial transaction
type: string
lineItems:
description: |
Line items within financial transaction.
$ref: "financial-transaction-lineitem.yaml#/FinancialTransactionLineItemCollection"
controlledOperation:
description: |
Additional control information about Financial Transaction.
$ref: "common.yaml#/ControlledOperation"
voidedInProcessFlag:
description: |
A flag that indicates that the Financial Transaction was voided in
process. It means that there was no transfer of funds.
type: boolean
default: false
voidInProcess:
description: |
Details of the Financial Transaction void in process operation.
$ref: ./Void.v1.yaml
additionalProperties: false

FinancialTransactionTypeCodeEnum:
description: |
Type code that indicates the type of financial transaction.
type: string
enum:
- PaidIn
- PaidOut
- Unknown


5 changes: 2 additions & 3 deletions fiscal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ FiscalData:
Fiscal specific data
type: object
properties:
type: object
properties:
fiscalBusinessUnitID:
description: |
Business Unit ID in a country's specific format or an ID issued
Expand Down Expand Up @@ -80,7 +78,8 @@ type: object
Authorization code represents the acknowledgement generated by a tax authority or a certified fiscal authorization service and
it indicates whether the fiscal system has approved of a transaction.
type: string
loteryCode:
loteryCode:
description: |
Used for a tax receipt lottery organized in some countries by the tax authority.
type: string
fiscalSignature:
Expand Down
Loading

0 comments on commit 89a009a

Please sign in to comment.