@headspace/protos-events 1.170.0 → 1.171.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 +168 -0
- package/lib/index.js +695 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -22312,6 +22312,174 @@ export class SubscriptionRecovered implements ISubscriptionRecovered {
|
|
|
22312
22312
|
public toJSON(): { [k: string]: any };
|
|
22313
22313
|
}
|
|
22314
22314
|
|
|
22315
|
+
/** Properties of a SubscriptionAmended. */
|
|
22316
|
+
export interface ISubscriptionAmended {
|
|
22317
|
+
|
|
22318
|
+
/** SubscriptionAmended updatedOn */
|
|
22319
|
+
updatedOn?: (number|Long|null);
|
|
22320
|
+
|
|
22321
|
+
/** SubscriptionAmended userId */
|
|
22322
|
+
userId?: (string|null);
|
|
22323
|
+
|
|
22324
|
+
/** SubscriptionAmended createdAt */
|
|
22325
|
+
createdAt?: (number|Long|null);
|
|
22326
|
+
|
|
22327
|
+
/** SubscriptionAmended startsAt */
|
|
22328
|
+
startsAt?: (number|Long|null);
|
|
22329
|
+
|
|
22330
|
+
/** SubscriptionAmended endsAt */
|
|
22331
|
+
endsAt?: (number|Long|null);
|
|
22332
|
+
|
|
22333
|
+
/** SubscriptionAmended voucherCode */
|
|
22334
|
+
voucherCode?: (string|null);
|
|
22335
|
+
|
|
22336
|
+
/** SubscriptionAmended platform */
|
|
22337
|
+
platform?: (subscription.SubscriptionPlatform|null);
|
|
22338
|
+
|
|
22339
|
+
/** SubscriptionAmended autoRenewalStatus */
|
|
22340
|
+
autoRenewalStatus?: (subscription.AutoRenewalStatus|null);
|
|
22341
|
+
|
|
22342
|
+
/** SubscriptionAmended plan */
|
|
22343
|
+
plan?: (subscription.IPlan|null);
|
|
22344
|
+
|
|
22345
|
+
/** SubscriptionAmended subscriptionState */
|
|
22346
|
+
subscriptionState?: (subscription.SubscriptionState|null);
|
|
22347
|
+
|
|
22348
|
+
/** SubscriptionAmended labels */
|
|
22349
|
+
labels?: (subscription.SubscriptionLabels[]|null);
|
|
22350
|
+
|
|
22351
|
+
/** SubscriptionAmended renewalCount */
|
|
22352
|
+
renewalCount?: (number|Long|null);
|
|
22353
|
+
|
|
22354
|
+
/** SubscriptionAmended id */
|
|
22355
|
+
id?: (number|null);
|
|
22356
|
+
|
|
22357
|
+
/** SubscriptionAmended terms */
|
|
22358
|
+
terms?: (subscription.ITerm[]|null);
|
|
22359
|
+
}
|
|
22360
|
+
|
|
22361
|
+
/** Represents a SubscriptionAmended. */
|
|
22362
|
+
export class SubscriptionAmended implements ISubscriptionAmended {
|
|
22363
|
+
|
|
22364
|
+
/**
|
|
22365
|
+
* Constructs a new SubscriptionAmended.
|
|
22366
|
+
* @param [properties] Properties to set
|
|
22367
|
+
*/
|
|
22368
|
+
constructor(properties?: ISubscriptionAmended);
|
|
22369
|
+
|
|
22370
|
+
/** SubscriptionAmended updatedOn. */
|
|
22371
|
+
public updatedOn: (number|Long);
|
|
22372
|
+
|
|
22373
|
+
/** SubscriptionAmended userId. */
|
|
22374
|
+
public userId: string;
|
|
22375
|
+
|
|
22376
|
+
/** SubscriptionAmended createdAt. */
|
|
22377
|
+
public createdAt: (number|Long);
|
|
22378
|
+
|
|
22379
|
+
/** SubscriptionAmended startsAt. */
|
|
22380
|
+
public startsAt: (number|Long);
|
|
22381
|
+
|
|
22382
|
+
/** SubscriptionAmended endsAt. */
|
|
22383
|
+
public endsAt: (number|Long);
|
|
22384
|
+
|
|
22385
|
+
/** SubscriptionAmended voucherCode. */
|
|
22386
|
+
public voucherCode: string;
|
|
22387
|
+
|
|
22388
|
+
/** SubscriptionAmended platform. */
|
|
22389
|
+
public platform: subscription.SubscriptionPlatform;
|
|
22390
|
+
|
|
22391
|
+
/** SubscriptionAmended autoRenewalStatus. */
|
|
22392
|
+
public autoRenewalStatus: subscription.AutoRenewalStatus;
|
|
22393
|
+
|
|
22394
|
+
/** SubscriptionAmended plan. */
|
|
22395
|
+
public plan?: (subscription.IPlan|null);
|
|
22396
|
+
|
|
22397
|
+
/** SubscriptionAmended subscriptionState. */
|
|
22398
|
+
public subscriptionState: subscription.SubscriptionState;
|
|
22399
|
+
|
|
22400
|
+
/** SubscriptionAmended labels. */
|
|
22401
|
+
public labels: subscription.SubscriptionLabels[];
|
|
22402
|
+
|
|
22403
|
+
/** SubscriptionAmended renewalCount. */
|
|
22404
|
+
public renewalCount: (number|Long);
|
|
22405
|
+
|
|
22406
|
+
/** SubscriptionAmended id. */
|
|
22407
|
+
public id: number;
|
|
22408
|
+
|
|
22409
|
+
/** SubscriptionAmended terms. */
|
|
22410
|
+
public terms: subscription.ITerm[];
|
|
22411
|
+
|
|
22412
|
+
/**
|
|
22413
|
+
* Creates a new SubscriptionAmended instance using the specified properties.
|
|
22414
|
+
* @param [properties] Properties to set
|
|
22415
|
+
* @returns SubscriptionAmended instance
|
|
22416
|
+
*/
|
|
22417
|
+
public static create(properties?: ISubscriptionAmended): SubscriptionAmended;
|
|
22418
|
+
|
|
22419
|
+
/**
|
|
22420
|
+
* Encodes the specified SubscriptionAmended message. Does not implicitly {@link SubscriptionAmended.verify|verify} messages.
|
|
22421
|
+
* @param message SubscriptionAmended message or plain object to encode
|
|
22422
|
+
* @param [writer] Writer to encode to
|
|
22423
|
+
* @returns Writer
|
|
22424
|
+
*/
|
|
22425
|
+
public static encode(message: ISubscriptionAmended, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
22426
|
+
|
|
22427
|
+
/**
|
|
22428
|
+
* Encodes the specified SubscriptionAmended message, length delimited. Does not implicitly {@link SubscriptionAmended.verify|verify} messages.
|
|
22429
|
+
* @param message SubscriptionAmended message or plain object to encode
|
|
22430
|
+
* @param [writer] Writer to encode to
|
|
22431
|
+
* @returns Writer
|
|
22432
|
+
*/
|
|
22433
|
+
public static encodeDelimited(message: ISubscriptionAmended, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
22434
|
+
|
|
22435
|
+
/**
|
|
22436
|
+
* Decodes a SubscriptionAmended message from the specified reader or buffer.
|
|
22437
|
+
* @param reader Reader or buffer to decode from
|
|
22438
|
+
* @param [length] Message length if known beforehand
|
|
22439
|
+
* @returns SubscriptionAmended
|
|
22440
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
22441
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
22442
|
+
*/
|
|
22443
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): SubscriptionAmended;
|
|
22444
|
+
|
|
22445
|
+
/**
|
|
22446
|
+
* Decodes a SubscriptionAmended message from the specified reader or buffer, length delimited.
|
|
22447
|
+
* @param reader Reader or buffer to decode from
|
|
22448
|
+
* @returns SubscriptionAmended
|
|
22449
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
22450
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
22451
|
+
*/
|
|
22452
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SubscriptionAmended;
|
|
22453
|
+
|
|
22454
|
+
/**
|
|
22455
|
+
* Verifies a SubscriptionAmended message.
|
|
22456
|
+
* @param message Plain object to verify
|
|
22457
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
22458
|
+
*/
|
|
22459
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
22460
|
+
|
|
22461
|
+
/**
|
|
22462
|
+
* Creates a SubscriptionAmended message from a plain object. Also converts values to their respective internal types.
|
|
22463
|
+
* @param object Plain object
|
|
22464
|
+
* @returns SubscriptionAmended
|
|
22465
|
+
*/
|
|
22466
|
+
public static fromObject(object: { [k: string]: any }): SubscriptionAmended;
|
|
22467
|
+
|
|
22468
|
+
/**
|
|
22469
|
+
* Creates a plain object from a SubscriptionAmended message. Also converts values to other types if specified.
|
|
22470
|
+
* @param message SubscriptionAmended
|
|
22471
|
+
* @param [options] Conversion options
|
|
22472
|
+
* @returns Plain object
|
|
22473
|
+
*/
|
|
22474
|
+
public static toObject(message: SubscriptionAmended, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
22475
|
+
|
|
22476
|
+
/**
|
|
22477
|
+
* Converts this SubscriptionAmended to JSON.
|
|
22478
|
+
* @returns JSON object
|
|
22479
|
+
*/
|
|
22480
|
+
public toJSON(): { [k: string]: any };
|
|
22481
|
+
}
|
|
22482
|
+
|
|
22315
22483
|
/** Properties of a SubscriptionMemberSubscribed. */
|
|
22316
22484
|
export interface ISubscriptionMemberSubscribed {
|
|
22317
22485
|
|
package/lib/index.js
CHANGED
|
@@ -62921,6 +62921,701 @@ $root.SubscriptionRecovered = (function() {
|
|
|
62921
62921
|
return SubscriptionRecovered;
|
|
62922
62922
|
})();
|
|
62923
62923
|
|
|
62924
|
+
$root.SubscriptionAmended = (function() {
|
|
62925
|
+
|
|
62926
|
+
/**
|
|
62927
|
+
* Properties of a SubscriptionAmended.
|
|
62928
|
+
* @exports ISubscriptionAmended
|
|
62929
|
+
* @interface ISubscriptionAmended
|
|
62930
|
+
* @property {number|Long|null} [updatedOn] SubscriptionAmended updatedOn
|
|
62931
|
+
* @property {string|null} [userId] SubscriptionAmended userId
|
|
62932
|
+
* @property {number|Long|null} [createdAt] SubscriptionAmended createdAt
|
|
62933
|
+
* @property {number|Long|null} [startsAt] SubscriptionAmended startsAt
|
|
62934
|
+
* @property {number|Long|null} [endsAt] SubscriptionAmended endsAt
|
|
62935
|
+
* @property {string|null} [voucherCode] SubscriptionAmended voucherCode
|
|
62936
|
+
* @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionAmended platform
|
|
62937
|
+
* @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionAmended autoRenewalStatus
|
|
62938
|
+
* @property {subscription.IPlan|null} [plan] SubscriptionAmended plan
|
|
62939
|
+
* @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionAmended subscriptionState
|
|
62940
|
+
* @property {Array.<subscription.SubscriptionLabels>|null} [labels] SubscriptionAmended labels
|
|
62941
|
+
* @property {number|Long|null} [renewalCount] SubscriptionAmended renewalCount
|
|
62942
|
+
* @property {number|null} [id] SubscriptionAmended id
|
|
62943
|
+
* @property {Array.<subscription.ITerm>|null} [terms] SubscriptionAmended terms
|
|
62944
|
+
*/
|
|
62945
|
+
|
|
62946
|
+
/**
|
|
62947
|
+
* Constructs a new SubscriptionAmended.
|
|
62948
|
+
* @exports SubscriptionAmended
|
|
62949
|
+
* @classdesc Represents a SubscriptionAmended.
|
|
62950
|
+
* @implements ISubscriptionAmended
|
|
62951
|
+
* @constructor
|
|
62952
|
+
* @param {ISubscriptionAmended=} [properties] Properties to set
|
|
62953
|
+
*/
|
|
62954
|
+
function SubscriptionAmended(properties) {
|
|
62955
|
+
this.labels = [];
|
|
62956
|
+
this.terms = [];
|
|
62957
|
+
if (properties)
|
|
62958
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
62959
|
+
if (properties[keys[i]] != null)
|
|
62960
|
+
this[keys[i]] = properties[keys[i]];
|
|
62961
|
+
}
|
|
62962
|
+
|
|
62963
|
+
/**
|
|
62964
|
+
* SubscriptionAmended updatedOn.
|
|
62965
|
+
* @member {number|Long} updatedOn
|
|
62966
|
+
* @memberof SubscriptionAmended
|
|
62967
|
+
* @instance
|
|
62968
|
+
*/
|
|
62969
|
+
SubscriptionAmended.prototype.updatedOn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
62970
|
+
|
|
62971
|
+
/**
|
|
62972
|
+
* SubscriptionAmended userId.
|
|
62973
|
+
* @member {string} userId
|
|
62974
|
+
* @memberof SubscriptionAmended
|
|
62975
|
+
* @instance
|
|
62976
|
+
*/
|
|
62977
|
+
SubscriptionAmended.prototype.userId = "";
|
|
62978
|
+
|
|
62979
|
+
/**
|
|
62980
|
+
* SubscriptionAmended createdAt.
|
|
62981
|
+
* @member {number|Long} createdAt
|
|
62982
|
+
* @memberof SubscriptionAmended
|
|
62983
|
+
* @instance
|
|
62984
|
+
*/
|
|
62985
|
+
SubscriptionAmended.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
62986
|
+
|
|
62987
|
+
/**
|
|
62988
|
+
* SubscriptionAmended startsAt.
|
|
62989
|
+
* @member {number|Long} startsAt
|
|
62990
|
+
* @memberof SubscriptionAmended
|
|
62991
|
+
* @instance
|
|
62992
|
+
*/
|
|
62993
|
+
SubscriptionAmended.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
62994
|
+
|
|
62995
|
+
/**
|
|
62996
|
+
* SubscriptionAmended endsAt.
|
|
62997
|
+
* @member {number|Long} endsAt
|
|
62998
|
+
* @memberof SubscriptionAmended
|
|
62999
|
+
* @instance
|
|
63000
|
+
*/
|
|
63001
|
+
SubscriptionAmended.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
63002
|
+
|
|
63003
|
+
/**
|
|
63004
|
+
* SubscriptionAmended voucherCode.
|
|
63005
|
+
* @member {string} voucherCode
|
|
63006
|
+
* @memberof SubscriptionAmended
|
|
63007
|
+
* @instance
|
|
63008
|
+
*/
|
|
63009
|
+
SubscriptionAmended.prototype.voucherCode = "";
|
|
63010
|
+
|
|
63011
|
+
/**
|
|
63012
|
+
* SubscriptionAmended platform.
|
|
63013
|
+
* @member {subscription.SubscriptionPlatform} platform
|
|
63014
|
+
* @memberof SubscriptionAmended
|
|
63015
|
+
* @instance
|
|
63016
|
+
*/
|
|
63017
|
+
SubscriptionAmended.prototype.platform = 0;
|
|
63018
|
+
|
|
63019
|
+
/**
|
|
63020
|
+
* SubscriptionAmended autoRenewalStatus.
|
|
63021
|
+
* @member {subscription.AutoRenewalStatus} autoRenewalStatus
|
|
63022
|
+
* @memberof SubscriptionAmended
|
|
63023
|
+
* @instance
|
|
63024
|
+
*/
|
|
63025
|
+
SubscriptionAmended.prototype.autoRenewalStatus = 0;
|
|
63026
|
+
|
|
63027
|
+
/**
|
|
63028
|
+
* SubscriptionAmended plan.
|
|
63029
|
+
* @member {subscription.IPlan|null|undefined} plan
|
|
63030
|
+
* @memberof SubscriptionAmended
|
|
63031
|
+
* @instance
|
|
63032
|
+
*/
|
|
63033
|
+
SubscriptionAmended.prototype.plan = null;
|
|
63034
|
+
|
|
63035
|
+
/**
|
|
63036
|
+
* SubscriptionAmended subscriptionState.
|
|
63037
|
+
* @member {subscription.SubscriptionState} subscriptionState
|
|
63038
|
+
* @memberof SubscriptionAmended
|
|
63039
|
+
* @instance
|
|
63040
|
+
*/
|
|
63041
|
+
SubscriptionAmended.prototype.subscriptionState = 0;
|
|
63042
|
+
|
|
63043
|
+
/**
|
|
63044
|
+
* SubscriptionAmended labels.
|
|
63045
|
+
* @member {Array.<subscription.SubscriptionLabels>} labels
|
|
63046
|
+
* @memberof SubscriptionAmended
|
|
63047
|
+
* @instance
|
|
63048
|
+
*/
|
|
63049
|
+
SubscriptionAmended.prototype.labels = $util.emptyArray;
|
|
63050
|
+
|
|
63051
|
+
/**
|
|
63052
|
+
* SubscriptionAmended renewalCount.
|
|
63053
|
+
* @member {number|Long} renewalCount
|
|
63054
|
+
* @memberof SubscriptionAmended
|
|
63055
|
+
* @instance
|
|
63056
|
+
*/
|
|
63057
|
+
SubscriptionAmended.prototype.renewalCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
63058
|
+
|
|
63059
|
+
/**
|
|
63060
|
+
* SubscriptionAmended id.
|
|
63061
|
+
* @member {number} id
|
|
63062
|
+
* @memberof SubscriptionAmended
|
|
63063
|
+
* @instance
|
|
63064
|
+
*/
|
|
63065
|
+
SubscriptionAmended.prototype.id = 0;
|
|
63066
|
+
|
|
63067
|
+
/**
|
|
63068
|
+
* SubscriptionAmended terms.
|
|
63069
|
+
* @member {Array.<subscription.ITerm>} terms
|
|
63070
|
+
* @memberof SubscriptionAmended
|
|
63071
|
+
* @instance
|
|
63072
|
+
*/
|
|
63073
|
+
SubscriptionAmended.prototype.terms = $util.emptyArray;
|
|
63074
|
+
|
|
63075
|
+
/**
|
|
63076
|
+
* Creates a new SubscriptionAmended instance using the specified properties.
|
|
63077
|
+
* @function create
|
|
63078
|
+
* @memberof SubscriptionAmended
|
|
63079
|
+
* @static
|
|
63080
|
+
* @param {ISubscriptionAmended=} [properties] Properties to set
|
|
63081
|
+
* @returns {SubscriptionAmended} SubscriptionAmended instance
|
|
63082
|
+
*/
|
|
63083
|
+
SubscriptionAmended.create = function create(properties) {
|
|
63084
|
+
return new SubscriptionAmended(properties);
|
|
63085
|
+
};
|
|
63086
|
+
|
|
63087
|
+
/**
|
|
63088
|
+
* Encodes the specified SubscriptionAmended message. Does not implicitly {@link SubscriptionAmended.verify|verify} messages.
|
|
63089
|
+
* @function encode
|
|
63090
|
+
* @memberof SubscriptionAmended
|
|
63091
|
+
* @static
|
|
63092
|
+
* @param {ISubscriptionAmended} message SubscriptionAmended message or plain object to encode
|
|
63093
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
63094
|
+
* @returns {$protobuf.Writer} Writer
|
|
63095
|
+
*/
|
|
63096
|
+
SubscriptionAmended.encode = function encode(message, writer) {
|
|
63097
|
+
if (!writer)
|
|
63098
|
+
writer = $Writer.create();
|
|
63099
|
+
if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
|
|
63100
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedOn);
|
|
63101
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
63102
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
|
|
63103
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
63104
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.createdAt);
|
|
63105
|
+
if (message.startsAt != null && message.hasOwnProperty("startsAt"))
|
|
63106
|
+
writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.startsAt);
|
|
63107
|
+
if (message.endsAt != null && message.hasOwnProperty("endsAt"))
|
|
63108
|
+
writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.endsAt);
|
|
63109
|
+
if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
|
|
63110
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.voucherCode);
|
|
63111
|
+
if (message.platform != null && message.hasOwnProperty("platform"))
|
|
63112
|
+
writer.uint32(/* id 8, wireType 0 =*/64).int32(message.platform);
|
|
63113
|
+
if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
|
|
63114
|
+
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
|
|
63115
|
+
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
63116
|
+
$root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
63117
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
63118
|
+
writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
|
|
63119
|
+
if (message.labels != null && message.labels.length) {
|
|
63120
|
+
writer.uint32(/* id 12, wireType 2 =*/98).fork();
|
|
63121
|
+
for (var i = 0; i < message.labels.length; ++i)
|
|
63122
|
+
writer.int32(message.labels[i]);
|
|
63123
|
+
writer.ldelim();
|
|
63124
|
+
}
|
|
63125
|
+
if (message.renewalCount != null && message.hasOwnProperty("renewalCount"))
|
|
63126
|
+
writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.renewalCount);
|
|
63127
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
63128
|
+
writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.id);
|
|
63129
|
+
if (message.terms != null && message.terms.length)
|
|
63130
|
+
for (var i = 0; i < message.terms.length; ++i)
|
|
63131
|
+
$root.subscription.Term.encode(message.terms[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
|
|
63132
|
+
return writer;
|
|
63133
|
+
};
|
|
63134
|
+
|
|
63135
|
+
/**
|
|
63136
|
+
* Encodes the specified SubscriptionAmended message, length delimited. Does not implicitly {@link SubscriptionAmended.verify|verify} messages.
|
|
63137
|
+
* @function encodeDelimited
|
|
63138
|
+
* @memberof SubscriptionAmended
|
|
63139
|
+
* @static
|
|
63140
|
+
* @param {ISubscriptionAmended} message SubscriptionAmended message or plain object to encode
|
|
63141
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
63142
|
+
* @returns {$protobuf.Writer} Writer
|
|
63143
|
+
*/
|
|
63144
|
+
SubscriptionAmended.encodeDelimited = function encodeDelimited(message, writer) {
|
|
63145
|
+
return this.encode(message, writer).ldelim();
|
|
63146
|
+
};
|
|
63147
|
+
|
|
63148
|
+
/**
|
|
63149
|
+
* Decodes a SubscriptionAmended message from the specified reader or buffer.
|
|
63150
|
+
* @function decode
|
|
63151
|
+
* @memberof SubscriptionAmended
|
|
63152
|
+
* @static
|
|
63153
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
63154
|
+
* @param {number} [length] Message length if known beforehand
|
|
63155
|
+
* @returns {SubscriptionAmended} SubscriptionAmended
|
|
63156
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
63157
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
63158
|
+
*/
|
|
63159
|
+
SubscriptionAmended.decode = function decode(reader, length) {
|
|
63160
|
+
if (!(reader instanceof $Reader))
|
|
63161
|
+
reader = $Reader.create(reader);
|
|
63162
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SubscriptionAmended();
|
|
63163
|
+
while (reader.pos < end) {
|
|
63164
|
+
var tag = reader.uint32();
|
|
63165
|
+
switch (tag >>> 3) {
|
|
63166
|
+
case 2:
|
|
63167
|
+
message.updatedOn = reader.uint64();
|
|
63168
|
+
break;
|
|
63169
|
+
case 3:
|
|
63170
|
+
message.userId = reader.string();
|
|
63171
|
+
break;
|
|
63172
|
+
case 4:
|
|
63173
|
+
message.createdAt = reader.uint64();
|
|
63174
|
+
break;
|
|
63175
|
+
case 5:
|
|
63176
|
+
message.startsAt = reader.uint64();
|
|
63177
|
+
break;
|
|
63178
|
+
case 6:
|
|
63179
|
+
message.endsAt = reader.uint64();
|
|
63180
|
+
break;
|
|
63181
|
+
case 7:
|
|
63182
|
+
message.voucherCode = reader.string();
|
|
63183
|
+
break;
|
|
63184
|
+
case 8:
|
|
63185
|
+
message.platform = reader.int32();
|
|
63186
|
+
break;
|
|
63187
|
+
case 9:
|
|
63188
|
+
message.autoRenewalStatus = reader.int32();
|
|
63189
|
+
break;
|
|
63190
|
+
case 10:
|
|
63191
|
+
message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
|
|
63192
|
+
break;
|
|
63193
|
+
case 11:
|
|
63194
|
+
message.subscriptionState = reader.int32();
|
|
63195
|
+
break;
|
|
63196
|
+
case 12:
|
|
63197
|
+
if (!(message.labels && message.labels.length))
|
|
63198
|
+
message.labels = [];
|
|
63199
|
+
if ((tag & 7) === 2) {
|
|
63200
|
+
var end2 = reader.uint32() + reader.pos;
|
|
63201
|
+
while (reader.pos < end2)
|
|
63202
|
+
message.labels.push(reader.int32());
|
|
63203
|
+
} else
|
|
63204
|
+
message.labels.push(reader.int32());
|
|
63205
|
+
break;
|
|
63206
|
+
case 13:
|
|
63207
|
+
message.renewalCount = reader.uint64();
|
|
63208
|
+
break;
|
|
63209
|
+
case 14:
|
|
63210
|
+
message.id = reader.uint32();
|
|
63211
|
+
break;
|
|
63212
|
+
case 15:
|
|
63213
|
+
if (!(message.terms && message.terms.length))
|
|
63214
|
+
message.terms = [];
|
|
63215
|
+
message.terms.push($root.subscription.Term.decode(reader, reader.uint32()));
|
|
63216
|
+
break;
|
|
63217
|
+
default:
|
|
63218
|
+
reader.skipType(tag & 7);
|
|
63219
|
+
break;
|
|
63220
|
+
}
|
|
63221
|
+
}
|
|
63222
|
+
return message;
|
|
63223
|
+
};
|
|
63224
|
+
|
|
63225
|
+
/**
|
|
63226
|
+
* Decodes a SubscriptionAmended message from the specified reader or buffer, length delimited.
|
|
63227
|
+
* @function decodeDelimited
|
|
63228
|
+
* @memberof SubscriptionAmended
|
|
63229
|
+
* @static
|
|
63230
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
63231
|
+
* @returns {SubscriptionAmended} SubscriptionAmended
|
|
63232
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
63233
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
63234
|
+
*/
|
|
63235
|
+
SubscriptionAmended.decodeDelimited = function decodeDelimited(reader) {
|
|
63236
|
+
if (!(reader instanceof $Reader))
|
|
63237
|
+
reader = new $Reader(reader);
|
|
63238
|
+
return this.decode(reader, reader.uint32());
|
|
63239
|
+
};
|
|
63240
|
+
|
|
63241
|
+
/**
|
|
63242
|
+
* Verifies a SubscriptionAmended message.
|
|
63243
|
+
* @function verify
|
|
63244
|
+
* @memberof SubscriptionAmended
|
|
63245
|
+
* @static
|
|
63246
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
63247
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
63248
|
+
*/
|
|
63249
|
+
SubscriptionAmended.verify = function verify(message) {
|
|
63250
|
+
if (typeof message !== "object" || message === null)
|
|
63251
|
+
return "object expected";
|
|
63252
|
+
if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
|
|
63253
|
+
if (!$util.isInteger(message.updatedOn) && !(message.updatedOn && $util.isInteger(message.updatedOn.low) && $util.isInteger(message.updatedOn.high)))
|
|
63254
|
+
return "updatedOn: integer|Long expected";
|
|
63255
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
63256
|
+
if (!$util.isString(message.userId))
|
|
63257
|
+
return "userId: string expected";
|
|
63258
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
63259
|
+
if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
|
|
63260
|
+
return "createdAt: integer|Long expected";
|
|
63261
|
+
if (message.startsAt != null && message.hasOwnProperty("startsAt"))
|
|
63262
|
+
if (!$util.isInteger(message.startsAt) && !(message.startsAt && $util.isInteger(message.startsAt.low) && $util.isInteger(message.startsAt.high)))
|
|
63263
|
+
return "startsAt: integer|Long expected";
|
|
63264
|
+
if (message.endsAt != null && message.hasOwnProperty("endsAt"))
|
|
63265
|
+
if (!$util.isInteger(message.endsAt) && !(message.endsAt && $util.isInteger(message.endsAt.low) && $util.isInteger(message.endsAt.high)))
|
|
63266
|
+
return "endsAt: integer|Long expected";
|
|
63267
|
+
if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
|
|
63268
|
+
if (!$util.isString(message.voucherCode))
|
|
63269
|
+
return "voucherCode: string expected";
|
|
63270
|
+
if (message.platform != null && message.hasOwnProperty("platform"))
|
|
63271
|
+
switch (message.platform) {
|
|
63272
|
+
default:
|
|
63273
|
+
return "platform: enum value expected";
|
|
63274
|
+
case 0:
|
|
63275
|
+
case 1:
|
|
63276
|
+
case 2:
|
|
63277
|
+
case 3:
|
|
63278
|
+
case 4:
|
|
63279
|
+
case 5:
|
|
63280
|
+
break;
|
|
63281
|
+
}
|
|
63282
|
+
if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
|
|
63283
|
+
switch (message.autoRenewalStatus) {
|
|
63284
|
+
default:
|
|
63285
|
+
return "autoRenewalStatus: enum value expected";
|
|
63286
|
+
case 0:
|
|
63287
|
+
case 1:
|
|
63288
|
+
case 2:
|
|
63289
|
+
break;
|
|
63290
|
+
}
|
|
63291
|
+
if (message.plan != null && message.hasOwnProperty("plan")) {
|
|
63292
|
+
var error = $root.subscription.Plan.verify(message.plan);
|
|
63293
|
+
if (error)
|
|
63294
|
+
return "plan." + error;
|
|
63295
|
+
}
|
|
63296
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
63297
|
+
switch (message.subscriptionState) {
|
|
63298
|
+
default:
|
|
63299
|
+
return "subscriptionState: enum value expected";
|
|
63300
|
+
case 0:
|
|
63301
|
+
case 1:
|
|
63302
|
+
case 2:
|
|
63303
|
+
case 3:
|
|
63304
|
+
case 4:
|
|
63305
|
+
case 6:
|
|
63306
|
+
case 5:
|
|
63307
|
+
break;
|
|
63308
|
+
}
|
|
63309
|
+
if (message.labels != null && message.hasOwnProperty("labels")) {
|
|
63310
|
+
if (!Array.isArray(message.labels))
|
|
63311
|
+
return "labels: array expected";
|
|
63312
|
+
for (var i = 0; i < message.labels.length; ++i)
|
|
63313
|
+
switch (message.labels[i]) {
|
|
63314
|
+
default:
|
|
63315
|
+
return "labels: enum value[] expected";
|
|
63316
|
+
case 0:
|
|
63317
|
+
break;
|
|
63318
|
+
}
|
|
63319
|
+
}
|
|
63320
|
+
if (message.renewalCount != null && message.hasOwnProperty("renewalCount"))
|
|
63321
|
+
if (!$util.isInteger(message.renewalCount) && !(message.renewalCount && $util.isInteger(message.renewalCount.low) && $util.isInteger(message.renewalCount.high)))
|
|
63322
|
+
return "renewalCount: integer|Long expected";
|
|
63323
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
63324
|
+
if (!$util.isInteger(message.id))
|
|
63325
|
+
return "id: integer expected";
|
|
63326
|
+
if (message.terms != null && message.hasOwnProperty("terms")) {
|
|
63327
|
+
if (!Array.isArray(message.terms))
|
|
63328
|
+
return "terms: array expected";
|
|
63329
|
+
for (var i = 0; i < message.terms.length; ++i) {
|
|
63330
|
+
var error = $root.subscription.Term.verify(message.terms[i]);
|
|
63331
|
+
if (error)
|
|
63332
|
+
return "terms." + error;
|
|
63333
|
+
}
|
|
63334
|
+
}
|
|
63335
|
+
return null;
|
|
63336
|
+
};
|
|
63337
|
+
|
|
63338
|
+
/**
|
|
63339
|
+
* Creates a SubscriptionAmended message from a plain object. Also converts values to their respective internal types.
|
|
63340
|
+
* @function fromObject
|
|
63341
|
+
* @memberof SubscriptionAmended
|
|
63342
|
+
* @static
|
|
63343
|
+
* @param {Object.<string,*>} object Plain object
|
|
63344
|
+
* @returns {SubscriptionAmended} SubscriptionAmended
|
|
63345
|
+
*/
|
|
63346
|
+
SubscriptionAmended.fromObject = function fromObject(object) {
|
|
63347
|
+
if (object instanceof $root.SubscriptionAmended)
|
|
63348
|
+
return object;
|
|
63349
|
+
var message = new $root.SubscriptionAmended();
|
|
63350
|
+
if (object.updatedOn != null)
|
|
63351
|
+
if ($util.Long)
|
|
63352
|
+
(message.updatedOn = $util.Long.fromValue(object.updatedOn)).unsigned = true;
|
|
63353
|
+
else if (typeof object.updatedOn === "string")
|
|
63354
|
+
message.updatedOn = parseInt(object.updatedOn, 10);
|
|
63355
|
+
else if (typeof object.updatedOn === "number")
|
|
63356
|
+
message.updatedOn = object.updatedOn;
|
|
63357
|
+
else if (typeof object.updatedOn === "object")
|
|
63358
|
+
message.updatedOn = new $util.LongBits(object.updatedOn.low >>> 0, object.updatedOn.high >>> 0).toNumber(true);
|
|
63359
|
+
if (object.userId != null)
|
|
63360
|
+
message.userId = String(object.userId);
|
|
63361
|
+
if (object.createdAt != null)
|
|
63362
|
+
if ($util.Long)
|
|
63363
|
+
(message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
|
|
63364
|
+
else if (typeof object.createdAt === "string")
|
|
63365
|
+
message.createdAt = parseInt(object.createdAt, 10);
|
|
63366
|
+
else if (typeof object.createdAt === "number")
|
|
63367
|
+
message.createdAt = object.createdAt;
|
|
63368
|
+
else if (typeof object.createdAt === "object")
|
|
63369
|
+
message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
|
|
63370
|
+
if (object.startsAt != null)
|
|
63371
|
+
if ($util.Long)
|
|
63372
|
+
(message.startsAt = $util.Long.fromValue(object.startsAt)).unsigned = true;
|
|
63373
|
+
else if (typeof object.startsAt === "string")
|
|
63374
|
+
message.startsAt = parseInt(object.startsAt, 10);
|
|
63375
|
+
else if (typeof object.startsAt === "number")
|
|
63376
|
+
message.startsAt = object.startsAt;
|
|
63377
|
+
else if (typeof object.startsAt === "object")
|
|
63378
|
+
message.startsAt = new $util.LongBits(object.startsAt.low >>> 0, object.startsAt.high >>> 0).toNumber(true);
|
|
63379
|
+
if (object.endsAt != null)
|
|
63380
|
+
if ($util.Long)
|
|
63381
|
+
(message.endsAt = $util.Long.fromValue(object.endsAt)).unsigned = true;
|
|
63382
|
+
else if (typeof object.endsAt === "string")
|
|
63383
|
+
message.endsAt = parseInt(object.endsAt, 10);
|
|
63384
|
+
else if (typeof object.endsAt === "number")
|
|
63385
|
+
message.endsAt = object.endsAt;
|
|
63386
|
+
else if (typeof object.endsAt === "object")
|
|
63387
|
+
message.endsAt = new $util.LongBits(object.endsAt.low >>> 0, object.endsAt.high >>> 0).toNumber(true);
|
|
63388
|
+
if (object.voucherCode != null)
|
|
63389
|
+
message.voucherCode = String(object.voucherCode);
|
|
63390
|
+
switch (object.platform) {
|
|
63391
|
+
case "PLATFORM_UNKNOWN":
|
|
63392
|
+
case 0:
|
|
63393
|
+
message.platform = 0;
|
|
63394
|
+
break;
|
|
63395
|
+
case "ITUNES":
|
|
63396
|
+
case 1:
|
|
63397
|
+
message.platform = 1;
|
|
63398
|
+
break;
|
|
63399
|
+
case "PLAY_STORE":
|
|
63400
|
+
case 2:
|
|
63401
|
+
message.platform = 2;
|
|
63402
|
+
break;
|
|
63403
|
+
case "ZUORA":
|
|
63404
|
+
case 3:
|
|
63405
|
+
message.platform = 3;
|
|
63406
|
+
break;
|
|
63407
|
+
case "HEADSPACE":
|
|
63408
|
+
case 4:
|
|
63409
|
+
message.platform = 4;
|
|
63410
|
+
break;
|
|
63411
|
+
case "SPOTIFY":
|
|
63412
|
+
case 5:
|
|
63413
|
+
message.platform = 5;
|
|
63414
|
+
break;
|
|
63415
|
+
}
|
|
63416
|
+
switch (object.autoRenewalStatus) {
|
|
63417
|
+
case "UNKNOWN_STATUS":
|
|
63418
|
+
case 0:
|
|
63419
|
+
message.autoRenewalStatus = 0;
|
|
63420
|
+
break;
|
|
63421
|
+
case "ENABLED":
|
|
63422
|
+
case 1:
|
|
63423
|
+
message.autoRenewalStatus = 1;
|
|
63424
|
+
break;
|
|
63425
|
+
case "DISABLED":
|
|
63426
|
+
case 2:
|
|
63427
|
+
message.autoRenewalStatus = 2;
|
|
63428
|
+
break;
|
|
63429
|
+
}
|
|
63430
|
+
if (object.plan != null) {
|
|
63431
|
+
if (typeof object.plan !== "object")
|
|
63432
|
+
throw TypeError(".SubscriptionAmended.plan: object expected");
|
|
63433
|
+
message.plan = $root.subscription.Plan.fromObject(object.plan);
|
|
63434
|
+
}
|
|
63435
|
+
switch (object.subscriptionState) {
|
|
63436
|
+
case "SUBSTATE_UNKNOWN":
|
|
63437
|
+
case 0:
|
|
63438
|
+
message.subscriptionState = 0;
|
|
63439
|
+
break;
|
|
63440
|
+
case "SUBSTATE_NONE":
|
|
63441
|
+
case 1:
|
|
63442
|
+
message.subscriptionState = 1;
|
|
63443
|
+
break;
|
|
63444
|
+
case "SUBSTATE_FREE_SUBSCRIPTION":
|
|
63445
|
+
case 2:
|
|
63446
|
+
message.subscriptionState = 2;
|
|
63447
|
+
break;
|
|
63448
|
+
case "SUBSTATE_FREE_TRIAL":
|
|
63449
|
+
case 3:
|
|
63450
|
+
message.subscriptionState = 3;
|
|
63451
|
+
break;
|
|
63452
|
+
case "SUBSTATE_PAYING":
|
|
63453
|
+
case 4:
|
|
63454
|
+
message.subscriptionState = 4;
|
|
63455
|
+
break;
|
|
63456
|
+
case "SUBSTATE_GRACE":
|
|
63457
|
+
case 6:
|
|
63458
|
+
message.subscriptionState = 6;
|
|
63459
|
+
break;
|
|
63460
|
+
case "SUBSTATE_CANCELLED":
|
|
63461
|
+
case 5:
|
|
63462
|
+
message.subscriptionState = 5;
|
|
63463
|
+
break;
|
|
63464
|
+
}
|
|
63465
|
+
if (object.labels) {
|
|
63466
|
+
if (!Array.isArray(object.labels))
|
|
63467
|
+
throw TypeError(".SubscriptionAmended.labels: array expected");
|
|
63468
|
+
message.labels = [];
|
|
63469
|
+
for (var i = 0; i < object.labels.length; ++i)
|
|
63470
|
+
switch (object.labels[i]) {
|
|
63471
|
+
default:
|
|
63472
|
+
case "SUBLABEL_FREE_TRIAL":
|
|
63473
|
+
case 0:
|
|
63474
|
+
message.labels[i] = 0;
|
|
63475
|
+
break;
|
|
63476
|
+
}
|
|
63477
|
+
}
|
|
63478
|
+
if (object.renewalCount != null)
|
|
63479
|
+
if ($util.Long)
|
|
63480
|
+
(message.renewalCount = $util.Long.fromValue(object.renewalCount)).unsigned = true;
|
|
63481
|
+
else if (typeof object.renewalCount === "string")
|
|
63482
|
+
message.renewalCount = parseInt(object.renewalCount, 10);
|
|
63483
|
+
else if (typeof object.renewalCount === "number")
|
|
63484
|
+
message.renewalCount = object.renewalCount;
|
|
63485
|
+
else if (typeof object.renewalCount === "object")
|
|
63486
|
+
message.renewalCount = new $util.LongBits(object.renewalCount.low >>> 0, object.renewalCount.high >>> 0).toNumber(true);
|
|
63487
|
+
if (object.id != null)
|
|
63488
|
+
message.id = object.id >>> 0;
|
|
63489
|
+
if (object.terms) {
|
|
63490
|
+
if (!Array.isArray(object.terms))
|
|
63491
|
+
throw TypeError(".SubscriptionAmended.terms: array expected");
|
|
63492
|
+
message.terms = [];
|
|
63493
|
+
for (var i = 0; i < object.terms.length; ++i) {
|
|
63494
|
+
if (typeof object.terms[i] !== "object")
|
|
63495
|
+
throw TypeError(".SubscriptionAmended.terms: object expected");
|
|
63496
|
+
message.terms[i] = $root.subscription.Term.fromObject(object.terms[i]);
|
|
63497
|
+
}
|
|
63498
|
+
}
|
|
63499
|
+
return message;
|
|
63500
|
+
};
|
|
63501
|
+
|
|
63502
|
+
/**
|
|
63503
|
+
* Creates a plain object from a SubscriptionAmended message. Also converts values to other types if specified.
|
|
63504
|
+
* @function toObject
|
|
63505
|
+
* @memberof SubscriptionAmended
|
|
63506
|
+
* @static
|
|
63507
|
+
* @param {SubscriptionAmended} message SubscriptionAmended
|
|
63508
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
63509
|
+
* @returns {Object.<string,*>} Plain object
|
|
63510
|
+
*/
|
|
63511
|
+
SubscriptionAmended.toObject = function toObject(message, options) {
|
|
63512
|
+
if (!options)
|
|
63513
|
+
options = {};
|
|
63514
|
+
var object = {};
|
|
63515
|
+
if (options.arrays || options.defaults) {
|
|
63516
|
+
object.labels = [];
|
|
63517
|
+
object.terms = [];
|
|
63518
|
+
}
|
|
63519
|
+
if (options.defaults) {
|
|
63520
|
+
if ($util.Long) {
|
|
63521
|
+
var long = new $util.Long(0, 0, true);
|
|
63522
|
+
object.updatedOn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
63523
|
+
} else
|
|
63524
|
+
object.updatedOn = options.longs === String ? "0" : 0;
|
|
63525
|
+
object.userId = "";
|
|
63526
|
+
if ($util.Long) {
|
|
63527
|
+
var long = new $util.Long(0, 0, true);
|
|
63528
|
+
object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
63529
|
+
} else
|
|
63530
|
+
object.createdAt = options.longs === String ? "0" : 0;
|
|
63531
|
+
if ($util.Long) {
|
|
63532
|
+
var long = new $util.Long(0, 0, true);
|
|
63533
|
+
object.startsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
63534
|
+
} else
|
|
63535
|
+
object.startsAt = options.longs === String ? "0" : 0;
|
|
63536
|
+
if ($util.Long) {
|
|
63537
|
+
var long = new $util.Long(0, 0, true);
|
|
63538
|
+
object.endsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
63539
|
+
} else
|
|
63540
|
+
object.endsAt = options.longs === String ? "0" : 0;
|
|
63541
|
+
object.voucherCode = "";
|
|
63542
|
+
object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
|
|
63543
|
+
object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
|
|
63544
|
+
object.plan = null;
|
|
63545
|
+
object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
|
|
63546
|
+
if ($util.Long) {
|
|
63547
|
+
var long = new $util.Long(0, 0, true);
|
|
63548
|
+
object.renewalCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
63549
|
+
} else
|
|
63550
|
+
object.renewalCount = options.longs === String ? "0" : 0;
|
|
63551
|
+
object.id = 0;
|
|
63552
|
+
}
|
|
63553
|
+
if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
|
|
63554
|
+
if (typeof message.updatedOn === "number")
|
|
63555
|
+
object.updatedOn = options.longs === String ? String(message.updatedOn) : message.updatedOn;
|
|
63556
|
+
else
|
|
63557
|
+
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;
|
|
63558
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
63559
|
+
object.userId = message.userId;
|
|
63560
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
63561
|
+
if (typeof message.createdAt === "number")
|
|
63562
|
+
object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
|
|
63563
|
+
else
|
|
63564
|
+
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;
|
|
63565
|
+
if (message.startsAt != null && message.hasOwnProperty("startsAt"))
|
|
63566
|
+
if (typeof message.startsAt === "number")
|
|
63567
|
+
object.startsAt = options.longs === String ? String(message.startsAt) : message.startsAt;
|
|
63568
|
+
else
|
|
63569
|
+
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;
|
|
63570
|
+
if (message.endsAt != null && message.hasOwnProperty("endsAt"))
|
|
63571
|
+
if (typeof message.endsAt === "number")
|
|
63572
|
+
object.endsAt = options.longs === String ? String(message.endsAt) : message.endsAt;
|
|
63573
|
+
else
|
|
63574
|
+
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;
|
|
63575
|
+
if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
|
|
63576
|
+
object.voucherCode = message.voucherCode;
|
|
63577
|
+
if (message.platform != null && message.hasOwnProperty("platform"))
|
|
63578
|
+
object.platform = options.enums === String ? $root.subscription.SubscriptionPlatform[message.platform] : message.platform;
|
|
63579
|
+
if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
|
|
63580
|
+
object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
|
|
63581
|
+
if (message.plan != null && message.hasOwnProperty("plan"))
|
|
63582
|
+
object.plan = $root.subscription.Plan.toObject(message.plan, options);
|
|
63583
|
+
if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
|
|
63584
|
+
object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
|
|
63585
|
+
if (message.labels && message.labels.length) {
|
|
63586
|
+
object.labels = [];
|
|
63587
|
+
for (var j = 0; j < message.labels.length; ++j)
|
|
63588
|
+
object.labels[j] = options.enums === String ? $root.subscription.SubscriptionLabels[message.labels[j]] : message.labels[j];
|
|
63589
|
+
}
|
|
63590
|
+
if (message.renewalCount != null && message.hasOwnProperty("renewalCount"))
|
|
63591
|
+
if (typeof message.renewalCount === "number")
|
|
63592
|
+
object.renewalCount = options.longs === String ? String(message.renewalCount) : message.renewalCount;
|
|
63593
|
+
else
|
|
63594
|
+
object.renewalCount = options.longs === String ? $util.Long.prototype.toString.call(message.renewalCount) : options.longs === Number ? new $util.LongBits(message.renewalCount.low >>> 0, message.renewalCount.high >>> 0).toNumber(true) : message.renewalCount;
|
|
63595
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
63596
|
+
object.id = message.id;
|
|
63597
|
+
if (message.terms && message.terms.length) {
|
|
63598
|
+
object.terms = [];
|
|
63599
|
+
for (var j = 0; j < message.terms.length; ++j)
|
|
63600
|
+
object.terms[j] = $root.subscription.Term.toObject(message.terms[j], options);
|
|
63601
|
+
}
|
|
63602
|
+
return object;
|
|
63603
|
+
};
|
|
63604
|
+
|
|
63605
|
+
/**
|
|
63606
|
+
* Converts this SubscriptionAmended to JSON.
|
|
63607
|
+
* @function toJSON
|
|
63608
|
+
* @memberof SubscriptionAmended
|
|
63609
|
+
* @instance
|
|
63610
|
+
* @returns {Object.<string,*>} JSON object
|
|
63611
|
+
*/
|
|
63612
|
+
SubscriptionAmended.prototype.toJSON = function toJSON() {
|
|
63613
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
63614
|
+
};
|
|
63615
|
+
|
|
63616
|
+
return SubscriptionAmended;
|
|
63617
|
+
})();
|
|
63618
|
+
|
|
62924
63619
|
$root.SubscriptionMemberSubscribed = (function() {
|
|
62925
63620
|
|
|
62926
63621
|
/**
|
package/package.json
CHANGED