forked from OMGStandards/DigitalReceipt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransaction-tender.yaml
137 lines (135 loc) · 4.81 KB
/
transaction-tender.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
TransactionTender:
description: |
Tender within Transaction.
type: object
properties:
tenderID:
description: |
A globally unique identifier for the Tender. It could be UUID.
Since the number of tenders recognized by a retail enterprise is
relatively small, it is common that retailer would assign an integer
value to be tenderID.
type: string
typeCode:
description: |
A code that indicates type of the Tender.
The value will be one of values defined by TenderTypeEnum.
$ref: "#/TenderTypeEnum"
tenderName:
description: |
A name for the the Tender.
Even though the name does not have to be unique it typically is unique and
identifies tender used in the Transaction. For example, "America Express",
"Canadian Dollar Cash", etc.
type: string
serialNumber:
description: |
Unique alphanumeric code assigned to the Tender.
type: string
amount:
description: |
The monetary value of the tender.
$ref: "common.yaml#/MonetaryAmount"
startDate:
description: |
The date before which the Tender cannot be used.
type: string
format: date
expirationDate:
description: |
The date after which the Tender cannot be used.
type: string
format: date
referenceNumber:
description: |
Alphanumeric number that can be used to reference external tendering.
If payment/refund was performed by some kind of external system, like
for non-itegrated tenders, then this number can be captured for reference.
type: string
giftFlag:
description: |
Flag indicating that the tender is a gift.
For example it could be gift card or gift voucher.
type: boolean
default: false
foreignCurrency:
description: |
Details about foreign currency, it the Tender is not in |
default currency specified in the Transaction header.
$ref: "#/ForeignCurrency"
fiscalTenderID:
description: |
A unique identifier for the Tender for fiscal purposes.
It is often assigned by government agency enforcing compliance
with fiscal regulations. Since the number of different fiscal
recognized by fiscal authority is relatively small, it is common
that fiscalTenderID is just an integer.
type: string
fiscalTypeCode:
description: |
A code that indicates type of the Tender for fiscal purposes.
type: string
issuedFlag:
description: |
Flag indicating that the tender was issued within Transaction.
For example it could be newly issued Gift Card.
type: boolean
default: false
extensibilityData:
description: |
Data that provides extensibility to the defined data structure.
This property is an array of DataSets where each DataSet is a
named collection of name-value pairs.
$ref: "common.yaml#/ExtensibilityData"
required:
- typeCode
additionalProperties: false
TenderTypeEnum:
description: |
Type of tender used in the transaction.
type: string
enum:
- Cash
- Card
- Check
- Coupon
- Voucher
- eWallet
- HouseAccount
- Digital
- Custom
- Unknown
ForeignCurrency:
description: |
Provides details about the foreign currency.
It is used to capture information about foreign currency that is
different from the default currency specified in the Transacion header.
For example, if US Dollar is the default currency and Japanese Yens
were used in the transaction all monetary amounts will
be converted to US Dollars but Yens will be booked using foreign
currency.
type: object
properties:
amount:
description: |
The amount expressed in terms of foreign currency.
Note: The amount.currency property is required in this context.
$ref: "common.yaml#/MonetaryAmount"
exchangeRate:
description: |
Exchange rate used to convert foreign currency to default
currency. The rates is presented using direct quotation.
It means that default currency is used as the price currency
and foreign currency is used as unit currency. For example,
if Store uses EUR as default currency a customer pays in USD
then EUR 0.9009 = USD 1.00. So, exchange rates shows the
price of default currency in terms of foreign currency.
type: string
currencyConvertionFee:
description: |
The amount charged to make the conversion from the foreign currency
to the default currency.
type: string
required:
- amount
additionalProperties: false