protobuf-platform 1.2.697 → 1.2.699

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.
@@ -24,6 +24,7 @@ var global = (function() {
24
24
  goog.exportSymbol('proto.loyalty.BetPoint', null, global);
25
25
  goog.exportSymbol('proto.loyalty.ClientDepositPointLevelLimit', null, global);
26
26
  goog.exportSymbol('proto.loyalty.ClientDepositPointLimit', null, global);
27
+ goog.exportSymbol('proto.loyalty.CorrectUserLoyaltyRequest', null, global);
27
28
  goog.exportSymbol('proto.loyalty.DepositPoint', null, global);
28
29
  goog.exportSymbol('proto.loyalty.DepositPointLevelLimit', null, global);
29
30
  goog.exportSymbol('proto.loyalty.DepositPointLevelLimitItemsResponse', null, global);
@@ -828,6 +829,27 @@ if (goog.DEBUG && !COMPILED) {
828
829
  */
829
830
  proto.loyalty.GetUserLoyaltyRequest.displayName = 'proto.loyalty.GetUserLoyaltyRequest';
830
831
  }
832
+ /**
833
+ * Generated by JsPbCodeGenerator.
834
+ * @param {Array=} opt_data Optional initial data array, typically from a
835
+ * server response, or constructed directly in Javascript. The array is used
836
+ * in place and becomes part of the constructed object. It is not cloned.
837
+ * If no data is provided, the constructed object will be empty, but still
838
+ * valid.
839
+ * @extends {jspb.Message}
840
+ * @constructor
841
+ */
842
+ proto.loyalty.CorrectUserLoyaltyRequest = function(opt_data) {
843
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
844
+ };
845
+ goog.inherits(proto.loyalty.CorrectUserLoyaltyRequest, jspb.Message);
846
+ if (goog.DEBUG && !COMPILED) {
847
+ /**
848
+ * @public
849
+ * @override
850
+ */
851
+ proto.loyalty.CorrectUserLoyaltyRequest.displayName = 'proto.loyalty.CorrectUserLoyaltyRequest';
852
+ }
831
853
  /**
832
854
  * Generated by JsPbCodeGenerator.
833
855
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -12806,6 +12828,244 @@ proto.loyalty.GetUserLoyaltyRequest.prototype.hasOffset = function() {
12806
12828
 
12807
12829
 
12808
12830
 
12831
+
12832
+
12833
+ if (jspb.Message.GENERATE_TO_OBJECT) {
12834
+ /**
12835
+ * Creates an object representation of this proto.
12836
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
12837
+ * Optional fields that are not set will be set to undefined.
12838
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
12839
+ * For the list of reserved names please see:
12840
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
12841
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
12842
+ * JSPB instance for transitional soy proto support:
12843
+ * http://goto/soy-param-migration
12844
+ * @return {!Object}
12845
+ */
12846
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.toObject = function(opt_includeInstance) {
12847
+ return proto.loyalty.CorrectUserLoyaltyRequest.toObject(opt_includeInstance, this);
12848
+ };
12849
+
12850
+
12851
+ /**
12852
+ * Static version of the {@see toObject} method.
12853
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
12854
+ * the JSPB instance for transitional soy proto support:
12855
+ * http://goto/soy-param-migration
12856
+ * @param {!proto.loyalty.CorrectUserLoyaltyRequest} msg The msg instance to transform.
12857
+ * @return {!Object}
12858
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12859
+ */
12860
+ proto.loyalty.CorrectUserLoyaltyRequest.toObject = function(includeInstance, msg) {
12861
+ var f, obj = {
12862
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
12863
+ loyaltyLevelId: jspb.Message.getFieldWithDefault(msg, 2, 0),
12864
+ pointsInLevel: jspb.Message.getFieldWithDefault(msg, 3, ""),
12865
+ operatorId: jspb.Message.getFieldWithDefault(msg, 4, "")
12866
+ };
12867
+
12868
+ if (includeInstance) {
12869
+ obj.$jspbMessageInstance = msg;
12870
+ }
12871
+ return obj;
12872
+ };
12873
+ }
12874
+
12875
+
12876
+ /**
12877
+ * Deserializes binary data (in protobuf wire format).
12878
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
12879
+ * @return {!proto.loyalty.CorrectUserLoyaltyRequest}
12880
+ */
12881
+ proto.loyalty.CorrectUserLoyaltyRequest.deserializeBinary = function(bytes) {
12882
+ var reader = new jspb.BinaryReader(bytes);
12883
+ var msg = new proto.loyalty.CorrectUserLoyaltyRequest;
12884
+ return proto.loyalty.CorrectUserLoyaltyRequest.deserializeBinaryFromReader(msg, reader);
12885
+ };
12886
+
12887
+
12888
+ /**
12889
+ * Deserializes binary data (in protobuf wire format) from the
12890
+ * given reader into the given message object.
12891
+ * @param {!proto.loyalty.CorrectUserLoyaltyRequest} msg The message object to deserialize into.
12892
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
12893
+ * @return {!proto.loyalty.CorrectUserLoyaltyRequest}
12894
+ */
12895
+ proto.loyalty.CorrectUserLoyaltyRequest.deserializeBinaryFromReader = function(msg, reader) {
12896
+ while (reader.nextField()) {
12897
+ if (reader.isEndGroup()) {
12898
+ break;
12899
+ }
12900
+ var field = reader.getFieldNumber();
12901
+ switch (field) {
12902
+ case 1:
12903
+ var value = /** @type {number} */ (reader.readInt32());
12904
+ msg.setUserId(value);
12905
+ break;
12906
+ case 2:
12907
+ var value = /** @type {number} */ (reader.readInt32());
12908
+ msg.setLoyaltyLevelId(value);
12909
+ break;
12910
+ case 3:
12911
+ var value = /** @type {string} */ (reader.readString());
12912
+ msg.setPointsInLevel(value);
12913
+ break;
12914
+ case 4:
12915
+ var value = /** @type {string} */ (reader.readString());
12916
+ msg.setOperatorId(value);
12917
+ break;
12918
+ default:
12919
+ reader.skipField();
12920
+ break;
12921
+ }
12922
+ }
12923
+ return msg;
12924
+ };
12925
+
12926
+
12927
+ /**
12928
+ * Serializes the message to binary data (in protobuf wire format).
12929
+ * @return {!Uint8Array}
12930
+ */
12931
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.serializeBinary = function() {
12932
+ var writer = new jspb.BinaryWriter();
12933
+ proto.loyalty.CorrectUserLoyaltyRequest.serializeBinaryToWriter(this, writer);
12934
+ return writer.getResultBuffer();
12935
+ };
12936
+
12937
+
12938
+ /**
12939
+ * Serializes the given message to binary data (in protobuf wire
12940
+ * format), writing to the given BinaryWriter.
12941
+ * @param {!proto.loyalty.CorrectUserLoyaltyRequest} message
12942
+ * @param {!jspb.BinaryWriter} writer
12943
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12944
+ */
12945
+ proto.loyalty.CorrectUserLoyaltyRequest.serializeBinaryToWriter = function(message, writer) {
12946
+ var f = undefined;
12947
+ f = message.getUserId();
12948
+ if (f !== 0) {
12949
+ writer.writeInt32(
12950
+ 1,
12951
+ f
12952
+ );
12953
+ }
12954
+ f = message.getLoyaltyLevelId();
12955
+ if (f !== 0) {
12956
+ writer.writeInt32(
12957
+ 2,
12958
+ f
12959
+ );
12960
+ }
12961
+ f = message.getPointsInLevel();
12962
+ if (f.length > 0) {
12963
+ writer.writeString(
12964
+ 3,
12965
+ f
12966
+ );
12967
+ }
12968
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
12969
+ if (f != null) {
12970
+ writer.writeString(
12971
+ 4,
12972
+ f
12973
+ );
12974
+ }
12975
+ };
12976
+
12977
+
12978
+ /**
12979
+ * optional int32 user_id = 1;
12980
+ * @return {number}
12981
+ */
12982
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.getUserId = function() {
12983
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
12984
+ };
12985
+
12986
+
12987
+ /**
12988
+ * @param {number} value
12989
+ * @return {!proto.loyalty.CorrectUserLoyaltyRequest} returns this
12990
+ */
12991
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.setUserId = function(value) {
12992
+ return jspb.Message.setProto3IntField(this, 1, value);
12993
+ };
12994
+
12995
+
12996
+ /**
12997
+ * optional int32 loyalty_level_id = 2;
12998
+ * @return {number}
12999
+ */
13000
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.getLoyaltyLevelId = function() {
13001
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
13002
+ };
13003
+
13004
+
13005
+ /**
13006
+ * @param {number} value
13007
+ * @return {!proto.loyalty.CorrectUserLoyaltyRequest} returns this
13008
+ */
13009
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.setLoyaltyLevelId = function(value) {
13010
+ return jspb.Message.setProto3IntField(this, 2, value);
13011
+ };
13012
+
13013
+
13014
+ /**
13015
+ * optional string points_in_level = 3;
13016
+ * @return {string}
13017
+ */
13018
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.getPointsInLevel = function() {
13019
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
13020
+ };
13021
+
13022
+
13023
+ /**
13024
+ * @param {string} value
13025
+ * @return {!proto.loyalty.CorrectUserLoyaltyRequest} returns this
13026
+ */
13027
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.setPointsInLevel = function(value) {
13028
+ return jspb.Message.setProto3StringField(this, 3, value);
13029
+ };
13030
+
13031
+
13032
+ /**
13033
+ * optional string operator_id = 4;
13034
+ * @return {string}
13035
+ */
13036
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.getOperatorId = function() {
13037
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
13038
+ };
13039
+
13040
+
13041
+ /**
13042
+ * @param {string} value
13043
+ * @return {!proto.loyalty.CorrectUserLoyaltyRequest} returns this
13044
+ */
13045
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.setOperatorId = function(value) {
13046
+ return jspb.Message.setField(this, 4, value);
13047
+ };
13048
+
13049
+
13050
+ /**
13051
+ * Clears the field making it undefined.
13052
+ * @return {!proto.loyalty.CorrectUserLoyaltyRequest} returns this
13053
+ */
13054
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.clearOperatorId = function() {
13055
+ return jspb.Message.setField(this, 4, undefined);
13056
+ };
13057
+
13058
+
13059
+ /**
13060
+ * Returns whether this field is set.
13061
+ * @return {boolean}
13062
+ */
13063
+ proto.loyalty.CorrectUserLoyaltyRequest.prototype.hasOperatorId = function() {
13064
+ return jspb.Message.getField(this, 4) != null;
13065
+ };
13066
+
13067
+
13068
+
12809
13069
  /**
12810
13070
  * List of repeated fields within this message type.
12811
13071
  * @private {!Array<number>}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.697",
3
+ "version": "1.2.699",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -5,6 +5,7 @@ package payment;
5
5
  service Payment {
6
6
  // Independent, idempotent real-money level completion grant.
7
7
  rpc grantLoyaltyLevelUpReward(LoyaltyLevelUpRewardRequest) returns (LoyaltyLevelUpRewardResponse);
8
+ rpc creditCashbackClaim(CashbackClaimCreditRequest) returns (LoyaltyLevelUpRewardResponse);
8
9
  rpc checkConnection(PingRequest) returns (PongResponse);
9
10
  rpc getMediaResource(GetFileRequest) returns (stream File);
10
11
  //Payment Provider
@@ -1491,6 +1492,13 @@ message LoyaltyLevelUpRewardRequest {
1491
1492
  string amount = 3;
1492
1493
  string currency = 4;
1493
1494
  }
1495
+ // Claim identity is immutable. Amount and currency are the payout snapshot, not a new rate.
1496
+ message CashbackClaimCreditRequest {
1497
+ string claim_identity = 1;
1498
+ int32 user_id = 2;
1499
+ string amount = 3;
1500
+ string currency = 4;
1501
+ }
1494
1502
  message LoyaltyLevelUpRewardResponse {
1495
1503
  string operation_id = 1;
1496
1504
  string operation_public_id = 2;
@@ -81,6 +81,17 @@ function deserialize_payment_BonusBalanceRewardReversalRequest(buffer_arg) {
81
81
  return payment_pb.BonusBalanceRewardReversalRequest.deserializeBinary(new Uint8Array(buffer_arg));
82
82
  }
83
83
 
84
+ function serialize_payment_CashbackClaimCreditRequest(arg) {
85
+ if (!(arg instanceof payment_pb.CashbackClaimCreditRequest)) {
86
+ throw new Error('Expected argument of type payment.CashbackClaimCreditRequest');
87
+ }
88
+ return Buffer.from(arg.serializeBinary());
89
+ }
90
+
91
+ function deserialize_payment_CashbackClaimCreditRequest(buffer_arg) {
92
+ return payment_pb.CashbackClaimCreditRequest.deserializeBinary(new Uint8Array(buffer_arg));
93
+ }
94
+
84
95
  function serialize_payment_CashierFieldItemsResponse(arg) {
85
96
  if (!(arg instanceof payment_pb.CashierFieldItemsResponse)) {
86
97
  throw new Error('Expected argument of type payment.CashierFieldItemsResponse');
@@ -1140,6 +1151,17 @@ grantLoyaltyLevelUpReward: {
1140
1151
  responseSerialize: serialize_payment_LoyaltyLevelUpRewardResponse,
1141
1152
  responseDeserialize: deserialize_payment_LoyaltyLevelUpRewardResponse,
1142
1153
  },
1154
+ creditCashbackClaim: {
1155
+ path: '/payment.Payment/creditCashbackClaim',
1156
+ requestStream: false,
1157
+ responseStream: false,
1158
+ requestType: payment_pb.CashbackClaimCreditRequest,
1159
+ responseType: payment_pb.LoyaltyLevelUpRewardResponse,
1160
+ requestSerialize: serialize_payment_CashbackClaimCreditRequest,
1161
+ requestDeserialize: deserialize_payment_CashbackClaimCreditRequest,
1162
+ responseSerialize: serialize_payment_LoyaltyLevelUpRewardResponse,
1163
+ responseDeserialize: deserialize_payment_LoyaltyLevelUpRewardResponse,
1164
+ },
1143
1165
  checkConnection: {
1144
1166
  path: '/payment.Payment/checkConnection',
1145
1167
  requestStream: false,
@@ -30,6 +30,7 @@ goog.exportSymbol('proto.payment.AttemptWithdrawalRequest', null, global);
30
30
  goog.exportSymbol('proto.payment.BonusBalanceRewardIssueRequest', null, global);
31
31
  goog.exportSymbol('proto.payment.BonusBalanceRewardOperationResponse', null, global);
32
32
  goog.exportSymbol('proto.payment.BonusBalanceRewardReversalRequest', null, global);
33
+ goog.exportSymbol('proto.payment.CashbackClaimCreditRequest', null, global);
33
34
  goog.exportSymbol('proto.payment.CashierFieldItem', null, global);
34
35
  goog.exportSymbol('proto.payment.CashierFieldItemsResponse', null, global);
35
36
  goog.exportSymbol('proto.payment.CashierFieldsRequest', null, global);
@@ -3061,6 +3062,27 @@ if (goog.DEBUG && !COMPILED) {
3061
3062
  */
3062
3063
  proto.payment.LoyaltyLevelUpRewardRequest.displayName = 'proto.payment.LoyaltyLevelUpRewardRequest';
3063
3064
  }
3065
+ /**
3066
+ * Generated by JsPbCodeGenerator.
3067
+ * @param {Array=} opt_data Optional initial data array, typically from a
3068
+ * server response, or constructed directly in Javascript. The array is used
3069
+ * in place and becomes part of the constructed object. It is not cloned.
3070
+ * If no data is provided, the constructed object will be empty, but still
3071
+ * valid.
3072
+ * @extends {jspb.Message}
3073
+ * @constructor
3074
+ */
3075
+ proto.payment.CashbackClaimCreditRequest = function(opt_data) {
3076
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
3077
+ };
3078
+ goog.inherits(proto.payment.CashbackClaimCreditRequest, jspb.Message);
3079
+ if (goog.DEBUG && !COMPILED) {
3080
+ /**
3081
+ * @public
3082
+ * @override
3083
+ */
3084
+ proto.payment.CashbackClaimCreditRequest.displayName = 'proto.payment.CashbackClaimCreditRequest';
3085
+ }
3064
3086
  /**
3065
3087
  * Generated by JsPbCodeGenerator.
3066
3088
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -61002,6 +61024,226 @@ proto.payment.LoyaltyLevelUpRewardRequest.prototype.setCurrency = function(value
61002
61024
 
61003
61025
 
61004
61026
 
61027
+
61028
+
61029
+ if (jspb.Message.GENERATE_TO_OBJECT) {
61030
+ /**
61031
+ * Creates an object representation of this proto.
61032
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
61033
+ * Optional fields that are not set will be set to undefined.
61034
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
61035
+ * For the list of reserved names please see:
61036
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
61037
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
61038
+ * JSPB instance for transitional soy proto support:
61039
+ * http://goto/soy-param-migration
61040
+ * @return {!Object}
61041
+ */
61042
+ proto.payment.CashbackClaimCreditRequest.prototype.toObject = function(opt_includeInstance) {
61043
+ return proto.payment.CashbackClaimCreditRequest.toObject(opt_includeInstance, this);
61044
+ };
61045
+
61046
+
61047
+ /**
61048
+ * Static version of the {@see toObject} method.
61049
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
61050
+ * the JSPB instance for transitional soy proto support:
61051
+ * http://goto/soy-param-migration
61052
+ * @param {!proto.payment.CashbackClaimCreditRequest} msg The msg instance to transform.
61053
+ * @return {!Object}
61054
+ * @suppress {unusedLocalVariables} f is only used for nested messages
61055
+ */
61056
+ proto.payment.CashbackClaimCreditRequest.toObject = function(includeInstance, msg) {
61057
+ var f, obj = {
61058
+ claimIdentity: jspb.Message.getFieldWithDefault(msg, 1, ""),
61059
+ userId: jspb.Message.getFieldWithDefault(msg, 2, 0),
61060
+ amount: jspb.Message.getFieldWithDefault(msg, 3, ""),
61061
+ currency: jspb.Message.getFieldWithDefault(msg, 4, "")
61062
+ };
61063
+
61064
+ if (includeInstance) {
61065
+ obj.$jspbMessageInstance = msg;
61066
+ }
61067
+ return obj;
61068
+ };
61069
+ }
61070
+
61071
+
61072
+ /**
61073
+ * Deserializes binary data (in protobuf wire format).
61074
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
61075
+ * @return {!proto.payment.CashbackClaimCreditRequest}
61076
+ */
61077
+ proto.payment.CashbackClaimCreditRequest.deserializeBinary = function(bytes) {
61078
+ var reader = new jspb.BinaryReader(bytes);
61079
+ var msg = new proto.payment.CashbackClaimCreditRequest;
61080
+ return proto.payment.CashbackClaimCreditRequest.deserializeBinaryFromReader(msg, reader);
61081
+ };
61082
+
61083
+
61084
+ /**
61085
+ * Deserializes binary data (in protobuf wire format) from the
61086
+ * given reader into the given message object.
61087
+ * @param {!proto.payment.CashbackClaimCreditRequest} msg The message object to deserialize into.
61088
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
61089
+ * @return {!proto.payment.CashbackClaimCreditRequest}
61090
+ */
61091
+ proto.payment.CashbackClaimCreditRequest.deserializeBinaryFromReader = function(msg, reader) {
61092
+ while (reader.nextField()) {
61093
+ if (reader.isEndGroup()) {
61094
+ break;
61095
+ }
61096
+ var field = reader.getFieldNumber();
61097
+ switch (field) {
61098
+ case 1:
61099
+ var value = /** @type {string} */ (reader.readString());
61100
+ msg.setClaimIdentity(value);
61101
+ break;
61102
+ case 2:
61103
+ var value = /** @type {number} */ (reader.readInt32());
61104
+ msg.setUserId(value);
61105
+ break;
61106
+ case 3:
61107
+ var value = /** @type {string} */ (reader.readString());
61108
+ msg.setAmount(value);
61109
+ break;
61110
+ case 4:
61111
+ var value = /** @type {string} */ (reader.readString());
61112
+ msg.setCurrency(value);
61113
+ break;
61114
+ default:
61115
+ reader.skipField();
61116
+ break;
61117
+ }
61118
+ }
61119
+ return msg;
61120
+ };
61121
+
61122
+
61123
+ /**
61124
+ * Serializes the message to binary data (in protobuf wire format).
61125
+ * @return {!Uint8Array}
61126
+ */
61127
+ proto.payment.CashbackClaimCreditRequest.prototype.serializeBinary = function() {
61128
+ var writer = new jspb.BinaryWriter();
61129
+ proto.payment.CashbackClaimCreditRequest.serializeBinaryToWriter(this, writer);
61130
+ return writer.getResultBuffer();
61131
+ };
61132
+
61133
+
61134
+ /**
61135
+ * Serializes the given message to binary data (in protobuf wire
61136
+ * format), writing to the given BinaryWriter.
61137
+ * @param {!proto.payment.CashbackClaimCreditRequest} message
61138
+ * @param {!jspb.BinaryWriter} writer
61139
+ * @suppress {unusedLocalVariables} f is only used for nested messages
61140
+ */
61141
+ proto.payment.CashbackClaimCreditRequest.serializeBinaryToWriter = function(message, writer) {
61142
+ var f = undefined;
61143
+ f = message.getClaimIdentity();
61144
+ if (f.length > 0) {
61145
+ writer.writeString(
61146
+ 1,
61147
+ f
61148
+ );
61149
+ }
61150
+ f = message.getUserId();
61151
+ if (f !== 0) {
61152
+ writer.writeInt32(
61153
+ 2,
61154
+ f
61155
+ );
61156
+ }
61157
+ f = message.getAmount();
61158
+ if (f.length > 0) {
61159
+ writer.writeString(
61160
+ 3,
61161
+ f
61162
+ );
61163
+ }
61164
+ f = message.getCurrency();
61165
+ if (f.length > 0) {
61166
+ writer.writeString(
61167
+ 4,
61168
+ f
61169
+ );
61170
+ }
61171
+ };
61172
+
61173
+
61174
+ /**
61175
+ * optional string claim_identity = 1;
61176
+ * @return {string}
61177
+ */
61178
+ proto.payment.CashbackClaimCreditRequest.prototype.getClaimIdentity = function() {
61179
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
61180
+ };
61181
+
61182
+
61183
+ /**
61184
+ * @param {string} value
61185
+ * @return {!proto.payment.CashbackClaimCreditRequest} returns this
61186
+ */
61187
+ proto.payment.CashbackClaimCreditRequest.prototype.setClaimIdentity = function(value) {
61188
+ return jspb.Message.setProto3StringField(this, 1, value);
61189
+ };
61190
+
61191
+
61192
+ /**
61193
+ * optional int32 user_id = 2;
61194
+ * @return {number}
61195
+ */
61196
+ proto.payment.CashbackClaimCreditRequest.prototype.getUserId = function() {
61197
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
61198
+ };
61199
+
61200
+
61201
+ /**
61202
+ * @param {number} value
61203
+ * @return {!proto.payment.CashbackClaimCreditRequest} returns this
61204
+ */
61205
+ proto.payment.CashbackClaimCreditRequest.prototype.setUserId = function(value) {
61206
+ return jspb.Message.setProto3IntField(this, 2, value);
61207
+ };
61208
+
61209
+
61210
+ /**
61211
+ * optional string amount = 3;
61212
+ * @return {string}
61213
+ */
61214
+ proto.payment.CashbackClaimCreditRequest.prototype.getAmount = function() {
61215
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
61216
+ };
61217
+
61218
+
61219
+ /**
61220
+ * @param {string} value
61221
+ * @return {!proto.payment.CashbackClaimCreditRequest} returns this
61222
+ */
61223
+ proto.payment.CashbackClaimCreditRequest.prototype.setAmount = function(value) {
61224
+ return jspb.Message.setProto3StringField(this, 3, value);
61225
+ };
61226
+
61227
+
61228
+ /**
61229
+ * optional string currency = 4;
61230
+ * @return {string}
61231
+ */
61232
+ proto.payment.CashbackClaimCreditRequest.prototype.getCurrency = function() {
61233
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
61234
+ };
61235
+
61236
+
61237
+ /**
61238
+ * @param {string} value
61239
+ * @return {!proto.payment.CashbackClaimCreditRequest} returns this
61240
+ */
61241
+ proto.payment.CashbackClaimCreditRequest.prototype.setCurrency = function(value) {
61242
+ return jspb.Message.setProto3StringField(this, 4, value);
61243
+ };
61244
+
61245
+
61246
+
61005
61247
  /**
61006
61248
  * List of repeated fields within this message type.
61007
61249
  * @private {!Array<number>}
@@ -22,6 +22,10 @@ service Promocode {
22
22
  rpc prepareUserPromocodeGrant(PrepareUserPromocodeGrantRequest) returns (PrepareUserPromocodeGrantResponse);
23
23
  rpc batchGetUserPromocodeSnapshots(BatchGetUserPromocodeSnapshotsRequest) returns (BatchGetUserPromocodeSnapshotsResponse);
24
24
  rpc getUserRegistrationPromocode(GetUserRegistrationPromocodeRequest) returns (GetUserRegistrationPromocodeResponse);
25
+ rpc reserveDepositUserPromocode(ReserveDepositUserPromocodeRequest) returns (UserPromocodeUsageItem);
26
+ rpc readDepositUserPromocode(ReadDepositUserPromocodeRequest) returns (UserPromocodeUsageItem);
27
+ rpc rejectDepositUserPromocode(RejectDepositUserPromocodeRequest) returns (UserPromocodeUsageItem);
28
+ rpc readListUserPromocodes(UserPromocodePaginationRequest) returns (UserPromocodeItemsResponse);
25
29
  }
26
30
  message PingRequest { string ping = 1; }
27
31
  message PongResponse { string pong = 1; }
@@ -271,3 +275,50 @@ message GetUserRegistrationPromocodeResponse {
271
275
  bool found = 1;
272
276
  optional string promo_code = 2;
273
277
  }
278
+ message ReserveDepositUserPromocodeRequest {
279
+ int32 user_id = 1;
280
+ int32 deposit_id = 2;
281
+ string code = 3;
282
+ optional string currency = 4;
283
+ int32 user_bonus_id = 5;
284
+ int32 template_bonus_id = 6;
285
+ optional string country = 7;
286
+ optional string locale = 8;
287
+ }
288
+ message ReadDepositUserPromocodeRequest {
289
+ int32 deposit_id = 1;
290
+ int32 user_id = 2;
291
+ }
292
+ message RejectDepositUserPromocodeRequest {
293
+ int32 deposit_id = 1;
294
+ int32 user_id = 2;
295
+ }
296
+ message UserPromocodePaginationRequest {
297
+ int32 limit = 1;
298
+ int32 offset = 2;
299
+ optional string order = 3;
300
+ int32 user_id = 4;
301
+ }
302
+ message UserPromocodeUsageItem {
303
+ int32 id = 1;
304
+ int32 user_id = 2;
305
+ int32 promocode_id = 3;
306
+ optional string promo_code = 4;
307
+ optional string activation_area = 5;
308
+ optional string target_domain = 6;
309
+ optional string target_entity_type = 7;
310
+ optional int32 target_entity_id = 8;
311
+ optional int32 target_bonus_id = 9;
312
+ optional string status = 10;
313
+ optional int32 deposit_id = 11;
314
+ optional string currency = 12;
315
+ optional string created_at = 13;
316
+ optional string applied_at = 14;
317
+ optional string snapshot = 15;
318
+ optional string application_mode = 16;
319
+ }
320
+ message UserPromocodeItemsResponse {
321
+ repeated UserPromocodeUsageItem items = 1;
322
+ optional int32 total_items = 2;
323
+ optional int32 total_pages = 3;
324
+ }