@technova-tech/olive-proto-lib 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accounts/accounts.js +11726 -0
- package/admin/admin.js +6902 -0
- package/audit/audit.js +984 -0
- package/bills/bills.js +2363 -0
- package/business/business.js +16432 -0
- package/google/protobuf/any.js +113 -0
- package/google/protobuf/struct.js +357 -0
- package/image/recognition.js +456 -0
- package/index.js +46 -0
- package/package.json +31 -0
- package/pos/transactions.js +2084 -0
- package/pos.v1/auth.js +1179 -0
- package/pos.v1/card-transactions.js +2473 -0
- package/pos.v1/eod.js +2416 -0
- package/pos.v1/merchants.js +1552 -0
- package/pos.v1/terminal-transactions.js +3792 -0
- package/pos.v1/terminal-types.js +3888 -0
- package/pos.v1/terminals.js +32605 -0
- package/pos.v1/transactions.js +2918 -0
- package/shared/response.js +233 -0
- package/storage/storage.js +476 -0
- package/terminal/terminal.js +12583 -0
- package/transfer/transfer.js +3609 -0
- package/types/accounts/accounts.d.ts +3943 -0
- package/types/admin/admin.d.ts +2348 -0
- package/types/audit/audit.d.ts +323 -0
- package/types/bills/bills.d.ts +731 -0
- package/types/business/business.d.ts +7630 -0
- package/types/google/protobuf/any.d.ts +27 -0
- package/types/google/protobuf/struct.d.ts +175 -0
- package/types/image/recognition.d.ts +147 -0
- package/types/index.d.ts +43 -0
- package/types/pos/transactions.d.ts +667 -0
- package/types/pos.v1/auth.d.ts +374 -0
- package/types/pos.v1/card-transactions.d.ts +808 -0
- package/types/pos.v1/eod.d.ts +819 -0
- package/types/pos.v1/merchants.d.ts +566 -0
- package/types/pos.v1/terminal-transactions.d.ts +1342 -0
- package/types/pos.v1/terminal-types.d.ts +1215 -0
- package/types/pos.v1/terminals.d.ts +11142 -0
- package/types/pos.v1/transactions.d.ts +1057 -0
- package/types/shared/response.d.ts +65 -0
- package/types/storage/storage.d.ts +153 -0
- package/types/terminal/terminal.d.ts +5482 -0
- package/types/transfer/transfer.d.ts +1148 -0
- package/types/users/users.d.ts +4336 -0
- package/types/verifications/verifications.d.ts +2952 -0
- package/users/users.js +12683 -0
- package/verifications/verifications.js +8194 -0
|
@@ -0,0 +1,3792 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.com = void 0;
|
|
27
|
+
const pb_1 = __importStar(require("google-protobuf"));
|
|
28
|
+
const grpc_1 = __importStar(require("@grpc/grpc-js"));
|
|
29
|
+
var com;
|
|
30
|
+
(function (com) {
|
|
31
|
+
var pkg;
|
|
32
|
+
(function (pkg) {
|
|
33
|
+
var posv1;
|
|
34
|
+
(function (posv1) {
|
|
35
|
+
var terminalTransactions;
|
|
36
|
+
(function (terminalTransactions) {
|
|
37
|
+
let TransactionStatus;
|
|
38
|
+
(function (TransactionStatus) {
|
|
39
|
+
TransactionStatus[TransactionStatus["STATUS_UNSPECIFIED"] = 0] = "STATUS_UNSPECIFIED";
|
|
40
|
+
TransactionStatus[TransactionStatus["STATUS_INITIALIZED"] = 1] = "STATUS_INITIALIZED";
|
|
41
|
+
TransactionStatus[TransactionStatus["STATUS_PROCESSING"] = 2] = "STATUS_PROCESSING";
|
|
42
|
+
TransactionStatus[TransactionStatus["STATUS_COMPLETED"] = 3] = "STATUS_COMPLETED";
|
|
43
|
+
TransactionStatus[TransactionStatus["STATUS_FAILED"] = 4] = "STATUS_FAILED";
|
|
44
|
+
TransactionStatus[TransactionStatus["STATUS_REVERSED"] = 5] = "STATUS_REVERSED";
|
|
45
|
+
TransactionStatus[TransactionStatus["STATUS_EXPIRED"] = 6] = "STATUS_EXPIRED";
|
|
46
|
+
TransactionStatus[TransactionStatus["STATUS_CANCELLED"] = 7] = "STATUS_CANCELLED";
|
|
47
|
+
})(TransactionStatus = terminalTransactions.TransactionStatus || (terminalTransactions.TransactionStatus = {}));
|
|
48
|
+
let TransactionStep;
|
|
49
|
+
(function (TransactionStep) {
|
|
50
|
+
TransactionStep[TransactionStep["STEP_UNSPECIFIED"] = 0] = "STEP_UNSPECIFIED";
|
|
51
|
+
TransactionStep[TransactionStep["STEP_INITIALIZED"] = 1] = "STEP_INITIALIZED";
|
|
52
|
+
TransactionStep[TransactionStep["STEP_VALIDATION"] = 2] = "STEP_VALIDATION";
|
|
53
|
+
TransactionStep[TransactionStep["STEP_AUTHORIZATION"] = 3] = "STEP_AUTHORIZATION";
|
|
54
|
+
TransactionStep[TransactionStep["STEP_CAPTURE"] = 4] = "STEP_CAPTURE";
|
|
55
|
+
TransactionStep[TransactionStep["STEP_SETTLEMENT"] = 5] = "STEP_SETTLEMENT";
|
|
56
|
+
TransactionStep[TransactionStep["STEP_FINALIZED"] = 6] = "STEP_FINALIZED";
|
|
57
|
+
TransactionStep[TransactionStep["STEP_REVERSAL"] = 7] = "STEP_REVERSAL";
|
|
58
|
+
TransactionStep[TransactionStep["STEP_ERROR"] = 8] = "STEP_ERROR";
|
|
59
|
+
})(TransactionStep = terminalTransactions.TransactionStep || (terminalTransactions.TransactionStep = {}));
|
|
60
|
+
let AuditEventType;
|
|
61
|
+
(function (AuditEventType) {
|
|
62
|
+
AuditEventType[AuditEventType["AUDIT_UNSPECIFIED"] = 0] = "AUDIT_UNSPECIFIED";
|
|
63
|
+
AuditEventType[AuditEventType["AUDIT_TRANSACTION_INITIALIZED"] = 1] = "AUDIT_TRANSACTION_INITIALIZED";
|
|
64
|
+
AuditEventType[AuditEventType["AUDIT_TRANSACTION_PROCESSING"] = 2] = "AUDIT_TRANSACTION_PROCESSING";
|
|
65
|
+
AuditEventType[AuditEventType["AUDIT_TRANSACTION_COMPLETED"] = 3] = "AUDIT_TRANSACTION_COMPLETED";
|
|
66
|
+
AuditEventType[AuditEventType["AUDIT_TRANSACTION_FAILED"] = 4] = "AUDIT_TRANSACTION_FAILED";
|
|
67
|
+
AuditEventType[AuditEventType["AUDIT_TRANSACTION_REVERSED"] = 5] = "AUDIT_TRANSACTION_REVERSED";
|
|
68
|
+
AuditEventType[AuditEventType["AUDIT_TRANSACTION_EXPIRED"] = 6] = "AUDIT_TRANSACTION_EXPIRED";
|
|
69
|
+
AuditEventType[AuditEventType["AUDIT_STEP_CHANGED"] = 7] = "AUDIT_STEP_CHANGED";
|
|
70
|
+
AuditEventType[AuditEventType["AUDIT_STATUS_CHANGED"] = 8] = "AUDIT_STATUS_CHANGED";
|
|
71
|
+
AuditEventType[AuditEventType["AUDIT_ERROR_OCCURRED"] = 9] = "AUDIT_ERROR_OCCURRED";
|
|
72
|
+
AuditEventType[AuditEventType["AUDIT_VALIDATION_FAILED"] = 10] = "AUDIT_VALIDATION_FAILED";
|
|
73
|
+
AuditEventType[AuditEventType["AUDIT_AUTHORIZATION_REQUESTED"] = 11] = "AUDIT_AUTHORIZATION_REQUESTED";
|
|
74
|
+
AuditEventType[AuditEventType["AUDIT_AUTHORIZATION_RECEIVED"] = 12] = "AUDIT_AUTHORIZATION_RECEIVED";
|
|
75
|
+
AuditEventType[AuditEventType["AUDIT_CAPTURE_REQUESTED"] = 13] = "AUDIT_CAPTURE_REQUESTED";
|
|
76
|
+
AuditEventType[AuditEventType["AUDIT_CAPTURE_COMPLETED"] = 14] = "AUDIT_CAPTURE_COMPLETED";
|
|
77
|
+
AuditEventType[AuditEventType["AUDIT_SETTLEMENT_REQUESTED"] = 15] = "AUDIT_SETTLEMENT_REQUESTED";
|
|
78
|
+
AuditEventType[AuditEventType["AUDIT_SETTLEMENT_COMPLETED"] = 16] = "AUDIT_SETTLEMENT_COMPLETED";
|
|
79
|
+
AuditEventType[AuditEventType["AUDIT_REVERSAL_REQUESTED"] = 17] = "AUDIT_REVERSAL_REQUESTED";
|
|
80
|
+
AuditEventType[AuditEventType["AUDIT_REVERSAL_COMPLETED"] = 18] = "AUDIT_REVERSAL_COMPLETED";
|
|
81
|
+
})(AuditEventType = terminalTransactions.AuditEventType || (terminalTransactions.AuditEventType = {}));
|
|
82
|
+
class TransactionInitRequest extends pb_1.Message {
|
|
83
|
+
#one_of_decls = [];
|
|
84
|
+
constructor(data) {
|
|
85
|
+
super();
|
|
86
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
87
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
88
|
+
if ("terminalId" in data && data.terminalId != undefined) {
|
|
89
|
+
this.terminalId = data.terminalId;
|
|
90
|
+
}
|
|
91
|
+
if ("businessId" in data && data.businessId != undefined) {
|
|
92
|
+
this.businessId = data.businessId;
|
|
93
|
+
}
|
|
94
|
+
if ("amount" in data && data.amount != undefined) {
|
|
95
|
+
this.amount = data.amount;
|
|
96
|
+
}
|
|
97
|
+
if ("currency" in data && data.currency != undefined) {
|
|
98
|
+
this.currency = data.currency;
|
|
99
|
+
}
|
|
100
|
+
if ("transactionType" in data && data.transactionType != undefined) {
|
|
101
|
+
this.transactionType = data.transactionType;
|
|
102
|
+
}
|
|
103
|
+
if ("paymentMethod" in data && data.paymentMethod != undefined) {
|
|
104
|
+
this.paymentMethod = data.paymentMethod;
|
|
105
|
+
}
|
|
106
|
+
if ("reference" in data && data.reference != undefined) {
|
|
107
|
+
this.reference = data.reference;
|
|
108
|
+
}
|
|
109
|
+
if ("metadata" in data && data.metadata != undefined) {
|
|
110
|
+
this.metadata = data.metadata;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
get terminalId() {
|
|
115
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
116
|
+
}
|
|
117
|
+
set terminalId(value) {
|
|
118
|
+
pb_1.Message.setField(this, 1, value);
|
|
119
|
+
}
|
|
120
|
+
get businessId() {
|
|
121
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
122
|
+
}
|
|
123
|
+
set businessId(value) {
|
|
124
|
+
pb_1.Message.setField(this, 2, value);
|
|
125
|
+
}
|
|
126
|
+
get amount() {
|
|
127
|
+
return pb_1.Message.getFieldWithDefault(this, 3, 0);
|
|
128
|
+
}
|
|
129
|
+
set amount(value) {
|
|
130
|
+
pb_1.Message.setField(this, 3, value);
|
|
131
|
+
}
|
|
132
|
+
get currency() {
|
|
133
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
134
|
+
}
|
|
135
|
+
set currency(value) {
|
|
136
|
+
pb_1.Message.setField(this, 4, value);
|
|
137
|
+
}
|
|
138
|
+
get transactionType() {
|
|
139
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
140
|
+
}
|
|
141
|
+
set transactionType(value) {
|
|
142
|
+
pb_1.Message.setField(this, 5, value);
|
|
143
|
+
}
|
|
144
|
+
get paymentMethod() {
|
|
145
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
146
|
+
}
|
|
147
|
+
set paymentMethod(value) {
|
|
148
|
+
pb_1.Message.setField(this, 6, value);
|
|
149
|
+
}
|
|
150
|
+
get reference() {
|
|
151
|
+
return pb_1.Message.getFieldWithDefault(this, 7, "");
|
|
152
|
+
}
|
|
153
|
+
set reference(value) {
|
|
154
|
+
pb_1.Message.setField(this, 7, value);
|
|
155
|
+
}
|
|
156
|
+
get metadata() {
|
|
157
|
+
return pb_1.Message.getWrapperField(this, TransactionMetadata, 8);
|
|
158
|
+
}
|
|
159
|
+
set metadata(value) {
|
|
160
|
+
pb_1.Message.setWrapperField(this, 8, value);
|
|
161
|
+
}
|
|
162
|
+
get hasMetadata() {
|
|
163
|
+
return pb_1.Message.getField(this, 8) != null;
|
|
164
|
+
}
|
|
165
|
+
static fromObject(data) {
|
|
166
|
+
const message = new TransactionInitRequest({});
|
|
167
|
+
if (data.terminalId != null) {
|
|
168
|
+
message.terminalId = data.terminalId;
|
|
169
|
+
}
|
|
170
|
+
if (data.businessId != null) {
|
|
171
|
+
message.businessId = data.businessId;
|
|
172
|
+
}
|
|
173
|
+
if (data.amount != null) {
|
|
174
|
+
message.amount = data.amount;
|
|
175
|
+
}
|
|
176
|
+
if (data.currency != null) {
|
|
177
|
+
message.currency = data.currency;
|
|
178
|
+
}
|
|
179
|
+
if (data.transactionType != null) {
|
|
180
|
+
message.transactionType = data.transactionType;
|
|
181
|
+
}
|
|
182
|
+
if (data.paymentMethod != null) {
|
|
183
|
+
message.paymentMethod = data.paymentMethod;
|
|
184
|
+
}
|
|
185
|
+
if (data.reference != null) {
|
|
186
|
+
message.reference = data.reference;
|
|
187
|
+
}
|
|
188
|
+
if (data.metadata != null) {
|
|
189
|
+
message.metadata = TransactionMetadata.fromObject(data.metadata);
|
|
190
|
+
}
|
|
191
|
+
return message;
|
|
192
|
+
}
|
|
193
|
+
toObject() {
|
|
194
|
+
const data = {};
|
|
195
|
+
if (this.terminalId != null) {
|
|
196
|
+
data.terminalId = this.terminalId;
|
|
197
|
+
}
|
|
198
|
+
if (this.businessId != null) {
|
|
199
|
+
data.businessId = this.businessId;
|
|
200
|
+
}
|
|
201
|
+
if (this.amount != null) {
|
|
202
|
+
data.amount = this.amount;
|
|
203
|
+
}
|
|
204
|
+
if (this.currency != null) {
|
|
205
|
+
data.currency = this.currency;
|
|
206
|
+
}
|
|
207
|
+
if (this.transactionType != null) {
|
|
208
|
+
data.transactionType = this.transactionType;
|
|
209
|
+
}
|
|
210
|
+
if (this.paymentMethod != null) {
|
|
211
|
+
data.paymentMethod = this.paymentMethod;
|
|
212
|
+
}
|
|
213
|
+
if (this.reference != null) {
|
|
214
|
+
data.reference = this.reference;
|
|
215
|
+
}
|
|
216
|
+
if (this.metadata != null) {
|
|
217
|
+
data.metadata = this.metadata.toObject();
|
|
218
|
+
}
|
|
219
|
+
return data;
|
|
220
|
+
}
|
|
221
|
+
serialize(w) {
|
|
222
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
223
|
+
if (this.terminalId.length)
|
|
224
|
+
writer.writeString(1, this.terminalId);
|
|
225
|
+
if (this.businessId.length)
|
|
226
|
+
writer.writeString(2, this.businessId);
|
|
227
|
+
if (this.amount != 0)
|
|
228
|
+
writer.writeInt64(3, this.amount);
|
|
229
|
+
if (this.currency.length)
|
|
230
|
+
writer.writeString(4, this.currency);
|
|
231
|
+
if (this.transactionType.length)
|
|
232
|
+
writer.writeString(5, this.transactionType);
|
|
233
|
+
if (this.paymentMethod.length)
|
|
234
|
+
writer.writeString(6, this.paymentMethod);
|
|
235
|
+
if (this.reference.length)
|
|
236
|
+
writer.writeString(7, this.reference);
|
|
237
|
+
if (this.hasMetadata)
|
|
238
|
+
writer.writeMessage(8, this.metadata, () => this.metadata.serialize(writer));
|
|
239
|
+
if (!w)
|
|
240
|
+
return writer.getResultBuffer();
|
|
241
|
+
}
|
|
242
|
+
static deserialize(bytes) {
|
|
243
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionInitRequest();
|
|
244
|
+
while (reader.nextField()) {
|
|
245
|
+
if (reader.isEndGroup())
|
|
246
|
+
break;
|
|
247
|
+
switch (reader.getFieldNumber()) {
|
|
248
|
+
case 1:
|
|
249
|
+
message.terminalId = reader.readString();
|
|
250
|
+
break;
|
|
251
|
+
case 2:
|
|
252
|
+
message.businessId = reader.readString();
|
|
253
|
+
break;
|
|
254
|
+
case 3:
|
|
255
|
+
message.amount = reader.readInt64();
|
|
256
|
+
break;
|
|
257
|
+
case 4:
|
|
258
|
+
message.currency = reader.readString();
|
|
259
|
+
break;
|
|
260
|
+
case 5:
|
|
261
|
+
message.transactionType = reader.readString();
|
|
262
|
+
break;
|
|
263
|
+
case 6:
|
|
264
|
+
message.paymentMethod = reader.readString();
|
|
265
|
+
break;
|
|
266
|
+
case 7:
|
|
267
|
+
message.reference = reader.readString();
|
|
268
|
+
break;
|
|
269
|
+
case 8:
|
|
270
|
+
reader.readMessage(message.metadata, () => message.metadata = TransactionMetadata.deserialize(reader));
|
|
271
|
+
break;
|
|
272
|
+
default: reader.skipField();
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return message;
|
|
276
|
+
}
|
|
277
|
+
serializeBinary() {
|
|
278
|
+
return this.serialize();
|
|
279
|
+
}
|
|
280
|
+
static deserializeBinary(bytes) {
|
|
281
|
+
return TransactionInitRequest.deserialize(bytes);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
terminalTransactions.TransactionInitRequest = TransactionInitRequest;
|
|
285
|
+
class TransactionCompleteRequest extends pb_1.Message {
|
|
286
|
+
#one_of_decls = [];
|
|
287
|
+
constructor(data) {
|
|
288
|
+
super();
|
|
289
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
290
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
291
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
292
|
+
this.transactionId = data.transactionId;
|
|
293
|
+
}
|
|
294
|
+
if ("processorReference" in data && data.processorReference != undefined) {
|
|
295
|
+
this.processorReference = data.processorReference;
|
|
296
|
+
}
|
|
297
|
+
if ("authorizationCode" in data && data.authorizationCode != undefined) {
|
|
298
|
+
this.authorizationCode = data.authorizationCode;
|
|
299
|
+
}
|
|
300
|
+
if ("responseCode" in data && data.responseCode != undefined) {
|
|
301
|
+
this.responseCode = data.responseCode;
|
|
302
|
+
}
|
|
303
|
+
if ("responseMessage" in data && data.responseMessage != undefined) {
|
|
304
|
+
this.responseMessage = data.responseMessage;
|
|
305
|
+
}
|
|
306
|
+
if ("status" in data && data.status != undefined) {
|
|
307
|
+
this.status = data.status;
|
|
308
|
+
}
|
|
309
|
+
if ("processorData" in data && data.processorData != undefined) {
|
|
310
|
+
this.processorData = data.processorData;
|
|
311
|
+
}
|
|
312
|
+
if ("receiptData" in data && data.receiptData != undefined) {
|
|
313
|
+
this.receiptData = data.receiptData;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
get transactionId() {
|
|
318
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
319
|
+
}
|
|
320
|
+
set transactionId(value) {
|
|
321
|
+
pb_1.Message.setField(this, 1, value);
|
|
322
|
+
}
|
|
323
|
+
get processorReference() {
|
|
324
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
325
|
+
}
|
|
326
|
+
set processorReference(value) {
|
|
327
|
+
pb_1.Message.setField(this, 2, value);
|
|
328
|
+
}
|
|
329
|
+
get authorizationCode() {
|
|
330
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
331
|
+
}
|
|
332
|
+
set authorizationCode(value) {
|
|
333
|
+
pb_1.Message.setField(this, 3, value);
|
|
334
|
+
}
|
|
335
|
+
get responseCode() {
|
|
336
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
337
|
+
}
|
|
338
|
+
set responseCode(value) {
|
|
339
|
+
pb_1.Message.setField(this, 4, value);
|
|
340
|
+
}
|
|
341
|
+
get responseMessage() {
|
|
342
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
343
|
+
}
|
|
344
|
+
set responseMessage(value) {
|
|
345
|
+
pb_1.Message.setField(this, 5, value);
|
|
346
|
+
}
|
|
347
|
+
get status() {
|
|
348
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
349
|
+
}
|
|
350
|
+
set status(value) {
|
|
351
|
+
pb_1.Message.setField(this, 6, value);
|
|
352
|
+
}
|
|
353
|
+
get processorData() {
|
|
354
|
+
return pb_1.Message.getWrapperField(this, ProcessorData, 7);
|
|
355
|
+
}
|
|
356
|
+
set processorData(value) {
|
|
357
|
+
pb_1.Message.setWrapperField(this, 7, value);
|
|
358
|
+
}
|
|
359
|
+
get hasProcessorData() {
|
|
360
|
+
return pb_1.Message.getField(this, 7) != null;
|
|
361
|
+
}
|
|
362
|
+
get receiptData() {
|
|
363
|
+
return pb_1.Message.getWrapperField(this, TransactionReceipt, 8);
|
|
364
|
+
}
|
|
365
|
+
set receiptData(value) {
|
|
366
|
+
pb_1.Message.setWrapperField(this, 8, value);
|
|
367
|
+
}
|
|
368
|
+
get hasReceiptData() {
|
|
369
|
+
return pb_1.Message.getField(this, 8) != null;
|
|
370
|
+
}
|
|
371
|
+
static fromObject(data) {
|
|
372
|
+
const message = new TransactionCompleteRequest({});
|
|
373
|
+
if (data.transactionId != null) {
|
|
374
|
+
message.transactionId = data.transactionId;
|
|
375
|
+
}
|
|
376
|
+
if (data.processorReference != null) {
|
|
377
|
+
message.processorReference = data.processorReference;
|
|
378
|
+
}
|
|
379
|
+
if (data.authorizationCode != null) {
|
|
380
|
+
message.authorizationCode = data.authorizationCode;
|
|
381
|
+
}
|
|
382
|
+
if (data.responseCode != null) {
|
|
383
|
+
message.responseCode = data.responseCode;
|
|
384
|
+
}
|
|
385
|
+
if (data.responseMessage != null) {
|
|
386
|
+
message.responseMessage = data.responseMessage;
|
|
387
|
+
}
|
|
388
|
+
if (data.status != null) {
|
|
389
|
+
message.status = data.status;
|
|
390
|
+
}
|
|
391
|
+
if (data.processorData != null) {
|
|
392
|
+
message.processorData = ProcessorData.fromObject(data.processorData);
|
|
393
|
+
}
|
|
394
|
+
if (data.receiptData != null) {
|
|
395
|
+
message.receiptData = TransactionReceipt.fromObject(data.receiptData);
|
|
396
|
+
}
|
|
397
|
+
return message;
|
|
398
|
+
}
|
|
399
|
+
toObject() {
|
|
400
|
+
const data = {};
|
|
401
|
+
if (this.transactionId != null) {
|
|
402
|
+
data.transactionId = this.transactionId;
|
|
403
|
+
}
|
|
404
|
+
if (this.processorReference != null) {
|
|
405
|
+
data.processorReference = this.processorReference;
|
|
406
|
+
}
|
|
407
|
+
if (this.authorizationCode != null) {
|
|
408
|
+
data.authorizationCode = this.authorizationCode;
|
|
409
|
+
}
|
|
410
|
+
if (this.responseCode != null) {
|
|
411
|
+
data.responseCode = this.responseCode;
|
|
412
|
+
}
|
|
413
|
+
if (this.responseMessage != null) {
|
|
414
|
+
data.responseMessage = this.responseMessage;
|
|
415
|
+
}
|
|
416
|
+
if (this.status != null) {
|
|
417
|
+
data.status = this.status;
|
|
418
|
+
}
|
|
419
|
+
if (this.processorData != null) {
|
|
420
|
+
data.processorData = this.processorData.toObject();
|
|
421
|
+
}
|
|
422
|
+
if (this.receiptData != null) {
|
|
423
|
+
data.receiptData = this.receiptData.toObject();
|
|
424
|
+
}
|
|
425
|
+
return data;
|
|
426
|
+
}
|
|
427
|
+
serialize(w) {
|
|
428
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
429
|
+
if (this.transactionId.length)
|
|
430
|
+
writer.writeString(1, this.transactionId);
|
|
431
|
+
if (this.processorReference.length)
|
|
432
|
+
writer.writeString(2, this.processorReference);
|
|
433
|
+
if (this.authorizationCode.length)
|
|
434
|
+
writer.writeString(3, this.authorizationCode);
|
|
435
|
+
if (this.responseCode.length)
|
|
436
|
+
writer.writeString(4, this.responseCode);
|
|
437
|
+
if (this.responseMessage.length)
|
|
438
|
+
writer.writeString(5, this.responseMessage);
|
|
439
|
+
if (this.status.length)
|
|
440
|
+
writer.writeString(6, this.status);
|
|
441
|
+
if (this.hasProcessorData)
|
|
442
|
+
writer.writeMessage(7, this.processorData, () => this.processorData.serialize(writer));
|
|
443
|
+
if (this.hasReceiptData)
|
|
444
|
+
writer.writeMessage(8, this.receiptData, () => this.receiptData.serialize(writer));
|
|
445
|
+
if (!w)
|
|
446
|
+
return writer.getResultBuffer();
|
|
447
|
+
}
|
|
448
|
+
static deserialize(bytes) {
|
|
449
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionCompleteRequest();
|
|
450
|
+
while (reader.nextField()) {
|
|
451
|
+
if (reader.isEndGroup())
|
|
452
|
+
break;
|
|
453
|
+
switch (reader.getFieldNumber()) {
|
|
454
|
+
case 1:
|
|
455
|
+
message.transactionId = reader.readString();
|
|
456
|
+
break;
|
|
457
|
+
case 2:
|
|
458
|
+
message.processorReference = reader.readString();
|
|
459
|
+
break;
|
|
460
|
+
case 3:
|
|
461
|
+
message.authorizationCode = reader.readString();
|
|
462
|
+
break;
|
|
463
|
+
case 4:
|
|
464
|
+
message.responseCode = reader.readString();
|
|
465
|
+
break;
|
|
466
|
+
case 5:
|
|
467
|
+
message.responseMessage = reader.readString();
|
|
468
|
+
break;
|
|
469
|
+
case 6:
|
|
470
|
+
message.status = reader.readString();
|
|
471
|
+
break;
|
|
472
|
+
case 7:
|
|
473
|
+
reader.readMessage(message.processorData, () => message.processorData = ProcessorData.deserialize(reader));
|
|
474
|
+
break;
|
|
475
|
+
case 8:
|
|
476
|
+
reader.readMessage(message.receiptData, () => message.receiptData = TransactionReceipt.deserialize(reader));
|
|
477
|
+
break;
|
|
478
|
+
default: reader.skipField();
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
return message;
|
|
482
|
+
}
|
|
483
|
+
serializeBinary() {
|
|
484
|
+
return this.serialize();
|
|
485
|
+
}
|
|
486
|
+
static deserializeBinary(bytes) {
|
|
487
|
+
return TransactionCompleteRequest.deserialize(bytes);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
terminalTransactions.TransactionCompleteRequest = TransactionCompleteRequest;
|
|
491
|
+
class TransactionReversalRequest extends pb_1.Message {
|
|
492
|
+
#one_of_decls = [];
|
|
493
|
+
constructor(data) {
|
|
494
|
+
super();
|
|
495
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
496
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
497
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
498
|
+
this.transactionId = data.transactionId;
|
|
499
|
+
}
|
|
500
|
+
if ("originalReference" in data && data.originalReference != undefined) {
|
|
501
|
+
this.originalReference = data.originalReference;
|
|
502
|
+
}
|
|
503
|
+
if ("reversalReason" in data && data.reversalReason != undefined) {
|
|
504
|
+
this.reversalReason = data.reversalReason;
|
|
505
|
+
}
|
|
506
|
+
if ("operatorId" in data && data.operatorId != undefined) {
|
|
507
|
+
this.operatorId = data.operatorId;
|
|
508
|
+
}
|
|
509
|
+
if ("metadata" in data && data.metadata != undefined) {
|
|
510
|
+
this.metadata = data.metadata;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
get transactionId() {
|
|
515
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
516
|
+
}
|
|
517
|
+
set transactionId(value) {
|
|
518
|
+
pb_1.Message.setField(this, 1, value);
|
|
519
|
+
}
|
|
520
|
+
get originalReference() {
|
|
521
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
522
|
+
}
|
|
523
|
+
set originalReference(value) {
|
|
524
|
+
pb_1.Message.setField(this, 2, value);
|
|
525
|
+
}
|
|
526
|
+
get reversalReason() {
|
|
527
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
528
|
+
}
|
|
529
|
+
set reversalReason(value) {
|
|
530
|
+
pb_1.Message.setField(this, 3, value);
|
|
531
|
+
}
|
|
532
|
+
get operatorId() {
|
|
533
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
534
|
+
}
|
|
535
|
+
set operatorId(value) {
|
|
536
|
+
pb_1.Message.setField(this, 4, value);
|
|
537
|
+
}
|
|
538
|
+
get metadata() {
|
|
539
|
+
return pb_1.Message.getWrapperField(this, TransactionMetadata, 5);
|
|
540
|
+
}
|
|
541
|
+
set metadata(value) {
|
|
542
|
+
pb_1.Message.setWrapperField(this, 5, value);
|
|
543
|
+
}
|
|
544
|
+
get hasMetadata() {
|
|
545
|
+
return pb_1.Message.getField(this, 5) != null;
|
|
546
|
+
}
|
|
547
|
+
static fromObject(data) {
|
|
548
|
+
const message = new TransactionReversalRequest({});
|
|
549
|
+
if (data.transactionId != null) {
|
|
550
|
+
message.transactionId = data.transactionId;
|
|
551
|
+
}
|
|
552
|
+
if (data.originalReference != null) {
|
|
553
|
+
message.originalReference = data.originalReference;
|
|
554
|
+
}
|
|
555
|
+
if (data.reversalReason != null) {
|
|
556
|
+
message.reversalReason = data.reversalReason;
|
|
557
|
+
}
|
|
558
|
+
if (data.operatorId != null) {
|
|
559
|
+
message.operatorId = data.operatorId;
|
|
560
|
+
}
|
|
561
|
+
if (data.metadata != null) {
|
|
562
|
+
message.metadata = TransactionMetadata.fromObject(data.metadata);
|
|
563
|
+
}
|
|
564
|
+
return message;
|
|
565
|
+
}
|
|
566
|
+
toObject() {
|
|
567
|
+
const data = {};
|
|
568
|
+
if (this.transactionId != null) {
|
|
569
|
+
data.transactionId = this.transactionId;
|
|
570
|
+
}
|
|
571
|
+
if (this.originalReference != null) {
|
|
572
|
+
data.originalReference = this.originalReference;
|
|
573
|
+
}
|
|
574
|
+
if (this.reversalReason != null) {
|
|
575
|
+
data.reversalReason = this.reversalReason;
|
|
576
|
+
}
|
|
577
|
+
if (this.operatorId != null) {
|
|
578
|
+
data.operatorId = this.operatorId;
|
|
579
|
+
}
|
|
580
|
+
if (this.metadata != null) {
|
|
581
|
+
data.metadata = this.metadata.toObject();
|
|
582
|
+
}
|
|
583
|
+
return data;
|
|
584
|
+
}
|
|
585
|
+
serialize(w) {
|
|
586
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
587
|
+
if (this.transactionId.length)
|
|
588
|
+
writer.writeString(1, this.transactionId);
|
|
589
|
+
if (this.originalReference.length)
|
|
590
|
+
writer.writeString(2, this.originalReference);
|
|
591
|
+
if (this.reversalReason.length)
|
|
592
|
+
writer.writeString(3, this.reversalReason);
|
|
593
|
+
if (this.operatorId.length)
|
|
594
|
+
writer.writeString(4, this.operatorId);
|
|
595
|
+
if (this.hasMetadata)
|
|
596
|
+
writer.writeMessage(5, this.metadata, () => this.metadata.serialize(writer));
|
|
597
|
+
if (!w)
|
|
598
|
+
return writer.getResultBuffer();
|
|
599
|
+
}
|
|
600
|
+
static deserialize(bytes) {
|
|
601
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionReversalRequest();
|
|
602
|
+
while (reader.nextField()) {
|
|
603
|
+
if (reader.isEndGroup())
|
|
604
|
+
break;
|
|
605
|
+
switch (reader.getFieldNumber()) {
|
|
606
|
+
case 1:
|
|
607
|
+
message.transactionId = reader.readString();
|
|
608
|
+
break;
|
|
609
|
+
case 2:
|
|
610
|
+
message.originalReference = reader.readString();
|
|
611
|
+
break;
|
|
612
|
+
case 3:
|
|
613
|
+
message.reversalReason = reader.readString();
|
|
614
|
+
break;
|
|
615
|
+
case 4:
|
|
616
|
+
message.operatorId = reader.readString();
|
|
617
|
+
break;
|
|
618
|
+
case 5:
|
|
619
|
+
reader.readMessage(message.metadata, () => message.metadata = TransactionMetadata.deserialize(reader));
|
|
620
|
+
break;
|
|
621
|
+
default: reader.skipField();
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
return message;
|
|
625
|
+
}
|
|
626
|
+
serializeBinary() {
|
|
627
|
+
return this.serialize();
|
|
628
|
+
}
|
|
629
|
+
static deserializeBinary(bytes) {
|
|
630
|
+
return TransactionReversalRequest.deserialize(bytes);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
terminalTransactions.TransactionReversalRequest = TransactionReversalRequest;
|
|
634
|
+
class TransactionTimelineRequest extends pb_1.Message {
|
|
635
|
+
#one_of_decls = [];
|
|
636
|
+
constructor(data) {
|
|
637
|
+
super();
|
|
638
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
639
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
640
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
641
|
+
this.transactionId = data.transactionId;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
get transactionId() {
|
|
646
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
647
|
+
}
|
|
648
|
+
set transactionId(value) {
|
|
649
|
+
pb_1.Message.setField(this, 1, value);
|
|
650
|
+
}
|
|
651
|
+
static fromObject(data) {
|
|
652
|
+
const message = new TransactionTimelineRequest({});
|
|
653
|
+
if (data.transactionId != null) {
|
|
654
|
+
message.transactionId = data.transactionId;
|
|
655
|
+
}
|
|
656
|
+
return message;
|
|
657
|
+
}
|
|
658
|
+
toObject() {
|
|
659
|
+
const data = {};
|
|
660
|
+
if (this.transactionId != null) {
|
|
661
|
+
data.transactionId = this.transactionId;
|
|
662
|
+
}
|
|
663
|
+
return data;
|
|
664
|
+
}
|
|
665
|
+
serialize(w) {
|
|
666
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
667
|
+
if (this.transactionId.length)
|
|
668
|
+
writer.writeString(1, this.transactionId);
|
|
669
|
+
if (!w)
|
|
670
|
+
return writer.getResultBuffer();
|
|
671
|
+
}
|
|
672
|
+
static deserialize(bytes) {
|
|
673
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionTimelineRequest();
|
|
674
|
+
while (reader.nextField()) {
|
|
675
|
+
if (reader.isEndGroup())
|
|
676
|
+
break;
|
|
677
|
+
switch (reader.getFieldNumber()) {
|
|
678
|
+
case 1:
|
|
679
|
+
message.transactionId = reader.readString();
|
|
680
|
+
break;
|
|
681
|
+
default: reader.skipField();
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
return message;
|
|
685
|
+
}
|
|
686
|
+
serializeBinary() {
|
|
687
|
+
return this.serialize();
|
|
688
|
+
}
|
|
689
|
+
static deserializeBinary(bytes) {
|
|
690
|
+
return TransactionTimelineRequest.deserialize(bytes);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
terminalTransactions.TransactionTimelineRequest = TransactionTimelineRequest;
|
|
694
|
+
class TerminalTransactionsFilter extends pb_1.Message {
|
|
695
|
+
#one_of_decls = [];
|
|
696
|
+
constructor(data) {
|
|
697
|
+
super();
|
|
698
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
699
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
700
|
+
if ("terminalId" in data && data.terminalId != undefined) {
|
|
701
|
+
this.terminalId = data.terminalId;
|
|
702
|
+
}
|
|
703
|
+
if ("businessId" in data && data.businessId != undefined) {
|
|
704
|
+
this.businessId = data.businessId;
|
|
705
|
+
}
|
|
706
|
+
if ("status" in data && data.status != undefined) {
|
|
707
|
+
this.status = data.status;
|
|
708
|
+
}
|
|
709
|
+
if ("dateFrom" in data && data.dateFrom != undefined) {
|
|
710
|
+
this.dateFrom = data.dateFrom;
|
|
711
|
+
}
|
|
712
|
+
if ("dateTo" in data && data.dateTo != undefined) {
|
|
713
|
+
this.dateTo = data.dateTo;
|
|
714
|
+
}
|
|
715
|
+
if ("limit" in data && data.limit != undefined) {
|
|
716
|
+
this.limit = data.limit;
|
|
717
|
+
}
|
|
718
|
+
if ("offset" in data && data.offset != undefined) {
|
|
719
|
+
this.offset = data.offset;
|
|
720
|
+
}
|
|
721
|
+
if ("sortBy" in data && data.sortBy != undefined) {
|
|
722
|
+
this.sortBy = data.sortBy;
|
|
723
|
+
}
|
|
724
|
+
if ("sortOrder" in data && data.sortOrder != undefined) {
|
|
725
|
+
this.sortOrder = data.sortOrder;
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
get terminalId() {
|
|
730
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
731
|
+
}
|
|
732
|
+
set terminalId(value) {
|
|
733
|
+
pb_1.Message.setField(this, 1, value);
|
|
734
|
+
}
|
|
735
|
+
get businessId() {
|
|
736
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
737
|
+
}
|
|
738
|
+
set businessId(value) {
|
|
739
|
+
pb_1.Message.setField(this, 2, value);
|
|
740
|
+
}
|
|
741
|
+
get status() {
|
|
742
|
+
return pb_1.Message.getFieldWithDefault(this, 3, TransactionStatus.STATUS_UNSPECIFIED);
|
|
743
|
+
}
|
|
744
|
+
set status(value) {
|
|
745
|
+
pb_1.Message.setField(this, 3, value);
|
|
746
|
+
}
|
|
747
|
+
get dateFrom() {
|
|
748
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
749
|
+
}
|
|
750
|
+
set dateFrom(value) {
|
|
751
|
+
pb_1.Message.setField(this, 4, value);
|
|
752
|
+
}
|
|
753
|
+
get dateTo() {
|
|
754
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
755
|
+
}
|
|
756
|
+
set dateTo(value) {
|
|
757
|
+
pb_1.Message.setField(this, 5, value);
|
|
758
|
+
}
|
|
759
|
+
get limit() {
|
|
760
|
+
return pb_1.Message.getFieldWithDefault(this, 6, 0);
|
|
761
|
+
}
|
|
762
|
+
set limit(value) {
|
|
763
|
+
pb_1.Message.setField(this, 6, value);
|
|
764
|
+
}
|
|
765
|
+
get offset() {
|
|
766
|
+
return pb_1.Message.getFieldWithDefault(this, 7, 0);
|
|
767
|
+
}
|
|
768
|
+
set offset(value) {
|
|
769
|
+
pb_1.Message.setField(this, 7, value);
|
|
770
|
+
}
|
|
771
|
+
get sortBy() {
|
|
772
|
+
return pb_1.Message.getFieldWithDefault(this, 8, "");
|
|
773
|
+
}
|
|
774
|
+
set sortBy(value) {
|
|
775
|
+
pb_1.Message.setField(this, 8, value);
|
|
776
|
+
}
|
|
777
|
+
get sortOrder() {
|
|
778
|
+
return pb_1.Message.getFieldWithDefault(this, 9, "");
|
|
779
|
+
}
|
|
780
|
+
set sortOrder(value) {
|
|
781
|
+
pb_1.Message.setField(this, 9, value);
|
|
782
|
+
}
|
|
783
|
+
static fromObject(data) {
|
|
784
|
+
const message = new TerminalTransactionsFilter({});
|
|
785
|
+
if (data.terminalId != null) {
|
|
786
|
+
message.terminalId = data.terminalId;
|
|
787
|
+
}
|
|
788
|
+
if (data.businessId != null) {
|
|
789
|
+
message.businessId = data.businessId;
|
|
790
|
+
}
|
|
791
|
+
if (data.status != null) {
|
|
792
|
+
message.status = data.status;
|
|
793
|
+
}
|
|
794
|
+
if (data.dateFrom != null) {
|
|
795
|
+
message.dateFrom = data.dateFrom;
|
|
796
|
+
}
|
|
797
|
+
if (data.dateTo != null) {
|
|
798
|
+
message.dateTo = data.dateTo;
|
|
799
|
+
}
|
|
800
|
+
if (data.limit != null) {
|
|
801
|
+
message.limit = data.limit;
|
|
802
|
+
}
|
|
803
|
+
if (data.offset != null) {
|
|
804
|
+
message.offset = data.offset;
|
|
805
|
+
}
|
|
806
|
+
if (data.sortBy != null) {
|
|
807
|
+
message.sortBy = data.sortBy;
|
|
808
|
+
}
|
|
809
|
+
if (data.sortOrder != null) {
|
|
810
|
+
message.sortOrder = data.sortOrder;
|
|
811
|
+
}
|
|
812
|
+
return message;
|
|
813
|
+
}
|
|
814
|
+
toObject() {
|
|
815
|
+
const data = {};
|
|
816
|
+
if (this.terminalId != null) {
|
|
817
|
+
data.terminalId = this.terminalId;
|
|
818
|
+
}
|
|
819
|
+
if (this.businessId != null) {
|
|
820
|
+
data.businessId = this.businessId;
|
|
821
|
+
}
|
|
822
|
+
if (this.status != null) {
|
|
823
|
+
data.status = this.status;
|
|
824
|
+
}
|
|
825
|
+
if (this.dateFrom != null) {
|
|
826
|
+
data.dateFrom = this.dateFrom;
|
|
827
|
+
}
|
|
828
|
+
if (this.dateTo != null) {
|
|
829
|
+
data.dateTo = this.dateTo;
|
|
830
|
+
}
|
|
831
|
+
if (this.limit != null) {
|
|
832
|
+
data.limit = this.limit;
|
|
833
|
+
}
|
|
834
|
+
if (this.offset != null) {
|
|
835
|
+
data.offset = this.offset;
|
|
836
|
+
}
|
|
837
|
+
if (this.sortBy != null) {
|
|
838
|
+
data.sortBy = this.sortBy;
|
|
839
|
+
}
|
|
840
|
+
if (this.sortOrder != null) {
|
|
841
|
+
data.sortOrder = this.sortOrder;
|
|
842
|
+
}
|
|
843
|
+
return data;
|
|
844
|
+
}
|
|
845
|
+
serialize(w) {
|
|
846
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
847
|
+
if (this.terminalId.length)
|
|
848
|
+
writer.writeString(1, this.terminalId);
|
|
849
|
+
if (this.businessId.length)
|
|
850
|
+
writer.writeString(2, this.businessId);
|
|
851
|
+
if (this.status != TransactionStatus.STATUS_UNSPECIFIED)
|
|
852
|
+
writer.writeEnum(3, this.status);
|
|
853
|
+
if (this.dateFrom.length)
|
|
854
|
+
writer.writeString(4, this.dateFrom);
|
|
855
|
+
if (this.dateTo.length)
|
|
856
|
+
writer.writeString(5, this.dateTo);
|
|
857
|
+
if (this.limit != 0)
|
|
858
|
+
writer.writeInt32(6, this.limit);
|
|
859
|
+
if (this.offset != 0)
|
|
860
|
+
writer.writeInt32(7, this.offset);
|
|
861
|
+
if (this.sortBy.length)
|
|
862
|
+
writer.writeString(8, this.sortBy);
|
|
863
|
+
if (this.sortOrder.length)
|
|
864
|
+
writer.writeString(9, this.sortOrder);
|
|
865
|
+
if (!w)
|
|
866
|
+
return writer.getResultBuffer();
|
|
867
|
+
}
|
|
868
|
+
static deserialize(bytes) {
|
|
869
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TerminalTransactionsFilter();
|
|
870
|
+
while (reader.nextField()) {
|
|
871
|
+
if (reader.isEndGroup())
|
|
872
|
+
break;
|
|
873
|
+
switch (reader.getFieldNumber()) {
|
|
874
|
+
case 1:
|
|
875
|
+
message.terminalId = reader.readString();
|
|
876
|
+
break;
|
|
877
|
+
case 2:
|
|
878
|
+
message.businessId = reader.readString();
|
|
879
|
+
break;
|
|
880
|
+
case 3:
|
|
881
|
+
message.status = reader.readEnum();
|
|
882
|
+
break;
|
|
883
|
+
case 4:
|
|
884
|
+
message.dateFrom = reader.readString();
|
|
885
|
+
break;
|
|
886
|
+
case 5:
|
|
887
|
+
message.dateTo = reader.readString();
|
|
888
|
+
break;
|
|
889
|
+
case 6:
|
|
890
|
+
message.limit = reader.readInt32();
|
|
891
|
+
break;
|
|
892
|
+
case 7:
|
|
893
|
+
message.offset = reader.readInt32();
|
|
894
|
+
break;
|
|
895
|
+
case 8:
|
|
896
|
+
message.sortBy = reader.readString();
|
|
897
|
+
break;
|
|
898
|
+
case 9:
|
|
899
|
+
message.sortOrder = reader.readString();
|
|
900
|
+
break;
|
|
901
|
+
default: reader.skipField();
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
return message;
|
|
905
|
+
}
|
|
906
|
+
serializeBinary() {
|
|
907
|
+
return this.serialize();
|
|
908
|
+
}
|
|
909
|
+
static deserializeBinary(bytes) {
|
|
910
|
+
return TerminalTransactionsFilter.deserialize(bytes);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
terminalTransactions.TerminalTransactionsFilter = TerminalTransactionsFilter;
|
|
914
|
+
class AllTransactionsFilter extends pb_1.Message {
|
|
915
|
+
#one_of_decls = [];
|
|
916
|
+
constructor(data) {
|
|
917
|
+
super();
|
|
918
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
919
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
920
|
+
if ("terminalId" in data && data.terminalId != undefined) {
|
|
921
|
+
this.terminalId = data.terminalId;
|
|
922
|
+
}
|
|
923
|
+
if ("businessId" in data && data.businessId != undefined) {
|
|
924
|
+
this.businessId = data.businessId;
|
|
925
|
+
}
|
|
926
|
+
if ("transactionType" in data && data.transactionType != undefined) {
|
|
927
|
+
this.transactionType = data.transactionType;
|
|
928
|
+
}
|
|
929
|
+
if ("status" in data && data.status != undefined) {
|
|
930
|
+
this.status = data.status;
|
|
931
|
+
}
|
|
932
|
+
if ("dateFrom" in data && data.dateFrom != undefined) {
|
|
933
|
+
this.dateFrom = data.dateFrom;
|
|
934
|
+
}
|
|
935
|
+
if ("dateTo" in data && data.dateTo != undefined) {
|
|
936
|
+
this.dateTo = data.dateTo;
|
|
937
|
+
}
|
|
938
|
+
if ("limit" in data && data.limit != undefined) {
|
|
939
|
+
this.limit = data.limit;
|
|
940
|
+
}
|
|
941
|
+
if ("offset" in data && data.offset != undefined) {
|
|
942
|
+
this.offset = data.offset;
|
|
943
|
+
}
|
|
944
|
+
if ("sortBy" in data && data.sortBy != undefined) {
|
|
945
|
+
this.sortBy = data.sortBy;
|
|
946
|
+
}
|
|
947
|
+
if ("sortOrder" in data && data.sortOrder != undefined) {
|
|
948
|
+
this.sortOrder = data.sortOrder;
|
|
949
|
+
}
|
|
950
|
+
if ("search" in data && data.search != undefined) {
|
|
951
|
+
this.search = data.search;
|
|
952
|
+
}
|
|
953
|
+
if ("mfbId" in data && data.mfbId != undefined) {
|
|
954
|
+
this.mfbId = data.mfbId;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
get terminalId() {
|
|
959
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
960
|
+
}
|
|
961
|
+
set terminalId(value) {
|
|
962
|
+
pb_1.Message.setField(this, 1, value);
|
|
963
|
+
}
|
|
964
|
+
get businessId() {
|
|
965
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
966
|
+
}
|
|
967
|
+
set businessId(value) {
|
|
968
|
+
pb_1.Message.setField(this, 2, value);
|
|
969
|
+
}
|
|
970
|
+
get transactionType() {
|
|
971
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
972
|
+
}
|
|
973
|
+
set transactionType(value) {
|
|
974
|
+
pb_1.Message.setField(this, 3, value);
|
|
975
|
+
}
|
|
976
|
+
get status() {
|
|
977
|
+
return pb_1.Message.getFieldWithDefault(this, 4, TransactionStatus.STATUS_UNSPECIFIED);
|
|
978
|
+
}
|
|
979
|
+
set status(value) {
|
|
980
|
+
pb_1.Message.setField(this, 4, value);
|
|
981
|
+
}
|
|
982
|
+
get dateFrom() {
|
|
983
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
984
|
+
}
|
|
985
|
+
set dateFrom(value) {
|
|
986
|
+
pb_1.Message.setField(this, 5, value);
|
|
987
|
+
}
|
|
988
|
+
get dateTo() {
|
|
989
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
990
|
+
}
|
|
991
|
+
set dateTo(value) {
|
|
992
|
+
pb_1.Message.setField(this, 6, value);
|
|
993
|
+
}
|
|
994
|
+
get limit() {
|
|
995
|
+
return pb_1.Message.getFieldWithDefault(this, 7, 0);
|
|
996
|
+
}
|
|
997
|
+
set limit(value) {
|
|
998
|
+
pb_1.Message.setField(this, 7, value);
|
|
999
|
+
}
|
|
1000
|
+
get offset() {
|
|
1001
|
+
return pb_1.Message.getFieldWithDefault(this, 8, 0);
|
|
1002
|
+
}
|
|
1003
|
+
set offset(value) {
|
|
1004
|
+
pb_1.Message.setField(this, 8, value);
|
|
1005
|
+
}
|
|
1006
|
+
get sortBy() {
|
|
1007
|
+
return pb_1.Message.getFieldWithDefault(this, 9, "");
|
|
1008
|
+
}
|
|
1009
|
+
set sortBy(value) {
|
|
1010
|
+
pb_1.Message.setField(this, 9, value);
|
|
1011
|
+
}
|
|
1012
|
+
get sortOrder() {
|
|
1013
|
+
return pb_1.Message.getFieldWithDefault(this, 10, "");
|
|
1014
|
+
}
|
|
1015
|
+
set sortOrder(value) {
|
|
1016
|
+
pb_1.Message.setField(this, 10, value);
|
|
1017
|
+
}
|
|
1018
|
+
get search() {
|
|
1019
|
+
return pb_1.Message.getFieldWithDefault(this, 11, "");
|
|
1020
|
+
}
|
|
1021
|
+
set search(value) {
|
|
1022
|
+
pb_1.Message.setField(this, 11, value);
|
|
1023
|
+
}
|
|
1024
|
+
get mfbId() {
|
|
1025
|
+
return pb_1.Message.getFieldWithDefault(this, 12, "");
|
|
1026
|
+
}
|
|
1027
|
+
set mfbId(value) {
|
|
1028
|
+
pb_1.Message.setField(this, 12, value);
|
|
1029
|
+
}
|
|
1030
|
+
static fromObject(data) {
|
|
1031
|
+
const message = new AllTransactionsFilter({});
|
|
1032
|
+
if (data.terminalId != null) {
|
|
1033
|
+
message.terminalId = data.terminalId;
|
|
1034
|
+
}
|
|
1035
|
+
if (data.businessId != null) {
|
|
1036
|
+
message.businessId = data.businessId;
|
|
1037
|
+
}
|
|
1038
|
+
if (data.transactionType != null) {
|
|
1039
|
+
message.transactionType = data.transactionType;
|
|
1040
|
+
}
|
|
1041
|
+
if (data.status != null) {
|
|
1042
|
+
message.status = data.status;
|
|
1043
|
+
}
|
|
1044
|
+
if (data.dateFrom != null) {
|
|
1045
|
+
message.dateFrom = data.dateFrom;
|
|
1046
|
+
}
|
|
1047
|
+
if (data.dateTo != null) {
|
|
1048
|
+
message.dateTo = data.dateTo;
|
|
1049
|
+
}
|
|
1050
|
+
if (data.limit != null) {
|
|
1051
|
+
message.limit = data.limit;
|
|
1052
|
+
}
|
|
1053
|
+
if (data.offset != null) {
|
|
1054
|
+
message.offset = data.offset;
|
|
1055
|
+
}
|
|
1056
|
+
if (data.sortBy != null) {
|
|
1057
|
+
message.sortBy = data.sortBy;
|
|
1058
|
+
}
|
|
1059
|
+
if (data.sortOrder != null) {
|
|
1060
|
+
message.sortOrder = data.sortOrder;
|
|
1061
|
+
}
|
|
1062
|
+
if (data.search != null) {
|
|
1063
|
+
message.search = data.search;
|
|
1064
|
+
}
|
|
1065
|
+
if (data.mfbId != null) {
|
|
1066
|
+
message.mfbId = data.mfbId;
|
|
1067
|
+
}
|
|
1068
|
+
return message;
|
|
1069
|
+
}
|
|
1070
|
+
toObject() {
|
|
1071
|
+
const data = {};
|
|
1072
|
+
if (this.terminalId != null) {
|
|
1073
|
+
data.terminalId = this.terminalId;
|
|
1074
|
+
}
|
|
1075
|
+
if (this.businessId != null) {
|
|
1076
|
+
data.businessId = this.businessId;
|
|
1077
|
+
}
|
|
1078
|
+
if (this.transactionType != null) {
|
|
1079
|
+
data.transactionType = this.transactionType;
|
|
1080
|
+
}
|
|
1081
|
+
if (this.status != null) {
|
|
1082
|
+
data.status = this.status;
|
|
1083
|
+
}
|
|
1084
|
+
if (this.dateFrom != null) {
|
|
1085
|
+
data.dateFrom = this.dateFrom;
|
|
1086
|
+
}
|
|
1087
|
+
if (this.dateTo != null) {
|
|
1088
|
+
data.dateTo = this.dateTo;
|
|
1089
|
+
}
|
|
1090
|
+
if (this.limit != null) {
|
|
1091
|
+
data.limit = this.limit;
|
|
1092
|
+
}
|
|
1093
|
+
if (this.offset != null) {
|
|
1094
|
+
data.offset = this.offset;
|
|
1095
|
+
}
|
|
1096
|
+
if (this.sortBy != null) {
|
|
1097
|
+
data.sortBy = this.sortBy;
|
|
1098
|
+
}
|
|
1099
|
+
if (this.sortOrder != null) {
|
|
1100
|
+
data.sortOrder = this.sortOrder;
|
|
1101
|
+
}
|
|
1102
|
+
if (this.search != null) {
|
|
1103
|
+
data.search = this.search;
|
|
1104
|
+
}
|
|
1105
|
+
if (this.mfbId != null) {
|
|
1106
|
+
data.mfbId = this.mfbId;
|
|
1107
|
+
}
|
|
1108
|
+
return data;
|
|
1109
|
+
}
|
|
1110
|
+
serialize(w) {
|
|
1111
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1112
|
+
if (this.terminalId.length)
|
|
1113
|
+
writer.writeString(1, this.terminalId);
|
|
1114
|
+
if (this.businessId.length)
|
|
1115
|
+
writer.writeString(2, this.businessId);
|
|
1116
|
+
if (this.transactionType.length)
|
|
1117
|
+
writer.writeString(3, this.transactionType);
|
|
1118
|
+
if (this.status != TransactionStatus.STATUS_UNSPECIFIED)
|
|
1119
|
+
writer.writeEnum(4, this.status);
|
|
1120
|
+
if (this.dateFrom.length)
|
|
1121
|
+
writer.writeString(5, this.dateFrom);
|
|
1122
|
+
if (this.dateTo.length)
|
|
1123
|
+
writer.writeString(6, this.dateTo);
|
|
1124
|
+
if (this.limit != 0)
|
|
1125
|
+
writer.writeInt32(7, this.limit);
|
|
1126
|
+
if (this.offset != 0)
|
|
1127
|
+
writer.writeInt32(8, this.offset);
|
|
1128
|
+
if (this.sortBy.length)
|
|
1129
|
+
writer.writeString(9, this.sortBy);
|
|
1130
|
+
if (this.sortOrder.length)
|
|
1131
|
+
writer.writeString(10, this.sortOrder);
|
|
1132
|
+
if (this.search.length)
|
|
1133
|
+
writer.writeString(11, this.search);
|
|
1134
|
+
if (this.mfbId.length)
|
|
1135
|
+
writer.writeString(12, this.mfbId);
|
|
1136
|
+
if (!w)
|
|
1137
|
+
return writer.getResultBuffer();
|
|
1138
|
+
}
|
|
1139
|
+
static deserialize(bytes) {
|
|
1140
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AllTransactionsFilter();
|
|
1141
|
+
while (reader.nextField()) {
|
|
1142
|
+
if (reader.isEndGroup())
|
|
1143
|
+
break;
|
|
1144
|
+
switch (reader.getFieldNumber()) {
|
|
1145
|
+
case 1:
|
|
1146
|
+
message.terminalId = reader.readString();
|
|
1147
|
+
break;
|
|
1148
|
+
case 2:
|
|
1149
|
+
message.businessId = reader.readString();
|
|
1150
|
+
break;
|
|
1151
|
+
case 3:
|
|
1152
|
+
message.transactionType = reader.readString();
|
|
1153
|
+
break;
|
|
1154
|
+
case 4:
|
|
1155
|
+
message.status = reader.readEnum();
|
|
1156
|
+
break;
|
|
1157
|
+
case 5:
|
|
1158
|
+
message.dateFrom = reader.readString();
|
|
1159
|
+
break;
|
|
1160
|
+
case 6:
|
|
1161
|
+
message.dateTo = reader.readString();
|
|
1162
|
+
break;
|
|
1163
|
+
case 7:
|
|
1164
|
+
message.limit = reader.readInt32();
|
|
1165
|
+
break;
|
|
1166
|
+
case 8:
|
|
1167
|
+
message.offset = reader.readInt32();
|
|
1168
|
+
break;
|
|
1169
|
+
case 9:
|
|
1170
|
+
message.sortBy = reader.readString();
|
|
1171
|
+
break;
|
|
1172
|
+
case 10:
|
|
1173
|
+
message.sortOrder = reader.readString();
|
|
1174
|
+
break;
|
|
1175
|
+
case 11:
|
|
1176
|
+
message.search = reader.readString();
|
|
1177
|
+
break;
|
|
1178
|
+
case 12:
|
|
1179
|
+
message.mfbId = reader.readString();
|
|
1180
|
+
break;
|
|
1181
|
+
default: reader.skipField();
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
return message;
|
|
1185
|
+
}
|
|
1186
|
+
serializeBinary() {
|
|
1187
|
+
return this.serialize();
|
|
1188
|
+
}
|
|
1189
|
+
static deserializeBinary(bytes) {
|
|
1190
|
+
return AllTransactionsFilter.deserialize(bytes);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
terminalTransactions.AllTransactionsFilter = AllTransactionsFilter;
|
|
1194
|
+
class TransactionDetailsRequest extends pb_1.Message {
|
|
1195
|
+
#one_of_decls = [];
|
|
1196
|
+
constructor(data) {
|
|
1197
|
+
super();
|
|
1198
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1199
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1200
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
1201
|
+
this.transactionId = data.transactionId;
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
get transactionId() {
|
|
1206
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
1207
|
+
}
|
|
1208
|
+
set transactionId(value) {
|
|
1209
|
+
pb_1.Message.setField(this, 1, value);
|
|
1210
|
+
}
|
|
1211
|
+
static fromObject(data) {
|
|
1212
|
+
const message = new TransactionDetailsRequest({});
|
|
1213
|
+
if (data.transactionId != null) {
|
|
1214
|
+
message.transactionId = data.transactionId;
|
|
1215
|
+
}
|
|
1216
|
+
return message;
|
|
1217
|
+
}
|
|
1218
|
+
toObject() {
|
|
1219
|
+
const data = {};
|
|
1220
|
+
if (this.transactionId != null) {
|
|
1221
|
+
data.transactionId = this.transactionId;
|
|
1222
|
+
}
|
|
1223
|
+
return data;
|
|
1224
|
+
}
|
|
1225
|
+
serialize(w) {
|
|
1226
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1227
|
+
if (this.transactionId.length)
|
|
1228
|
+
writer.writeString(1, this.transactionId);
|
|
1229
|
+
if (!w)
|
|
1230
|
+
return writer.getResultBuffer();
|
|
1231
|
+
}
|
|
1232
|
+
static deserialize(bytes) {
|
|
1233
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionDetailsRequest();
|
|
1234
|
+
while (reader.nextField()) {
|
|
1235
|
+
if (reader.isEndGroup())
|
|
1236
|
+
break;
|
|
1237
|
+
switch (reader.getFieldNumber()) {
|
|
1238
|
+
case 1:
|
|
1239
|
+
message.transactionId = reader.readString();
|
|
1240
|
+
break;
|
|
1241
|
+
default: reader.skipField();
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
return message;
|
|
1245
|
+
}
|
|
1246
|
+
serializeBinary() {
|
|
1247
|
+
return this.serialize();
|
|
1248
|
+
}
|
|
1249
|
+
static deserializeBinary(bytes) {
|
|
1250
|
+
return TransactionDetailsRequest.deserialize(bytes);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
terminalTransactions.TransactionDetailsRequest = TransactionDetailsRequest;
|
|
1254
|
+
class TransactionDetailsResponse extends pb_1.Message {
|
|
1255
|
+
#one_of_decls = [];
|
|
1256
|
+
constructor(data) {
|
|
1257
|
+
super();
|
|
1258
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1259
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1260
|
+
if ("success" in data && data.success != undefined) {
|
|
1261
|
+
this.success = data.success;
|
|
1262
|
+
}
|
|
1263
|
+
if ("transaction" in data && data.transaction != undefined) {
|
|
1264
|
+
this.transaction = data.transaction;
|
|
1265
|
+
}
|
|
1266
|
+
if ("timeline" in data && data.timeline != undefined) {
|
|
1267
|
+
this.timeline = data.timeline;
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
get success() {
|
|
1272
|
+
return pb_1.Message.getFieldWithDefault(this, 1, false);
|
|
1273
|
+
}
|
|
1274
|
+
set success(value) {
|
|
1275
|
+
pb_1.Message.setField(this, 1, value);
|
|
1276
|
+
}
|
|
1277
|
+
get transaction() {
|
|
1278
|
+
return pb_1.Message.getWrapperField(this, TransactionSession, 2);
|
|
1279
|
+
}
|
|
1280
|
+
set transaction(value) {
|
|
1281
|
+
pb_1.Message.setWrapperField(this, 2, value);
|
|
1282
|
+
}
|
|
1283
|
+
get hasTransaction() {
|
|
1284
|
+
return pb_1.Message.getField(this, 2) != null;
|
|
1285
|
+
}
|
|
1286
|
+
get timeline() {
|
|
1287
|
+
return pb_1.Message.getWrapperField(this, TransactionTimeline, 3);
|
|
1288
|
+
}
|
|
1289
|
+
set timeline(value) {
|
|
1290
|
+
pb_1.Message.setWrapperField(this, 3, value);
|
|
1291
|
+
}
|
|
1292
|
+
get hasTimeline() {
|
|
1293
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
1294
|
+
}
|
|
1295
|
+
static fromObject(data) {
|
|
1296
|
+
const message = new TransactionDetailsResponse({});
|
|
1297
|
+
if (data.success != null) {
|
|
1298
|
+
message.success = data.success;
|
|
1299
|
+
}
|
|
1300
|
+
if (data.transaction != null) {
|
|
1301
|
+
message.transaction = TransactionSession.fromObject(data.transaction);
|
|
1302
|
+
}
|
|
1303
|
+
if (data.timeline != null) {
|
|
1304
|
+
message.timeline = TransactionTimeline.fromObject(data.timeline);
|
|
1305
|
+
}
|
|
1306
|
+
return message;
|
|
1307
|
+
}
|
|
1308
|
+
toObject() {
|
|
1309
|
+
const data = {};
|
|
1310
|
+
if (this.success != null) {
|
|
1311
|
+
data.success = this.success;
|
|
1312
|
+
}
|
|
1313
|
+
if (this.transaction != null) {
|
|
1314
|
+
data.transaction = this.transaction.toObject();
|
|
1315
|
+
}
|
|
1316
|
+
if (this.timeline != null) {
|
|
1317
|
+
data.timeline = this.timeline.toObject();
|
|
1318
|
+
}
|
|
1319
|
+
return data;
|
|
1320
|
+
}
|
|
1321
|
+
serialize(w) {
|
|
1322
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1323
|
+
if (this.success != false)
|
|
1324
|
+
writer.writeBool(1, this.success);
|
|
1325
|
+
if (this.hasTransaction)
|
|
1326
|
+
writer.writeMessage(2, this.transaction, () => this.transaction.serialize(writer));
|
|
1327
|
+
if (this.hasTimeline)
|
|
1328
|
+
writer.writeMessage(3, this.timeline, () => this.timeline.serialize(writer));
|
|
1329
|
+
if (!w)
|
|
1330
|
+
return writer.getResultBuffer();
|
|
1331
|
+
}
|
|
1332
|
+
static deserialize(bytes) {
|
|
1333
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionDetailsResponse();
|
|
1334
|
+
while (reader.nextField()) {
|
|
1335
|
+
if (reader.isEndGroup())
|
|
1336
|
+
break;
|
|
1337
|
+
switch (reader.getFieldNumber()) {
|
|
1338
|
+
case 1:
|
|
1339
|
+
message.success = reader.readBool();
|
|
1340
|
+
break;
|
|
1341
|
+
case 2:
|
|
1342
|
+
reader.readMessage(message.transaction, () => message.transaction = TransactionSession.deserialize(reader));
|
|
1343
|
+
break;
|
|
1344
|
+
case 3:
|
|
1345
|
+
reader.readMessage(message.timeline, () => message.timeline = TransactionTimeline.deserialize(reader));
|
|
1346
|
+
break;
|
|
1347
|
+
default: reader.skipField();
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
return message;
|
|
1351
|
+
}
|
|
1352
|
+
serializeBinary() {
|
|
1353
|
+
return this.serialize();
|
|
1354
|
+
}
|
|
1355
|
+
static deserializeBinary(bytes) {
|
|
1356
|
+
return TransactionDetailsResponse.deserialize(bytes);
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
terminalTransactions.TransactionDetailsResponse = TransactionDetailsResponse;
|
|
1360
|
+
class TransactionResult extends pb_1.Message {
|
|
1361
|
+
#one_of_decls = [];
|
|
1362
|
+
constructor(data) {
|
|
1363
|
+
super();
|
|
1364
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [10], this.#one_of_decls);
|
|
1365
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1366
|
+
if ("success" in data && data.success != undefined) {
|
|
1367
|
+
this.success = data.success;
|
|
1368
|
+
}
|
|
1369
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
1370
|
+
this.transactionId = data.transactionId;
|
|
1371
|
+
}
|
|
1372
|
+
if ("status" in data && data.status != undefined) {
|
|
1373
|
+
this.status = data.status;
|
|
1374
|
+
}
|
|
1375
|
+
if ("currentStep" in data && data.currentStep != undefined) {
|
|
1376
|
+
this.currentStep = data.currentStep;
|
|
1377
|
+
}
|
|
1378
|
+
if ("message" in data && data.message != undefined) {
|
|
1379
|
+
this.message = data.message;
|
|
1380
|
+
}
|
|
1381
|
+
if ("reference" in data && data.reference != undefined) {
|
|
1382
|
+
this.reference = data.reference;
|
|
1383
|
+
}
|
|
1384
|
+
if ("authorizationCode" in data && data.authorizationCode != undefined) {
|
|
1385
|
+
this.authorizationCode = data.authorizationCode;
|
|
1386
|
+
}
|
|
1387
|
+
if ("processorReference" in data && data.processorReference != undefined) {
|
|
1388
|
+
this.processorReference = data.processorReference;
|
|
1389
|
+
}
|
|
1390
|
+
if ("session" in data && data.session != undefined) {
|
|
1391
|
+
this.session = data.session;
|
|
1392
|
+
}
|
|
1393
|
+
if ("errors" in data && data.errors != undefined) {
|
|
1394
|
+
this.errors = data.errors;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
get success() {
|
|
1399
|
+
return pb_1.Message.getFieldWithDefault(this, 1, false);
|
|
1400
|
+
}
|
|
1401
|
+
set success(value) {
|
|
1402
|
+
pb_1.Message.setField(this, 1, value);
|
|
1403
|
+
}
|
|
1404
|
+
get transactionId() {
|
|
1405
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1406
|
+
}
|
|
1407
|
+
set transactionId(value) {
|
|
1408
|
+
pb_1.Message.setField(this, 2, value);
|
|
1409
|
+
}
|
|
1410
|
+
get status() {
|
|
1411
|
+
return pb_1.Message.getFieldWithDefault(this, 3, TransactionStatus.STATUS_UNSPECIFIED);
|
|
1412
|
+
}
|
|
1413
|
+
set status(value) {
|
|
1414
|
+
pb_1.Message.setField(this, 3, value);
|
|
1415
|
+
}
|
|
1416
|
+
get currentStep() {
|
|
1417
|
+
return pb_1.Message.getFieldWithDefault(this, 4, TransactionStep.STEP_UNSPECIFIED);
|
|
1418
|
+
}
|
|
1419
|
+
set currentStep(value) {
|
|
1420
|
+
pb_1.Message.setField(this, 4, value);
|
|
1421
|
+
}
|
|
1422
|
+
get message() {
|
|
1423
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
1424
|
+
}
|
|
1425
|
+
set message(value) {
|
|
1426
|
+
pb_1.Message.setField(this, 5, value);
|
|
1427
|
+
}
|
|
1428
|
+
get reference() {
|
|
1429
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
1430
|
+
}
|
|
1431
|
+
set reference(value) {
|
|
1432
|
+
pb_1.Message.setField(this, 6, value);
|
|
1433
|
+
}
|
|
1434
|
+
get authorizationCode() {
|
|
1435
|
+
return pb_1.Message.getFieldWithDefault(this, 7, "");
|
|
1436
|
+
}
|
|
1437
|
+
set authorizationCode(value) {
|
|
1438
|
+
pb_1.Message.setField(this, 7, value);
|
|
1439
|
+
}
|
|
1440
|
+
get processorReference() {
|
|
1441
|
+
return pb_1.Message.getFieldWithDefault(this, 8, "");
|
|
1442
|
+
}
|
|
1443
|
+
set processorReference(value) {
|
|
1444
|
+
pb_1.Message.setField(this, 8, value);
|
|
1445
|
+
}
|
|
1446
|
+
get session() {
|
|
1447
|
+
return pb_1.Message.getWrapperField(this, TransactionSession, 9);
|
|
1448
|
+
}
|
|
1449
|
+
set session(value) {
|
|
1450
|
+
pb_1.Message.setWrapperField(this, 9, value);
|
|
1451
|
+
}
|
|
1452
|
+
get hasSession() {
|
|
1453
|
+
return pb_1.Message.getField(this, 9) != null;
|
|
1454
|
+
}
|
|
1455
|
+
get errors() {
|
|
1456
|
+
return pb_1.Message.getRepeatedWrapperField(this, ValidationError, 10);
|
|
1457
|
+
}
|
|
1458
|
+
set errors(value) {
|
|
1459
|
+
pb_1.Message.setRepeatedWrapperField(this, 10, value);
|
|
1460
|
+
}
|
|
1461
|
+
static fromObject(data) {
|
|
1462
|
+
const message = new TransactionResult({});
|
|
1463
|
+
if (data.success != null) {
|
|
1464
|
+
message.success = data.success;
|
|
1465
|
+
}
|
|
1466
|
+
if (data.transactionId != null) {
|
|
1467
|
+
message.transactionId = data.transactionId;
|
|
1468
|
+
}
|
|
1469
|
+
if (data.status != null) {
|
|
1470
|
+
message.status = data.status;
|
|
1471
|
+
}
|
|
1472
|
+
if (data.currentStep != null) {
|
|
1473
|
+
message.currentStep = data.currentStep;
|
|
1474
|
+
}
|
|
1475
|
+
if (data.message != null) {
|
|
1476
|
+
message.message = data.message;
|
|
1477
|
+
}
|
|
1478
|
+
if (data.reference != null) {
|
|
1479
|
+
message.reference = data.reference;
|
|
1480
|
+
}
|
|
1481
|
+
if (data.authorizationCode != null) {
|
|
1482
|
+
message.authorizationCode = data.authorizationCode;
|
|
1483
|
+
}
|
|
1484
|
+
if (data.processorReference != null) {
|
|
1485
|
+
message.processorReference = data.processorReference;
|
|
1486
|
+
}
|
|
1487
|
+
if (data.session != null) {
|
|
1488
|
+
message.session = TransactionSession.fromObject(data.session);
|
|
1489
|
+
}
|
|
1490
|
+
if (data.errors != null) {
|
|
1491
|
+
message.errors = data.errors.map(item => ValidationError.fromObject(item));
|
|
1492
|
+
}
|
|
1493
|
+
return message;
|
|
1494
|
+
}
|
|
1495
|
+
toObject() {
|
|
1496
|
+
const data = {};
|
|
1497
|
+
if (this.success != null) {
|
|
1498
|
+
data.success = this.success;
|
|
1499
|
+
}
|
|
1500
|
+
if (this.transactionId != null) {
|
|
1501
|
+
data.transactionId = this.transactionId;
|
|
1502
|
+
}
|
|
1503
|
+
if (this.status != null) {
|
|
1504
|
+
data.status = this.status;
|
|
1505
|
+
}
|
|
1506
|
+
if (this.currentStep != null) {
|
|
1507
|
+
data.currentStep = this.currentStep;
|
|
1508
|
+
}
|
|
1509
|
+
if (this.message != null) {
|
|
1510
|
+
data.message = this.message;
|
|
1511
|
+
}
|
|
1512
|
+
if (this.reference != null) {
|
|
1513
|
+
data.reference = this.reference;
|
|
1514
|
+
}
|
|
1515
|
+
if (this.authorizationCode != null) {
|
|
1516
|
+
data.authorizationCode = this.authorizationCode;
|
|
1517
|
+
}
|
|
1518
|
+
if (this.processorReference != null) {
|
|
1519
|
+
data.processorReference = this.processorReference;
|
|
1520
|
+
}
|
|
1521
|
+
if (this.session != null) {
|
|
1522
|
+
data.session = this.session.toObject();
|
|
1523
|
+
}
|
|
1524
|
+
if (this.errors != null) {
|
|
1525
|
+
data.errors = this.errors.map((item) => item.toObject());
|
|
1526
|
+
}
|
|
1527
|
+
return data;
|
|
1528
|
+
}
|
|
1529
|
+
serialize(w) {
|
|
1530
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1531
|
+
if (this.success != false)
|
|
1532
|
+
writer.writeBool(1, this.success);
|
|
1533
|
+
if (this.transactionId.length)
|
|
1534
|
+
writer.writeString(2, this.transactionId);
|
|
1535
|
+
if (this.status != TransactionStatus.STATUS_UNSPECIFIED)
|
|
1536
|
+
writer.writeEnum(3, this.status);
|
|
1537
|
+
if (this.currentStep != TransactionStep.STEP_UNSPECIFIED)
|
|
1538
|
+
writer.writeEnum(4, this.currentStep);
|
|
1539
|
+
if (this.message.length)
|
|
1540
|
+
writer.writeString(5, this.message);
|
|
1541
|
+
if (this.reference.length)
|
|
1542
|
+
writer.writeString(6, this.reference);
|
|
1543
|
+
if (this.authorizationCode.length)
|
|
1544
|
+
writer.writeString(7, this.authorizationCode);
|
|
1545
|
+
if (this.processorReference.length)
|
|
1546
|
+
writer.writeString(8, this.processorReference);
|
|
1547
|
+
if (this.hasSession)
|
|
1548
|
+
writer.writeMessage(9, this.session, () => this.session.serialize(writer));
|
|
1549
|
+
if (this.errors.length)
|
|
1550
|
+
writer.writeRepeatedMessage(10, this.errors, (item) => item.serialize(writer));
|
|
1551
|
+
if (!w)
|
|
1552
|
+
return writer.getResultBuffer();
|
|
1553
|
+
}
|
|
1554
|
+
static deserialize(bytes) {
|
|
1555
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionResult();
|
|
1556
|
+
while (reader.nextField()) {
|
|
1557
|
+
if (reader.isEndGroup())
|
|
1558
|
+
break;
|
|
1559
|
+
switch (reader.getFieldNumber()) {
|
|
1560
|
+
case 1:
|
|
1561
|
+
message.success = reader.readBool();
|
|
1562
|
+
break;
|
|
1563
|
+
case 2:
|
|
1564
|
+
message.transactionId = reader.readString();
|
|
1565
|
+
break;
|
|
1566
|
+
case 3:
|
|
1567
|
+
message.status = reader.readEnum();
|
|
1568
|
+
break;
|
|
1569
|
+
case 4:
|
|
1570
|
+
message.currentStep = reader.readEnum();
|
|
1571
|
+
break;
|
|
1572
|
+
case 5:
|
|
1573
|
+
message.message = reader.readString();
|
|
1574
|
+
break;
|
|
1575
|
+
case 6:
|
|
1576
|
+
message.reference = reader.readString();
|
|
1577
|
+
break;
|
|
1578
|
+
case 7:
|
|
1579
|
+
message.authorizationCode = reader.readString();
|
|
1580
|
+
break;
|
|
1581
|
+
case 8:
|
|
1582
|
+
message.processorReference = reader.readString();
|
|
1583
|
+
break;
|
|
1584
|
+
case 9:
|
|
1585
|
+
reader.readMessage(message.session, () => message.session = TransactionSession.deserialize(reader));
|
|
1586
|
+
break;
|
|
1587
|
+
case 10:
|
|
1588
|
+
reader.readMessage(message.errors, () => pb_1.Message.addToRepeatedWrapperField(message, 10, ValidationError.deserialize(reader), ValidationError));
|
|
1589
|
+
break;
|
|
1590
|
+
default: reader.skipField();
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
return message;
|
|
1594
|
+
}
|
|
1595
|
+
serializeBinary() {
|
|
1596
|
+
return this.serialize();
|
|
1597
|
+
}
|
|
1598
|
+
static deserializeBinary(bytes) {
|
|
1599
|
+
return TransactionResult.deserialize(bytes);
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
terminalTransactions.TransactionResult = TransactionResult;
|
|
1603
|
+
class TransactionTimeline extends pb_1.Message {
|
|
1604
|
+
#one_of_decls = [];
|
|
1605
|
+
constructor(data) {
|
|
1606
|
+
super();
|
|
1607
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls);
|
|
1608
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1609
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
1610
|
+
this.transactionId = data.transactionId;
|
|
1611
|
+
}
|
|
1612
|
+
if ("session" in data && data.session != undefined) {
|
|
1613
|
+
this.session = data.session;
|
|
1614
|
+
}
|
|
1615
|
+
if ("events" in data && data.events != undefined) {
|
|
1616
|
+
this.events = data.events;
|
|
1617
|
+
}
|
|
1618
|
+
if ("eventCount" in data && data.eventCount != undefined) {
|
|
1619
|
+
this.eventCount = data.eventCount;
|
|
1620
|
+
}
|
|
1621
|
+
if ("createdAt" in data && data.createdAt != undefined) {
|
|
1622
|
+
this.createdAt = data.createdAt;
|
|
1623
|
+
}
|
|
1624
|
+
if ("updatedAt" in data && data.updatedAt != undefined) {
|
|
1625
|
+
this.updatedAt = data.updatedAt;
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
get transactionId() {
|
|
1630
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
1631
|
+
}
|
|
1632
|
+
set transactionId(value) {
|
|
1633
|
+
pb_1.Message.setField(this, 1, value);
|
|
1634
|
+
}
|
|
1635
|
+
get session() {
|
|
1636
|
+
return pb_1.Message.getWrapperField(this, TransactionSession, 2);
|
|
1637
|
+
}
|
|
1638
|
+
set session(value) {
|
|
1639
|
+
pb_1.Message.setWrapperField(this, 2, value);
|
|
1640
|
+
}
|
|
1641
|
+
get hasSession() {
|
|
1642
|
+
return pb_1.Message.getField(this, 2) != null;
|
|
1643
|
+
}
|
|
1644
|
+
get events() {
|
|
1645
|
+
return pb_1.Message.getRepeatedWrapperField(this, AuditEvent, 3);
|
|
1646
|
+
}
|
|
1647
|
+
set events(value) {
|
|
1648
|
+
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
|
1649
|
+
}
|
|
1650
|
+
get eventCount() {
|
|
1651
|
+
return pb_1.Message.getFieldWithDefault(this, 4, 0);
|
|
1652
|
+
}
|
|
1653
|
+
set eventCount(value) {
|
|
1654
|
+
pb_1.Message.setField(this, 4, value);
|
|
1655
|
+
}
|
|
1656
|
+
get createdAt() {
|
|
1657
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
1658
|
+
}
|
|
1659
|
+
set createdAt(value) {
|
|
1660
|
+
pb_1.Message.setField(this, 5, value);
|
|
1661
|
+
}
|
|
1662
|
+
get updatedAt() {
|
|
1663
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
1664
|
+
}
|
|
1665
|
+
set updatedAt(value) {
|
|
1666
|
+
pb_1.Message.setField(this, 6, value);
|
|
1667
|
+
}
|
|
1668
|
+
static fromObject(data) {
|
|
1669
|
+
const message = new TransactionTimeline({});
|
|
1670
|
+
if (data.transactionId != null) {
|
|
1671
|
+
message.transactionId = data.transactionId;
|
|
1672
|
+
}
|
|
1673
|
+
if (data.session != null) {
|
|
1674
|
+
message.session = TransactionSession.fromObject(data.session);
|
|
1675
|
+
}
|
|
1676
|
+
if (data.events != null) {
|
|
1677
|
+
message.events = data.events.map(item => AuditEvent.fromObject(item));
|
|
1678
|
+
}
|
|
1679
|
+
if (data.eventCount != null) {
|
|
1680
|
+
message.eventCount = data.eventCount;
|
|
1681
|
+
}
|
|
1682
|
+
if (data.createdAt != null) {
|
|
1683
|
+
message.createdAt = data.createdAt;
|
|
1684
|
+
}
|
|
1685
|
+
if (data.updatedAt != null) {
|
|
1686
|
+
message.updatedAt = data.updatedAt;
|
|
1687
|
+
}
|
|
1688
|
+
return message;
|
|
1689
|
+
}
|
|
1690
|
+
toObject() {
|
|
1691
|
+
const data = {};
|
|
1692
|
+
if (this.transactionId != null) {
|
|
1693
|
+
data.transactionId = this.transactionId;
|
|
1694
|
+
}
|
|
1695
|
+
if (this.session != null) {
|
|
1696
|
+
data.session = this.session.toObject();
|
|
1697
|
+
}
|
|
1698
|
+
if (this.events != null) {
|
|
1699
|
+
data.events = this.events.map((item) => item.toObject());
|
|
1700
|
+
}
|
|
1701
|
+
if (this.eventCount != null) {
|
|
1702
|
+
data.eventCount = this.eventCount;
|
|
1703
|
+
}
|
|
1704
|
+
if (this.createdAt != null) {
|
|
1705
|
+
data.createdAt = this.createdAt;
|
|
1706
|
+
}
|
|
1707
|
+
if (this.updatedAt != null) {
|
|
1708
|
+
data.updatedAt = this.updatedAt;
|
|
1709
|
+
}
|
|
1710
|
+
return data;
|
|
1711
|
+
}
|
|
1712
|
+
serialize(w) {
|
|
1713
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1714
|
+
if (this.transactionId.length)
|
|
1715
|
+
writer.writeString(1, this.transactionId);
|
|
1716
|
+
if (this.hasSession)
|
|
1717
|
+
writer.writeMessage(2, this.session, () => this.session.serialize(writer));
|
|
1718
|
+
if (this.events.length)
|
|
1719
|
+
writer.writeRepeatedMessage(3, this.events, (item) => item.serialize(writer));
|
|
1720
|
+
if (this.eventCount != 0)
|
|
1721
|
+
writer.writeInt32(4, this.eventCount);
|
|
1722
|
+
if (this.createdAt.length)
|
|
1723
|
+
writer.writeString(5, this.createdAt);
|
|
1724
|
+
if (this.updatedAt.length)
|
|
1725
|
+
writer.writeString(6, this.updatedAt);
|
|
1726
|
+
if (!w)
|
|
1727
|
+
return writer.getResultBuffer();
|
|
1728
|
+
}
|
|
1729
|
+
static deserialize(bytes) {
|
|
1730
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionTimeline();
|
|
1731
|
+
while (reader.nextField()) {
|
|
1732
|
+
if (reader.isEndGroup())
|
|
1733
|
+
break;
|
|
1734
|
+
switch (reader.getFieldNumber()) {
|
|
1735
|
+
case 1:
|
|
1736
|
+
message.transactionId = reader.readString();
|
|
1737
|
+
break;
|
|
1738
|
+
case 2:
|
|
1739
|
+
reader.readMessage(message.session, () => message.session = TransactionSession.deserialize(reader));
|
|
1740
|
+
break;
|
|
1741
|
+
case 3:
|
|
1742
|
+
reader.readMessage(message.events, () => pb_1.Message.addToRepeatedWrapperField(message, 3, AuditEvent.deserialize(reader), AuditEvent));
|
|
1743
|
+
break;
|
|
1744
|
+
case 4:
|
|
1745
|
+
message.eventCount = reader.readInt32();
|
|
1746
|
+
break;
|
|
1747
|
+
case 5:
|
|
1748
|
+
message.createdAt = reader.readString();
|
|
1749
|
+
break;
|
|
1750
|
+
case 6:
|
|
1751
|
+
message.updatedAt = reader.readString();
|
|
1752
|
+
break;
|
|
1753
|
+
default: reader.skipField();
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
return message;
|
|
1757
|
+
}
|
|
1758
|
+
serializeBinary() {
|
|
1759
|
+
return this.serialize();
|
|
1760
|
+
}
|
|
1761
|
+
static deserializeBinary(bytes) {
|
|
1762
|
+
return TransactionTimeline.deserialize(bytes);
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
terminalTransactions.TransactionTimeline = TransactionTimeline;
|
|
1766
|
+
class TerminalTransactionsResponse extends pb_1.Message {
|
|
1767
|
+
#one_of_decls = [];
|
|
1768
|
+
constructor(data) {
|
|
1769
|
+
super();
|
|
1770
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
|
|
1771
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1772
|
+
if ("transactions" in data && data.transactions != undefined) {
|
|
1773
|
+
this.transactions = data.transactions;
|
|
1774
|
+
}
|
|
1775
|
+
if ("totalCount" in data && data.totalCount != undefined) {
|
|
1776
|
+
this.totalCount = data.totalCount;
|
|
1777
|
+
}
|
|
1778
|
+
if ("pageCount" in data && data.pageCount != undefined) {
|
|
1779
|
+
this.pageCount = data.pageCount;
|
|
1780
|
+
}
|
|
1781
|
+
if ("currentPage" in data && data.currentPage != undefined) {
|
|
1782
|
+
this.currentPage = data.currentPage;
|
|
1783
|
+
}
|
|
1784
|
+
if ("hasNextPage" in data && data.hasNextPage != undefined) {
|
|
1785
|
+
this.hasNextPage = data.hasNextPage;
|
|
1786
|
+
}
|
|
1787
|
+
if ("hasPreviousPage" in data && data.hasPreviousPage != undefined) {
|
|
1788
|
+
this.hasPreviousPage = data.hasPreviousPage;
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
get transactions() {
|
|
1793
|
+
return pb_1.Message.getRepeatedWrapperField(this, TransactionSession, 1);
|
|
1794
|
+
}
|
|
1795
|
+
set transactions(value) {
|
|
1796
|
+
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
|
1797
|
+
}
|
|
1798
|
+
get totalCount() {
|
|
1799
|
+
return pb_1.Message.getFieldWithDefault(this, 2, 0);
|
|
1800
|
+
}
|
|
1801
|
+
set totalCount(value) {
|
|
1802
|
+
pb_1.Message.setField(this, 2, value);
|
|
1803
|
+
}
|
|
1804
|
+
get pageCount() {
|
|
1805
|
+
return pb_1.Message.getFieldWithDefault(this, 3, 0);
|
|
1806
|
+
}
|
|
1807
|
+
set pageCount(value) {
|
|
1808
|
+
pb_1.Message.setField(this, 3, value);
|
|
1809
|
+
}
|
|
1810
|
+
get currentPage() {
|
|
1811
|
+
return pb_1.Message.getFieldWithDefault(this, 4, 0);
|
|
1812
|
+
}
|
|
1813
|
+
set currentPage(value) {
|
|
1814
|
+
pb_1.Message.setField(this, 4, value);
|
|
1815
|
+
}
|
|
1816
|
+
get hasNextPage() {
|
|
1817
|
+
return pb_1.Message.getFieldWithDefault(this, 5, false);
|
|
1818
|
+
}
|
|
1819
|
+
set hasNextPage(value) {
|
|
1820
|
+
pb_1.Message.setField(this, 5, value);
|
|
1821
|
+
}
|
|
1822
|
+
get hasPreviousPage() {
|
|
1823
|
+
return pb_1.Message.getFieldWithDefault(this, 6, false);
|
|
1824
|
+
}
|
|
1825
|
+
set hasPreviousPage(value) {
|
|
1826
|
+
pb_1.Message.setField(this, 6, value);
|
|
1827
|
+
}
|
|
1828
|
+
static fromObject(data) {
|
|
1829
|
+
const message = new TerminalTransactionsResponse({});
|
|
1830
|
+
if (data.transactions != null) {
|
|
1831
|
+
message.transactions = data.transactions.map(item => TransactionSession.fromObject(item));
|
|
1832
|
+
}
|
|
1833
|
+
if (data.totalCount != null) {
|
|
1834
|
+
message.totalCount = data.totalCount;
|
|
1835
|
+
}
|
|
1836
|
+
if (data.pageCount != null) {
|
|
1837
|
+
message.pageCount = data.pageCount;
|
|
1838
|
+
}
|
|
1839
|
+
if (data.currentPage != null) {
|
|
1840
|
+
message.currentPage = data.currentPage;
|
|
1841
|
+
}
|
|
1842
|
+
if (data.hasNextPage != null) {
|
|
1843
|
+
message.hasNextPage = data.hasNextPage;
|
|
1844
|
+
}
|
|
1845
|
+
if (data.hasPreviousPage != null) {
|
|
1846
|
+
message.hasPreviousPage = data.hasPreviousPage;
|
|
1847
|
+
}
|
|
1848
|
+
return message;
|
|
1849
|
+
}
|
|
1850
|
+
toObject() {
|
|
1851
|
+
const data = {};
|
|
1852
|
+
if (this.transactions != null) {
|
|
1853
|
+
data.transactions = this.transactions.map((item) => item.toObject());
|
|
1854
|
+
}
|
|
1855
|
+
if (this.totalCount != null) {
|
|
1856
|
+
data.totalCount = this.totalCount;
|
|
1857
|
+
}
|
|
1858
|
+
if (this.pageCount != null) {
|
|
1859
|
+
data.pageCount = this.pageCount;
|
|
1860
|
+
}
|
|
1861
|
+
if (this.currentPage != null) {
|
|
1862
|
+
data.currentPage = this.currentPage;
|
|
1863
|
+
}
|
|
1864
|
+
if (this.hasNextPage != null) {
|
|
1865
|
+
data.hasNextPage = this.hasNextPage;
|
|
1866
|
+
}
|
|
1867
|
+
if (this.hasPreviousPage != null) {
|
|
1868
|
+
data.hasPreviousPage = this.hasPreviousPage;
|
|
1869
|
+
}
|
|
1870
|
+
return data;
|
|
1871
|
+
}
|
|
1872
|
+
serialize(w) {
|
|
1873
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1874
|
+
if (this.transactions.length)
|
|
1875
|
+
writer.writeRepeatedMessage(1, this.transactions, (item) => item.serialize(writer));
|
|
1876
|
+
if (this.totalCount != 0)
|
|
1877
|
+
writer.writeInt32(2, this.totalCount);
|
|
1878
|
+
if (this.pageCount != 0)
|
|
1879
|
+
writer.writeInt32(3, this.pageCount);
|
|
1880
|
+
if (this.currentPage != 0)
|
|
1881
|
+
writer.writeInt32(4, this.currentPage);
|
|
1882
|
+
if (this.hasNextPage != false)
|
|
1883
|
+
writer.writeBool(5, this.hasNextPage);
|
|
1884
|
+
if (this.hasPreviousPage != false)
|
|
1885
|
+
writer.writeBool(6, this.hasPreviousPage);
|
|
1886
|
+
if (!w)
|
|
1887
|
+
return writer.getResultBuffer();
|
|
1888
|
+
}
|
|
1889
|
+
static deserialize(bytes) {
|
|
1890
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TerminalTransactionsResponse();
|
|
1891
|
+
while (reader.nextField()) {
|
|
1892
|
+
if (reader.isEndGroup())
|
|
1893
|
+
break;
|
|
1894
|
+
switch (reader.getFieldNumber()) {
|
|
1895
|
+
case 1:
|
|
1896
|
+
reader.readMessage(message.transactions, () => pb_1.Message.addToRepeatedWrapperField(message, 1, TransactionSession.deserialize(reader), TransactionSession));
|
|
1897
|
+
break;
|
|
1898
|
+
case 2:
|
|
1899
|
+
message.totalCount = reader.readInt32();
|
|
1900
|
+
break;
|
|
1901
|
+
case 3:
|
|
1902
|
+
message.pageCount = reader.readInt32();
|
|
1903
|
+
break;
|
|
1904
|
+
case 4:
|
|
1905
|
+
message.currentPage = reader.readInt32();
|
|
1906
|
+
break;
|
|
1907
|
+
case 5:
|
|
1908
|
+
message.hasNextPage = reader.readBool();
|
|
1909
|
+
break;
|
|
1910
|
+
case 6:
|
|
1911
|
+
message.hasPreviousPage = reader.readBool();
|
|
1912
|
+
break;
|
|
1913
|
+
default: reader.skipField();
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
return message;
|
|
1917
|
+
}
|
|
1918
|
+
serializeBinary() {
|
|
1919
|
+
return this.serialize();
|
|
1920
|
+
}
|
|
1921
|
+
static deserializeBinary(bytes) {
|
|
1922
|
+
return TerminalTransactionsResponse.deserialize(bytes);
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
terminalTransactions.TerminalTransactionsResponse = TerminalTransactionsResponse;
|
|
1926
|
+
class TransactionSession extends pb_1.Message {
|
|
1927
|
+
#one_of_decls = [[11], [12], [13], [18], [19], [20], [21]];
|
|
1928
|
+
constructor(data) {
|
|
1929
|
+
super();
|
|
1930
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1931
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1932
|
+
if ("id" in data && data.id != undefined) {
|
|
1933
|
+
this.id = data.id;
|
|
1934
|
+
}
|
|
1935
|
+
if ("terminalId" in data && data.terminalId != undefined) {
|
|
1936
|
+
this.terminalId = data.terminalId;
|
|
1937
|
+
}
|
|
1938
|
+
if ("businessId" in data && data.businessId != undefined) {
|
|
1939
|
+
this.businessId = data.businessId;
|
|
1940
|
+
}
|
|
1941
|
+
if ("status" in data && data.status != undefined) {
|
|
1942
|
+
this.status = data.status;
|
|
1943
|
+
}
|
|
1944
|
+
if ("currentStep" in data && data.currentStep != undefined) {
|
|
1945
|
+
this.currentStep = data.currentStep;
|
|
1946
|
+
}
|
|
1947
|
+
if ("amount" in data && data.amount != undefined) {
|
|
1948
|
+
this.amount = data.amount;
|
|
1949
|
+
}
|
|
1950
|
+
if ("currency" in data && data.currency != undefined) {
|
|
1951
|
+
this.currency = data.currency;
|
|
1952
|
+
}
|
|
1953
|
+
if ("transactionType" in data && data.transactionType != undefined) {
|
|
1954
|
+
this.transactionType = data.transactionType;
|
|
1955
|
+
}
|
|
1956
|
+
if ("paymentMethod" in data && data.paymentMethod != undefined) {
|
|
1957
|
+
this.paymentMethod = data.paymentMethod;
|
|
1958
|
+
}
|
|
1959
|
+
if ("reference" in data && data.reference != undefined) {
|
|
1960
|
+
this.reference = data.reference;
|
|
1961
|
+
}
|
|
1962
|
+
if ("rrn" in data && data.rrn != undefined) {
|
|
1963
|
+
this.rrn = data.rrn;
|
|
1964
|
+
}
|
|
1965
|
+
if ("stan" in data && data.stan != undefined) {
|
|
1966
|
+
this.stan = data.stan;
|
|
1967
|
+
}
|
|
1968
|
+
if ("provider" in data && data.provider != undefined) {
|
|
1969
|
+
this.provider = data.provider;
|
|
1970
|
+
}
|
|
1971
|
+
if ("metadata" in data && data.metadata != undefined) {
|
|
1972
|
+
this.metadata = data.metadata;
|
|
1973
|
+
}
|
|
1974
|
+
if ("createdAt" in data && data.createdAt != undefined) {
|
|
1975
|
+
this.createdAt = data.createdAt;
|
|
1976
|
+
}
|
|
1977
|
+
if ("updatedAt" in data && data.updatedAt != undefined) {
|
|
1978
|
+
this.updatedAt = data.updatedAt;
|
|
1979
|
+
}
|
|
1980
|
+
if ("expiresAt" in data && data.expiresAt != undefined) {
|
|
1981
|
+
this.expiresAt = data.expiresAt;
|
|
1982
|
+
}
|
|
1983
|
+
if ("completedAt" in data && data.completedAt != undefined) {
|
|
1984
|
+
this.completedAt = data.completedAt;
|
|
1985
|
+
}
|
|
1986
|
+
if ("reversedAt" in data && data.reversedAt != undefined) {
|
|
1987
|
+
this.reversedAt = data.reversedAt;
|
|
1988
|
+
}
|
|
1989
|
+
if ("paymentReference" in data && data.paymentReference != undefined) {
|
|
1990
|
+
this.paymentReference = data.paymentReference;
|
|
1991
|
+
}
|
|
1992
|
+
if ("errorMessage" in data && data.errorMessage != undefined) {
|
|
1993
|
+
this.errorMessage = data.errorMessage;
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
if (!this.metadata)
|
|
1997
|
+
this.metadata = new Map();
|
|
1998
|
+
}
|
|
1999
|
+
get id() {
|
|
2000
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
2001
|
+
}
|
|
2002
|
+
set id(value) {
|
|
2003
|
+
pb_1.Message.setField(this, 1, value);
|
|
2004
|
+
}
|
|
2005
|
+
get terminalId() {
|
|
2006
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
2007
|
+
}
|
|
2008
|
+
set terminalId(value) {
|
|
2009
|
+
pb_1.Message.setField(this, 2, value);
|
|
2010
|
+
}
|
|
2011
|
+
get businessId() {
|
|
2012
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
2013
|
+
}
|
|
2014
|
+
set businessId(value) {
|
|
2015
|
+
pb_1.Message.setField(this, 3, value);
|
|
2016
|
+
}
|
|
2017
|
+
get status() {
|
|
2018
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
2019
|
+
}
|
|
2020
|
+
set status(value) {
|
|
2021
|
+
pb_1.Message.setField(this, 4, value);
|
|
2022
|
+
}
|
|
2023
|
+
get currentStep() {
|
|
2024
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
2025
|
+
}
|
|
2026
|
+
set currentStep(value) {
|
|
2027
|
+
pb_1.Message.setField(this, 5, value);
|
|
2028
|
+
}
|
|
2029
|
+
get amount() {
|
|
2030
|
+
return pb_1.Message.getFieldWithDefault(this, 6, 0);
|
|
2031
|
+
}
|
|
2032
|
+
set amount(value) {
|
|
2033
|
+
pb_1.Message.setField(this, 6, value);
|
|
2034
|
+
}
|
|
2035
|
+
get currency() {
|
|
2036
|
+
return pb_1.Message.getFieldWithDefault(this, 7, "");
|
|
2037
|
+
}
|
|
2038
|
+
set currency(value) {
|
|
2039
|
+
pb_1.Message.setField(this, 7, value);
|
|
2040
|
+
}
|
|
2041
|
+
get transactionType() {
|
|
2042
|
+
return pb_1.Message.getFieldWithDefault(this, 8, "");
|
|
2043
|
+
}
|
|
2044
|
+
set transactionType(value) {
|
|
2045
|
+
pb_1.Message.setField(this, 8, value);
|
|
2046
|
+
}
|
|
2047
|
+
get paymentMethod() {
|
|
2048
|
+
return pb_1.Message.getFieldWithDefault(this, 9, "");
|
|
2049
|
+
}
|
|
2050
|
+
set paymentMethod(value) {
|
|
2051
|
+
pb_1.Message.setField(this, 9, value);
|
|
2052
|
+
}
|
|
2053
|
+
get reference() {
|
|
2054
|
+
return pb_1.Message.getFieldWithDefault(this, 10, "");
|
|
2055
|
+
}
|
|
2056
|
+
set reference(value) {
|
|
2057
|
+
pb_1.Message.setField(this, 10, value);
|
|
2058
|
+
}
|
|
2059
|
+
get rrn() {
|
|
2060
|
+
return pb_1.Message.getFieldWithDefault(this, 11, "");
|
|
2061
|
+
}
|
|
2062
|
+
set rrn(value) {
|
|
2063
|
+
pb_1.Message.setOneofField(this, 11, this.#one_of_decls[0], value);
|
|
2064
|
+
}
|
|
2065
|
+
get hasRrn() {
|
|
2066
|
+
return pb_1.Message.getField(this, 11) != null;
|
|
2067
|
+
}
|
|
2068
|
+
get stan() {
|
|
2069
|
+
return pb_1.Message.getFieldWithDefault(this, 12, "");
|
|
2070
|
+
}
|
|
2071
|
+
set stan(value) {
|
|
2072
|
+
pb_1.Message.setOneofField(this, 12, this.#one_of_decls[1], value);
|
|
2073
|
+
}
|
|
2074
|
+
get hasStan() {
|
|
2075
|
+
return pb_1.Message.getField(this, 12) != null;
|
|
2076
|
+
}
|
|
2077
|
+
get provider() {
|
|
2078
|
+
return pb_1.Message.getFieldWithDefault(this, 13, "");
|
|
2079
|
+
}
|
|
2080
|
+
set provider(value) {
|
|
2081
|
+
pb_1.Message.setOneofField(this, 13, this.#one_of_decls[2], value);
|
|
2082
|
+
}
|
|
2083
|
+
get hasProvider() {
|
|
2084
|
+
return pb_1.Message.getField(this, 13) != null;
|
|
2085
|
+
}
|
|
2086
|
+
get metadata() {
|
|
2087
|
+
return pb_1.Message.getField(this, 14);
|
|
2088
|
+
}
|
|
2089
|
+
set metadata(value) {
|
|
2090
|
+
pb_1.Message.setField(this, 14, value);
|
|
2091
|
+
}
|
|
2092
|
+
get createdAt() {
|
|
2093
|
+
return pb_1.Message.getFieldWithDefault(this, 15, "");
|
|
2094
|
+
}
|
|
2095
|
+
set createdAt(value) {
|
|
2096
|
+
pb_1.Message.setField(this, 15, value);
|
|
2097
|
+
}
|
|
2098
|
+
get updatedAt() {
|
|
2099
|
+
return pb_1.Message.getFieldWithDefault(this, 16, "");
|
|
2100
|
+
}
|
|
2101
|
+
set updatedAt(value) {
|
|
2102
|
+
pb_1.Message.setField(this, 16, value);
|
|
2103
|
+
}
|
|
2104
|
+
get expiresAt() {
|
|
2105
|
+
return pb_1.Message.getFieldWithDefault(this, 17, "");
|
|
2106
|
+
}
|
|
2107
|
+
set expiresAt(value) {
|
|
2108
|
+
pb_1.Message.setField(this, 17, value);
|
|
2109
|
+
}
|
|
2110
|
+
get completedAt() {
|
|
2111
|
+
return pb_1.Message.getFieldWithDefault(this, 18, "");
|
|
2112
|
+
}
|
|
2113
|
+
set completedAt(value) {
|
|
2114
|
+
pb_1.Message.setOneofField(this, 18, this.#one_of_decls[3], value);
|
|
2115
|
+
}
|
|
2116
|
+
get hasCompletedAt() {
|
|
2117
|
+
return pb_1.Message.getField(this, 18) != null;
|
|
2118
|
+
}
|
|
2119
|
+
get reversedAt() {
|
|
2120
|
+
return pb_1.Message.getFieldWithDefault(this, 19, "");
|
|
2121
|
+
}
|
|
2122
|
+
set reversedAt(value) {
|
|
2123
|
+
pb_1.Message.setOneofField(this, 19, this.#one_of_decls[4], value);
|
|
2124
|
+
}
|
|
2125
|
+
get hasReversedAt() {
|
|
2126
|
+
return pb_1.Message.getField(this, 19) != null;
|
|
2127
|
+
}
|
|
2128
|
+
get paymentReference() {
|
|
2129
|
+
return pb_1.Message.getFieldWithDefault(this, 20, "");
|
|
2130
|
+
}
|
|
2131
|
+
set paymentReference(value) {
|
|
2132
|
+
pb_1.Message.setOneofField(this, 20, this.#one_of_decls[5], value);
|
|
2133
|
+
}
|
|
2134
|
+
get hasPaymentReference() {
|
|
2135
|
+
return pb_1.Message.getField(this, 20) != null;
|
|
2136
|
+
}
|
|
2137
|
+
get errorMessage() {
|
|
2138
|
+
return pb_1.Message.getFieldWithDefault(this, 21, "");
|
|
2139
|
+
}
|
|
2140
|
+
set errorMessage(value) {
|
|
2141
|
+
pb_1.Message.setOneofField(this, 21, this.#one_of_decls[6], value);
|
|
2142
|
+
}
|
|
2143
|
+
get hasErrorMessage() {
|
|
2144
|
+
return pb_1.Message.getField(this, 21) != null;
|
|
2145
|
+
}
|
|
2146
|
+
get _rrn() {
|
|
2147
|
+
const cases = {
|
|
2148
|
+
0: "none",
|
|
2149
|
+
11: "rrn"
|
|
2150
|
+
};
|
|
2151
|
+
return cases[pb_1.Message.computeOneofCase(this, [11])];
|
|
2152
|
+
}
|
|
2153
|
+
get _stan() {
|
|
2154
|
+
const cases = {
|
|
2155
|
+
0: "none",
|
|
2156
|
+
12: "stan"
|
|
2157
|
+
};
|
|
2158
|
+
return cases[pb_1.Message.computeOneofCase(this, [12])];
|
|
2159
|
+
}
|
|
2160
|
+
get _provider() {
|
|
2161
|
+
const cases = {
|
|
2162
|
+
0: "none",
|
|
2163
|
+
13: "provider"
|
|
2164
|
+
};
|
|
2165
|
+
return cases[pb_1.Message.computeOneofCase(this, [13])];
|
|
2166
|
+
}
|
|
2167
|
+
get _completed_at() {
|
|
2168
|
+
const cases = {
|
|
2169
|
+
0: "none",
|
|
2170
|
+
18: "completedAt"
|
|
2171
|
+
};
|
|
2172
|
+
return cases[pb_1.Message.computeOneofCase(this, [18])];
|
|
2173
|
+
}
|
|
2174
|
+
get _reversed_at() {
|
|
2175
|
+
const cases = {
|
|
2176
|
+
0: "none",
|
|
2177
|
+
19: "reversedAt"
|
|
2178
|
+
};
|
|
2179
|
+
return cases[pb_1.Message.computeOneofCase(this, [19])];
|
|
2180
|
+
}
|
|
2181
|
+
get _payment_reference() {
|
|
2182
|
+
const cases = {
|
|
2183
|
+
0: "none",
|
|
2184
|
+
20: "paymentReference"
|
|
2185
|
+
};
|
|
2186
|
+
return cases[pb_1.Message.computeOneofCase(this, [20])];
|
|
2187
|
+
}
|
|
2188
|
+
get _error_message() {
|
|
2189
|
+
const cases = {
|
|
2190
|
+
0: "none",
|
|
2191
|
+
21: "errorMessage"
|
|
2192
|
+
};
|
|
2193
|
+
return cases[pb_1.Message.computeOneofCase(this, [21])];
|
|
2194
|
+
}
|
|
2195
|
+
static fromObject(data) {
|
|
2196
|
+
const message = new TransactionSession({});
|
|
2197
|
+
if (data.id != null) {
|
|
2198
|
+
message.id = data.id;
|
|
2199
|
+
}
|
|
2200
|
+
if (data.terminalId != null) {
|
|
2201
|
+
message.terminalId = data.terminalId;
|
|
2202
|
+
}
|
|
2203
|
+
if (data.businessId != null) {
|
|
2204
|
+
message.businessId = data.businessId;
|
|
2205
|
+
}
|
|
2206
|
+
if (data.status != null) {
|
|
2207
|
+
message.status = data.status;
|
|
2208
|
+
}
|
|
2209
|
+
if (data.currentStep != null) {
|
|
2210
|
+
message.currentStep = data.currentStep;
|
|
2211
|
+
}
|
|
2212
|
+
if (data.amount != null) {
|
|
2213
|
+
message.amount = data.amount;
|
|
2214
|
+
}
|
|
2215
|
+
if (data.currency != null) {
|
|
2216
|
+
message.currency = data.currency;
|
|
2217
|
+
}
|
|
2218
|
+
if (data.transactionType != null) {
|
|
2219
|
+
message.transactionType = data.transactionType;
|
|
2220
|
+
}
|
|
2221
|
+
if (data.paymentMethod != null) {
|
|
2222
|
+
message.paymentMethod = data.paymentMethod;
|
|
2223
|
+
}
|
|
2224
|
+
if (data.reference != null) {
|
|
2225
|
+
message.reference = data.reference;
|
|
2226
|
+
}
|
|
2227
|
+
if (data.rrn != null) {
|
|
2228
|
+
message.rrn = data.rrn;
|
|
2229
|
+
}
|
|
2230
|
+
if (data.stan != null) {
|
|
2231
|
+
message.stan = data.stan;
|
|
2232
|
+
}
|
|
2233
|
+
if (data.provider != null) {
|
|
2234
|
+
message.provider = data.provider;
|
|
2235
|
+
}
|
|
2236
|
+
if (typeof data.metadata == "object") {
|
|
2237
|
+
message.metadata = new Map(Object.entries(data.metadata));
|
|
2238
|
+
}
|
|
2239
|
+
if (data.createdAt != null) {
|
|
2240
|
+
message.createdAt = data.createdAt;
|
|
2241
|
+
}
|
|
2242
|
+
if (data.updatedAt != null) {
|
|
2243
|
+
message.updatedAt = data.updatedAt;
|
|
2244
|
+
}
|
|
2245
|
+
if (data.expiresAt != null) {
|
|
2246
|
+
message.expiresAt = data.expiresAt;
|
|
2247
|
+
}
|
|
2248
|
+
if (data.completedAt != null) {
|
|
2249
|
+
message.completedAt = data.completedAt;
|
|
2250
|
+
}
|
|
2251
|
+
if (data.reversedAt != null) {
|
|
2252
|
+
message.reversedAt = data.reversedAt;
|
|
2253
|
+
}
|
|
2254
|
+
if (data.paymentReference != null) {
|
|
2255
|
+
message.paymentReference = data.paymentReference;
|
|
2256
|
+
}
|
|
2257
|
+
if (data.errorMessage != null) {
|
|
2258
|
+
message.errorMessage = data.errorMessage;
|
|
2259
|
+
}
|
|
2260
|
+
return message;
|
|
2261
|
+
}
|
|
2262
|
+
toObject() {
|
|
2263
|
+
const data = {};
|
|
2264
|
+
if (this.id != null) {
|
|
2265
|
+
data.id = this.id;
|
|
2266
|
+
}
|
|
2267
|
+
if (this.terminalId != null) {
|
|
2268
|
+
data.terminalId = this.terminalId;
|
|
2269
|
+
}
|
|
2270
|
+
if (this.businessId != null) {
|
|
2271
|
+
data.businessId = this.businessId;
|
|
2272
|
+
}
|
|
2273
|
+
if (this.status != null) {
|
|
2274
|
+
data.status = this.status;
|
|
2275
|
+
}
|
|
2276
|
+
if (this.currentStep != null) {
|
|
2277
|
+
data.currentStep = this.currentStep;
|
|
2278
|
+
}
|
|
2279
|
+
if (this.amount != null) {
|
|
2280
|
+
data.amount = this.amount;
|
|
2281
|
+
}
|
|
2282
|
+
if (this.currency != null) {
|
|
2283
|
+
data.currency = this.currency;
|
|
2284
|
+
}
|
|
2285
|
+
if (this.transactionType != null) {
|
|
2286
|
+
data.transactionType = this.transactionType;
|
|
2287
|
+
}
|
|
2288
|
+
if (this.paymentMethod != null) {
|
|
2289
|
+
data.paymentMethod = this.paymentMethod;
|
|
2290
|
+
}
|
|
2291
|
+
if (this.reference != null) {
|
|
2292
|
+
data.reference = this.reference;
|
|
2293
|
+
}
|
|
2294
|
+
if (this.rrn != null) {
|
|
2295
|
+
data.rrn = this.rrn;
|
|
2296
|
+
}
|
|
2297
|
+
if (this.stan != null) {
|
|
2298
|
+
data.stan = this.stan;
|
|
2299
|
+
}
|
|
2300
|
+
if (this.provider != null) {
|
|
2301
|
+
data.provider = this.provider;
|
|
2302
|
+
}
|
|
2303
|
+
if (this.metadata != null) {
|
|
2304
|
+
data.metadata = (Object.fromEntries)(this.metadata);
|
|
2305
|
+
}
|
|
2306
|
+
if (this.createdAt != null) {
|
|
2307
|
+
data.createdAt = this.createdAt;
|
|
2308
|
+
}
|
|
2309
|
+
if (this.updatedAt != null) {
|
|
2310
|
+
data.updatedAt = this.updatedAt;
|
|
2311
|
+
}
|
|
2312
|
+
if (this.expiresAt != null) {
|
|
2313
|
+
data.expiresAt = this.expiresAt;
|
|
2314
|
+
}
|
|
2315
|
+
if (this.completedAt != null) {
|
|
2316
|
+
data.completedAt = this.completedAt;
|
|
2317
|
+
}
|
|
2318
|
+
if (this.reversedAt != null) {
|
|
2319
|
+
data.reversedAt = this.reversedAt;
|
|
2320
|
+
}
|
|
2321
|
+
if (this.paymentReference != null) {
|
|
2322
|
+
data.paymentReference = this.paymentReference;
|
|
2323
|
+
}
|
|
2324
|
+
if (this.errorMessage != null) {
|
|
2325
|
+
data.errorMessage = this.errorMessage;
|
|
2326
|
+
}
|
|
2327
|
+
return data;
|
|
2328
|
+
}
|
|
2329
|
+
serialize(w) {
|
|
2330
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
2331
|
+
if (this.id.length)
|
|
2332
|
+
writer.writeString(1, this.id);
|
|
2333
|
+
if (this.terminalId.length)
|
|
2334
|
+
writer.writeString(2, this.terminalId);
|
|
2335
|
+
if (this.businessId.length)
|
|
2336
|
+
writer.writeString(3, this.businessId);
|
|
2337
|
+
if (this.status.length)
|
|
2338
|
+
writer.writeString(4, this.status);
|
|
2339
|
+
if (this.currentStep.length)
|
|
2340
|
+
writer.writeString(5, this.currentStep);
|
|
2341
|
+
if (this.amount != 0)
|
|
2342
|
+
writer.writeInt64(6, this.amount);
|
|
2343
|
+
if (this.currency.length)
|
|
2344
|
+
writer.writeString(7, this.currency);
|
|
2345
|
+
if (this.transactionType.length)
|
|
2346
|
+
writer.writeString(8, this.transactionType);
|
|
2347
|
+
if (this.paymentMethod.length)
|
|
2348
|
+
writer.writeString(9, this.paymentMethod);
|
|
2349
|
+
if (this.reference.length)
|
|
2350
|
+
writer.writeString(10, this.reference);
|
|
2351
|
+
if (this.hasRrn)
|
|
2352
|
+
writer.writeString(11, this.rrn);
|
|
2353
|
+
if (this.hasStan)
|
|
2354
|
+
writer.writeString(12, this.stan);
|
|
2355
|
+
if (this.hasProvider)
|
|
2356
|
+
writer.writeString(13, this.provider);
|
|
2357
|
+
for (const [key, value] of this.metadata) {
|
|
2358
|
+
writer.writeMessage(14, this.metadata, () => {
|
|
2359
|
+
writer.writeString(1, key);
|
|
2360
|
+
writer.writeString(2, value);
|
|
2361
|
+
});
|
|
2362
|
+
}
|
|
2363
|
+
if (this.createdAt.length)
|
|
2364
|
+
writer.writeString(15, this.createdAt);
|
|
2365
|
+
if (this.updatedAt.length)
|
|
2366
|
+
writer.writeString(16, this.updatedAt);
|
|
2367
|
+
if (this.expiresAt.length)
|
|
2368
|
+
writer.writeString(17, this.expiresAt);
|
|
2369
|
+
if (this.hasCompletedAt)
|
|
2370
|
+
writer.writeString(18, this.completedAt);
|
|
2371
|
+
if (this.hasReversedAt)
|
|
2372
|
+
writer.writeString(19, this.reversedAt);
|
|
2373
|
+
if (this.hasPaymentReference)
|
|
2374
|
+
writer.writeString(20, this.paymentReference);
|
|
2375
|
+
if (this.hasErrorMessage)
|
|
2376
|
+
writer.writeString(21, this.errorMessage);
|
|
2377
|
+
if (!w)
|
|
2378
|
+
return writer.getResultBuffer();
|
|
2379
|
+
}
|
|
2380
|
+
static deserialize(bytes) {
|
|
2381
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionSession();
|
|
2382
|
+
while (reader.nextField()) {
|
|
2383
|
+
if (reader.isEndGroup())
|
|
2384
|
+
break;
|
|
2385
|
+
switch (reader.getFieldNumber()) {
|
|
2386
|
+
case 1:
|
|
2387
|
+
message.id = reader.readString();
|
|
2388
|
+
break;
|
|
2389
|
+
case 2:
|
|
2390
|
+
message.terminalId = reader.readString();
|
|
2391
|
+
break;
|
|
2392
|
+
case 3:
|
|
2393
|
+
message.businessId = reader.readString();
|
|
2394
|
+
break;
|
|
2395
|
+
case 4:
|
|
2396
|
+
message.status = reader.readString();
|
|
2397
|
+
break;
|
|
2398
|
+
case 5:
|
|
2399
|
+
message.currentStep = reader.readString();
|
|
2400
|
+
break;
|
|
2401
|
+
case 6:
|
|
2402
|
+
message.amount = reader.readInt64();
|
|
2403
|
+
break;
|
|
2404
|
+
case 7:
|
|
2405
|
+
message.currency = reader.readString();
|
|
2406
|
+
break;
|
|
2407
|
+
case 8:
|
|
2408
|
+
message.transactionType = reader.readString();
|
|
2409
|
+
break;
|
|
2410
|
+
case 9:
|
|
2411
|
+
message.paymentMethod = reader.readString();
|
|
2412
|
+
break;
|
|
2413
|
+
case 10:
|
|
2414
|
+
message.reference = reader.readString();
|
|
2415
|
+
break;
|
|
2416
|
+
case 11:
|
|
2417
|
+
message.rrn = reader.readString();
|
|
2418
|
+
break;
|
|
2419
|
+
case 12:
|
|
2420
|
+
message.stan = reader.readString();
|
|
2421
|
+
break;
|
|
2422
|
+
case 13:
|
|
2423
|
+
message.provider = reader.readString();
|
|
2424
|
+
break;
|
|
2425
|
+
case 14:
|
|
2426
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata, reader, reader.readString, reader.readString));
|
|
2427
|
+
break;
|
|
2428
|
+
case 15:
|
|
2429
|
+
message.createdAt = reader.readString();
|
|
2430
|
+
break;
|
|
2431
|
+
case 16:
|
|
2432
|
+
message.updatedAt = reader.readString();
|
|
2433
|
+
break;
|
|
2434
|
+
case 17:
|
|
2435
|
+
message.expiresAt = reader.readString();
|
|
2436
|
+
break;
|
|
2437
|
+
case 18:
|
|
2438
|
+
message.completedAt = reader.readString();
|
|
2439
|
+
break;
|
|
2440
|
+
case 19:
|
|
2441
|
+
message.reversedAt = reader.readString();
|
|
2442
|
+
break;
|
|
2443
|
+
case 20:
|
|
2444
|
+
message.paymentReference = reader.readString();
|
|
2445
|
+
break;
|
|
2446
|
+
case 21:
|
|
2447
|
+
message.errorMessage = reader.readString();
|
|
2448
|
+
break;
|
|
2449
|
+
default: reader.skipField();
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
return message;
|
|
2453
|
+
}
|
|
2454
|
+
serializeBinary() {
|
|
2455
|
+
return this.serialize();
|
|
2456
|
+
}
|
|
2457
|
+
static deserializeBinary(bytes) {
|
|
2458
|
+
return TransactionSession.deserialize(bytes);
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
terminalTransactions.TransactionSession = TransactionSession;
|
|
2462
|
+
class AuditEvent extends pb_1.Message {
|
|
2463
|
+
#one_of_decls = [];
|
|
2464
|
+
constructor(data) {
|
|
2465
|
+
super();
|
|
2466
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
2467
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
2468
|
+
if ("id" in data && data.id != undefined) {
|
|
2469
|
+
this.id = data.id;
|
|
2470
|
+
}
|
|
2471
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
2472
|
+
this.transactionId = data.transactionId;
|
|
2473
|
+
}
|
|
2474
|
+
if ("eventType" in data && data.eventType != undefined) {
|
|
2475
|
+
this.eventType = data.eventType;
|
|
2476
|
+
}
|
|
2477
|
+
if ("timestamp" in data && data.timestamp != undefined) {
|
|
2478
|
+
this.timestamp = data.timestamp;
|
|
2479
|
+
}
|
|
2480
|
+
if ("operatorId" in data && data.operatorId != undefined) {
|
|
2481
|
+
this.operatorId = data.operatorId;
|
|
2482
|
+
}
|
|
2483
|
+
if ("terminalId" in data && data.terminalId != undefined) {
|
|
2484
|
+
this.terminalId = data.terminalId;
|
|
2485
|
+
}
|
|
2486
|
+
if ("eventData" in data && data.eventData != undefined) {
|
|
2487
|
+
this.eventData = data.eventData;
|
|
2488
|
+
}
|
|
2489
|
+
if ("notes" in data && data.notes != undefined) {
|
|
2490
|
+
this.notes = data.notes;
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
get id() {
|
|
2495
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
2496
|
+
}
|
|
2497
|
+
set id(value) {
|
|
2498
|
+
pb_1.Message.setField(this, 1, value);
|
|
2499
|
+
}
|
|
2500
|
+
get transactionId() {
|
|
2501
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
2502
|
+
}
|
|
2503
|
+
set transactionId(value) {
|
|
2504
|
+
pb_1.Message.setField(this, 2, value);
|
|
2505
|
+
}
|
|
2506
|
+
get eventType() {
|
|
2507
|
+
return pb_1.Message.getFieldWithDefault(this, 3, AuditEventType.AUDIT_UNSPECIFIED);
|
|
2508
|
+
}
|
|
2509
|
+
set eventType(value) {
|
|
2510
|
+
pb_1.Message.setField(this, 3, value);
|
|
2511
|
+
}
|
|
2512
|
+
get timestamp() {
|
|
2513
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
2514
|
+
}
|
|
2515
|
+
set timestamp(value) {
|
|
2516
|
+
pb_1.Message.setField(this, 4, value);
|
|
2517
|
+
}
|
|
2518
|
+
get operatorId() {
|
|
2519
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
2520
|
+
}
|
|
2521
|
+
set operatorId(value) {
|
|
2522
|
+
pb_1.Message.setField(this, 5, value);
|
|
2523
|
+
}
|
|
2524
|
+
get terminalId() {
|
|
2525
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
2526
|
+
}
|
|
2527
|
+
set terminalId(value) {
|
|
2528
|
+
pb_1.Message.setField(this, 6, value);
|
|
2529
|
+
}
|
|
2530
|
+
get eventData() {
|
|
2531
|
+
return pb_1.Message.getWrapperField(this, AuditEventData, 7);
|
|
2532
|
+
}
|
|
2533
|
+
set eventData(value) {
|
|
2534
|
+
pb_1.Message.setWrapperField(this, 7, value);
|
|
2535
|
+
}
|
|
2536
|
+
get hasEventData() {
|
|
2537
|
+
return pb_1.Message.getField(this, 7) != null;
|
|
2538
|
+
}
|
|
2539
|
+
get notes() {
|
|
2540
|
+
return pb_1.Message.getFieldWithDefault(this, 8, "");
|
|
2541
|
+
}
|
|
2542
|
+
set notes(value) {
|
|
2543
|
+
pb_1.Message.setField(this, 8, value);
|
|
2544
|
+
}
|
|
2545
|
+
static fromObject(data) {
|
|
2546
|
+
const message = new AuditEvent({});
|
|
2547
|
+
if (data.id != null) {
|
|
2548
|
+
message.id = data.id;
|
|
2549
|
+
}
|
|
2550
|
+
if (data.transactionId != null) {
|
|
2551
|
+
message.transactionId = data.transactionId;
|
|
2552
|
+
}
|
|
2553
|
+
if (data.eventType != null) {
|
|
2554
|
+
message.eventType = data.eventType;
|
|
2555
|
+
}
|
|
2556
|
+
if (data.timestamp != null) {
|
|
2557
|
+
message.timestamp = data.timestamp;
|
|
2558
|
+
}
|
|
2559
|
+
if (data.operatorId != null) {
|
|
2560
|
+
message.operatorId = data.operatorId;
|
|
2561
|
+
}
|
|
2562
|
+
if (data.terminalId != null) {
|
|
2563
|
+
message.terminalId = data.terminalId;
|
|
2564
|
+
}
|
|
2565
|
+
if (data.eventData != null) {
|
|
2566
|
+
message.eventData = AuditEventData.fromObject(data.eventData);
|
|
2567
|
+
}
|
|
2568
|
+
if (data.notes != null) {
|
|
2569
|
+
message.notes = data.notes;
|
|
2570
|
+
}
|
|
2571
|
+
return message;
|
|
2572
|
+
}
|
|
2573
|
+
toObject() {
|
|
2574
|
+
const data = {};
|
|
2575
|
+
if (this.id != null) {
|
|
2576
|
+
data.id = this.id;
|
|
2577
|
+
}
|
|
2578
|
+
if (this.transactionId != null) {
|
|
2579
|
+
data.transactionId = this.transactionId;
|
|
2580
|
+
}
|
|
2581
|
+
if (this.eventType != null) {
|
|
2582
|
+
data.eventType = this.eventType;
|
|
2583
|
+
}
|
|
2584
|
+
if (this.timestamp != null) {
|
|
2585
|
+
data.timestamp = this.timestamp;
|
|
2586
|
+
}
|
|
2587
|
+
if (this.operatorId != null) {
|
|
2588
|
+
data.operatorId = this.operatorId;
|
|
2589
|
+
}
|
|
2590
|
+
if (this.terminalId != null) {
|
|
2591
|
+
data.terminalId = this.terminalId;
|
|
2592
|
+
}
|
|
2593
|
+
if (this.eventData != null) {
|
|
2594
|
+
data.eventData = this.eventData.toObject();
|
|
2595
|
+
}
|
|
2596
|
+
if (this.notes != null) {
|
|
2597
|
+
data.notes = this.notes;
|
|
2598
|
+
}
|
|
2599
|
+
return data;
|
|
2600
|
+
}
|
|
2601
|
+
serialize(w) {
|
|
2602
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
2603
|
+
if (this.id.length)
|
|
2604
|
+
writer.writeString(1, this.id);
|
|
2605
|
+
if (this.transactionId.length)
|
|
2606
|
+
writer.writeString(2, this.transactionId);
|
|
2607
|
+
if (this.eventType != AuditEventType.AUDIT_UNSPECIFIED)
|
|
2608
|
+
writer.writeEnum(3, this.eventType);
|
|
2609
|
+
if (this.timestamp.length)
|
|
2610
|
+
writer.writeString(4, this.timestamp);
|
|
2611
|
+
if (this.operatorId.length)
|
|
2612
|
+
writer.writeString(5, this.operatorId);
|
|
2613
|
+
if (this.terminalId.length)
|
|
2614
|
+
writer.writeString(6, this.terminalId);
|
|
2615
|
+
if (this.hasEventData)
|
|
2616
|
+
writer.writeMessage(7, this.eventData, () => this.eventData.serialize(writer));
|
|
2617
|
+
if (this.notes.length)
|
|
2618
|
+
writer.writeString(8, this.notes);
|
|
2619
|
+
if (!w)
|
|
2620
|
+
return writer.getResultBuffer();
|
|
2621
|
+
}
|
|
2622
|
+
static deserialize(bytes) {
|
|
2623
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuditEvent();
|
|
2624
|
+
while (reader.nextField()) {
|
|
2625
|
+
if (reader.isEndGroup())
|
|
2626
|
+
break;
|
|
2627
|
+
switch (reader.getFieldNumber()) {
|
|
2628
|
+
case 1:
|
|
2629
|
+
message.id = reader.readString();
|
|
2630
|
+
break;
|
|
2631
|
+
case 2:
|
|
2632
|
+
message.transactionId = reader.readString();
|
|
2633
|
+
break;
|
|
2634
|
+
case 3:
|
|
2635
|
+
message.eventType = reader.readEnum();
|
|
2636
|
+
break;
|
|
2637
|
+
case 4:
|
|
2638
|
+
message.timestamp = reader.readString();
|
|
2639
|
+
break;
|
|
2640
|
+
case 5:
|
|
2641
|
+
message.operatorId = reader.readString();
|
|
2642
|
+
break;
|
|
2643
|
+
case 6:
|
|
2644
|
+
message.terminalId = reader.readString();
|
|
2645
|
+
break;
|
|
2646
|
+
case 7:
|
|
2647
|
+
reader.readMessage(message.eventData, () => message.eventData = AuditEventData.deserialize(reader));
|
|
2648
|
+
break;
|
|
2649
|
+
case 8:
|
|
2650
|
+
message.notes = reader.readString();
|
|
2651
|
+
break;
|
|
2652
|
+
default: reader.skipField();
|
|
2653
|
+
}
|
|
2654
|
+
}
|
|
2655
|
+
return message;
|
|
2656
|
+
}
|
|
2657
|
+
serializeBinary() {
|
|
2658
|
+
return this.serialize();
|
|
2659
|
+
}
|
|
2660
|
+
static deserializeBinary(bytes) {
|
|
2661
|
+
return AuditEvent.deserialize(bytes);
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
terminalTransactions.AuditEvent = AuditEvent;
|
|
2665
|
+
class TransactionMetadata extends pb_1.Message {
|
|
2666
|
+
#one_of_decls = [];
|
|
2667
|
+
constructor(data) {
|
|
2668
|
+
super();
|
|
2669
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls);
|
|
2670
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
2671
|
+
if ("operatorId" in data && data.operatorId != undefined) {
|
|
2672
|
+
this.operatorId = data.operatorId;
|
|
2673
|
+
}
|
|
2674
|
+
if ("shiftId" in data && data.shiftId != undefined) {
|
|
2675
|
+
this.shiftId = data.shiftId;
|
|
2676
|
+
}
|
|
2677
|
+
if ("customerReference" in data && data.customerReference != undefined) {
|
|
2678
|
+
this.customerReference = data.customerReference;
|
|
2679
|
+
}
|
|
2680
|
+
if ("invoiceNumber" in data && data.invoiceNumber != undefined) {
|
|
2681
|
+
this.invoiceNumber = data.invoiceNumber;
|
|
2682
|
+
}
|
|
2683
|
+
if ("tags" in data && data.tags != undefined) {
|
|
2684
|
+
this.tags = data.tags;
|
|
2685
|
+
}
|
|
2686
|
+
if ("customFields" in data && data.customFields != undefined) {
|
|
2687
|
+
this.customFields = data.customFields;
|
|
2688
|
+
}
|
|
2689
|
+
}
|
|
2690
|
+
if (!this.customFields)
|
|
2691
|
+
this.customFields = new Map();
|
|
2692
|
+
}
|
|
2693
|
+
get operatorId() {
|
|
2694
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
2695
|
+
}
|
|
2696
|
+
set operatorId(value) {
|
|
2697
|
+
pb_1.Message.setField(this, 1, value);
|
|
2698
|
+
}
|
|
2699
|
+
get shiftId() {
|
|
2700
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
2701
|
+
}
|
|
2702
|
+
set shiftId(value) {
|
|
2703
|
+
pb_1.Message.setField(this, 2, value);
|
|
2704
|
+
}
|
|
2705
|
+
get customerReference() {
|
|
2706
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
2707
|
+
}
|
|
2708
|
+
set customerReference(value) {
|
|
2709
|
+
pb_1.Message.setField(this, 3, value);
|
|
2710
|
+
}
|
|
2711
|
+
get invoiceNumber() {
|
|
2712
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
2713
|
+
}
|
|
2714
|
+
set invoiceNumber(value) {
|
|
2715
|
+
pb_1.Message.setField(this, 4, value);
|
|
2716
|
+
}
|
|
2717
|
+
get tags() {
|
|
2718
|
+
return pb_1.Message.getRepeatedWrapperField(this, TransactionTag, 5);
|
|
2719
|
+
}
|
|
2720
|
+
set tags(value) {
|
|
2721
|
+
pb_1.Message.setRepeatedWrapperField(this, 5, value);
|
|
2722
|
+
}
|
|
2723
|
+
get customFields() {
|
|
2724
|
+
return pb_1.Message.getField(this, 6);
|
|
2725
|
+
}
|
|
2726
|
+
set customFields(value) {
|
|
2727
|
+
pb_1.Message.setField(this, 6, value);
|
|
2728
|
+
}
|
|
2729
|
+
static fromObject(data) {
|
|
2730
|
+
const message = new TransactionMetadata({});
|
|
2731
|
+
if (data.operatorId != null) {
|
|
2732
|
+
message.operatorId = data.operatorId;
|
|
2733
|
+
}
|
|
2734
|
+
if (data.shiftId != null) {
|
|
2735
|
+
message.shiftId = data.shiftId;
|
|
2736
|
+
}
|
|
2737
|
+
if (data.customerReference != null) {
|
|
2738
|
+
message.customerReference = data.customerReference;
|
|
2739
|
+
}
|
|
2740
|
+
if (data.invoiceNumber != null) {
|
|
2741
|
+
message.invoiceNumber = data.invoiceNumber;
|
|
2742
|
+
}
|
|
2743
|
+
if (data.tags != null) {
|
|
2744
|
+
message.tags = data.tags.map(item => TransactionTag.fromObject(item));
|
|
2745
|
+
}
|
|
2746
|
+
if (typeof data.customFields == "object") {
|
|
2747
|
+
message.customFields = new Map(Object.entries(data.customFields));
|
|
2748
|
+
}
|
|
2749
|
+
return message;
|
|
2750
|
+
}
|
|
2751
|
+
toObject() {
|
|
2752
|
+
const data = {};
|
|
2753
|
+
if (this.operatorId != null) {
|
|
2754
|
+
data.operatorId = this.operatorId;
|
|
2755
|
+
}
|
|
2756
|
+
if (this.shiftId != null) {
|
|
2757
|
+
data.shiftId = this.shiftId;
|
|
2758
|
+
}
|
|
2759
|
+
if (this.customerReference != null) {
|
|
2760
|
+
data.customerReference = this.customerReference;
|
|
2761
|
+
}
|
|
2762
|
+
if (this.invoiceNumber != null) {
|
|
2763
|
+
data.invoiceNumber = this.invoiceNumber;
|
|
2764
|
+
}
|
|
2765
|
+
if (this.tags != null) {
|
|
2766
|
+
data.tags = this.tags.map((item) => item.toObject());
|
|
2767
|
+
}
|
|
2768
|
+
if (this.customFields != null) {
|
|
2769
|
+
data.customFields = (Object.fromEntries)(this.customFields);
|
|
2770
|
+
}
|
|
2771
|
+
return data;
|
|
2772
|
+
}
|
|
2773
|
+
serialize(w) {
|
|
2774
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
2775
|
+
if (this.operatorId.length)
|
|
2776
|
+
writer.writeString(1, this.operatorId);
|
|
2777
|
+
if (this.shiftId.length)
|
|
2778
|
+
writer.writeString(2, this.shiftId);
|
|
2779
|
+
if (this.customerReference.length)
|
|
2780
|
+
writer.writeString(3, this.customerReference);
|
|
2781
|
+
if (this.invoiceNumber.length)
|
|
2782
|
+
writer.writeString(4, this.invoiceNumber);
|
|
2783
|
+
if (this.tags.length)
|
|
2784
|
+
writer.writeRepeatedMessage(5, this.tags, (item) => item.serialize(writer));
|
|
2785
|
+
for (const [key, value] of this.customFields) {
|
|
2786
|
+
writer.writeMessage(6, this.customFields, () => {
|
|
2787
|
+
writer.writeString(1, key);
|
|
2788
|
+
writer.writeString(2, value);
|
|
2789
|
+
});
|
|
2790
|
+
}
|
|
2791
|
+
if (!w)
|
|
2792
|
+
return writer.getResultBuffer();
|
|
2793
|
+
}
|
|
2794
|
+
static deserialize(bytes) {
|
|
2795
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionMetadata();
|
|
2796
|
+
while (reader.nextField()) {
|
|
2797
|
+
if (reader.isEndGroup())
|
|
2798
|
+
break;
|
|
2799
|
+
switch (reader.getFieldNumber()) {
|
|
2800
|
+
case 1:
|
|
2801
|
+
message.operatorId = reader.readString();
|
|
2802
|
+
break;
|
|
2803
|
+
case 2:
|
|
2804
|
+
message.shiftId = reader.readString();
|
|
2805
|
+
break;
|
|
2806
|
+
case 3:
|
|
2807
|
+
message.customerReference = reader.readString();
|
|
2808
|
+
break;
|
|
2809
|
+
case 4:
|
|
2810
|
+
message.invoiceNumber = reader.readString();
|
|
2811
|
+
break;
|
|
2812
|
+
case 5:
|
|
2813
|
+
reader.readMessage(message.tags, () => pb_1.Message.addToRepeatedWrapperField(message, 5, TransactionTag.deserialize(reader), TransactionTag));
|
|
2814
|
+
break;
|
|
2815
|
+
case 6:
|
|
2816
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.customFields, reader, reader.readString, reader.readString));
|
|
2817
|
+
break;
|
|
2818
|
+
default: reader.skipField();
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2821
|
+
return message;
|
|
2822
|
+
}
|
|
2823
|
+
serializeBinary() {
|
|
2824
|
+
return this.serialize();
|
|
2825
|
+
}
|
|
2826
|
+
static deserializeBinary(bytes) {
|
|
2827
|
+
return TransactionMetadata.deserialize(bytes);
|
|
2828
|
+
}
|
|
2829
|
+
}
|
|
2830
|
+
terminalTransactions.TransactionMetadata = TransactionMetadata;
|
|
2831
|
+
class ProcessorData extends pb_1.Message {
|
|
2832
|
+
#one_of_decls = [];
|
|
2833
|
+
constructor(data) {
|
|
2834
|
+
super();
|
|
2835
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
2836
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
2837
|
+
if ("processorName" in data && data.processorName != undefined) {
|
|
2838
|
+
this.processorName = data.processorName;
|
|
2839
|
+
}
|
|
2840
|
+
if ("traceNumber" in data && data.traceNumber != undefined) {
|
|
2841
|
+
this.traceNumber = data.traceNumber;
|
|
2842
|
+
}
|
|
2843
|
+
if ("batchNumber" in data && data.batchNumber != undefined) {
|
|
2844
|
+
this.batchNumber = data.batchNumber;
|
|
2845
|
+
}
|
|
2846
|
+
if ("acquirerReference" in data && data.acquirerReference != undefined) {
|
|
2847
|
+
this.acquirerReference = data.acquirerReference;
|
|
2848
|
+
}
|
|
2849
|
+
if ("processorFields" in data && data.processorFields != undefined) {
|
|
2850
|
+
this.processorFields = data.processorFields;
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
if (!this.processorFields)
|
|
2854
|
+
this.processorFields = new Map();
|
|
2855
|
+
}
|
|
2856
|
+
get processorName() {
|
|
2857
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
2858
|
+
}
|
|
2859
|
+
set processorName(value) {
|
|
2860
|
+
pb_1.Message.setField(this, 1, value);
|
|
2861
|
+
}
|
|
2862
|
+
get traceNumber() {
|
|
2863
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
2864
|
+
}
|
|
2865
|
+
set traceNumber(value) {
|
|
2866
|
+
pb_1.Message.setField(this, 2, value);
|
|
2867
|
+
}
|
|
2868
|
+
get batchNumber() {
|
|
2869
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
2870
|
+
}
|
|
2871
|
+
set batchNumber(value) {
|
|
2872
|
+
pb_1.Message.setField(this, 3, value);
|
|
2873
|
+
}
|
|
2874
|
+
get acquirerReference() {
|
|
2875
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
2876
|
+
}
|
|
2877
|
+
set acquirerReference(value) {
|
|
2878
|
+
pb_1.Message.setField(this, 4, value);
|
|
2879
|
+
}
|
|
2880
|
+
get processorFields() {
|
|
2881
|
+
return pb_1.Message.getField(this, 5);
|
|
2882
|
+
}
|
|
2883
|
+
set processorFields(value) {
|
|
2884
|
+
pb_1.Message.setField(this, 5, value);
|
|
2885
|
+
}
|
|
2886
|
+
static fromObject(data) {
|
|
2887
|
+
const message = new ProcessorData({});
|
|
2888
|
+
if (data.processorName != null) {
|
|
2889
|
+
message.processorName = data.processorName;
|
|
2890
|
+
}
|
|
2891
|
+
if (data.traceNumber != null) {
|
|
2892
|
+
message.traceNumber = data.traceNumber;
|
|
2893
|
+
}
|
|
2894
|
+
if (data.batchNumber != null) {
|
|
2895
|
+
message.batchNumber = data.batchNumber;
|
|
2896
|
+
}
|
|
2897
|
+
if (data.acquirerReference != null) {
|
|
2898
|
+
message.acquirerReference = data.acquirerReference;
|
|
2899
|
+
}
|
|
2900
|
+
if (typeof data.processorFields == "object") {
|
|
2901
|
+
message.processorFields = new Map(Object.entries(data.processorFields));
|
|
2902
|
+
}
|
|
2903
|
+
return message;
|
|
2904
|
+
}
|
|
2905
|
+
toObject() {
|
|
2906
|
+
const data = {};
|
|
2907
|
+
if (this.processorName != null) {
|
|
2908
|
+
data.processorName = this.processorName;
|
|
2909
|
+
}
|
|
2910
|
+
if (this.traceNumber != null) {
|
|
2911
|
+
data.traceNumber = this.traceNumber;
|
|
2912
|
+
}
|
|
2913
|
+
if (this.batchNumber != null) {
|
|
2914
|
+
data.batchNumber = this.batchNumber;
|
|
2915
|
+
}
|
|
2916
|
+
if (this.acquirerReference != null) {
|
|
2917
|
+
data.acquirerReference = this.acquirerReference;
|
|
2918
|
+
}
|
|
2919
|
+
if (this.processorFields != null) {
|
|
2920
|
+
data.processorFields = (Object.fromEntries)(this.processorFields);
|
|
2921
|
+
}
|
|
2922
|
+
return data;
|
|
2923
|
+
}
|
|
2924
|
+
serialize(w) {
|
|
2925
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
2926
|
+
if (this.processorName.length)
|
|
2927
|
+
writer.writeString(1, this.processorName);
|
|
2928
|
+
if (this.traceNumber.length)
|
|
2929
|
+
writer.writeString(2, this.traceNumber);
|
|
2930
|
+
if (this.batchNumber.length)
|
|
2931
|
+
writer.writeString(3, this.batchNumber);
|
|
2932
|
+
if (this.acquirerReference.length)
|
|
2933
|
+
writer.writeString(4, this.acquirerReference);
|
|
2934
|
+
for (const [key, value] of this.processorFields) {
|
|
2935
|
+
writer.writeMessage(5, this.processorFields, () => {
|
|
2936
|
+
writer.writeString(1, key);
|
|
2937
|
+
writer.writeString(2, value);
|
|
2938
|
+
});
|
|
2939
|
+
}
|
|
2940
|
+
if (!w)
|
|
2941
|
+
return writer.getResultBuffer();
|
|
2942
|
+
}
|
|
2943
|
+
static deserialize(bytes) {
|
|
2944
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProcessorData();
|
|
2945
|
+
while (reader.nextField()) {
|
|
2946
|
+
if (reader.isEndGroup())
|
|
2947
|
+
break;
|
|
2948
|
+
switch (reader.getFieldNumber()) {
|
|
2949
|
+
case 1:
|
|
2950
|
+
message.processorName = reader.readString();
|
|
2951
|
+
break;
|
|
2952
|
+
case 2:
|
|
2953
|
+
message.traceNumber = reader.readString();
|
|
2954
|
+
break;
|
|
2955
|
+
case 3:
|
|
2956
|
+
message.batchNumber = reader.readString();
|
|
2957
|
+
break;
|
|
2958
|
+
case 4:
|
|
2959
|
+
message.acquirerReference = reader.readString();
|
|
2960
|
+
break;
|
|
2961
|
+
case 5:
|
|
2962
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.processorFields, reader, reader.readString, reader.readString));
|
|
2963
|
+
break;
|
|
2964
|
+
default: reader.skipField();
|
|
2965
|
+
}
|
|
2966
|
+
}
|
|
2967
|
+
return message;
|
|
2968
|
+
}
|
|
2969
|
+
serializeBinary() {
|
|
2970
|
+
return this.serialize();
|
|
2971
|
+
}
|
|
2972
|
+
static deserializeBinary(bytes) {
|
|
2973
|
+
return ProcessorData.deserialize(bytes);
|
|
2974
|
+
}
|
|
2975
|
+
}
|
|
2976
|
+
terminalTransactions.ProcessorData = ProcessorData;
|
|
2977
|
+
class TransactionReceipt extends pb_1.Message {
|
|
2978
|
+
#one_of_decls = [];
|
|
2979
|
+
constructor(data) {
|
|
2980
|
+
super();
|
|
2981
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls);
|
|
2982
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
2983
|
+
if ("merchantName" in data && data.merchantName != undefined) {
|
|
2984
|
+
this.merchantName = data.merchantName;
|
|
2985
|
+
}
|
|
2986
|
+
if ("merchantAddress" in data && data.merchantAddress != undefined) {
|
|
2987
|
+
this.merchantAddress = data.merchantAddress;
|
|
2988
|
+
}
|
|
2989
|
+
if ("terminalDisplayName" in data && data.terminalDisplayName != undefined) {
|
|
2990
|
+
this.terminalDisplayName = data.terminalDisplayName;
|
|
2991
|
+
}
|
|
2992
|
+
if ("receiptNumber" in data && data.receiptNumber != undefined) {
|
|
2993
|
+
this.receiptNumber = data.receiptNumber;
|
|
2994
|
+
}
|
|
2995
|
+
if ("lines" in data && data.lines != undefined) {
|
|
2996
|
+
this.lines = data.lines;
|
|
2997
|
+
}
|
|
2998
|
+
if ("footerMessage" in data && data.footerMessage != undefined) {
|
|
2999
|
+
this.footerMessage = data.footerMessage;
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
get merchantName() {
|
|
3004
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
3005
|
+
}
|
|
3006
|
+
set merchantName(value) {
|
|
3007
|
+
pb_1.Message.setField(this, 1, value);
|
|
3008
|
+
}
|
|
3009
|
+
get merchantAddress() {
|
|
3010
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
3011
|
+
}
|
|
3012
|
+
set merchantAddress(value) {
|
|
3013
|
+
pb_1.Message.setField(this, 2, value);
|
|
3014
|
+
}
|
|
3015
|
+
get terminalDisplayName() {
|
|
3016
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
3017
|
+
}
|
|
3018
|
+
set terminalDisplayName(value) {
|
|
3019
|
+
pb_1.Message.setField(this, 3, value);
|
|
3020
|
+
}
|
|
3021
|
+
get receiptNumber() {
|
|
3022
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
3023
|
+
}
|
|
3024
|
+
set receiptNumber(value) {
|
|
3025
|
+
pb_1.Message.setField(this, 4, value);
|
|
3026
|
+
}
|
|
3027
|
+
get lines() {
|
|
3028
|
+
return pb_1.Message.getRepeatedWrapperField(this, ReceiptLine, 5);
|
|
3029
|
+
}
|
|
3030
|
+
set lines(value) {
|
|
3031
|
+
pb_1.Message.setRepeatedWrapperField(this, 5, value);
|
|
3032
|
+
}
|
|
3033
|
+
get footerMessage() {
|
|
3034
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
3035
|
+
}
|
|
3036
|
+
set footerMessage(value) {
|
|
3037
|
+
pb_1.Message.setField(this, 6, value);
|
|
3038
|
+
}
|
|
3039
|
+
static fromObject(data) {
|
|
3040
|
+
const message = new TransactionReceipt({});
|
|
3041
|
+
if (data.merchantName != null) {
|
|
3042
|
+
message.merchantName = data.merchantName;
|
|
3043
|
+
}
|
|
3044
|
+
if (data.merchantAddress != null) {
|
|
3045
|
+
message.merchantAddress = data.merchantAddress;
|
|
3046
|
+
}
|
|
3047
|
+
if (data.terminalDisplayName != null) {
|
|
3048
|
+
message.terminalDisplayName = data.terminalDisplayName;
|
|
3049
|
+
}
|
|
3050
|
+
if (data.receiptNumber != null) {
|
|
3051
|
+
message.receiptNumber = data.receiptNumber;
|
|
3052
|
+
}
|
|
3053
|
+
if (data.lines != null) {
|
|
3054
|
+
message.lines = data.lines.map(item => ReceiptLine.fromObject(item));
|
|
3055
|
+
}
|
|
3056
|
+
if (data.footerMessage != null) {
|
|
3057
|
+
message.footerMessage = data.footerMessage;
|
|
3058
|
+
}
|
|
3059
|
+
return message;
|
|
3060
|
+
}
|
|
3061
|
+
toObject() {
|
|
3062
|
+
const data = {};
|
|
3063
|
+
if (this.merchantName != null) {
|
|
3064
|
+
data.merchantName = this.merchantName;
|
|
3065
|
+
}
|
|
3066
|
+
if (this.merchantAddress != null) {
|
|
3067
|
+
data.merchantAddress = this.merchantAddress;
|
|
3068
|
+
}
|
|
3069
|
+
if (this.terminalDisplayName != null) {
|
|
3070
|
+
data.terminalDisplayName = this.terminalDisplayName;
|
|
3071
|
+
}
|
|
3072
|
+
if (this.receiptNumber != null) {
|
|
3073
|
+
data.receiptNumber = this.receiptNumber;
|
|
3074
|
+
}
|
|
3075
|
+
if (this.lines != null) {
|
|
3076
|
+
data.lines = this.lines.map((item) => item.toObject());
|
|
3077
|
+
}
|
|
3078
|
+
if (this.footerMessage != null) {
|
|
3079
|
+
data.footerMessage = this.footerMessage;
|
|
3080
|
+
}
|
|
3081
|
+
return data;
|
|
3082
|
+
}
|
|
3083
|
+
serialize(w) {
|
|
3084
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
3085
|
+
if (this.merchantName.length)
|
|
3086
|
+
writer.writeString(1, this.merchantName);
|
|
3087
|
+
if (this.merchantAddress.length)
|
|
3088
|
+
writer.writeString(2, this.merchantAddress);
|
|
3089
|
+
if (this.terminalDisplayName.length)
|
|
3090
|
+
writer.writeString(3, this.terminalDisplayName);
|
|
3091
|
+
if (this.receiptNumber.length)
|
|
3092
|
+
writer.writeString(4, this.receiptNumber);
|
|
3093
|
+
if (this.lines.length)
|
|
3094
|
+
writer.writeRepeatedMessage(5, this.lines, (item) => item.serialize(writer));
|
|
3095
|
+
if (this.footerMessage.length)
|
|
3096
|
+
writer.writeString(6, this.footerMessage);
|
|
3097
|
+
if (!w)
|
|
3098
|
+
return writer.getResultBuffer();
|
|
3099
|
+
}
|
|
3100
|
+
static deserialize(bytes) {
|
|
3101
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionReceipt();
|
|
3102
|
+
while (reader.nextField()) {
|
|
3103
|
+
if (reader.isEndGroup())
|
|
3104
|
+
break;
|
|
3105
|
+
switch (reader.getFieldNumber()) {
|
|
3106
|
+
case 1:
|
|
3107
|
+
message.merchantName = reader.readString();
|
|
3108
|
+
break;
|
|
3109
|
+
case 2:
|
|
3110
|
+
message.merchantAddress = reader.readString();
|
|
3111
|
+
break;
|
|
3112
|
+
case 3:
|
|
3113
|
+
message.terminalDisplayName = reader.readString();
|
|
3114
|
+
break;
|
|
3115
|
+
case 4:
|
|
3116
|
+
message.receiptNumber = reader.readString();
|
|
3117
|
+
break;
|
|
3118
|
+
case 5:
|
|
3119
|
+
reader.readMessage(message.lines, () => pb_1.Message.addToRepeatedWrapperField(message, 5, ReceiptLine.deserialize(reader), ReceiptLine));
|
|
3120
|
+
break;
|
|
3121
|
+
case 6:
|
|
3122
|
+
message.footerMessage = reader.readString();
|
|
3123
|
+
break;
|
|
3124
|
+
default: reader.skipField();
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
return message;
|
|
3128
|
+
}
|
|
3129
|
+
serializeBinary() {
|
|
3130
|
+
return this.serialize();
|
|
3131
|
+
}
|
|
3132
|
+
static deserializeBinary(bytes) {
|
|
3133
|
+
return TransactionReceipt.deserialize(bytes);
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
terminalTransactions.TransactionReceipt = TransactionReceipt;
|
|
3137
|
+
class AuditEventData extends pb_1.Message {
|
|
3138
|
+
#one_of_decls = [];
|
|
3139
|
+
constructor(data) {
|
|
3140
|
+
super();
|
|
3141
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
3142
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
3143
|
+
if ("previousStatus" in data && data.previousStatus != undefined) {
|
|
3144
|
+
this.previousStatus = data.previousStatus;
|
|
3145
|
+
}
|
|
3146
|
+
if ("newStatus" in data && data.newStatus != undefined) {
|
|
3147
|
+
this.newStatus = data.newStatus;
|
|
3148
|
+
}
|
|
3149
|
+
if ("previousStep" in data && data.previousStep != undefined) {
|
|
3150
|
+
this.previousStep = data.previousStep;
|
|
3151
|
+
}
|
|
3152
|
+
if ("newStep" in data && data.newStep != undefined) {
|
|
3153
|
+
this.newStep = data.newStep;
|
|
3154
|
+
}
|
|
3155
|
+
if ("changedFields" in data && data.changedFields != undefined) {
|
|
3156
|
+
this.changedFields = data.changedFields;
|
|
3157
|
+
}
|
|
3158
|
+
if ("errorMessage" in data && data.errorMessage != undefined) {
|
|
3159
|
+
this.errorMessage = data.errorMessage;
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
if (!this.changedFields)
|
|
3163
|
+
this.changedFields = new Map();
|
|
3164
|
+
}
|
|
3165
|
+
get previousStatus() {
|
|
3166
|
+
return pb_1.Message.getFieldWithDefault(this, 1, TransactionStatus.STATUS_UNSPECIFIED);
|
|
3167
|
+
}
|
|
3168
|
+
set previousStatus(value) {
|
|
3169
|
+
pb_1.Message.setField(this, 1, value);
|
|
3170
|
+
}
|
|
3171
|
+
get newStatus() {
|
|
3172
|
+
return pb_1.Message.getFieldWithDefault(this, 2, TransactionStatus.STATUS_UNSPECIFIED);
|
|
3173
|
+
}
|
|
3174
|
+
set newStatus(value) {
|
|
3175
|
+
pb_1.Message.setField(this, 2, value);
|
|
3176
|
+
}
|
|
3177
|
+
get previousStep() {
|
|
3178
|
+
return pb_1.Message.getFieldWithDefault(this, 3, TransactionStep.STEP_UNSPECIFIED);
|
|
3179
|
+
}
|
|
3180
|
+
set previousStep(value) {
|
|
3181
|
+
pb_1.Message.setField(this, 3, value);
|
|
3182
|
+
}
|
|
3183
|
+
get newStep() {
|
|
3184
|
+
return pb_1.Message.getFieldWithDefault(this, 4, TransactionStep.STEP_UNSPECIFIED);
|
|
3185
|
+
}
|
|
3186
|
+
set newStep(value) {
|
|
3187
|
+
pb_1.Message.setField(this, 4, value);
|
|
3188
|
+
}
|
|
3189
|
+
get changedFields() {
|
|
3190
|
+
return pb_1.Message.getField(this, 5);
|
|
3191
|
+
}
|
|
3192
|
+
set changedFields(value) {
|
|
3193
|
+
pb_1.Message.setField(this, 5, value);
|
|
3194
|
+
}
|
|
3195
|
+
get errorMessage() {
|
|
3196
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
3197
|
+
}
|
|
3198
|
+
set errorMessage(value) {
|
|
3199
|
+
pb_1.Message.setField(this, 6, value);
|
|
3200
|
+
}
|
|
3201
|
+
static fromObject(data) {
|
|
3202
|
+
const message = new AuditEventData({});
|
|
3203
|
+
if (data.previousStatus != null) {
|
|
3204
|
+
message.previousStatus = data.previousStatus;
|
|
3205
|
+
}
|
|
3206
|
+
if (data.newStatus != null) {
|
|
3207
|
+
message.newStatus = data.newStatus;
|
|
3208
|
+
}
|
|
3209
|
+
if (data.previousStep != null) {
|
|
3210
|
+
message.previousStep = data.previousStep;
|
|
3211
|
+
}
|
|
3212
|
+
if (data.newStep != null) {
|
|
3213
|
+
message.newStep = data.newStep;
|
|
3214
|
+
}
|
|
3215
|
+
if (typeof data.changedFields == "object") {
|
|
3216
|
+
message.changedFields = new Map(Object.entries(data.changedFields));
|
|
3217
|
+
}
|
|
3218
|
+
if (data.errorMessage != null) {
|
|
3219
|
+
message.errorMessage = data.errorMessage;
|
|
3220
|
+
}
|
|
3221
|
+
return message;
|
|
3222
|
+
}
|
|
3223
|
+
toObject() {
|
|
3224
|
+
const data = {};
|
|
3225
|
+
if (this.previousStatus != null) {
|
|
3226
|
+
data.previousStatus = this.previousStatus;
|
|
3227
|
+
}
|
|
3228
|
+
if (this.newStatus != null) {
|
|
3229
|
+
data.newStatus = this.newStatus;
|
|
3230
|
+
}
|
|
3231
|
+
if (this.previousStep != null) {
|
|
3232
|
+
data.previousStep = this.previousStep;
|
|
3233
|
+
}
|
|
3234
|
+
if (this.newStep != null) {
|
|
3235
|
+
data.newStep = this.newStep;
|
|
3236
|
+
}
|
|
3237
|
+
if (this.changedFields != null) {
|
|
3238
|
+
data.changedFields = (Object.fromEntries)(this.changedFields);
|
|
3239
|
+
}
|
|
3240
|
+
if (this.errorMessage != null) {
|
|
3241
|
+
data.errorMessage = this.errorMessage;
|
|
3242
|
+
}
|
|
3243
|
+
return data;
|
|
3244
|
+
}
|
|
3245
|
+
serialize(w) {
|
|
3246
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
3247
|
+
if (this.previousStatus != TransactionStatus.STATUS_UNSPECIFIED)
|
|
3248
|
+
writer.writeEnum(1, this.previousStatus);
|
|
3249
|
+
if (this.newStatus != TransactionStatus.STATUS_UNSPECIFIED)
|
|
3250
|
+
writer.writeEnum(2, this.newStatus);
|
|
3251
|
+
if (this.previousStep != TransactionStep.STEP_UNSPECIFIED)
|
|
3252
|
+
writer.writeEnum(3, this.previousStep);
|
|
3253
|
+
if (this.newStep != TransactionStep.STEP_UNSPECIFIED)
|
|
3254
|
+
writer.writeEnum(4, this.newStep);
|
|
3255
|
+
for (const [key, value] of this.changedFields) {
|
|
3256
|
+
writer.writeMessage(5, this.changedFields, () => {
|
|
3257
|
+
writer.writeString(1, key);
|
|
3258
|
+
writer.writeString(2, value);
|
|
3259
|
+
});
|
|
3260
|
+
}
|
|
3261
|
+
if (this.errorMessage.length)
|
|
3262
|
+
writer.writeString(6, this.errorMessage);
|
|
3263
|
+
if (!w)
|
|
3264
|
+
return writer.getResultBuffer();
|
|
3265
|
+
}
|
|
3266
|
+
static deserialize(bytes) {
|
|
3267
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuditEventData();
|
|
3268
|
+
while (reader.nextField()) {
|
|
3269
|
+
if (reader.isEndGroup())
|
|
3270
|
+
break;
|
|
3271
|
+
switch (reader.getFieldNumber()) {
|
|
3272
|
+
case 1:
|
|
3273
|
+
message.previousStatus = reader.readEnum();
|
|
3274
|
+
break;
|
|
3275
|
+
case 2:
|
|
3276
|
+
message.newStatus = reader.readEnum();
|
|
3277
|
+
break;
|
|
3278
|
+
case 3:
|
|
3279
|
+
message.previousStep = reader.readEnum();
|
|
3280
|
+
break;
|
|
3281
|
+
case 4:
|
|
3282
|
+
message.newStep = reader.readEnum();
|
|
3283
|
+
break;
|
|
3284
|
+
case 5:
|
|
3285
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.changedFields, reader, reader.readString, reader.readString));
|
|
3286
|
+
break;
|
|
3287
|
+
case 6:
|
|
3288
|
+
message.errorMessage = reader.readString();
|
|
3289
|
+
break;
|
|
3290
|
+
default: reader.skipField();
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
return message;
|
|
3294
|
+
}
|
|
3295
|
+
serializeBinary() {
|
|
3296
|
+
return this.serialize();
|
|
3297
|
+
}
|
|
3298
|
+
static deserializeBinary(bytes) {
|
|
3299
|
+
return AuditEventData.deserialize(bytes);
|
|
3300
|
+
}
|
|
3301
|
+
}
|
|
3302
|
+
terminalTransactions.AuditEventData = AuditEventData;
|
|
3303
|
+
class ReceiptLine extends pb_1.Message {
|
|
3304
|
+
#one_of_decls = [];
|
|
3305
|
+
constructor(data) {
|
|
3306
|
+
super();
|
|
3307
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
3308
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
3309
|
+
if ("type" in data && data.type != undefined) {
|
|
3310
|
+
this.type = data.type;
|
|
3311
|
+
}
|
|
3312
|
+
if ("text" in data && data.text != undefined) {
|
|
3313
|
+
this.text = data.text;
|
|
3314
|
+
}
|
|
3315
|
+
if ("alignment" in data && data.alignment != undefined) {
|
|
3316
|
+
this.alignment = data.alignment;
|
|
3317
|
+
}
|
|
3318
|
+
if ("bold" in data && data.bold != undefined) {
|
|
3319
|
+
this.bold = data.bold;
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
}
|
|
3323
|
+
get type() {
|
|
3324
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
3325
|
+
}
|
|
3326
|
+
set type(value) {
|
|
3327
|
+
pb_1.Message.setField(this, 1, value);
|
|
3328
|
+
}
|
|
3329
|
+
get text() {
|
|
3330
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
3331
|
+
}
|
|
3332
|
+
set text(value) {
|
|
3333
|
+
pb_1.Message.setField(this, 2, value);
|
|
3334
|
+
}
|
|
3335
|
+
get alignment() {
|
|
3336
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
3337
|
+
}
|
|
3338
|
+
set alignment(value) {
|
|
3339
|
+
pb_1.Message.setField(this, 3, value);
|
|
3340
|
+
}
|
|
3341
|
+
get bold() {
|
|
3342
|
+
return pb_1.Message.getFieldWithDefault(this, 4, false);
|
|
3343
|
+
}
|
|
3344
|
+
set bold(value) {
|
|
3345
|
+
pb_1.Message.setField(this, 4, value);
|
|
3346
|
+
}
|
|
3347
|
+
static fromObject(data) {
|
|
3348
|
+
const message = new ReceiptLine({});
|
|
3349
|
+
if (data.type != null) {
|
|
3350
|
+
message.type = data.type;
|
|
3351
|
+
}
|
|
3352
|
+
if (data.text != null) {
|
|
3353
|
+
message.text = data.text;
|
|
3354
|
+
}
|
|
3355
|
+
if (data.alignment != null) {
|
|
3356
|
+
message.alignment = data.alignment;
|
|
3357
|
+
}
|
|
3358
|
+
if (data.bold != null) {
|
|
3359
|
+
message.bold = data.bold;
|
|
3360
|
+
}
|
|
3361
|
+
return message;
|
|
3362
|
+
}
|
|
3363
|
+
toObject() {
|
|
3364
|
+
const data = {};
|
|
3365
|
+
if (this.type != null) {
|
|
3366
|
+
data.type = this.type;
|
|
3367
|
+
}
|
|
3368
|
+
if (this.text != null) {
|
|
3369
|
+
data.text = this.text;
|
|
3370
|
+
}
|
|
3371
|
+
if (this.alignment != null) {
|
|
3372
|
+
data.alignment = this.alignment;
|
|
3373
|
+
}
|
|
3374
|
+
if (this.bold != null) {
|
|
3375
|
+
data.bold = this.bold;
|
|
3376
|
+
}
|
|
3377
|
+
return data;
|
|
3378
|
+
}
|
|
3379
|
+
serialize(w) {
|
|
3380
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
3381
|
+
if (this.type.length)
|
|
3382
|
+
writer.writeString(1, this.type);
|
|
3383
|
+
if (this.text.length)
|
|
3384
|
+
writer.writeString(2, this.text);
|
|
3385
|
+
if (this.alignment.length)
|
|
3386
|
+
writer.writeString(3, this.alignment);
|
|
3387
|
+
if (this.bold != false)
|
|
3388
|
+
writer.writeBool(4, this.bold);
|
|
3389
|
+
if (!w)
|
|
3390
|
+
return writer.getResultBuffer();
|
|
3391
|
+
}
|
|
3392
|
+
static deserialize(bytes) {
|
|
3393
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ReceiptLine();
|
|
3394
|
+
while (reader.nextField()) {
|
|
3395
|
+
if (reader.isEndGroup())
|
|
3396
|
+
break;
|
|
3397
|
+
switch (reader.getFieldNumber()) {
|
|
3398
|
+
case 1:
|
|
3399
|
+
message.type = reader.readString();
|
|
3400
|
+
break;
|
|
3401
|
+
case 2:
|
|
3402
|
+
message.text = reader.readString();
|
|
3403
|
+
break;
|
|
3404
|
+
case 3:
|
|
3405
|
+
message.alignment = reader.readString();
|
|
3406
|
+
break;
|
|
3407
|
+
case 4:
|
|
3408
|
+
message.bold = reader.readBool();
|
|
3409
|
+
break;
|
|
3410
|
+
default: reader.skipField();
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3413
|
+
return message;
|
|
3414
|
+
}
|
|
3415
|
+
serializeBinary() {
|
|
3416
|
+
return this.serialize();
|
|
3417
|
+
}
|
|
3418
|
+
static deserializeBinary(bytes) {
|
|
3419
|
+
return ReceiptLine.deserialize(bytes);
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
terminalTransactions.ReceiptLine = ReceiptLine;
|
|
3423
|
+
class TransactionTag extends pb_1.Message {
|
|
3424
|
+
#one_of_decls = [];
|
|
3425
|
+
constructor(data) {
|
|
3426
|
+
super();
|
|
3427
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
3428
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
3429
|
+
if ("key" in data && data.key != undefined) {
|
|
3430
|
+
this.key = data.key;
|
|
3431
|
+
}
|
|
3432
|
+
if ("value" in data && data.value != undefined) {
|
|
3433
|
+
this.value = data.value;
|
|
3434
|
+
}
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
get key() {
|
|
3438
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
3439
|
+
}
|
|
3440
|
+
set key(value) {
|
|
3441
|
+
pb_1.Message.setField(this, 1, value);
|
|
3442
|
+
}
|
|
3443
|
+
get value() {
|
|
3444
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
3445
|
+
}
|
|
3446
|
+
set value(value) {
|
|
3447
|
+
pb_1.Message.setField(this, 2, value);
|
|
3448
|
+
}
|
|
3449
|
+
static fromObject(data) {
|
|
3450
|
+
const message = new TransactionTag({});
|
|
3451
|
+
if (data.key != null) {
|
|
3452
|
+
message.key = data.key;
|
|
3453
|
+
}
|
|
3454
|
+
if (data.value != null) {
|
|
3455
|
+
message.value = data.value;
|
|
3456
|
+
}
|
|
3457
|
+
return message;
|
|
3458
|
+
}
|
|
3459
|
+
toObject() {
|
|
3460
|
+
const data = {};
|
|
3461
|
+
if (this.key != null) {
|
|
3462
|
+
data.key = this.key;
|
|
3463
|
+
}
|
|
3464
|
+
if (this.value != null) {
|
|
3465
|
+
data.value = this.value;
|
|
3466
|
+
}
|
|
3467
|
+
return data;
|
|
3468
|
+
}
|
|
3469
|
+
serialize(w) {
|
|
3470
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
3471
|
+
if (this.key.length)
|
|
3472
|
+
writer.writeString(1, this.key);
|
|
3473
|
+
if (this.value.length)
|
|
3474
|
+
writer.writeString(2, this.value);
|
|
3475
|
+
if (!w)
|
|
3476
|
+
return writer.getResultBuffer();
|
|
3477
|
+
}
|
|
3478
|
+
static deserialize(bytes) {
|
|
3479
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionTag();
|
|
3480
|
+
while (reader.nextField()) {
|
|
3481
|
+
if (reader.isEndGroup())
|
|
3482
|
+
break;
|
|
3483
|
+
switch (reader.getFieldNumber()) {
|
|
3484
|
+
case 1:
|
|
3485
|
+
message.key = reader.readString();
|
|
3486
|
+
break;
|
|
3487
|
+
case 2:
|
|
3488
|
+
message.value = reader.readString();
|
|
3489
|
+
break;
|
|
3490
|
+
default: reader.skipField();
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3493
|
+
return message;
|
|
3494
|
+
}
|
|
3495
|
+
serializeBinary() {
|
|
3496
|
+
return this.serialize();
|
|
3497
|
+
}
|
|
3498
|
+
static deserializeBinary(bytes) {
|
|
3499
|
+
return TransactionTag.deserialize(bytes);
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
terminalTransactions.TransactionTag = TransactionTag;
|
|
3503
|
+
class ValidationError extends pb_1.Message {
|
|
3504
|
+
#one_of_decls = [];
|
|
3505
|
+
constructor(data) {
|
|
3506
|
+
super();
|
|
3507
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
3508
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
3509
|
+
if ("field" in data && data.field != undefined) {
|
|
3510
|
+
this.field = data.field;
|
|
3511
|
+
}
|
|
3512
|
+
if ("message" in data && data.message != undefined) {
|
|
3513
|
+
this.message = data.message;
|
|
3514
|
+
}
|
|
3515
|
+
if ("code" in data && data.code != undefined) {
|
|
3516
|
+
this.code = data.code;
|
|
3517
|
+
}
|
|
3518
|
+
}
|
|
3519
|
+
}
|
|
3520
|
+
get field() {
|
|
3521
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
3522
|
+
}
|
|
3523
|
+
set field(value) {
|
|
3524
|
+
pb_1.Message.setField(this, 1, value);
|
|
3525
|
+
}
|
|
3526
|
+
get message() {
|
|
3527
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
3528
|
+
}
|
|
3529
|
+
set message(value) {
|
|
3530
|
+
pb_1.Message.setField(this, 2, value);
|
|
3531
|
+
}
|
|
3532
|
+
get code() {
|
|
3533
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
3534
|
+
}
|
|
3535
|
+
set code(value) {
|
|
3536
|
+
pb_1.Message.setField(this, 3, value);
|
|
3537
|
+
}
|
|
3538
|
+
static fromObject(data) {
|
|
3539
|
+
const message = new ValidationError({});
|
|
3540
|
+
if (data.field != null) {
|
|
3541
|
+
message.field = data.field;
|
|
3542
|
+
}
|
|
3543
|
+
if (data.message != null) {
|
|
3544
|
+
message.message = data.message;
|
|
3545
|
+
}
|
|
3546
|
+
if (data.code != null) {
|
|
3547
|
+
message.code = data.code;
|
|
3548
|
+
}
|
|
3549
|
+
return message;
|
|
3550
|
+
}
|
|
3551
|
+
toObject() {
|
|
3552
|
+
const data = {};
|
|
3553
|
+
if (this.field != null) {
|
|
3554
|
+
data.field = this.field;
|
|
3555
|
+
}
|
|
3556
|
+
if (this.message != null) {
|
|
3557
|
+
data.message = this.message;
|
|
3558
|
+
}
|
|
3559
|
+
if (this.code != null) {
|
|
3560
|
+
data.code = this.code;
|
|
3561
|
+
}
|
|
3562
|
+
return data;
|
|
3563
|
+
}
|
|
3564
|
+
serialize(w) {
|
|
3565
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
3566
|
+
if (this.field.length)
|
|
3567
|
+
writer.writeString(1, this.field);
|
|
3568
|
+
if (this.message.length)
|
|
3569
|
+
writer.writeString(2, this.message);
|
|
3570
|
+
if (this.code.length)
|
|
3571
|
+
writer.writeString(3, this.code);
|
|
3572
|
+
if (!w)
|
|
3573
|
+
return writer.getResultBuffer();
|
|
3574
|
+
}
|
|
3575
|
+
static deserialize(bytes) {
|
|
3576
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidationError();
|
|
3577
|
+
while (reader.nextField()) {
|
|
3578
|
+
if (reader.isEndGroup())
|
|
3579
|
+
break;
|
|
3580
|
+
switch (reader.getFieldNumber()) {
|
|
3581
|
+
case 1:
|
|
3582
|
+
message.field = reader.readString();
|
|
3583
|
+
break;
|
|
3584
|
+
case 2:
|
|
3585
|
+
message.message = reader.readString();
|
|
3586
|
+
break;
|
|
3587
|
+
case 3:
|
|
3588
|
+
message.code = reader.readString();
|
|
3589
|
+
break;
|
|
3590
|
+
default: reader.skipField();
|
|
3591
|
+
}
|
|
3592
|
+
}
|
|
3593
|
+
return message;
|
|
3594
|
+
}
|
|
3595
|
+
serializeBinary() {
|
|
3596
|
+
return this.serialize();
|
|
3597
|
+
}
|
|
3598
|
+
static deserializeBinary(bytes) {
|
|
3599
|
+
return ValidationError.deserialize(bytes);
|
|
3600
|
+
}
|
|
3601
|
+
}
|
|
3602
|
+
terminalTransactions.ValidationError = ValidationError;
|
|
3603
|
+
class UnimplementedTerminalTransactionServiceService {
|
|
3604
|
+
static definition = {
|
|
3605
|
+
InitializeTransaction: {
|
|
3606
|
+
path: "/com.pkg.posv1.terminalTransactions.TerminalTransactionService/InitializeTransaction",
|
|
3607
|
+
requestStream: false,
|
|
3608
|
+
responseStream: false,
|
|
3609
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
3610
|
+
requestDeserialize: (bytes) => TransactionInitRequest.deserialize(new Uint8Array(bytes)),
|
|
3611
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
3612
|
+
responseDeserialize: (bytes) => TransactionResult.deserialize(new Uint8Array(bytes))
|
|
3613
|
+
},
|
|
3614
|
+
CompleteTransaction: {
|
|
3615
|
+
path: "/com.pkg.posv1.terminalTransactions.TerminalTransactionService/CompleteTransaction",
|
|
3616
|
+
requestStream: false,
|
|
3617
|
+
responseStream: false,
|
|
3618
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
3619
|
+
requestDeserialize: (bytes) => TransactionCompleteRequest.deserialize(new Uint8Array(bytes)),
|
|
3620
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
3621
|
+
responseDeserialize: (bytes) => TransactionResult.deserialize(new Uint8Array(bytes))
|
|
3622
|
+
},
|
|
3623
|
+
ReverseTransaction: {
|
|
3624
|
+
path: "/com.pkg.posv1.terminalTransactions.TerminalTransactionService/ReverseTransaction",
|
|
3625
|
+
requestStream: false,
|
|
3626
|
+
responseStream: false,
|
|
3627
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
3628
|
+
requestDeserialize: (bytes) => TransactionReversalRequest.deserialize(new Uint8Array(bytes)),
|
|
3629
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
3630
|
+
responseDeserialize: (bytes) => TransactionResult.deserialize(new Uint8Array(bytes))
|
|
3631
|
+
},
|
|
3632
|
+
GetTransactionTimeline: {
|
|
3633
|
+
path: "/com.pkg.posv1.terminalTransactions.TerminalTransactionService/GetTransactionTimeline",
|
|
3634
|
+
requestStream: false,
|
|
3635
|
+
responseStream: false,
|
|
3636
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
3637
|
+
requestDeserialize: (bytes) => TransactionTimelineRequest.deserialize(new Uint8Array(bytes)),
|
|
3638
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
3639
|
+
responseDeserialize: (bytes) => TransactionTimeline.deserialize(new Uint8Array(bytes))
|
|
3640
|
+
},
|
|
3641
|
+
GetTerminalTransactions: {
|
|
3642
|
+
path: "/com.pkg.posv1.terminalTransactions.TerminalTransactionService/GetTerminalTransactions",
|
|
3643
|
+
requestStream: false,
|
|
3644
|
+
responseStream: false,
|
|
3645
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
3646
|
+
requestDeserialize: (bytes) => TerminalTransactionsFilter.deserialize(new Uint8Array(bytes)),
|
|
3647
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
3648
|
+
responseDeserialize: (bytes) => TerminalTransactionsResponse.deserialize(new Uint8Array(bytes))
|
|
3649
|
+
},
|
|
3650
|
+
GetAllTransactions: {
|
|
3651
|
+
path: "/com.pkg.posv1.terminalTransactions.TerminalTransactionService/GetAllTransactions",
|
|
3652
|
+
requestStream: false,
|
|
3653
|
+
responseStream: false,
|
|
3654
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
3655
|
+
requestDeserialize: (bytes) => AllTransactionsFilter.deserialize(new Uint8Array(bytes)),
|
|
3656
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
3657
|
+
responseDeserialize: (bytes) => TerminalTransactionsResponse.deserialize(new Uint8Array(bytes))
|
|
3658
|
+
},
|
|
3659
|
+
GetTransactionDetails: {
|
|
3660
|
+
path: "/com.pkg.posv1.terminalTransactions.TerminalTransactionService/GetTransactionDetails",
|
|
3661
|
+
requestStream: false,
|
|
3662
|
+
responseStream: false,
|
|
3663
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
3664
|
+
requestDeserialize: (bytes) => TransactionDetailsRequest.deserialize(new Uint8Array(bytes)),
|
|
3665
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
3666
|
+
responseDeserialize: (bytes) => TransactionDetailsResponse.deserialize(new Uint8Array(bytes))
|
|
3667
|
+
}
|
|
3668
|
+
};
|
|
3669
|
+
}
|
|
3670
|
+
terminalTransactions.UnimplementedTerminalTransactionServiceService = UnimplementedTerminalTransactionServiceService;
|
|
3671
|
+
class TerminalTransactionServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedTerminalTransactionServiceService.definition, "TerminalTransactionService", {}) {
|
|
3672
|
+
constructor(address, credentials, options) {
|
|
3673
|
+
super(address, credentials, options);
|
|
3674
|
+
}
|
|
3675
|
+
InitializeTransaction = (message, metadata, options) => {
|
|
3676
|
+
if (!metadata) {
|
|
3677
|
+
metadata = new grpc_1.Metadata;
|
|
3678
|
+
}
|
|
3679
|
+
if (!options) {
|
|
3680
|
+
options = {};
|
|
3681
|
+
}
|
|
3682
|
+
return new Promise((resolve, reject) => super.InitializeTransaction(message, metadata, options, (error, response) => {
|
|
3683
|
+
if (error) {
|
|
3684
|
+
reject(error);
|
|
3685
|
+
}
|
|
3686
|
+
else {
|
|
3687
|
+
resolve(response);
|
|
3688
|
+
}
|
|
3689
|
+
}));
|
|
3690
|
+
};
|
|
3691
|
+
CompleteTransaction = (message, metadata, options) => {
|
|
3692
|
+
if (!metadata) {
|
|
3693
|
+
metadata = new grpc_1.Metadata;
|
|
3694
|
+
}
|
|
3695
|
+
if (!options) {
|
|
3696
|
+
options = {};
|
|
3697
|
+
}
|
|
3698
|
+
return new Promise((resolve, reject) => super.CompleteTransaction(message, metadata, options, (error, response) => {
|
|
3699
|
+
if (error) {
|
|
3700
|
+
reject(error);
|
|
3701
|
+
}
|
|
3702
|
+
else {
|
|
3703
|
+
resolve(response);
|
|
3704
|
+
}
|
|
3705
|
+
}));
|
|
3706
|
+
};
|
|
3707
|
+
ReverseTransaction = (message, metadata, options) => {
|
|
3708
|
+
if (!metadata) {
|
|
3709
|
+
metadata = new grpc_1.Metadata;
|
|
3710
|
+
}
|
|
3711
|
+
if (!options) {
|
|
3712
|
+
options = {};
|
|
3713
|
+
}
|
|
3714
|
+
return new Promise((resolve, reject) => super.ReverseTransaction(message, metadata, options, (error, response) => {
|
|
3715
|
+
if (error) {
|
|
3716
|
+
reject(error);
|
|
3717
|
+
}
|
|
3718
|
+
else {
|
|
3719
|
+
resolve(response);
|
|
3720
|
+
}
|
|
3721
|
+
}));
|
|
3722
|
+
};
|
|
3723
|
+
GetTransactionTimeline = (message, metadata, options) => {
|
|
3724
|
+
if (!metadata) {
|
|
3725
|
+
metadata = new grpc_1.Metadata;
|
|
3726
|
+
}
|
|
3727
|
+
if (!options) {
|
|
3728
|
+
options = {};
|
|
3729
|
+
}
|
|
3730
|
+
return new Promise((resolve, reject) => super.GetTransactionTimeline(message, metadata, options, (error, response) => {
|
|
3731
|
+
if (error) {
|
|
3732
|
+
reject(error);
|
|
3733
|
+
}
|
|
3734
|
+
else {
|
|
3735
|
+
resolve(response);
|
|
3736
|
+
}
|
|
3737
|
+
}));
|
|
3738
|
+
};
|
|
3739
|
+
GetTerminalTransactions = (message, metadata, options) => {
|
|
3740
|
+
if (!metadata) {
|
|
3741
|
+
metadata = new grpc_1.Metadata;
|
|
3742
|
+
}
|
|
3743
|
+
if (!options) {
|
|
3744
|
+
options = {};
|
|
3745
|
+
}
|
|
3746
|
+
return new Promise((resolve, reject) => super.GetTerminalTransactions(message, metadata, options, (error, response) => {
|
|
3747
|
+
if (error) {
|
|
3748
|
+
reject(error);
|
|
3749
|
+
}
|
|
3750
|
+
else {
|
|
3751
|
+
resolve(response);
|
|
3752
|
+
}
|
|
3753
|
+
}));
|
|
3754
|
+
};
|
|
3755
|
+
GetAllTransactions = (message, metadata, options) => {
|
|
3756
|
+
if (!metadata) {
|
|
3757
|
+
metadata = new grpc_1.Metadata;
|
|
3758
|
+
}
|
|
3759
|
+
if (!options) {
|
|
3760
|
+
options = {};
|
|
3761
|
+
}
|
|
3762
|
+
return new Promise((resolve, reject) => super.GetAllTransactions(message, metadata, options, (error, response) => {
|
|
3763
|
+
if (error) {
|
|
3764
|
+
reject(error);
|
|
3765
|
+
}
|
|
3766
|
+
else {
|
|
3767
|
+
resolve(response);
|
|
3768
|
+
}
|
|
3769
|
+
}));
|
|
3770
|
+
};
|
|
3771
|
+
GetTransactionDetails = (message, metadata, options) => {
|
|
3772
|
+
if (!metadata) {
|
|
3773
|
+
metadata = new grpc_1.Metadata;
|
|
3774
|
+
}
|
|
3775
|
+
if (!options) {
|
|
3776
|
+
options = {};
|
|
3777
|
+
}
|
|
3778
|
+
return new Promise((resolve, reject) => super.GetTransactionDetails(message, metadata, options, (error, response) => {
|
|
3779
|
+
if (error) {
|
|
3780
|
+
reject(error);
|
|
3781
|
+
}
|
|
3782
|
+
else {
|
|
3783
|
+
resolve(response);
|
|
3784
|
+
}
|
|
3785
|
+
}));
|
|
3786
|
+
};
|
|
3787
|
+
}
|
|
3788
|
+
terminalTransactions.TerminalTransactionServiceClient = TerminalTransactionServiceClient;
|
|
3789
|
+
})(terminalTransactions = posv1.terminalTransactions || (posv1.terminalTransactions = {}));
|
|
3790
|
+
})(posv1 = pkg.posv1 || (pkg.posv1 = {}));
|
|
3791
|
+
})(pkg = com.pkg || (com.pkg = {}));
|
|
3792
|
+
})(com || (exports.com = com = {}));
|