@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,2918 @@
|
|
|
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 transactions;
|
|
36
|
+
(function (transactions) {
|
|
37
|
+
let TransactionStatus;
|
|
38
|
+
(function (TransactionStatus) {
|
|
39
|
+
TransactionStatus[TransactionStatus["PENDING"] = 0] = "PENDING";
|
|
40
|
+
TransactionStatus[TransactionStatus["PROCESSING"] = 1] = "PROCESSING";
|
|
41
|
+
TransactionStatus[TransactionStatus["COMPLETED"] = 2] = "COMPLETED";
|
|
42
|
+
TransactionStatus[TransactionStatus["FAILED"] = 3] = "FAILED";
|
|
43
|
+
TransactionStatus[TransactionStatus["CANCELLED"] = 4] = "CANCELLED";
|
|
44
|
+
TransactionStatus[TransactionStatus["REVERSED"] = 5] = "REVERSED";
|
|
45
|
+
})(TransactionStatus = transactions.TransactionStatus || (transactions.TransactionStatus = {}));
|
|
46
|
+
let ReversalType;
|
|
47
|
+
(function (ReversalType) {
|
|
48
|
+
ReversalType[ReversalType["FULL_REVERSAL"] = 0] = "FULL_REVERSAL";
|
|
49
|
+
ReversalType[ReversalType["PARTIAL_REVERSAL"] = 1] = "PARTIAL_REVERSAL";
|
|
50
|
+
ReversalType[ReversalType["VOID"] = 2] = "VOID";
|
|
51
|
+
})(ReversalType = transactions.ReversalType || (transactions.ReversalType = {}));
|
|
52
|
+
let ReversalStatus;
|
|
53
|
+
(function (ReversalStatus) {
|
|
54
|
+
ReversalStatus[ReversalStatus["REVERSAL_PENDING"] = 0] = "REVERSAL_PENDING";
|
|
55
|
+
ReversalStatus[ReversalStatus["REVERSAL_COMPLETED"] = 1] = "REVERSAL_COMPLETED";
|
|
56
|
+
ReversalStatus[ReversalStatus["REVERSAL_FAILED"] = 2] = "REVERSAL_FAILED";
|
|
57
|
+
ReversalStatus[ReversalStatus["REVERSAL_CANCELLED"] = 3] = "REVERSAL_CANCELLED";
|
|
58
|
+
})(ReversalStatus = transactions.ReversalStatus || (transactions.ReversalStatus = {}));
|
|
59
|
+
class InitTransactionRequest extends pb_1.Message {
|
|
60
|
+
#one_of_decls = [];
|
|
61
|
+
constructor(data) {
|
|
62
|
+
super();
|
|
63
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
64
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
65
|
+
if ("merchantId" in data && data.merchantId != undefined) {
|
|
66
|
+
this.merchantId = data.merchantId;
|
|
67
|
+
}
|
|
68
|
+
if ("terminalId" in data && data.terminalId != undefined) {
|
|
69
|
+
this.terminalId = data.terminalId;
|
|
70
|
+
}
|
|
71
|
+
if ("amount" in data && data.amount != undefined) {
|
|
72
|
+
this.amount = data.amount;
|
|
73
|
+
}
|
|
74
|
+
if ("currency" in data && data.currency != undefined) {
|
|
75
|
+
this.currency = data.currency;
|
|
76
|
+
}
|
|
77
|
+
if ("transactionType" in data && data.transactionType != undefined) {
|
|
78
|
+
this.transactionType = data.transactionType;
|
|
79
|
+
}
|
|
80
|
+
if ("reference" in data && data.reference != undefined) {
|
|
81
|
+
this.reference = data.reference;
|
|
82
|
+
}
|
|
83
|
+
if ("cardPan" in data && data.cardPan != undefined) {
|
|
84
|
+
this.cardPan = data.cardPan;
|
|
85
|
+
}
|
|
86
|
+
if ("cardExpiry" in data && data.cardExpiry != undefined) {
|
|
87
|
+
this.cardExpiry = data.cardExpiry;
|
|
88
|
+
}
|
|
89
|
+
if ("cvv" in data && data.cvv != undefined) {
|
|
90
|
+
this.cvv = data.cvv;
|
|
91
|
+
}
|
|
92
|
+
if ("pin" in data && data.pin != undefined) {
|
|
93
|
+
this.pin = data.pin;
|
|
94
|
+
}
|
|
95
|
+
if ("meta" in data && data.meta != undefined) {
|
|
96
|
+
this.meta = data.meta;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
get merchantId() {
|
|
101
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
102
|
+
}
|
|
103
|
+
set merchantId(value) {
|
|
104
|
+
pb_1.Message.setField(this, 1, value);
|
|
105
|
+
}
|
|
106
|
+
get terminalId() {
|
|
107
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
108
|
+
}
|
|
109
|
+
set terminalId(value) {
|
|
110
|
+
pb_1.Message.setField(this, 2, value);
|
|
111
|
+
}
|
|
112
|
+
get amount() {
|
|
113
|
+
return pb_1.Message.getFieldWithDefault(this, 3, 0);
|
|
114
|
+
}
|
|
115
|
+
set amount(value) {
|
|
116
|
+
pb_1.Message.setField(this, 3, value);
|
|
117
|
+
}
|
|
118
|
+
get currency() {
|
|
119
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
120
|
+
}
|
|
121
|
+
set currency(value) {
|
|
122
|
+
pb_1.Message.setField(this, 4, value);
|
|
123
|
+
}
|
|
124
|
+
get transactionType() {
|
|
125
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
126
|
+
}
|
|
127
|
+
set transactionType(value) {
|
|
128
|
+
pb_1.Message.setField(this, 5, value);
|
|
129
|
+
}
|
|
130
|
+
get reference() {
|
|
131
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
132
|
+
}
|
|
133
|
+
set reference(value) {
|
|
134
|
+
pb_1.Message.setField(this, 6, value);
|
|
135
|
+
}
|
|
136
|
+
get cardPan() {
|
|
137
|
+
return pb_1.Message.getFieldWithDefault(this, 7, "");
|
|
138
|
+
}
|
|
139
|
+
set cardPan(value) {
|
|
140
|
+
pb_1.Message.setField(this, 7, value);
|
|
141
|
+
}
|
|
142
|
+
get cardExpiry() {
|
|
143
|
+
return pb_1.Message.getFieldWithDefault(this, 8, "");
|
|
144
|
+
}
|
|
145
|
+
set cardExpiry(value) {
|
|
146
|
+
pb_1.Message.setField(this, 8, value);
|
|
147
|
+
}
|
|
148
|
+
get cvv() {
|
|
149
|
+
return pb_1.Message.getFieldWithDefault(this, 9, "");
|
|
150
|
+
}
|
|
151
|
+
set cvv(value) {
|
|
152
|
+
pb_1.Message.setField(this, 9, value);
|
|
153
|
+
}
|
|
154
|
+
get pin() {
|
|
155
|
+
return pb_1.Message.getFieldWithDefault(this, 10, "");
|
|
156
|
+
}
|
|
157
|
+
set pin(value) {
|
|
158
|
+
pb_1.Message.setField(this, 10, value);
|
|
159
|
+
}
|
|
160
|
+
get meta() {
|
|
161
|
+
return pb_1.Message.getWrapperField(this, TransactionMeta, 11);
|
|
162
|
+
}
|
|
163
|
+
set meta(value) {
|
|
164
|
+
pb_1.Message.setWrapperField(this, 11, value);
|
|
165
|
+
}
|
|
166
|
+
get hasMeta() {
|
|
167
|
+
return pb_1.Message.getField(this, 11) != null;
|
|
168
|
+
}
|
|
169
|
+
static fromObject(data) {
|
|
170
|
+
const message = new InitTransactionRequest({});
|
|
171
|
+
if (data.merchantId != null) {
|
|
172
|
+
message.merchantId = data.merchantId;
|
|
173
|
+
}
|
|
174
|
+
if (data.terminalId != null) {
|
|
175
|
+
message.terminalId = data.terminalId;
|
|
176
|
+
}
|
|
177
|
+
if (data.amount != null) {
|
|
178
|
+
message.amount = data.amount;
|
|
179
|
+
}
|
|
180
|
+
if (data.currency != null) {
|
|
181
|
+
message.currency = data.currency;
|
|
182
|
+
}
|
|
183
|
+
if (data.transactionType != null) {
|
|
184
|
+
message.transactionType = data.transactionType;
|
|
185
|
+
}
|
|
186
|
+
if (data.reference != null) {
|
|
187
|
+
message.reference = data.reference;
|
|
188
|
+
}
|
|
189
|
+
if (data.cardPan != null) {
|
|
190
|
+
message.cardPan = data.cardPan;
|
|
191
|
+
}
|
|
192
|
+
if (data.cardExpiry != null) {
|
|
193
|
+
message.cardExpiry = data.cardExpiry;
|
|
194
|
+
}
|
|
195
|
+
if (data.cvv != null) {
|
|
196
|
+
message.cvv = data.cvv;
|
|
197
|
+
}
|
|
198
|
+
if (data.pin != null) {
|
|
199
|
+
message.pin = data.pin;
|
|
200
|
+
}
|
|
201
|
+
if (data.meta != null) {
|
|
202
|
+
message.meta = TransactionMeta.fromObject(data.meta);
|
|
203
|
+
}
|
|
204
|
+
return message;
|
|
205
|
+
}
|
|
206
|
+
toObject() {
|
|
207
|
+
const data = {};
|
|
208
|
+
if (this.merchantId != null) {
|
|
209
|
+
data.merchantId = this.merchantId;
|
|
210
|
+
}
|
|
211
|
+
if (this.terminalId != null) {
|
|
212
|
+
data.terminalId = this.terminalId;
|
|
213
|
+
}
|
|
214
|
+
if (this.amount != null) {
|
|
215
|
+
data.amount = this.amount;
|
|
216
|
+
}
|
|
217
|
+
if (this.currency != null) {
|
|
218
|
+
data.currency = this.currency;
|
|
219
|
+
}
|
|
220
|
+
if (this.transactionType != null) {
|
|
221
|
+
data.transactionType = this.transactionType;
|
|
222
|
+
}
|
|
223
|
+
if (this.reference != null) {
|
|
224
|
+
data.reference = this.reference;
|
|
225
|
+
}
|
|
226
|
+
if (this.cardPan != null) {
|
|
227
|
+
data.cardPan = this.cardPan;
|
|
228
|
+
}
|
|
229
|
+
if (this.cardExpiry != null) {
|
|
230
|
+
data.cardExpiry = this.cardExpiry;
|
|
231
|
+
}
|
|
232
|
+
if (this.cvv != null) {
|
|
233
|
+
data.cvv = this.cvv;
|
|
234
|
+
}
|
|
235
|
+
if (this.pin != null) {
|
|
236
|
+
data.pin = this.pin;
|
|
237
|
+
}
|
|
238
|
+
if (this.meta != null) {
|
|
239
|
+
data.meta = this.meta.toObject();
|
|
240
|
+
}
|
|
241
|
+
return data;
|
|
242
|
+
}
|
|
243
|
+
serialize(w) {
|
|
244
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
245
|
+
if (this.merchantId.length)
|
|
246
|
+
writer.writeString(1, this.merchantId);
|
|
247
|
+
if (this.terminalId.length)
|
|
248
|
+
writer.writeString(2, this.terminalId);
|
|
249
|
+
if (this.amount != 0)
|
|
250
|
+
writer.writeInt64(3, this.amount);
|
|
251
|
+
if (this.currency.length)
|
|
252
|
+
writer.writeString(4, this.currency);
|
|
253
|
+
if (this.transactionType.length)
|
|
254
|
+
writer.writeString(5, this.transactionType);
|
|
255
|
+
if (this.reference.length)
|
|
256
|
+
writer.writeString(6, this.reference);
|
|
257
|
+
if (this.cardPan.length)
|
|
258
|
+
writer.writeString(7, this.cardPan);
|
|
259
|
+
if (this.cardExpiry.length)
|
|
260
|
+
writer.writeString(8, this.cardExpiry);
|
|
261
|
+
if (this.cvv.length)
|
|
262
|
+
writer.writeString(9, this.cvv);
|
|
263
|
+
if (this.pin.length)
|
|
264
|
+
writer.writeString(10, this.pin);
|
|
265
|
+
if (this.hasMeta)
|
|
266
|
+
writer.writeMessage(11, this.meta, () => this.meta.serialize(writer));
|
|
267
|
+
if (!w)
|
|
268
|
+
return writer.getResultBuffer();
|
|
269
|
+
}
|
|
270
|
+
static deserialize(bytes) {
|
|
271
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InitTransactionRequest();
|
|
272
|
+
while (reader.nextField()) {
|
|
273
|
+
if (reader.isEndGroup())
|
|
274
|
+
break;
|
|
275
|
+
switch (reader.getFieldNumber()) {
|
|
276
|
+
case 1:
|
|
277
|
+
message.merchantId = reader.readString();
|
|
278
|
+
break;
|
|
279
|
+
case 2:
|
|
280
|
+
message.terminalId = reader.readString();
|
|
281
|
+
break;
|
|
282
|
+
case 3:
|
|
283
|
+
message.amount = reader.readInt64();
|
|
284
|
+
break;
|
|
285
|
+
case 4:
|
|
286
|
+
message.currency = reader.readString();
|
|
287
|
+
break;
|
|
288
|
+
case 5:
|
|
289
|
+
message.transactionType = reader.readString();
|
|
290
|
+
break;
|
|
291
|
+
case 6:
|
|
292
|
+
message.reference = reader.readString();
|
|
293
|
+
break;
|
|
294
|
+
case 7:
|
|
295
|
+
message.cardPan = reader.readString();
|
|
296
|
+
break;
|
|
297
|
+
case 8:
|
|
298
|
+
message.cardExpiry = reader.readString();
|
|
299
|
+
break;
|
|
300
|
+
case 9:
|
|
301
|
+
message.cvv = reader.readString();
|
|
302
|
+
break;
|
|
303
|
+
case 10:
|
|
304
|
+
message.pin = reader.readString();
|
|
305
|
+
break;
|
|
306
|
+
case 11:
|
|
307
|
+
reader.readMessage(message.meta, () => message.meta = TransactionMeta.deserialize(reader));
|
|
308
|
+
break;
|
|
309
|
+
default: reader.skipField();
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
return message;
|
|
313
|
+
}
|
|
314
|
+
serializeBinary() {
|
|
315
|
+
return this.serialize();
|
|
316
|
+
}
|
|
317
|
+
static deserializeBinary(bytes) {
|
|
318
|
+
return InitTransactionRequest.deserialize(bytes);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
transactions.InitTransactionRequest = InitTransactionRequest;
|
|
322
|
+
class CompleteTransactionRequest extends pb_1.Message {
|
|
323
|
+
#one_of_decls = [];
|
|
324
|
+
constructor(data) {
|
|
325
|
+
super();
|
|
326
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
327
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
328
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
329
|
+
this.transactionId = data.transactionId;
|
|
330
|
+
}
|
|
331
|
+
if ("processorReference" in data && data.processorReference != undefined) {
|
|
332
|
+
this.processorReference = data.processorReference;
|
|
333
|
+
}
|
|
334
|
+
if ("responseCode" in data && data.responseCode != undefined) {
|
|
335
|
+
this.responseCode = data.responseCode;
|
|
336
|
+
}
|
|
337
|
+
if ("responseMessage" in data && data.responseMessage != undefined) {
|
|
338
|
+
this.responseMessage = data.responseMessage;
|
|
339
|
+
}
|
|
340
|
+
if ("authorizationCode" in data && data.authorizationCode != undefined) {
|
|
341
|
+
this.authorizationCode = data.authorizationCode;
|
|
342
|
+
}
|
|
343
|
+
if ("status" in data && data.status != undefined) {
|
|
344
|
+
this.status = data.status;
|
|
345
|
+
}
|
|
346
|
+
if ("processorData" in data && data.processorData != undefined) {
|
|
347
|
+
this.processorData = data.processorData;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
get transactionId() {
|
|
352
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
353
|
+
}
|
|
354
|
+
set transactionId(value) {
|
|
355
|
+
pb_1.Message.setField(this, 1, value);
|
|
356
|
+
}
|
|
357
|
+
get processorReference() {
|
|
358
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
359
|
+
}
|
|
360
|
+
set processorReference(value) {
|
|
361
|
+
pb_1.Message.setField(this, 2, value);
|
|
362
|
+
}
|
|
363
|
+
get responseCode() {
|
|
364
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
365
|
+
}
|
|
366
|
+
set responseCode(value) {
|
|
367
|
+
pb_1.Message.setField(this, 3, value);
|
|
368
|
+
}
|
|
369
|
+
get responseMessage() {
|
|
370
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
371
|
+
}
|
|
372
|
+
set responseMessage(value) {
|
|
373
|
+
pb_1.Message.setField(this, 4, value);
|
|
374
|
+
}
|
|
375
|
+
get authorizationCode() {
|
|
376
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
377
|
+
}
|
|
378
|
+
set authorizationCode(value) {
|
|
379
|
+
pb_1.Message.setField(this, 5, value);
|
|
380
|
+
}
|
|
381
|
+
get status() {
|
|
382
|
+
return pb_1.Message.getFieldWithDefault(this, 6, TransactionStatus.PENDING);
|
|
383
|
+
}
|
|
384
|
+
set status(value) {
|
|
385
|
+
pb_1.Message.setField(this, 6, value);
|
|
386
|
+
}
|
|
387
|
+
get processorData() {
|
|
388
|
+
return pb_1.Message.getWrapperField(this, ProcessorData, 7);
|
|
389
|
+
}
|
|
390
|
+
set processorData(value) {
|
|
391
|
+
pb_1.Message.setWrapperField(this, 7, value);
|
|
392
|
+
}
|
|
393
|
+
get hasProcessorData() {
|
|
394
|
+
return pb_1.Message.getField(this, 7) != null;
|
|
395
|
+
}
|
|
396
|
+
static fromObject(data) {
|
|
397
|
+
const message = new CompleteTransactionRequest({});
|
|
398
|
+
if (data.transactionId != null) {
|
|
399
|
+
message.transactionId = data.transactionId;
|
|
400
|
+
}
|
|
401
|
+
if (data.processorReference != null) {
|
|
402
|
+
message.processorReference = data.processorReference;
|
|
403
|
+
}
|
|
404
|
+
if (data.responseCode != null) {
|
|
405
|
+
message.responseCode = data.responseCode;
|
|
406
|
+
}
|
|
407
|
+
if (data.responseMessage != null) {
|
|
408
|
+
message.responseMessage = data.responseMessage;
|
|
409
|
+
}
|
|
410
|
+
if (data.authorizationCode != null) {
|
|
411
|
+
message.authorizationCode = data.authorizationCode;
|
|
412
|
+
}
|
|
413
|
+
if (data.status != null) {
|
|
414
|
+
message.status = data.status;
|
|
415
|
+
}
|
|
416
|
+
if (data.processorData != null) {
|
|
417
|
+
message.processorData = ProcessorData.fromObject(data.processorData);
|
|
418
|
+
}
|
|
419
|
+
return message;
|
|
420
|
+
}
|
|
421
|
+
toObject() {
|
|
422
|
+
const data = {};
|
|
423
|
+
if (this.transactionId != null) {
|
|
424
|
+
data.transactionId = this.transactionId;
|
|
425
|
+
}
|
|
426
|
+
if (this.processorReference != null) {
|
|
427
|
+
data.processorReference = this.processorReference;
|
|
428
|
+
}
|
|
429
|
+
if (this.responseCode != null) {
|
|
430
|
+
data.responseCode = this.responseCode;
|
|
431
|
+
}
|
|
432
|
+
if (this.responseMessage != null) {
|
|
433
|
+
data.responseMessage = this.responseMessage;
|
|
434
|
+
}
|
|
435
|
+
if (this.authorizationCode != null) {
|
|
436
|
+
data.authorizationCode = this.authorizationCode;
|
|
437
|
+
}
|
|
438
|
+
if (this.status != null) {
|
|
439
|
+
data.status = this.status;
|
|
440
|
+
}
|
|
441
|
+
if (this.processorData != null) {
|
|
442
|
+
data.processorData = this.processorData.toObject();
|
|
443
|
+
}
|
|
444
|
+
return data;
|
|
445
|
+
}
|
|
446
|
+
serialize(w) {
|
|
447
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
448
|
+
if (this.transactionId.length)
|
|
449
|
+
writer.writeString(1, this.transactionId);
|
|
450
|
+
if (this.processorReference.length)
|
|
451
|
+
writer.writeString(2, this.processorReference);
|
|
452
|
+
if (this.responseCode.length)
|
|
453
|
+
writer.writeString(3, this.responseCode);
|
|
454
|
+
if (this.responseMessage.length)
|
|
455
|
+
writer.writeString(4, this.responseMessage);
|
|
456
|
+
if (this.authorizationCode.length)
|
|
457
|
+
writer.writeString(5, this.authorizationCode);
|
|
458
|
+
if (this.status != TransactionStatus.PENDING)
|
|
459
|
+
writer.writeEnum(6, this.status);
|
|
460
|
+
if (this.hasProcessorData)
|
|
461
|
+
writer.writeMessage(7, this.processorData, () => this.processorData.serialize(writer));
|
|
462
|
+
if (!w)
|
|
463
|
+
return writer.getResultBuffer();
|
|
464
|
+
}
|
|
465
|
+
static deserialize(bytes) {
|
|
466
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CompleteTransactionRequest();
|
|
467
|
+
while (reader.nextField()) {
|
|
468
|
+
if (reader.isEndGroup())
|
|
469
|
+
break;
|
|
470
|
+
switch (reader.getFieldNumber()) {
|
|
471
|
+
case 1:
|
|
472
|
+
message.transactionId = reader.readString();
|
|
473
|
+
break;
|
|
474
|
+
case 2:
|
|
475
|
+
message.processorReference = reader.readString();
|
|
476
|
+
break;
|
|
477
|
+
case 3:
|
|
478
|
+
message.responseCode = reader.readString();
|
|
479
|
+
break;
|
|
480
|
+
case 4:
|
|
481
|
+
message.responseMessage = reader.readString();
|
|
482
|
+
break;
|
|
483
|
+
case 5:
|
|
484
|
+
message.authorizationCode = reader.readString();
|
|
485
|
+
break;
|
|
486
|
+
case 6:
|
|
487
|
+
message.status = reader.readEnum();
|
|
488
|
+
break;
|
|
489
|
+
case 7:
|
|
490
|
+
reader.readMessage(message.processorData, () => message.processorData = ProcessorData.deserialize(reader));
|
|
491
|
+
break;
|
|
492
|
+
default: reader.skipField();
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
return message;
|
|
496
|
+
}
|
|
497
|
+
serializeBinary() {
|
|
498
|
+
return this.serialize();
|
|
499
|
+
}
|
|
500
|
+
static deserializeBinary(bytes) {
|
|
501
|
+
return CompleteTransactionRequest.deserialize(bytes);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
transactions.CompleteTransactionRequest = CompleteTransactionRequest;
|
|
505
|
+
class ConfirmTransactionRequest extends pb_1.Message {
|
|
506
|
+
#one_of_decls = [];
|
|
507
|
+
constructor(data) {
|
|
508
|
+
super();
|
|
509
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
510
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
511
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
512
|
+
this.transactionId = data.transactionId;
|
|
513
|
+
}
|
|
514
|
+
if ("confirmationCode" in data && data.confirmationCode != undefined) {
|
|
515
|
+
this.confirmationCode = data.confirmationCode;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
get transactionId() {
|
|
520
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
521
|
+
}
|
|
522
|
+
set transactionId(value) {
|
|
523
|
+
pb_1.Message.setField(this, 1, value);
|
|
524
|
+
}
|
|
525
|
+
get confirmationCode() {
|
|
526
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
527
|
+
}
|
|
528
|
+
set confirmationCode(value) {
|
|
529
|
+
pb_1.Message.setField(this, 2, value);
|
|
530
|
+
}
|
|
531
|
+
static fromObject(data) {
|
|
532
|
+
const message = new ConfirmTransactionRequest({});
|
|
533
|
+
if (data.transactionId != null) {
|
|
534
|
+
message.transactionId = data.transactionId;
|
|
535
|
+
}
|
|
536
|
+
if (data.confirmationCode != null) {
|
|
537
|
+
message.confirmationCode = data.confirmationCode;
|
|
538
|
+
}
|
|
539
|
+
return message;
|
|
540
|
+
}
|
|
541
|
+
toObject() {
|
|
542
|
+
const data = {};
|
|
543
|
+
if (this.transactionId != null) {
|
|
544
|
+
data.transactionId = this.transactionId;
|
|
545
|
+
}
|
|
546
|
+
if (this.confirmationCode != null) {
|
|
547
|
+
data.confirmationCode = this.confirmationCode;
|
|
548
|
+
}
|
|
549
|
+
return data;
|
|
550
|
+
}
|
|
551
|
+
serialize(w) {
|
|
552
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
553
|
+
if (this.transactionId.length)
|
|
554
|
+
writer.writeString(1, this.transactionId);
|
|
555
|
+
if (this.confirmationCode.length)
|
|
556
|
+
writer.writeString(2, this.confirmationCode);
|
|
557
|
+
if (!w)
|
|
558
|
+
return writer.getResultBuffer();
|
|
559
|
+
}
|
|
560
|
+
static deserialize(bytes) {
|
|
561
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConfirmTransactionRequest();
|
|
562
|
+
while (reader.nextField()) {
|
|
563
|
+
if (reader.isEndGroup())
|
|
564
|
+
break;
|
|
565
|
+
switch (reader.getFieldNumber()) {
|
|
566
|
+
case 1:
|
|
567
|
+
message.transactionId = reader.readString();
|
|
568
|
+
break;
|
|
569
|
+
case 2:
|
|
570
|
+
message.confirmationCode = reader.readString();
|
|
571
|
+
break;
|
|
572
|
+
default: reader.skipField();
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
return message;
|
|
576
|
+
}
|
|
577
|
+
serializeBinary() {
|
|
578
|
+
return this.serialize();
|
|
579
|
+
}
|
|
580
|
+
static deserializeBinary(bytes) {
|
|
581
|
+
return ConfirmTransactionRequest.deserialize(bytes);
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
transactions.ConfirmTransactionRequest = ConfirmTransactionRequest;
|
|
585
|
+
class GetTransactionRequest extends pb_1.Message {
|
|
586
|
+
#one_of_decls = [[1, 2, 3]];
|
|
587
|
+
constructor(data) {
|
|
588
|
+
super();
|
|
589
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
590
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
591
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
592
|
+
this.transactionId = data.transactionId;
|
|
593
|
+
}
|
|
594
|
+
if ("reference" in data && data.reference != undefined) {
|
|
595
|
+
this.reference = data.reference;
|
|
596
|
+
}
|
|
597
|
+
if ("rrn" in data && data.rrn != undefined) {
|
|
598
|
+
this.rrn = data.rrn;
|
|
599
|
+
}
|
|
600
|
+
if ("merchantId" in data && data.merchantId != undefined) {
|
|
601
|
+
this.merchantId = data.merchantId;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
get transactionId() {
|
|
606
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
607
|
+
}
|
|
608
|
+
set transactionId(value) {
|
|
609
|
+
pb_1.Message.setOneofField(this, 1, this.#one_of_decls[0], value);
|
|
610
|
+
}
|
|
611
|
+
get hasTransactionId() {
|
|
612
|
+
return pb_1.Message.getField(this, 1) != null;
|
|
613
|
+
}
|
|
614
|
+
get reference() {
|
|
615
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
616
|
+
}
|
|
617
|
+
set reference(value) {
|
|
618
|
+
pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value);
|
|
619
|
+
}
|
|
620
|
+
get hasReference() {
|
|
621
|
+
return pb_1.Message.getField(this, 2) != null;
|
|
622
|
+
}
|
|
623
|
+
get rrn() {
|
|
624
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
625
|
+
}
|
|
626
|
+
set rrn(value) {
|
|
627
|
+
pb_1.Message.setOneofField(this, 3, this.#one_of_decls[0], value);
|
|
628
|
+
}
|
|
629
|
+
get hasRrn() {
|
|
630
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
631
|
+
}
|
|
632
|
+
get merchantId() {
|
|
633
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
634
|
+
}
|
|
635
|
+
set merchantId(value) {
|
|
636
|
+
pb_1.Message.setField(this, 4, value);
|
|
637
|
+
}
|
|
638
|
+
get identifier() {
|
|
639
|
+
const cases = {
|
|
640
|
+
0: "none",
|
|
641
|
+
1: "transactionId",
|
|
642
|
+
2: "reference",
|
|
643
|
+
3: "rrn"
|
|
644
|
+
};
|
|
645
|
+
return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3])];
|
|
646
|
+
}
|
|
647
|
+
static fromObject(data) {
|
|
648
|
+
const message = new GetTransactionRequest({});
|
|
649
|
+
if (data.transactionId != null) {
|
|
650
|
+
message.transactionId = data.transactionId;
|
|
651
|
+
}
|
|
652
|
+
if (data.reference != null) {
|
|
653
|
+
message.reference = data.reference;
|
|
654
|
+
}
|
|
655
|
+
if (data.rrn != null) {
|
|
656
|
+
message.rrn = data.rrn;
|
|
657
|
+
}
|
|
658
|
+
if (data.merchantId != null) {
|
|
659
|
+
message.merchantId = data.merchantId;
|
|
660
|
+
}
|
|
661
|
+
return message;
|
|
662
|
+
}
|
|
663
|
+
toObject() {
|
|
664
|
+
const data = {};
|
|
665
|
+
if (this.transactionId != null) {
|
|
666
|
+
data.transactionId = this.transactionId;
|
|
667
|
+
}
|
|
668
|
+
if (this.reference != null) {
|
|
669
|
+
data.reference = this.reference;
|
|
670
|
+
}
|
|
671
|
+
if (this.rrn != null) {
|
|
672
|
+
data.rrn = this.rrn;
|
|
673
|
+
}
|
|
674
|
+
if (this.merchantId != null) {
|
|
675
|
+
data.merchantId = this.merchantId;
|
|
676
|
+
}
|
|
677
|
+
return data;
|
|
678
|
+
}
|
|
679
|
+
serialize(w) {
|
|
680
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
681
|
+
if (this.hasTransactionId)
|
|
682
|
+
writer.writeString(1, this.transactionId);
|
|
683
|
+
if (this.hasReference)
|
|
684
|
+
writer.writeString(2, this.reference);
|
|
685
|
+
if (this.hasRrn)
|
|
686
|
+
writer.writeString(3, this.rrn);
|
|
687
|
+
if (this.merchantId.length)
|
|
688
|
+
writer.writeString(4, this.merchantId);
|
|
689
|
+
if (!w)
|
|
690
|
+
return writer.getResultBuffer();
|
|
691
|
+
}
|
|
692
|
+
static deserialize(bytes) {
|
|
693
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTransactionRequest();
|
|
694
|
+
while (reader.nextField()) {
|
|
695
|
+
if (reader.isEndGroup())
|
|
696
|
+
break;
|
|
697
|
+
switch (reader.getFieldNumber()) {
|
|
698
|
+
case 1:
|
|
699
|
+
message.transactionId = reader.readString();
|
|
700
|
+
break;
|
|
701
|
+
case 2:
|
|
702
|
+
message.reference = reader.readString();
|
|
703
|
+
break;
|
|
704
|
+
case 3:
|
|
705
|
+
message.rrn = reader.readString();
|
|
706
|
+
break;
|
|
707
|
+
case 4:
|
|
708
|
+
message.merchantId = reader.readString();
|
|
709
|
+
break;
|
|
710
|
+
default: reader.skipField();
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
return message;
|
|
714
|
+
}
|
|
715
|
+
serializeBinary() {
|
|
716
|
+
return this.serialize();
|
|
717
|
+
}
|
|
718
|
+
static deserializeBinary(bytes) {
|
|
719
|
+
return GetTransactionRequest.deserialize(bytes);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
transactions.GetTransactionRequest = GetTransactionRequest;
|
|
723
|
+
class SaveReversalRequest extends pb_1.Message {
|
|
724
|
+
#one_of_decls = [];
|
|
725
|
+
constructor(data) {
|
|
726
|
+
super();
|
|
727
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
728
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
729
|
+
if ("originalTransactionId" in data && data.originalTransactionId != undefined) {
|
|
730
|
+
this.originalTransactionId = data.originalTransactionId;
|
|
731
|
+
}
|
|
732
|
+
if ("merchantId" in data && data.merchantId != undefined) {
|
|
733
|
+
this.merchantId = data.merchantId;
|
|
734
|
+
}
|
|
735
|
+
if ("terminalId" in data && data.terminalId != undefined) {
|
|
736
|
+
this.terminalId = data.terminalId;
|
|
737
|
+
}
|
|
738
|
+
if ("amount" in data && data.amount != undefined) {
|
|
739
|
+
this.amount = data.amount;
|
|
740
|
+
}
|
|
741
|
+
if ("reason" in data && data.reason != undefined) {
|
|
742
|
+
this.reason = data.reason;
|
|
743
|
+
}
|
|
744
|
+
if ("reference" in data && data.reference != undefined) {
|
|
745
|
+
this.reference = data.reference;
|
|
746
|
+
}
|
|
747
|
+
if ("reversalType" in data && data.reversalType != undefined) {
|
|
748
|
+
this.reversalType = data.reversalType;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
get originalTransactionId() {
|
|
753
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
754
|
+
}
|
|
755
|
+
set originalTransactionId(value) {
|
|
756
|
+
pb_1.Message.setField(this, 1, value);
|
|
757
|
+
}
|
|
758
|
+
get merchantId() {
|
|
759
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
760
|
+
}
|
|
761
|
+
set merchantId(value) {
|
|
762
|
+
pb_1.Message.setField(this, 2, value);
|
|
763
|
+
}
|
|
764
|
+
get terminalId() {
|
|
765
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
766
|
+
}
|
|
767
|
+
set terminalId(value) {
|
|
768
|
+
pb_1.Message.setField(this, 3, value);
|
|
769
|
+
}
|
|
770
|
+
get amount() {
|
|
771
|
+
return pb_1.Message.getFieldWithDefault(this, 4, 0);
|
|
772
|
+
}
|
|
773
|
+
set amount(value) {
|
|
774
|
+
pb_1.Message.setField(this, 4, value);
|
|
775
|
+
}
|
|
776
|
+
get reason() {
|
|
777
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
778
|
+
}
|
|
779
|
+
set reason(value) {
|
|
780
|
+
pb_1.Message.setField(this, 5, value);
|
|
781
|
+
}
|
|
782
|
+
get reference() {
|
|
783
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
784
|
+
}
|
|
785
|
+
set reference(value) {
|
|
786
|
+
pb_1.Message.setField(this, 6, value);
|
|
787
|
+
}
|
|
788
|
+
get reversalType() {
|
|
789
|
+
return pb_1.Message.getFieldWithDefault(this, 7, ReversalType.FULL_REVERSAL);
|
|
790
|
+
}
|
|
791
|
+
set reversalType(value) {
|
|
792
|
+
pb_1.Message.setField(this, 7, value);
|
|
793
|
+
}
|
|
794
|
+
static fromObject(data) {
|
|
795
|
+
const message = new SaveReversalRequest({});
|
|
796
|
+
if (data.originalTransactionId != null) {
|
|
797
|
+
message.originalTransactionId = data.originalTransactionId;
|
|
798
|
+
}
|
|
799
|
+
if (data.merchantId != null) {
|
|
800
|
+
message.merchantId = data.merchantId;
|
|
801
|
+
}
|
|
802
|
+
if (data.terminalId != null) {
|
|
803
|
+
message.terminalId = data.terminalId;
|
|
804
|
+
}
|
|
805
|
+
if (data.amount != null) {
|
|
806
|
+
message.amount = data.amount;
|
|
807
|
+
}
|
|
808
|
+
if (data.reason != null) {
|
|
809
|
+
message.reason = data.reason;
|
|
810
|
+
}
|
|
811
|
+
if (data.reference != null) {
|
|
812
|
+
message.reference = data.reference;
|
|
813
|
+
}
|
|
814
|
+
if (data.reversalType != null) {
|
|
815
|
+
message.reversalType = data.reversalType;
|
|
816
|
+
}
|
|
817
|
+
return message;
|
|
818
|
+
}
|
|
819
|
+
toObject() {
|
|
820
|
+
const data = {};
|
|
821
|
+
if (this.originalTransactionId != null) {
|
|
822
|
+
data.originalTransactionId = this.originalTransactionId;
|
|
823
|
+
}
|
|
824
|
+
if (this.merchantId != null) {
|
|
825
|
+
data.merchantId = this.merchantId;
|
|
826
|
+
}
|
|
827
|
+
if (this.terminalId != null) {
|
|
828
|
+
data.terminalId = this.terminalId;
|
|
829
|
+
}
|
|
830
|
+
if (this.amount != null) {
|
|
831
|
+
data.amount = this.amount;
|
|
832
|
+
}
|
|
833
|
+
if (this.reason != null) {
|
|
834
|
+
data.reason = this.reason;
|
|
835
|
+
}
|
|
836
|
+
if (this.reference != null) {
|
|
837
|
+
data.reference = this.reference;
|
|
838
|
+
}
|
|
839
|
+
if (this.reversalType != null) {
|
|
840
|
+
data.reversalType = this.reversalType;
|
|
841
|
+
}
|
|
842
|
+
return data;
|
|
843
|
+
}
|
|
844
|
+
serialize(w) {
|
|
845
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
846
|
+
if (this.originalTransactionId.length)
|
|
847
|
+
writer.writeString(1, this.originalTransactionId);
|
|
848
|
+
if (this.merchantId.length)
|
|
849
|
+
writer.writeString(2, this.merchantId);
|
|
850
|
+
if (this.terminalId.length)
|
|
851
|
+
writer.writeString(3, this.terminalId);
|
|
852
|
+
if (this.amount != 0)
|
|
853
|
+
writer.writeInt64(4, this.amount);
|
|
854
|
+
if (this.reason.length)
|
|
855
|
+
writer.writeString(5, this.reason);
|
|
856
|
+
if (this.reference.length)
|
|
857
|
+
writer.writeString(6, this.reference);
|
|
858
|
+
if (this.reversalType != ReversalType.FULL_REVERSAL)
|
|
859
|
+
writer.writeEnum(7, this.reversalType);
|
|
860
|
+
if (!w)
|
|
861
|
+
return writer.getResultBuffer();
|
|
862
|
+
}
|
|
863
|
+
static deserialize(bytes) {
|
|
864
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SaveReversalRequest();
|
|
865
|
+
while (reader.nextField()) {
|
|
866
|
+
if (reader.isEndGroup())
|
|
867
|
+
break;
|
|
868
|
+
switch (reader.getFieldNumber()) {
|
|
869
|
+
case 1:
|
|
870
|
+
message.originalTransactionId = reader.readString();
|
|
871
|
+
break;
|
|
872
|
+
case 2:
|
|
873
|
+
message.merchantId = reader.readString();
|
|
874
|
+
break;
|
|
875
|
+
case 3:
|
|
876
|
+
message.terminalId = reader.readString();
|
|
877
|
+
break;
|
|
878
|
+
case 4:
|
|
879
|
+
message.amount = reader.readInt64();
|
|
880
|
+
break;
|
|
881
|
+
case 5:
|
|
882
|
+
message.reason = reader.readString();
|
|
883
|
+
break;
|
|
884
|
+
case 6:
|
|
885
|
+
message.reference = reader.readString();
|
|
886
|
+
break;
|
|
887
|
+
case 7:
|
|
888
|
+
message.reversalType = reader.readEnum();
|
|
889
|
+
break;
|
|
890
|
+
default: reader.skipField();
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
return message;
|
|
894
|
+
}
|
|
895
|
+
serializeBinary() {
|
|
896
|
+
return this.serialize();
|
|
897
|
+
}
|
|
898
|
+
static deserializeBinary(bytes) {
|
|
899
|
+
return SaveReversalRequest.deserialize(bytes);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
transactions.SaveReversalRequest = SaveReversalRequest;
|
|
903
|
+
class DeleteReversalRequest extends pb_1.Message {
|
|
904
|
+
#one_of_decls = [];
|
|
905
|
+
constructor(data) {
|
|
906
|
+
super();
|
|
907
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
908
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
909
|
+
if ("reversalId" in data && data.reversalId != undefined) {
|
|
910
|
+
this.reversalId = data.reversalId;
|
|
911
|
+
}
|
|
912
|
+
if ("merchantId" in data && data.merchantId != undefined) {
|
|
913
|
+
this.merchantId = data.merchantId;
|
|
914
|
+
}
|
|
915
|
+
if ("reason" in data && data.reason != undefined) {
|
|
916
|
+
this.reason = data.reason;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
get reversalId() {
|
|
921
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
922
|
+
}
|
|
923
|
+
set reversalId(value) {
|
|
924
|
+
pb_1.Message.setField(this, 1, value);
|
|
925
|
+
}
|
|
926
|
+
get merchantId() {
|
|
927
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
928
|
+
}
|
|
929
|
+
set merchantId(value) {
|
|
930
|
+
pb_1.Message.setField(this, 2, value);
|
|
931
|
+
}
|
|
932
|
+
get reason() {
|
|
933
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
934
|
+
}
|
|
935
|
+
set reason(value) {
|
|
936
|
+
pb_1.Message.setField(this, 3, value);
|
|
937
|
+
}
|
|
938
|
+
static fromObject(data) {
|
|
939
|
+
const message = new DeleteReversalRequest({});
|
|
940
|
+
if (data.reversalId != null) {
|
|
941
|
+
message.reversalId = data.reversalId;
|
|
942
|
+
}
|
|
943
|
+
if (data.merchantId != null) {
|
|
944
|
+
message.merchantId = data.merchantId;
|
|
945
|
+
}
|
|
946
|
+
if (data.reason != null) {
|
|
947
|
+
message.reason = data.reason;
|
|
948
|
+
}
|
|
949
|
+
return message;
|
|
950
|
+
}
|
|
951
|
+
toObject() {
|
|
952
|
+
const data = {};
|
|
953
|
+
if (this.reversalId != null) {
|
|
954
|
+
data.reversalId = this.reversalId;
|
|
955
|
+
}
|
|
956
|
+
if (this.merchantId != null) {
|
|
957
|
+
data.merchantId = this.merchantId;
|
|
958
|
+
}
|
|
959
|
+
if (this.reason != null) {
|
|
960
|
+
data.reason = this.reason;
|
|
961
|
+
}
|
|
962
|
+
return data;
|
|
963
|
+
}
|
|
964
|
+
serialize(w) {
|
|
965
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
966
|
+
if (this.reversalId.length)
|
|
967
|
+
writer.writeString(1, this.reversalId);
|
|
968
|
+
if (this.merchantId.length)
|
|
969
|
+
writer.writeString(2, this.merchantId);
|
|
970
|
+
if (this.reason.length)
|
|
971
|
+
writer.writeString(3, this.reason);
|
|
972
|
+
if (!w)
|
|
973
|
+
return writer.getResultBuffer();
|
|
974
|
+
}
|
|
975
|
+
static deserialize(bytes) {
|
|
976
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteReversalRequest();
|
|
977
|
+
while (reader.nextField()) {
|
|
978
|
+
if (reader.isEndGroup())
|
|
979
|
+
break;
|
|
980
|
+
switch (reader.getFieldNumber()) {
|
|
981
|
+
case 1:
|
|
982
|
+
message.reversalId = reader.readString();
|
|
983
|
+
break;
|
|
984
|
+
case 2:
|
|
985
|
+
message.merchantId = reader.readString();
|
|
986
|
+
break;
|
|
987
|
+
case 3:
|
|
988
|
+
message.reason = reader.readString();
|
|
989
|
+
break;
|
|
990
|
+
default: reader.skipField();
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
return message;
|
|
994
|
+
}
|
|
995
|
+
serializeBinary() {
|
|
996
|
+
return this.serialize();
|
|
997
|
+
}
|
|
998
|
+
static deserializeBinary(bytes) {
|
|
999
|
+
return DeleteReversalRequest.deserialize(bytes);
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
transactions.DeleteReversalRequest = DeleteReversalRequest;
|
|
1003
|
+
class GetReversalTransactionRequest extends pb_1.Message {
|
|
1004
|
+
#one_of_decls = [];
|
|
1005
|
+
constructor(data) {
|
|
1006
|
+
super();
|
|
1007
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1008
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1009
|
+
if ("reversalId" in data && data.reversalId != undefined) {
|
|
1010
|
+
this.reversalId = data.reversalId;
|
|
1011
|
+
}
|
|
1012
|
+
if ("merchantId" in data && data.merchantId != undefined) {
|
|
1013
|
+
this.merchantId = data.merchantId;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
get reversalId() {
|
|
1018
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
1019
|
+
}
|
|
1020
|
+
set reversalId(value) {
|
|
1021
|
+
pb_1.Message.setField(this, 1, value);
|
|
1022
|
+
}
|
|
1023
|
+
get merchantId() {
|
|
1024
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1025
|
+
}
|
|
1026
|
+
set merchantId(value) {
|
|
1027
|
+
pb_1.Message.setField(this, 2, value);
|
|
1028
|
+
}
|
|
1029
|
+
static fromObject(data) {
|
|
1030
|
+
const message = new GetReversalTransactionRequest({});
|
|
1031
|
+
if (data.reversalId != null) {
|
|
1032
|
+
message.reversalId = data.reversalId;
|
|
1033
|
+
}
|
|
1034
|
+
if (data.merchantId != null) {
|
|
1035
|
+
message.merchantId = data.merchantId;
|
|
1036
|
+
}
|
|
1037
|
+
return message;
|
|
1038
|
+
}
|
|
1039
|
+
toObject() {
|
|
1040
|
+
const data = {};
|
|
1041
|
+
if (this.reversalId != null) {
|
|
1042
|
+
data.reversalId = this.reversalId;
|
|
1043
|
+
}
|
|
1044
|
+
if (this.merchantId != null) {
|
|
1045
|
+
data.merchantId = this.merchantId;
|
|
1046
|
+
}
|
|
1047
|
+
return data;
|
|
1048
|
+
}
|
|
1049
|
+
serialize(w) {
|
|
1050
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1051
|
+
if (this.reversalId.length)
|
|
1052
|
+
writer.writeString(1, this.reversalId);
|
|
1053
|
+
if (this.merchantId.length)
|
|
1054
|
+
writer.writeString(2, this.merchantId);
|
|
1055
|
+
if (!w)
|
|
1056
|
+
return writer.getResultBuffer();
|
|
1057
|
+
}
|
|
1058
|
+
static deserialize(bytes) {
|
|
1059
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetReversalTransactionRequest();
|
|
1060
|
+
while (reader.nextField()) {
|
|
1061
|
+
if (reader.isEndGroup())
|
|
1062
|
+
break;
|
|
1063
|
+
switch (reader.getFieldNumber()) {
|
|
1064
|
+
case 1:
|
|
1065
|
+
message.reversalId = reader.readString();
|
|
1066
|
+
break;
|
|
1067
|
+
case 2:
|
|
1068
|
+
message.merchantId = reader.readString();
|
|
1069
|
+
break;
|
|
1070
|
+
default: reader.skipField();
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
return message;
|
|
1074
|
+
}
|
|
1075
|
+
serializeBinary() {
|
|
1076
|
+
return this.serialize();
|
|
1077
|
+
}
|
|
1078
|
+
static deserializeBinary(bytes) {
|
|
1079
|
+
return GetReversalTransactionRequest.deserialize(bytes);
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
transactions.GetReversalTransactionRequest = GetReversalTransactionRequest;
|
|
1083
|
+
class InitTransactionResponse extends pb_1.Message {
|
|
1084
|
+
#one_of_decls = [];
|
|
1085
|
+
constructor(data) {
|
|
1086
|
+
super();
|
|
1087
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1088
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1089
|
+
if ("success" in data && data.success != undefined) {
|
|
1090
|
+
this.success = data.success;
|
|
1091
|
+
}
|
|
1092
|
+
if ("message" in data && data.message != undefined) {
|
|
1093
|
+
this.message = data.message;
|
|
1094
|
+
}
|
|
1095
|
+
if ("data" in data && data.data != undefined) {
|
|
1096
|
+
this.data = data.data;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
get success() {
|
|
1101
|
+
return pb_1.Message.getFieldWithDefault(this, 1, false);
|
|
1102
|
+
}
|
|
1103
|
+
set success(value) {
|
|
1104
|
+
pb_1.Message.setField(this, 1, value);
|
|
1105
|
+
}
|
|
1106
|
+
get message() {
|
|
1107
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1108
|
+
}
|
|
1109
|
+
set message(value) {
|
|
1110
|
+
pb_1.Message.setField(this, 2, value);
|
|
1111
|
+
}
|
|
1112
|
+
get data() {
|
|
1113
|
+
return pb_1.Message.getWrapperField(this, TransactionData, 3);
|
|
1114
|
+
}
|
|
1115
|
+
set data(value) {
|
|
1116
|
+
pb_1.Message.setWrapperField(this, 3, value);
|
|
1117
|
+
}
|
|
1118
|
+
get hasData() {
|
|
1119
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
1120
|
+
}
|
|
1121
|
+
static fromObject(data) {
|
|
1122
|
+
const message = new InitTransactionResponse({});
|
|
1123
|
+
if (data.success != null) {
|
|
1124
|
+
message.success = data.success;
|
|
1125
|
+
}
|
|
1126
|
+
if (data.message != null) {
|
|
1127
|
+
message.message = data.message;
|
|
1128
|
+
}
|
|
1129
|
+
if (data.data != null) {
|
|
1130
|
+
message.data = TransactionData.fromObject(data.data);
|
|
1131
|
+
}
|
|
1132
|
+
return message;
|
|
1133
|
+
}
|
|
1134
|
+
toObject() {
|
|
1135
|
+
const data = {};
|
|
1136
|
+
if (this.success != null) {
|
|
1137
|
+
data.success = this.success;
|
|
1138
|
+
}
|
|
1139
|
+
if (this.message != null) {
|
|
1140
|
+
data.message = this.message;
|
|
1141
|
+
}
|
|
1142
|
+
if (this.data != null) {
|
|
1143
|
+
data.data = this.data.toObject();
|
|
1144
|
+
}
|
|
1145
|
+
return data;
|
|
1146
|
+
}
|
|
1147
|
+
serialize(w) {
|
|
1148
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1149
|
+
if (this.success != false)
|
|
1150
|
+
writer.writeBool(1, this.success);
|
|
1151
|
+
if (this.message.length)
|
|
1152
|
+
writer.writeString(2, this.message);
|
|
1153
|
+
if (this.hasData)
|
|
1154
|
+
writer.writeMessage(3, this.data, () => this.data.serialize(writer));
|
|
1155
|
+
if (!w)
|
|
1156
|
+
return writer.getResultBuffer();
|
|
1157
|
+
}
|
|
1158
|
+
static deserialize(bytes) {
|
|
1159
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InitTransactionResponse();
|
|
1160
|
+
while (reader.nextField()) {
|
|
1161
|
+
if (reader.isEndGroup())
|
|
1162
|
+
break;
|
|
1163
|
+
switch (reader.getFieldNumber()) {
|
|
1164
|
+
case 1:
|
|
1165
|
+
message.success = reader.readBool();
|
|
1166
|
+
break;
|
|
1167
|
+
case 2:
|
|
1168
|
+
message.message = reader.readString();
|
|
1169
|
+
break;
|
|
1170
|
+
case 3:
|
|
1171
|
+
reader.readMessage(message.data, () => message.data = TransactionData.deserialize(reader));
|
|
1172
|
+
break;
|
|
1173
|
+
default: reader.skipField();
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
return message;
|
|
1177
|
+
}
|
|
1178
|
+
serializeBinary() {
|
|
1179
|
+
return this.serialize();
|
|
1180
|
+
}
|
|
1181
|
+
static deserializeBinary(bytes) {
|
|
1182
|
+
return InitTransactionResponse.deserialize(bytes);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
transactions.InitTransactionResponse = InitTransactionResponse;
|
|
1186
|
+
class CompleteTransactionResponse extends pb_1.Message {
|
|
1187
|
+
#one_of_decls = [];
|
|
1188
|
+
constructor(data) {
|
|
1189
|
+
super();
|
|
1190
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1191
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1192
|
+
if ("success" in data && data.success != undefined) {
|
|
1193
|
+
this.success = data.success;
|
|
1194
|
+
}
|
|
1195
|
+
if ("message" in data && data.message != undefined) {
|
|
1196
|
+
this.message = data.message;
|
|
1197
|
+
}
|
|
1198
|
+
if ("data" in data && data.data != undefined) {
|
|
1199
|
+
this.data = data.data;
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
get success() {
|
|
1204
|
+
return pb_1.Message.getFieldWithDefault(this, 1, false);
|
|
1205
|
+
}
|
|
1206
|
+
set success(value) {
|
|
1207
|
+
pb_1.Message.setField(this, 1, value);
|
|
1208
|
+
}
|
|
1209
|
+
get message() {
|
|
1210
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1211
|
+
}
|
|
1212
|
+
set message(value) {
|
|
1213
|
+
pb_1.Message.setField(this, 2, value);
|
|
1214
|
+
}
|
|
1215
|
+
get data() {
|
|
1216
|
+
return pb_1.Message.getWrapperField(this, TransactionData, 3);
|
|
1217
|
+
}
|
|
1218
|
+
set data(value) {
|
|
1219
|
+
pb_1.Message.setWrapperField(this, 3, value);
|
|
1220
|
+
}
|
|
1221
|
+
get hasData() {
|
|
1222
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
1223
|
+
}
|
|
1224
|
+
static fromObject(data) {
|
|
1225
|
+
const message = new CompleteTransactionResponse({});
|
|
1226
|
+
if (data.success != null) {
|
|
1227
|
+
message.success = data.success;
|
|
1228
|
+
}
|
|
1229
|
+
if (data.message != null) {
|
|
1230
|
+
message.message = data.message;
|
|
1231
|
+
}
|
|
1232
|
+
if (data.data != null) {
|
|
1233
|
+
message.data = TransactionData.fromObject(data.data);
|
|
1234
|
+
}
|
|
1235
|
+
return message;
|
|
1236
|
+
}
|
|
1237
|
+
toObject() {
|
|
1238
|
+
const data = {};
|
|
1239
|
+
if (this.success != null) {
|
|
1240
|
+
data.success = this.success;
|
|
1241
|
+
}
|
|
1242
|
+
if (this.message != null) {
|
|
1243
|
+
data.message = this.message;
|
|
1244
|
+
}
|
|
1245
|
+
if (this.data != null) {
|
|
1246
|
+
data.data = this.data.toObject();
|
|
1247
|
+
}
|
|
1248
|
+
return data;
|
|
1249
|
+
}
|
|
1250
|
+
serialize(w) {
|
|
1251
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1252
|
+
if (this.success != false)
|
|
1253
|
+
writer.writeBool(1, this.success);
|
|
1254
|
+
if (this.message.length)
|
|
1255
|
+
writer.writeString(2, this.message);
|
|
1256
|
+
if (this.hasData)
|
|
1257
|
+
writer.writeMessage(3, this.data, () => this.data.serialize(writer));
|
|
1258
|
+
if (!w)
|
|
1259
|
+
return writer.getResultBuffer();
|
|
1260
|
+
}
|
|
1261
|
+
static deserialize(bytes) {
|
|
1262
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CompleteTransactionResponse();
|
|
1263
|
+
while (reader.nextField()) {
|
|
1264
|
+
if (reader.isEndGroup())
|
|
1265
|
+
break;
|
|
1266
|
+
switch (reader.getFieldNumber()) {
|
|
1267
|
+
case 1:
|
|
1268
|
+
message.success = reader.readBool();
|
|
1269
|
+
break;
|
|
1270
|
+
case 2:
|
|
1271
|
+
message.message = reader.readString();
|
|
1272
|
+
break;
|
|
1273
|
+
case 3:
|
|
1274
|
+
reader.readMessage(message.data, () => message.data = TransactionData.deserialize(reader));
|
|
1275
|
+
break;
|
|
1276
|
+
default: reader.skipField();
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
return message;
|
|
1280
|
+
}
|
|
1281
|
+
serializeBinary() {
|
|
1282
|
+
return this.serialize();
|
|
1283
|
+
}
|
|
1284
|
+
static deserializeBinary(bytes) {
|
|
1285
|
+
return CompleteTransactionResponse.deserialize(bytes);
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
transactions.CompleteTransactionResponse = CompleteTransactionResponse;
|
|
1289
|
+
class ConfirmTransactionResponse extends pb_1.Message {
|
|
1290
|
+
#one_of_decls = [];
|
|
1291
|
+
constructor(data) {
|
|
1292
|
+
super();
|
|
1293
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1294
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1295
|
+
if ("success" in data && data.success != undefined) {
|
|
1296
|
+
this.success = data.success;
|
|
1297
|
+
}
|
|
1298
|
+
if ("message" in data && data.message != undefined) {
|
|
1299
|
+
this.message = data.message;
|
|
1300
|
+
}
|
|
1301
|
+
if ("data" in data && data.data != undefined) {
|
|
1302
|
+
this.data = data.data;
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
get success() {
|
|
1307
|
+
return pb_1.Message.getFieldWithDefault(this, 1, false);
|
|
1308
|
+
}
|
|
1309
|
+
set success(value) {
|
|
1310
|
+
pb_1.Message.setField(this, 1, value);
|
|
1311
|
+
}
|
|
1312
|
+
get message() {
|
|
1313
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1314
|
+
}
|
|
1315
|
+
set message(value) {
|
|
1316
|
+
pb_1.Message.setField(this, 2, value);
|
|
1317
|
+
}
|
|
1318
|
+
get data() {
|
|
1319
|
+
return pb_1.Message.getWrapperField(this, TransactionData, 3);
|
|
1320
|
+
}
|
|
1321
|
+
set data(value) {
|
|
1322
|
+
pb_1.Message.setWrapperField(this, 3, value);
|
|
1323
|
+
}
|
|
1324
|
+
get hasData() {
|
|
1325
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
1326
|
+
}
|
|
1327
|
+
static fromObject(data) {
|
|
1328
|
+
const message = new ConfirmTransactionResponse({});
|
|
1329
|
+
if (data.success != null) {
|
|
1330
|
+
message.success = data.success;
|
|
1331
|
+
}
|
|
1332
|
+
if (data.message != null) {
|
|
1333
|
+
message.message = data.message;
|
|
1334
|
+
}
|
|
1335
|
+
if (data.data != null) {
|
|
1336
|
+
message.data = TransactionData.fromObject(data.data);
|
|
1337
|
+
}
|
|
1338
|
+
return message;
|
|
1339
|
+
}
|
|
1340
|
+
toObject() {
|
|
1341
|
+
const data = {};
|
|
1342
|
+
if (this.success != null) {
|
|
1343
|
+
data.success = this.success;
|
|
1344
|
+
}
|
|
1345
|
+
if (this.message != null) {
|
|
1346
|
+
data.message = this.message;
|
|
1347
|
+
}
|
|
1348
|
+
if (this.data != null) {
|
|
1349
|
+
data.data = this.data.toObject();
|
|
1350
|
+
}
|
|
1351
|
+
return data;
|
|
1352
|
+
}
|
|
1353
|
+
serialize(w) {
|
|
1354
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1355
|
+
if (this.success != false)
|
|
1356
|
+
writer.writeBool(1, this.success);
|
|
1357
|
+
if (this.message.length)
|
|
1358
|
+
writer.writeString(2, this.message);
|
|
1359
|
+
if (this.hasData)
|
|
1360
|
+
writer.writeMessage(3, this.data, () => this.data.serialize(writer));
|
|
1361
|
+
if (!w)
|
|
1362
|
+
return writer.getResultBuffer();
|
|
1363
|
+
}
|
|
1364
|
+
static deserialize(bytes) {
|
|
1365
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConfirmTransactionResponse();
|
|
1366
|
+
while (reader.nextField()) {
|
|
1367
|
+
if (reader.isEndGroup())
|
|
1368
|
+
break;
|
|
1369
|
+
switch (reader.getFieldNumber()) {
|
|
1370
|
+
case 1:
|
|
1371
|
+
message.success = reader.readBool();
|
|
1372
|
+
break;
|
|
1373
|
+
case 2:
|
|
1374
|
+
message.message = reader.readString();
|
|
1375
|
+
break;
|
|
1376
|
+
case 3:
|
|
1377
|
+
reader.readMessage(message.data, () => message.data = TransactionData.deserialize(reader));
|
|
1378
|
+
break;
|
|
1379
|
+
default: reader.skipField();
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
return message;
|
|
1383
|
+
}
|
|
1384
|
+
serializeBinary() {
|
|
1385
|
+
return this.serialize();
|
|
1386
|
+
}
|
|
1387
|
+
static deserializeBinary(bytes) {
|
|
1388
|
+
return ConfirmTransactionResponse.deserialize(bytes);
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
transactions.ConfirmTransactionResponse = ConfirmTransactionResponse;
|
|
1392
|
+
class GetTransactionResponse extends pb_1.Message {
|
|
1393
|
+
#one_of_decls = [];
|
|
1394
|
+
constructor(data) {
|
|
1395
|
+
super();
|
|
1396
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1397
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1398
|
+
if ("success" in data && data.success != undefined) {
|
|
1399
|
+
this.success = data.success;
|
|
1400
|
+
}
|
|
1401
|
+
if ("message" in data && data.message != undefined) {
|
|
1402
|
+
this.message = data.message;
|
|
1403
|
+
}
|
|
1404
|
+
if ("data" in data && data.data != undefined) {
|
|
1405
|
+
this.data = data.data;
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
get success() {
|
|
1410
|
+
return pb_1.Message.getFieldWithDefault(this, 1, false);
|
|
1411
|
+
}
|
|
1412
|
+
set success(value) {
|
|
1413
|
+
pb_1.Message.setField(this, 1, value);
|
|
1414
|
+
}
|
|
1415
|
+
get message() {
|
|
1416
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1417
|
+
}
|
|
1418
|
+
set message(value) {
|
|
1419
|
+
pb_1.Message.setField(this, 2, value);
|
|
1420
|
+
}
|
|
1421
|
+
get data() {
|
|
1422
|
+
return pb_1.Message.getWrapperField(this, TransactionData, 3);
|
|
1423
|
+
}
|
|
1424
|
+
set data(value) {
|
|
1425
|
+
pb_1.Message.setWrapperField(this, 3, value);
|
|
1426
|
+
}
|
|
1427
|
+
get hasData() {
|
|
1428
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
1429
|
+
}
|
|
1430
|
+
static fromObject(data) {
|
|
1431
|
+
const message = new GetTransactionResponse({});
|
|
1432
|
+
if (data.success != null) {
|
|
1433
|
+
message.success = data.success;
|
|
1434
|
+
}
|
|
1435
|
+
if (data.message != null) {
|
|
1436
|
+
message.message = data.message;
|
|
1437
|
+
}
|
|
1438
|
+
if (data.data != null) {
|
|
1439
|
+
message.data = TransactionData.fromObject(data.data);
|
|
1440
|
+
}
|
|
1441
|
+
return message;
|
|
1442
|
+
}
|
|
1443
|
+
toObject() {
|
|
1444
|
+
const data = {};
|
|
1445
|
+
if (this.success != null) {
|
|
1446
|
+
data.success = this.success;
|
|
1447
|
+
}
|
|
1448
|
+
if (this.message != null) {
|
|
1449
|
+
data.message = this.message;
|
|
1450
|
+
}
|
|
1451
|
+
if (this.data != null) {
|
|
1452
|
+
data.data = this.data.toObject();
|
|
1453
|
+
}
|
|
1454
|
+
return data;
|
|
1455
|
+
}
|
|
1456
|
+
serialize(w) {
|
|
1457
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1458
|
+
if (this.success != false)
|
|
1459
|
+
writer.writeBool(1, this.success);
|
|
1460
|
+
if (this.message.length)
|
|
1461
|
+
writer.writeString(2, this.message);
|
|
1462
|
+
if (this.hasData)
|
|
1463
|
+
writer.writeMessage(3, this.data, () => this.data.serialize(writer));
|
|
1464
|
+
if (!w)
|
|
1465
|
+
return writer.getResultBuffer();
|
|
1466
|
+
}
|
|
1467
|
+
static deserialize(bytes) {
|
|
1468
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTransactionResponse();
|
|
1469
|
+
while (reader.nextField()) {
|
|
1470
|
+
if (reader.isEndGroup())
|
|
1471
|
+
break;
|
|
1472
|
+
switch (reader.getFieldNumber()) {
|
|
1473
|
+
case 1:
|
|
1474
|
+
message.success = reader.readBool();
|
|
1475
|
+
break;
|
|
1476
|
+
case 2:
|
|
1477
|
+
message.message = reader.readString();
|
|
1478
|
+
break;
|
|
1479
|
+
case 3:
|
|
1480
|
+
reader.readMessage(message.data, () => message.data = TransactionData.deserialize(reader));
|
|
1481
|
+
break;
|
|
1482
|
+
default: reader.skipField();
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
return message;
|
|
1486
|
+
}
|
|
1487
|
+
serializeBinary() {
|
|
1488
|
+
return this.serialize();
|
|
1489
|
+
}
|
|
1490
|
+
static deserializeBinary(bytes) {
|
|
1491
|
+
return GetTransactionResponse.deserialize(bytes);
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
transactions.GetTransactionResponse = GetTransactionResponse;
|
|
1495
|
+
class SaveReversalResponse extends pb_1.Message {
|
|
1496
|
+
#one_of_decls = [];
|
|
1497
|
+
constructor(data) {
|
|
1498
|
+
super();
|
|
1499
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1500
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1501
|
+
if ("success" in data && data.success != undefined) {
|
|
1502
|
+
this.success = data.success;
|
|
1503
|
+
}
|
|
1504
|
+
if ("message" in data && data.message != undefined) {
|
|
1505
|
+
this.message = data.message;
|
|
1506
|
+
}
|
|
1507
|
+
if ("data" in data && data.data != undefined) {
|
|
1508
|
+
this.data = data.data;
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
get success() {
|
|
1513
|
+
return pb_1.Message.getFieldWithDefault(this, 1, false);
|
|
1514
|
+
}
|
|
1515
|
+
set success(value) {
|
|
1516
|
+
pb_1.Message.setField(this, 1, value);
|
|
1517
|
+
}
|
|
1518
|
+
get message() {
|
|
1519
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1520
|
+
}
|
|
1521
|
+
set message(value) {
|
|
1522
|
+
pb_1.Message.setField(this, 2, value);
|
|
1523
|
+
}
|
|
1524
|
+
get data() {
|
|
1525
|
+
return pb_1.Message.getWrapperField(this, ReversalData, 3);
|
|
1526
|
+
}
|
|
1527
|
+
set data(value) {
|
|
1528
|
+
pb_1.Message.setWrapperField(this, 3, value);
|
|
1529
|
+
}
|
|
1530
|
+
get hasData() {
|
|
1531
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
1532
|
+
}
|
|
1533
|
+
static fromObject(data) {
|
|
1534
|
+
const message = new SaveReversalResponse({});
|
|
1535
|
+
if (data.success != null) {
|
|
1536
|
+
message.success = data.success;
|
|
1537
|
+
}
|
|
1538
|
+
if (data.message != null) {
|
|
1539
|
+
message.message = data.message;
|
|
1540
|
+
}
|
|
1541
|
+
if (data.data != null) {
|
|
1542
|
+
message.data = ReversalData.fromObject(data.data);
|
|
1543
|
+
}
|
|
1544
|
+
return message;
|
|
1545
|
+
}
|
|
1546
|
+
toObject() {
|
|
1547
|
+
const data = {};
|
|
1548
|
+
if (this.success != null) {
|
|
1549
|
+
data.success = this.success;
|
|
1550
|
+
}
|
|
1551
|
+
if (this.message != null) {
|
|
1552
|
+
data.message = this.message;
|
|
1553
|
+
}
|
|
1554
|
+
if (this.data != null) {
|
|
1555
|
+
data.data = this.data.toObject();
|
|
1556
|
+
}
|
|
1557
|
+
return data;
|
|
1558
|
+
}
|
|
1559
|
+
serialize(w) {
|
|
1560
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1561
|
+
if (this.success != false)
|
|
1562
|
+
writer.writeBool(1, this.success);
|
|
1563
|
+
if (this.message.length)
|
|
1564
|
+
writer.writeString(2, this.message);
|
|
1565
|
+
if (this.hasData)
|
|
1566
|
+
writer.writeMessage(3, this.data, () => this.data.serialize(writer));
|
|
1567
|
+
if (!w)
|
|
1568
|
+
return writer.getResultBuffer();
|
|
1569
|
+
}
|
|
1570
|
+
static deserialize(bytes) {
|
|
1571
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SaveReversalResponse();
|
|
1572
|
+
while (reader.nextField()) {
|
|
1573
|
+
if (reader.isEndGroup())
|
|
1574
|
+
break;
|
|
1575
|
+
switch (reader.getFieldNumber()) {
|
|
1576
|
+
case 1:
|
|
1577
|
+
message.success = reader.readBool();
|
|
1578
|
+
break;
|
|
1579
|
+
case 2:
|
|
1580
|
+
message.message = reader.readString();
|
|
1581
|
+
break;
|
|
1582
|
+
case 3:
|
|
1583
|
+
reader.readMessage(message.data, () => message.data = ReversalData.deserialize(reader));
|
|
1584
|
+
break;
|
|
1585
|
+
default: reader.skipField();
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
return message;
|
|
1589
|
+
}
|
|
1590
|
+
serializeBinary() {
|
|
1591
|
+
return this.serialize();
|
|
1592
|
+
}
|
|
1593
|
+
static deserializeBinary(bytes) {
|
|
1594
|
+
return SaveReversalResponse.deserialize(bytes);
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
transactions.SaveReversalResponse = SaveReversalResponse;
|
|
1598
|
+
class DeleteReversalResponse extends pb_1.Message {
|
|
1599
|
+
#one_of_decls = [];
|
|
1600
|
+
constructor(data) {
|
|
1601
|
+
super();
|
|
1602
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1603
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1604
|
+
if ("success" in data && data.success != undefined) {
|
|
1605
|
+
this.success = data.success;
|
|
1606
|
+
}
|
|
1607
|
+
if ("message" in data && data.message != undefined) {
|
|
1608
|
+
this.message = data.message;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
get success() {
|
|
1613
|
+
return pb_1.Message.getFieldWithDefault(this, 1, false);
|
|
1614
|
+
}
|
|
1615
|
+
set success(value) {
|
|
1616
|
+
pb_1.Message.setField(this, 1, value);
|
|
1617
|
+
}
|
|
1618
|
+
get message() {
|
|
1619
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1620
|
+
}
|
|
1621
|
+
set message(value) {
|
|
1622
|
+
pb_1.Message.setField(this, 2, value);
|
|
1623
|
+
}
|
|
1624
|
+
static fromObject(data) {
|
|
1625
|
+
const message = new DeleteReversalResponse({});
|
|
1626
|
+
if (data.success != null) {
|
|
1627
|
+
message.success = data.success;
|
|
1628
|
+
}
|
|
1629
|
+
if (data.message != null) {
|
|
1630
|
+
message.message = data.message;
|
|
1631
|
+
}
|
|
1632
|
+
return message;
|
|
1633
|
+
}
|
|
1634
|
+
toObject() {
|
|
1635
|
+
const data = {};
|
|
1636
|
+
if (this.success != null) {
|
|
1637
|
+
data.success = this.success;
|
|
1638
|
+
}
|
|
1639
|
+
if (this.message != null) {
|
|
1640
|
+
data.message = this.message;
|
|
1641
|
+
}
|
|
1642
|
+
return data;
|
|
1643
|
+
}
|
|
1644
|
+
serialize(w) {
|
|
1645
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1646
|
+
if (this.success != false)
|
|
1647
|
+
writer.writeBool(1, this.success);
|
|
1648
|
+
if (this.message.length)
|
|
1649
|
+
writer.writeString(2, this.message);
|
|
1650
|
+
if (!w)
|
|
1651
|
+
return writer.getResultBuffer();
|
|
1652
|
+
}
|
|
1653
|
+
static deserialize(bytes) {
|
|
1654
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteReversalResponse();
|
|
1655
|
+
while (reader.nextField()) {
|
|
1656
|
+
if (reader.isEndGroup())
|
|
1657
|
+
break;
|
|
1658
|
+
switch (reader.getFieldNumber()) {
|
|
1659
|
+
case 1:
|
|
1660
|
+
message.success = reader.readBool();
|
|
1661
|
+
break;
|
|
1662
|
+
case 2:
|
|
1663
|
+
message.message = reader.readString();
|
|
1664
|
+
break;
|
|
1665
|
+
default: reader.skipField();
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
return message;
|
|
1669
|
+
}
|
|
1670
|
+
serializeBinary() {
|
|
1671
|
+
return this.serialize();
|
|
1672
|
+
}
|
|
1673
|
+
static deserializeBinary(bytes) {
|
|
1674
|
+
return DeleteReversalResponse.deserialize(bytes);
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
transactions.DeleteReversalResponse = DeleteReversalResponse;
|
|
1678
|
+
class GetReversalTransactionResponse extends pb_1.Message {
|
|
1679
|
+
#one_of_decls = [];
|
|
1680
|
+
constructor(data) {
|
|
1681
|
+
super();
|
|
1682
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1683
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1684
|
+
if ("success" in data && data.success != undefined) {
|
|
1685
|
+
this.success = data.success;
|
|
1686
|
+
}
|
|
1687
|
+
if ("message" in data && data.message != undefined) {
|
|
1688
|
+
this.message = data.message;
|
|
1689
|
+
}
|
|
1690
|
+
if ("data" in data && data.data != undefined) {
|
|
1691
|
+
this.data = data.data;
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
get success() {
|
|
1696
|
+
return pb_1.Message.getFieldWithDefault(this, 1, false);
|
|
1697
|
+
}
|
|
1698
|
+
set success(value) {
|
|
1699
|
+
pb_1.Message.setField(this, 1, value);
|
|
1700
|
+
}
|
|
1701
|
+
get message() {
|
|
1702
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1703
|
+
}
|
|
1704
|
+
set message(value) {
|
|
1705
|
+
pb_1.Message.setField(this, 2, value);
|
|
1706
|
+
}
|
|
1707
|
+
get data() {
|
|
1708
|
+
return pb_1.Message.getWrapperField(this, ReversalData, 3);
|
|
1709
|
+
}
|
|
1710
|
+
set data(value) {
|
|
1711
|
+
pb_1.Message.setWrapperField(this, 3, value);
|
|
1712
|
+
}
|
|
1713
|
+
get hasData() {
|
|
1714
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
1715
|
+
}
|
|
1716
|
+
static fromObject(data) {
|
|
1717
|
+
const message = new GetReversalTransactionResponse({});
|
|
1718
|
+
if (data.success != null) {
|
|
1719
|
+
message.success = data.success;
|
|
1720
|
+
}
|
|
1721
|
+
if (data.message != null) {
|
|
1722
|
+
message.message = data.message;
|
|
1723
|
+
}
|
|
1724
|
+
if (data.data != null) {
|
|
1725
|
+
message.data = ReversalData.fromObject(data.data);
|
|
1726
|
+
}
|
|
1727
|
+
return message;
|
|
1728
|
+
}
|
|
1729
|
+
toObject() {
|
|
1730
|
+
const data = {};
|
|
1731
|
+
if (this.success != null) {
|
|
1732
|
+
data.success = this.success;
|
|
1733
|
+
}
|
|
1734
|
+
if (this.message != null) {
|
|
1735
|
+
data.message = this.message;
|
|
1736
|
+
}
|
|
1737
|
+
if (this.data != null) {
|
|
1738
|
+
data.data = this.data.toObject();
|
|
1739
|
+
}
|
|
1740
|
+
return data;
|
|
1741
|
+
}
|
|
1742
|
+
serialize(w) {
|
|
1743
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1744
|
+
if (this.success != false)
|
|
1745
|
+
writer.writeBool(1, this.success);
|
|
1746
|
+
if (this.message.length)
|
|
1747
|
+
writer.writeString(2, this.message);
|
|
1748
|
+
if (this.hasData)
|
|
1749
|
+
writer.writeMessage(3, this.data, () => this.data.serialize(writer));
|
|
1750
|
+
if (!w)
|
|
1751
|
+
return writer.getResultBuffer();
|
|
1752
|
+
}
|
|
1753
|
+
static deserialize(bytes) {
|
|
1754
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetReversalTransactionResponse();
|
|
1755
|
+
while (reader.nextField()) {
|
|
1756
|
+
if (reader.isEndGroup())
|
|
1757
|
+
break;
|
|
1758
|
+
switch (reader.getFieldNumber()) {
|
|
1759
|
+
case 1:
|
|
1760
|
+
message.success = reader.readBool();
|
|
1761
|
+
break;
|
|
1762
|
+
case 2:
|
|
1763
|
+
message.message = reader.readString();
|
|
1764
|
+
break;
|
|
1765
|
+
case 3:
|
|
1766
|
+
reader.readMessage(message.data, () => message.data = ReversalData.deserialize(reader));
|
|
1767
|
+
break;
|
|
1768
|
+
default: reader.skipField();
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
return message;
|
|
1772
|
+
}
|
|
1773
|
+
serializeBinary() {
|
|
1774
|
+
return this.serialize();
|
|
1775
|
+
}
|
|
1776
|
+
static deserializeBinary(bytes) {
|
|
1777
|
+
return GetReversalTransactionResponse.deserialize(bytes);
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
transactions.GetReversalTransactionResponse = GetReversalTransactionResponse;
|
|
1781
|
+
class TransactionData extends pb_1.Message {
|
|
1782
|
+
#one_of_decls = [];
|
|
1783
|
+
constructor(data) {
|
|
1784
|
+
super();
|
|
1785
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1786
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1787
|
+
if ("id" in data && data.id != undefined) {
|
|
1788
|
+
this.id = data.id;
|
|
1789
|
+
}
|
|
1790
|
+
if ("merchantId" in data && data.merchantId != undefined) {
|
|
1791
|
+
this.merchantId = data.merchantId;
|
|
1792
|
+
}
|
|
1793
|
+
if ("terminalId" in data && data.terminalId != undefined) {
|
|
1794
|
+
this.terminalId = data.terminalId;
|
|
1795
|
+
}
|
|
1796
|
+
if ("amount" in data && data.amount != undefined) {
|
|
1797
|
+
this.amount = data.amount;
|
|
1798
|
+
}
|
|
1799
|
+
if ("currency" in data && data.currency != undefined) {
|
|
1800
|
+
this.currency = data.currency;
|
|
1801
|
+
}
|
|
1802
|
+
if ("transactionType" in data && data.transactionType != undefined) {
|
|
1803
|
+
this.transactionType = data.transactionType;
|
|
1804
|
+
}
|
|
1805
|
+
if ("reference" in data && data.reference != undefined) {
|
|
1806
|
+
this.reference = data.reference;
|
|
1807
|
+
}
|
|
1808
|
+
if ("rrn" in data && data.rrn != undefined) {
|
|
1809
|
+
this.rrn = data.rrn;
|
|
1810
|
+
}
|
|
1811
|
+
if ("status" in data && data.status != undefined) {
|
|
1812
|
+
this.status = data.status;
|
|
1813
|
+
}
|
|
1814
|
+
if ("processorReference" in data && data.processorReference != undefined) {
|
|
1815
|
+
this.processorReference = data.processorReference;
|
|
1816
|
+
}
|
|
1817
|
+
if ("responseCode" in data && data.responseCode != undefined) {
|
|
1818
|
+
this.responseCode = data.responseCode;
|
|
1819
|
+
}
|
|
1820
|
+
if ("responseMessage" in data && data.responseMessage != undefined) {
|
|
1821
|
+
this.responseMessage = data.responseMessage;
|
|
1822
|
+
}
|
|
1823
|
+
if ("authorizationCode" in data && data.authorizationCode != undefined) {
|
|
1824
|
+
this.authorizationCode = data.authorizationCode;
|
|
1825
|
+
}
|
|
1826
|
+
if ("meta" in data && data.meta != undefined) {
|
|
1827
|
+
this.meta = data.meta;
|
|
1828
|
+
}
|
|
1829
|
+
if ("processorData" in data && data.processorData != undefined) {
|
|
1830
|
+
this.processorData = data.processorData;
|
|
1831
|
+
}
|
|
1832
|
+
if ("createdAt" in data && data.createdAt != undefined) {
|
|
1833
|
+
this.createdAt = data.createdAt;
|
|
1834
|
+
}
|
|
1835
|
+
if ("updatedAt" in data && data.updatedAt != undefined) {
|
|
1836
|
+
this.updatedAt = data.updatedAt;
|
|
1837
|
+
}
|
|
1838
|
+
if ("completedAt" in data && data.completedAt != undefined) {
|
|
1839
|
+
this.completedAt = data.completedAt;
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
get id() {
|
|
1844
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
1845
|
+
}
|
|
1846
|
+
set id(value) {
|
|
1847
|
+
pb_1.Message.setField(this, 1, value);
|
|
1848
|
+
}
|
|
1849
|
+
get merchantId() {
|
|
1850
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1851
|
+
}
|
|
1852
|
+
set merchantId(value) {
|
|
1853
|
+
pb_1.Message.setField(this, 2, value);
|
|
1854
|
+
}
|
|
1855
|
+
get terminalId() {
|
|
1856
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
1857
|
+
}
|
|
1858
|
+
set terminalId(value) {
|
|
1859
|
+
pb_1.Message.setField(this, 3, value);
|
|
1860
|
+
}
|
|
1861
|
+
get amount() {
|
|
1862
|
+
return pb_1.Message.getFieldWithDefault(this, 4, 0);
|
|
1863
|
+
}
|
|
1864
|
+
set amount(value) {
|
|
1865
|
+
pb_1.Message.setField(this, 4, value);
|
|
1866
|
+
}
|
|
1867
|
+
get currency() {
|
|
1868
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
1869
|
+
}
|
|
1870
|
+
set currency(value) {
|
|
1871
|
+
pb_1.Message.setField(this, 5, value);
|
|
1872
|
+
}
|
|
1873
|
+
get transactionType() {
|
|
1874
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
1875
|
+
}
|
|
1876
|
+
set transactionType(value) {
|
|
1877
|
+
pb_1.Message.setField(this, 6, value);
|
|
1878
|
+
}
|
|
1879
|
+
get reference() {
|
|
1880
|
+
return pb_1.Message.getFieldWithDefault(this, 7, "");
|
|
1881
|
+
}
|
|
1882
|
+
set reference(value) {
|
|
1883
|
+
pb_1.Message.setField(this, 7, value);
|
|
1884
|
+
}
|
|
1885
|
+
get rrn() {
|
|
1886
|
+
return pb_1.Message.getFieldWithDefault(this, 8, "");
|
|
1887
|
+
}
|
|
1888
|
+
set rrn(value) {
|
|
1889
|
+
pb_1.Message.setField(this, 8, value);
|
|
1890
|
+
}
|
|
1891
|
+
get status() {
|
|
1892
|
+
return pb_1.Message.getFieldWithDefault(this, 9, TransactionStatus.PENDING);
|
|
1893
|
+
}
|
|
1894
|
+
set status(value) {
|
|
1895
|
+
pb_1.Message.setField(this, 9, value);
|
|
1896
|
+
}
|
|
1897
|
+
get processorReference() {
|
|
1898
|
+
return pb_1.Message.getFieldWithDefault(this, 10, "");
|
|
1899
|
+
}
|
|
1900
|
+
set processorReference(value) {
|
|
1901
|
+
pb_1.Message.setField(this, 10, value);
|
|
1902
|
+
}
|
|
1903
|
+
get responseCode() {
|
|
1904
|
+
return pb_1.Message.getFieldWithDefault(this, 11, "");
|
|
1905
|
+
}
|
|
1906
|
+
set responseCode(value) {
|
|
1907
|
+
pb_1.Message.setField(this, 11, value);
|
|
1908
|
+
}
|
|
1909
|
+
get responseMessage() {
|
|
1910
|
+
return pb_1.Message.getFieldWithDefault(this, 12, "");
|
|
1911
|
+
}
|
|
1912
|
+
set responseMessage(value) {
|
|
1913
|
+
pb_1.Message.setField(this, 12, value);
|
|
1914
|
+
}
|
|
1915
|
+
get authorizationCode() {
|
|
1916
|
+
return pb_1.Message.getFieldWithDefault(this, 13, "");
|
|
1917
|
+
}
|
|
1918
|
+
set authorizationCode(value) {
|
|
1919
|
+
pb_1.Message.setField(this, 13, value);
|
|
1920
|
+
}
|
|
1921
|
+
get meta() {
|
|
1922
|
+
return pb_1.Message.getWrapperField(this, TransactionMeta, 14);
|
|
1923
|
+
}
|
|
1924
|
+
set meta(value) {
|
|
1925
|
+
pb_1.Message.setWrapperField(this, 14, value);
|
|
1926
|
+
}
|
|
1927
|
+
get hasMeta() {
|
|
1928
|
+
return pb_1.Message.getField(this, 14) != null;
|
|
1929
|
+
}
|
|
1930
|
+
get processorData() {
|
|
1931
|
+
return pb_1.Message.getWrapperField(this, ProcessorData, 15);
|
|
1932
|
+
}
|
|
1933
|
+
set processorData(value) {
|
|
1934
|
+
pb_1.Message.setWrapperField(this, 15, value);
|
|
1935
|
+
}
|
|
1936
|
+
get hasProcessorData() {
|
|
1937
|
+
return pb_1.Message.getField(this, 15) != null;
|
|
1938
|
+
}
|
|
1939
|
+
get createdAt() {
|
|
1940
|
+
return pb_1.Message.getFieldWithDefault(this, 16, 0);
|
|
1941
|
+
}
|
|
1942
|
+
set createdAt(value) {
|
|
1943
|
+
pb_1.Message.setField(this, 16, value);
|
|
1944
|
+
}
|
|
1945
|
+
get updatedAt() {
|
|
1946
|
+
return pb_1.Message.getFieldWithDefault(this, 17, 0);
|
|
1947
|
+
}
|
|
1948
|
+
set updatedAt(value) {
|
|
1949
|
+
pb_1.Message.setField(this, 17, value);
|
|
1950
|
+
}
|
|
1951
|
+
get completedAt() {
|
|
1952
|
+
return pb_1.Message.getFieldWithDefault(this, 18, 0);
|
|
1953
|
+
}
|
|
1954
|
+
set completedAt(value) {
|
|
1955
|
+
pb_1.Message.setField(this, 18, value);
|
|
1956
|
+
}
|
|
1957
|
+
static fromObject(data) {
|
|
1958
|
+
const message = new TransactionData({});
|
|
1959
|
+
if (data.id != null) {
|
|
1960
|
+
message.id = data.id;
|
|
1961
|
+
}
|
|
1962
|
+
if (data.merchantId != null) {
|
|
1963
|
+
message.merchantId = data.merchantId;
|
|
1964
|
+
}
|
|
1965
|
+
if (data.terminalId != null) {
|
|
1966
|
+
message.terminalId = data.terminalId;
|
|
1967
|
+
}
|
|
1968
|
+
if (data.amount != null) {
|
|
1969
|
+
message.amount = data.amount;
|
|
1970
|
+
}
|
|
1971
|
+
if (data.currency != null) {
|
|
1972
|
+
message.currency = data.currency;
|
|
1973
|
+
}
|
|
1974
|
+
if (data.transactionType != null) {
|
|
1975
|
+
message.transactionType = data.transactionType;
|
|
1976
|
+
}
|
|
1977
|
+
if (data.reference != null) {
|
|
1978
|
+
message.reference = data.reference;
|
|
1979
|
+
}
|
|
1980
|
+
if (data.rrn != null) {
|
|
1981
|
+
message.rrn = data.rrn;
|
|
1982
|
+
}
|
|
1983
|
+
if (data.status != null) {
|
|
1984
|
+
message.status = data.status;
|
|
1985
|
+
}
|
|
1986
|
+
if (data.processorReference != null) {
|
|
1987
|
+
message.processorReference = data.processorReference;
|
|
1988
|
+
}
|
|
1989
|
+
if (data.responseCode != null) {
|
|
1990
|
+
message.responseCode = data.responseCode;
|
|
1991
|
+
}
|
|
1992
|
+
if (data.responseMessage != null) {
|
|
1993
|
+
message.responseMessage = data.responseMessage;
|
|
1994
|
+
}
|
|
1995
|
+
if (data.authorizationCode != null) {
|
|
1996
|
+
message.authorizationCode = data.authorizationCode;
|
|
1997
|
+
}
|
|
1998
|
+
if (data.meta != null) {
|
|
1999
|
+
message.meta = TransactionMeta.fromObject(data.meta);
|
|
2000
|
+
}
|
|
2001
|
+
if (data.processorData != null) {
|
|
2002
|
+
message.processorData = ProcessorData.fromObject(data.processorData);
|
|
2003
|
+
}
|
|
2004
|
+
if (data.createdAt != null) {
|
|
2005
|
+
message.createdAt = data.createdAt;
|
|
2006
|
+
}
|
|
2007
|
+
if (data.updatedAt != null) {
|
|
2008
|
+
message.updatedAt = data.updatedAt;
|
|
2009
|
+
}
|
|
2010
|
+
if (data.completedAt != null) {
|
|
2011
|
+
message.completedAt = data.completedAt;
|
|
2012
|
+
}
|
|
2013
|
+
return message;
|
|
2014
|
+
}
|
|
2015
|
+
toObject() {
|
|
2016
|
+
const data = {};
|
|
2017
|
+
if (this.id != null) {
|
|
2018
|
+
data.id = this.id;
|
|
2019
|
+
}
|
|
2020
|
+
if (this.merchantId != null) {
|
|
2021
|
+
data.merchantId = this.merchantId;
|
|
2022
|
+
}
|
|
2023
|
+
if (this.terminalId != null) {
|
|
2024
|
+
data.terminalId = this.terminalId;
|
|
2025
|
+
}
|
|
2026
|
+
if (this.amount != null) {
|
|
2027
|
+
data.amount = this.amount;
|
|
2028
|
+
}
|
|
2029
|
+
if (this.currency != null) {
|
|
2030
|
+
data.currency = this.currency;
|
|
2031
|
+
}
|
|
2032
|
+
if (this.transactionType != null) {
|
|
2033
|
+
data.transactionType = this.transactionType;
|
|
2034
|
+
}
|
|
2035
|
+
if (this.reference != null) {
|
|
2036
|
+
data.reference = this.reference;
|
|
2037
|
+
}
|
|
2038
|
+
if (this.rrn != null) {
|
|
2039
|
+
data.rrn = this.rrn;
|
|
2040
|
+
}
|
|
2041
|
+
if (this.status != null) {
|
|
2042
|
+
data.status = this.status;
|
|
2043
|
+
}
|
|
2044
|
+
if (this.processorReference != null) {
|
|
2045
|
+
data.processorReference = this.processorReference;
|
|
2046
|
+
}
|
|
2047
|
+
if (this.responseCode != null) {
|
|
2048
|
+
data.responseCode = this.responseCode;
|
|
2049
|
+
}
|
|
2050
|
+
if (this.responseMessage != null) {
|
|
2051
|
+
data.responseMessage = this.responseMessage;
|
|
2052
|
+
}
|
|
2053
|
+
if (this.authorizationCode != null) {
|
|
2054
|
+
data.authorizationCode = this.authorizationCode;
|
|
2055
|
+
}
|
|
2056
|
+
if (this.meta != null) {
|
|
2057
|
+
data.meta = this.meta.toObject();
|
|
2058
|
+
}
|
|
2059
|
+
if (this.processorData != null) {
|
|
2060
|
+
data.processorData = this.processorData.toObject();
|
|
2061
|
+
}
|
|
2062
|
+
if (this.createdAt != null) {
|
|
2063
|
+
data.createdAt = this.createdAt;
|
|
2064
|
+
}
|
|
2065
|
+
if (this.updatedAt != null) {
|
|
2066
|
+
data.updatedAt = this.updatedAt;
|
|
2067
|
+
}
|
|
2068
|
+
if (this.completedAt != null) {
|
|
2069
|
+
data.completedAt = this.completedAt;
|
|
2070
|
+
}
|
|
2071
|
+
return data;
|
|
2072
|
+
}
|
|
2073
|
+
serialize(w) {
|
|
2074
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
2075
|
+
if (this.id.length)
|
|
2076
|
+
writer.writeString(1, this.id);
|
|
2077
|
+
if (this.merchantId.length)
|
|
2078
|
+
writer.writeString(2, this.merchantId);
|
|
2079
|
+
if (this.terminalId.length)
|
|
2080
|
+
writer.writeString(3, this.terminalId);
|
|
2081
|
+
if (this.amount != 0)
|
|
2082
|
+
writer.writeInt64(4, this.amount);
|
|
2083
|
+
if (this.currency.length)
|
|
2084
|
+
writer.writeString(5, this.currency);
|
|
2085
|
+
if (this.transactionType.length)
|
|
2086
|
+
writer.writeString(6, this.transactionType);
|
|
2087
|
+
if (this.reference.length)
|
|
2088
|
+
writer.writeString(7, this.reference);
|
|
2089
|
+
if (this.rrn.length)
|
|
2090
|
+
writer.writeString(8, this.rrn);
|
|
2091
|
+
if (this.status != TransactionStatus.PENDING)
|
|
2092
|
+
writer.writeEnum(9, this.status);
|
|
2093
|
+
if (this.processorReference.length)
|
|
2094
|
+
writer.writeString(10, this.processorReference);
|
|
2095
|
+
if (this.responseCode.length)
|
|
2096
|
+
writer.writeString(11, this.responseCode);
|
|
2097
|
+
if (this.responseMessage.length)
|
|
2098
|
+
writer.writeString(12, this.responseMessage);
|
|
2099
|
+
if (this.authorizationCode.length)
|
|
2100
|
+
writer.writeString(13, this.authorizationCode);
|
|
2101
|
+
if (this.hasMeta)
|
|
2102
|
+
writer.writeMessage(14, this.meta, () => this.meta.serialize(writer));
|
|
2103
|
+
if (this.hasProcessorData)
|
|
2104
|
+
writer.writeMessage(15, this.processorData, () => this.processorData.serialize(writer));
|
|
2105
|
+
if (this.createdAt != 0)
|
|
2106
|
+
writer.writeInt64(16, this.createdAt);
|
|
2107
|
+
if (this.updatedAt != 0)
|
|
2108
|
+
writer.writeInt64(17, this.updatedAt);
|
|
2109
|
+
if (this.completedAt != 0)
|
|
2110
|
+
writer.writeInt64(18, this.completedAt);
|
|
2111
|
+
if (!w)
|
|
2112
|
+
return writer.getResultBuffer();
|
|
2113
|
+
}
|
|
2114
|
+
static deserialize(bytes) {
|
|
2115
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionData();
|
|
2116
|
+
while (reader.nextField()) {
|
|
2117
|
+
if (reader.isEndGroup())
|
|
2118
|
+
break;
|
|
2119
|
+
switch (reader.getFieldNumber()) {
|
|
2120
|
+
case 1:
|
|
2121
|
+
message.id = reader.readString();
|
|
2122
|
+
break;
|
|
2123
|
+
case 2:
|
|
2124
|
+
message.merchantId = reader.readString();
|
|
2125
|
+
break;
|
|
2126
|
+
case 3:
|
|
2127
|
+
message.terminalId = reader.readString();
|
|
2128
|
+
break;
|
|
2129
|
+
case 4:
|
|
2130
|
+
message.amount = reader.readInt64();
|
|
2131
|
+
break;
|
|
2132
|
+
case 5:
|
|
2133
|
+
message.currency = reader.readString();
|
|
2134
|
+
break;
|
|
2135
|
+
case 6:
|
|
2136
|
+
message.transactionType = reader.readString();
|
|
2137
|
+
break;
|
|
2138
|
+
case 7:
|
|
2139
|
+
message.reference = reader.readString();
|
|
2140
|
+
break;
|
|
2141
|
+
case 8:
|
|
2142
|
+
message.rrn = reader.readString();
|
|
2143
|
+
break;
|
|
2144
|
+
case 9:
|
|
2145
|
+
message.status = reader.readEnum();
|
|
2146
|
+
break;
|
|
2147
|
+
case 10:
|
|
2148
|
+
message.processorReference = reader.readString();
|
|
2149
|
+
break;
|
|
2150
|
+
case 11:
|
|
2151
|
+
message.responseCode = reader.readString();
|
|
2152
|
+
break;
|
|
2153
|
+
case 12:
|
|
2154
|
+
message.responseMessage = reader.readString();
|
|
2155
|
+
break;
|
|
2156
|
+
case 13:
|
|
2157
|
+
message.authorizationCode = reader.readString();
|
|
2158
|
+
break;
|
|
2159
|
+
case 14:
|
|
2160
|
+
reader.readMessage(message.meta, () => message.meta = TransactionMeta.deserialize(reader));
|
|
2161
|
+
break;
|
|
2162
|
+
case 15:
|
|
2163
|
+
reader.readMessage(message.processorData, () => message.processorData = ProcessorData.deserialize(reader));
|
|
2164
|
+
break;
|
|
2165
|
+
case 16:
|
|
2166
|
+
message.createdAt = reader.readInt64();
|
|
2167
|
+
break;
|
|
2168
|
+
case 17:
|
|
2169
|
+
message.updatedAt = reader.readInt64();
|
|
2170
|
+
break;
|
|
2171
|
+
case 18:
|
|
2172
|
+
message.completedAt = reader.readInt64();
|
|
2173
|
+
break;
|
|
2174
|
+
default: reader.skipField();
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
return message;
|
|
2178
|
+
}
|
|
2179
|
+
serializeBinary() {
|
|
2180
|
+
return this.serialize();
|
|
2181
|
+
}
|
|
2182
|
+
static deserializeBinary(bytes) {
|
|
2183
|
+
return TransactionData.deserialize(bytes);
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
transactions.TransactionData = TransactionData;
|
|
2187
|
+
class ReversalData extends pb_1.Message {
|
|
2188
|
+
#one_of_decls = [[12]];
|
|
2189
|
+
constructor(data) {
|
|
2190
|
+
super();
|
|
2191
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
2192
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
2193
|
+
if ("id" in data && data.id != undefined) {
|
|
2194
|
+
this.id = data.id;
|
|
2195
|
+
}
|
|
2196
|
+
if ("originalTransactionId" in data && data.originalTransactionId != undefined) {
|
|
2197
|
+
this.originalTransactionId = data.originalTransactionId;
|
|
2198
|
+
}
|
|
2199
|
+
if ("merchantId" in data && data.merchantId != undefined) {
|
|
2200
|
+
this.merchantId = data.merchantId;
|
|
2201
|
+
}
|
|
2202
|
+
if ("terminalId" in data && data.terminalId != undefined) {
|
|
2203
|
+
this.terminalId = data.terminalId;
|
|
2204
|
+
}
|
|
2205
|
+
if ("amount" in data && data.amount != undefined) {
|
|
2206
|
+
this.amount = data.amount;
|
|
2207
|
+
}
|
|
2208
|
+
if ("reason" in data && data.reason != undefined) {
|
|
2209
|
+
this.reason = data.reason;
|
|
2210
|
+
}
|
|
2211
|
+
if ("reference" in data && data.reference != undefined) {
|
|
2212
|
+
this.reference = data.reference;
|
|
2213
|
+
}
|
|
2214
|
+
if ("reversalType" in data && data.reversalType != undefined) {
|
|
2215
|
+
this.reversalType = data.reversalType;
|
|
2216
|
+
}
|
|
2217
|
+
if ("status" in data && data.status != undefined) {
|
|
2218
|
+
this.status = data.status;
|
|
2219
|
+
}
|
|
2220
|
+
if ("createdAt" in data && data.createdAt != undefined) {
|
|
2221
|
+
this.createdAt = data.createdAt;
|
|
2222
|
+
}
|
|
2223
|
+
if ("updatedAt" in data && data.updatedAt != undefined) {
|
|
2224
|
+
this.updatedAt = data.updatedAt;
|
|
2225
|
+
}
|
|
2226
|
+
if ("deletedAt" in data && data.deletedAt != undefined) {
|
|
2227
|
+
this.deletedAt = data.deletedAt;
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
get id() {
|
|
2232
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
2233
|
+
}
|
|
2234
|
+
set id(value) {
|
|
2235
|
+
pb_1.Message.setField(this, 1, value);
|
|
2236
|
+
}
|
|
2237
|
+
get originalTransactionId() {
|
|
2238
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
2239
|
+
}
|
|
2240
|
+
set originalTransactionId(value) {
|
|
2241
|
+
pb_1.Message.setField(this, 2, value);
|
|
2242
|
+
}
|
|
2243
|
+
get merchantId() {
|
|
2244
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
2245
|
+
}
|
|
2246
|
+
set merchantId(value) {
|
|
2247
|
+
pb_1.Message.setField(this, 3, value);
|
|
2248
|
+
}
|
|
2249
|
+
get terminalId() {
|
|
2250
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
2251
|
+
}
|
|
2252
|
+
set terminalId(value) {
|
|
2253
|
+
pb_1.Message.setField(this, 4, value);
|
|
2254
|
+
}
|
|
2255
|
+
get amount() {
|
|
2256
|
+
return pb_1.Message.getFieldWithDefault(this, 5, 0);
|
|
2257
|
+
}
|
|
2258
|
+
set amount(value) {
|
|
2259
|
+
pb_1.Message.setField(this, 5, value);
|
|
2260
|
+
}
|
|
2261
|
+
get reason() {
|
|
2262
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
2263
|
+
}
|
|
2264
|
+
set reason(value) {
|
|
2265
|
+
pb_1.Message.setField(this, 6, value);
|
|
2266
|
+
}
|
|
2267
|
+
get reference() {
|
|
2268
|
+
return pb_1.Message.getFieldWithDefault(this, 7, "");
|
|
2269
|
+
}
|
|
2270
|
+
set reference(value) {
|
|
2271
|
+
pb_1.Message.setField(this, 7, value);
|
|
2272
|
+
}
|
|
2273
|
+
get reversalType() {
|
|
2274
|
+
return pb_1.Message.getFieldWithDefault(this, 8, ReversalType.FULL_REVERSAL);
|
|
2275
|
+
}
|
|
2276
|
+
set reversalType(value) {
|
|
2277
|
+
pb_1.Message.setField(this, 8, value);
|
|
2278
|
+
}
|
|
2279
|
+
get status() {
|
|
2280
|
+
return pb_1.Message.getFieldWithDefault(this, 9, ReversalStatus.REVERSAL_PENDING);
|
|
2281
|
+
}
|
|
2282
|
+
set status(value) {
|
|
2283
|
+
pb_1.Message.setField(this, 9, value);
|
|
2284
|
+
}
|
|
2285
|
+
get createdAt() {
|
|
2286
|
+
return pb_1.Message.getFieldWithDefault(this, 10, 0);
|
|
2287
|
+
}
|
|
2288
|
+
set createdAt(value) {
|
|
2289
|
+
pb_1.Message.setField(this, 10, value);
|
|
2290
|
+
}
|
|
2291
|
+
get updatedAt() {
|
|
2292
|
+
return pb_1.Message.getFieldWithDefault(this, 11, 0);
|
|
2293
|
+
}
|
|
2294
|
+
set updatedAt(value) {
|
|
2295
|
+
pb_1.Message.setField(this, 11, value);
|
|
2296
|
+
}
|
|
2297
|
+
get deletedAt() {
|
|
2298
|
+
return pb_1.Message.getFieldWithDefault(this, 12, 0);
|
|
2299
|
+
}
|
|
2300
|
+
set deletedAt(value) {
|
|
2301
|
+
pb_1.Message.setOneofField(this, 12, this.#one_of_decls[0], value);
|
|
2302
|
+
}
|
|
2303
|
+
get hasDeletedAt() {
|
|
2304
|
+
return pb_1.Message.getField(this, 12) != null;
|
|
2305
|
+
}
|
|
2306
|
+
get _deleted_at() {
|
|
2307
|
+
const cases = {
|
|
2308
|
+
0: "none",
|
|
2309
|
+
12: "deletedAt"
|
|
2310
|
+
};
|
|
2311
|
+
return cases[pb_1.Message.computeOneofCase(this, [12])];
|
|
2312
|
+
}
|
|
2313
|
+
static fromObject(data) {
|
|
2314
|
+
const message = new ReversalData({});
|
|
2315
|
+
if (data.id != null) {
|
|
2316
|
+
message.id = data.id;
|
|
2317
|
+
}
|
|
2318
|
+
if (data.originalTransactionId != null) {
|
|
2319
|
+
message.originalTransactionId = data.originalTransactionId;
|
|
2320
|
+
}
|
|
2321
|
+
if (data.merchantId != null) {
|
|
2322
|
+
message.merchantId = data.merchantId;
|
|
2323
|
+
}
|
|
2324
|
+
if (data.terminalId != null) {
|
|
2325
|
+
message.terminalId = data.terminalId;
|
|
2326
|
+
}
|
|
2327
|
+
if (data.amount != null) {
|
|
2328
|
+
message.amount = data.amount;
|
|
2329
|
+
}
|
|
2330
|
+
if (data.reason != null) {
|
|
2331
|
+
message.reason = data.reason;
|
|
2332
|
+
}
|
|
2333
|
+
if (data.reference != null) {
|
|
2334
|
+
message.reference = data.reference;
|
|
2335
|
+
}
|
|
2336
|
+
if (data.reversalType != null) {
|
|
2337
|
+
message.reversalType = data.reversalType;
|
|
2338
|
+
}
|
|
2339
|
+
if (data.status != null) {
|
|
2340
|
+
message.status = data.status;
|
|
2341
|
+
}
|
|
2342
|
+
if (data.createdAt != null) {
|
|
2343
|
+
message.createdAt = data.createdAt;
|
|
2344
|
+
}
|
|
2345
|
+
if (data.updatedAt != null) {
|
|
2346
|
+
message.updatedAt = data.updatedAt;
|
|
2347
|
+
}
|
|
2348
|
+
if (data.deletedAt != null) {
|
|
2349
|
+
message.deletedAt = data.deletedAt;
|
|
2350
|
+
}
|
|
2351
|
+
return message;
|
|
2352
|
+
}
|
|
2353
|
+
toObject() {
|
|
2354
|
+
const data = {};
|
|
2355
|
+
if (this.id != null) {
|
|
2356
|
+
data.id = this.id;
|
|
2357
|
+
}
|
|
2358
|
+
if (this.originalTransactionId != null) {
|
|
2359
|
+
data.originalTransactionId = this.originalTransactionId;
|
|
2360
|
+
}
|
|
2361
|
+
if (this.merchantId != null) {
|
|
2362
|
+
data.merchantId = this.merchantId;
|
|
2363
|
+
}
|
|
2364
|
+
if (this.terminalId != null) {
|
|
2365
|
+
data.terminalId = this.terminalId;
|
|
2366
|
+
}
|
|
2367
|
+
if (this.amount != null) {
|
|
2368
|
+
data.amount = this.amount;
|
|
2369
|
+
}
|
|
2370
|
+
if (this.reason != null) {
|
|
2371
|
+
data.reason = this.reason;
|
|
2372
|
+
}
|
|
2373
|
+
if (this.reference != null) {
|
|
2374
|
+
data.reference = this.reference;
|
|
2375
|
+
}
|
|
2376
|
+
if (this.reversalType != null) {
|
|
2377
|
+
data.reversalType = this.reversalType;
|
|
2378
|
+
}
|
|
2379
|
+
if (this.status != null) {
|
|
2380
|
+
data.status = this.status;
|
|
2381
|
+
}
|
|
2382
|
+
if (this.createdAt != null) {
|
|
2383
|
+
data.createdAt = this.createdAt;
|
|
2384
|
+
}
|
|
2385
|
+
if (this.updatedAt != null) {
|
|
2386
|
+
data.updatedAt = this.updatedAt;
|
|
2387
|
+
}
|
|
2388
|
+
if (this.deletedAt != null) {
|
|
2389
|
+
data.deletedAt = this.deletedAt;
|
|
2390
|
+
}
|
|
2391
|
+
return data;
|
|
2392
|
+
}
|
|
2393
|
+
serialize(w) {
|
|
2394
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
2395
|
+
if (this.id.length)
|
|
2396
|
+
writer.writeString(1, this.id);
|
|
2397
|
+
if (this.originalTransactionId.length)
|
|
2398
|
+
writer.writeString(2, this.originalTransactionId);
|
|
2399
|
+
if (this.merchantId.length)
|
|
2400
|
+
writer.writeString(3, this.merchantId);
|
|
2401
|
+
if (this.terminalId.length)
|
|
2402
|
+
writer.writeString(4, this.terminalId);
|
|
2403
|
+
if (this.amount != 0)
|
|
2404
|
+
writer.writeInt64(5, this.amount);
|
|
2405
|
+
if (this.reason.length)
|
|
2406
|
+
writer.writeString(6, this.reason);
|
|
2407
|
+
if (this.reference.length)
|
|
2408
|
+
writer.writeString(7, this.reference);
|
|
2409
|
+
if (this.reversalType != ReversalType.FULL_REVERSAL)
|
|
2410
|
+
writer.writeEnum(8, this.reversalType);
|
|
2411
|
+
if (this.status != ReversalStatus.REVERSAL_PENDING)
|
|
2412
|
+
writer.writeEnum(9, this.status);
|
|
2413
|
+
if (this.createdAt != 0)
|
|
2414
|
+
writer.writeInt64(10, this.createdAt);
|
|
2415
|
+
if (this.updatedAt != 0)
|
|
2416
|
+
writer.writeInt64(11, this.updatedAt);
|
|
2417
|
+
if (this.hasDeletedAt)
|
|
2418
|
+
writer.writeInt64(12, this.deletedAt);
|
|
2419
|
+
if (!w)
|
|
2420
|
+
return writer.getResultBuffer();
|
|
2421
|
+
}
|
|
2422
|
+
static deserialize(bytes) {
|
|
2423
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ReversalData();
|
|
2424
|
+
while (reader.nextField()) {
|
|
2425
|
+
if (reader.isEndGroup())
|
|
2426
|
+
break;
|
|
2427
|
+
switch (reader.getFieldNumber()) {
|
|
2428
|
+
case 1:
|
|
2429
|
+
message.id = reader.readString();
|
|
2430
|
+
break;
|
|
2431
|
+
case 2:
|
|
2432
|
+
message.originalTransactionId = reader.readString();
|
|
2433
|
+
break;
|
|
2434
|
+
case 3:
|
|
2435
|
+
message.merchantId = reader.readString();
|
|
2436
|
+
break;
|
|
2437
|
+
case 4:
|
|
2438
|
+
message.terminalId = reader.readString();
|
|
2439
|
+
break;
|
|
2440
|
+
case 5:
|
|
2441
|
+
message.amount = reader.readInt64();
|
|
2442
|
+
break;
|
|
2443
|
+
case 6:
|
|
2444
|
+
message.reason = reader.readString();
|
|
2445
|
+
break;
|
|
2446
|
+
case 7:
|
|
2447
|
+
message.reference = reader.readString();
|
|
2448
|
+
break;
|
|
2449
|
+
case 8:
|
|
2450
|
+
message.reversalType = reader.readEnum();
|
|
2451
|
+
break;
|
|
2452
|
+
case 9:
|
|
2453
|
+
message.status = reader.readEnum();
|
|
2454
|
+
break;
|
|
2455
|
+
case 10:
|
|
2456
|
+
message.createdAt = reader.readInt64();
|
|
2457
|
+
break;
|
|
2458
|
+
case 11:
|
|
2459
|
+
message.updatedAt = reader.readInt64();
|
|
2460
|
+
break;
|
|
2461
|
+
case 12:
|
|
2462
|
+
message.deletedAt = reader.readInt64();
|
|
2463
|
+
break;
|
|
2464
|
+
default: reader.skipField();
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
return message;
|
|
2468
|
+
}
|
|
2469
|
+
serializeBinary() {
|
|
2470
|
+
return this.serialize();
|
|
2471
|
+
}
|
|
2472
|
+
static deserializeBinary(bytes) {
|
|
2473
|
+
return ReversalData.deserialize(bytes);
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
transactions.ReversalData = ReversalData;
|
|
2477
|
+
class TransactionMeta extends pb_1.Message {
|
|
2478
|
+
#one_of_decls = [];
|
|
2479
|
+
constructor(data) {
|
|
2480
|
+
super();
|
|
2481
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
2482
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
2483
|
+
if ("customerName" in data && data.customerName != undefined) {
|
|
2484
|
+
this.customerName = data.customerName;
|
|
2485
|
+
}
|
|
2486
|
+
if ("customerPhone" in data && data.customerPhone != undefined) {
|
|
2487
|
+
this.customerPhone = data.customerPhone;
|
|
2488
|
+
}
|
|
2489
|
+
if ("description" in data && data.description != undefined) {
|
|
2490
|
+
this.description = data.description;
|
|
2491
|
+
}
|
|
2492
|
+
if ("additionalData" in data && data.additionalData != undefined) {
|
|
2493
|
+
this.additionalData = data.additionalData;
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
if (!this.additionalData)
|
|
2497
|
+
this.additionalData = new Map();
|
|
2498
|
+
}
|
|
2499
|
+
get customerName() {
|
|
2500
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
2501
|
+
}
|
|
2502
|
+
set customerName(value) {
|
|
2503
|
+
pb_1.Message.setField(this, 1, value);
|
|
2504
|
+
}
|
|
2505
|
+
get customerPhone() {
|
|
2506
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
2507
|
+
}
|
|
2508
|
+
set customerPhone(value) {
|
|
2509
|
+
pb_1.Message.setField(this, 2, value);
|
|
2510
|
+
}
|
|
2511
|
+
get description() {
|
|
2512
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
2513
|
+
}
|
|
2514
|
+
set description(value) {
|
|
2515
|
+
pb_1.Message.setField(this, 3, value);
|
|
2516
|
+
}
|
|
2517
|
+
get additionalData() {
|
|
2518
|
+
return pb_1.Message.getField(this, 4);
|
|
2519
|
+
}
|
|
2520
|
+
set additionalData(value) {
|
|
2521
|
+
pb_1.Message.setField(this, 4, value);
|
|
2522
|
+
}
|
|
2523
|
+
static fromObject(data) {
|
|
2524
|
+
const message = new TransactionMeta({});
|
|
2525
|
+
if (data.customerName != null) {
|
|
2526
|
+
message.customerName = data.customerName;
|
|
2527
|
+
}
|
|
2528
|
+
if (data.customerPhone != null) {
|
|
2529
|
+
message.customerPhone = data.customerPhone;
|
|
2530
|
+
}
|
|
2531
|
+
if (data.description != null) {
|
|
2532
|
+
message.description = data.description;
|
|
2533
|
+
}
|
|
2534
|
+
if (typeof data.additionalData == "object") {
|
|
2535
|
+
message.additionalData = new Map(Object.entries(data.additionalData));
|
|
2536
|
+
}
|
|
2537
|
+
return message;
|
|
2538
|
+
}
|
|
2539
|
+
toObject() {
|
|
2540
|
+
const data = {};
|
|
2541
|
+
if (this.customerName != null) {
|
|
2542
|
+
data.customerName = this.customerName;
|
|
2543
|
+
}
|
|
2544
|
+
if (this.customerPhone != null) {
|
|
2545
|
+
data.customerPhone = this.customerPhone;
|
|
2546
|
+
}
|
|
2547
|
+
if (this.description != null) {
|
|
2548
|
+
data.description = this.description;
|
|
2549
|
+
}
|
|
2550
|
+
if (this.additionalData != null) {
|
|
2551
|
+
data.additionalData = (Object.fromEntries)(this.additionalData);
|
|
2552
|
+
}
|
|
2553
|
+
return data;
|
|
2554
|
+
}
|
|
2555
|
+
serialize(w) {
|
|
2556
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
2557
|
+
if (this.customerName.length)
|
|
2558
|
+
writer.writeString(1, this.customerName);
|
|
2559
|
+
if (this.customerPhone.length)
|
|
2560
|
+
writer.writeString(2, this.customerPhone);
|
|
2561
|
+
if (this.description.length)
|
|
2562
|
+
writer.writeString(3, this.description);
|
|
2563
|
+
for (const [key, value] of this.additionalData) {
|
|
2564
|
+
writer.writeMessage(4, this.additionalData, () => {
|
|
2565
|
+
writer.writeString(1, key);
|
|
2566
|
+
writer.writeString(2, value);
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
if (!w)
|
|
2570
|
+
return writer.getResultBuffer();
|
|
2571
|
+
}
|
|
2572
|
+
static deserialize(bytes) {
|
|
2573
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionMeta();
|
|
2574
|
+
while (reader.nextField()) {
|
|
2575
|
+
if (reader.isEndGroup())
|
|
2576
|
+
break;
|
|
2577
|
+
switch (reader.getFieldNumber()) {
|
|
2578
|
+
case 1:
|
|
2579
|
+
message.customerName = reader.readString();
|
|
2580
|
+
break;
|
|
2581
|
+
case 2:
|
|
2582
|
+
message.customerPhone = reader.readString();
|
|
2583
|
+
break;
|
|
2584
|
+
case 3:
|
|
2585
|
+
message.description = reader.readString();
|
|
2586
|
+
break;
|
|
2587
|
+
case 4:
|
|
2588
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.additionalData, reader, reader.readString, reader.readString));
|
|
2589
|
+
break;
|
|
2590
|
+
default: reader.skipField();
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
return message;
|
|
2594
|
+
}
|
|
2595
|
+
serializeBinary() {
|
|
2596
|
+
return this.serialize();
|
|
2597
|
+
}
|
|
2598
|
+
static deserializeBinary(bytes) {
|
|
2599
|
+
return TransactionMeta.deserialize(bytes);
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2602
|
+
transactions.TransactionMeta = TransactionMeta;
|
|
2603
|
+
class ProcessorData extends pb_1.Message {
|
|
2604
|
+
#one_of_decls = [];
|
|
2605
|
+
constructor(data) {
|
|
2606
|
+
super();
|
|
2607
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
2608
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
2609
|
+
if ("processorName" in data && data.processorName != undefined) {
|
|
2610
|
+
this.processorName = data.processorName;
|
|
2611
|
+
}
|
|
2612
|
+
if ("processorTransactionId" in data && data.processorTransactionId != undefined) {
|
|
2613
|
+
this.processorTransactionId = data.processorTransactionId;
|
|
2614
|
+
}
|
|
2615
|
+
if ("traceId" in data && data.traceId != undefined) {
|
|
2616
|
+
this.traceId = data.traceId;
|
|
2617
|
+
}
|
|
2618
|
+
if ("rawResponse" in data && data.rawResponse != undefined) {
|
|
2619
|
+
this.rawResponse = data.rawResponse;
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
if (!this.rawResponse)
|
|
2623
|
+
this.rawResponse = new Map();
|
|
2624
|
+
}
|
|
2625
|
+
get processorName() {
|
|
2626
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
2627
|
+
}
|
|
2628
|
+
set processorName(value) {
|
|
2629
|
+
pb_1.Message.setField(this, 1, value);
|
|
2630
|
+
}
|
|
2631
|
+
get processorTransactionId() {
|
|
2632
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
2633
|
+
}
|
|
2634
|
+
set processorTransactionId(value) {
|
|
2635
|
+
pb_1.Message.setField(this, 2, value);
|
|
2636
|
+
}
|
|
2637
|
+
get traceId() {
|
|
2638
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
2639
|
+
}
|
|
2640
|
+
set traceId(value) {
|
|
2641
|
+
pb_1.Message.setField(this, 3, value);
|
|
2642
|
+
}
|
|
2643
|
+
get rawResponse() {
|
|
2644
|
+
return pb_1.Message.getField(this, 4);
|
|
2645
|
+
}
|
|
2646
|
+
set rawResponse(value) {
|
|
2647
|
+
pb_1.Message.setField(this, 4, value);
|
|
2648
|
+
}
|
|
2649
|
+
static fromObject(data) {
|
|
2650
|
+
const message = new ProcessorData({});
|
|
2651
|
+
if (data.processorName != null) {
|
|
2652
|
+
message.processorName = data.processorName;
|
|
2653
|
+
}
|
|
2654
|
+
if (data.processorTransactionId != null) {
|
|
2655
|
+
message.processorTransactionId = data.processorTransactionId;
|
|
2656
|
+
}
|
|
2657
|
+
if (data.traceId != null) {
|
|
2658
|
+
message.traceId = data.traceId;
|
|
2659
|
+
}
|
|
2660
|
+
if (typeof data.rawResponse == "object") {
|
|
2661
|
+
message.rawResponse = new Map(Object.entries(data.rawResponse));
|
|
2662
|
+
}
|
|
2663
|
+
return message;
|
|
2664
|
+
}
|
|
2665
|
+
toObject() {
|
|
2666
|
+
const data = {};
|
|
2667
|
+
if (this.processorName != null) {
|
|
2668
|
+
data.processorName = this.processorName;
|
|
2669
|
+
}
|
|
2670
|
+
if (this.processorTransactionId != null) {
|
|
2671
|
+
data.processorTransactionId = this.processorTransactionId;
|
|
2672
|
+
}
|
|
2673
|
+
if (this.traceId != null) {
|
|
2674
|
+
data.traceId = this.traceId;
|
|
2675
|
+
}
|
|
2676
|
+
if (this.rawResponse != null) {
|
|
2677
|
+
data.rawResponse = (Object.fromEntries)(this.rawResponse);
|
|
2678
|
+
}
|
|
2679
|
+
return data;
|
|
2680
|
+
}
|
|
2681
|
+
serialize(w) {
|
|
2682
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
2683
|
+
if (this.processorName.length)
|
|
2684
|
+
writer.writeString(1, this.processorName);
|
|
2685
|
+
if (this.processorTransactionId.length)
|
|
2686
|
+
writer.writeString(2, this.processorTransactionId);
|
|
2687
|
+
if (this.traceId.length)
|
|
2688
|
+
writer.writeString(3, this.traceId);
|
|
2689
|
+
for (const [key, value] of this.rawResponse) {
|
|
2690
|
+
writer.writeMessage(4, this.rawResponse, () => {
|
|
2691
|
+
writer.writeString(1, key);
|
|
2692
|
+
writer.writeString(2, value);
|
|
2693
|
+
});
|
|
2694
|
+
}
|
|
2695
|
+
if (!w)
|
|
2696
|
+
return writer.getResultBuffer();
|
|
2697
|
+
}
|
|
2698
|
+
static deserialize(bytes) {
|
|
2699
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProcessorData();
|
|
2700
|
+
while (reader.nextField()) {
|
|
2701
|
+
if (reader.isEndGroup())
|
|
2702
|
+
break;
|
|
2703
|
+
switch (reader.getFieldNumber()) {
|
|
2704
|
+
case 1:
|
|
2705
|
+
message.processorName = reader.readString();
|
|
2706
|
+
break;
|
|
2707
|
+
case 2:
|
|
2708
|
+
message.processorTransactionId = reader.readString();
|
|
2709
|
+
break;
|
|
2710
|
+
case 3:
|
|
2711
|
+
message.traceId = reader.readString();
|
|
2712
|
+
break;
|
|
2713
|
+
case 4:
|
|
2714
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.rawResponse, reader, reader.readString, reader.readString));
|
|
2715
|
+
break;
|
|
2716
|
+
default: reader.skipField();
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
return message;
|
|
2720
|
+
}
|
|
2721
|
+
serializeBinary() {
|
|
2722
|
+
return this.serialize();
|
|
2723
|
+
}
|
|
2724
|
+
static deserializeBinary(bytes) {
|
|
2725
|
+
return ProcessorData.deserialize(bytes);
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2728
|
+
transactions.ProcessorData = ProcessorData;
|
|
2729
|
+
class UnimplementedTransactionServiceService {
|
|
2730
|
+
static definition = {
|
|
2731
|
+
InitTransaction: {
|
|
2732
|
+
path: "/com.pkg.posv1.transactions.TransactionService/InitTransaction",
|
|
2733
|
+
requestStream: false,
|
|
2734
|
+
responseStream: false,
|
|
2735
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
2736
|
+
requestDeserialize: (bytes) => InitTransactionRequest.deserialize(new Uint8Array(bytes)),
|
|
2737
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
2738
|
+
responseDeserialize: (bytes) => InitTransactionResponse.deserialize(new Uint8Array(bytes))
|
|
2739
|
+
},
|
|
2740
|
+
CompleteTransaction: {
|
|
2741
|
+
path: "/com.pkg.posv1.transactions.TransactionService/CompleteTransaction",
|
|
2742
|
+
requestStream: false,
|
|
2743
|
+
responseStream: false,
|
|
2744
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
2745
|
+
requestDeserialize: (bytes) => CompleteTransactionRequest.deserialize(new Uint8Array(bytes)),
|
|
2746
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
2747
|
+
responseDeserialize: (bytes) => CompleteTransactionResponse.deserialize(new Uint8Array(bytes))
|
|
2748
|
+
},
|
|
2749
|
+
ConfirmTransaction: {
|
|
2750
|
+
path: "/com.pkg.posv1.transactions.TransactionService/ConfirmTransaction",
|
|
2751
|
+
requestStream: false,
|
|
2752
|
+
responseStream: false,
|
|
2753
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
2754
|
+
requestDeserialize: (bytes) => ConfirmTransactionRequest.deserialize(new Uint8Array(bytes)),
|
|
2755
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
2756
|
+
responseDeserialize: (bytes) => ConfirmTransactionResponse.deserialize(new Uint8Array(bytes))
|
|
2757
|
+
},
|
|
2758
|
+
GetTransaction: {
|
|
2759
|
+
path: "/com.pkg.posv1.transactions.TransactionService/GetTransaction",
|
|
2760
|
+
requestStream: false,
|
|
2761
|
+
responseStream: false,
|
|
2762
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
2763
|
+
requestDeserialize: (bytes) => GetTransactionRequest.deserialize(new Uint8Array(bytes)),
|
|
2764
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
2765
|
+
responseDeserialize: (bytes) => GetTransactionResponse.deserialize(new Uint8Array(bytes))
|
|
2766
|
+
},
|
|
2767
|
+
SaveReversal: {
|
|
2768
|
+
path: "/com.pkg.posv1.transactions.TransactionService/SaveReversal",
|
|
2769
|
+
requestStream: false,
|
|
2770
|
+
responseStream: false,
|
|
2771
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
2772
|
+
requestDeserialize: (bytes) => SaveReversalRequest.deserialize(new Uint8Array(bytes)),
|
|
2773
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
2774
|
+
responseDeserialize: (bytes) => SaveReversalResponse.deserialize(new Uint8Array(bytes))
|
|
2775
|
+
},
|
|
2776
|
+
DeleteReversal: {
|
|
2777
|
+
path: "/com.pkg.posv1.transactions.TransactionService/DeleteReversal",
|
|
2778
|
+
requestStream: false,
|
|
2779
|
+
responseStream: false,
|
|
2780
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
2781
|
+
requestDeserialize: (bytes) => DeleteReversalRequest.deserialize(new Uint8Array(bytes)),
|
|
2782
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
2783
|
+
responseDeserialize: (bytes) => DeleteReversalResponse.deserialize(new Uint8Array(bytes))
|
|
2784
|
+
},
|
|
2785
|
+
GetReversalTransaction: {
|
|
2786
|
+
path: "/com.pkg.posv1.transactions.TransactionService/GetReversalTransaction",
|
|
2787
|
+
requestStream: false,
|
|
2788
|
+
responseStream: false,
|
|
2789
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
2790
|
+
requestDeserialize: (bytes) => GetReversalTransactionRequest.deserialize(new Uint8Array(bytes)),
|
|
2791
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
2792
|
+
responseDeserialize: (bytes) => GetReversalTransactionResponse.deserialize(new Uint8Array(bytes))
|
|
2793
|
+
}
|
|
2794
|
+
};
|
|
2795
|
+
}
|
|
2796
|
+
transactions.UnimplementedTransactionServiceService = UnimplementedTransactionServiceService;
|
|
2797
|
+
class TransactionServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedTransactionServiceService.definition, "TransactionService", {}) {
|
|
2798
|
+
constructor(address, credentials, options) {
|
|
2799
|
+
super(address, credentials, options);
|
|
2800
|
+
}
|
|
2801
|
+
InitTransaction = (message, metadata, options) => {
|
|
2802
|
+
if (!metadata) {
|
|
2803
|
+
metadata = new grpc_1.Metadata;
|
|
2804
|
+
}
|
|
2805
|
+
if (!options) {
|
|
2806
|
+
options = {};
|
|
2807
|
+
}
|
|
2808
|
+
return new Promise((resolve, reject) => super.InitTransaction(message, metadata, options, (error, response) => {
|
|
2809
|
+
if (error) {
|
|
2810
|
+
reject(error);
|
|
2811
|
+
}
|
|
2812
|
+
else {
|
|
2813
|
+
resolve(response);
|
|
2814
|
+
}
|
|
2815
|
+
}));
|
|
2816
|
+
};
|
|
2817
|
+
CompleteTransaction = (message, metadata, options) => {
|
|
2818
|
+
if (!metadata) {
|
|
2819
|
+
metadata = new grpc_1.Metadata;
|
|
2820
|
+
}
|
|
2821
|
+
if (!options) {
|
|
2822
|
+
options = {};
|
|
2823
|
+
}
|
|
2824
|
+
return new Promise((resolve, reject) => super.CompleteTransaction(message, metadata, options, (error, response) => {
|
|
2825
|
+
if (error) {
|
|
2826
|
+
reject(error);
|
|
2827
|
+
}
|
|
2828
|
+
else {
|
|
2829
|
+
resolve(response);
|
|
2830
|
+
}
|
|
2831
|
+
}));
|
|
2832
|
+
};
|
|
2833
|
+
ConfirmTransaction = (message, metadata, options) => {
|
|
2834
|
+
if (!metadata) {
|
|
2835
|
+
metadata = new grpc_1.Metadata;
|
|
2836
|
+
}
|
|
2837
|
+
if (!options) {
|
|
2838
|
+
options = {};
|
|
2839
|
+
}
|
|
2840
|
+
return new Promise((resolve, reject) => super.ConfirmTransaction(message, metadata, options, (error, response) => {
|
|
2841
|
+
if (error) {
|
|
2842
|
+
reject(error);
|
|
2843
|
+
}
|
|
2844
|
+
else {
|
|
2845
|
+
resolve(response);
|
|
2846
|
+
}
|
|
2847
|
+
}));
|
|
2848
|
+
};
|
|
2849
|
+
GetTransaction = (message, metadata, options) => {
|
|
2850
|
+
if (!metadata) {
|
|
2851
|
+
metadata = new grpc_1.Metadata;
|
|
2852
|
+
}
|
|
2853
|
+
if (!options) {
|
|
2854
|
+
options = {};
|
|
2855
|
+
}
|
|
2856
|
+
return new Promise((resolve, reject) => super.GetTransaction(message, metadata, options, (error, response) => {
|
|
2857
|
+
if (error) {
|
|
2858
|
+
reject(error);
|
|
2859
|
+
}
|
|
2860
|
+
else {
|
|
2861
|
+
resolve(response);
|
|
2862
|
+
}
|
|
2863
|
+
}));
|
|
2864
|
+
};
|
|
2865
|
+
SaveReversal = (message, metadata, options) => {
|
|
2866
|
+
if (!metadata) {
|
|
2867
|
+
metadata = new grpc_1.Metadata;
|
|
2868
|
+
}
|
|
2869
|
+
if (!options) {
|
|
2870
|
+
options = {};
|
|
2871
|
+
}
|
|
2872
|
+
return new Promise((resolve, reject) => super.SaveReversal(message, metadata, options, (error, response) => {
|
|
2873
|
+
if (error) {
|
|
2874
|
+
reject(error);
|
|
2875
|
+
}
|
|
2876
|
+
else {
|
|
2877
|
+
resolve(response);
|
|
2878
|
+
}
|
|
2879
|
+
}));
|
|
2880
|
+
};
|
|
2881
|
+
DeleteReversal = (message, metadata, options) => {
|
|
2882
|
+
if (!metadata) {
|
|
2883
|
+
metadata = new grpc_1.Metadata;
|
|
2884
|
+
}
|
|
2885
|
+
if (!options) {
|
|
2886
|
+
options = {};
|
|
2887
|
+
}
|
|
2888
|
+
return new Promise((resolve, reject) => super.DeleteReversal(message, metadata, options, (error, response) => {
|
|
2889
|
+
if (error) {
|
|
2890
|
+
reject(error);
|
|
2891
|
+
}
|
|
2892
|
+
else {
|
|
2893
|
+
resolve(response);
|
|
2894
|
+
}
|
|
2895
|
+
}));
|
|
2896
|
+
};
|
|
2897
|
+
GetReversalTransaction = (message, metadata, options) => {
|
|
2898
|
+
if (!metadata) {
|
|
2899
|
+
metadata = new grpc_1.Metadata;
|
|
2900
|
+
}
|
|
2901
|
+
if (!options) {
|
|
2902
|
+
options = {};
|
|
2903
|
+
}
|
|
2904
|
+
return new Promise((resolve, reject) => super.GetReversalTransaction(message, metadata, options, (error, response) => {
|
|
2905
|
+
if (error) {
|
|
2906
|
+
reject(error);
|
|
2907
|
+
}
|
|
2908
|
+
else {
|
|
2909
|
+
resolve(response);
|
|
2910
|
+
}
|
|
2911
|
+
}));
|
|
2912
|
+
};
|
|
2913
|
+
}
|
|
2914
|
+
transactions.TransactionServiceClient = TransactionServiceClient;
|
|
2915
|
+
})(transactions = posv1.transactions || (posv1.transactions = {}));
|
|
2916
|
+
})(posv1 = pkg.posv1 || (pkg.posv1 = {}));
|
|
2917
|
+
})(pkg = com.pkg || (com.pkg = {}));
|
|
2918
|
+
})(com || (exports.com = com = {}));
|