@sniipwebmaster/payment-methods-client-grpcweb 0.1.1

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.
@@ -0,0 +1,1437 @@
1
+ /**
2
+ * @fileoverview
3
+ * @enhanceable
4
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
5
+ * field starts with 'MSG_' and isn't a translatable message.
6
+ * @public
7
+ */
8
+ // GENERATED CODE -- DO NOT EDIT!
9
+
10
+ var jspb = require('google-protobuf');
11
+ var goog = jspb;
12
+ var global = Function('return this')();
13
+
14
+ var google_api_annotations_pb = require('./google/api/annotations_pb.js');
15
+ var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
16
+ goog.exportSymbol('proto.sniippaymentgatewayapi.AddPaymentGatewayRequest', null, global);
17
+ goog.exportSymbol('proto.sniippaymentgatewayapi.GetPaymentGatewayRequest', null, global);
18
+ goog.exportSymbol('proto.sniippaymentgatewayapi.GetPaymentGatewayResponse', null, global);
19
+ goog.exportSymbol('proto.sniippaymentgatewayapi.PaymentMethod', null, global);
20
+ goog.exportSymbol('proto.sniippaymentgatewayapi.PaymentMethodsResponse', null, global);
21
+ goog.exportSymbol('proto.sniippaymentgatewayapi.ResponseCode', null, global);
22
+
23
+ /**
24
+ * Generated by JsPbCodeGenerator.
25
+ * @param {Array=} opt_data Optional initial data array, typically from a
26
+ * server response, or constructed directly in Javascript. The array is used
27
+ * in place and becomes part of the constructed object. It is not cloned.
28
+ * If no data is provided, the constructed object will be empty, but still
29
+ * valid.
30
+ * @extends {jspb.Message}
31
+ * @constructor
32
+ */
33
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest = function(opt_data) {
34
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.repeatedFields_, null);
35
+ };
36
+ goog.inherits(proto.sniippaymentgatewayapi.AddPaymentGatewayRequest, jspb.Message);
37
+ if (goog.DEBUG && !COMPILED) {
38
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.displayName = 'proto.sniippaymentgatewayapi.AddPaymentGatewayRequest';
39
+ }
40
+ /**
41
+ * List of repeated fields within this message type.
42
+ * @private {!Array<number>}
43
+ * @const
44
+ */
45
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.repeatedFields_ = [1];
46
+
47
+
48
+
49
+ if (jspb.Message.GENERATE_TO_OBJECT) {
50
+ /**
51
+ * Creates an object representation of this proto suitable for use in Soy templates.
52
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
53
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
54
+ * For the list of reserved names please see:
55
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
56
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
57
+ * for transitional soy proto support: http://goto/soy-param-migration
58
+ * @return {!Object}
59
+ */
60
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.toObject = function(opt_includeInstance) {
61
+ return proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.toObject(opt_includeInstance, this);
62
+ };
63
+
64
+
65
+ /**
66
+ * Static version of the {@see toObject} method.
67
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
68
+ * instance for transitional soy proto support:
69
+ * http://goto/soy-param-migration
70
+ * @param {!proto.sniippaymentgatewayapi.AddPaymentGatewayRequest} msg The msg instance to transform.
71
+ * @return {!Object}
72
+ * @suppress {unusedLocalVariables} f is only used for nested messages
73
+ */
74
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.toObject = function(includeInstance, msg) {
75
+ var f, obj = {
76
+ acceptedpaymentmethodsList: jspb.Message.getRepeatedField(msg, 1),
77
+ accesstoken: jspb.Message.getFieldWithDefault(msg, 2, ""),
78
+ billerid: jspb.Message.getFieldWithDefault(msg, 3, 0),
79
+ currency: jspb.Message.getFieldWithDefault(msg, 4, ""),
80
+ isdefault: jspb.Message.getFieldWithDefault(msg, 5, false),
81
+ merchantid: jspb.Message.getFieldWithDefault(msg, 6, ""),
82
+ name: jspb.Message.getFieldWithDefault(msg, 7, ""),
83
+ type: jspb.Message.getFieldWithDefault(msg, 8, "")
84
+ };
85
+
86
+ if (includeInstance) {
87
+ obj.$jspbMessageInstance = msg;
88
+ }
89
+ return obj;
90
+ };
91
+ }
92
+
93
+
94
+ /**
95
+ * Deserializes binary data (in protobuf wire format).
96
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
97
+ * @return {!proto.sniippaymentgatewayapi.AddPaymentGatewayRequest}
98
+ */
99
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.deserializeBinary = function(bytes) {
100
+ var reader = new jspb.BinaryReader(bytes);
101
+ var msg = new proto.sniippaymentgatewayapi.AddPaymentGatewayRequest;
102
+ return proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.deserializeBinaryFromReader(msg, reader);
103
+ };
104
+
105
+
106
+ /**
107
+ * Deserializes binary data (in protobuf wire format) from the
108
+ * given reader into the given message object.
109
+ * @param {!proto.sniippaymentgatewayapi.AddPaymentGatewayRequest} msg The message object to deserialize into.
110
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
111
+ * @return {!proto.sniippaymentgatewayapi.AddPaymentGatewayRequest}
112
+ */
113
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.deserializeBinaryFromReader = function(msg, reader) {
114
+ while (reader.nextField()) {
115
+ if (reader.isEndGroup()) {
116
+ break;
117
+ }
118
+ var field = reader.getFieldNumber();
119
+ switch (field) {
120
+ case 1:
121
+ var value = /** @type {string} */ (reader.readString());
122
+ msg.addAcceptedpaymentmethods(value);
123
+ break;
124
+ case 2:
125
+ var value = /** @type {string} */ (reader.readString());
126
+ msg.setAccesstoken(value);
127
+ break;
128
+ case 3:
129
+ var value = /** @type {number} */ (reader.readInt64());
130
+ msg.setBillerid(value);
131
+ break;
132
+ case 4:
133
+ var value = /** @type {string} */ (reader.readString());
134
+ msg.setCurrency(value);
135
+ break;
136
+ case 5:
137
+ var value = /** @type {boolean} */ (reader.readBool());
138
+ msg.setIsdefault(value);
139
+ break;
140
+ case 6:
141
+ var value = /** @type {string} */ (reader.readString());
142
+ msg.setMerchantid(value);
143
+ break;
144
+ case 7:
145
+ var value = /** @type {string} */ (reader.readString());
146
+ msg.setName(value);
147
+ break;
148
+ case 8:
149
+ var value = /** @type {string} */ (reader.readString());
150
+ msg.setType(value);
151
+ break;
152
+ default:
153
+ reader.skipField();
154
+ break;
155
+ }
156
+ }
157
+ return msg;
158
+ };
159
+
160
+
161
+ /**
162
+ * Serializes the message to binary data (in protobuf wire format).
163
+ * @return {!Uint8Array}
164
+ */
165
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.serializeBinary = function() {
166
+ var writer = new jspb.BinaryWriter();
167
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.serializeBinaryToWriter(this, writer);
168
+ return writer.getResultBuffer();
169
+ };
170
+
171
+
172
+ /**
173
+ * Serializes the given message to binary data (in protobuf wire
174
+ * format), writing to the given BinaryWriter.
175
+ * @param {!proto.sniippaymentgatewayapi.AddPaymentGatewayRequest} message
176
+ * @param {!jspb.BinaryWriter} writer
177
+ * @suppress {unusedLocalVariables} f is only used for nested messages
178
+ */
179
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.serializeBinaryToWriter = function(message, writer) {
180
+ var f = undefined;
181
+ f = message.getAcceptedpaymentmethodsList();
182
+ if (f.length > 0) {
183
+ writer.writeRepeatedString(
184
+ 1,
185
+ f
186
+ );
187
+ }
188
+ f = message.getAccesstoken();
189
+ if (f.length > 0) {
190
+ writer.writeString(
191
+ 2,
192
+ f
193
+ );
194
+ }
195
+ f = message.getBillerid();
196
+ if (f !== 0) {
197
+ writer.writeInt64(
198
+ 3,
199
+ f
200
+ );
201
+ }
202
+ f = message.getCurrency();
203
+ if (f.length > 0) {
204
+ writer.writeString(
205
+ 4,
206
+ f
207
+ );
208
+ }
209
+ f = message.getIsdefault();
210
+ if (f) {
211
+ writer.writeBool(
212
+ 5,
213
+ f
214
+ );
215
+ }
216
+ f = message.getMerchantid();
217
+ if (f.length > 0) {
218
+ writer.writeString(
219
+ 6,
220
+ f
221
+ );
222
+ }
223
+ f = message.getName();
224
+ if (f.length > 0) {
225
+ writer.writeString(
226
+ 7,
227
+ f
228
+ );
229
+ }
230
+ f = message.getType();
231
+ if (f.length > 0) {
232
+ writer.writeString(
233
+ 8,
234
+ f
235
+ );
236
+ }
237
+ };
238
+
239
+
240
+ /**
241
+ * repeated string acceptedPaymentMethods = 1;
242
+ * @return {!Array<string>}
243
+ */
244
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.getAcceptedpaymentmethodsList = function() {
245
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
246
+ };
247
+
248
+
249
+ /** @param {!Array<string>} value */
250
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.setAcceptedpaymentmethodsList = function(value) {
251
+ jspb.Message.setField(this, 1, value || []);
252
+ };
253
+
254
+
255
+ /**
256
+ * @param {!string} value
257
+ * @param {number=} opt_index
258
+ */
259
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.addAcceptedpaymentmethods = function(value, opt_index) {
260
+ jspb.Message.addToRepeatedField(this, 1, value, opt_index);
261
+ };
262
+
263
+
264
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.clearAcceptedpaymentmethodsList = function() {
265
+ this.setAcceptedpaymentmethodsList([]);
266
+ };
267
+
268
+
269
+ /**
270
+ * optional string accessToken = 2;
271
+ * @return {string}
272
+ */
273
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.getAccesstoken = function() {
274
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
275
+ };
276
+
277
+
278
+ /** @param {string} value */
279
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.setAccesstoken = function(value) {
280
+ jspb.Message.setProto3StringField(this, 2, value);
281
+ };
282
+
283
+
284
+ /**
285
+ * optional int64 billerId = 3;
286
+ * @return {number}
287
+ */
288
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.getBillerid = function() {
289
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
290
+ };
291
+
292
+
293
+ /** @param {number} value */
294
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.setBillerid = function(value) {
295
+ jspb.Message.setProto3IntField(this, 3, value);
296
+ };
297
+
298
+
299
+ /**
300
+ * optional string currency = 4;
301
+ * @return {string}
302
+ */
303
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.getCurrency = function() {
304
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
305
+ };
306
+
307
+
308
+ /** @param {string} value */
309
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.setCurrency = function(value) {
310
+ jspb.Message.setProto3StringField(this, 4, value);
311
+ };
312
+
313
+
314
+ /**
315
+ * optional bool isDefault = 5;
316
+ * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
317
+ * You should avoid comparisons like {@code val === true/false} in those cases.
318
+ * @return {boolean}
319
+ */
320
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.getIsdefault = function() {
321
+ return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false));
322
+ };
323
+
324
+
325
+ /** @param {boolean} value */
326
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.setIsdefault = function(value) {
327
+ jspb.Message.setProto3BooleanField(this, 5, value);
328
+ };
329
+
330
+
331
+ /**
332
+ * optional string merchantId = 6;
333
+ * @return {string}
334
+ */
335
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.getMerchantid = function() {
336
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
337
+ };
338
+
339
+
340
+ /** @param {string} value */
341
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.setMerchantid = function(value) {
342
+ jspb.Message.setProto3StringField(this, 6, value);
343
+ };
344
+
345
+
346
+ /**
347
+ * optional string name = 7;
348
+ * @return {string}
349
+ */
350
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.getName = function() {
351
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
352
+ };
353
+
354
+
355
+ /** @param {string} value */
356
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.setName = function(value) {
357
+ jspb.Message.setProto3StringField(this, 7, value);
358
+ };
359
+
360
+
361
+ /**
362
+ * optional string type = 8;
363
+ * @return {string}
364
+ */
365
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.getType = function() {
366
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
367
+ };
368
+
369
+
370
+ /** @param {string} value */
371
+ proto.sniippaymentgatewayapi.AddPaymentGatewayRequest.prototype.setType = function(value) {
372
+ jspb.Message.setProto3StringField(this, 8, value);
373
+ };
374
+
375
+
376
+
377
+ /**
378
+ * Generated by JsPbCodeGenerator.
379
+ * @param {Array=} opt_data Optional initial data array, typically from a
380
+ * server response, or constructed directly in Javascript. The array is used
381
+ * in place and becomes part of the constructed object. It is not cloned.
382
+ * If no data is provided, the constructed object will be empty, but still
383
+ * valid.
384
+ * @extends {jspb.Message}
385
+ * @constructor
386
+ */
387
+ proto.sniippaymentgatewayapi.GetPaymentGatewayRequest = function(opt_data) {
388
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
389
+ };
390
+ goog.inherits(proto.sniippaymentgatewayapi.GetPaymentGatewayRequest, jspb.Message);
391
+ if (goog.DEBUG && !COMPILED) {
392
+ proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.displayName = 'proto.sniippaymentgatewayapi.GetPaymentGatewayRequest';
393
+ }
394
+
395
+
396
+ if (jspb.Message.GENERATE_TO_OBJECT) {
397
+ /**
398
+ * Creates an object representation of this proto suitable for use in Soy templates.
399
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
400
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
401
+ * For the list of reserved names please see:
402
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
403
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
404
+ * for transitional soy proto support: http://goto/soy-param-migration
405
+ * @return {!Object}
406
+ */
407
+ proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.prototype.toObject = function(opt_includeInstance) {
408
+ return proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.toObject(opt_includeInstance, this);
409
+ };
410
+
411
+
412
+ /**
413
+ * Static version of the {@see toObject} method.
414
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
415
+ * instance for transitional soy proto support:
416
+ * http://goto/soy-param-migration
417
+ * @param {!proto.sniippaymentgatewayapi.GetPaymentGatewayRequest} msg The msg instance to transform.
418
+ * @return {!Object}
419
+ * @suppress {unusedLocalVariables} f is only used for nested messages
420
+ */
421
+ proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.toObject = function(includeInstance, msg) {
422
+ var f, obj = {
423
+ paymentgatewayid: jspb.Message.getFieldWithDefault(msg, 1, 0)
424
+ };
425
+
426
+ if (includeInstance) {
427
+ obj.$jspbMessageInstance = msg;
428
+ }
429
+ return obj;
430
+ };
431
+ }
432
+
433
+
434
+ /**
435
+ * Deserializes binary data (in protobuf wire format).
436
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
437
+ * @return {!proto.sniippaymentgatewayapi.GetPaymentGatewayRequest}
438
+ */
439
+ proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.deserializeBinary = function(bytes) {
440
+ var reader = new jspb.BinaryReader(bytes);
441
+ var msg = new proto.sniippaymentgatewayapi.GetPaymentGatewayRequest;
442
+ return proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.deserializeBinaryFromReader(msg, reader);
443
+ };
444
+
445
+
446
+ /**
447
+ * Deserializes binary data (in protobuf wire format) from the
448
+ * given reader into the given message object.
449
+ * @param {!proto.sniippaymentgatewayapi.GetPaymentGatewayRequest} msg The message object to deserialize into.
450
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
451
+ * @return {!proto.sniippaymentgatewayapi.GetPaymentGatewayRequest}
452
+ */
453
+ proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.deserializeBinaryFromReader = function(msg, reader) {
454
+ while (reader.nextField()) {
455
+ if (reader.isEndGroup()) {
456
+ break;
457
+ }
458
+ var field = reader.getFieldNumber();
459
+ switch (field) {
460
+ case 1:
461
+ var value = /** @type {number} */ (reader.readInt64());
462
+ msg.setPaymentgatewayid(value);
463
+ break;
464
+ default:
465
+ reader.skipField();
466
+ break;
467
+ }
468
+ }
469
+ return msg;
470
+ };
471
+
472
+
473
+ /**
474
+ * Serializes the message to binary data (in protobuf wire format).
475
+ * @return {!Uint8Array}
476
+ */
477
+ proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.prototype.serializeBinary = function() {
478
+ var writer = new jspb.BinaryWriter();
479
+ proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.serializeBinaryToWriter(this, writer);
480
+ return writer.getResultBuffer();
481
+ };
482
+
483
+
484
+ /**
485
+ * Serializes the given message to binary data (in protobuf wire
486
+ * format), writing to the given BinaryWriter.
487
+ * @param {!proto.sniippaymentgatewayapi.GetPaymentGatewayRequest} message
488
+ * @param {!jspb.BinaryWriter} writer
489
+ * @suppress {unusedLocalVariables} f is only used for nested messages
490
+ */
491
+ proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.serializeBinaryToWriter = function(message, writer) {
492
+ var f = undefined;
493
+ f = message.getPaymentgatewayid();
494
+ if (f !== 0) {
495
+ writer.writeInt64(
496
+ 1,
497
+ f
498
+ );
499
+ }
500
+ };
501
+
502
+
503
+ /**
504
+ * optional int64 paymentGatewayId = 1;
505
+ * @return {number}
506
+ */
507
+ proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.prototype.getPaymentgatewayid = function() {
508
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
509
+ };
510
+
511
+
512
+ /** @param {number} value */
513
+ proto.sniippaymentgatewayapi.GetPaymentGatewayRequest.prototype.setPaymentgatewayid = function(value) {
514
+ jspb.Message.setProto3IntField(this, 1, value);
515
+ };
516
+
517
+
518
+
519
+ /**
520
+ * Generated by JsPbCodeGenerator.
521
+ * @param {Array=} opt_data Optional initial data array, typically from a
522
+ * server response, or constructed directly in Javascript. The array is used
523
+ * in place and becomes part of the constructed object. It is not cloned.
524
+ * If no data is provided, the constructed object will be empty, but still
525
+ * valid.
526
+ * @extends {jspb.Message}
527
+ * @constructor
528
+ */
529
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse = function(opt_data) {
530
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.repeatedFields_, null);
531
+ };
532
+ goog.inherits(proto.sniippaymentgatewayapi.GetPaymentGatewayResponse, jspb.Message);
533
+ if (goog.DEBUG && !COMPILED) {
534
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.displayName = 'proto.sniippaymentgatewayapi.GetPaymentGatewayResponse';
535
+ }
536
+ /**
537
+ * List of repeated fields within this message type.
538
+ * @private {!Array<number>}
539
+ * @const
540
+ */
541
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.repeatedFields_ = [1];
542
+
543
+
544
+
545
+ if (jspb.Message.GENERATE_TO_OBJECT) {
546
+ /**
547
+ * Creates an object representation of this proto suitable for use in Soy templates.
548
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
549
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
550
+ * For the list of reserved names please see:
551
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
552
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
553
+ * for transitional soy proto support: http://goto/soy-param-migration
554
+ * @return {!Object}
555
+ */
556
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.toObject = function(opt_includeInstance) {
557
+ return proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.toObject(opt_includeInstance, this);
558
+ };
559
+
560
+
561
+ /**
562
+ * Static version of the {@see toObject} method.
563
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
564
+ * instance for transitional soy proto support:
565
+ * http://goto/soy-param-migration
566
+ * @param {!proto.sniippaymentgatewayapi.GetPaymentGatewayResponse} msg The msg instance to transform.
567
+ * @return {!Object}
568
+ * @suppress {unusedLocalVariables} f is only used for nested messages
569
+ */
570
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.toObject = function(includeInstance, msg) {
571
+ var f, obj = {
572
+ acceptedpaymentmethodsList: jspb.Message.getRepeatedField(msg, 1),
573
+ accesstoken: jspb.Message.getFieldWithDefault(msg, 2, ""),
574
+ currency: jspb.Message.getFieldWithDefault(msg, 3, ""),
575
+ id: jspb.Message.getFieldWithDefault(msg, 4, 0),
576
+ merchantid: jspb.Message.getFieldWithDefault(msg, 5, ""),
577
+ name: jspb.Message.getFieldWithDefault(msg, 6, ""),
578
+ responsecode: (f = msg.getResponsecode()) && proto.sniippaymentgatewayapi.ResponseCode.toObject(includeInstance, f),
579
+ type: jspb.Message.getFieldWithDefault(msg, 8, "")
580
+ };
581
+
582
+ if (includeInstance) {
583
+ obj.$jspbMessageInstance = msg;
584
+ }
585
+ return obj;
586
+ };
587
+ }
588
+
589
+
590
+ /**
591
+ * Deserializes binary data (in protobuf wire format).
592
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
593
+ * @return {!proto.sniippaymentgatewayapi.GetPaymentGatewayResponse}
594
+ */
595
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.deserializeBinary = function(bytes) {
596
+ var reader = new jspb.BinaryReader(bytes);
597
+ var msg = new proto.sniippaymentgatewayapi.GetPaymentGatewayResponse;
598
+ return proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.deserializeBinaryFromReader(msg, reader);
599
+ };
600
+
601
+
602
+ /**
603
+ * Deserializes binary data (in protobuf wire format) from the
604
+ * given reader into the given message object.
605
+ * @param {!proto.sniippaymentgatewayapi.GetPaymentGatewayResponse} msg The message object to deserialize into.
606
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
607
+ * @return {!proto.sniippaymentgatewayapi.GetPaymentGatewayResponse}
608
+ */
609
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.deserializeBinaryFromReader = function(msg, reader) {
610
+ while (reader.nextField()) {
611
+ if (reader.isEndGroup()) {
612
+ break;
613
+ }
614
+ var field = reader.getFieldNumber();
615
+ switch (field) {
616
+ case 1:
617
+ var value = /** @type {string} */ (reader.readString());
618
+ msg.addAcceptedpaymentmethods(value);
619
+ break;
620
+ case 2:
621
+ var value = /** @type {string} */ (reader.readString());
622
+ msg.setAccesstoken(value);
623
+ break;
624
+ case 3:
625
+ var value = /** @type {string} */ (reader.readString());
626
+ msg.setCurrency(value);
627
+ break;
628
+ case 4:
629
+ var value = /** @type {number} */ (reader.readInt64());
630
+ msg.setId(value);
631
+ break;
632
+ case 5:
633
+ var value = /** @type {string} */ (reader.readString());
634
+ msg.setMerchantid(value);
635
+ break;
636
+ case 6:
637
+ var value = /** @type {string} */ (reader.readString());
638
+ msg.setName(value);
639
+ break;
640
+ case 7:
641
+ var value = new proto.sniippaymentgatewayapi.ResponseCode;
642
+ reader.readMessage(value,proto.sniippaymentgatewayapi.ResponseCode.deserializeBinaryFromReader);
643
+ msg.setResponsecode(value);
644
+ break;
645
+ case 8:
646
+ var value = /** @type {string} */ (reader.readString());
647
+ msg.setType(value);
648
+ break;
649
+ default:
650
+ reader.skipField();
651
+ break;
652
+ }
653
+ }
654
+ return msg;
655
+ };
656
+
657
+
658
+ /**
659
+ * Serializes the message to binary data (in protobuf wire format).
660
+ * @return {!Uint8Array}
661
+ */
662
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.serializeBinary = function() {
663
+ var writer = new jspb.BinaryWriter();
664
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.serializeBinaryToWriter(this, writer);
665
+ return writer.getResultBuffer();
666
+ };
667
+
668
+
669
+ /**
670
+ * Serializes the given message to binary data (in protobuf wire
671
+ * format), writing to the given BinaryWriter.
672
+ * @param {!proto.sniippaymentgatewayapi.GetPaymentGatewayResponse} message
673
+ * @param {!jspb.BinaryWriter} writer
674
+ * @suppress {unusedLocalVariables} f is only used for nested messages
675
+ */
676
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.serializeBinaryToWriter = function(message, writer) {
677
+ var f = undefined;
678
+ f = message.getAcceptedpaymentmethodsList();
679
+ if (f.length > 0) {
680
+ writer.writeRepeatedString(
681
+ 1,
682
+ f
683
+ );
684
+ }
685
+ f = message.getAccesstoken();
686
+ if (f.length > 0) {
687
+ writer.writeString(
688
+ 2,
689
+ f
690
+ );
691
+ }
692
+ f = message.getCurrency();
693
+ if (f.length > 0) {
694
+ writer.writeString(
695
+ 3,
696
+ f
697
+ );
698
+ }
699
+ f = message.getId();
700
+ if (f !== 0) {
701
+ writer.writeInt64(
702
+ 4,
703
+ f
704
+ );
705
+ }
706
+ f = message.getMerchantid();
707
+ if (f.length > 0) {
708
+ writer.writeString(
709
+ 5,
710
+ f
711
+ );
712
+ }
713
+ f = message.getName();
714
+ if (f.length > 0) {
715
+ writer.writeString(
716
+ 6,
717
+ f
718
+ );
719
+ }
720
+ f = message.getResponsecode();
721
+ if (f != null) {
722
+ writer.writeMessage(
723
+ 7,
724
+ f,
725
+ proto.sniippaymentgatewayapi.ResponseCode.serializeBinaryToWriter
726
+ );
727
+ }
728
+ f = message.getType();
729
+ if (f.length > 0) {
730
+ writer.writeString(
731
+ 8,
732
+ f
733
+ );
734
+ }
735
+ };
736
+
737
+
738
+ /**
739
+ * repeated string acceptedPaymentMethods = 1;
740
+ * @return {!Array<string>}
741
+ */
742
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.getAcceptedpaymentmethodsList = function() {
743
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
744
+ };
745
+
746
+
747
+ /** @param {!Array<string>} value */
748
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.setAcceptedpaymentmethodsList = function(value) {
749
+ jspb.Message.setField(this, 1, value || []);
750
+ };
751
+
752
+
753
+ /**
754
+ * @param {!string} value
755
+ * @param {number=} opt_index
756
+ */
757
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.addAcceptedpaymentmethods = function(value, opt_index) {
758
+ jspb.Message.addToRepeatedField(this, 1, value, opt_index);
759
+ };
760
+
761
+
762
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.clearAcceptedpaymentmethodsList = function() {
763
+ this.setAcceptedpaymentmethodsList([]);
764
+ };
765
+
766
+
767
+ /**
768
+ * optional string accessToken = 2;
769
+ * @return {string}
770
+ */
771
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.getAccesstoken = function() {
772
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
773
+ };
774
+
775
+
776
+ /** @param {string} value */
777
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.setAccesstoken = function(value) {
778
+ jspb.Message.setProto3StringField(this, 2, value);
779
+ };
780
+
781
+
782
+ /**
783
+ * optional string currency = 3;
784
+ * @return {string}
785
+ */
786
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.getCurrency = function() {
787
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
788
+ };
789
+
790
+
791
+ /** @param {string} value */
792
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.setCurrency = function(value) {
793
+ jspb.Message.setProto3StringField(this, 3, value);
794
+ };
795
+
796
+
797
+ /**
798
+ * optional int64 id = 4;
799
+ * @return {number}
800
+ */
801
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.getId = function() {
802
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
803
+ };
804
+
805
+
806
+ /** @param {number} value */
807
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.setId = function(value) {
808
+ jspb.Message.setProto3IntField(this, 4, value);
809
+ };
810
+
811
+
812
+ /**
813
+ * optional string merchantId = 5;
814
+ * @return {string}
815
+ */
816
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.getMerchantid = function() {
817
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
818
+ };
819
+
820
+
821
+ /** @param {string} value */
822
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.setMerchantid = function(value) {
823
+ jspb.Message.setProto3StringField(this, 5, value);
824
+ };
825
+
826
+
827
+ /**
828
+ * optional string name = 6;
829
+ * @return {string}
830
+ */
831
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.getName = function() {
832
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
833
+ };
834
+
835
+
836
+ /** @param {string} value */
837
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.setName = function(value) {
838
+ jspb.Message.setProto3StringField(this, 6, value);
839
+ };
840
+
841
+
842
+ /**
843
+ * optional ResponseCode responseCode = 7;
844
+ * @return {?proto.sniippaymentgatewayapi.ResponseCode}
845
+ */
846
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.getResponsecode = function() {
847
+ return /** @type{?proto.sniippaymentgatewayapi.ResponseCode} */ (
848
+ jspb.Message.getWrapperField(this, proto.sniippaymentgatewayapi.ResponseCode, 7));
849
+ };
850
+
851
+
852
+ /** @param {?proto.sniippaymentgatewayapi.ResponseCode|undefined} value */
853
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.setResponsecode = function(value) {
854
+ jspb.Message.setWrapperField(this, 7, value);
855
+ };
856
+
857
+
858
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.clearResponsecode = function() {
859
+ this.setResponsecode(undefined);
860
+ };
861
+
862
+
863
+ /**
864
+ * Returns whether this field is set.
865
+ * @return {!boolean}
866
+ */
867
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.hasResponsecode = function() {
868
+ return jspb.Message.getField(this, 7) != null;
869
+ };
870
+
871
+
872
+ /**
873
+ * optional string type = 8;
874
+ * @return {string}
875
+ */
876
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.getType = function() {
877
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
878
+ };
879
+
880
+
881
+ /** @param {string} value */
882
+ proto.sniippaymentgatewayapi.GetPaymentGatewayResponse.prototype.setType = function(value) {
883
+ jspb.Message.setProto3StringField(this, 8, value);
884
+ };
885
+
886
+
887
+
888
+ /**
889
+ * Generated by JsPbCodeGenerator.
890
+ * @param {Array=} opt_data Optional initial data array, typically from a
891
+ * server response, or constructed directly in Javascript. The array is used
892
+ * in place and becomes part of the constructed object. It is not cloned.
893
+ * If no data is provided, the constructed object will be empty, but still
894
+ * valid.
895
+ * @extends {jspb.Message}
896
+ * @constructor
897
+ */
898
+ proto.sniippaymentgatewayapi.PaymentMethod = function(opt_data) {
899
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
900
+ };
901
+ goog.inherits(proto.sniippaymentgatewayapi.PaymentMethod, jspb.Message);
902
+ if (goog.DEBUG && !COMPILED) {
903
+ proto.sniippaymentgatewayapi.PaymentMethod.displayName = 'proto.sniippaymentgatewayapi.PaymentMethod';
904
+ }
905
+
906
+
907
+ if (jspb.Message.GENERATE_TO_OBJECT) {
908
+ /**
909
+ * Creates an object representation of this proto suitable for use in Soy templates.
910
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
911
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
912
+ * For the list of reserved names please see:
913
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
914
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
915
+ * for transitional soy proto support: http://goto/soy-param-migration
916
+ * @return {!Object}
917
+ */
918
+ proto.sniippaymentgatewayapi.PaymentMethod.prototype.toObject = function(opt_includeInstance) {
919
+ return proto.sniippaymentgatewayapi.PaymentMethod.toObject(opt_includeInstance, this);
920
+ };
921
+
922
+
923
+ /**
924
+ * Static version of the {@see toObject} method.
925
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
926
+ * instance for transitional soy proto support:
927
+ * http://goto/soy-param-migration
928
+ * @param {!proto.sniippaymentgatewayapi.PaymentMethod} msg The msg instance to transform.
929
+ * @return {!Object}
930
+ * @suppress {unusedLocalVariables} f is only used for nested messages
931
+ */
932
+ proto.sniippaymentgatewayapi.PaymentMethod.toObject = function(includeInstance, msg) {
933
+ var f, obj = {
934
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
935
+ name: jspb.Message.getFieldWithDefault(msg, 2, "")
936
+ };
937
+
938
+ if (includeInstance) {
939
+ obj.$jspbMessageInstance = msg;
940
+ }
941
+ return obj;
942
+ };
943
+ }
944
+
945
+
946
+ /**
947
+ * Deserializes binary data (in protobuf wire format).
948
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
949
+ * @return {!proto.sniippaymentgatewayapi.PaymentMethod}
950
+ */
951
+ proto.sniippaymentgatewayapi.PaymentMethod.deserializeBinary = function(bytes) {
952
+ var reader = new jspb.BinaryReader(bytes);
953
+ var msg = new proto.sniippaymentgatewayapi.PaymentMethod;
954
+ return proto.sniippaymentgatewayapi.PaymentMethod.deserializeBinaryFromReader(msg, reader);
955
+ };
956
+
957
+
958
+ /**
959
+ * Deserializes binary data (in protobuf wire format) from the
960
+ * given reader into the given message object.
961
+ * @param {!proto.sniippaymentgatewayapi.PaymentMethod} msg The message object to deserialize into.
962
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
963
+ * @return {!proto.sniippaymentgatewayapi.PaymentMethod}
964
+ */
965
+ proto.sniippaymentgatewayapi.PaymentMethod.deserializeBinaryFromReader = function(msg, reader) {
966
+ while (reader.nextField()) {
967
+ if (reader.isEndGroup()) {
968
+ break;
969
+ }
970
+ var field = reader.getFieldNumber();
971
+ switch (field) {
972
+ case 1:
973
+ var value = /** @type {number} */ (reader.readInt64());
974
+ msg.setId(value);
975
+ break;
976
+ case 2:
977
+ var value = /** @type {string} */ (reader.readString());
978
+ msg.setName(value);
979
+ break;
980
+ default:
981
+ reader.skipField();
982
+ break;
983
+ }
984
+ }
985
+ return msg;
986
+ };
987
+
988
+
989
+ /**
990
+ * Serializes the message to binary data (in protobuf wire format).
991
+ * @return {!Uint8Array}
992
+ */
993
+ proto.sniippaymentgatewayapi.PaymentMethod.prototype.serializeBinary = function() {
994
+ var writer = new jspb.BinaryWriter();
995
+ proto.sniippaymentgatewayapi.PaymentMethod.serializeBinaryToWriter(this, writer);
996
+ return writer.getResultBuffer();
997
+ };
998
+
999
+
1000
+ /**
1001
+ * Serializes the given message to binary data (in protobuf wire
1002
+ * format), writing to the given BinaryWriter.
1003
+ * @param {!proto.sniippaymentgatewayapi.PaymentMethod} message
1004
+ * @param {!jspb.BinaryWriter} writer
1005
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1006
+ */
1007
+ proto.sniippaymentgatewayapi.PaymentMethod.serializeBinaryToWriter = function(message, writer) {
1008
+ var f = undefined;
1009
+ f = message.getId();
1010
+ if (f !== 0) {
1011
+ writer.writeInt64(
1012
+ 1,
1013
+ f
1014
+ );
1015
+ }
1016
+ f = message.getName();
1017
+ if (f.length > 0) {
1018
+ writer.writeString(
1019
+ 2,
1020
+ f
1021
+ );
1022
+ }
1023
+ };
1024
+
1025
+
1026
+ /**
1027
+ * optional int64 id = 1;
1028
+ * @return {number}
1029
+ */
1030
+ proto.sniippaymentgatewayapi.PaymentMethod.prototype.getId = function() {
1031
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1032
+ };
1033
+
1034
+
1035
+ /** @param {number} value */
1036
+ proto.sniippaymentgatewayapi.PaymentMethod.prototype.setId = function(value) {
1037
+ jspb.Message.setProto3IntField(this, 1, value);
1038
+ };
1039
+
1040
+
1041
+ /**
1042
+ * optional string name = 2;
1043
+ * @return {string}
1044
+ */
1045
+ proto.sniippaymentgatewayapi.PaymentMethod.prototype.getName = function() {
1046
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1047
+ };
1048
+
1049
+
1050
+ /** @param {string} value */
1051
+ proto.sniippaymentgatewayapi.PaymentMethod.prototype.setName = function(value) {
1052
+ jspb.Message.setProto3StringField(this, 2, value);
1053
+ };
1054
+
1055
+
1056
+
1057
+ /**
1058
+ * Generated by JsPbCodeGenerator.
1059
+ * @param {Array=} opt_data Optional initial data array, typically from a
1060
+ * server response, or constructed directly in Javascript. The array is used
1061
+ * in place and becomes part of the constructed object. It is not cloned.
1062
+ * If no data is provided, the constructed object will be empty, but still
1063
+ * valid.
1064
+ * @extends {jspb.Message}
1065
+ * @constructor
1066
+ */
1067
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse = function(opt_data) {
1068
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.sniippaymentgatewayapi.PaymentMethodsResponse.repeatedFields_, null);
1069
+ };
1070
+ goog.inherits(proto.sniippaymentgatewayapi.PaymentMethodsResponse, jspb.Message);
1071
+ if (goog.DEBUG && !COMPILED) {
1072
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.displayName = 'proto.sniippaymentgatewayapi.PaymentMethodsResponse';
1073
+ }
1074
+ /**
1075
+ * List of repeated fields within this message type.
1076
+ * @private {!Array<number>}
1077
+ * @const
1078
+ */
1079
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.repeatedFields_ = [1];
1080
+
1081
+
1082
+
1083
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1084
+ /**
1085
+ * Creates an object representation of this proto suitable for use in Soy templates.
1086
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1087
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1088
+ * For the list of reserved names please see:
1089
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
1090
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
1091
+ * for transitional soy proto support: http://goto/soy-param-migration
1092
+ * @return {!Object}
1093
+ */
1094
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.prototype.toObject = function(opt_includeInstance) {
1095
+ return proto.sniippaymentgatewayapi.PaymentMethodsResponse.toObject(opt_includeInstance, this);
1096
+ };
1097
+
1098
+
1099
+ /**
1100
+ * Static version of the {@see toObject} method.
1101
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
1102
+ * instance for transitional soy proto support:
1103
+ * http://goto/soy-param-migration
1104
+ * @param {!proto.sniippaymentgatewayapi.PaymentMethodsResponse} msg The msg instance to transform.
1105
+ * @return {!Object}
1106
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1107
+ */
1108
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.toObject = function(includeInstance, msg) {
1109
+ var f, obj = {
1110
+ paymentmethodsList: jspb.Message.toObjectList(msg.getPaymentmethodsList(),
1111
+ proto.sniippaymentgatewayapi.PaymentMethod.toObject, includeInstance),
1112
+ responsecode: (f = msg.getResponsecode()) && proto.sniippaymentgatewayapi.ResponseCode.toObject(includeInstance, f)
1113
+ };
1114
+
1115
+ if (includeInstance) {
1116
+ obj.$jspbMessageInstance = msg;
1117
+ }
1118
+ return obj;
1119
+ };
1120
+ }
1121
+
1122
+
1123
+ /**
1124
+ * Deserializes binary data (in protobuf wire format).
1125
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1126
+ * @return {!proto.sniippaymentgatewayapi.PaymentMethodsResponse}
1127
+ */
1128
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.deserializeBinary = function(bytes) {
1129
+ var reader = new jspb.BinaryReader(bytes);
1130
+ var msg = new proto.sniippaymentgatewayapi.PaymentMethodsResponse;
1131
+ return proto.sniippaymentgatewayapi.PaymentMethodsResponse.deserializeBinaryFromReader(msg, reader);
1132
+ };
1133
+
1134
+
1135
+ /**
1136
+ * Deserializes binary data (in protobuf wire format) from the
1137
+ * given reader into the given message object.
1138
+ * @param {!proto.sniippaymentgatewayapi.PaymentMethodsResponse} msg The message object to deserialize into.
1139
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1140
+ * @return {!proto.sniippaymentgatewayapi.PaymentMethodsResponse}
1141
+ */
1142
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.deserializeBinaryFromReader = function(msg, reader) {
1143
+ while (reader.nextField()) {
1144
+ if (reader.isEndGroup()) {
1145
+ break;
1146
+ }
1147
+ var field = reader.getFieldNumber();
1148
+ switch (field) {
1149
+ case 1:
1150
+ var value = new proto.sniippaymentgatewayapi.PaymentMethod;
1151
+ reader.readMessage(value,proto.sniippaymentgatewayapi.PaymentMethod.deserializeBinaryFromReader);
1152
+ msg.addPaymentmethods(value);
1153
+ break;
1154
+ case 2:
1155
+ var value = new proto.sniippaymentgatewayapi.ResponseCode;
1156
+ reader.readMessage(value,proto.sniippaymentgatewayapi.ResponseCode.deserializeBinaryFromReader);
1157
+ msg.setResponsecode(value);
1158
+ break;
1159
+ default:
1160
+ reader.skipField();
1161
+ break;
1162
+ }
1163
+ }
1164
+ return msg;
1165
+ };
1166
+
1167
+
1168
+ /**
1169
+ * Serializes the message to binary data (in protobuf wire format).
1170
+ * @return {!Uint8Array}
1171
+ */
1172
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.prototype.serializeBinary = function() {
1173
+ var writer = new jspb.BinaryWriter();
1174
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.serializeBinaryToWriter(this, writer);
1175
+ return writer.getResultBuffer();
1176
+ };
1177
+
1178
+
1179
+ /**
1180
+ * Serializes the given message to binary data (in protobuf wire
1181
+ * format), writing to the given BinaryWriter.
1182
+ * @param {!proto.sniippaymentgatewayapi.PaymentMethodsResponse} message
1183
+ * @param {!jspb.BinaryWriter} writer
1184
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1185
+ */
1186
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.serializeBinaryToWriter = function(message, writer) {
1187
+ var f = undefined;
1188
+ f = message.getPaymentmethodsList();
1189
+ if (f.length > 0) {
1190
+ writer.writeRepeatedMessage(
1191
+ 1,
1192
+ f,
1193
+ proto.sniippaymentgatewayapi.PaymentMethod.serializeBinaryToWriter
1194
+ );
1195
+ }
1196
+ f = message.getResponsecode();
1197
+ if (f != null) {
1198
+ writer.writeMessage(
1199
+ 2,
1200
+ f,
1201
+ proto.sniippaymentgatewayapi.ResponseCode.serializeBinaryToWriter
1202
+ );
1203
+ }
1204
+ };
1205
+
1206
+
1207
+ /**
1208
+ * repeated PaymentMethod paymentMethods = 1;
1209
+ * @return {!Array<!proto.sniippaymentgatewayapi.PaymentMethod>}
1210
+ */
1211
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.prototype.getPaymentmethodsList = function() {
1212
+ return /** @type{!Array<!proto.sniippaymentgatewayapi.PaymentMethod>} */ (
1213
+ jspb.Message.getRepeatedWrapperField(this, proto.sniippaymentgatewayapi.PaymentMethod, 1));
1214
+ };
1215
+
1216
+
1217
+ /** @param {!Array<!proto.sniippaymentgatewayapi.PaymentMethod>} value */
1218
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.prototype.setPaymentmethodsList = function(value) {
1219
+ jspb.Message.setRepeatedWrapperField(this, 1, value);
1220
+ };
1221
+
1222
+
1223
+ /**
1224
+ * @param {!proto.sniippaymentgatewayapi.PaymentMethod=} opt_value
1225
+ * @param {number=} opt_index
1226
+ * @return {!proto.sniippaymentgatewayapi.PaymentMethod}
1227
+ */
1228
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.prototype.addPaymentmethods = function(opt_value, opt_index) {
1229
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.sniippaymentgatewayapi.PaymentMethod, opt_index);
1230
+ };
1231
+
1232
+
1233
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.prototype.clearPaymentmethodsList = function() {
1234
+ this.setPaymentmethodsList([]);
1235
+ };
1236
+
1237
+
1238
+ /**
1239
+ * optional ResponseCode responseCode = 2;
1240
+ * @return {?proto.sniippaymentgatewayapi.ResponseCode}
1241
+ */
1242
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.prototype.getResponsecode = function() {
1243
+ return /** @type{?proto.sniippaymentgatewayapi.ResponseCode} */ (
1244
+ jspb.Message.getWrapperField(this, proto.sniippaymentgatewayapi.ResponseCode, 2));
1245
+ };
1246
+
1247
+
1248
+ /** @param {?proto.sniippaymentgatewayapi.ResponseCode|undefined} value */
1249
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.prototype.setResponsecode = function(value) {
1250
+ jspb.Message.setWrapperField(this, 2, value);
1251
+ };
1252
+
1253
+
1254
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.prototype.clearResponsecode = function() {
1255
+ this.setResponsecode(undefined);
1256
+ };
1257
+
1258
+
1259
+ /**
1260
+ * Returns whether this field is set.
1261
+ * @return {!boolean}
1262
+ */
1263
+ proto.sniippaymentgatewayapi.PaymentMethodsResponse.prototype.hasResponsecode = function() {
1264
+ return jspb.Message.getField(this, 2) != null;
1265
+ };
1266
+
1267
+
1268
+
1269
+ /**
1270
+ * Generated by JsPbCodeGenerator.
1271
+ * @param {Array=} opt_data Optional initial data array, typically from a
1272
+ * server response, or constructed directly in Javascript. The array is used
1273
+ * in place and becomes part of the constructed object. It is not cloned.
1274
+ * If no data is provided, the constructed object will be empty, but still
1275
+ * valid.
1276
+ * @extends {jspb.Message}
1277
+ * @constructor
1278
+ */
1279
+ proto.sniippaymentgatewayapi.ResponseCode = function(opt_data) {
1280
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1281
+ };
1282
+ goog.inherits(proto.sniippaymentgatewayapi.ResponseCode, jspb.Message);
1283
+ if (goog.DEBUG && !COMPILED) {
1284
+ proto.sniippaymentgatewayapi.ResponseCode.displayName = 'proto.sniippaymentgatewayapi.ResponseCode';
1285
+ }
1286
+
1287
+
1288
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1289
+ /**
1290
+ * Creates an object representation of this proto suitable for use in Soy templates.
1291
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1292
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1293
+ * For the list of reserved names please see:
1294
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
1295
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
1296
+ * for transitional soy proto support: http://goto/soy-param-migration
1297
+ * @return {!Object}
1298
+ */
1299
+ proto.sniippaymentgatewayapi.ResponseCode.prototype.toObject = function(opt_includeInstance) {
1300
+ return proto.sniippaymentgatewayapi.ResponseCode.toObject(opt_includeInstance, this);
1301
+ };
1302
+
1303
+
1304
+ /**
1305
+ * Static version of the {@see toObject} method.
1306
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
1307
+ * instance for transitional soy proto support:
1308
+ * http://goto/soy-param-migration
1309
+ * @param {!proto.sniippaymentgatewayapi.ResponseCode} msg The msg instance to transform.
1310
+ * @return {!Object}
1311
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1312
+ */
1313
+ proto.sniippaymentgatewayapi.ResponseCode.toObject = function(includeInstance, msg) {
1314
+ var f, obj = {
1315
+ code: jspb.Message.getFieldWithDefault(msg, 1, 0),
1316
+ message: jspb.Message.getFieldWithDefault(msg, 2, "")
1317
+ };
1318
+
1319
+ if (includeInstance) {
1320
+ obj.$jspbMessageInstance = msg;
1321
+ }
1322
+ return obj;
1323
+ };
1324
+ }
1325
+
1326
+
1327
+ /**
1328
+ * Deserializes binary data (in protobuf wire format).
1329
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1330
+ * @return {!proto.sniippaymentgatewayapi.ResponseCode}
1331
+ */
1332
+ proto.sniippaymentgatewayapi.ResponseCode.deserializeBinary = function(bytes) {
1333
+ var reader = new jspb.BinaryReader(bytes);
1334
+ var msg = new proto.sniippaymentgatewayapi.ResponseCode;
1335
+ return proto.sniippaymentgatewayapi.ResponseCode.deserializeBinaryFromReader(msg, reader);
1336
+ };
1337
+
1338
+
1339
+ /**
1340
+ * Deserializes binary data (in protobuf wire format) from the
1341
+ * given reader into the given message object.
1342
+ * @param {!proto.sniippaymentgatewayapi.ResponseCode} msg The message object to deserialize into.
1343
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1344
+ * @return {!proto.sniippaymentgatewayapi.ResponseCode}
1345
+ */
1346
+ proto.sniippaymentgatewayapi.ResponseCode.deserializeBinaryFromReader = function(msg, reader) {
1347
+ while (reader.nextField()) {
1348
+ if (reader.isEndGroup()) {
1349
+ break;
1350
+ }
1351
+ var field = reader.getFieldNumber();
1352
+ switch (field) {
1353
+ case 1:
1354
+ var value = /** @type {number} */ (reader.readInt32());
1355
+ msg.setCode(value);
1356
+ break;
1357
+ case 2:
1358
+ var value = /** @type {string} */ (reader.readString());
1359
+ msg.setMessage(value);
1360
+ break;
1361
+ default:
1362
+ reader.skipField();
1363
+ break;
1364
+ }
1365
+ }
1366
+ return msg;
1367
+ };
1368
+
1369
+
1370
+ /**
1371
+ * Serializes the message to binary data (in protobuf wire format).
1372
+ * @return {!Uint8Array}
1373
+ */
1374
+ proto.sniippaymentgatewayapi.ResponseCode.prototype.serializeBinary = function() {
1375
+ var writer = new jspb.BinaryWriter();
1376
+ proto.sniippaymentgatewayapi.ResponseCode.serializeBinaryToWriter(this, writer);
1377
+ return writer.getResultBuffer();
1378
+ };
1379
+
1380
+
1381
+ /**
1382
+ * Serializes the given message to binary data (in protobuf wire
1383
+ * format), writing to the given BinaryWriter.
1384
+ * @param {!proto.sniippaymentgatewayapi.ResponseCode} message
1385
+ * @param {!jspb.BinaryWriter} writer
1386
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1387
+ */
1388
+ proto.sniippaymentgatewayapi.ResponseCode.serializeBinaryToWriter = function(message, writer) {
1389
+ var f = undefined;
1390
+ f = message.getCode();
1391
+ if (f !== 0) {
1392
+ writer.writeInt32(
1393
+ 1,
1394
+ f
1395
+ );
1396
+ }
1397
+ f = message.getMessage();
1398
+ if (f.length > 0) {
1399
+ writer.writeString(
1400
+ 2,
1401
+ f
1402
+ );
1403
+ }
1404
+ };
1405
+
1406
+
1407
+ /**
1408
+ * optional int32 code = 1;
1409
+ * @return {number}
1410
+ */
1411
+ proto.sniippaymentgatewayapi.ResponseCode.prototype.getCode = function() {
1412
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1413
+ };
1414
+
1415
+
1416
+ /** @param {number} value */
1417
+ proto.sniippaymentgatewayapi.ResponseCode.prototype.setCode = function(value) {
1418
+ jspb.Message.setProto3IntField(this, 1, value);
1419
+ };
1420
+
1421
+
1422
+ /**
1423
+ * optional string message = 2;
1424
+ * @return {string}
1425
+ */
1426
+ proto.sniippaymentgatewayapi.ResponseCode.prototype.getMessage = function() {
1427
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1428
+ };
1429
+
1430
+
1431
+ /** @param {string} value */
1432
+ proto.sniippaymentgatewayapi.ResponseCode.prototype.setMessage = function(value) {
1433
+ jspb.Message.setProto3StringField(this, 2, value);
1434
+ };
1435
+
1436
+
1437
+ goog.object.extend(exports, proto.sniippaymentgatewayapi);