@headspace/protos-events 1.716.0 → 1.718.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 CHANGED
@@ -3317,6 +3317,108 @@ export class EligibleUserAmended implements IEligibleUserAmended {
3317
3317
  public toJSON(): { [k: string]: any };
3318
3318
  }
3319
3319
 
3320
+ /** Properties of an EligibilityDataDeleted. */
3321
+ export interface IEligibilityDataDeleted {
3322
+
3323
+ /** EligibilityDataDeleted timestamp */
3324
+ timestamp?: (number|Long|null);
3325
+
3326
+ /** EligibilityDataDeleted b2bOrgId */
3327
+ b2bOrgId?: (number|null);
3328
+
3329
+ /** EligibilityDataDeleted eligibilityCollectiveUuid */
3330
+ eligibilityCollectiveUuid?: (string|null);
3331
+ }
3332
+
3333
+ /** Represents an EligibilityDataDeleted. */
3334
+ export class EligibilityDataDeleted implements IEligibilityDataDeleted {
3335
+
3336
+ /**
3337
+ * Constructs a new EligibilityDataDeleted.
3338
+ * @param [properties] Properties to set
3339
+ */
3340
+ constructor(properties?: IEligibilityDataDeleted);
3341
+
3342
+ /** EligibilityDataDeleted timestamp. */
3343
+ public timestamp: (number|Long);
3344
+
3345
+ /** EligibilityDataDeleted b2bOrgId. */
3346
+ public b2bOrgId: number;
3347
+
3348
+ /** EligibilityDataDeleted eligibilityCollectiveUuid. */
3349
+ public eligibilityCollectiveUuid: string;
3350
+
3351
+ /**
3352
+ * Creates a new EligibilityDataDeleted instance using the specified properties.
3353
+ * @param [properties] Properties to set
3354
+ * @returns EligibilityDataDeleted instance
3355
+ */
3356
+ public static create(properties?: IEligibilityDataDeleted): EligibilityDataDeleted;
3357
+
3358
+ /**
3359
+ * Encodes the specified EligibilityDataDeleted message. Does not implicitly {@link EligibilityDataDeleted.verify|verify} messages.
3360
+ * @param message EligibilityDataDeleted message or plain object to encode
3361
+ * @param [writer] Writer to encode to
3362
+ * @returns Writer
3363
+ */
3364
+ public static encode(message: IEligibilityDataDeleted, writer?: $protobuf.Writer): $protobuf.Writer;
3365
+
3366
+ /**
3367
+ * Encodes the specified EligibilityDataDeleted message, length delimited. Does not implicitly {@link EligibilityDataDeleted.verify|verify} messages.
3368
+ * @param message EligibilityDataDeleted message or plain object to encode
3369
+ * @param [writer] Writer to encode to
3370
+ * @returns Writer
3371
+ */
3372
+ public static encodeDelimited(message: IEligibilityDataDeleted, writer?: $protobuf.Writer): $protobuf.Writer;
3373
+
3374
+ /**
3375
+ * Decodes an EligibilityDataDeleted message from the specified reader or buffer.
3376
+ * @param reader Reader or buffer to decode from
3377
+ * @param [length] Message length if known beforehand
3378
+ * @returns EligibilityDataDeleted
3379
+ * @throws {Error} If the payload is not a reader or valid buffer
3380
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3381
+ */
3382
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): EligibilityDataDeleted;
3383
+
3384
+ /**
3385
+ * Decodes an EligibilityDataDeleted message from the specified reader or buffer, length delimited.
3386
+ * @param reader Reader or buffer to decode from
3387
+ * @returns EligibilityDataDeleted
3388
+ * @throws {Error} If the payload is not a reader or valid buffer
3389
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3390
+ */
3391
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): EligibilityDataDeleted;
3392
+
3393
+ /**
3394
+ * Verifies an EligibilityDataDeleted message.
3395
+ * @param message Plain object to verify
3396
+ * @returns `null` if valid, otherwise the reason why it is not
3397
+ */
3398
+ public static verify(message: { [k: string]: any }): (string|null);
3399
+
3400
+ /**
3401
+ * Creates an EligibilityDataDeleted message from a plain object. Also converts values to their respective internal types.
3402
+ * @param object Plain object
3403
+ * @returns EligibilityDataDeleted
3404
+ */
3405
+ public static fromObject(object: { [k: string]: any }): EligibilityDataDeleted;
3406
+
3407
+ /**
3408
+ * Creates a plain object from an EligibilityDataDeleted message. Also converts values to other types if specified.
3409
+ * @param message EligibilityDataDeleted
3410
+ * @param [options] Conversion options
3411
+ * @returns Plain object
3412
+ */
3413
+ public static toObject(message: EligibilityDataDeleted, options?: $protobuf.IConversionOptions): { [k: string]: any };
3414
+
3415
+ /**
3416
+ * Converts this EligibilityDataDeleted to JSON.
3417
+ * @returns JSON object
3418
+ */
3419
+ public toJSON(): { [k: string]: any };
3420
+ }
3421
+
3320
3422
  /** Properties of an Email. */
3321
3423
  export interface IEmail {
3322
3424
 
@@ -69857,6 +69959,15 @@ export namespace productcatalog {
69857
69959
 
69858
69960
  /** product id */
69859
69961
  productId?: (string|null);
69962
+
69963
+ /**
69964
+ * Billing term previews for the sku. Each preview includes the duration of the term, and its prices grouped by
69965
+ * currency + country.
69966
+ * - ORDER MATTERS: the first preview term will be the first term experienced by a user who has purchased this sku.
69967
+ * - By default, only the fist two preview terms are returned (initial term and first renewal term). But if the sku
69968
+ * is a free trial, the array will be PREPENDED by a free trial initial term (is_billing_delay = true).
69969
+ */
69970
+ billingTermPreviews?: (productcatalog.IBillingTermPreview[]|null);
69860
69971
  }
69861
69972
 
69862
69973
  /** Represents a ProductSku. */
@@ -69901,6 +70012,15 @@ export namespace productcatalog {
69901
70012
  /** product id */
69902
70013
  public productId: string;
69903
70014
 
70015
+ /**
70016
+ * - Billing term previews for the sku. Each preview includes the duration of the term, and its prices grouped by
70017
+ * currency + country.
70018
+ * - ORDER MATTERS: the first preview term will be the first term experienced by a user who has purchased this sku.
70019
+ * - By default, only the fist two preview terms are returned (initial term and first renewal term). But if the sku
70020
+ * is a free trial, the array will be PREPENDED by a free trial initial term (is_billing_delay = true).
70021
+ */
70022
+ public billingTermPreviews: productcatalog.IBillingTermPreview[];
70023
+
69904
70024
  /**
69905
70025
  * Creates a new ProductSku instance using the specified properties.
69906
70026
  * @param [properties] Properties to set
@@ -70554,6 +70674,222 @@ export namespace productcatalog {
70554
70674
  TAG_FAMILY = 2,
70555
70675
  TAG_STUDENT_ALUMNI = 3
70556
70676
  }
70677
+
70678
+ /** Properties of a BillingTermPreviewTier. */
70679
+ interface IBillingTermPreviewTier {
70680
+
70681
+ /** BillingTermPreviewTier currency */
70682
+ currency?: (string|null);
70683
+
70684
+ /** BillingTermPreviewTier country */
70685
+ country?: (string|null);
70686
+
70687
+ /** BillingTermPreviewTier price */
70688
+ price?: (number|null);
70689
+
70690
+ /** BillingTermPreviewTier basePrice */
70691
+ basePrice?: (number|null);
70692
+ }
70693
+
70694
+ /** Represents a BillingTermPreviewTier. */
70695
+ class BillingTermPreviewTier implements IBillingTermPreviewTier {
70696
+
70697
+ /**
70698
+ * Constructs a new BillingTermPreviewTier.
70699
+ * @param [properties] Properties to set
70700
+ */
70701
+ constructor(properties?: productcatalog.IBillingTermPreviewTier);
70702
+
70703
+ /** BillingTermPreviewTier currency. */
70704
+ public currency: string;
70705
+
70706
+ /** BillingTermPreviewTier country. */
70707
+ public country: string;
70708
+
70709
+ /** BillingTermPreviewTier price. */
70710
+ public price: number;
70711
+
70712
+ /** BillingTermPreviewTier basePrice. */
70713
+ public basePrice: number;
70714
+
70715
+ /**
70716
+ * Creates a new BillingTermPreviewTier instance using the specified properties.
70717
+ * @param [properties] Properties to set
70718
+ * @returns BillingTermPreviewTier instance
70719
+ */
70720
+ public static create(properties?: productcatalog.IBillingTermPreviewTier): productcatalog.BillingTermPreviewTier;
70721
+
70722
+ /**
70723
+ * Encodes the specified BillingTermPreviewTier message. Does not implicitly {@link productcatalog.BillingTermPreviewTier.verify|verify} messages.
70724
+ * @param message BillingTermPreviewTier message or plain object to encode
70725
+ * @param [writer] Writer to encode to
70726
+ * @returns Writer
70727
+ */
70728
+ public static encode(message: productcatalog.IBillingTermPreviewTier, writer?: $protobuf.Writer): $protobuf.Writer;
70729
+
70730
+ /**
70731
+ * Encodes the specified BillingTermPreviewTier message, length delimited. Does not implicitly {@link productcatalog.BillingTermPreviewTier.verify|verify} messages.
70732
+ * @param message BillingTermPreviewTier message or plain object to encode
70733
+ * @param [writer] Writer to encode to
70734
+ * @returns Writer
70735
+ */
70736
+ public static encodeDelimited(message: productcatalog.IBillingTermPreviewTier, writer?: $protobuf.Writer): $protobuf.Writer;
70737
+
70738
+ /**
70739
+ * Decodes a BillingTermPreviewTier message from the specified reader or buffer.
70740
+ * @param reader Reader or buffer to decode from
70741
+ * @param [length] Message length if known beforehand
70742
+ * @returns BillingTermPreviewTier
70743
+ * @throws {Error} If the payload is not a reader or valid buffer
70744
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
70745
+ */
70746
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): productcatalog.BillingTermPreviewTier;
70747
+
70748
+ /**
70749
+ * Decodes a BillingTermPreviewTier message from the specified reader or buffer, length delimited.
70750
+ * @param reader Reader or buffer to decode from
70751
+ * @returns BillingTermPreviewTier
70752
+ * @throws {Error} If the payload is not a reader or valid buffer
70753
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
70754
+ */
70755
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): productcatalog.BillingTermPreviewTier;
70756
+
70757
+ /**
70758
+ * Verifies a BillingTermPreviewTier message.
70759
+ * @param message Plain object to verify
70760
+ * @returns `null` if valid, otherwise the reason why it is not
70761
+ */
70762
+ public static verify(message: { [k: string]: any }): (string|null);
70763
+
70764
+ /**
70765
+ * Creates a BillingTermPreviewTier message from a plain object. Also converts values to their respective internal types.
70766
+ * @param object Plain object
70767
+ * @returns BillingTermPreviewTier
70768
+ */
70769
+ public static fromObject(object: { [k: string]: any }): productcatalog.BillingTermPreviewTier;
70770
+
70771
+ /**
70772
+ * Creates a plain object from a BillingTermPreviewTier message. Also converts values to other types if specified.
70773
+ * @param message BillingTermPreviewTier
70774
+ * @param [options] Conversion options
70775
+ * @returns Plain object
70776
+ */
70777
+ public static toObject(message: productcatalog.BillingTermPreviewTier, options?: $protobuf.IConversionOptions): { [k: string]: any };
70778
+
70779
+ /**
70780
+ * Converts this BillingTermPreviewTier to JSON.
70781
+ * @returns JSON object
70782
+ */
70783
+ public toJSON(): { [k: string]: any };
70784
+ }
70785
+
70786
+ /** Properties of a BillingTermPreview. */
70787
+ interface IBillingTermPreview {
70788
+
70789
+ /** BillingTermPreview isBillingDelay */
70790
+ isBillingDelay?: (boolean|null);
70791
+
70792
+ /** BillingTermPreview period */
70793
+ period?: (productcatalog.ProductSkuCalendarPeriod|null);
70794
+
70795
+ /** BillingTermPreview numPeriods */
70796
+ numPeriods?: (number|null);
70797
+
70798
+ /** BillingTermPreview tiers */
70799
+ tiers?: (productcatalog.IBillingTermPreviewTier[]|null);
70800
+ }
70801
+
70802
+ /** Represents a BillingTermPreview. */
70803
+ class BillingTermPreview implements IBillingTermPreview {
70804
+
70805
+ /**
70806
+ * Constructs a new BillingTermPreview.
70807
+ * @param [properties] Properties to set
70808
+ */
70809
+ constructor(properties?: productcatalog.IBillingTermPreview);
70810
+
70811
+ /** BillingTermPreview isBillingDelay. */
70812
+ public isBillingDelay: boolean;
70813
+
70814
+ /** BillingTermPreview period. */
70815
+ public period: productcatalog.ProductSkuCalendarPeriod;
70816
+
70817
+ /** BillingTermPreview numPeriods. */
70818
+ public numPeriods: number;
70819
+
70820
+ /** BillingTermPreview tiers. */
70821
+ public tiers: productcatalog.IBillingTermPreviewTier[];
70822
+
70823
+ /**
70824
+ * Creates a new BillingTermPreview instance using the specified properties.
70825
+ * @param [properties] Properties to set
70826
+ * @returns BillingTermPreview instance
70827
+ */
70828
+ public static create(properties?: productcatalog.IBillingTermPreview): productcatalog.BillingTermPreview;
70829
+
70830
+ /**
70831
+ * Encodes the specified BillingTermPreview message. Does not implicitly {@link productcatalog.BillingTermPreview.verify|verify} messages.
70832
+ * @param message BillingTermPreview message or plain object to encode
70833
+ * @param [writer] Writer to encode to
70834
+ * @returns Writer
70835
+ */
70836
+ public static encode(message: productcatalog.IBillingTermPreview, writer?: $protobuf.Writer): $protobuf.Writer;
70837
+
70838
+ /**
70839
+ * Encodes the specified BillingTermPreview message, length delimited. Does not implicitly {@link productcatalog.BillingTermPreview.verify|verify} messages.
70840
+ * @param message BillingTermPreview message or plain object to encode
70841
+ * @param [writer] Writer to encode to
70842
+ * @returns Writer
70843
+ */
70844
+ public static encodeDelimited(message: productcatalog.IBillingTermPreview, writer?: $protobuf.Writer): $protobuf.Writer;
70845
+
70846
+ /**
70847
+ * Decodes a BillingTermPreview message from the specified reader or buffer.
70848
+ * @param reader Reader or buffer to decode from
70849
+ * @param [length] Message length if known beforehand
70850
+ * @returns BillingTermPreview
70851
+ * @throws {Error} If the payload is not a reader or valid buffer
70852
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
70853
+ */
70854
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): productcatalog.BillingTermPreview;
70855
+
70856
+ /**
70857
+ * Decodes a BillingTermPreview message from the specified reader or buffer, length delimited.
70858
+ * @param reader Reader or buffer to decode from
70859
+ * @returns BillingTermPreview
70860
+ * @throws {Error} If the payload is not a reader or valid buffer
70861
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
70862
+ */
70863
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): productcatalog.BillingTermPreview;
70864
+
70865
+ /**
70866
+ * Verifies a BillingTermPreview message.
70867
+ * @param message Plain object to verify
70868
+ * @returns `null` if valid, otherwise the reason why it is not
70869
+ */
70870
+ public static verify(message: { [k: string]: any }): (string|null);
70871
+
70872
+ /**
70873
+ * Creates a BillingTermPreview message from a plain object. Also converts values to their respective internal types.
70874
+ * @param object Plain object
70875
+ * @returns BillingTermPreview
70876
+ */
70877
+ public static fromObject(object: { [k: string]: any }): productcatalog.BillingTermPreview;
70878
+
70879
+ /**
70880
+ * Creates a plain object from a BillingTermPreview message. Also converts values to other types if specified.
70881
+ * @param message BillingTermPreview
70882
+ * @param [options] Conversion options
70883
+ * @returns Plain object
70884
+ */
70885
+ public static toObject(message: productcatalog.BillingTermPreview, options?: $protobuf.IConversionOptions): { [k: string]: any };
70886
+
70887
+ /**
70888
+ * Converts this BillingTermPreview to JSON.
70889
+ * @returns JSON object
70890
+ */
70891
+ public toJSON(): { [k: string]: any };
70892
+ }
70557
70893
  }
70558
70894
 
70559
70895
  /** Namespace scim. */
package/lib/index.js CHANGED
@@ -10271,6 +10271,252 @@ $root.EligibleUserAmended = (function() {
10271
10271
  return EligibleUserAmended;
10272
10272
  })();
10273
10273
 
10274
+ $root.EligibilityDataDeleted = (function() {
10275
+
10276
+ /**
10277
+ * Properties of an EligibilityDataDeleted.
10278
+ * @name IEligibilityDataDeleted
10279
+ * @interface IEligibilityDataDeleted
10280
+ * @property {number|Long|null} [timestamp] EligibilityDataDeleted timestamp
10281
+ * @property {number|null} [b2bOrgId] EligibilityDataDeleted b2bOrgId
10282
+ * @property {string|null} [eligibilityCollectiveUuid] EligibilityDataDeleted eligibilityCollectiveUuid
10283
+ */
10284
+
10285
+ /**
10286
+ * Constructs a new EligibilityDataDeleted.
10287
+ * @name EligibilityDataDeleted
10288
+ * @classdesc Represents an EligibilityDataDeleted.
10289
+ * @implements IEligibilityDataDeleted
10290
+ * @constructor
10291
+ * @param {IEligibilityDataDeleted=} [properties] Properties to set
10292
+ */
10293
+ function EligibilityDataDeleted(properties) {
10294
+ if (properties)
10295
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
10296
+ if (properties[keys[i]] != null)
10297
+ this[keys[i]] = properties[keys[i]];
10298
+ }
10299
+
10300
+ /**
10301
+ * EligibilityDataDeleted timestamp.
10302
+ * @member {number|Long} timestamp
10303
+ * @memberof EligibilityDataDeleted
10304
+ * @instance
10305
+ */
10306
+ EligibilityDataDeleted.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
10307
+
10308
+ /**
10309
+ * EligibilityDataDeleted b2bOrgId.
10310
+ * @member {number} b2bOrgId
10311
+ * @memberof EligibilityDataDeleted
10312
+ * @instance
10313
+ */
10314
+ EligibilityDataDeleted.prototype.b2bOrgId = 0;
10315
+
10316
+ /**
10317
+ * EligibilityDataDeleted eligibilityCollectiveUuid.
10318
+ * @member {string} eligibilityCollectiveUuid
10319
+ * @memberof EligibilityDataDeleted
10320
+ * @instance
10321
+ */
10322
+ EligibilityDataDeleted.prototype.eligibilityCollectiveUuid = "";
10323
+
10324
+ /**
10325
+ * Creates a new EligibilityDataDeleted instance using the specified properties.
10326
+ * @function create
10327
+ * @memberof EligibilityDataDeleted
10328
+ * @static
10329
+ * @param {IEligibilityDataDeleted=} [properties] Properties to set
10330
+ * @returns {EligibilityDataDeleted} EligibilityDataDeleted instance
10331
+ */
10332
+ EligibilityDataDeleted.create = function create(properties) {
10333
+ return new EligibilityDataDeleted(properties);
10334
+ };
10335
+
10336
+ /**
10337
+ * Encodes the specified EligibilityDataDeleted message. Does not implicitly {@link EligibilityDataDeleted.verify|verify} messages.
10338
+ * @function encode
10339
+ * @memberof EligibilityDataDeleted
10340
+ * @static
10341
+ * @param {IEligibilityDataDeleted} message EligibilityDataDeleted message or plain object to encode
10342
+ * @param {$protobuf.Writer} [writer] Writer to encode to
10343
+ * @returns {$protobuf.Writer} Writer
10344
+ */
10345
+ EligibilityDataDeleted.encode = function encode(message, writer) {
10346
+ if (!writer)
10347
+ writer = $Writer.create();
10348
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
10349
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
10350
+ if (message.b2bOrgId != null && message.hasOwnProperty("b2bOrgId"))
10351
+ writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.b2bOrgId);
10352
+ if (message.eligibilityCollectiveUuid != null && message.hasOwnProperty("eligibilityCollectiveUuid"))
10353
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.eligibilityCollectiveUuid);
10354
+ return writer;
10355
+ };
10356
+
10357
+ /**
10358
+ * Encodes the specified EligibilityDataDeleted message, length delimited. Does not implicitly {@link EligibilityDataDeleted.verify|verify} messages.
10359
+ * @function encodeDelimited
10360
+ * @memberof EligibilityDataDeleted
10361
+ * @static
10362
+ * @param {IEligibilityDataDeleted} message EligibilityDataDeleted message or plain object to encode
10363
+ * @param {$protobuf.Writer} [writer] Writer to encode to
10364
+ * @returns {$protobuf.Writer} Writer
10365
+ */
10366
+ EligibilityDataDeleted.encodeDelimited = function encodeDelimited(message, writer) {
10367
+ return this.encode(message, writer).ldelim();
10368
+ };
10369
+
10370
+ /**
10371
+ * Decodes an EligibilityDataDeleted message from the specified reader or buffer.
10372
+ * @function decode
10373
+ * @memberof EligibilityDataDeleted
10374
+ * @static
10375
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
10376
+ * @param {number} [length] Message length if known beforehand
10377
+ * @returns {EligibilityDataDeleted} EligibilityDataDeleted
10378
+ * @throws {Error} If the payload is not a reader or valid buffer
10379
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10380
+ */
10381
+ EligibilityDataDeleted.decode = function decode(reader, length) {
10382
+ if (!(reader instanceof $Reader))
10383
+ reader = $Reader.create(reader);
10384
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.EligibilityDataDeleted();
10385
+ while (reader.pos < end) {
10386
+ var tag = reader.uint32();
10387
+ switch (tag >>> 3) {
10388
+ case 1:
10389
+ message.timestamp = reader.uint64();
10390
+ break;
10391
+ case 2:
10392
+ message.b2bOrgId = reader.uint32();
10393
+ break;
10394
+ case 3:
10395
+ message.eligibilityCollectiveUuid = reader.string();
10396
+ break;
10397
+ default:
10398
+ reader.skipType(tag & 7);
10399
+ break;
10400
+ }
10401
+ }
10402
+ return message;
10403
+ };
10404
+
10405
+ /**
10406
+ * Decodes an EligibilityDataDeleted message from the specified reader or buffer, length delimited.
10407
+ * @function decodeDelimited
10408
+ * @memberof EligibilityDataDeleted
10409
+ * @static
10410
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
10411
+ * @returns {EligibilityDataDeleted} EligibilityDataDeleted
10412
+ * @throws {Error} If the payload is not a reader or valid buffer
10413
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10414
+ */
10415
+ EligibilityDataDeleted.decodeDelimited = function decodeDelimited(reader) {
10416
+ if (!(reader instanceof $Reader))
10417
+ reader = new $Reader(reader);
10418
+ return this.decode(reader, reader.uint32());
10419
+ };
10420
+
10421
+ /**
10422
+ * Verifies an EligibilityDataDeleted message.
10423
+ * @function verify
10424
+ * @memberof EligibilityDataDeleted
10425
+ * @static
10426
+ * @param {Object.<string,*>} message Plain object to verify
10427
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
10428
+ */
10429
+ EligibilityDataDeleted.verify = function verify(message) {
10430
+ if (typeof message !== "object" || message === null)
10431
+ return "object expected";
10432
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
10433
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
10434
+ return "timestamp: integer|Long expected";
10435
+ if (message.b2bOrgId != null && message.hasOwnProperty("b2bOrgId"))
10436
+ if (!$util.isInteger(message.b2bOrgId))
10437
+ return "b2bOrgId: integer expected";
10438
+ if (message.eligibilityCollectiveUuid != null && message.hasOwnProperty("eligibilityCollectiveUuid"))
10439
+ if (!$util.isString(message.eligibilityCollectiveUuid))
10440
+ return "eligibilityCollectiveUuid: string expected";
10441
+ return null;
10442
+ };
10443
+
10444
+ /**
10445
+ * Creates an EligibilityDataDeleted message from a plain object. Also converts values to their respective internal types.
10446
+ * @function fromObject
10447
+ * @memberof EligibilityDataDeleted
10448
+ * @static
10449
+ * @param {Object.<string,*>} object Plain object
10450
+ * @returns {EligibilityDataDeleted} EligibilityDataDeleted
10451
+ */
10452
+ EligibilityDataDeleted.fromObject = function fromObject(object) {
10453
+ if (object instanceof $root.EligibilityDataDeleted)
10454
+ return object;
10455
+ var message = new $root.EligibilityDataDeleted();
10456
+ if (object.timestamp != null)
10457
+ if ($util.Long)
10458
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
10459
+ else if (typeof object.timestamp === "string")
10460
+ message.timestamp = parseInt(object.timestamp, 10);
10461
+ else if (typeof object.timestamp === "number")
10462
+ message.timestamp = object.timestamp;
10463
+ else if (typeof object.timestamp === "object")
10464
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
10465
+ if (object.b2bOrgId != null)
10466
+ message.b2bOrgId = object.b2bOrgId >>> 0;
10467
+ if (object.eligibilityCollectiveUuid != null)
10468
+ message.eligibilityCollectiveUuid = String(object.eligibilityCollectiveUuid);
10469
+ return message;
10470
+ };
10471
+
10472
+ /**
10473
+ * Creates a plain object from an EligibilityDataDeleted message. Also converts values to other types if specified.
10474
+ * @function toObject
10475
+ * @memberof EligibilityDataDeleted
10476
+ * @static
10477
+ * @param {EligibilityDataDeleted} message EligibilityDataDeleted
10478
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
10479
+ * @returns {Object.<string,*>} Plain object
10480
+ */
10481
+ EligibilityDataDeleted.toObject = function toObject(message, options) {
10482
+ if (!options)
10483
+ options = {};
10484
+ var object = {};
10485
+ if (options.defaults) {
10486
+ if ($util.Long) {
10487
+ var long = new $util.Long(0, 0, true);
10488
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
10489
+ } else
10490
+ object.timestamp = options.longs === String ? "0" : 0;
10491
+ object.b2bOrgId = 0;
10492
+ object.eligibilityCollectiveUuid = "";
10493
+ }
10494
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
10495
+ if (typeof message.timestamp === "number")
10496
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
10497
+ else
10498
+ object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp;
10499
+ if (message.b2bOrgId != null && message.hasOwnProperty("b2bOrgId"))
10500
+ object.b2bOrgId = message.b2bOrgId;
10501
+ if (message.eligibilityCollectiveUuid != null && message.hasOwnProperty("eligibilityCollectiveUuid"))
10502
+ object.eligibilityCollectiveUuid = message.eligibilityCollectiveUuid;
10503
+ return object;
10504
+ };
10505
+
10506
+ /**
10507
+ * Converts this EligibilityDataDeleted to JSON.
10508
+ * @function toJSON
10509
+ * @memberof EligibilityDataDeleted
10510
+ * @instance
10511
+ * @returns {Object.<string,*>} JSON object
10512
+ */
10513
+ EligibilityDataDeleted.prototype.toJSON = function toJSON() {
10514
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
10515
+ };
10516
+
10517
+ return EligibilityDataDeleted;
10518
+ })();
10519
+
10274
10520
  $root.Email = (function() {
10275
10521
 
10276
10522
  /**
@@ -197119,6 +197365,11 @@ $root.productcatalog = (function() {
197119
197365
  * @property {productcatalog.IBillingPlan|null} [billingPlan] billing information
197120
197366
  * @property {Array.<productcatalog.ProductSkuTag>|null} [tags] extra information (e.g. student, family)
197121
197367
  * @property {string|null} [productId] product id
197368
+ * @property {Array.<productcatalog.IBillingTermPreview>|null} [billingTermPreviews] - Billing term previews for the sku. Each preview includes the duration of the term, and its prices grouped by
197369
+ * currency + country.
197370
+ * - ORDER MATTERS: the first preview term will be the first term experienced by a user who has purchased this sku.
197371
+ * - By default, only the fist two preview terms are returned (initial term and first renewal term). But if the sku
197372
+ * is a free trial, the array will be PREPENDED by a free trial initial term (is_billing_delay = true).
197122
197373
  */
197123
197374
 
197124
197375
  /**
@@ -197131,6 +197382,7 @@ $root.productcatalog = (function() {
197131
197382
  */
197132
197383
  function ProductSku(properties) {
197133
197384
  this.tags = [];
197385
+ this.billingTermPreviews = [];
197134
197386
  if (properties)
197135
197387
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
197136
197388
  if (properties[keys[i]] != null)
@@ -197225,6 +197477,18 @@ $root.productcatalog = (function() {
197225
197477
  */
197226
197478
  ProductSku.prototype.productId = "";
197227
197479
 
197480
+ /**
197481
+ * - Billing term previews for the sku. Each preview includes the duration of the term, and its prices grouped by
197482
+ * currency + country.
197483
+ * - ORDER MATTERS: the first preview term will be the first term experienced by a user who has purchased this sku.
197484
+ * - By default, only the fist two preview terms are returned (initial term and first renewal term). But if the sku
197485
+ * is a free trial, the array will be PREPENDED by a free trial initial term (is_billing_delay = true).
197486
+ * @member {Array.<productcatalog.IBillingTermPreview>} billingTermPreviews
197487
+ * @memberof productcatalog.ProductSku
197488
+ * @instance
197489
+ */
197490
+ ProductSku.prototype.billingTermPreviews = $util.emptyArray;
197491
+
197228
197492
  /**
197229
197493
  * Creates a new ProductSku instance using the specified properties.
197230
197494
  * @function create
@@ -197275,6 +197539,9 @@ $root.productcatalog = (function() {
197275
197539
  }
197276
197540
  if (message.productId != null && message.hasOwnProperty("productId"))
197277
197541
  writer.uint32(/* id 11, wireType 2 =*/90).string(message.productId);
197542
+ if (message.billingTermPreviews != null && message.billingTermPreviews.length)
197543
+ for (var i = 0; i < message.billingTermPreviews.length; ++i)
197544
+ $root.productcatalog.BillingTermPreview.encode(message.billingTermPreviews[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
197278
197545
  return writer;
197279
197546
  };
197280
197547
 
@@ -197349,6 +197616,11 @@ $root.productcatalog = (function() {
197349
197616
  case 11:
197350
197617
  message.productId = reader.string();
197351
197618
  break;
197619
+ case 12:
197620
+ if (!(message.billingTermPreviews && message.billingTermPreviews.length))
197621
+ message.billingTermPreviews = [];
197622
+ message.billingTermPreviews.push($root.productcatalog.BillingTermPreview.decode(reader, reader.uint32()));
197623
+ break;
197352
197624
  default:
197353
197625
  reader.skipType(tag & 7);
197354
197626
  break;
@@ -197458,6 +197730,15 @@ $root.productcatalog = (function() {
197458
197730
  if (message.productId != null && message.hasOwnProperty("productId"))
197459
197731
  if (!$util.isString(message.productId))
197460
197732
  return "productId: string expected";
197733
+ if (message.billingTermPreviews != null && message.hasOwnProperty("billingTermPreviews")) {
197734
+ if (!Array.isArray(message.billingTermPreviews))
197735
+ return "billingTermPreviews: array expected";
197736
+ for (var i = 0; i < message.billingTermPreviews.length; ++i) {
197737
+ var error = $root.productcatalog.BillingTermPreview.verify(message.billingTermPreviews[i]);
197738
+ if (error)
197739
+ return "billingTermPreviews." + error;
197740
+ }
197741
+ }
197461
197742
  return null;
197462
197743
  };
197463
197744
 
@@ -197594,6 +197875,16 @@ $root.productcatalog = (function() {
197594
197875
  }
197595
197876
  if (object.productId != null)
197596
197877
  message.productId = String(object.productId);
197878
+ if (object.billingTermPreviews) {
197879
+ if (!Array.isArray(object.billingTermPreviews))
197880
+ throw TypeError(".productcatalog.ProductSku.billingTermPreviews: array expected");
197881
+ message.billingTermPreviews = [];
197882
+ for (var i = 0; i < object.billingTermPreviews.length; ++i) {
197883
+ if (typeof object.billingTermPreviews[i] !== "object")
197884
+ throw TypeError(".productcatalog.ProductSku.billingTermPreviews: object expected");
197885
+ message.billingTermPreviews[i] = $root.productcatalog.BillingTermPreview.fromObject(object.billingTermPreviews[i]);
197886
+ }
197887
+ }
197597
197888
  return message;
197598
197889
  };
197599
197890
 
@@ -197610,8 +197901,10 @@ $root.productcatalog = (function() {
197610
197901
  if (!options)
197611
197902
  options = {};
197612
197903
  var object = {};
197613
- if (options.arrays || options.defaults)
197904
+ if (options.arrays || options.defaults) {
197614
197905
  object.tags = [];
197906
+ object.billingTermPreviews = [];
197907
+ }
197615
197908
  if (options.defaults) {
197616
197909
  object.id = "";
197617
197910
  object.slug = "";
@@ -197649,6 +197942,11 @@ $root.productcatalog = (function() {
197649
197942
  }
197650
197943
  if (message.productId != null && message.hasOwnProperty("productId"))
197651
197944
  object.productId = message.productId;
197945
+ if (message.billingTermPreviews && message.billingTermPreviews.length) {
197946
+ object.billingTermPreviews = [];
197947
+ for (var j = 0; j < message.billingTermPreviews.length; ++j)
197948
+ object.billingTermPreviews[j] = $root.productcatalog.BillingTermPreview.toObject(message.billingTermPreviews[j], options);
197949
+ }
197652
197950
  return object;
197653
197951
  };
197654
197952
 
@@ -199252,6 +199550,584 @@ $root.productcatalog = (function() {
199252
199550
  return values;
199253
199551
  })();
199254
199552
 
199553
+ productcatalog.BillingTermPreviewTier = (function() {
199554
+
199555
+ /**
199556
+ * Properties of a BillingTermPreviewTier.
199557
+ * @memberof productcatalog
199558
+ * @interface IBillingTermPreviewTier
199559
+ * @property {string|null} [currency] BillingTermPreviewTier currency
199560
+ * @property {string|null} [country] BillingTermPreviewTier country
199561
+ * @property {number|null} [price] BillingTermPreviewTier price
199562
+ * @property {number|null} [basePrice] BillingTermPreviewTier basePrice
199563
+ */
199564
+
199565
+ /**
199566
+ * Constructs a new BillingTermPreviewTier.
199567
+ * @memberof productcatalog
199568
+ * @classdesc Represents a BillingTermPreviewTier.
199569
+ * @implements IBillingTermPreviewTier
199570
+ * @constructor
199571
+ * @param {productcatalog.IBillingTermPreviewTier=} [properties] Properties to set
199572
+ */
199573
+ function BillingTermPreviewTier(properties) {
199574
+ if (properties)
199575
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
199576
+ if (properties[keys[i]] != null)
199577
+ this[keys[i]] = properties[keys[i]];
199578
+ }
199579
+
199580
+ /**
199581
+ * BillingTermPreviewTier currency.
199582
+ * @member {string} currency
199583
+ * @memberof productcatalog.BillingTermPreviewTier
199584
+ * @instance
199585
+ */
199586
+ BillingTermPreviewTier.prototype.currency = "";
199587
+
199588
+ /**
199589
+ * BillingTermPreviewTier country.
199590
+ * @member {string} country
199591
+ * @memberof productcatalog.BillingTermPreviewTier
199592
+ * @instance
199593
+ */
199594
+ BillingTermPreviewTier.prototype.country = "";
199595
+
199596
+ /**
199597
+ * BillingTermPreviewTier price.
199598
+ * @member {number} price
199599
+ * @memberof productcatalog.BillingTermPreviewTier
199600
+ * @instance
199601
+ */
199602
+ BillingTermPreviewTier.prototype.price = 0;
199603
+
199604
+ /**
199605
+ * BillingTermPreviewTier basePrice.
199606
+ * @member {number} basePrice
199607
+ * @memberof productcatalog.BillingTermPreviewTier
199608
+ * @instance
199609
+ */
199610
+ BillingTermPreviewTier.prototype.basePrice = 0;
199611
+
199612
+ /**
199613
+ * Creates a new BillingTermPreviewTier instance using the specified properties.
199614
+ * @function create
199615
+ * @memberof productcatalog.BillingTermPreviewTier
199616
+ * @static
199617
+ * @param {productcatalog.IBillingTermPreviewTier=} [properties] Properties to set
199618
+ * @returns {productcatalog.BillingTermPreviewTier} BillingTermPreviewTier instance
199619
+ */
199620
+ BillingTermPreviewTier.create = function create(properties) {
199621
+ return new BillingTermPreviewTier(properties);
199622
+ };
199623
+
199624
+ /**
199625
+ * Encodes the specified BillingTermPreviewTier message. Does not implicitly {@link productcatalog.BillingTermPreviewTier.verify|verify} messages.
199626
+ * @function encode
199627
+ * @memberof productcatalog.BillingTermPreviewTier
199628
+ * @static
199629
+ * @param {productcatalog.IBillingTermPreviewTier} message BillingTermPreviewTier message or plain object to encode
199630
+ * @param {$protobuf.Writer} [writer] Writer to encode to
199631
+ * @returns {$protobuf.Writer} Writer
199632
+ */
199633
+ BillingTermPreviewTier.encode = function encode(message, writer) {
199634
+ if (!writer)
199635
+ writer = $Writer.create();
199636
+ if (message.currency != null && message.hasOwnProperty("currency"))
199637
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.currency);
199638
+ if (message.country != null && message.hasOwnProperty("country"))
199639
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.country);
199640
+ if (message.price != null && message.hasOwnProperty("price"))
199641
+ writer.uint32(/* id 3, wireType 1 =*/25).double(message.price);
199642
+ if (message.basePrice != null && message.hasOwnProperty("basePrice"))
199643
+ writer.uint32(/* id 4, wireType 1 =*/33).double(message.basePrice);
199644
+ return writer;
199645
+ };
199646
+
199647
+ /**
199648
+ * Encodes the specified BillingTermPreviewTier message, length delimited. Does not implicitly {@link productcatalog.BillingTermPreviewTier.verify|verify} messages.
199649
+ * @function encodeDelimited
199650
+ * @memberof productcatalog.BillingTermPreviewTier
199651
+ * @static
199652
+ * @param {productcatalog.IBillingTermPreviewTier} message BillingTermPreviewTier message or plain object to encode
199653
+ * @param {$protobuf.Writer} [writer] Writer to encode to
199654
+ * @returns {$protobuf.Writer} Writer
199655
+ */
199656
+ BillingTermPreviewTier.encodeDelimited = function encodeDelimited(message, writer) {
199657
+ return this.encode(message, writer).ldelim();
199658
+ };
199659
+
199660
+ /**
199661
+ * Decodes a BillingTermPreviewTier message from the specified reader or buffer.
199662
+ * @function decode
199663
+ * @memberof productcatalog.BillingTermPreviewTier
199664
+ * @static
199665
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
199666
+ * @param {number} [length] Message length if known beforehand
199667
+ * @returns {productcatalog.BillingTermPreviewTier} BillingTermPreviewTier
199668
+ * @throws {Error} If the payload is not a reader or valid buffer
199669
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
199670
+ */
199671
+ BillingTermPreviewTier.decode = function decode(reader, length) {
199672
+ if (!(reader instanceof $Reader))
199673
+ reader = $Reader.create(reader);
199674
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.productcatalog.BillingTermPreviewTier();
199675
+ while (reader.pos < end) {
199676
+ var tag = reader.uint32();
199677
+ switch (tag >>> 3) {
199678
+ case 1:
199679
+ message.currency = reader.string();
199680
+ break;
199681
+ case 2:
199682
+ message.country = reader.string();
199683
+ break;
199684
+ case 3:
199685
+ message.price = reader.double();
199686
+ break;
199687
+ case 4:
199688
+ message.basePrice = reader.double();
199689
+ break;
199690
+ default:
199691
+ reader.skipType(tag & 7);
199692
+ break;
199693
+ }
199694
+ }
199695
+ return message;
199696
+ };
199697
+
199698
+ /**
199699
+ * Decodes a BillingTermPreviewTier message from the specified reader or buffer, length delimited.
199700
+ * @function decodeDelimited
199701
+ * @memberof productcatalog.BillingTermPreviewTier
199702
+ * @static
199703
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
199704
+ * @returns {productcatalog.BillingTermPreviewTier} BillingTermPreviewTier
199705
+ * @throws {Error} If the payload is not a reader or valid buffer
199706
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
199707
+ */
199708
+ BillingTermPreviewTier.decodeDelimited = function decodeDelimited(reader) {
199709
+ if (!(reader instanceof $Reader))
199710
+ reader = new $Reader(reader);
199711
+ return this.decode(reader, reader.uint32());
199712
+ };
199713
+
199714
+ /**
199715
+ * Verifies a BillingTermPreviewTier message.
199716
+ * @function verify
199717
+ * @memberof productcatalog.BillingTermPreviewTier
199718
+ * @static
199719
+ * @param {Object.<string,*>} message Plain object to verify
199720
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
199721
+ */
199722
+ BillingTermPreviewTier.verify = function verify(message) {
199723
+ if (typeof message !== "object" || message === null)
199724
+ return "object expected";
199725
+ if (message.currency != null && message.hasOwnProperty("currency"))
199726
+ if (!$util.isString(message.currency))
199727
+ return "currency: string expected";
199728
+ if (message.country != null && message.hasOwnProperty("country"))
199729
+ if (!$util.isString(message.country))
199730
+ return "country: string expected";
199731
+ if (message.price != null && message.hasOwnProperty("price"))
199732
+ if (typeof message.price !== "number")
199733
+ return "price: number expected";
199734
+ if (message.basePrice != null && message.hasOwnProperty("basePrice"))
199735
+ if (typeof message.basePrice !== "number")
199736
+ return "basePrice: number expected";
199737
+ return null;
199738
+ };
199739
+
199740
+ /**
199741
+ * Creates a BillingTermPreviewTier message from a plain object. Also converts values to their respective internal types.
199742
+ * @function fromObject
199743
+ * @memberof productcatalog.BillingTermPreviewTier
199744
+ * @static
199745
+ * @param {Object.<string,*>} object Plain object
199746
+ * @returns {productcatalog.BillingTermPreviewTier} BillingTermPreviewTier
199747
+ */
199748
+ BillingTermPreviewTier.fromObject = function fromObject(object) {
199749
+ if (object instanceof $root.productcatalog.BillingTermPreviewTier)
199750
+ return object;
199751
+ var message = new $root.productcatalog.BillingTermPreviewTier();
199752
+ if (object.currency != null)
199753
+ message.currency = String(object.currency);
199754
+ if (object.country != null)
199755
+ message.country = String(object.country);
199756
+ if (object.price != null)
199757
+ message.price = Number(object.price);
199758
+ if (object.basePrice != null)
199759
+ message.basePrice = Number(object.basePrice);
199760
+ return message;
199761
+ };
199762
+
199763
+ /**
199764
+ * Creates a plain object from a BillingTermPreviewTier message. Also converts values to other types if specified.
199765
+ * @function toObject
199766
+ * @memberof productcatalog.BillingTermPreviewTier
199767
+ * @static
199768
+ * @param {productcatalog.BillingTermPreviewTier} message BillingTermPreviewTier
199769
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
199770
+ * @returns {Object.<string,*>} Plain object
199771
+ */
199772
+ BillingTermPreviewTier.toObject = function toObject(message, options) {
199773
+ if (!options)
199774
+ options = {};
199775
+ var object = {};
199776
+ if (options.defaults) {
199777
+ object.currency = "";
199778
+ object.country = "";
199779
+ object.price = 0;
199780
+ object.basePrice = 0;
199781
+ }
199782
+ if (message.currency != null && message.hasOwnProperty("currency"))
199783
+ object.currency = message.currency;
199784
+ if (message.country != null && message.hasOwnProperty("country"))
199785
+ object.country = message.country;
199786
+ if (message.price != null && message.hasOwnProperty("price"))
199787
+ object.price = options.json && !isFinite(message.price) ? String(message.price) : message.price;
199788
+ if (message.basePrice != null && message.hasOwnProperty("basePrice"))
199789
+ object.basePrice = options.json && !isFinite(message.basePrice) ? String(message.basePrice) : message.basePrice;
199790
+ return object;
199791
+ };
199792
+
199793
+ /**
199794
+ * Converts this BillingTermPreviewTier to JSON.
199795
+ * @function toJSON
199796
+ * @memberof productcatalog.BillingTermPreviewTier
199797
+ * @instance
199798
+ * @returns {Object.<string,*>} JSON object
199799
+ */
199800
+ BillingTermPreviewTier.prototype.toJSON = function toJSON() {
199801
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
199802
+ };
199803
+
199804
+ return BillingTermPreviewTier;
199805
+ })();
199806
+
199807
+ productcatalog.BillingTermPreview = (function() {
199808
+
199809
+ /**
199810
+ * Properties of a BillingTermPreview.
199811
+ * @memberof productcatalog
199812
+ * @interface IBillingTermPreview
199813
+ * @property {boolean|null} [isBillingDelay] BillingTermPreview isBillingDelay
199814
+ * @property {productcatalog.ProductSkuCalendarPeriod|null} [period] BillingTermPreview period
199815
+ * @property {number|null} [numPeriods] BillingTermPreview numPeriods
199816
+ * @property {Array.<productcatalog.IBillingTermPreviewTier>|null} [tiers] BillingTermPreview tiers
199817
+ */
199818
+
199819
+ /**
199820
+ * Constructs a new BillingTermPreview.
199821
+ * @memberof productcatalog
199822
+ * @classdesc Represents a BillingTermPreview.
199823
+ * @implements IBillingTermPreview
199824
+ * @constructor
199825
+ * @param {productcatalog.IBillingTermPreview=} [properties] Properties to set
199826
+ */
199827
+ function BillingTermPreview(properties) {
199828
+ this.tiers = [];
199829
+ if (properties)
199830
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
199831
+ if (properties[keys[i]] != null)
199832
+ this[keys[i]] = properties[keys[i]];
199833
+ }
199834
+
199835
+ /**
199836
+ * BillingTermPreview isBillingDelay.
199837
+ * @member {boolean} isBillingDelay
199838
+ * @memberof productcatalog.BillingTermPreview
199839
+ * @instance
199840
+ */
199841
+ BillingTermPreview.prototype.isBillingDelay = false;
199842
+
199843
+ /**
199844
+ * BillingTermPreview period.
199845
+ * @member {productcatalog.ProductSkuCalendarPeriod} period
199846
+ * @memberof productcatalog.BillingTermPreview
199847
+ * @instance
199848
+ */
199849
+ BillingTermPreview.prototype.period = 0;
199850
+
199851
+ /**
199852
+ * BillingTermPreview numPeriods.
199853
+ * @member {number} numPeriods
199854
+ * @memberof productcatalog.BillingTermPreview
199855
+ * @instance
199856
+ */
199857
+ BillingTermPreview.prototype.numPeriods = 0;
199858
+
199859
+ /**
199860
+ * BillingTermPreview tiers.
199861
+ * @member {Array.<productcatalog.IBillingTermPreviewTier>} tiers
199862
+ * @memberof productcatalog.BillingTermPreview
199863
+ * @instance
199864
+ */
199865
+ BillingTermPreview.prototype.tiers = $util.emptyArray;
199866
+
199867
+ /**
199868
+ * Creates a new BillingTermPreview instance using the specified properties.
199869
+ * @function create
199870
+ * @memberof productcatalog.BillingTermPreview
199871
+ * @static
199872
+ * @param {productcatalog.IBillingTermPreview=} [properties] Properties to set
199873
+ * @returns {productcatalog.BillingTermPreview} BillingTermPreview instance
199874
+ */
199875
+ BillingTermPreview.create = function create(properties) {
199876
+ return new BillingTermPreview(properties);
199877
+ };
199878
+
199879
+ /**
199880
+ * Encodes the specified BillingTermPreview message. Does not implicitly {@link productcatalog.BillingTermPreview.verify|verify} messages.
199881
+ * @function encode
199882
+ * @memberof productcatalog.BillingTermPreview
199883
+ * @static
199884
+ * @param {productcatalog.IBillingTermPreview} message BillingTermPreview message or plain object to encode
199885
+ * @param {$protobuf.Writer} [writer] Writer to encode to
199886
+ * @returns {$protobuf.Writer} Writer
199887
+ */
199888
+ BillingTermPreview.encode = function encode(message, writer) {
199889
+ if (!writer)
199890
+ writer = $Writer.create();
199891
+ if (message.isBillingDelay != null && message.hasOwnProperty("isBillingDelay"))
199892
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isBillingDelay);
199893
+ if (message.period != null && message.hasOwnProperty("period"))
199894
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.period);
199895
+ if (message.numPeriods != null && message.hasOwnProperty("numPeriods"))
199896
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.numPeriods);
199897
+ if (message.tiers != null && message.tiers.length)
199898
+ for (var i = 0; i < message.tiers.length; ++i)
199899
+ $root.productcatalog.BillingTermPreviewTier.encode(message.tiers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
199900
+ return writer;
199901
+ };
199902
+
199903
+ /**
199904
+ * Encodes the specified BillingTermPreview message, length delimited. Does not implicitly {@link productcatalog.BillingTermPreview.verify|verify} messages.
199905
+ * @function encodeDelimited
199906
+ * @memberof productcatalog.BillingTermPreview
199907
+ * @static
199908
+ * @param {productcatalog.IBillingTermPreview} message BillingTermPreview message or plain object to encode
199909
+ * @param {$protobuf.Writer} [writer] Writer to encode to
199910
+ * @returns {$protobuf.Writer} Writer
199911
+ */
199912
+ BillingTermPreview.encodeDelimited = function encodeDelimited(message, writer) {
199913
+ return this.encode(message, writer).ldelim();
199914
+ };
199915
+
199916
+ /**
199917
+ * Decodes a BillingTermPreview message from the specified reader or buffer.
199918
+ * @function decode
199919
+ * @memberof productcatalog.BillingTermPreview
199920
+ * @static
199921
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
199922
+ * @param {number} [length] Message length if known beforehand
199923
+ * @returns {productcatalog.BillingTermPreview} BillingTermPreview
199924
+ * @throws {Error} If the payload is not a reader or valid buffer
199925
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
199926
+ */
199927
+ BillingTermPreview.decode = function decode(reader, length) {
199928
+ if (!(reader instanceof $Reader))
199929
+ reader = $Reader.create(reader);
199930
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.productcatalog.BillingTermPreview();
199931
+ while (reader.pos < end) {
199932
+ var tag = reader.uint32();
199933
+ switch (tag >>> 3) {
199934
+ case 1:
199935
+ message.isBillingDelay = reader.bool();
199936
+ break;
199937
+ case 2:
199938
+ message.period = reader.int32();
199939
+ break;
199940
+ case 3:
199941
+ message.numPeriods = reader.int32();
199942
+ break;
199943
+ case 4:
199944
+ if (!(message.tiers && message.tiers.length))
199945
+ message.tiers = [];
199946
+ message.tiers.push($root.productcatalog.BillingTermPreviewTier.decode(reader, reader.uint32()));
199947
+ break;
199948
+ default:
199949
+ reader.skipType(tag & 7);
199950
+ break;
199951
+ }
199952
+ }
199953
+ return message;
199954
+ };
199955
+
199956
+ /**
199957
+ * Decodes a BillingTermPreview message from the specified reader or buffer, length delimited.
199958
+ * @function decodeDelimited
199959
+ * @memberof productcatalog.BillingTermPreview
199960
+ * @static
199961
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
199962
+ * @returns {productcatalog.BillingTermPreview} BillingTermPreview
199963
+ * @throws {Error} If the payload is not a reader or valid buffer
199964
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
199965
+ */
199966
+ BillingTermPreview.decodeDelimited = function decodeDelimited(reader) {
199967
+ if (!(reader instanceof $Reader))
199968
+ reader = new $Reader(reader);
199969
+ return this.decode(reader, reader.uint32());
199970
+ };
199971
+
199972
+ /**
199973
+ * Verifies a BillingTermPreview message.
199974
+ * @function verify
199975
+ * @memberof productcatalog.BillingTermPreview
199976
+ * @static
199977
+ * @param {Object.<string,*>} message Plain object to verify
199978
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
199979
+ */
199980
+ BillingTermPreview.verify = function verify(message) {
199981
+ if (typeof message !== "object" || message === null)
199982
+ return "object expected";
199983
+ if (message.isBillingDelay != null && message.hasOwnProperty("isBillingDelay"))
199984
+ if (typeof message.isBillingDelay !== "boolean")
199985
+ return "isBillingDelay: boolean expected";
199986
+ if (message.period != null && message.hasOwnProperty("period"))
199987
+ switch (message.period) {
199988
+ default:
199989
+ return "period: enum value expected";
199990
+ case 0:
199991
+ case 1:
199992
+ case 2:
199993
+ case 3:
199994
+ case 4:
199995
+ case 5:
199996
+ case 7:
199997
+ case 8:
199998
+ case 9:
199999
+ break;
200000
+ }
200001
+ if (message.numPeriods != null && message.hasOwnProperty("numPeriods"))
200002
+ if (!$util.isInteger(message.numPeriods))
200003
+ return "numPeriods: integer expected";
200004
+ if (message.tiers != null && message.hasOwnProperty("tiers")) {
200005
+ if (!Array.isArray(message.tiers))
200006
+ return "tiers: array expected";
200007
+ for (var i = 0; i < message.tiers.length; ++i) {
200008
+ var error = $root.productcatalog.BillingTermPreviewTier.verify(message.tiers[i]);
200009
+ if (error)
200010
+ return "tiers." + error;
200011
+ }
200012
+ }
200013
+ return null;
200014
+ };
200015
+
200016
+ /**
200017
+ * Creates a BillingTermPreview message from a plain object. Also converts values to their respective internal types.
200018
+ * @function fromObject
200019
+ * @memberof productcatalog.BillingTermPreview
200020
+ * @static
200021
+ * @param {Object.<string,*>} object Plain object
200022
+ * @returns {productcatalog.BillingTermPreview} BillingTermPreview
200023
+ */
200024
+ BillingTermPreview.fromObject = function fromObject(object) {
200025
+ if (object instanceof $root.productcatalog.BillingTermPreview)
200026
+ return object;
200027
+ var message = new $root.productcatalog.BillingTermPreview();
200028
+ if (object.isBillingDelay != null)
200029
+ message.isBillingDelay = Boolean(object.isBillingDelay);
200030
+ switch (object.period) {
200031
+ case "CP_UNKNOWN":
200032
+ case 0:
200033
+ message.period = 0;
200034
+ break;
200035
+ case "CP_DAY":
200036
+ case 1:
200037
+ message.period = 1;
200038
+ break;
200039
+ case "CP_MONTH":
200040
+ case 2:
200041
+ message.period = 2;
200042
+ break;
200043
+ case "CP_YEAR":
200044
+ case 3:
200045
+ message.period = 3;
200046
+ break;
200047
+ case "CP_LIFETIME":
200048
+ case 4:
200049
+ message.period = 4;
200050
+ break;
200051
+ case "CP_ONE_TIME":
200052
+ case 5:
200053
+ message.period = 5;
200054
+ break;
200055
+ case "CP_HALF_YEAR":
200056
+ case 7:
200057
+ message.period = 7;
200058
+ break;
200059
+ case "CP_TWO_YEARS":
200060
+ case 8:
200061
+ message.period = 8;
200062
+ break;
200063
+ case "CP_FIVE_YEARS":
200064
+ case 9:
200065
+ message.period = 9;
200066
+ break;
200067
+ }
200068
+ if (object.numPeriods != null)
200069
+ message.numPeriods = object.numPeriods | 0;
200070
+ if (object.tiers) {
200071
+ if (!Array.isArray(object.tiers))
200072
+ throw TypeError(".productcatalog.BillingTermPreview.tiers: array expected");
200073
+ message.tiers = [];
200074
+ for (var i = 0; i < object.tiers.length; ++i) {
200075
+ if (typeof object.tiers[i] !== "object")
200076
+ throw TypeError(".productcatalog.BillingTermPreview.tiers: object expected");
200077
+ message.tiers[i] = $root.productcatalog.BillingTermPreviewTier.fromObject(object.tiers[i]);
200078
+ }
200079
+ }
200080
+ return message;
200081
+ };
200082
+
200083
+ /**
200084
+ * Creates a plain object from a BillingTermPreview message. Also converts values to other types if specified.
200085
+ * @function toObject
200086
+ * @memberof productcatalog.BillingTermPreview
200087
+ * @static
200088
+ * @param {productcatalog.BillingTermPreview} message BillingTermPreview
200089
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
200090
+ * @returns {Object.<string,*>} Plain object
200091
+ */
200092
+ BillingTermPreview.toObject = function toObject(message, options) {
200093
+ if (!options)
200094
+ options = {};
200095
+ var object = {};
200096
+ if (options.arrays || options.defaults)
200097
+ object.tiers = [];
200098
+ if (options.defaults) {
200099
+ object.isBillingDelay = false;
200100
+ object.period = options.enums === String ? "CP_UNKNOWN" : 0;
200101
+ object.numPeriods = 0;
200102
+ }
200103
+ if (message.isBillingDelay != null && message.hasOwnProperty("isBillingDelay"))
200104
+ object.isBillingDelay = message.isBillingDelay;
200105
+ if (message.period != null && message.hasOwnProperty("period"))
200106
+ object.period = options.enums === String ? $root.productcatalog.ProductSkuCalendarPeriod[message.period] : message.period;
200107
+ if (message.numPeriods != null && message.hasOwnProperty("numPeriods"))
200108
+ object.numPeriods = message.numPeriods;
200109
+ if (message.tiers && message.tiers.length) {
200110
+ object.tiers = [];
200111
+ for (var j = 0; j < message.tiers.length; ++j)
200112
+ object.tiers[j] = $root.productcatalog.BillingTermPreviewTier.toObject(message.tiers[j], options);
200113
+ }
200114
+ return object;
200115
+ };
200116
+
200117
+ /**
200118
+ * Converts this BillingTermPreview to JSON.
200119
+ * @function toJSON
200120
+ * @memberof productcatalog.BillingTermPreview
200121
+ * @instance
200122
+ * @returns {Object.<string,*>} JSON object
200123
+ */
200124
+ BillingTermPreview.prototype.toJSON = function toJSON() {
200125
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
200126
+ };
200127
+
200128
+ return BillingTermPreview;
200129
+ })();
200130
+
199255
200131
  return productcatalog;
199256
200132
  })();
199257
200133
 
package/package.json CHANGED
@@ -16,5 +16,5 @@
16
16
  "main": "lib/index.js",
17
17
  "name": "@headspace/protos-events",
18
18
  "typings": "lib/index.d.ts",
19
- "version": "1.716.0"
19
+ "version": "1.718.0"
20
20
  }