triplinkclient 1.0.260201
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/README.md +30 -0
- package/dist/defaultConfigOptions.d.ts +8 -0
- package/dist/defaultConfigOptions.js +11 -0
- package/dist/defaultConfigOptions.js.map +1 -0
- package/dist/demo.d.ts +1 -0
- package/dist/demo.js +50 -0
- package/dist/demo.js.map +1 -0
- package/dist/generated/account.d.ts +576 -0
- package/dist/generated/account.js +1958 -0
- package/dist/generated/account.js.map +1 -0
- package/dist/generated/agency.d.ts +43 -0
- package/dist/generated/agency.js +174 -0
- package/dist/generated/agency.js.map +1 -0
- package/dist/generated/air.d.ts +2121 -0
- package/dist/generated/air.js +7257 -0
- package/dist/generated/air.js.map +1 -0
- package/dist/generated/common.d.ts +76 -0
- package/dist/generated/common.js +282 -0
- package/dist/generated/common.js.map +1 -0
- package/dist/generated/hotel.d.ts +1005 -0
- package/dist/generated/hotel.js +3320 -0
- package/dist/generated/hotel.js.map +1 -0
- package/dist/generated/web/account.d.ts +576 -0
- package/dist/generated/web/account.js +1958 -0
- package/dist/generated/web/account.js.map +1 -0
- package/dist/generated/web/agency.d.ts +43 -0
- package/dist/generated/web/agency.js +174 -0
- package/dist/generated/web/agency.js.map +1 -0
- package/dist/generated/web/air.d.ts +2121 -0
- package/dist/generated/web/air.js +7257 -0
- package/dist/generated/web/air.js.map +1 -0
- package/dist/generated/web/common.d.ts +76 -0
- package/dist/generated/web/common.js +282 -0
- package/dist/generated/web/common.js.map +1 -0
- package/dist/generated/web/hotel.d.ts +1005 -0
- package/dist/generated/web/hotel.js +3320 -0
- package/dist/generated/web/hotel.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/metrics/MetricsCollector.d.ts +13 -0
- package/dist/metrics/MetricsCollector.js +129 -0
- package/dist/metrics/MetricsCollector.js.map +1 -0
- package/dist/metrics/index.d.ts +2 -0
- package/dist/metrics/index.js +6 -0
- package/dist/metrics/index.js.map +1 -0
- package/dist/metrics/instrumentCall.d.ts +12 -0
- package/dist/metrics/instrumentCall.js +186 -0
- package/dist/metrics/instrumentCall.js.map +1 -0
- package/dist/metrics/statusNames.d.ts +1 -0
- package/dist/metrics/statusNames.js +26 -0
- package/dist/metrics/statusNames.js.map +1 -0
- package/dist/metrics/types.d.ts +49 -0
- package/dist/metrics/types.js +3 -0
- package/dist/metrics/types.js.map +1 -0
- package/dist/triplinkairclient.d.ts +42 -0
- package/dist/triplinkairclient.js +133 -0
- package/dist/triplinkairclient.js.map +1 -0
- package/dist/triplinkhotelclient.d.ts +25 -0
- package/dist/triplinkhotelclient.js +85 -0
- package/dist/triplinkhotelclient.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,1958 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
36
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
37
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
38
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
39
|
+
};
|
|
40
|
+
var _GetBalanceRequest_one_of_decls, _GetBalanceResponse_one_of_decls, _GetTransactionHistoryRequest_one_of_decls, _GetTransactionHistoryResponse_one_of_decls, _Transaction_one_of_decls, _AddBalanceRequest_one_of_decls, _AddBalanceResponse_one_of_decls, _DeductBalanceRequest_one_of_decls, _DeductBalanceResponse_one_of_decls, _GetStatementRequest_one_of_decls, _GetStatementResponse_one_of_decls;
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.TripLinkAccountServiceClient = exports.UnimplementedTripLinkAccountServiceService = exports.GetStatementResponse = exports.GetStatementRequest = exports.DeductBalanceResponse = exports.DeductBalanceRequest = exports.AddBalanceResponse = exports.AddBalanceRequest = exports.Transaction = exports.GetTransactionHistoryResponse = exports.GetTransactionHistoryRequest = exports.GetBalanceResponse = exports.GetBalanceRequest = exports.TransactionStatus = exports.TransactionType = void 0;
|
|
43
|
+
/**
|
|
44
|
+
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
|
45
|
+
* compiler version: 6.33.2
|
|
46
|
+
* source: account.proto
|
|
47
|
+
* git: https://github.com/thesayyn/protoc-gen-ts */
|
|
48
|
+
const dependency_1 = __importStar(require("./common"));
|
|
49
|
+
const pb_1 = __importStar(require("google-protobuf"));
|
|
50
|
+
const grpc_1 = __importStar(require("@grpc/grpc-js"));
|
|
51
|
+
var TransactionType;
|
|
52
|
+
(function (TransactionType) {
|
|
53
|
+
TransactionType[TransactionType["CREDIT"] = 0] = "CREDIT";
|
|
54
|
+
TransactionType[TransactionType["DEBIT"] = 1] = "DEBIT";
|
|
55
|
+
})(TransactionType || (exports.TransactionType = TransactionType = {}));
|
|
56
|
+
var TransactionStatus;
|
|
57
|
+
(function (TransactionStatus) {
|
|
58
|
+
TransactionStatus[TransactionStatus["PENDING"] = 0] = "PENDING";
|
|
59
|
+
TransactionStatus[TransactionStatus["COMPLETED"] = 1] = "COMPLETED";
|
|
60
|
+
TransactionStatus[TransactionStatus["FAILED"] = 2] = "FAILED";
|
|
61
|
+
})(TransactionStatus || (exports.TransactionStatus = TransactionStatus = {}));
|
|
62
|
+
class GetBalanceRequest extends pb_1.Message {
|
|
63
|
+
constructor(data) {
|
|
64
|
+
super();
|
|
65
|
+
_GetBalanceRequest_one_of_decls.set(this, []);
|
|
66
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _GetBalanceRequest_one_of_decls, "f"));
|
|
67
|
+
if (!Array.isArray(data) && typeof data == "object") { }
|
|
68
|
+
}
|
|
69
|
+
static fromObject(data) {
|
|
70
|
+
const message = new GetBalanceRequest({});
|
|
71
|
+
return message;
|
|
72
|
+
}
|
|
73
|
+
toObject() {
|
|
74
|
+
const data = {};
|
|
75
|
+
return data;
|
|
76
|
+
}
|
|
77
|
+
serialize(w) {
|
|
78
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
79
|
+
if (!w)
|
|
80
|
+
return writer.getResultBuffer();
|
|
81
|
+
}
|
|
82
|
+
static deserialize(bytes) {
|
|
83
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBalanceRequest();
|
|
84
|
+
while (reader.nextField()) {
|
|
85
|
+
if (reader.isEndGroup())
|
|
86
|
+
break;
|
|
87
|
+
switch (reader.getFieldNumber()) {
|
|
88
|
+
default: reader.skipField();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return message;
|
|
92
|
+
}
|
|
93
|
+
serializeBinary() {
|
|
94
|
+
return this.serialize();
|
|
95
|
+
}
|
|
96
|
+
static deserializeBinary(bytes) {
|
|
97
|
+
return GetBalanceRequest.deserialize(bytes);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.GetBalanceRequest = GetBalanceRequest;
|
|
101
|
+
_GetBalanceRequest_one_of_decls = new WeakMap();
|
|
102
|
+
class GetBalanceResponse extends pb_1.Message {
|
|
103
|
+
constructor(data) {
|
|
104
|
+
super();
|
|
105
|
+
_GetBalanceResponse_one_of_decls.set(this, []);
|
|
106
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _GetBalanceResponse_one_of_decls, "f"));
|
|
107
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
108
|
+
if ("result" in data && data.result != undefined) {
|
|
109
|
+
this.result = data.result;
|
|
110
|
+
}
|
|
111
|
+
if ("balance" in data && data.balance != undefined) {
|
|
112
|
+
this.balance = data.balance;
|
|
113
|
+
}
|
|
114
|
+
if ("creditLimit" in data && data.creditLimit != undefined) {
|
|
115
|
+
this.creditLimit = data.creditLimit;
|
|
116
|
+
}
|
|
117
|
+
if ("availableBalance" in data && data.availableBalance != undefined) {
|
|
118
|
+
this.availableBalance = data.availableBalance;
|
|
119
|
+
}
|
|
120
|
+
if ("currency" in data && data.currency != undefined) {
|
|
121
|
+
this.currency = data.currency;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
get result() {
|
|
126
|
+
return pb_1.Message.getWrapperField(this, dependency_1.ResultStatus, 1);
|
|
127
|
+
}
|
|
128
|
+
set result(value) {
|
|
129
|
+
pb_1.Message.setWrapperField(this, 1, value);
|
|
130
|
+
}
|
|
131
|
+
get hasResult() {
|
|
132
|
+
return pb_1.Message.getField(this, 1) != null;
|
|
133
|
+
}
|
|
134
|
+
get balance() {
|
|
135
|
+
return pb_1.Message.getFieldWithDefault(this, 2, 0);
|
|
136
|
+
}
|
|
137
|
+
set balance(value) {
|
|
138
|
+
pb_1.Message.setField(this, 2, value);
|
|
139
|
+
}
|
|
140
|
+
get creditLimit() {
|
|
141
|
+
return pb_1.Message.getFieldWithDefault(this, 3, 0);
|
|
142
|
+
}
|
|
143
|
+
set creditLimit(value) {
|
|
144
|
+
pb_1.Message.setField(this, 3, value);
|
|
145
|
+
}
|
|
146
|
+
get availableBalance() {
|
|
147
|
+
return pb_1.Message.getFieldWithDefault(this, 4, 0);
|
|
148
|
+
}
|
|
149
|
+
set availableBalance(value) {
|
|
150
|
+
pb_1.Message.setField(this, 4, value);
|
|
151
|
+
}
|
|
152
|
+
get currency() {
|
|
153
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
154
|
+
}
|
|
155
|
+
set currency(value) {
|
|
156
|
+
pb_1.Message.setField(this, 5, value);
|
|
157
|
+
}
|
|
158
|
+
static fromObject(data) {
|
|
159
|
+
const message = new GetBalanceResponse({});
|
|
160
|
+
if (data.result != null) {
|
|
161
|
+
message.result = dependency_1.ResultStatus.fromObject(data.result);
|
|
162
|
+
}
|
|
163
|
+
if (data.balance != null) {
|
|
164
|
+
message.balance = data.balance;
|
|
165
|
+
}
|
|
166
|
+
if (data.creditLimit != null) {
|
|
167
|
+
message.creditLimit = data.creditLimit;
|
|
168
|
+
}
|
|
169
|
+
if (data.availableBalance != null) {
|
|
170
|
+
message.availableBalance = data.availableBalance;
|
|
171
|
+
}
|
|
172
|
+
if (data.currency != null) {
|
|
173
|
+
message.currency = data.currency;
|
|
174
|
+
}
|
|
175
|
+
return message;
|
|
176
|
+
}
|
|
177
|
+
toObject() {
|
|
178
|
+
const data = {};
|
|
179
|
+
if (this.result != null) {
|
|
180
|
+
data.result = this.result.toObject();
|
|
181
|
+
}
|
|
182
|
+
if (this.balance != null) {
|
|
183
|
+
data.balance = this.balance;
|
|
184
|
+
}
|
|
185
|
+
if (this.creditLimit != null) {
|
|
186
|
+
data.creditLimit = this.creditLimit;
|
|
187
|
+
}
|
|
188
|
+
if (this.availableBalance != null) {
|
|
189
|
+
data.availableBalance = this.availableBalance;
|
|
190
|
+
}
|
|
191
|
+
if (this.currency != null) {
|
|
192
|
+
data.currency = this.currency;
|
|
193
|
+
}
|
|
194
|
+
return data;
|
|
195
|
+
}
|
|
196
|
+
serialize(w) {
|
|
197
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
198
|
+
if (this.hasResult)
|
|
199
|
+
writer.writeMessage(1, this.result, () => this.result.serialize(writer));
|
|
200
|
+
if (this.balance != 0)
|
|
201
|
+
writer.writeDouble(2, this.balance);
|
|
202
|
+
if (this.creditLimit != 0)
|
|
203
|
+
writer.writeDouble(3, this.creditLimit);
|
|
204
|
+
if (this.availableBalance != 0)
|
|
205
|
+
writer.writeDouble(4, this.availableBalance);
|
|
206
|
+
if (this.currency.length)
|
|
207
|
+
writer.writeString(5, this.currency);
|
|
208
|
+
if (!w)
|
|
209
|
+
return writer.getResultBuffer();
|
|
210
|
+
}
|
|
211
|
+
static deserialize(bytes) {
|
|
212
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBalanceResponse();
|
|
213
|
+
while (reader.nextField()) {
|
|
214
|
+
if (reader.isEndGroup())
|
|
215
|
+
break;
|
|
216
|
+
switch (reader.getFieldNumber()) {
|
|
217
|
+
case 1:
|
|
218
|
+
reader.readMessage(message.result, () => message.result = dependency_1.ResultStatus.deserialize(reader));
|
|
219
|
+
break;
|
|
220
|
+
case 2:
|
|
221
|
+
message.balance = reader.readDouble();
|
|
222
|
+
break;
|
|
223
|
+
case 3:
|
|
224
|
+
message.creditLimit = reader.readDouble();
|
|
225
|
+
break;
|
|
226
|
+
case 4:
|
|
227
|
+
message.availableBalance = reader.readDouble();
|
|
228
|
+
break;
|
|
229
|
+
case 5:
|
|
230
|
+
message.currency = reader.readString();
|
|
231
|
+
break;
|
|
232
|
+
default: reader.skipField();
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
return message;
|
|
236
|
+
}
|
|
237
|
+
serializeBinary() {
|
|
238
|
+
return this.serialize();
|
|
239
|
+
}
|
|
240
|
+
static deserializeBinary(bytes) {
|
|
241
|
+
return GetBalanceResponse.deserialize(bytes);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
exports.GetBalanceResponse = GetBalanceResponse;
|
|
245
|
+
_GetBalanceResponse_one_of_decls = new WeakMap();
|
|
246
|
+
class GetTransactionHistoryRequest extends pb_1.Message {
|
|
247
|
+
constructor(data) {
|
|
248
|
+
super();
|
|
249
|
+
_GetTransactionHistoryRequest_one_of_decls.set(this, [[3], [4], [5], [6]]);
|
|
250
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _GetTransactionHistoryRequest_one_of_decls, "f"));
|
|
251
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
252
|
+
if ("pageNumber" in data && data.pageNumber != undefined) {
|
|
253
|
+
this.pageNumber = data.pageNumber;
|
|
254
|
+
}
|
|
255
|
+
if ("pageSize" in data && data.pageSize != undefined) {
|
|
256
|
+
this.pageSize = data.pageSize;
|
|
257
|
+
}
|
|
258
|
+
if ("startDate" in data && data.startDate != undefined) {
|
|
259
|
+
this.startDate = data.startDate;
|
|
260
|
+
}
|
|
261
|
+
if ("endDate" in data && data.endDate != undefined) {
|
|
262
|
+
this.endDate = data.endDate;
|
|
263
|
+
}
|
|
264
|
+
if ("transactionType" in data && data.transactionType != undefined) {
|
|
265
|
+
this.transactionType = data.transactionType;
|
|
266
|
+
}
|
|
267
|
+
if ("status" in data && data.status != undefined) {
|
|
268
|
+
this.status = data.status;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
get pageNumber() {
|
|
273
|
+
return pb_1.Message.getFieldWithDefault(this, 1, 0);
|
|
274
|
+
}
|
|
275
|
+
set pageNumber(value) {
|
|
276
|
+
pb_1.Message.setField(this, 1, value);
|
|
277
|
+
}
|
|
278
|
+
get pageSize() {
|
|
279
|
+
return pb_1.Message.getFieldWithDefault(this, 2, 0);
|
|
280
|
+
}
|
|
281
|
+
set pageSize(value) {
|
|
282
|
+
pb_1.Message.setField(this, 2, value);
|
|
283
|
+
}
|
|
284
|
+
get startDate() {
|
|
285
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
286
|
+
}
|
|
287
|
+
set startDate(value) {
|
|
288
|
+
pb_1.Message.setOneofField(this, 3, __classPrivateFieldGet(this, _GetTransactionHistoryRequest_one_of_decls, "f")[0], value);
|
|
289
|
+
}
|
|
290
|
+
get hasStartDate() {
|
|
291
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
292
|
+
}
|
|
293
|
+
get endDate() {
|
|
294
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
295
|
+
}
|
|
296
|
+
set endDate(value) {
|
|
297
|
+
pb_1.Message.setOneofField(this, 4, __classPrivateFieldGet(this, _GetTransactionHistoryRequest_one_of_decls, "f")[1], value);
|
|
298
|
+
}
|
|
299
|
+
get hasEndDate() {
|
|
300
|
+
return pb_1.Message.getField(this, 4) != null;
|
|
301
|
+
}
|
|
302
|
+
get transactionType() {
|
|
303
|
+
return pb_1.Message.getFieldWithDefault(this, 5, TransactionType.CREDIT);
|
|
304
|
+
}
|
|
305
|
+
set transactionType(value) {
|
|
306
|
+
pb_1.Message.setOneofField(this, 5, __classPrivateFieldGet(this, _GetTransactionHistoryRequest_one_of_decls, "f")[2], value);
|
|
307
|
+
}
|
|
308
|
+
get hasTransactionType() {
|
|
309
|
+
return pb_1.Message.getField(this, 5) != null;
|
|
310
|
+
}
|
|
311
|
+
get status() {
|
|
312
|
+
return pb_1.Message.getFieldWithDefault(this, 6, TransactionStatus.PENDING);
|
|
313
|
+
}
|
|
314
|
+
set status(value) {
|
|
315
|
+
pb_1.Message.setOneofField(this, 6, __classPrivateFieldGet(this, _GetTransactionHistoryRequest_one_of_decls, "f")[3], value);
|
|
316
|
+
}
|
|
317
|
+
get hasStatus() {
|
|
318
|
+
return pb_1.Message.getField(this, 6) != null;
|
|
319
|
+
}
|
|
320
|
+
get _startDate() {
|
|
321
|
+
const cases = {
|
|
322
|
+
0: "none",
|
|
323
|
+
3: "startDate"
|
|
324
|
+
};
|
|
325
|
+
return cases[pb_1.Message.computeOneofCase(this, [3])];
|
|
326
|
+
}
|
|
327
|
+
get _endDate() {
|
|
328
|
+
const cases = {
|
|
329
|
+
0: "none",
|
|
330
|
+
4: "endDate"
|
|
331
|
+
};
|
|
332
|
+
return cases[pb_1.Message.computeOneofCase(this, [4])];
|
|
333
|
+
}
|
|
334
|
+
get _transactionType() {
|
|
335
|
+
const cases = {
|
|
336
|
+
0: "none",
|
|
337
|
+
5: "transactionType"
|
|
338
|
+
};
|
|
339
|
+
return cases[pb_1.Message.computeOneofCase(this, [5])];
|
|
340
|
+
}
|
|
341
|
+
get _status() {
|
|
342
|
+
const cases = {
|
|
343
|
+
0: "none",
|
|
344
|
+
6: "status"
|
|
345
|
+
};
|
|
346
|
+
return cases[pb_1.Message.computeOneofCase(this, [6])];
|
|
347
|
+
}
|
|
348
|
+
static fromObject(data) {
|
|
349
|
+
const message = new GetTransactionHistoryRequest({});
|
|
350
|
+
if (data.pageNumber != null) {
|
|
351
|
+
message.pageNumber = data.pageNumber;
|
|
352
|
+
}
|
|
353
|
+
if (data.pageSize != null) {
|
|
354
|
+
message.pageSize = data.pageSize;
|
|
355
|
+
}
|
|
356
|
+
if (data.startDate != null) {
|
|
357
|
+
message.startDate = data.startDate;
|
|
358
|
+
}
|
|
359
|
+
if (data.endDate != null) {
|
|
360
|
+
message.endDate = data.endDate;
|
|
361
|
+
}
|
|
362
|
+
if (data.transactionType != null) {
|
|
363
|
+
message.transactionType = data.transactionType;
|
|
364
|
+
}
|
|
365
|
+
if (data.status != null) {
|
|
366
|
+
message.status = data.status;
|
|
367
|
+
}
|
|
368
|
+
return message;
|
|
369
|
+
}
|
|
370
|
+
toObject() {
|
|
371
|
+
const data = {};
|
|
372
|
+
if (this.pageNumber != null) {
|
|
373
|
+
data.pageNumber = this.pageNumber;
|
|
374
|
+
}
|
|
375
|
+
if (this.pageSize != null) {
|
|
376
|
+
data.pageSize = this.pageSize;
|
|
377
|
+
}
|
|
378
|
+
if (this.startDate != null) {
|
|
379
|
+
data.startDate = this.startDate;
|
|
380
|
+
}
|
|
381
|
+
if (this.endDate != null) {
|
|
382
|
+
data.endDate = this.endDate;
|
|
383
|
+
}
|
|
384
|
+
if (this.transactionType != null) {
|
|
385
|
+
data.transactionType = this.transactionType;
|
|
386
|
+
}
|
|
387
|
+
if (this.status != null) {
|
|
388
|
+
data.status = this.status;
|
|
389
|
+
}
|
|
390
|
+
return data;
|
|
391
|
+
}
|
|
392
|
+
serialize(w) {
|
|
393
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
394
|
+
if (this.pageNumber != 0)
|
|
395
|
+
writer.writeInt32(1, this.pageNumber);
|
|
396
|
+
if (this.pageSize != 0)
|
|
397
|
+
writer.writeInt32(2, this.pageSize);
|
|
398
|
+
if (this.hasStartDate)
|
|
399
|
+
writer.writeString(3, this.startDate);
|
|
400
|
+
if (this.hasEndDate)
|
|
401
|
+
writer.writeString(4, this.endDate);
|
|
402
|
+
if (this.hasTransactionType)
|
|
403
|
+
writer.writeEnum(5, this.transactionType);
|
|
404
|
+
if (this.hasStatus)
|
|
405
|
+
writer.writeEnum(6, this.status);
|
|
406
|
+
if (!w)
|
|
407
|
+
return writer.getResultBuffer();
|
|
408
|
+
}
|
|
409
|
+
static deserialize(bytes) {
|
|
410
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTransactionHistoryRequest();
|
|
411
|
+
while (reader.nextField()) {
|
|
412
|
+
if (reader.isEndGroup())
|
|
413
|
+
break;
|
|
414
|
+
switch (reader.getFieldNumber()) {
|
|
415
|
+
case 1:
|
|
416
|
+
message.pageNumber = reader.readInt32();
|
|
417
|
+
break;
|
|
418
|
+
case 2:
|
|
419
|
+
message.pageSize = reader.readInt32();
|
|
420
|
+
break;
|
|
421
|
+
case 3:
|
|
422
|
+
message.startDate = reader.readString();
|
|
423
|
+
break;
|
|
424
|
+
case 4:
|
|
425
|
+
message.endDate = reader.readString();
|
|
426
|
+
break;
|
|
427
|
+
case 5:
|
|
428
|
+
message.transactionType = reader.readEnum();
|
|
429
|
+
break;
|
|
430
|
+
case 6:
|
|
431
|
+
message.status = reader.readEnum();
|
|
432
|
+
break;
|
|
433
|
+
default: reader.skipField();
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
return message;
|
|
437
|
+
}
|
|
438
|
+
serializeBinary() {
|
|
439
|
+
return this.serialize();
|
|
440
|
+
}
|
|
441
|
+
static deserializeBinary(bytes) {
|
|
442
|
+
return GetTransactionHistoryRequest.deserialize(bytes);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
exports.GetTransactionHistoryRequest = GetTransactionHistoryRequest;
|
|
446
|
+
_GetTransactionHistoryRequest_one_of_decls = new WeakMap();
|
|
447
|
+
class GetTransactionHistoryResponse extends pb_1.Message {
|
|
448
|
+
constructor(data) {
|
|
449
|
+
super();
|
|
450
|
+
_GetTransactionHistoryResponse_one_of_decls.set(this, []);
|
|
451
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], __classPrivateFieldGet(this, _GetTransactionHistoryResponse_one_of_decls, "f"));
|
|
452
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
453
|
+
if ("result" in data && data.result != undefined) {
|
|
454
|
+
this.result = data.result;
|
|
455
|
+
}
|
|
456
|
+
if ("transactions" in data && data.transactions != undefined) {
|
|
457
|
+
this.transactions = data.transactions;
|
|
458
|
+
}
|
|
459
|
+
if ("totalRecords" in data && data.totalRecords != undefined) {
|
|
460
|
+
this.totalRecords = data.totalRecords;
|
|
461
|
+
}
|
|
462
|
+
if ("pageNumber" in data && data.pageNumber != undefined) {
|
|
463
|
+
this.pageNumber = data.pageNumber;
|
|
464
|
+
}
|
|
465
|
+
if ("pageSize" in data && data.pageSize != undefined) {
|
|
466
|
+
this.pageSize = data.pageSize;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
get result() {
|
|
471
|
+
return pb_1.Message.getWrapperField(this, dependency_1.ResultStatus, 1);
|
|
472
|
+
}
|
|
473
|
+
set result(value) {
|
|
474
|
+
pb_1.Message.setWrapperField(this, 1, value);
|
|
475
|
+
}
|
|
476
|
+
get hasResult() {
|
|
477
|
+
return pb_1.Message.getField(this, 1) != null;
|
|
478
|
+
}
|
|
479
|
+
get transactions() {
|
|
480
|
+
return pb_1.Message.getRepeatedWrapperField(this, Transaction, 2);
|
|
481
|
+
}
|
|
482
|
+
set transactions(value) {
|
|
483
|
+
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
|
484
|
+
}
|
|
485
|
+
get totalRecords() {
|
|
486
|
+
return pb_1.Message.getFieldWithDefault(this, 3, 0);
|
|
487
|
+
}
|
|
488
|
+
set totalRecords(value) {
|
|
489
|
+
pb_1.Message.setField(this, 3, value);
|
|
490
|
+
}
|
|
491
|
+
get pageNumber() {
|
|
492
|
+
return pb_1.Message.getFieldWithDefault(this, 4, 0);
|
|
493
|
+
}
|
|
494
|
+
set pageNumber(value) {
|
|
495
|
+
pb_1.Message.setField(this, 4, value);
|
|
496
|
+
}
|
|
497
|
+
get pageSize() {
|
|
498
|
+
return pb_1.Message.getFieldWithDefault(this, 5, 0);
|
|
499
|
+
}
|
|
500
|
+
set pageSize(value) {
|
|
501
|
+
pb_1.Message.setField(this, 5, value);
|
|
502
|
+
}
|
|
503
|
+
static fromObject(data) {
|
|
504
|
+
const message = new GetTransactionHistoryResponse({});
|
|
505
|
+
if (data.result != null) {
|
|
506
|
+
message.result = dependency_1.ResultStatus.fromObject(data.result);
|
|
507
|
+
}
|
|
508
|
+
if (data.transactions != null) {
|
|
509
|
+
message.transactions = data.transactions.map(item => Transaction.fromObject(item));
|
|
510
|
+
}
|
|
511
|
+
if (data.totalRecords != null) {
|
|
512
|
+
message.totalRecords = data.totalRecords;
|
|
513
|
+
}
|
|
514
|
+
if (data.pageNumber != null) {
|
|
515
|
+
message.pageNumber = data.pageNumber;
|
|
516
|
+
}
|
|
517
|
+
if (data.pageSize != null) {
|
|
518
|
+
message.pageSize = data.pageSize;
|
|
519
|
+
}
|
|
520
|
+
return message;
|
|
521
|
+
}
|
|
522
|
+
toObject() {
|
|
523
|
+
const data = {};
|
|
524
|
+
if (this.result != null) {
|
|
525
|
+
data.result = this.result.toObject();
|
|
526
|
+
}
|
|
527
|
+
if (this.transactions != null) {
|
|
528
|
+
data.transactions = this.transactions.map((item) => item.toObject());
|
|
529
|
+
}
|
|
530
|
+
if (this.totalRecords != null) {
|
|
531
|
+
data.totalRecords = this.totalRecords;
|
|
532
|
+
}
|
|
533
|
+
if (this.pageNumber != null) {
|
|
534
|
+
data.pageNumber = this.pageNumber;
|
|
535
|
+
}
|
|
536
|
+
if (this.pageSize != null) {
|
|
537
|
+
data.pageSize = this.pageSize;
|
|
538
|
+
}
|
|
539
|
+
return data;
|
|
540
|
+
}
|
|
541
|
+
serialize(w) {
|
|
542
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
543
|
+
if (this.hasResult)
|
|
544
|
+
writer.writeMessage(1, this.result, () => this.result.serialize(writer));
|
|
545
|
+
if (this.transactions.length)
|
|
546
|
+
writer.writeRepeatedMessage(2, this.transactions, (item) => item.serialize(writer));
|
|
547
|
+
if (this.totalRecords != 0)
|
|
548
|
+
writer.writeInt32(3, this.totalRecords);
|
|
549
|
+
if (this.pageNumber != 0)
|
|
550
|
+
writer.writeInt32(4, this.pageNumber);
|
|
551
|
+
if (this.pageSize != 0)
|
|
552
|
+
writer.writeInt32(5, this.pageSize);
|
|
553
|
+
if (!w)
|
|
554
|
+
return writer.getResultBuffer();
|
|
555
|
+
}
|
|
556
|
+
static deserialize(bytes) {
|
|
557
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTransactionHistoryResponse();
|
|
558
|
+
while (reader.nextField()) {
|
|
559
|
+
if (reader.isEndGroup())
|
|
560
|
+
break;
|
|
561
|
+
switch (reader.getFieldNumber()) {
|
|
562
|
+
case 1:
|
|
563
|
+
reader.readMessage(message.result, () => message.result = dependency_1.ResultStatus.deserialize(reader));
|
|
564
|
+
break;
|
|
565
|
+
case 2:
|
|
566
|
+
reader.readMessage(message.transactions, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Transaction.deserialize(reader), Transaction));
|
|
567
|
+
break;
|
|
568
|
+
case 3:
|
|
569
|
+
message.totalRecords = reader.readInt32();
|
|
570
|
+
break;
|
|
571
|
+
case 4:
|
|
572
|
+
message.pageNumber = reader.readInt32();
|
|
573
|
+
break;
|
|
574
|
+
case 5:
|
|
575
|
+
message.pageSize = reader.readInt32();
|
|
576
|
+
break;
|
|
577
|
+
default: reader.skipField();
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
return message;
|
|
581
|
+
}
|
|
582
|
+
serializeBinary() {
|
|
583
|
+
return this.serialize();
|
|
584
|
+
}
|
|
585
|
+
static deserializeBinary(bytes) {
|
|
586
|
+
return GetTransactionHistoryResponse.deserialize(bytes);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
exports.GetTransactionHistoryResponse = GetTransactionHistoryResponse;
|
|
590
|
+
_GetTransactionHistoryResponse_one_of_decls = new WeakMap();
|
|
591
|
+
class Transaction extends pb_1.Message {
|
|
592
|
+
constructor(data) {
|
|
593
|
+
super();
|
|
594
|
+
_Transaction_one_of_decls.set(this, []);
|
|
595
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _Transaction_one_of_decls, "f"));
|
|
596
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
597
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
598
|
+
this.transactionId = data.transactionId;
|
|
599
|
+
}
|
|
600
|
+
if ("type" in data && data.type != undefined) {
|
|
601
|
+
this.type = data.type;
|
|
602
|
+
}
|
|
603
|
+
if ("status" in data && data.status != undefined) {
|
|
604
|
+
this.status = data.status;
|
|
605
|
+
}
|
|
606
|
+
if ("amount" in data && data.amount != undefined) {
|
|
607
|
+
this.amount = data.amount;
|
|
608
|
+
}
|
|
609
|
+
if ("balanceAfter" in data && data.balanceAfter != undefined) {
|
|
610
|
+
this.balanceAfter = data.balanceAfter;
|
|
611
|
+
}
|
|
612
|
+
if ("description" in data && data.description != undefined) {
|
|
613
|
+
this.description = data.description;
|
|
614
|
+
}
|
|
615
|
+
if ("referenceId" in data && data.referenceId != undefined) {
|
|
616
|
+
this.referenceId = data.referenceId;
|
|
617
|
+
}
|
|
618
|
+
if ("createdOn" in data && data.createdOn != undefined) {
|
|
619
|
+
this.createdOn = data.createdOn;
|
|
620
|
+
}
|
|
621
|
+
if ("currency" in data && data.currency != undefined) {
|
|
622
|
+
this.currency = data.currency;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
get transactionId() {
|
|
627
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
628
|
+
}
|
|
629
|
+
set transactionId(value) {
|
|
630
|
+
pb_1.Message.setField(this, 1, value);
|
|
631
|
+
}
|
|
632
|
+
get type() {
|
|
633
|
+
return pb_1.Message.getFieldWithDefault(this, 2, TransactionType.CREDIT);
|
|
634
|
+
}
|
|
635
|
+
set type(value) {
|
|
636
|
+
pb_1.Message.setField(this, 2, value);
|
|
637
|
+
}
|
|
638
|
+
get status() {
|
|
639
|
+
return pb_1.Message.getFieldWithDefault(this, 3, TransactionStatus.PENDING);
|
|
640
|
+
}
|
|
641
|
+
set status(value) {
|
|
642
|
+
pb_1.Message.setField(this, 3, value);
|
|
643
|
+
}
|
|
644
|
+
get amount() {
|
|
645
|
+
return pb_1.Message.getFieldWithDefault(this, 4, 0);
|
|
646
|
+
}
|
|
647
|
+
set amount(value) {
|
|
648
|
+
pb_1.Message.setField(this, 4, value);
|
|
649
|
+
}
|
|
650
|
+
get balanceAfter() {
|
|
651
|
+
return pb_1.Message.getFieldWithDefault(this, 5, 0);
|
|
652
|
+
}
|
|
653
|
+
set balanceAfter(value) {
|
|
654
|
+
pb_1.Message.setField(this, 5, value);
|
|
655
|
+
}
|
|
656
|
+
get description() {
|
|
657
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
658
|
+
}
|
|
659
|
+
set description(value) {
|
|
660
|
+
pb_1.Message.setField(this, 6, value);
|
|
661
|
+
}
|
|
662
|
+
get referenceId() {
|
|
663
|
+
return pb_1.Message.getFieldWithDefault(this, 7, "");
|
|
664
|
+
}
|
|
665
|
+
set referenceId(value) {
|
|
666
|
+
pb_1.Message.setField(this, 7, value);
|
|
667
|
+
}
|
|
668
|
+
get createdOn() {
|
|
669
|
+
return pb_1.Message.getFieldWithDefault(this, 8, "");
|
|
670
|
+
}
|
|
671
|
+
set createdOn(value) {
|
|
672
|
+
pb_1.Message.setField(this, 8, value);
|
|
673
|
+
}
|
|
674
|
+
get currency() {
|
|
675
|
+
return pb_1.Message.getFieldWithDefault(this, 9, "");
|
|
676
|
+
}
|
|
677
|
+
set currency(value) {
|
|
678
|
+
pb_1.Message.setField(this, 9, value);
|
|
679
|
+
}
|
|
680
|
+
static fromObject(data) {
|
|
681
|
+
const message = new Transaction({});
|
|
682
|
+
if (data.transactionId != null) {
|
|
683
|
+
message.transactionId = data.transactionId;
|
|
684
|
+
}
|
|
685
|
+
if (data.type != null) {
|
|
686
|
+
message.type = data.type;
|
|
687
|
+
}
|
|
688
|
+
if (data.status != null) {
|
|
689
|
+
message.status = data.status;
|
|
690
|
+
}
|
|
691
|
+
if (data.amount != null) {
|
|
692
|
+
message.amount = data.amount;
|
|
693
|
+
}
|
|
694
|
+
if (data.balanceAfter != null) {
|
|
695
|
+
message.balanceAfter = data.balanceAfter;
|
|
696
|
+
}
|
|
697
|
+
if (data.description != null) {
|
|
698
|
+
message.description = data.description;
|
|
699
|
+
}
|
|
700
|
+
if (data.referenceId != null) {
|
|
701
|
+
message.referenceId = data.referenceId;
|
|
702
|
+
}
|
|
703
|
+
if (data.createdOn != null) {
|
|
704
|
+
message.createdOn = data.createdOn;
|
|
705
|
+
}
|
|
706
|
+
if (data.currency != null) {
|
|
707
|
+
message.currency = data.currency;
|
|
708
|
+
}
|
|
709
|
+
return message;
|
|
710
|
+
}
|
|
711
|
+
toObject() {
|
|
712
|
+
const data = {};
|
|
713
|
+
if (this.transactionId != null) {
|
|
714
|
+
data.transactionId = this.transactionId;
|
|
715
|
+
}
|
|
716
|
+
if (this.type != null) {
|
|
717
|
+
data.type = this.type;
|
|
718
|
+
}
|
|
719
|
+
if (this.status != null) {
|
|
720
|
+
data.status = this.status;
|
|
721
|
+
}
|
|
722
|
+
if (this.amount != null) {
|
|
723
|
+
data.amount = this.amount;
|
|
724
|
+
}
|
|
725
|
+
if (this.balanceAfter != null) {
|
|
726
|
+
data.balanceAfter = this.balanceAfter;
|
|
727
|
+
}
|
|
728
|
+
if (this.description != null) {
|
|
729
|
+
data.description = this.description;
|
|
730
|
+
}
|
|
731
|
+
if (this.referenceId != null) {
|
|
732
|
+
data.referenceId = this.referenceId;
|
|
733
|
+
}
|
|
734
|
+
if (this.createdOn != null) {
|
|
735
|
+
data.createdOn = this.createdOn;
|
|
736
|
+
}
|
|
737
|
+
if (this.currency != null) {
|
|
738
|
+
data.currency = this.currency;
|
|
739
|
+
}
|
|
740
|
+
return data;
|
|
741
|
+
}
|
|
742
|
+
serialize(w) {
|
|
743
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
744
|
+
if (this.transactionId.length)
|
|
745
|
+
writer.writeString(1, this.transactionId);
|
|
746
|
+
if (this.type != TransactionType.CREDIT)
|
|
747
|
+
writer.writeEnum(2, this.type);
|
|
748
|
+
if (this.status != TransactionStatus.PENDING)
|
|
749
|
+
writer.writeEnum(3, this.status);
|
|
750
|
+
if (this.amount != 0)
|
|
751
|
+
writer.writeDouble(4, this.amount);
|
|
752
|
+
if (this.balanceAfter != 0)
|
|
753
|
+
writer.writeDouble(5, this.balanceAfter);
|
|
754
|
+
if (this.description.length)
|
|
755
|
+
writer.writeString(6, this.description);
|
|
756
|
+
if (this.referenceId.length)
|
|
757
|
+
writer.writeString(7, this.referenceId);
|
|
758
|
+
if (this.createdOn.length)
|
|
759
|
+
writer.writeString(8, this.createdOn);
|
|
760
|
+
if (this.currency.length)
|
|
761
|
+
writer.writeString(9, this.currency);
|
|
762
|
+
if (!w)
|
|
763
|
+
return writer.getResultBuffer();
|
|
764
|
+
}
|
|
765
|
+
static deserialize(bytes) {
|
|
766
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Transaction();
|
|
767
|
+
while (reader.nextField()) {
|
|
768
|
+
if (reader.isEndGroup())
|
|
769
|
+
break;
|
|
770
|
+
switch (reader.getFieldNumber()) {
|
|
771
|
+
case 1:
|
|
772
|
+
message.transactionId = reader.readString();
|
|
773
|
+
break;
|
|
774
|
+
case 2:
|
|
775
|
+
message.type = reader.readEnum();
|
|
776
|
+
break;
|
|
777
|
+
case 3:
|
|
778
|
+
message.status = reader.readEnum();
|
|
779
|
+
break;
|
|
780
|
+
case 4:
|
|
781
|
+
message.amount = reader.readDouble();
|
|
782
|
+
break;
|
|
783
|
+
case 5:
|
|
784
|
+
message.balanceAfter = reader.readDouble();
|
|
785
|
+
break;
|
|
786
|
+
case 6:
|
|
787
|
+
message.description = reader.readString();
|
|
788
|
+
break;
|
|
789
|
+
case 7:
|
|
790
|
+
message.referenceId = reader.readString();
|
|
791
|
+
break;
|
|
792
|
+
case 8:
|
|
793
|
+
message.createdOn = reader.readString();
|
|
794
|
+
break;
|
|
795
|
+
case 9:
|
|
796
|
+
message.currency = reader.readString();
|
|
797
|
+
break;
|
|
798
|
+
default: reader.skipField();
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
return message;
|
|
802
|
+
}
|
|
803
|
+
serializeBinary() {
|
|
804
|
+
return this.serialize();
|
|
805
|
+
}
|
|
806
|
+
static deserializeBinary(bytes) {
|
|
807
|
+
return Transaction.deserialize(bytes);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
exports.Transaction = Transaction;
|
|
811
|
+
_Transaction_one_of_decls = new WeakMap();
|
|
812
|
+
class AddBalanceRequest extends pb_1.Message {
|
|
813
|
+
constructor(data) {
|
|
814
|
+
super();
|
|
815
|
+
_AddBalanceRequest_one_of_decls.set(this, [[3], [4], [5]]);
|
|
816
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _AddBalanceRequest_one_of_decls, "f"));
|
|
817
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
818
|
+
if ("amount" in data && data.amount != undefined) {
|
|
819
|
+
this.amount = data.amount;
|
|
820
|
+
}
|
|
821
|
+
if ("description" in data && data.description != undefined) {
|
|
822
|
+
this.description = data.description;
|
|
823
|
+
}
|
|
824
|
+
if ("referenceId" in data && data.referenceId != undefined) {
|
|
825
|
+
this.referenceId = data.referenceId;
|
|
826
|
+
}
|
|
827
|
+
if ("paymentMethod" in data && data.paymentMethod != undefined) {
|
|
828
|
+
this.paymentMethod = data.paymentMethod;
|
|
829
|
+
}
|
|
830
|
+
if ("transactionRef" in data && data.transactionRef != undefined) {
|
|
831
|
+
this.transactionRef = data.transactionRef;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
get amount() {
|
|
836
|
+
return pb_1.Message.getFieldWithDefault(this, 1, 0);
|
|
837
|
+
}
|
|
838
|
+
set amount(value) {
|
|
839
|
+
pb_1.Message.setField(this, 1, value);
|
|
840
|
+
}
|
|
841
|
+
get description() {
|
|
842
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
843
|
+
}
|
|
844
|
+
set description(value) {
|
|
845
|
+
pb_1.Message.setField(this, 2, value);
|
|
846
|
+
}
|
|
847
|
+
get referenceId() {
|
|
848
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
849
|
+
}
|
|
850
|
+
set referenceId(value) {
|
|
851
|
+
pb_1.Message.setOneofField(this, 3, __classPrivateFieldGet(this, _AddBalanceRequest_one_of_decls, "f")[0], value);
|
|
852
|
+
}
|
|
853
|
+
get hasReferenceId() {
|
|
854
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
855
|
+
}
|
|
856
|
+
get paymentMethod() {
|
|
857
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
858
|
+
}
|
|
859
|
+
set paymentMethod(value) {
|
|
860
|
+
pb_1.Message.setOneofField(this, 4, __classPrivateFieldGet(this, _AddBalanceRequest_one_of_decls, "f")[1], value);
|
|
861
|
+
}
|
|
862
|
+
get hasPaymentMethod() {
|
|
863
|
+
return pb_1.Message.getField(this, 4) != null;
|
|
864
|
+
}
|
|
865
|
+
get transactionRef() {
|
|
866
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "");
|
|
867
|
+
}
|
|
868
|
+
set transactionRef(value) {
|
|
869
|
+
pb_1.Message.setOneofField(this, 5, __classPrivateFieldGet(this, _AddBalanceRequest_one_of_decls, "f")[2], value);
|
|
870
|
+
}
|
|
871
|
+
get hasTransactionRef() {
|
|
872
|
+
return pb_1.Message.getField(this, 5) != null;
|
|
873
|
+
}
|
|
874
|
+
get _referenceId() {
|
|
875
|
+
const cases = {
|
|
876
|
+
0: "none",
|
|
877
|
+
3: "referenceId"
|
|
878
|
+
};
|
|
879
|
+
return cases[pb_1.Message.computeOneofCase(this, [3])];
|
|
880
|
+
}
|
|
881
|
+
get _paymentMethod() {
|
|
882
|
+
const cases = {
|
|
883
|
+
0: "none",
|
|
884
|
+
4: "paymentMethod"
|
|
885
|
+
};
|
|
886
|
+
return cases[pb_1.Message.computeOneofCase(this, [4])];
|
|
887
|
+
}
|
|
888
|
+
get _transactionRef() {
|
|
889
|
+
const cases = {
|
|
890
|
+
0: "none",
|
|
891
|
+
5: "transactionRef"
|
|
892
|
+
};
|
|
893
|
+
return cases[pb_1.Message.computeOneofCase(this, [5])];
|
|
894
|
+
}
|
|
895
|
+
static fromObject(data) {
|
|
896
|
+
const message = new AddBalanceRequest({});
|
|
897
|
+
if (data.amount != null) {
|
|
898
|
+
message.amount = data.amount;
|
|
899
|
+
}
|
|
900
|
+
if (data.description != null) {
|
|
901
|
+
message.description = data.description;
|
|
902
|
+
}
|
|
903
|
+
if (data.referenceId != null) {
|
|
904
|
+
message.referenceId = data.referenceId;
|
|
905
|
+
}
|
|
906
|
+
if (data.paymentMethod != null) {
|
|
907
|
+
message.paymentMethod = data.paymentMethod;
|
|
908
|
+
}
|
|
909
|
+
if (data.transactionRef != null) {
|
|
910
|
+
message.transactionRef = data.transactionRef;
|
|
911
|
+
}
|
|
912
|
+
return message;
|
|
913
|
+
}
|
|
914
|
+
toObject() {
|
|
915
|
+
const data = {};
|
|
916
|
+
if (this.amount != null) {
|
|
917
|
+
data.amount = this.amount;
|
|
918
|
+
}
|
|
919
|
+
if (this.description != null) {
|
|
920
|
+
data.description = this.description;
|
|
921
|
+
}
|
|
922
|
+
if (this.referenceId != null) {
|
|
923
|
+
data.referenceId = this.referenceId;
|
|
924
|
+
}
|
|
925
|
+
if (this.paymentMethod != null) {
|
|
926
|
+
data.paymentMethod = this.paymentMethod;
|
|
927
|
+
}
|
|
928
|
+
if (this.transactionRef != null) {
|
|
929
|
+
data.transactionRef = this.transactionRef;
|
|
930
|
+
}
|
|
931
|
+
return data;
|
|
932
|
+
}
|
|
933
|
+
serialize(w) {
|
|
934
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
935
|
+
if (this.amount != 0)
|
|
936
|
+
writer.writeDouble(1, this.amount);
|
|
937
|
+
if (this.description.length)
|
|
938
|
+
writer.writeString(2, this.description);
|
|
939
|
+
if (this.hasReferenceId)
|
|
940
|
+
writer.writeString(3, this.referenceId);
|
|
941
|
+
if (this.hasPaymentMethod)
|
|
942
|
+
writer.writeString(4, this.paymentMethod);
|
|
943
|
+
if (this.hasTransactionRef)
|
|
944
|
+
writer.writeString(5, this.transactionRef);
|
|
945
|
+
if (!w)
|
|
946
|
+
return writer.getResultBuffer();
|
|
947
|
+
}
|
|
948
|
+
static deserialize(bytes) {
|
|
949
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AddBalanceRequest();
|
|
950
|
+
while (reader.nextField()) {
|
|
951
|
+
if (reader.isEndGroup())
|
|
952
|
+
break;
|
|
953
|
+
switch (reader.getFieldNumber()) {
|
|
954
|
+
case 1:
|
|
955
|
+
message.amount = reader.readDouble();
|
|
956
|
+
break;
|
|
957
|
+
case 2:
|
|
958
|
+
message.description = reader.readString();
|
|
959
|
+
break;
|
|
960
|
+
case 3:
|
|
961
|
+
message.referenceId = reader.readString();
|
|
962
|
+
break;
|
|
963
|
+
case 4:
|
|
964
|
+
message.paymentMethod = reader.readString();
|
|
965
|
+
break;
|
|
966
|
+
case 5:
|
|
967
|
+
message.transactionRef = reader.readString();
|
|
968
|
+
break;
|
|
969
|
+
default: reader.skipField();
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
return message;
|
|
973
|
+
}
|
|
974
|
+
serializeBinary() {
|
|
975
|
+
return this.serialize();
|
|
976
|
+
}
|
|
977
|
+
static deserializeBinary(bytes) {
|
|
978
|
+
return AddBalanceRequest.deserialize(bytes);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
exports.AddBalanceRequest = AddBalanceRequest;
|
|
982
|
+
_AddBalanceRequest_one_of_decls = new WeakMap();
|
|
983
|
+
class AddBalanceResponse extends pb_1.Message {
|
|
984
|
+
constructor(data) {
|
|
985
|
+
super();
|
|
986
|
+
_AddBalanceResponse_one_of_decls.set(this, []);
|
|
987
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _AddBalanceResponse_one_of_decls, "f"));
|
|
988
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
989
|
+
if ("result" in data && data.result != undefined) {
|
|
990
|
+
this.result = data.result;
|
|
991
|
+
}
|
|
992
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
993
|
+
this.transactionId = data.transactionId;
|
|
994
|
+
}
|
|
995
|
+
if ("previousBalance" in data && data.previousBalance != undefined) {
|
|
996
|
+
this.previousBalance = data.previousBalance;
|
|
997
|
+
}
|
|
998
|
+
if ("amountAdded" in data && data.amountAdded != undefined) {
|
|
999
|
+
this.amountAdded = data.amountAdded;
|
|
1000
|
+
}
|
|
1001
|
+
if ("newBalance" in data && data.newBalance != undefined) {
|
|
1002
|
+
this.newBalance = data.newBalance;
|
|
1003
|
+
}
|
|
1004
|
+
if ("createdOn" in data && data.createdOn != undefined) {
|
|
1005
|
+
this.createdOn = data.createdOn;
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
get result() {
|
|
1010
|
+
return pb_1.Message.getWrapperField(this, dependency_1.ResultStatus, 1);
|
|
1011
|
+
}
|
|
1012
|
+
set result(value) {
|
|
1013
|
+
pb_1.Message.setWrapperField(this, 1, value);
|
|
1014
|
+
}
|
|
1015
|
+
get hasResult() {
|
|
1016
|
+
return pb_1.Message.getField(this, 1) != null;
|
|
1017
|
+
}
|
|
1018
|
+
get transactionId() {
|
|
1019
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1020
|
+
}
|
|
1021
|
+
set transactionId(value) {
|
|
1022
|
+
pb_1.Message.setField(this, 2, value);
|
|
1023
|
+
}
|
|
1024
|
+
get previousBalance() {
|
|
1025
|
+
return pb_1.Message.getFieldWithDefault(this, 3, 0);
|
|
1026
|
+
}
|
|
1027
|
+
set previousBalance(value) {
|
|
1028
|
+
pb_1.Message.setField(this, 3, value);
|
|
1029
|
+
}
|
|
1030
|
+
get amountAdded() {
|
|
1031
|
+
return pb_1.Message.getFieldWithDefault(this, 4, 0);
|
|
1032
|
+
}
|
|
1033
|
+
set amountAdded(value) {
|
|
1034
|
+
pb_1.Message.setField(this, 4, value);
|
|
1035
|
+
}
|
|
1036
|
+
get newBalance() {
|
|
1037
|
+
return pb_1.Message.getFieldWithDefault(this, 5, 0);
|
|
1038
|
+
}
|
|
1039
|
+
set newBalance(value) {
|
|
1040
|
+
pb_1.Message.setField(this, 5, value);
|
|
1041
|
+
}
|
|
1042
|
+
get createdOn() {
|
|
1043
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
1044
|
+
}
|
|
1045
|
+
set createdOn(value) {
|
|
1046
|
+
pb_1.Message.setField(this, 6, value);
|
|
1047
|
+
}
|
|
1048
|
+
static fromObject(data) {
|
|
1049
|
+
const message = new AddBalanceResponse({});
|
|
1050
|
+
if (data.result != null) {
|
|
1051
|
+
message.result = dependency_1.ResultStatus.fromObject(data.result);
|
|
1052
|
+
}
|
|
1053
|
+
if (data.transactionId != null) {
|
|
1054
|
+
message.transactionId = data.transactionId;
|
|
1055
|
+
}
|
|
1056
|
+
if (data.previousBalance != null) {
|
|
1057
|
+
message.previousBalance = data.previousBalance;
|
|
1058
|
+
}
|
|
1059
|
+
if (data.amountAdded != null) {
|
|
1060
|
+
message.amountAdded = data.amountAdded;
|
|
1061
|
+
}
|
|
1062
|
+
if (data.newBalance != null) {
|
|
1063
|
+
message.newBalance = data.newBalance;
|
|
1064
|
+
}
|
|
1065
|
+
if (data.createdOn != null) {
|
|
1066
|
+
message.createdOn = data.createdOn;
|
|
1067
|
+
}
|
|
1068
|
+
return message;
|
|
1069
|
+
}
|
|
1070
|
+
toObject() {
|
|
1071
|
+
const data = {};
|
|
1072
|
+
if (this.result != null) {
|
|
1073
|
+
data.result = this.result.toObject();
|
|
1074
|
+
}
|
|
1075
|
+
if (this.transactionId != null) {
|
|
1076
|
+
data.transactionId = this.transactionId;
|
|
1077
|
+
}
|
|
1078
|
+
if (this.previousBalance != null) {
|
|
1079
|
+
data.previousBalance = this.previousBalance;
|
|
1080
|
+
}
|
|
1081
|
+
if (this.amountAdded != null) {
|
|
1082
|
+
data.amountAdded = this.amountAdded;
|
|
1083
|
+
}
|
|
1084
|
+
if (this.newBalance != null) {
|
|
1085
|
+
data.newBalance = this.newBalance;
|
|
1086
|
+
}
|
|
1087
|
+
if (this.createdOn != null) {
|
|
1088
|
+
data.createdOn = this.createdOn;
|
|
1089
|
+
}
|
|
1090
|
+
return data;
|
|
1091
|
+
}
|
|
1092
|
+
serialize(w) {
|
|
1093
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1094
|
+
if (this.hasResult)
|
|
1095
|
+
writer.writeMessage(1, this.result, () => this.result.serialize(writer));
|
|
1096
|
+
if (this.transactionId.length)
|
|
1097
|
+
writer.writeString(2, this.transactionId);
|
|
1098
|
+
if (this.previousBalance != 0)
|
|
1099
|
+
writer.writeDouble(3, this.previousBalance);
|
|
1100
|
+
if (this.amountAdded != 0)
|
|
1101
|
+
writer.writeDouble(4, this.amountAdded);
|
|
1102
|
+
if (this.newBalance != 0)
|
|
1103
|
+
writer.writeDouble(5, this.newBalance);
|
|
1104
|
+
if (this.createdOn.length)
|
|
1105
|
+
writer.writeString(6, this.createdOn);
|
|
1106
|
+
if (!w)
|
|
1107
|
+
return writer.getResultBuffer();
|
|
1108
|
+
}
|
|
1109
|
+
static deserialize(bytes) {
|
|
1110
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AddBalanceResponse();
|
|
1111
|
+
while (reader.nextField()) {
|
|
1112
|
+
if (reader.isEndGroup())
|
|
1113
|
+
break;
|
|
1114
|
+
switch (reader.getFieldNumber()) {
|
|
1115
|
+
case 1:
|
|
1116
|
+
reader.readMessage(message.result, () => message.result = dependency_1.ResultStatus.deserialize(reader));
|
|
1117
|
+
break;
|
|
1118
|
+
case 2:
|
|
1119
|
+
message.transactionId = reader.readString();
|
|
1120
|
+
break;
|
|
1121
|
+
case 3:
|
|
1122
|
+
message.previousBalance = reader.readDouble();
|
|
1123
|
+
break;
|
|
1124
|
+
case 4:
|
|
1125
|
+
message.amountAdded = reader.readDouble();
|
|
1126
|
+
break;
|
|
1127
|
+
case 5:
|
|
1128
|
+
message.newBalance = reader.readDouble();
|
|
1129
|
+
break;
|
|
1130
|
+
case 6:
|
|
1131
|
+
message.createdOn = reader.readString();
|
|
1132
|
+
break;
|
|
1133
|
+
default: reader.skipField();
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
return message;
|
|
1137
|
+
}
|
|
1138
|
+
serializeBinary() {
|
|
1139
|
+
return this.serialize();
|
|
1140
|
+
}
|
|
1141
|
+
static deserializeBinary(bytes) {
|
|
1142
|
+
return AddBalanceResponse.deserialize(bytes);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
exports.AddBalanceResponse = AddBalanceResponse;
|
|
1146
|
+
_AddBalanceResponse_one_of_decls = new WeakMap();
|
|
1147
|
+
class DeductBalanceRequest extends pb_1.Message {
|
|
1148
|
+
constructor(data) {
|
|
1149
|
+
super();
|
|
1150
|
+
_DeductBalanceRequest_one_of_decls.set(this, [[3], [4]]);
|
|
1151
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _DeductBalanceRequest_one_of_decls, "f"));
|
|
1152
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1153
|
+
if ("amount" in data && data.amount != undefined) {
|
|
1154
|
+
this.amount = data.amount;
|
|
1155
|
+
}
|
|
1156
|
+
if ("description" in data && data.description != undefined) {
|
|
1157
|
+
this.description = data.description;
|
|
1158
|
+
}
|
|
1159
|
+
if ("referenceId" in data && data.referenceId != undefined) {
|
|
1160
|
+
this.referenceId = data.referenceId;
|
|
1161
|
+
}
|
|
1162
|
+
if ("orderId" in data && data.orderId != undefined) {
|
|
1163
|
+
this.orderId = data.orderId;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
get amount() {
|
|
1168
|
+
return pb_1.Message.getFieldWithDefault(this, 1, 0);
|
|
1169
|
+
}
|
|
1170
|
+
set amount(value) {
|
|
1171
|
+
pb_1.Message.setField(this, 1, value);
|
|
1172
|
+
}
|
|
1173
|
+
get description() {
|
|
1174
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1175
|
+
}
|
|
1176
|
+
set description(value) {
|
|
1177
|
+
pb_1.Message.setField(this, 2, value);
|
|
1178
|
+
}
|
|
1179
|
+
get referenceId() {
|
|
1180
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
1181
|
+
}
|
|
1182
|
+
set referenceId(value) {
|
|
1183
|
+
pb_1.Message.setOneofField(this, 3, __classPrivateFieldGet(this, _DeductBalanceRequest_one_of_decls, "f")[0], value);
|
|
1184
|
+
}
|
|
1185
|
+
get hasReferenceId() {
|
|
1186
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
1187
|
+
}
|
|
1188
|
+
get orderId() {
|
|
1189
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "");
|
|
1190
|
+
}
|
|
1191
|
+
set orderId(value) {
|
|
1192
|
+
pb_1.Message.setOneofField(this, 4, __classPrivateFieldGet(this, _DeductBalanceRequest_one_of_decls, "f")[1], value);
|
|
1193
|
+
}
|
|
1194
|
+
get hasOrderId() {
|
|
1195
|
+
return pb_1.Message.getField(this, 4) != null;
|
|
1196
|
+
}
|
|
1197
|
+
get _referenceId() {
|
|
1198
|
+
const cases = {
|
|
1199
|
+
0: "none",
|
|
1200
|
+
3: "referenceId"
|
|
1201
|
+
};
|
|
1202
|
+
return cases[pb_1.Message.computeOneofCase(this, [3])];
|
|
1203
|
+
}
|
|
1204
|
+
get _orderId() {
|
|
1205
|
+
const cases = {
|
|
1206
|
+
0: "none",
|
|
1207
|
+
4: "orderId"
|
|
1208
|
+
};
|
|
1209
|
+
return cases[pb_1.Message.computeOneofCase(this, [4])];
|
|
1210
|
+
}
|
|
1211
|
+
static fromObject(data) {
|
|
1212
|
+
const message = new DeductBalanceRequest({});
|
|
1213
|
+
if (data.amount != null) {
|
|
1214
|
+
message.amount = data.amount;
|
|
1215
|
+
}
|
|
1216
|
+
if (data.description != null) {
|
|
1217
|
+
message.description = data.description;
|
|
1218
|
+
}
|
|
1219
|
+
if (data.referenceId != null) {
|
|
1220
|
+
message.referenceId = data.referenceId;
|
|
1221
|
+
}
|
|
1222
|
+
if (data.orderId != null) {
|
|
1223
|
+
message.orderId = data.orderId;
|
|
1224
|
+
}
|
|
1225
|
+
return message;
|
|
1226
|
+
}
|
|
1227
|
+
toObject() {
|
|
1228
|
+
const data = {};
|
|
1229
|
+
if (this.amount != null) {
|
|
1230
|
+
data.amount = this.amount;
|
|
1231
|
+
}
|
|
1232
|
+
if (this.description != null) {
|
|
1233
|
+
data.description = this.description;
|
|
1234
|
+
}
|
|
1235
|
+
if (this.referenceId != null) {
|
|
1236
|
+
data.referenceId = this.referenceId;
|
|
1237
|
+
}
|
|
1238
|
+
if (this.orderId != null) {
|
|
1239
|
+
data.orderId = this.orderId;
|
|
1240
|
+
}
|
|
1241
|
+
return data;
|
|
1242
|
+
}
|
|
1243
|
+
serialize(w) {
|
|
1244
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1245
|
+
if (this.amount != 0)
|
|
1246
|
+
writer.writeDouble(1, this.amount);
|
|
1247
|
+
if (this.description.length)
|
|
1248
|
+
writer.writeString(2, this.description);
|
|
1249
|
+
if (this.hasReferenceId)
|
|
1250
|
+
writer.writeString(3, this.referenceId);
|
|
1251
|
+
if (this.hasOrderId)
|
|
1252
|
+
writer.writeString(4, this.orderId);
|
|
1253
|
+
if (!w)
|
|
1254
|
+
return writer.getResultBuffer();
|
|
1255
|
+
}
|
|
1256
|
+
static deserialize(bytes) {
|
|
1257
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeductBalanceRequest();
|
|
1258
|
+
while (reader.nextField()) {
|
|
1259
|
+
if (reader.isEndGroup())
|
|
1260
|
+
break;
|
|
1261
|
+
switch (reader.getFieldNumber()) {
|
|
1262
|
+
case 1:
|
|
1263
|
+
message.amount = reader.readDouble();
|
|
1264
|
+
break;
|
|
1265
|
+
case 2:
|
|
1266
|
+
message.description = reader.readString();
|
|
1267
|
+
break;
|
|
1268
|
+
case 3:
|
|
1269
|
+
message.referenceId = reader.readString();
|
|
1270
|
+
break;
|
|
1271
|
+
case 4:
|
|
1272
|
+
message.orderId = reader.readString();
|
|
1273
|
+
break;
|
|
1274
|
+
default: reader.skipField();
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
return message;
|
|
1278
|
+
}
|
|
1279
|
+
serializeBinary() {
|
|
1280
|
+
return this.serialize();
|
|
1281
|
+
}
|
|
1282
|
+
static deserializeBinary(bytes) {
|
|
1283
|
+
return DeductBalanceRequest.deserialize(bytes);
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
exports.DeductBalanceRequest = DeductBalanceRequest;
|
|
1287
|
+
_DeductBalanceRequest_one_of_decls = new WeakMap();
|
|
1288
|
+
class DeductBalanceResponse extends pb_1.Message {
|
|
1289
|
+
constructor(data) {
|
|
1290
|
+
super();
|
|
1291
|
+
_DeductBalanceResponse_one_of_decls.set(this, []);
|
|
1292
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _DeductBalanceResponse_one_of_decls, "f"));
|
|
1293
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1294
|
+
if ("result" in data && data.result != undefined) {
|
|
1295
|
+
this.result = data.result;
|
|
1296
|
+
}
|
|
1297
|
+
if ("transactionId" in data && data.transactionId != undefined) {
|
|
1298
|
+
this.transactionId = data.transactionId;
|
|
1299
|
+
}
|
|
1300
|
+
if ("previousBalance" in data && data.previousBalance != undefined) {
|
|
1301
|
+
this.previousBalance = data.previousBalance;
|
|
1302
|
+
}
|
|
1303
|
+
if ("amountDeducted" in data && data.amountDeducted != undefined) {
|
|
1304
|
+
this.amountDeducted = data.amountDeducted;
|
|
1305
|
+
}
|
|
1306
|
+
if ("newBalance" in data && data.newBalance != undefined) {
|
|
1307
|
+
this.newBalance = data.newBalance;
|
|
1308
|
+
}
|
|
1309
|
+
if ("createdOn" in data && data.createdOn != undefined) {
|
|
1310
|
+
this.createdOn = data.createdOn;
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
get result() {
|
|
1315
|
+
return pb_1.Message.getWrapperField(this, dependency_1.ResultStatus, 1);
|
|
1316
|
+
}
|
|
1317
|
+
set result(value) {
|
|
1318
|
+
pb_1.Message.setWrapperField(this, 1, value);
|
|
1319
|
+
}
|
|
1320
|
+
get hasResult() {
|
|
1321
|
+
return pb_1.Message.getField(this, 1) != null;
|
|
1322
|
+
}
|
|
1323
|
+
get transactionId() {
|
|
1324
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1325
|
+
}
|
|
1326
|
+
set transactionId(value) {
|
|
1327
|
+
pb_1.Message.setField(this, 2, value);
|
|
1328
|
+
}
|
|
1329
|
+
get previousBalance() {
|
|
1330
|
+
return pb_1.Message.getFieldWithDefault(this, 3, 0);
|
|
1331
|
+
}
|
|
1332
|
+
set previousBalance(value) {
|
|
1333
|
+
pb_1.Message.setField(this, 3, value);
|
|
1334
|
+
}
|
|
1335
|
+
get amountDeducted() {
|
|
1336
|
+
return pb_1.Message.getFieldWithDefault(this, 4, 0);
|
|
1337
|
+
}
|
|
1338
|
+
set amountDeducted(value) {
|
|
1339
|
+
pb_1.Message.setField(this, 4, value);
|
|
1340
|
+
}
|
|
1341
|
+
get newBalance() {
|
|
1342
|
+
return pb_1.Message.getFieldWithDefault(this, 5, 0);
|
|
1343
|
+
}
|
|
1344
|
+
set newBalance(value) {
|
|
1345
|
+
pb_1.Message.setField(this, 5, value);
|
|
1346
|
+
}
|
|
1347
|
+
get createdOn() {
|
|
1348
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "");
|
|
1349
|
+
}
|
|
1350
|
+
set createdOn(value) {
|
|
1351
|
+
pb_1.Message.setField(this, 6, value);
|
|
1352
|
+
}
|
|
1353
|
+
static fromObject(data) {
|
|
1354
|
+
const message = new DeductBalanceResponse({});
|
|
1355
|
+
if (data.result != null) {
|
|
1356
|
+
message.result = dependency_1.ResultStatus.fromObject(data.result);
|
|
1357
|
+
}
|
|
1358
|
+
if (data.transactionId != null) {
|
|
1359
|
+
message.transactionId = data.transactionId;
|
|
1360
|
+
}
|
|
1361
|
+
if (data.previousBalance != null) {
|
|
1362
|
+
message.previousBalance = data.previousBalance;
|
|
1363
|
+
}
|
|
1364
|
+
if (data.amountDeducted != null) {
|
|
1365
|
+
message.amountDeducted = data.amountDeducted;
|
|
1366
|
+
}
|
|
1367
|
+
if (data.newBalance != null) {
|
|
1368
|
+
message.newBalance = data.newBalance;
|
|
1369
|
+
}
|
|
1370
|
+
if (data.createdOn != null) {
|
|
1371
|
+
message.createdOn = data.createdOn;
|
|
1372
|
+
}
|
|
1373
|
+
return message;
|
|
1374
|
+
}
|
|
1375
|
+
toObject() {
|
|
1376
|
+
const data = {};
|
|
1377
|
+
if (this.result != null) {
|
|
1378
|
+
data.result = this.result.toObject();
|
|
1379
|
+
}
|
|
1380
|
+
if (this.transactionId != null) {
|
|
1381
|
+
data.transactionId = this.transactionId;
|
|
1382
|
+
}
|
|
1383
|
+
if (this.previousBalance != null) {
|
|
1384
|
+
data.previousBalance = this.previousBalance;
|
|
1385
|
+
}
|
|
1386
|
+
if (this.amountDeducted != null) {
|
|
1387
|
+
data.amountDeducted = this.amountDeducted;
|
|
1388
|
+
}
|
|
1389
|
+
if (this.newBalance != null) {
|
|
1390
|
+
data.newBalance = this.newBalance;
|
|
1391
|
+
}
|
|
1392
|
+
if (this.createdOn != null) {
|
|
1393
|
+
data.createdOn = this.createdOn;
|
|
1394
|
+
}
|
|
1395
|
+
return data;
|
|
1396
|
+
}
|
|
1397
|
+
serialize(w) {
|
|
1398
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1399
|
+
if (this.hasResult)
|
|
1400
|
+
writer.writeMessage(1, this.result, () => this.result.serialize(writer));
|
|
1401
|
+
if (this.transactionId.length)
|
|
1402
|
+
writer.writeString(2, this.transactionId);
|
|
1403
|
+
if (this.previousBalance != 0)
|
|
1404
|
+
writer.writeDouble(3, this.previousBalance);
|
|
1405
|
+
if (this.amountDeducted != 0)
|
|
1406
|
+
writer.writeDouble(4, this.amountDeducted);
|
|
1407
|
+
if (this.newBalance != 0)
|
|
1408
|
+
writer.writeDouble(5, this.newBalance);
|
|
1409
|
+
if (this.createdOn.length)
|
|
1410
|
+
writer.writeString(6, this.createdOn);
|
|
1411
|
+
if (!w)
|
|
1412
|
+
return writer.getResultBuffer();
|
|
1413
|
+
}
|
|
1414
|
+
static deserialize(bytes) {
|
|
1415
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeductBalanceResponse();
|
|
1416
|
+
while (reader.nextField()) {
|
|
1417
|
+
if (reader.isEndGroup())
|
|
1418
|
+
break;
|
|
1419
|
+
switch (reader.getFieldNumber()) {
|
|
1420
|
+
case 1:
|
|
1421
|
+
reader.readMessage(message.result, () => message.result = dependency_1.ResultStatus.deserialize(reader));
|
|
1422
|
+
break;
|
|
1423
|
+
case 2:
|
|
1424
|
+
message.transactionId = reader.readString();
|
|
1425
|
+
break;
|
|
1426
|
+
case 3:
|
|
1427
|
+
message.previousBalance = reader.readDouble();
|
|
1428
|
+
break;
|
|
1429
|
+
case 4:
|
|
1430
|
+
message.amountDeducted = reader.readDouble();
|
|
1431
|
+
break;
|
|
1432
|
+
case 5:
|
|
1433
|
+
message.newBalance = reader.readDouble();
|
|
1434
|
+
break;
|
|
1435
|
+
case 6:
|
|
1436
|
+
message.createdOn = reader.readString();
|
|
1437
|
+
break;
|
|
1438
|
+
default: reader.skipField();
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
return message;
|
|
1442
|
+
}
|
|
1443
|
+
serializeBinary() {
|
|
1444
|
+
return this.serialize();
|
|
1445
|
+
}
|
|
1446
|
+
static deserializeBinary(bytes) {
|
|
1447
|
+
return DeductBalanceResponse.deserialize(bytes);
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
exports.DeductBalanceResponse = DeductBalanceResponse;
|
|
1451
|
+
_DeductBalanceResponse_one_of_decls = new WeakMap();
|
|
1452
|
+
class GetStatementRequest extends pb_1.Message {
|
|
1453
|
+
constructor(data) {
|
|
1454
|
+
super();
|
|
1455
|
+
_GetStatementRequest_one_of_decls.set(this, [[3]]);
|
|
1456
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __classPrivateFieldGet(this, _GetStatementRequest_one_of_decls, "f"));
|
|
1457
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1458
|
+
if ("startDate" in data && data.startDate != undefined) {
|
|
1459
|
+
this.startDate = data.startDate;
|
|
1460
|
+
}
|
|
1461
|
+
if ("endDate" in data && data.endDate != undefined) {
|
|
1462
|
+
this.endDate = data.endDate;
|
|
1463
|
+
}
|
|
1464
|
+
if ("format" in data && data.format != undefined) {
|
|
1465
|
+
this.format = data.format;
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
get startDate() {
|
|
1470
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "");
|
|
1471
|
+
}
|
|
1472
|
+
set startDate(value) {
|
|
1473
|
+
pb_1.Message.setField(this, 1, value);
|
|
1474
|
+
}
|
|
1475
|
+
get endDate() {
|
|
1476
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1477
|
+
}
|
|
1478
|
+
set endDate(value) {
|
|
1479
|
+
pb_1.Message.setField(this, 2, value);
|
|
1480
|
+
}
|
|
1481
|
+
get format() {
|
|
1482
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
1483
|
+
}
|
|
1484
|
+
set format(value) {
|
|
1485
|
+
pb_1.Message.setOneofField(this, 3, __classPrivateFieldGet(this, _GetStatementRequest_one_of_decls, "f")[0], value);
|
|
1486
|
+
}
|
|
1487
|
+
get hasFormat() {
|
|
1488
|
+
return pb_1.Message.getField(this, 3) != null;
|
|
1489
|
+
}
|
|
1490
|
+
get _format() {
|
|
1491
|
+
const cases = {
|
|
1492
|
+
0: "none",
|
|
1493
|
+
3: "format"
|
|
1494
|
+
};
|
|
1495
|
+
return cases[pb_1.Message.computeOneofCase(this, [3])];
|
|
1496
|
+
}
|
|
1497
|
+
static fromObject(data) {
|
|
1498
|
+
const message = new GetStatementRequest({});
|
|
1499
|
+
if (data.startDate != null) {
|
|
1500
|
+
message.startDate = data.startDate;
|
|
1501
|
+
}
|
|
1502
|
+
if (data.endDate != null) {
|
|
1503
|
+
message.endDate = data.endDate;
|
|
1504
|
+
}
|
|
1505
|
+
if (data.format != null) {
|
|
1506
|
+
message.format = data.format;
|
|
1507
|
+
}
|
|
1508
|
+
return message;
|
|
1509
|
+
}
|
|
1510
|
+
toObject() {
|
|
1511
|
+
const data = {};
|
|
1512
|
+
if (this.startDate != null) {
|
|
1513
|
+
data.startDate = this.startDate;
|
|
1514
|
+
}
|
|
1515
|
+
if (this.endDate != null) {
|
|
1516
|
+
data.endDate = this.endDate;
|
|
1517
|
+
}
|
|
1518
|
+
if (this.format != null) {
|
|
1519
|
+
data.format = this.format;
|
|
1520
|
+
}
|
|
1521
|
+
return data;
|
|
1522
|
+
}
|
|
1523
|
+
serialize(w) {
|
|
1524
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1525
|
+
if (this.startDate.length)
|
|
1526
|
+
writer.writeString(1, this.startDate);
|
|
1527
|
+
if (this.endDate.length)
|
|
1528
|
+
writer.writeString(2, this.endDate);
|
|
1529
|
+
if (this.hasFormat)
|
|
1530
|
+
writer.writeString(3, this.format);
|
|
1531
|
+
if (!w)
|
|
1532
|
+
return writer.getResultBuffer();
|
|
1533
|
+
}
|
|
1534
|
+
static deserialize(bytes) {
|
|
1535
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetStatementRequest();
|
|
1536
|
+
while (reader.nextField()) {
|
|
1537
|
+
if (reader.isEndGroup())
|
|
1538
|
+
break;
|
|
1539
|
+
switch (reader.getFieldNumber()) {
|
|
1540
|
+
case 1:
|
|
1541
|
+
message.startDate = reader.readString();
|
|
1542
|
+
break;
|
|
1543
|
+
case 2:
|
|
1544
|
+
message.endDate = reader.readString();
|
|
1545
|
+
break;
|
|
1546
|
+
case 3:
|
|
1547
|
+
message.format = reader.readString();
|
|
1548
|
+
break;
|
|
1549
|
+
default: reader.skipField();
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
return message;
|
|
1553
|
+
}
|
|
1554
|
+
serializeBinary() {
|
|
1555
|
+
return this.serialize();
|
|
1556
|
+
}
|
|
1557
|
+
static deserializeBinary(bytes) {
|
|
1558
|
+
return GetStatementRequest.deserialize(bytes);
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
exports.GetStatementRequest = GetStatementRequest;
|
|
1562
|
+
_GetStatementRequest_one_of_decls = new WeakMap();
|
|
1563
|
+
class GetStatementResponse extends pb_1.Message {
|
|
1564
|
+
constructor(data) {
|
|
1565
|
+
super();
|
|
1566
|
+
_GetStatementResponse_one_of_decls.set(this, [[9]]);
|
|
1567
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [8], __classPrivateFieldGet(this, _GetStatementResponse_one_of_decls, "f"));
|
|
1568
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
1569
|
+
if ("result" in data && data.result != undefined) {
|
|
1570
|
+
this.result = data.result;
|
|
1571
|
+
}
|
|
1572
|
+
if ("startDate" in data && data.startDate != undefined) {
|
|
1573
|
+
this.startDate = data.startDate;
|
|
1574
|
+
}
|
|
1575
|
+
if ("endDate" in data && data.endDate != undefined) {
|
|
1576
|
+
this.endDate = data.endDate;
|
|
1577
|
+
}
|
|
1578
|
+
if ("openingBalance" in data && data.openingBalance != undefined) {
|
|
1579
|
+
this.openingBalance = data.openingBalance;
|
|
1580
|
+
}
|
|
1581
|
+
if ("closingBalance" in data && data.closingBalance != undefined) {
|
|
1582
|
+
this.closingBalance = data.closingBalance;
|
|
1583
|
+
}
|
|
1584
|
+
if ("totalCredits" in data && data.totalCredits != undefined) {
|
|
1585
|
+
this.totalCredits = data.totalCredits;
|
|
1586
|
+
}
|
|
1587
|
+
if ("totalDebits" in data && data.totalDebits != undefined) {
|
|
1588
|
+
this.totalDebits = data.totalDebits;
|
|
1589
|
+
}
|
|
1590
|
+
if ("transactions" in data && data.transactions != undefined) {
|
|
1591
|
+
this.transactions = data.transactions;
|
|
1592
|
+
}
|
|
1593
|
+
if ("documentData" in data && data.documentData != undefined) {
|
|
1594
|
+
this.documentData = data.documentData;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
get result() {
|
|
1599
|
+
return pb_1.Message.getWrapperField(this, dependency_1.ResultStatus, 1);
|
|
1600
|
+
}
|
|
1601
|
+
set result(value) {
|
|
1602
|
+
pb_1.Message.setWrapperField(this, 1, value);
|
|
1603
|
+
}
|
|
1604
|
+
get hasResult() {
|
|
1605
|
+
return pb_1.Message.getField(this, 1) != null;
|
|
1606
|
+
}
|
|
1607
|
+
get startDate() {
|
|
1608
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "");
|
|
1609
|
+
}
|
|
1610
|
+
set startDate(value) {
|
|
1611
|
+
pb_1.Message.setField(this, 2, value);
|
|
1612
|
+
}
|
|
1613
|
+
get endDate() {
|
|
1614
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "");
|
|
1615
|
+
}
|
|
1616
|
+
set endDate(value) {
|
|
1617
|
+
pb_1.Message.setField(this, 3, value);
|
|
1618
|
+
}
|
|
1619
|
+
get openingBalance() {
|
|
1620
|
+
return pb_1.Message.getFieldWithDefault(this, 4, 0);
|
|
1621
|
+
}
|
|
1622
|
+
set openingBalance(value) {
|
|
1623
|
+
pb_1.Message.setField(this, 4, value);
|
|
1624
|
+
}
|
|
1625
|
+
get closingBalance() {
|
|
1626
|
+
return pb_1.Message.getFieldWithDefault(this, 5, 0);
|
|
1627
|
+
}
|
|
1628
|
+
set closingBalance(value) {
|
|
1629
|
+
pb_1.Message.setField(this, 5, value);
|
|
1630
|
+
}
|
|
1631
|
+
get totalCredits() {
|
|
1632
|
+
return pb_1.Message.getFieldWithDefault(this, 6, 0);
|
|
1633
|
+
}
|
|
1634
|
+
set totalCredits(value) {
|
|
1635
|
+
pb_1.Message.setField(this, 6, value);
|
|
1636
|
+
}
|
|
1637
|
+
get totalDebits() {
|
|
1638
|
+
return pb_1.Message.getFieldWithDefault(this, 7, 0);
|
|
1639
|
+
}
|
|
1640
|
+
set totalDebits(value) {
|
|
1641
|
+
pb_1.Message.setField(this, 7, value);
|
|
1642
|
+
}
|
|
1643
|
+
get transactions() {
|
|
1644
|
+
return pb_1.Message.getRepeatedWrapperField(this, Transaction, 8);
|
|
1645
|
+
}
|
|
1646
|
+
set transactions(value) {
|
|
1647
|
+
pb_1.Message.setRepeatedWrapperField(this, 8, value);
|
|
1648
|
+
}
|
|
1649
|
+
get documentData() {
|
|
1650
|
+
return pb_1.Message.getFieldWithDefault(this, 9, new Uint8Array(0));
|
|
1651
|
+
}
|
|
1652
|
+
set documentData(value) {
|
|
1653
|
+
pb_1.Message.setOneofField(this, 9, __classPrivateFieldGet(this, _GetStatementResponse_one_of_decls, "f")[0], value);
|
|
1654
|
+
}
|
|
1655
|
+
get hasDocumentData() {
|
|
1656
|
+
return pb_1.Message.getField(this, 9) != null;
|
|
1657
|
+
}
|
|
1658
|
+
get _documentData() {
|
|
1659
|
+
const cases = {
|
|
1660
|
+
0: "none",
|
|
1661
|
+
9: "documentData"
|
|
1662
|
+
};
|
|
1663
|
+
return cases[pb_1.Message.computeOneofCase(this, [9])];
|
|
1664
|
+
}
|
|
1665
|
+
static fromObject(data) {
|
|
1666
|
+
const message = new GetStatementResponse({});
|
|
1667
|
+
if (data.result != null) {
|
|
1668
|
+
message.result = dependency_1.ResultStatus.fromObject(data.result);
|
|
1669
|
+
}
|
|
1670
|
+
if (data.startDate != null) {
|
|
1671
|
+
message.startDate = data.startDate;
|
|
1672
|
+
}
|
|
1673
|
+
if (data.endDate != null) {
|
|
1674
|
+
message.endDate = data.endDate;
|
|
1675
|
+
}
|
|
1676
|
+
if (data.openingBalance != null) {
|
|
1677
|
+
message.openingBalance = data.openingBalance;
|
|
1678
|
+
}
|
|
1679
|
+
if (data.closingBalance != null) {
|
|
1680
|
+
message.closingBalance = data.closingBalance;
|
|
1681
|
+
}
|
|
1682
|
+
if (data.totalCredits != null) {
|
|
1683
|
+
message.totalCredits = data.totalCredits;
|
|
1684
|
+
}
|
|
1685
|
+
if (data.totalDebits != null) {
|
|
1686
|
+
message.totalDebits = data.totalDebits;
|
|
1687
|
+
}
|
|
1688
|
+
if (data.transactions != null) {
|
|
1689
|
+
message.transactions = data.transactions.map(item => Transaction.fromObject(item));
|
|
1690
|
+
}
|
|
1691
|
+
if (data.documentData != null) {
|
|
1692
|
+
message.documentData = data.documentData;
|
|
1693
|
+
}
|
|
1694
|
+
return message;
|
|
1695
|
+
}
|
|
1696
|
+
toObject() {
|
|
1697
|
+
const data = {};
|
|
1698
|
+
if (this.result != null) {
|
|
1699
|
+
data.result = this.result.toObject();
|
|
1700
|
+
}
|
|
1701
|
+
if (this.startDate != null) {
|
|
1702
|
+
data.startDate = this.startDate;
|
|
1703
|
+
}
|
|
1704
|
+
if (this.endDate != null) {
|
|
1705
|
+
data.endDate = this.endDate;
|
|
1706
|
+
}
|
|
1707
|
+
if (this.openingBalance != null) {
|
|
1708
|
+
data.openingBalance = this.openingBalance;
|
|
1709
|
+
}
|
|
1710
|
+
if (this.closingBalance != null) {
|
|
1711
|
+
data.closingBalance = this.closingBalance;
|
|
1712
|
+
}
|
|
1713
|
+
if (this.totalCredits != null) {
|
|
1714
|
+
data.totalCredits = this.totalCredits;
|
|
1715
|
+
}
|
|
1716
|
+
if (this.totalDebits != null) {
|
|
1717
|
+
data.totalDebits = this.totalDebits;
|
|
1718
|
+
}
|
|
1719
|
+
if (this.transactions != null) {
|
|
1720
|
+
data.transactions = this.transactions.map((item) => item.toObject());
|
|
1721
|
+
}
|
|
1722
|
+
if (this.documentData != null) {
|
|
1723
|
+
data.documentData = this.documentData;
|
|
1724
|
+
}
|
|
1725
|
+
return data;
|
|
1726
|
+
}
|
|
1727
|
+
serialize(w) {
|
|
1728
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1729
|
+
if (this.hasResult)
|
|
1730
|
+
writer.writeMessage(1, this.result, () => this.result.serialize(writer));
|
|
1731
|
+
if (this.startDate.length)
|
|
1732
|
+
writer.writeString(2, this.startDate);
|
|
1733
|
+
if (this.endDate.length)
|
|
1734
|
+
writer.writeString(3, this.endDate);
|
|
1735
|
+
if (this.openingBalance != 0)
|
|
1736
|
+
writer.writeDouble(4, this.openingBalance);
|
|
1737
|
+
if (this.closingBalance != 0)
|
|
1738
|
+
writer.writeDouble(5, this.closingBalance);
|
|
1739
|
+
if (this.totalCredits != 0)
|
|
1740
|
+
writer.writeDouble(6, this.totalCredits);
|
|
1741
|
+
if (this.totalDebits != 0)
|
|
1742
|
+
writer.writeDouble(7, this.totalDebits);
|
|
1743
|
+
if (this.transactions.length)
|
|
1744
|
+
writer.writeRepeatedMessage(8, this.transactions, (item) => item.serialize(writer));
|
|
1745
|
+
if (this.hasDocumentData)
|
|
1746
|
+
writer.writeBytes(9, this.documentData);
|
|
1747
|
+
if (!w)
|
|
1748
|
+
return writer.getResultBuffer();
|
|
1749
|
+
}
|
|
1750
|
+
static deserialize(bytes) {
|
|
1751
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetStatementResponse();
|
|
1752
|
+
while (reader.nextField()) {
|
|
1753
|
+
if (reader.isEndGroup())
|
|
1754
|
+
break;
|
|
1755
|
+
switch (reader.getFieldNumber()) {
|
|
1756
|
+
case 1:
|
|
1757
|
+
reader.readMessage(message.result, () => message.result = dependency_1.ResultStatus.deserialize(reader));
|
|
1758
|
+
break;
|
|
1759
|
+
case 2:
|
|
1760
|
+
message.startDate = reader.readString();
|
|
1761
|
+
break;
|
|
1762
|
+
case 3:
|
|
1763
|
+
message.endDate = reader.readString();
|
|
1764
|
+
break;
|
|
1765
|
+
case 4:
|
|
1766
|
+
message.openingBalance = reader.readDouble();
|
|
1767
|
+
break;
|
|
1768
|
+
case 5:
|
|
1769
|
+
message.closingBalance = reader.readDouble();
|
|
1770
|
+
break;
|
|
1771
|
+
case 6:
|
|
1772
|
+
message.totalCredits = reader.readDouble();
|
|
1773
|
+
break;
|
|
1774
|
+
case 7:
|
|
1775
|
+
message.totalDebits = reader.readDouble();
|
|
1776
|
+
break;
|
|
1777
|
+
case 8:
|
|
1778
|
+
reader.readMessage(message.transactions, () => pb_1.Message.addToRepeatedWrapperField(message, 8, Transaction.deserialize(reader), Transaction));
|
|
1779
|
+
break;
|
|
1780
|
+
case 9:
|
|
1781
|
+
message.documentData = reader.readBytes();
|
|
1782
|
+
break;
|
|
1783
|
+
default: reader.skipField();
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
return message;
|
|
1787
|
+
}
|
|
1788
|
+
serializeBinary() {
|
|
1789
|
+
return this.serialize();
|
|
1790
|
+
}
|
|
1791
|
+
static deserializeBinary(bytes) {
|
|
1792
|
+
return GetStatementResponse.deserialize(bytes);
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
exports.GetStatementResponse = GetStatementResponse;
|
|
1796
|
+
_GetStatementResponse_one_of_decls = new WeakMap();
|
|
1797
|
+
class UnimplementedTripLinkAccountServiceService {
|
|
1798
|
+
}
|
|
1799
|
+
exports.UnimplementedTripLinkAccountServiceService = UnimplementedTripLinkAccountServiceService;
|
|
1800
|
+
UnimplementedTripLinkAccountServiceService.definition = {
|
|
1801
|
+
echo: {
|
|
1802
|
+
path: "/com_tl_models_account.TripLinkAccountService/echo",
|
|
1803
|
+
requestStream: false,
|
|
1804
|
+
responseStream: false,
|
|
1805
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
1806
|
+
requestDeserialize: (bytes) => dependency_1.EchoRequest.deserialize(new Uint8Array(bytes)),
|
|
1807
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
1808
|
+
responseDeserialize: (bytes) => dependency_1.EchoResponse.deserialize(new Uint8Array(bytes))
|
|
1809
|
+
},
|
|
1810
|
+
getBalance: {
|
|
1811
|
+
path: "/com_tl_models_account.TripLinkAccountService/getBalance",
|
|
1812
|
+
requestStream: false,
|
|
1813
|
+
responseStream: false,
|
|
1814
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
1815
|
+
requestDeserialize: (bytes) => GetBalanceRequest.deserialize(new Uint8Array(bytes)),
|
|
1816
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
1817
|
+
responseDeserialize: (bytes) => GetBalanceResponse.deserialize(new Uint8Array(bytes))
|
|
1818
|
+
},
|
|
1819
|
+
getTransactionHistory: {
|
|
1820
|
+
path: "/com_tl_models_account.TripLinkAccountService/getTransactionHistory",
|
|
1821
|
+
requestStream: false,
|
|
1822
|
+
responseStream: false,
|
|
1823
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
1824
|
+
requestDeserialize: (bytes) => GetTransactionHistoryRequest.deserialize(new Uint8Array(bytes)),
|
|
1825
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
1826
|
+
responseDeserialize: (bytes) => GetTransactionHistoryResponse.deserialize(new Uint8Array(bytes))
|
|
1827
|
+
},
|
|
1828
|
+
addBalance: {
|
|
1829
|
+
path: "/com_tl_models_account.TripLinkAccountService/addBalance",
|
|
1830
|
+
requestStream: false,
|
|
1831
|
+
responseStream: false,
|
|
1832
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
1833
|
+
requestDeserialize: (bytes) => AddBalanceRequest.deserialize(new Uint8Array(bytes)),
|
|
1834
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
1835
|
+
responseDeserialize: (bytes) => AddBalanceResponse.deserialize(new Uint8Array(bytes))
|
|
1836
|
+
},
|
|
1837
|
+
deductBalance: {
|
|
1838
|
+
path: "/com_tl_models_account.TripLinkAccountService/deductBalance",
|
|
1839
|
+
requestStream: false,
|
|
1840
|
+
responseStream: false,
|
|
1841
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
1842
|
+
requestDeserialize: (bytes) => DeductBalanceRequest.deserialize(new Uint8Array(bytes)),
|
|
1843
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
1844
|
+
responseDeserialize: (bytes) => DeductBalanceResponse.deserialize(new Uint8Array(bytes))
|
|
1845
|
+
},
|
|
1846
|
+
getStatement: {
|
|
1847
|
+
path: "/com_tl_models_account.TripLinkAccountService/getStatement",
|
|
1848
|
+
requestStream: false,
|
|
1849
|
+
responseStream: false,
|
|
1850
|
+
requestSerialize: (message) => Buffer.from(message.serialize()),
|
|
1851
|
+
requestDeserialize: (bytes) => GetStatementRequest.deserialize(new Uint8Array(bytes)),
|
|
1852
|
+
responseSerialize: (message) => Buffer.from(message.serialize()),
|
|
1853
|
+
responseDeserialize: (bytes) => GetStatementResponse.deserialize(new Uint8Array(bytes))
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1856
|
+
class TripLinkAccountServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedTripLinkAccountServiceService.definition, "TripLinkAccountService", {}) {
|
|
1857
|
+
constructor(address, credentials, options) {
|
|
1858
|
+
super(address, credentials, options);
|
|
1859
|
+
this.echo = (message, metadata, options) => {
|
|
1860
|
+
if (!metadata) {
|
|
1861
|
+
metadata = new grpc_1.Metadata;
|
|
1862
|
+
}
|
|
1863
|
+
if (!options) {
|
|
1864
|
+
options = {};
|
|
1865
|
+
}
|
|
1866
|
+
return new Promise((resolve, reject) => super.echo(message, metadata, options, (error, response) => {
|
|
1867
|
+
if (error) {
|
|
1868
|
+
reject(error);
|
|
1869
|
+
}
|
|
1870
|
+
else {
|
|
1871
|
+
resolve(response);
|
|
1872
|
+
}
|
|
1873
|
+
}));
|
|
1874
|
+
};
|
|
1875
|
+
this.getBalance = (message, metadata, options) => {
|
|
1876
|
+
if (!metadata) {
|
|
1877
|
+
metadata = new grpc_1.Metadata;
|
|
1878
|
+
}
|
|
1879
|
+
if (!options) {
|
|
1880
|
+
options = {};
|
|
1881
|
+
}
|
|
1882
|
+
return new Promise((resolve, reject) => super.getBalance(message, metadata, options, (error, response) => {
|
|
1883
|
+
if (error) {
|
|
1884
|
+
reject(error);
|
|
1885
|
+
}
|
|
1886
|
+
else {
|
|
1887
|
+
resolve(response);
|
|
1888
|
+
}
|
|
1889
|
+
}));
|
|
1890
|
+
};
|
|
1891
|
+
this.getTransactionHistory = (message, metadata, options) => {
|
|
1892
|
+
if (!metadata) {
|
|
1893
|
+
metadata = new grpc_1.Metadata;
|
|
1894
|
+
}
|
|
1895
|
+
if (!options) {
|
|
1896
|
+
options = {};
|
|
1897
|
+
}
|
|
1898
|
+
return new Promise((resolve, reject) => super.getTransactionHistory(message, metadata, options, (error, response) => {
|
|
1899
|
+
if (error) {
|
|
1900
|
+
reject(error);
|
|
1901
|
+
}
|
|
1902
|
+
else {
|
|
1903
|
+
resolve(response);
|
|
1904
|
+
}
|
|
1905
|
+
}));
|
|
1906
|
+
};
|
|
1907
|
+
this.addBalance = (message, metadata, options) => {
|
|
1908
|
+
if (!metadata) {
|
|
1909
|
+
metadata = new grpc_1.Metadata;
|
|
1910
|
+
}
|
|
1911
|
+
if (!options) {
|
|
1912
|
+
options = {};
|
|
1913
|
+
}
|
|
1914
|
+
return new Promise((resolve, reject) => super.addBalance(message, metadata, options, (error, response) => {
|
|
1915
|
+
if (error) {
|
|
1916
|
+
reject(error);
|
|
1917
|
+
}
|
|
1918
|
+
else {
|
|
1919
|
+
resolve(response);
|
|
1920
|
+
}
|
|
1921
|
+
}));
|
|
1922
|
+
};
|
|
1923
|
+
this.deductBalance = (message, metadata, options) => {
|
|
1924
|
+
if (!metadata) {
|
|
1925
|
+
metadata = new grpc_1.Metadata;
|
|
1926
|
+
}
|
|
1927
|
+
if (!options) {
|
|
1928
|
+
options = {};
|
|
1929
|
+
}
|
|
1930
|
+
return new Promise((resolve, reject) => super.deductBalance(message, metadata, options, (error, response) => {
|
|
1931
|
+
if (error) {
|
|
1932
|
+
reject(error);
|
|
1933
|
+
}
|
|
1934
|
+
else {
|
|
1935
|
+
resolve(response);
|
|
1936
|
+
}
|
|
1937
|
+
}));
|
|
1938
|
+
};
|
|
1939
|
+
this.getStatement = (message, metadata, options) => {
|
|
1940
|
+
if (!metadata) {
|
|
1941
|
+
metadata = new grpc_1.Metadata;
|
|
1942
|
+
}
|
|
1943
|
+
if (!options) {
|
|
1944
|
+
options = {};
|
|
1945
|
+
}
|
|
1946
|
+
return new Promise((resolve, reject) => super.getStatement(message, metadata, options, (error, response) => {
|
|
1947
|
+
if (error) {
|
|
1948
|
+
reject(error);
|
|
1949
|
+
}
|
|
1950
|
+
else {
|
|
1951
|
+
resolve(response);
|
|
1952
|
+
}
|
|
1953
|
+
}));
|
|
1954
|
+
};
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
exports.TripLinkAccountServiceClient = TripLinkAccountServiceClient;
|
|
1958
|
+
//# sourceMappingURL=account.js.map
|