protobuf-platform 1.0.264 → 1.0.265

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.264",
3
+ "version": "1.0.265",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,6 +18,7 @@ service Payment {
18
18
  rpc deleteSingleMethod(GetMethodRequest) returns (PaymentStatusResponse);
19
19
  rpc readListMethods(PaginationRequest) returns (MethodItemsResponse);
20
20
  rpc readListPoorMethods(PoorMethodsRequest) returns (MethodItemsResponse);
21
+ rpc setPaymentMethodConfig(PaymentMethodConfigRequest) returns (PaymentStatusResponse);
21
22
  //Deposit
22
23
  rpc attemptDeposit(AttemptDepositRequest) returns (DepositResponse);
23
24
  rpc changeDepositStatus(GetDepositRequest) returns (DepositResponse);
@@ -126,6 +127,16 @@ message MethodItemsResponse {
126
127
  message PoorMethodsRequest {
127
128
  repeated int32 method_ids = 1;
128
129
  }
130
+ message PaymentMethodConfigRequest {
131
+ int32 method_id = 1;
132
+ optional string geo = 2;
133
+ optional string currency = 3;
134
+ optional int32 is_active = 4;
135
+ optional float min_amount = 5;
136
+ optional float max_amount = 6;
137
+ optional string type = 7;
138
+ optional string config = 8;
139
+ }
129
140
  //Deposit
130
141
  message AttemptDepositRequest {
131
142
  int32 payment_method_id = 1;
@@ -158,6 +158,17 @@ function deserialize_payment_PaginationRequest(buffer_arg) {
158
158
  return payment_pb.PaginationRequest.deserializeBinary(new Uint8Array(buffer_arg));
159
159
  }
160
160
 
161
+ function serialize_payment_PaymentMethodConfigRequest(arg) {
162
+ if (!(arg instanceof payment_pb.PaymentMethodConfigRequest)) {
163
+ throw new Error('Expected argument of type payment.PaymentMethodConfigRequest');
164
+ }
165
+ return Buffer.from(arg.serializeBinary());
166
+ }
167
+
168
+ function deserialize_payment_PaymentMethodConfigRequest(buffer_arg) {
169
+ return payment_pb.PaymentMethodConfigRequest.deserializeBinary(new Uint8Array(buffer_arg));
170
+ }
171
+
161
172
  function serialize_payment_PaymentStatusResponse(arg) {
162
173
  if (!(arg instanceof payment_pb.PaymentStatusResponse)) {
163
174
  throw new Error('Expected argument of type payment.PaymentStatusResponse');
@@ -404,6 +415,17 @@ createSingleMethod: {
404
415
  responseSerialize: serialize_payment_MethodItemsResponse,
405
416
  responseDeserialize: deserialize_payment_MethodItemsResponse,
406
417
  },
418
+ setPaymentMethodConfig: {
419
+ path: '/payment.Payment/setPaymentMethodConfig',
420
+ requestStream: false,
421
+ responseStream: false,
422
+ requestType: payment_pb.PaymentMethodConfigRequest,
423
+ responseType: payment_pb.PaymentStatusResponse,
424
+ requestSerialize: serialize_payment_PaymentMethodConfigRequest,
425
+ requestDeserialize: deserialize_payment_PaymentMethodConfigRequest,
426
+ responseSerialize: serialize_payment_PaymentStatusResponse,
427
+ responseDeserialize: deserialize_payment_PaymentStatusResponse,
428
+ },
407
429
  // Deposit
408
430
  attemptDeposit: {
409
431
  path: '/payment.Payment/attemptDeposit',
@@ -40,6 +40,7 @@ goog.exportSymbol('proto.payment.MethodRequest', null, global);
40
40
  goog.exportSymbol('proto.payment.MethodRequest.RequestCase', null, global);
41
41
  goog.exportSymbol('proto.payment.MethodResponse', null, global);
42
42
  goog.exportSymbol('proto.payment.PaginationRequest', null, global);
43
+ goog.exportSymbol('proto.payment.PaymentMethodConfigRequest', null, global);
43
44
  goog.exportSymbol('proto.payment.PaymentSearchRequest', null, global);
44
45
  goog.exportSymbol('proto.payment.PaymentStatusResponse', null, global);
45
46
  goog.exportSymbol('proto.payment.PingRequest', null, global);
@@ -474,6 +475,27 @@ if (goog.DEBUG && !COMPILED) {
474
475
  */
475
476
  proto.payment.PoorMethodsRequest.displayName = 'proto.payment.PoorMethodsRequest';
476
477
  }
478
+ /**
479
+ * Generated by JsPbCodeGenerator.
480
+ * @param {Array=} opt_data Optional initial data array, typically from a
481
+ * server response, or constructed directly in Javascript. The array is used
482
+ * in place and becomes part of the constructed object. It is not cloned.
483
+ * If no data is provided, the constructed object will be empty, but still
484
+ * valid.
485
+ * @extends {jspb.Message}
486
+ * @constructor
487
+ */
488
+ proto.payment.PaymentMethodConfigRequest = function(opt_data) {
489
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
490
+ };
491
+ goog.inherits(proto.payment.PaymentMethodConfigRequest, jspb.Message);
492
+ if (goog.DEBUG && !COMPILED) {
493
+ /**
494
+ * @public
495
+ * @override
496
+ */
497
+ proto.payment.PaymentMethodConfigRequest.displayName = 'proto.payment.PaymentMethodConfigRequest';
498
+ }
477
499
  /**
478
500
  * Generated by JsPbCodeGenerator.
479
501
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -5668,6 +5690,472 @@ proto.payment.PoorMethodsRequest.prototype.clearMethodIdsList = function() {
5668
5690
 
5669
5691
 
5670
5692
 
5693
+ if (jspb.Message.GENERATE_TO_OBJECT) {
5694
+ /**
5695
+ * Creates an object representation of this proto.
5696
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
5697
+ * Optional fields that are not set will be set to undefined.
5698
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
5699
+ * For the list of reserved names please see:
5700
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
5701
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
5702
+ * JSPB instance for transitional soy proto support:
5703
+ * http://goto/soy-param-migration
5704
+ * @return {!Object}
5705
+ */
5706
+ proto.payment.PaymentMethodConfigRequest.prototype.toObject = function(opt_includeInstance) {
5707
+ return proto.payment.PaymentMethodConfigRequest.toObject(opt_includeInstance, this);
5708
+ };
5709
+
5710
+
5711
+ /**
5712
+ * Static version of the {@see toObject} method.
5713
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
5714
+ * the JSPB instance for transitional soy proto support:
5715
+ * http://goto/soy-param-migration
5716
+ * @param {!proto.payment.PaymentMethodConfigRequest} msg The msg instance to transform.
5717
+ * @return {!Object}
5718
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5719
+ */
5720
+ proto.payment.PaymentMethodConfigRequest.toObject = function(includeInstance, msg) {
5721
+ var f, obj = {
5722
+ methodId: jspb.Message.getFieldWithDefault(msg, 1, 0),
5723
+ geo: jspb.Message.getFieldWithDefault(msg, 2, ""),
5724
+ currency: jspb.Message.getFieldWithDefault(msg, 3, ""),
5725
+ isActive: jspb.Message.getFieldWithDefault(msg, 4, 0),
5726
+ minAmount: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0),
5727
+ maxAmount: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0),
5728
+ type: jspb.Message.getFieldWithDefault(msg, 7, ""),
5729
+ config: jspb.Message.getFieldWithDefault(msg, 8, "")
5730
+ };
5731
+
5732
+ if (includeInstance) {
5733
+ obj.$jspbMessageInstance = msg;
5734
+ }
5735
+ return obj;
5736
+ };
5737
+ }
5738
+
5739
+
5740
+ /**
5741
+ * Deserializes binary data (in protobuf wire format).
5742
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
5743
+ * @return {!proto.payment.PaymentMethodConfigRequest}
5744
+ */
5745
+ proto.payment.PaymentMethodConfigRequest.deserializeBinary = function(bytes) {
5746
+ var reader = new jspb.BinaryReader(bytes);
5747
+ var msg = new proto.payment.PaymentMethodConfigRequest;
5748
+ return proto.payment.PaymentMethodConfigRequest.deserializeBinaryFromReader(msg, reader);
5749
+ };
5750
+
5751
+
5752
+ /**
5753
+ * Deserializes binary data (in protobuf wire format) from the
5754
+ * given reader into the given message object.
5755
+ * @param {!proto.payment.PaymentMethodConfigRequest} msg The message object to deserialize into.
5756
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
5757
+ * @return {!proto.payment.PaymentMethodConfigRequest}
5758
+ */
5759
+ proto.payment.PaymentMethodConfigRequest.deserializeBinaryFromReader = function(msg, reader) {
5760
+ while (reader.nextField()) {
5761
+ if (reader.isEndGroup()) {
5762
+ break;
5763
+ }
5764
+ var field = reader.getFieldNumber();
5765
+ switch (field) {
5766
+ case 1:
5767
+ var value = /** @type {number} */ (reader.readInt32());
5768
+ msg.setMethodId(value);
5769
+ break;
5770
+ case 2:
5771
+ var value = /** @type {string} */ (reader.readString());
5772
+ msg.setGeo(value);
5773
+ break;
5774
+ case 3:
5775
+ var value = /** @type {string} */ (reader.readString());
5776
+ msg.setCurrency(value);
5777
+ break;
5778
+ case 4:
5779
+ var value = /** @type {number} */ (reader.readInt32());
5780
+ msg.setIsActive(value);
5781
+ break;
5782
+ case 5:
5783
+ var value = /** @type {number} */ (reader.readFloat());
5784
+ msg.setMinAmount(value);
5785
+ break;
5786
+ case 6:
5787
+ var value = /** @type {number} */ (reader.readFloat());
5788
+ msg.setMaxAmount(value);
5789
+ break;
5790
+ case 7:
5791
+ var value = /** @type {string} */ (reader.readString());
5792
+ msg.setType(value);
5793
+ break;
5794
+ case 8:
5795
+ var value = /** @type {string} */ (reader.readString());
5796
+ msg.setConfig(value);
5797
+ break;
5798
+ default:
5799
+ reader.skipField();
5800
+ break;
5801
+ }
5802
+ }
5803
+ return msg;
5804
+ };
5805
+
5806
+
5807
+ /**
5808
+ * Serializes the message to binary data (in protobuf wire format).
5809
+ * @return {!Uint8Array}
5810
+ */
5811
+ proto.payment.PaymentMethodConfigRequest.prototype.serializeBinary = function() {
5812
+ var writer = new jspb.BinaryWriter();
5813
+ proto.payment.PaymentMethodConfigRequest.serializeBinaryToWriter(this, writer);
5814
+ return writer.getResultBuffer();
5815
+ };
5816
+
5817
+
5818
+ /**
5819
+ * Serializes the given message to binary data (in protobuf wire
5820
+ * format), writing to the given BinaryWriter.
5821
+ * @param {!proto.payment.PaymentMethodConfigRequest} message
5822
+ * @param {!jspb.BinaryWriter} writer
5823
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5824
+ */
5825
+ proto.payment.PaymentMethodConfigRequest.serializeBinaryToWriter = function(message, writer) {
5826
+ var f = undefined;
5827
+ f = message.getMethodId();
5828
+ if (f !== 0) {
5829
+ writer.writeInt32(
5830
+ 1,
5831
+ f
5832
+ );
5833
+ }
5834
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
5835
+ if (f != null) {
5836
+ writer.writeString(
5837
+ 2,
5838
+ f
5839
+ );
5840
+ }
5841
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
5842
+ if (f != null) {
5843
+ writer.writeString(
5844
+ 3,
5845
+ f
5846
+ );
5847
+ }
5848
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
5849
+ if (f != null) {
5850
+ writer.writeInt32(
5851
+ 4,
5852
+ f
5853
+ );
5854
+ }
5855
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
5856
+ if (f != null) {
5857
+ writer.writeFloat(
5858
+ 5,
5859
+ f
5860
+ );
5861
+ }
5862
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
5863
+ if (f != null) {
5864
+ writer.writeFloat(
5865
+ 6,
5866
+ f
5867
+ );
5868
+ }
5869
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
5870
+ if (f != null) {
5871
+ writer.writeString(
5872
+ 7,
5873
+ f
5874
+ );
5875
+ }
5876
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
5877
+ if (f != null) {
5878
+ writer.writeString(
5879
+ 8,
5880
+ f
5881
+ );
5882
+ }
5883
+ };
5884
+
5885
+
5886
+ /**
5887
+ * optional int32 method_id = 1;
5888
+ * @return {number}
5889
+ */
5890
+ proto.payment.PaymentMethodConfigRequest.prototype.getMethodId = function() {
5891
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
5892
+ };
5893
+
5894
+
5895
+ /**
5896
+ * @param {number} value
5897
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
5898
+ */
5899
+ proto.payment.PaymentMethodConfigRequest.prototype.setMethodId = function(value) {
5900
+ return jspb.Message.setProto3IntField(this, 1, value);
5901
+ };
5902
+
5903
+
5904
+ /**
5905
+ * optional string geo = 2;
5906
+ * @return {string}
5907
+ */
5908
+ proto.payment.PaymentMethodConfigRequest.prototype.getGeo = function() {
5909
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
5910
+ };
5911
+
5912
+
5913
+ /**
5914
+ * @param {string} value
5915
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
5916
+ */
5917
+ proto.payment.PaymentMethodConfigRequest.prototype.setGeo = function(value) {
5918
+ return jspb.Message.setField(this, 2, value);
5919
+ };
5920
+
5921
+
5922
+ /**
5923
+ * Clears the field making it undefined.
5924
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
5925
+ */
5926
+ proto.payment.PaymentMethodConfigRequest.prototype.clearGeo = function() {
5927
+ return jspb.Message.setField(this, 2, undefined);
5928
+ };
5929
+
5930
+
5931
+ /**
5932
+ * Returns whether this field is set.
5933
+ * @return {boolean}
5934
+ */
5935
+ proto.payment.PaymentMethodConfigRequest.prototype.hasGeo = function() {
5936
+ return jspb.Message.getField(this, 2) != null;
5937
+ };
5938
+
5939
+
5940
+ /**
5941
+ * optional string currency = 3;
5942
+ * @return {string}
5943
+ */
5944
+ proto.payment.PaymentMethodConfigRequest.prototype.getCurrency = function() {
5945
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
5946
+ };
5947
+
5948
+
5949
+ /**
5950
+ * @param {string} value
5951
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
5952
+ */
5953
+ proto.payment.PaymentMethodConfigRequest.prototype.setCurrency = function(value) {
5954
+ return jspb.Message.setField(this, 3, value);
5955
+ };
5956
+
5957
+
5958
+ /**
5959
+ * Clears the field making it undefined.
5960
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
5961
+ */
5962
+ proto.payment.PaymentMethodConfigRequest.prototype.clearCurrency = function() {
5963
+ return jspb.Message.setField(this, 3, undefined);
5964
+ };
5965
+
5966
+
5967
+ /**
5968
+ * Returns whether this field is set.
5969
+ * @return {boolean}
5970
+ */
5971
+ proto.payment.PaymentMethodConfigRequest.prototype.hasCurrency = function() {
5972
+ return jspb.Message.getField(this, 3) != null;
5973
+ };
5974
+
5975
+
5976
+ /**
5977
+ * optional int32 is_active = 4;
5978
+ * @return {number}
5979
+ */
5980
+ proto.payment.PaymentMethodConfigRequest.prototype.getIsActive = function() {
5981
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
5982
+ };
5983
+
5984
+
5985
+ /**
5986
+ * @param {number} value
5987
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
5988
+ */
5989
+ proto.payment.PaymentMethodConfigRequest.prototype.setIsActive = function(value) {
5990
+ return jspb.Message.setField(this, 4, value);
5991
+ };
5992
+
5993
+
5994
+ /**
5995
+ * Clears the field making it undefined.
5996
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
5997
+ */
5998
+ proto.payment.PaymentMethodConfigRequest.prototype.clearIsActive = function() {
5999
+ return jspb.Message.setField(this, 4, undefined);
6000
+ };
6001
+
6002
+
6003
+ /**
6004
+ * Returns whether this field is set.
6005
+ * @return {boolean}
6006
+ */
6007
+ proto.payment.PaymentMethodConfigRequest.prototype.hasIsActive = function() {
6008
+ return jspb.Message.getField(this, 4) != null;
6009
+ };
6010
+
6011
+
6012
+ /**
6013
+ * optional float min_amount = 5;
6014
+ * @return {number}
6015
+ */
6016
+ proto.payment.PaymentMethodConfigRequest.prototype.getMinAmount = function() {
6017
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
6018
+ };
6019
+
6020
+
6021
+ /**
6022
+ * @param {number} value
6023
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
6024
+ */
6025
+ proto.payment.PaymentMethodConfigRequest.prototype.setMinAmount = function(value) {
6026
+ return jspb.Message.setField(this, 5, value);
6027
+ };
6028
+
6029
+
6030
+ /**
6031
+ * Clears the field making it undefined.
6032
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
6033
+ */
6034
+ proto.payment.PaymentMethodConfigRequest.prototype.clearMinAmount = function() {
6035
+ return jspb.Message.setField(this, 5, undefined);
6036
+ };
6037
+
6038
+
6039
+ /**
6040
+ * Returns whether this field is set.
6041
+ * @return {boolean}
6042
+ */
6043
+ proto.payment.PaymentMethodConfigRequest.prototype.hasMinAmount = function() {
6044
+ return jspb.Message.getField(this, 5) != null;
6045
+ };
6046
+
6047
+
6048
+ /**
6049
+ * optional float max_amount = 6;
6050
+ * @return {number}
6051
+ */
6052
+ proto.payment.PaymentMethodConfigRequest.prototype.getMaxAmount = function() {
6053
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0));
6054
+ };
6055
+
6056
+
6057
+ /**
6058
+ * @param {number} value
6059
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
6060
+ */
6061
+ proto.payment.PaymentMethodConfigRequest.prototype.setMaxAmount = function(value) {
6062
+ return jspb.Message.setField(this, 6, value);
6063
+ };
6064
+
6065
+
6066
+ /**
6067
+ * Clears the field making it undefined.
6068
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
6069
+ */
6070
+ proto.payment.PaymentMethodConfigRequest.prototype.clearMaxAmount = function() {
6071
+ return jspb.Message.setField(this, 6, undefined);
6072
+ };
6073
+
6074
+
6075
+ /**
6076
+ * Returns whether this field is set.
6077
+ * @return {boolean}
6078
+ */
6079
+ proto.payment.PaymentMethodConfigRequest.prototype.hasMaxAmount = function() {
6080
+ return jspb.Message.getField(this, 6) != null;
6081
+ };
6082
+
6083
+
6084
+ /**
6085
+ * optional string type = 7;
6086
+ * @return {string}
6087
+ */
6088
+ proto.payment.PaymentMethodConfigRequest.prototype.getType = function() {
6089
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
6090
+ };
6091
+
6092
+
6093
+ /**
6094
+ * @param {string} value
6095
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
6096
+ */
6097
+ proto.payment.PaymentMethodConfigRequest.prototype.setType = function(value) {
6098
+ return jspb.Message.setField(this, 7, value);
6099
+ };
6100
+
6101
+
6102
+ /**
6103
+ * Clears the field making it undefined.
6104
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
6105
+ */
6106
+ proto.payment.PaymentMethodConfigRequest.prototype.clearType = function() {
6107
+ return jspb.Message.setField(this, 7, undefined);
6108
+ };
6109
+
6110
+
6111
+ /**
6112
+ * Returns whether this field is set.
6113
+ * @return {boolean}
6114
+ */
6115
+ proto.payment.PaymentMethodConfigRequest.prototype.hasType = function() {
6116
+ return jspb.Message.getField(this, 7) != null;
6117
+ };
6118
+
6119
+
6120
+ /**
6121
+ * optional string config = 8;
6122
+ * @return {string}
6123
+ */
6124
+ proto.payment.PaymentMethodConfigRequest.prototype.getConfig = function() {
6125
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
6126
+ };
6127
+
6128
+
6129
+ /**
6130
+ * @param {string} value
6131
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
6132
+ */
6133
+ proto.payment.PaymentMethodConfigRequest.prototype.setConfig = function(value) {
6134
+ return jspb.Message.setField(this, 8, value);
6135
+ };
6136
+
6137
+
6138
+ /**
6139
+ * Clears the field making it undefined.
6140
+ * @return {!proto.payment.PaymentMethodConfigRequest} returns this
6141
+ */
6142
+ proto.payment.PaymentMethodConfigRequest.prototype.clearConfig = function() {
6143
+ return jspb.Message.setField(this, 8, undefined);
6144
+ };
6145
+
6146
+
6147
+ /**
6148
+ * Returns whether this field is set.
6149
+ * @return {boolean}
6150
+ */
6151
+ proto.payment.PaymentMethodConfigRequest.prototype.hasConfig = function() {
6152
+ return jspb.Message.getField(this, 8) != null;
6153
+ };
6154
+
6155
+
6156
+
6157
+
6158
+
5671
6159
  if (jspb.Message.GENERATE_TO_OBJECT) {
5672
6160
  /**
5673
6161
  * Creates an object representation of this proto.