@headspace/protos-events 1.56.0 → 1.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +191 -0
- package/lib/index.js +920 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2664,6 +2664,30 @@ $root.subscription = (function() {
|
|
|
2664
2664
|
return values;
|
|
2665
2665
|
})();
|
|
2666
2666
|
|
|
2667
|
+
/**
|
|
2668
|
+
* SubscriptionState enum.
|
|
2669
|
+
* @name subscription.SubscriptionState
|
|
2670
|
+
* @enum {string}
|
|
2671
|
+
* @property {number} SUBSTATE_UNKNOWN=0 SUBSTATE_UNKNOWN value
|
|
2672
|
+
* @property {number} SUBSTATE_NONE=1 SUBSTATE_NONE value
|
|
2673
|
+
* @property {number} SUBSTATE_FREE_SUBSCRIPTION=2 SUBSTATE_FREE_SUBSCRIPTION value
|
|
2674
|
+
* @property {number} SUBSTATE_FREE_TRIAL=3 SUBSTATE_FREE_TRIAL value
|
|
2675
|
+
* @property {number} SUBSTATE_PAYING=4 SUBSTATE_PAYING value
|
|
2676
|
+
* @property {number} SUBSTATE_GRACE=6 SUBSTATE_GRACE value
|
|
2677
|
+
* @property {number} SUBSTATE_CANCELLED=5 SUBSTATE_CANCELLED value
|
|
2678
|
+
*/
|
|
2679
|
+
subscription.SubscriptionState = (function() {
|
|
2680
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
2681
|
+
values[valuesById[0] = "SUBSTATE_UNKNOWN"] = 0;
|
|
2682
|
+
values[valuesById[1] = "SUBSTATE_NONE"] = 1;
|
|
2683
|
+
values[valuesById[2] = "SUBSTATE_FREE_SUBSCRIPTION"] = 2;
|
|
2684
|
+
values[valuesById[3] = "SUBSTATE_FREE_TRIAL"] = 3;
|
|
2685
|
+
values[valuesById[4] = "SUBSTATE_PAYING"] = 4;
|
|
2686
|
+
values[valuesById[6] = "SUBSTATE_GRACE"] = 6;
|
|
2687
|
+
values[valuesById[5] = "SUBSTATE_CANCELLED"] = 5;
|
|
2688
|
+
return values;
|
|
2689
|
+
})();
|
|
2690
|
+
|
|
2667
2691
|
return subscription;
|
|
2668
2692
|
})();
|
|
2669
2693
|
|
|
@@ -9337,6 +9361,7 @@ $root.SubscriptionCreated = (function() {
|
|
|
9337
9361
|
* @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionCreated platform
|
|
9338
9362
|
* @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionCreated autoRenewalStatus
|
|
9339
9363
|
* @property {subscription.IPlan|null} [plan] SubscriptionCreated plan
|
|
9364
|
+
* @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionCreated subscriptionState
|
|
9340
9365
|
*/
|
|
9341
9366
|
|
|
9342
9367
|
/**
|
|
@@ -9434,6 +9459,14 @@ $root.SubscriptionCreated = (function() {
|
|
|
9434
9459
|
*/
|
|
9435
9460
|
SubscriptionCreated.prototype.plan = null;
|
|
9436
9461
|
|
|
9462
|
+
/**
|
|
9463
|
+
* SubscriptionCreated subscriptionState.
|
|
9464
|
+
* @member {subscription.SubscriptionState} subscriptionState
|
|
9465
|
+
* @memberof SubscriptionCreated
|
|
9466
|
+
* @instance
|
|
9467
|
+
*/
|
|
9468
|
+
SubscriptionCreated.prototype.subscriptionState = 0;
|
|
9469
|
+
|
|
9437
9470
|
/**
|
|
9438
9471
|
* Creates a new SubscriptionCreated instance using the specified properties.
|
|
9439
9472
|
* @function create
|
|
@@ -9478,6 +9511,8 @@ $root.SubscriptionCreated = (function() {
|
|
|
9478
9511
|
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
|
|
9479
9512
|
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
9480
9513
|
$root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
9514
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
9515
|
+
writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
|
|
9481
9516
|
return writer;
|
|
9482
9517
|
};
|
|
9483
9518
|
|
|
@@ -9542,6 +9577,9 @@ $root.SubscriptionCreated = (function() {
|
|
|
9542
9577
|
case 10:
|
|
9543
9578
|
message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
|
|
9544
9579
|
break;
|
|
9580
|
+
case 11:
|
|
9581
|
+
message.subscriptionState = reader.int32();
|
|
9582
|
+
break;
|
|
9545
9583
|
default:
|
|
9546
9584
|
reader.skipType(tag & 7);
|
|
9547
9585
|
break;
|
|
@@ -9624,6 +9662,19 @@ $root.SubscriptionCreated = (function() {
|
|
|
9624
9662
|
if (error)
|
|
9625
9663
|
return "plan." + error;
|
|
9626
9664
|
}
|
|
9665
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
9666
|
+
switch (message.subscriptionState) {
|
|
9667
|
+
default:
|
|
9668
|
+
return "subscriptionState: enum value expected";
|
|
9669
|
+
case 0:
|
|
9670
|
+
case 1:
|
|
9671
|
+
case 2:
|
|
9672
|
+
case 3:
|
|
9673
|
+
case 4:
|
|
9674
|
+
case 6:
|
|
9675
|
+
case 5:
|
|
9676
|
+
break;
|
|
9677
|
+
}
|
|
9627
9678
|
return null;
|
|
9628
9679
|
};
|
|
9629
9680
|
|
|
@@ -9726,6 +9777,36 @@ $root.SubscriptionCreated = (function() {
|
|
|
9726
9777
|
throw TypeError(".SubscriptionCreated.plan: object expected");
|
|
9727
9778
|
message.plan = $root.subscription.Plan.fromObject(object.plan);
|
|
9728
9779
|
}
|
|
9780
|
+
switch (object.subscriptionState) {
|
|
9781
|
+
case "SUBSTATE_UNKNOWN":
|
|
9782
|
+
case 0:
|
|
9783
|
+
message.subscriptionState = 0;
|
|
9784
|
+
break;
|
|
9785
|
+
case "SUBSTATE_NONE":
|
|
9786
|
+
case 1:
|
|
9787
|
+
message.subscriptionState = 1;
|
|
9788
|
+
break;
|
|
9789
|
+
case "SUBSTATE_FREE_SUBSCRIPTION":
|
|
9790
|
+
case 2:
|
|
9791
|
+
message.subscriptionState = 2;
|
|
9792
|
+
break;
|
|
9793
|
+
case "SUBSTATE_FREE_TRIAL":
|
|
9794
|
+
case 3:
|
|
9795
|
+
message.subscriptionState = 3;
|
|
9796
|
+
break;
|
|
9797
|
+
case "SUBSTATE_PAYING":
|
|
9798
|
+
case 4:
|
|
9799
|
+
message.subscriptionState = 4;
|
|
9800
|
+
break;
|
|
9801
|
+
case "SUBSTATE_GRACE":
|
|
9802
|
+
case 6:
|
|
9803
|
+
message.subscriptionState = 6;
|
|
9804
|
+
break;
|
|
9805
|
+
case "SUBSTATE_CANCELLED":
|
|
9806
|
+
case 5:
|
|
9807
|
+
message.subscriptionState = 5;
|
|
9808
|
+
break;
|
|
9809
|
+
}
|
|
9729
9810
|
return message;
|
|
9730
9811
|
};
|
|
9731
9812
|
|
|
@@ -9769,6 +9850,7 @@ $root.SubscriptionCreated = (function() {
|
|
|
9769
9850
|
object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
|
|
9770
9851
|
object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
|
|
9771
9852
|
object.plan = null;
|
|
9853
|
+
object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
|
|
9772
9854
|
}
|
|
9773
9855
|
if (message.id != null && message.hasOwnProperty("id"))
|
|
9774
9856
|
object.id = message.id;
|
|
@@ -9802,6 +9884,8 @@ $root.SubscriptionCreated = (function() {
|
|
|
9802
9884
|
object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
|
|
9803
9885
|
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
9804
9886
|
object.plan = $root.subscription.Plan.toObject(message.plan, options);
|
|
9887
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
9888
|
+
object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
|
|
9805
9889
|
return object;
|
|
9806
9890
|
};
|
|
9807
9891
|
|
|
@@ -9837,6 +9921,7 @@ $root.SubscriptionCancelled = (function() {
|
|
|
9837
9921
|
* @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionCancelled autoRenewalStatus
|
|
9838
9922
|
* @property {subscription.IPlan|null} [plan] SubscriptionCancelled plan
|
|
9839
9923
|
* @property {subscription.CancellationType|null} [cancellationType] SubscriptionCancelled cancellationType
|
|
9924
|
+
* @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionCancelled subscriptionState
|
|
9840
9925
|
*/
|
|
9841
9926
|
|
|
9842
9927
|
/**
|
|
@@ -9950,6 +10035,14 @@ $root.SubscriptionCancelled = (function() {
|
|
|
9950
10035
|
*/
|
|
9951
10036
|
SubscriptionCancelled.prototype.cancellationType = 0;
|
|
9952
10037
|
|
|
10038
|
+
/**
|
|
10039
|
+
* SubscriptionCancelled subscriptionState.
|
|
10040
|
+
* @member {subscription.SubscriptionState} subscriptionState
|
|
10041
|
+
* @memberof SubscriptionCancelled
|
|
10042
|
+
* @instance
|
|
10043
|
+
*/
|
|
10044
|
+
SubscriptionCancelled.prototype.subscriptionState = 0;
|
|
10045
|
+
|
|
9953
10046
|
/**
|
|
9954
10047
|
* Creates a new SubscriptionCancelled instance using the specified properties.
|
|
9955
10048
|
* @function create
|
|
@@ -9998,6 +10091,8 @@ $root.SubscriptionCancelled = (function() {
|
|
|
9998
10091
|
$root.subscription.Plan.encode(message.plan, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
|
9999
10092
|
if (message.cancellationType != null && message.hasOwnProperty("cancellationType"))
|
|
10000
10093
|
writer.uint32(/* id 12, wireType 0 =*/96).int32(message.cancellationType);
|
|
10094
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
10095
|
+
writer.uint32(/* id 13, wireType 0 =*/104).int32(message.subscriptionState);
|
|
10001
10096
|
return writer;
|
|
10002
10097
|
};
|
|
10003
10098
|
|
|
@@ -10068,6 +10163,9 @@ $root.SubscriptionCancelled = (function() {
|
|
|
10068
10163
|
case 12:
|
|
10069
10164
|
message.cancellationType = reader.int32();
|
|
10070
10165
|
break;
|
|
10166
|
+
case 13:
|
|
10167
|
+
message.subscriptionState = reader.int32();
|
|
10168
|
+
break;
|
|
10071
10169
|
default:
|
|
10072
10170
|
reader.skipType(tag & 7);
|
|
10073
10171
|
break;
|
|
@@ -10164,6 +10262,19 @@ $root.SubscriptionCancelled = (function() {
|
|
|
10164
10262
|
case 2:
|
|
10165
10263
|
break;
|
|
10166
10264
|
}
|
|
10265
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
10266
|
+
switch (message.subscriptionState) {
|
|
10267
|
+
default:
|
|
10268
|
+
return "subscriptionState: enum value expected";
|
|
10269
|
+
case 0:
|
|
10270
|
+
case 1:
|
|
10271
|
+
case 2:
|
|
10272
|
+
case 3:
|
|
10273
|
+
case 4:
|
|
10274
|
+
case 6:
|
|
10275
|
+
case 5:
|
|
10276
|
+
break;
|
|
10277
|
+
}
|
|
10167
10278
|
return null;
|
|
10168
10279
|
};
|
|
10169
10280
|
|
|
@@ -10285,6 +10396,36 @@ $root.SubscriptionCancelled = (function() {
|
|
|
10285
10396
|
message.cancellationType = 2;
|
|
10286
10397
|
break;
|
|
10287
10398
|
}
|
|
10399
|
+
switch (object.subscriptionState) {
|
|
10400
|
+
case "SUBSTATE_UNKNOWN":
|
|
10401
|
+
case 0:
|
|
10402
|
+
message.subscriptionState = 0;
|
|
10403
|
+
break;
|
|
10404
|
+
case "SUBSTATE_NONE":
|
|
10405
|
+
case 1:
|
|
10406
|
+
message.subscriptionState = 1;
|
|
10407
|
+
break;
|
|
10408
|
+
case "SUBSTATE_FREE_SUBSCRIPTION":
|
|
10409
|
+
case 2:
|
|
10410
|
+
message.subscriptionState = 2;
|
|
10411
|
+
break;
|
|
10412
|
+
case "SUBSTATE_FREE_TRIAL":
|
|
10413
|
+
case 3:
|
|
10414
|
+
message.subscriptionState = 3;
|
|
10415
|
+
break;
|
|
10416
|
+
case "SUBSTATE_PAYING":
|
|
10417
|
+
case 4:
|
|
10418
|
+
message.subscriptionState = 4;
|
|
10419
|
+
break;
|
|
10420
|
+
case "SUBSTATE_GRACE":
|
|
10421
|
+
case 6:
|
|
10422
|
+
message.subscriptionState = 6;
|
|
10423
|
+
break;
|
|
10424
|
+
case "SUBSTATE_CANCELLED":
|
|
10425
|
+
case 5:
|
|
10426
|
+
message.subscriptionState = 5;
|
|
10427
|
+
break;
|
|
10428
|
+
}
|
|
10288
10429
|
return message;
|
|
10289
10430
|
};
|
|
10290
10431
|
|
|
@@ -10330,6 +10471,7 @@ $root.SubscriptionCancelled = (function() {
|
|
|
10330
10471
|
object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
|
|
10331
10472
|
object.plan = null;
|
|
10332
10473
|
object.cancellationType = options.enums === String ? "CT_UNKNOWN" : 0;
|
|
10474
|
+
object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
|
|
10333
10475
|
}
|
|
10334
10476
|
if (message.id != null && message.hasOwnProperty("id"))
|
|
10335
10477
|
object.id = message.id;
|
|
@@ -10367,6 +10509,8 @@ $root.SubscriptionCancelled = (function() {
|
|
|
10367
10509
|
object.plan = $root.subscription.Plan.toObject(message.plan, options);
|
|
10368
10510
|
if (message.cancellationType != null && message.hasOwnProperty("cancellationType"))
|
|
10369
10511
|
object.cancellationType = options.enums === String ? $root.subscription.CancellationType[message.cancellationType] : message.cancellationType;
|
|
10512
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
10513
|
+
object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
|
|
10370
10514
|
return object;
|
|
10371
10515
|
};
|
|
10372
10516
|
|
|
@@ -10400,6 +10544,7 @@ $root.SubscriptionRenewed = (function() {
|
|
|
10400
10544
|
* @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionRenewed platform
|
|
10401
10545
|
* @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionRenewed autoRenewalStatus
|
|
10402
10546
|
* @property {subscription.IPlan|null} [plan] SubscriptionRenewed plan
|
|
10547
|
+
* @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionRenewed subscriptionState
|
|
10403
10548
|
*/
|
|
10404
10549
|
|
|
10405
10550
|
/**
|
|
@@ -10497,6 +10642,14 @@ $root.SubscriptionRenewed = (function() {
|
|
|
10497
10642
|
*/
|
|
10498
10643
|
SubscriptionRenewed.prototype.plan = null;
|
|
10499
10644
|
|
|
10645
|
+
/**
|
|
10646
|
+
* SubscriptionRenewed subscriptionState.
|
|
10647
|
+
* @member {subscription.SubscriptionState} subscriptionState
|
|
10648
|
+
* @memberof SubscriptionRenewed
|
|
10649
|
+
* @instance
|
|
10650
|
+
*/
|
|
10651
|
+
SubscriptionRenewed.prototype.subscriptionState = 0;
|
|
10652
|
+
|
|
10500
10653
|
/**
|
|
10501
10654
|
* Creates a new SubscriptionRenewed instance using the specified properties.
|
|
10502
10655
|
* @function create
|
|
@@ -10541,6 +10694,8 @@ $root.SubscriptionRenewed = (function() {
|
|
|
10541
10694
|
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
|
|
10542
10695
|
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
10543
10696
|
$root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
10697
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
10698
|
+
writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
|
|
10544
10699
|
return writer;
|
|
10545
10700
|
};
|
|
10546
10701
|
|
|
@@ -10605,6 +10760,9 @@ $root.SubscriptionRenewed = (function() {
|
|
|
10605
10760
|
case 10:
|
|
10606
10761
|
message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
|
|
10607
10762
|
break;
|
|
10763
|
+
case 11:
|
|
10764
|
+
message.subscriptionState = reader.int32();
|
|
10765
|
+
break;
|
|
10608
10766
|
default:
|
|
10609
10767
|
reader.skipType(tag & 7);
|
|
10610
10768
|
break;
|
|
@@ -10687,6 +10845,19 @@ $root.SubscriptionRenewed = (function() {
|
|
|
10687
10845
|
if (error)
|
|
10688
10846
|
return "plan." + error;
|
|
10689
10847
|
}
|
|
10848
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
10849
|
+
switch (message.subscriptionState) {
|
|
10850
|
+
default:
|
|
10851
|
+
return "subscriptionState: enum value expected";
|
|
10852
|
+
case 0:
|
|
10853
|
+
case 1:
|
|
10854
|
+
case 2:
|
|
10855
|
+
case 3:
|
|
10856
|
+
case 4:
|
|
10857
|
+
case 6:
|
|
10858
|
+
case 5:
|
|
10859
|
+
break;
|
|
10860
|
+
}
|
|
10690
10861
|
return null;
|
|
10691
10862
|
};
|
|
10692
10863
|
|
|
@@ -10789,6 +10960,36 @@ $root.SubscriptionRenewed = (function() {
|
|
|
10789
10960
|
throw TypeError(".SubscriptionRenewed.plan: object expected");
|
|
10790
10961
|
message.plan = $root.subscription.Plan.fromObject(object.plan);
|
|
10791
10962
|
}
|
|
10963
|
+
switch (object.subscriptionState) {
|
|
10964
|
+
case "SUBSTATE_UNKNOWN":
|
|
10965
|
+
case 0:
|
|
10966
|
+
message.subscriptionState = 0;
|
|
10967
|
+
break;
|
|
10968
|
+
case "SUBSTATE_NONE":
|
|
10969
|
+
case 1:
|
|
10970
|
+
message.subscriptionState = 1;
|
|
10971
|
+
break;
|
|
10972
|
+
case "SUBSTATE_FREE_SUBSCRIPTION":
|
|
10973
|
+
case 2:
|
|
10974
|
+
message.subscriptionState = 2;
|
|
10975
|
+
break;
|
|
10976
|
+
case "SUBSTATE_FREE_TRIAL":
|
|
10977
|
+
case 3:
|
|
10978
|
+
message.subscriptionState = 3;
|
|
10979
|
+
break;
|
|
10980
|
+
case "SUBSTATE_PAYING":
|
|
10981
|
+
case 4:
|
|
10982
|
+
message.subscriptionState = 4;
|
|
10983
|
+
break;
|
|
10984
|
+
case "SUBSTATE_GRACE":
|
|
10985
|
+
case 6:
|
|
10986
|
+
message.subscriptionState = 6;
|
|
10987
|
+
break;
|
|
10988
|
+
case "SUBSTATE_CANCELLED":
|
|
10989
|
+
case 5:
|
|
10990
|
+
message.subscriptionState = 5;
|
|
10991
|
+
break;
|
|
10992
|
+
}
|
|
10792
10993
|
return message;
|
|
10793
10994
|
};
|
|
10794
10995
|
|
|
@@ -10832,6 +11033,7 @@ $root.SubscriptionRenewed = (function() {
|
|
|
10832
11033
|
object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
|
|
10833
11034
|
object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
|
|
10834
11035
|
object.plan = null;
|
|
11036
|
+
object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
|
|
10835
11037
|
}
|
|
10836
11038
|
if (message.id != null && message.hasOwnProperty("id"))
|
|
10837
11039
|
object.id = message.id;
|
|
@@ -10865,6 +11067,8 @@ $root.SubscriptionRenewed = (function() {
|
|
|
10865
11067
|
object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
|
|
10866
11068
|
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
10867
11069
|
object.plan = $root.subscription.Plan.toObject(message.plan, options);
|
|
11070
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
11071
|
+
object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
|
|
10868
11072
|
return object;
|
|
10869
11073
|
};
|
|
10870
11074
|
|
|
@@ -11920,6 +12124,7 @@ $root.SubscriptionGraced = (function() {
|
|
|
11920
12124
|
* @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionGraced platform
|
|
11921
12125
|
* @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionGraced autoRenewalStatus
|
|
11922
12126
|
* @property {subscription.IPlan|null} [plan] SubscriptionGraced plan
|
|
12127
|
+
* @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionGraced subscriptionState
|
|
11923
12128
|
*/
|
|
11924
12129
|
|
|
11925
12130
|
/**
|
|
@@ -12017,6 +12222,14 @@ $root.SubscriptionGraced = (function() {
|
|
|
12017
12222
|
*/
|
|
12018
12223
|
SubscriptionGraced.prototype.plan = null;
|
|
12019
12224
|
|
|
12225
|
+
/**
|
|
12226
|
+
* SubscriptionGraced subscriptionState.
|
|
12227
|
+
* @member {subscription.SubscriptionState} subscriptionState
|
|
12228
|
+
* @memberof SubscriptionGraced
|
|
12229
|
+
* @instance
|
|
12230
|
+
*/
|
|
12231
|
+
SubscriptionGraced.prototype.subscriptionState = 0;
|
|
12232
|
+
|
|
12020
12233
|
/**
|
|
12021
12234
|
* Creates a new SubscriptionGraced instance using the specified properties.
|
|
12022
12235
|
* @function create
|
|
@@ -12061,6 +12274,8 @@ $root.SubscriptionGraced = (function() {
|
|
|
12061
12274
|
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
|
|
12062
12275
|
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
12063
12276
|
$root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
12277
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
12278
|
+
writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
|
|
12064
12279
|
return writer;
|
|
12065
12280
|
};
|
|
12066
12281
|
|
|
@@ -12125,6 +12340,9 @@ $root.SubscriptionGraced = (function() {
|
|
|
12125
12340
|
case 10:
|
|
12126
12341
|
message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
|
|
12127
12342
|
break;
|
|
12343
|
+
case 11:
|
|
12344
|
+
message.subscriptionState = reader.int32();
|
|
12345
|
+
break;
|
|
12128
12346
|
default:
|
|
12129
12347
|
reader.skipType(tag & 7);
|
|
12130
12348
|
break;
|
|
@@ -12207,6 +12425,19 @@ $root.SubscriptionGraced = (function() {
|
|
|
12207
12425
|
if (error)
|
|
12208
12426
|
return "plan." + error;
|
|
12209
12427
|
}
|
|
12428
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
12429
|
+
switch (message.subscriptionState) {
|
|
12430
|
+
default:
|
|
12431
|
+
return "subscriptionState: enum value expected";
|
|
12432
|
+
case 0:
|
|
12433
|
+
case 1:
|
|
12434
|
+
case 2:
|
|
12435
|
+
case 3:
|
|
12436
|
+
case 4:
|
|
12437
|
+
case 6:
|
|
12438
|
+
case 5:
|
|
12439
|
+
break;
|
|
12440
|
+
}
|
|
12210
12441
|
return null;
|
|
12211
12442
|
};
|
|
12212
12443
|
|
|
@@ -12309,6 +12540,36 @@ $root.SubscriptionGraced = (function() {
|
|
|
12309
12540
|
throw TypeError(".SubscriptionGraced.plan: object expected");
|
|
12310
12541
|
message.plan = $root.subscription.Plan.fromObject(object.plan);
|
|
12311
12542
|
}
|
|
12543
|
+
switch (object.subscriptionState) {
|
|
12544
|
+
case "SUBSTATE_UNKNOWN":
|
|
12545
|
+
case 0:
|
|
12546
|
+
message.subscriptionState = 0;
|
|
12547
|
+
break;
|
|
12548
|
+
case "SUBSTATE_NONE":
|
|
12549
|
+
case 1:
|
|
12550
|
+
message.subscriptionState = 1;
|
|
12551
|
+
break;
|
|
12552
|
+
case "SUBSTATE_FREE_SUBSCRIPTION":
|
|
12553
|
+
case 2:
|
|
12554
|
+
message.subscriptionState = 2;
|
|
12555
|
+
break;
|
|
12556
|
+
case "SUBSTATE_FREE_TRIAL":
|
|
12557
|
+
case 3:
|
|
12558
|
+
message.subscriptionState = 3;
|
|
12559
|
+
break;
|
|
12560
|
+
case "SUBSTATE_PAYING":
|
|
12561
|
+
case 4:
|
|
12562
|
+
message.subscriptionState = 4;
|
|
12563
|
+
break;
|
|
12564
|
+
case "SUBSTATE_GRACE":
|
|
12565
|
+
case 6:
|
|
12566
|
+
message.subscriptionState = 6;
|
|
12567
|
+
break;
|
|
12568
|
+
case "SUBSTATE_CANCELLED":
|
|
12569
|
+
case 5:
|
|
12570
|
+
message.subscriptionState = 5;
|
|
12571
|
+
break;
|
|
12572
|
+
}
|
|
12312
12573
|
return message;
|
|
12313
12574
|
};
|
|
12314
12575
|
|
|
@@ -12352,6 +12613,7 @@ $root.SubscriptionGraced = (function() {
|
|
|
12352
12613
|
object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
|
|
12353
12614
|
object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
|
|
12354
12615
|
object.plan = null;
|
|
12616
|
+
object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
|
|
12355
12617
|
}
|
|
12356
12618
|
if (message.id != null && message.hasOwnProperty("id"))
|
|
12357
12619
|
object.id = message.id;
|
|
@@ -12385,6 +12647,8 @@ $root.SubscriptionGraced = (function() {
|
|
|
12385
12647
|
object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
|
|
12386
12648
|
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
12387
12649
|
object.plan = $root.subscription.Plan.toObject(message.plan, options);
|
|
12650
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
12651
|
+
object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
|
|
12388
12652
|
return object;
|
|
12389
12653
|
};
|
|
12390
12654
|
|
|
@@ -12417,6 +12681,7 @@ $root.SubscriptionStarted = (function() {
|
|
|
12417
12681
|
* @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionStarted platform
|
|
12418
12682
|
* @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionStarted autoRenewalStatus
|
|
12419
12683
|
* @property {subscription.IPlan|null} [plan] SubscriptionStarted plan
|
|
12684
|
+
* @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionStarted subscriptionState
|
|
12420
12685
|
*/
|
|
12421
12686
|
|
|
12422
12687
|
/**
|
|
@@ -12506,6 +12771,14 @@ $root.SubscriptionStarted = (function() {
|
|
|
12506
12771
|
*/
|
|
12507
12772
|
SubscriptionStarted.prototype.plan = null;
|
|
12508
12773
|
|
|
12774
|
+
/**
|
|
12775
|
+
* SubscriptionStarted subscriptionState.
|
|
12776
|
+
* @member {subscription.SubscriptionState} subscriptionState
|
|
12777
|
+
* @memberof SubscriptionStarted
|
|
12778
|
+
* @instance
|
|
12779
|
+
*/
|
|
12780
|
+
SubscriptionStarted.prototype.subscriptionState = 0;
|
|
12781
|
+
|
|
12509
12782
|
/**
|
|
12510
12783
|
* Creates a new SubscriptionStarted instance using the specified properties.
|
|
12511
12784
|
* @function create
|
|
@@ -12548,6 +12821,8 @@ $root.SubscriptionStarted = (function() {
|
|
|
12548
12821
|
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
|
|
12549
12822
|
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
12550
12823
|
$root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
12824
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
12825
|
+
writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
|
|
12551
12826
|
return writer;
|
|
12552
12827
|
};
|
|
12553
12828
|
|
|
@@ -12609,6 +12884,9 @@ $root.SubscriptionStarted = (function() {
|
|
|
12609
12884
|
case 10:
|
|
12610
12885
|
message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
|
|
12611
12886
|
break;
|
|
12887
|
+
case 11:
|
|
12888
|
+
message.subscriptionState = reader.int32();
|
|
12889
|
+
break;
|
|
12612
12890
|
default:
|
|
12613
12891
|
reader.skipType(tag & 7);
|
|
12614
12892
|
break;
|
|
@@ -12688,6 +12966,19 @@ $root.SubscriptionStarted = (function() {
|
|
|
12688
12966
|
if (error)
|
|
12689
12967
|
return "plan." + error;
|
|
12690
12968
|
}
|
|
12969
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
12970
|
+
switch (message.subscriptionState) {
|
|
12971
|
+
default:
|
|
12972
|
+
return "subscriptionState: enum value expected";
|
|
12973
|
+
case 0:
|
|
12974
|
+
case 1:
|
|
12975
|
+
case 2:
|
|
12976
|
+
case 3:
|
|
12977
|
+
case 4:
|
|
12978
|
+
case 6:
|
|
12979
|
+
case 5:
|
|
12980
|
+
break;
|
|
12981
|
+
}
|
|
12691
12982
|
return null;
|
|
12692
12983
|
};
|
|
12693
12984
|
|
|
@@ -12788,6 +13079,36 @@ $root.SubscriptionStarted = (function() {
|
|
|
12788
13079
|
throw TypeError(".SubscriptionStarted.plan: object expected");
|
|
12789
13080
|
message.plan = $root.subscription.Plan.fromObject(object.plan);
|
|
12790
13081
|
}
|
|
13082
|
+
switch (object.subscriptionState) {
|
|
13083
|
+
case "SUBSTATE_UNKNOWN":
|
|
13084
|
+
case 0:
|
|
13085
|
+
message.subscriptionState = 0;
|
|
13086
|
+
break;
|
|
13087
|
+
case "SUBSTATE_NONE":
|
|
13088
|
+
case 1:
|
|
13089
|
+
message.subscriptionState = 1;
|
|
13090
|
+
break;
|
|
13091
|
+
case "SUBSTATE_FREE_SUBSCRIPTION":
|
|
13092
|
+
case 2:
|
|
13093
|
+
message.subscriptionState = 2;
|
|
13094
|
+
break;
|
|
13095
|
+
case "SUBSTATE_FREE_TRIAL":
|
|
13096
|
+
case 3:
|
|
13097
|
+
message.subscriptionState = 3;
|
|
13098
|
+
break;
|
|
13099
|
+
case "SUBSTATE_PAYING":
|
|
13100
|
+
case 4:
|
|
13101
|
+
message.subscriptionState = 4;
|
|
13102
|
+
break;
|
|
13103
|
+
case "SUBSTATE_GRACE":
|
|
13104
|
+
case 6:
|
|
13105
|
+
message.subscriptionState = 6;
|
|
13106
|
+
break;
|
|
13107
|
+
case "SUBSTATE_CANCELLED":
|
|
13108
|
+
case 5:
|
|
13109
|
+
message.subscriptionState = 5;
|
|
13110
|
+
break;
|
|
13111
|
+
}
|
|
12791
13112
|
return message;
|
|
12792
13113
|
};
|
|
12793
13114
|
|
|
@@ -12830,6 +13151,7 @@ $root.SubscriptionStarted = (function() {
|
|
|
12830
13151
|
object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
|
|
12831
13152
|
object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
|
|
12832
13153
|
object.plan = null;
|
|
13154
|
+
object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
|
|
12833
13155
|
}
|
|
12834
13156
|
if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
|
|
12835
13157
|
if (typeof message.updatedOn === "number")
|
|
@@ -12861,6 +13183,8 @@ $root.SubscriptionStarted = (function() {
|
|
|
12861
13183
|
object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
|
|
12862
13184
|
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
12863
13185
|
object.plan = $root.subscription.Plan.toObject(message.plan, options);
|
|
13186
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
13187
|
+
object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
|
|
12864
13188
|
return object;
|
|
12865
13189
|
};
|
|
12866
13190
|
|
|
@@ -12894,6 +13218,7 @@ $root.SubscriptionEnded = (function() {
|
|
|
12894
13218
|
* @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionEnded autoRenewalStatus
|
|
12895
13219
|
* @property {subscription.IPlan|null} [plan] SubscriptionEnded plan
|
|
12896
13220
|
* @property {subscription.CancellationType|null} [cancellationType] SubscriptionEnded cancellationType
|
|
13221
|
+
* @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionEnded subscriptionState
|
|
12897
13222
|
*/
|
|
12898
13223
|
|
|
12899
13224
|
/**
|
|
@@ -12991,6 +13316,14 @@ $root.SubscriptionEnded = (function() {
|
|
|
12991
13316
|
*/
|
|
12992
13317
|
SubscriptionEnded.prototype.cancellationType = 0;
|
|
12993
13318
|
|
|
13319
|
+
/**
|
|
13320
|
+
* SubscriptionEnded subscriptionState.
|
|
13321
|
+
* @member {subscription.SubscriptionState} subscriptionState
|
|
13322
|
+
* @memberof SubscriptionEnded
|
|
13323
|
+
* @instance
|
|
13324
|
+
*/
|
|
13325
|
+
SubscriptionEnded.prototype.subscriptionState = 0;
|
|
13326
|
+
|
|
12994
13327
|
/**
|
|
12995
13328
|
* Creates a new SubscriptionEnded instance using the specified properties.
|
|
12996
13329
|
* @function create
|
|
@@ -13035,6 +13368,8 @@ $root.SubscriptionEnded = (function() {
|
|
|
13035
13368
|
$root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
13036
13369
|
if (message.cancellationType != null && message.hasOwnProperty("cancellationType"))
|
|
13037
13370
|
writer.uint32(/* id 11, wireType 0 =*/88).int32(message.cancellationType);
|
|
13371
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
13372
|
+
writer.uint32(/* id 12, wireType 0 =*/96).int32(message.subscriptionState);
|
|
13038
13373
|
return writer;
|
|
13039
13374
|
};
|
|
13040
13375
|
|
|
@@ -13099,6 +13434,9 @@ $root.SubscriptionEnded = (function() {
|
|
|
13099
13434
|
case 11:
|
|
13100
13435
|
message.cancellationType = reader.int32();
|
|
13101
13436
|
break;
|
|
13437
|
+
case 12:
|
|
13438
|
+
message.subscriptionState = reader.int32();
|
|
13439
|
+
break;
|
|
13102
13440
|
default:
|
|
13103
13441
|
reader.skipType(tag & 7);
|
|
13104
13442
|
break;
|
|
@@ -13187,6 +13525,19 @@ $root.SubscriptionEnded = (function() {
|
|
|
13187
13525
|
case 2:
|
|
13188
13526
|
break;
|
|
13189
13527
|
}
|
|
13528
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
13529
|
+
switch (message.subscriptionState) {
|
|
13530
|
+
default:
|
|
13531
|
+
return "subscriptionState: enum value expected";
|
|
13532
|
+
case 0:
|
|
13533
|
+
case 1:
|
|
13534
|
+
case 2:
|
|
13535
|
+
case 3:
|
|
13536
|
+
case 4:
|
|
13537
|
+
case 6:
|
|
13538
|
+
case 5:
|
|
13539
|
+
break;
|
|
13540
|
+
}
|
|
13190
13541
|
return null;
|
|
13191
13542
|
};
|
|
13192
13543
|
|
|
@@ -13301,6 +13652,36 @@ $root.SubscriptionEnded = (function() {
|
|
|
13301
13652
|
message.cancellationType = 2;
|
|
13302
13653
|
break;
|
|
13303
13654
|
}
|
|
13655
|
+
switch (object.subscriptionState) {
|
|
13656
|
+
case "SUBSTATE_UNKNOWN":
|
|
13657
|
+
case 0:
|
|
13658
|
+
message.subscriptionState = 0;
|
|
13659
|
+
break;
|
|
13660
|
+
case "SUBSTATE_NONE":
|
|
13661
|
+
case 1:
|
|
13662
|
+
message.subscriptionState = 1;
|
|
13663
|
+
break;
|
|
13664
|
+
case "SUBSTATE_FREE_SUBSCRIPTION":
|
|
13665
|
+
case 2:
|
|
13666
|
+
message.subscriptionState = 2;
|
|
13667
|
+
break;
|
|
13668
|
+
case "SUBSTATE_FREE_TRIAL":
|
|
13669
|
+
case 3:
|
|
13670
|
+
message.subscriptionState = 3;
|
|
13671
|
+
break;
|
|
13672
|
+
case "SUBSTATE_PAYING":
|
|
13673
|
+
case 4:
|
|
13674
|
+
message.subscriptionState = 4;
|
|
13675
|
+
break;
|
|
13676
|
+
case "SUBSTATE_GRACE":
|
|
13677
|
+
case 6:
|
|
13678
|
+
message.subscriptionState = 6;
|
|
13679
|
+
break;
|
|
13680
|
+
case "SUBSTATE_CANCELLED":
|
|
13681
|
+
case 5:
|
|
13682
|
+
message.subscriptionState = 5;
|
|
13683
|
+
break;
|
|
13684
|
+
}
|
|
13304
13685
|
return message;
|
|
13305
13686
|
};
|
|
13306
13687
|
|
|
@@ -13344,6 +13725,7 @@ $root.SubscriptionEnded = (function() {
|
|
|
13344
13725
|
object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
|
|
13345
13726
|
object.plan = null;
|
|
13346
13727
|
object.cancellationType = options.enums === String ? "CT_UNKNOWN" : 0;
|
|
13728
|
+
object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
|
|
13347
13729
|
}
|
|
13348
13730
|
if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
|
|
13349
13731
|
if (typeof message.updatedOn === "number")
|
|
@@ -13377,6 +13759,8 @@ $root.SubscriptionEnded = (function() {
|
|
|
13377
13759
|
object.plan = $root.subscription.Plan.toObject(message.plan, options);
|
|
13378
13760
|
if (message.cancellationType != null && message.hasOwnProperty("cancellationType"))
|
|
13379
13761
|
object.cancellationType = options.enums === String ? $root.subscription.CancellationType[message.cancellationType] : message.cancellationType;
|
|
13762
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
13763
|
+
object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
|
|
13380
13764
|
return object;
|
|
13381
13765
|
};
|
|
13382
13766
|
|
|
@@ -13394,6 +13778,542 @@ $root.SubscriptionEnded = (function() {
|
|
|
13394
13778
|
return SubscriptionEnded;
|
|
13395
13779
|
})();
|
|
13396
13780
|
|
|
13781
|
+
$root.SubscriptionRecovered = (function() {
|
|
13782
|
+
|
|
13783
|
+
/**
|
|
13784
|
+
* Properties of a SubscriptionRecovered.
|
|
13785
|
+
* @exports ISubscriptionRecovered
|
|
13786
|
+
* @interface ISubscriptionRecovered
|
|
13787
|
+
* @property {number|Long|null} [updatedOn] SubscriptionRecovered updatedOn
|
|
13788
|
+
* @property {string|null} [userId] SubscriptionRecovered userId
|
|
13789
|
+
* @property {number|Long|null} [createdAt] SubscriptionRecovered createdAt
|
|
13790
|
+
* @property {number|Long|null} [startsAt] SubscriptionRecovered startsAt
|
|
13791
|
+
* @property {number|Long|null} [endsAt] SubscriptionRecovered endsAt
|
|
13792
|
+
* @property {string|null} [voucherCode] SubscriptionRecovered voucherCode
|
|
13793
|
+
* @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionRecovered platform
|
|
13794
|
+
* @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionRecovered autoRenewalStatus
|
|
13795
|
+
* @property {subscription.IPlan|null} [plan] SubscriptionRecovered plan
|
|
13796
|
+
* @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionRecovered subscriptionState
|
|
13797
|
+
*/
|
|
13798
|
+
|
|
13799
|
+
/**
|
|
13800
|
+
* Constructs a new SubscriptionRecovered.
|
|
13801
|
+
* @exports SubscriptionRecovered
|
|
13802
|
+
* @classdesc Represents a SubscriptionRecovered.
|
|
13803
|
+
* @implements ISubscriptionRecovered
|
|
13804
|
+
* @constructor
|
|
13805
|
+
* @param {ISubscriptionRecovered=} [properties] Properties to set
|
|
13806
|
+
*/
|
|
13807
|
+
function SubscriptionRecovered(properties) {
|
|
13808
|
+
if (properties)
|
|
13809
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
13810
|
+
if (properties[keys[i]] != null)
|
|
13811
|
+
this[keys[i]] = properties[keys[i]];
|
|
13812
|
+
}
|
|
13813
|
+
|
|
13814
|
+
/**
|
|
13815
|
+
* SubscriptionRecovered updatedOn.
|
|
13816
|
+
* @member {number|Long} updatedOn
|
|
13817
|
+
* @memberof SubscriptionRecovered
|
|
13818
|
+
* @instance
|
|
13819
|
+
*/
|
|
13820
|
+
SubscriptionRecovered.prototype.updatedOn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
13821
|
+
|
|
13822
|
+
/**
|
|
13823
|
+
* SubscriptionRecovered userId.
|
|
13824
|
+
* @member {string} userId
|
|
13825
|
+
* @memberof SubscriptionRecovered
|
|
13826
|
+
* @instance
|
|
13827
|
+
*/
|
|
13828
|
+
SubscriptionRecovered.prototype.userId = "";
|
|
13829
|
+
|
|
13830
|
+
/**
|
|
13831
|
+
* SubscriptionRecovered createdAt.
|
|
13832
|
+
* @member {number|Long} createdAt
|
|
13833
|
+
* @memberof SubscriptionRecovered
|
|
13834
|
+
* @instance
|
|
13835
|
+
*/
|
|
13836
|
+
SubscriptionRecovered.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
13837
|
+
|
|
13838
|
+
/**
|
|
13839
|
+
* SubscriptionRecovered startsAt.
|
|
13840
|
+
* @member {number|Long} startsAt
|
|
13841
|
+
* @memberof SubscriptionRecovered
|
|
13842
|
+
* @instance
|
|
13843
|
+
*/
|
|
13844
|
+
SubscriptionRecovered.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
13845
|
+
|
|
13846
|
+
/**
|
|
13847
|
+
* SubscriptionRecovered endsAt.
|
|
13848
|
+
* @member {number|Long} endsAt
|
|
13849
|
+
* @memberof SubscriptionRecovered
|
|
13850
|
+
* @instance
|
|
13851
|
+
*/
|
|
13852
|
+
SubscriptionRecovered.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
13853
|
+
|
|
13854
|
+
/**
|
|
13855
|
+
* SubscriptionRecovered voucherCode.
|
|
13856
|
+
* @member {string} voucherCode
|
|
13857
|
+
* @memberof SubscriptionRecovered
|
|
13858
|
+
* @instance
|
|
13859
|
+
*/
|
|
13860
|
+
SubscriptionRecovered.prototype.voucherCode = "";
|
|
13861
|
+
|
|
13862
|
+
/**
|
|
13863
|
+
* SubscriptionRecovered platform.
|
|
13864
|
+
* @member {subscription.SubscriptionPlatform} platform
|
|
13865
|
+
* @memberof SubscriptionRecovered
|
|
13866
|
+
* @instance
|
|
13867
|
+
*/
|
|
13868
|
+
SubscriptionRecovered.prototype.platform = 0;
|
|
13869
|
+
|
|
13870
|
+
/**
|
|
13871
|
+
* SubscriptionRecovered autoRenewalStatus.
|
|
13872
|
+
* @member {subscription.AutoRenewalStatus} autoRenewalStatus
|
|
13873
|
+
* @memberof SubscriptionRecovered
|
|
13874
|
+
* @instance
|
|
13875
|
+
*/
|
|
13876
|
+
SubscriptionRecovered.prototype.autoRenewalStatus = 0;
|
|
13877
|
+
|
|
13878
|
+
/**
|
|
13879
|
+
* SubscriptionRecovered plan.
|
|
13880
|
+
* @member {subscription.IPlan|null|undefined} plan
|
|
13881
|
+
* @memberof SubscriptionRecovered
|
|
13882
|
+
* @instance
|
|
13883
|
+
*/
|
|
13884
|
+
SubscriptionRecovered.prototype.plan = null;
|
|
13885
|
+
|
|
13886
|
+
/**
|
|
13887
|
+
* SubscriptionRecovered subscriptionState.
|
|
13888
|
+
* @member {subscription.SubscriptionState} subscriptionState
|
|
13889
|
+
* @memberof SubscriptionRecovered
|
|
13890
|
+
* @instance
|
|
13891
|
+
*/
|
|
13892
|
+
SubscriptionRecovered.prototype.subscriptionState = 0;
|
|
13893
|
+
|
|
13894
|
+
/**
|
|
13895
|
+
* Creates a new SubscriptionRecovered instance using the specified properties.
|
|
13896
|
+
* @function create
|
|
13897
|
+
* @memberof SubscriptionRecovered
|
|
13898
|
+
* @static
|
|
13899
|
+
* @param {ISubscriptionRecovered=} [properties] Properties to set
|
|
13900
|
+
* @returns {SubscriptionRecovered} SubscriptionRecovered instance
|
|
13901
|
+
*/
|
|
13902
|
+
SubscriptionRecovered.create = function create(properties) {
|
|
13903
|
+
return new SubscriptionRecovered(properties);
|
|
13904
|
+
};
|
|
13905
|
+
|
|
13906
|
+
/**
|
|
13907
|
+
* Encodes the specified SubscriptionRecovered message. Does not implicitly {@link SubscriptionRecovered.verify|verify} messages.
|
|
13908
|
+
* @function encode
|
|
13909
|
+
* @memberof SubscriptionRecovered
|
|
13910
|
+
* @static
|
|
13911
|
+
* @param {ISubscriptionRecovered} message SubscriptionRecovered message or plain object to encode
|
|
13912
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
13913
|
+
* @returns {$protobuf.Writer} Writer
|
|
13914
|
+
*/
|
|
13915
|
+
SubscriptionRecovered.encode = function encode(message, writer) {
|
|
13916
|
+
if (!writer)
|
|
13917
|
+
writer = $Writer.create();
|
|
13918
|
+
if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
|
|
13919
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedOn);
|
|
13920
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
13921
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
|
|
13922
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
13923
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.createdAt);
|
|
13924
|
+
if (message.startsAt != null && message.hasOwnProperty("startsAt"))
|
|
13925
|
+
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.startsAt);
|
|
13926
|
+
if (message.endsAt != null && message.hasOwnProperty("endsAt"))
|
|
13927
|
+
writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.endsAt);
|
|
13928
|
+
if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
|
|
13929
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.voucherCode);
|
|
13930
|
+
if (message.platform != null && message.hasOwnProperty("platform"))
|
|
13931
|
+
writer.uint32(/* id 8, wireType 0 =*/64).int32(message.platform);
|
|
13932
|
+
if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
|
|
13933
|
+
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
|
|
13934
|
+
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
13935
|
+
$root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
13936
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
13937
|
+
writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
|
|
13938
|
+
return writer;
|
|
13939
|
+
};
|
|
13940
|
+
|
|
13941
|
+
/**
|
|
13942
|
+
* Encodes the specified SubscriptionRecovered message, length delimited. Does not implicitly {@link SubscriptionRecovered.verify|verify} messages.
|
|
13943
|
+
* @function encodeDelimited
|
|
13944
|
+
* @memberof SubscriptionRecovered
|
|
13945
|
+
* @static
|
|
13946
|
+
* @param {ISubscriptionRecovered} message SubscriptionRecovered message or plain object to encode
|
|
13947
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
13948
|
+
* @returns {$protobuf.Writer} Writer
|
|
13949
|
+
*/
|
|
13950
|
+
SubscriptionRecovered.encodeDelimited = function encodeDelimited(message, writer) {
|
|
13951
|
+
return this.encode(message, writer).ldelim();
|
|
13952
|
+
};
|
|
13953
|
+
|
|
13954
|
+
/**
|
|
13955
|
+
* Decodes a SubscriptionRecovered message from the specified reader or buffer.
|
|
13956
|
+
* @function decode
|
|
13957
|
+
* @memberof SubscriptionRecovered
|
|
13958
|
+
* @static
|
|
13959
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
13960
|
+
* @param {number} [length] Message length if known beforehand
|
|
13961
|
+
* @returns {SubscriptionRecovered} SubscriptionRecovered
|
|
13962
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
13963
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
13964
|
+
*/
|
|
13965
|
+
SubscriptionRecovered.decode = function decode(reader, length) {
|
|
13966
|
+
if (!(reader instanceof $Reader))
|
|
13967
|
+
reader = $Reader.create(reader);
|
|
13968
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SubscriptionRecovered();
|
|
13969
|
+
while (reader.pos < end) {
|
|
13970
|
+
var tag = reader.uint32();
|
|
13971
|
+
switch (tag >>> 3) {
|
|
13972
|
+
case 2:
|
|
13973
|
+
message.updatedOn = reader.uint64();
|
|
13974
|
+
break;
|
|
13975
|
+
case 3:
|
|
13976
|
+
message.userId = reader.string();
|
|
13977
|
+
break;
|
|
13978
|
+
case 4:
|
|
13979
|
+
message.createdAt = reader.uint64();
|
|
13980
|
+
break;
|
|
13981
|
+
case 5:
|
|
13982
|
+
message.startsAt = reader.uint64();
|
|
13983
|
+
break;
|
|
13984
|
+
case 6:
|
|
13985
|
+
message.endsAt = reader.uint64();
|
|
13986
|
+
break;
|
|
13987
|
+
case 7:
|
|
13988
|
+
message.voucherCode = reader.string();
|
|
13989
|
+
break;
|
|
13990
|
+
case 8:
|
|
13991
|
+
message.platform = reader.int32();
|
|
13992
|
+
break;
|
|
13993
|
+
case 9:
|
|
13994
|
+
message.autoRenewalStatus = reader.int32();
|
|
13995
|
+
break;
|
|
13996
|
+
case 10:
|
|
13997
|
+
message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
|
|
13998
|
+
break;
|
|
13999
|
+
case 11:
|
|
14000
|
+
message.subscriptionState = reader.int32();
|
|
14001
|
+
break;
|
|
14002
|
+
default:
|
|
14003
|
+
reader.skipType(tag & 7);
|
|
14004
|
+
break;
|
|
14005
|
+
}
|
|
14006
|
+
}
|
|
14007
|
+
return message;
|
|
14008
|
+
};
|
|
14009
|
+
|
|
14010
|
+
/**
|
|
14011
|
+
* Decodes a SubscriptionRecovered message from the specified reader or buffer, length delimited.
|
|
14012
|
+
* @function decodeDelimited
|
|
14013
|
+
* @memberof SubscriptionRecovered
|
|
14014
|
+
* @static
|
|
14015
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
14016
|
+
* @returns {SubscriptionRecovered} SubscriptionRecovered
|
|
14017
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
14018
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
14019
|
+
*/
|
|
14020
|
+
SubscriptionRecovered.decodeDelimited = function decodeDelimited(reader) {
|
|
14021
|
+
if (!(reader instanceof $Reader))
|
|
14022
|
+
reader = new $Reader(reader);
|
|
14023
|
+
return this.decode(reader, reader.uint32());
|
|
14024
|
+
};
|
|
14025
|
+
|
|
14026
|
+
/**
|
|
14027
|
+
* Verifies a SubscriptionRecovered message.
|
|
14028
|
+
* @function verify
|
|
14029
|
+
* @memberof SubscriptionRecovered
|
|
14030
|
+
* @static
|
|
14031
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
14032
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
14033
|
+
*/
|
|
14034
|
+
SubscriptionRecovered.verify = function verify(message) {
|
|
14035
|
+
if (typeof message !== "object" || message === null)
|
|
14036
|
+
return "object expected";
|
|
14037
|
+
if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
|
|
14038
|
+
if (!$util.isInteger(message.updatedOn) && !(message.updatedOn && $util.isInteger(message.updatedOn.low) && $util.isInteger(message.updatedOn.high)))
|
|
14039
|
+
return "updatedOn: integer|Long expected";
|
|
14040
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
14041
|
+
if (!$util.isString(message.userId))
|
|
14042
|
+
return "userId: string expected";
|
|
14043
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
14044
|
+
if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
|
|
14045
|
+
return "createdAt: integer|Long expected";
|
|
14046
|
+
if (message.startsAt != null && message.hasOwnProperty("startsAt"))
|
|
14047
|
+
if (!$util.isInteger(message.startsAt) && !(message.startsAt && $util.isInteger(message.startsAt.low) && $util.isInteger(message.startsAt.high)))
|
|
14048
|
+
return "startsAt: integer|Long expected";
|
|
14049
|
+
if (message.endsAt != null && message.hasOwnProperty("endsAt"))
|
|
14050
|
+
if (!$util.isInteger(message.endsAt) && !(message.endsAt && $util.isInteger(message.endsAt.low) && $util.isInteger(message.endsAt.high)))
|
|
14051
|
+
return "endsAt: integer|Long expected";
|
|
14052
|
+
if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
|
|
14053
|
+
if (!$util.isString(message.voucherCode))
|
|
14054
|
+
return "voucherCode: string expected";
|
|
14055
|
+
if (message.platform != null && message.hasOwnProperty("platform"))
|
|
14056
|
+
switch (message.platform) {
|
|
14057
|
+
default:
|
|
14058
|
+
return "platform: enum value expected";
|
|
14059
|
+
case 0:
|
|
14060
|
+
case 1:
|
|
14061
|
+
case 2:
|
|
14062
|
+
case 3:
|
|
14063
|
+
case 4:
|
|
14064
|
+
case 5:
|
|
14065
|
+
break;
|
|
14066
|
+
}
|
|
14067
|
+
if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
|
|
14068
|
+
switch (message.autoRenewalStatus) {
|
|
14069
|
+
default:
|
|
14070
|
+
return "autoRenewalStatus: enum value expected";
|
|
14071
|
+
case 0:
|
|
14072
|
+
case 1:
|
|
14073
|
+
case 2:
|
|
14074
|
+
break;
|
|
14075
|
+
}
|
|
14076
|
+
if (message.plan != null && message.hasOwnProperty("plan")) {
|
|
14077
|
+
var error = $root.subscription.Plan.verify(message.plan);
|
|
14078
|
+
if (error)
|
|
14079
|
+
return "plan." + error;
|
|
14080
|
+
}
|
|
14081
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
14082
|
+
switch (message.subscriptionState) {
|
|
14083
|
+
default:
|
|
14084
|
+
return "subscriptionState: enum value expected";
|
|
14085
|
+
case 0:
|
|
14086
|
+
case 1:
|
|
14087
|
+
case 2:
|
|
14088
|
+
case 3:
|
|
14089
|
+
case 4:
|
|
14090
|
+
case 6:
|
|
14091
|
+
case 5:
|
|
14092
|
+
break;
|
|
14093
|
+
}
|
|
14094
|
+
return null;
|
|
14095
|
+
};
|
|
14096
|
+
|
|
14097
|
+
/**
|
|
14098
|
+
* Creates a SubscriptionRecovered message from a plain object. Also converts values to their respective internal types.
|
|
14099
|
+
* @function fromObject
|
|
14100
|
+
* @memberof SubscriptionRecovered
|
|
14101
|
+
* @static
|
|
14102
|
+
* @param {Object.<string,*>} object Plain object
|
|
14103
|
+
* @returns {SubscriptionRecovered} SubscriptionRecovered
|
|
14104
|
+
*/
|
|
14105
|
+
SubscriptionRecovered.fromObject = function fromObject(object) {
|
|
14106
|
+
if (object instanceof $root.SubscriptionRecovered)
|
|
14107
|
+
return object;
|
|
14108
|
+
var message = new $root.SubscriptionRecovered();
|
|
14109
|
+
if (object.updatedOn != null)
|
|
14110
|
+
if ($util.Long)
|
|
14111
|
+
(message.updatedOn = $util.Long.fromValue(object.updatedOn)).unsigned = true;
|
|
14112
|
+
else if (typeof object.updatedOn === "string")
|
|
14113
|
+
message.updatedOn = parseInt(object.updatedOn, 10);
|
|
14114
|
+
else if (typeof object.updatedOn === "number")
|
|
14115
|
+
message.updatedOn = object.updatedOn;
|
|
14116
|
+
else if (typeof object.updatedOn === "object")
|
|
14117
|
+
message.updatedOn = new $util.LongBits(object.updatedOn.low >>> 0, object.updatedOn.high >>> 0).toNumber(true);
|
|
14118
|
+
if (object.userId != null)
|
|
14119
|
+
message.userId = String(object.userId);
|
|
14120
|
+
if (object.createdAt != null)
|
|
14121
|
+
if ($util.Long)
|
|
14122
|
+
(message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
|
|
14123
|
+
else if (typeof object.createdAt === "string")
|
|
14124
|
+
message.createdAt = parseInt(object.createdAt, 10);
|
|
14125
|
+
else if (typeof object.createdAt === "number")
|
|
14126
|
+
message.createdAt = object.createdAt;
|
|
14127
|
+
else if (typeof object.createdAt === "object")
|
|
14128
|
+
message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
|
|
14129
|
+
if (object.startsAt != null)
|
|
14130
|
+
if ($util.Long)
|
|
14131
|
+
(message.startsAt = $util.Long.fromValue(object.startsAt)).unsigned = true;
|
|
14132
|
+
else if (typeof object.startsAt === "string")
|
|
14133
|
+
message.startsAt = parseInt(object.startsAt, 10);
|
|
14134
|
+
else if (typeof object.startsAt === "number")
|
|
14135
|
+
message.startsAt = object.startsAt;
|
|
14136
|
+
else if (typeof object.startsAt === "object")
|
|
14137
|
+
message.startsAt = new $util.LongBits(object.startsAt.low >>> 0, object.startsAt.high >>> 0).toNumber(true);
|
|
14138
|
+
if (object.endsAt != null)
|
|
14139
|
+
if ($util.Long)
|
|
14140
|
+
(message.endsAt = $util.Long.fromValue(object.endsAt)).unsigned = true;
|
|
14141
|
+
else if (typeof object.endsAt === "string")
|
|
14142
|
+
message.endsAt = parseInt(object.endsAt, 10);
|
|
14143
|
+
else if (typeof object.endsAt === "number")
|
|
14144
|
+
message.endsAt = object.endsAt;
|
|
14145
|
+
else if (typeof object.endsAt === "object")
|
|
14146
|
+
message.endsAt = new $util.LongBits(object.endsAt.low >>> 0, object.endsAt.high >>> 0).toNumber(true);
|
|
14147
|
+
if (object.voucherCode != null)
|
|
14148
|
+
message.voucherCode = String(object.voucherCode);
|
|
14149
|
+
switch (object.platform) {
|
|
14150
|
+
case "PLATFORM_UNKNOWN":
|
|
14151
|
+
case 0:
|
|
14152
|
+
message.platform = 0;
|
|
14153
|
+
break;
|
|
14154
|
+
case "ITUNES":
|
|
14155
|
+
case 1:
|
|
14156
|
+
message.platform = 1;
|
|
14157
|
+
break;
|
|
14158
|
+
case "PLAY_STORE":
|
|
14159
|
+
case 2:
|
|
14160
|
+
message.platform = 2;
|
|
14161
|
+
break;
|
|
14162
|
+
case "ZUORA":
|
|
14163
|
+
case 3:
|
|
14164
|
+
message.platform = 3;
|
|
14165
|
+
break;
|
|
14166
|
+
case "HEADSPACE":
|
|
14167
|
+
case 4:
|
|
14168
|
+
message.platform = 4;
|
|
14169
|
+
break;
|
|
14170
|
+
case "SPOTIFY":
|
|
14171
|
+
case 5:
|
|
14172
|
+
message.platform = 5;
|
|
14173
|
+
break;
|
|
14174
|
+
}
|
|
14175
|
+
switch (object.autoRenewalStatus) {
|
|
14176
|
+
case "UNKNOWN_STATUS":
|
|
14177
|
+
case 0:
|
|
14178
|
+
message.autoRenewalStatus = 0;
|
|
14179
|
+
break;
|
|
14180
|
+
case "ENABLED":
|
|
14181
|
+
case 1:
|
|
14182
|
+
message.autoRenewalStatus = 1;
|
|
14183
|
+
break;
|
|
14184
|
+
case "DISABLED":
|
|
14185
|
+
case 2:
|
|
14186
|
+
message.autoRenewalStatus = 2;
|
|
14187
|
+
break;
|
|
14188
|
+
}
|
|
14189
|
+
if (object.plan != null) {
|
|
14190
|
+
if (typeof object.plan !== "object")
|
|
14191
|
+
throw TypeError(".SubscriptionRecovered.plan: object expected");
|
|
14192
|
+
message.plan = $root.subscription.Plan.fromObject(object.plan);
|
|
14193
|
+
}
|
|
14194
|
+
switch (object.subscriptionState) {
|
|
14195
|
+
case "SUBSTATE_UNKNOWN":
|
|
14196
|
+
case 0:
|
|
14197
|
+
message.subscriptionState = 0;
|
|
14198
|
+
break;
|
|
14199
|
+
case "SUBSTATE_NONE":
|
|
14200
|
+
case 1:
|
|
14201
|
+
message.subscriptionState = 1;
|
|
14202
|
+
break;
|
|
14203
|
+
case "SUBSTATE_FREE_SUBSCRIPTION":
|
|
14204
|
+
case 2:
|
|
14205
|
+
message.subscriptionState = 2;
|
|
14206
|
+
break;
|
|
14207
|
+
case "SUBSTATE_FREE_TRIAL":
|
|
14208
|
+
case 3:
|
|
14209
|
+
message.subscriptionState = 3;
|
|
14210
|
+
break;
|
|
14211
|
+
case "SUBSTATE_PAYING":
|
|
14212
|
+
case 4:
|
|
14213
|
+
message.subscriptionState = 4;
|
|
14214
|
+
break;
|
|
14215
|
+
case "SUBSTATE_GRACE":
|
|
14216
|
+
case 6:
|
|
14217
|
+
message.subscriptionState = 6;
|
|
14218
|
+
break;
|
|
14219
|
+
case "SUBSTATE_CANCELLED":
|
|
14220
|
+
case 5:
|
|
14221
|
+
message.subscriptionState = 5;
|
|
14222
|
+
break;
|
|
14223
|
+
}
|
|
14224
|
+
return message;
|
|
14225
|
+
};
|
|
14226
|
+
|
|
14227
|
+
/**
|
|
14228
|
+
* Creates a plain object from a SubscriptionRecovered message. Also converts values to other types if specified.
|
|
14229
|
+
* @function toObject
|
|
14230
|
+
* @memberof SubscriptionRecovered
|
|
14231
|
+
* @static
|
|
14232
|
+
* @param {SubscriptionRecovered} message SubscriptionRecovered
|
|
14233
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
14234
|
+
* @returns {Object.<string,*>} Plain object
|
|
14235
|
+
*/
|
|
14236
|
+
SubscriptionRecovered.toObject = function toObject(message, options) {
|
|
14237
|
+
if (!options)
|
|
14238
|
+
options = {};
|
|
14239
|
+
var object = {};
|
|
14240
|
+
if (options.defaults) {
|
|
14241
|
+
if ($util.Long) {
|
|
14242
|
+
var long = new $util.Long(0, 0, true);
|
|
14243
|
+
object.updatedOn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
14244
|
+
} else
|
|
14245
|
+
object.updatedOn = options.longs === String ? "0" : 0;
|
|
14246
|
+
object.userId = "";
|
|
14247
|
+
if ($util.Long) {
|
|
14248
|
+
var long = new $util.Long(0, 0, true);
|
|
14249
|
+
object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
14250
|
+
} else
|
|
14251
|
+
object.createdAt = options.longs === String ? "0" : 0;
|
|
14252
|
+
if ($util.Long) {
|
|
14253
|
+
var long = new $util.Long(0, 0, true);
|
|
14254
|
+
object.startsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
14255
|
+
} else
|
|
14256
|
+
object.startsAt = options.longs === String ? "0" : 0;
|
|
14257
|
+
if ($util.Long) {
|
|
14258
|
+
var long = new $util.Long(0, 0, true);
|
|
14259
|
+
object.endsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
14260
|
+
} else
|
|
14261
|
+
object.endsAt = options.longs === String ? "0" : 0;
|
|
14262
|
+
object.voucherCode = "";
|
|
14263
|
+
object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
|
|
14264
|
+
object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
|
|
14265
|
+
object.plan = null;
|
|
14266
|
+
object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
|
|
14267
|
+
}
|
|
14268
|
+
if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
|
|
14269
|
+
if (typeof message.updatedOn === "number")
|
|
14270
|
+
object.updatedOn = options.longs === String ? String(message.updatedOn) : message.updatedOn;
|
|
14271
|
+
else
|
|
14272
|
+
object.updatedOn = options.longs === String ? $util.Long.prototype.toString.call(message.updatedOn) : options.longs === Number ? new $util.LongBits(message.updatedOn.low >>> 0, message.updatedOn.high >>> 0).toNumber(true) : message.updatedOn;
|
|
14273
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
14274
|
+
object.userId = message.userId;
|
|
14275
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
14276
|
+
if (typeof message.createdAt === "number")
|
|
14277
|
+
object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
|
|
14278
|
+
else
|
|
14279
|
+
object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt;
|
|
14280
|
+
if (message.startsAt != null && message.hasOwnProperty("startsAt"))
|
|
14281
|
+
if (typeof message.startsAt === "number")
|
|
14282
|
+
object.startsAt = options.longs === String ? String(message.startsAt) : message.startsAt;
|
|
14283
|
+
else
|
|
14284
|
+
object.startsAt = options.longs === String ? $util.Long.prototype.toString.call(message.startsAt) : options.longs === Number ? new $util.LongBits(message.startsAt.low >>> 0, message.startsAt.high >>> 0).toNumber(true) : message.startsAt;
|
|
14285
|
+
if (message.endsAt != null && message.hasOwnProperty("endsAt"))
|
|
14286
|
+
if (typeof message.endsAt === "number")
|
|
14287
|
+
object.endsAt = options.longs === String ? String(message.endsAt) : message.endsAt;
|
|
14288
|
+
else
|
|
14289
|
+
object.endsAt = options.longs === String ? $util.Long.prototype.toString.call(message.endsAt) : options.longs === Number ? new $util.LongBits(message.endsAt.low >>> 0, message.endsAt.high >>> 0).toNumber(true) : message.endsAt;
|
|
14290
|
+
if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
|
|
14291
|
+
object.voucherCode = message.voucherCode;
|
|
14292
|
+
if (message.platform != null && message.hasOwnProperty("platform"))
|
|
14293
|
+
object.platform = options.enums === String ? $root.subscription.SubscriptionPlatform[message.platform] : message.platform;
|
|
14294
|
+
if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
|
|
14295
|
+
object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
|
|
14296
|
+
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
14297
|
+
object.plan = $root.subscription.Plan.toObject(message.plan, options);
|
|
14298
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
14299
|
+
object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
|
|
14300
|
+
return object;
|
|
14301
|
+
};
|
|
14302
|
+
|
|
14303
|
+
/**
|
|
14304
|
+
* Converts this SubscriptionRecovered to JSON.
|
|
14305
|
+
* @function toJSON
|
|
14306
|
+
* @memberof SubscriptionRecovered
|
|
14307
|
+
* @instance
|
|
14308
|
+
* @returns {Object.<string,*>} JSON object
|
|
14309
|
+
*/
|
|
14310
|
+
SubscriptionRecovered.prototype.toJSON = function toJSON() {
|
|
14311
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
14312
|
+
};
|
|
14313
|
+
|
|
14314
|
+
return SubscriptionRecovered;
|
|
14315
|
+
})();
|
|
14316
|
+
|
|
13397
14317
|
$root.UserDoubleOptInEmailRequested = (function() {
|
|
13398
14318
|
|
|
13399
14319
|
/**
|