diff --git a/application-control-transaction.yaml b/application-control-transaction.yaml new file mode 100644 index 0000000..9b35d25 --- /dev/null +++ b/application-control-transaction.yaml @@ -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 diff --git a/business-control-transaction.yaml b/business-control-transaction.yaml new file mode 100644 index 0000000..da9f4cf --- /dev/null +++ b/business-control-transaction.yaml @@ -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 \ No newline at end of file diff --git a/document-control-transaction.yaml b/document-control-transaction.yaml new file mode 100644 index 0000000..b2de165 --- /dev/null +++ b/document-control-transaction.yaml @@ -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 diff --git a/financial-transaction-lineitem.yaml b/financial-transaction-lineitem.yaml new file mode 100644 index 0000000..0ca2bef --- /dev/null +++ b/financial-transaction-lineitem.yaml @@ -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" + + diff --git a/financial-transaction.yaml b/financial-transaction.yaml new file mode 100644 index 0000000..88ad7c2 --- /dev/null +++ b/financial-transaction.yaml @@ -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 + + diff --git a/fiscal.yaml b/fiscal.yaml index 909c052..5116be5 100644 --- a/fiscal.yaml +++ b/fiscal.yaml @@ -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 @@ -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: diff --git a/operator-control-transaction.yaml b/operator-control-transaction.yaml new file mode 100644 index 0000000..d5a3e71 --- /dev/null +++ b/operator-control-transaction.yaml @@ -0,0 +1,85 @@ +OperatorControlTransaction: + description: | + A type of Transaction that records non-financial activity + that tracks changes in the status of a point of sale terminal, + terminal access by retail enterprise employees and their + supervisors and other activities and events related to the + administration and management of the point of sale system. + type: object + properties: + typeCode: + description: | + A code that describes the type of the Control Transaction. + The value will be one of "login", "logout or a custom value + $ref: "#/OperatorControlTransactionTypeCodeEnum" + tillID: + description: | + An ID for the till associated with the 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 within business unit, meaningful number. + type: integer + format: int32 + automaticFlag: + description: | + When true, the action was performed automatically on behalf of the operator by the system. + type: boolean + default: false + failedLogin: + description: | + Info about a failed login attempt + $ref: "#/FailedLogin" + additionalProperties: false + required: + - typeCode + +OperatorControlTransactionTypeCodeEnum: + description: | + Type code that indicates the type of operator control transaction. + type: string + enum: + - Login + - Logout + - ClockIn + - ClockOut + - PasswordChange + - FailedLogin + - UpdatePreferences + - Unknown + +FailedLogin: + description: | + Info captured as part of a failed login attempt. + type: object + properties: + requestedOperator: + description: | + The operator info used for the attempted login. + $ref: ./Operator.v1.yaml + failureReason: + description: | + The reason why the login failed, if available. If "Custom" is used, the actual reason must be included in the + customFailureReason property. + $ref: ./LoginFailureReasonEnum.v1.yaml + customFailureReason: + description: | + When the The failureReason is "Custom", this is the custom reason why the login failed, if available. + type: string + attemptNumber: + description: | + The nummer of failed attempts to login with this operator's credentials, including this one. + type: integer + format: int32 + accountLockedFlag: + description: | + A flag that indicates whether this attempt resulted in the account being locked. + type: boolean + default: false + additionalProperties: false + required: + - requestedOperator diff --git a/transaction.yaml b/transaction.yaml index 8a80318..622833e 100644 --- a/transaction.yaml +++ b/transaction.yaml @@ -176,6 +176,26 @@ Transaction: description: | RetailTransaction part of this transaction. $ref: "retail-transaction.yaml#/RetailTransaction" + applicationControlTransaction: + description: | + ApplicationControlTransaction part of this transaction. + $ref: "application-control-transaction.yaml#/ApplicationControlTransaction" + operatorControlTransaction: + description: | + OperatorControlTransaction part of this transaction. + $ref: "operator-control-transaction.yaml#/OperatorControlTransaction" + businessControlTransaction: + description: | + BusinessControlTransaction part of this transaction. + $ref: "business-control-transaction.yaml#/BusinessControlTransaction" + documentControlTransaction: + description: | + DocumentControlTransaction part of this transaction. + $ref: "document-control-transaction.yaml#/DocumentControlTransaction" + financialTransaction: + description: | + Financial part of this transaction. + $ref: "financial-transaction.yaml#/FinancialTransaction" digitalSignatures: description: | Digital signatures used with the transaction