@headspace/protos-events 1.715.0 → 1.717.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.
Files changed (3) hide show
  1. package/lib/index.d.ts +240 -10
  2. package/lib/index.js +647 -5
  3. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -58193,22 +58193,18 @@ export namespace clinical {
58193
58193
  CLINICIAN_RACE_MULTIRACIAL = 7
58194
58194
  }
58195
58195
 
58196
- /**
58197
- * List of clinician's language specialties (the clinican can be assigned to members with specific languages),
58198
- * there is not language for english speaking members
58199
- */
58196
+ /** List of clinician's language specialties (the clinican can be assigned to members with specific languages) */
58200
58197
  enum ClinicianLanguageSpecialty {
58201
58198
  CLINICIAN_LANGUAGE_SPECIALTY_UNKNOWN = 0,
58202
- CLINICIAN_LANGUAGE_SPECIALTY_SPANISH = 1
58199
+ CLINICIAN_LANGUAGE_SPECIALTY_SPANISH = 1,
58200
+ CLINICIAN_LANGUAGE_SPECIALTY_ENGLISH = 2
58203
58201
  }
58204
58202
 
58205
- /**
58206
- * List of clinician's age range specialties (the clinican can be assigned to members with specific age ranges),
58207
- * there is not age range for adults
58208
- */
58203
+ /** List of clinician's age range specialties (the clinican can be assigned to members with specific age ranges) */
58209
58204
  enum ClinicianAgeRangeSpecialty {
58210
58205
  CLINICIAN_AGE_RANGE_SPECIALTY_UNKNOWN = 0,
58211
- CLINICIAN_AGE_RANGE_SPECIALTY_ADOLESCENT = 1
58206
+ CLINICIAN_AGE_RANGE_SPECIALTY_ADOLESCENT = 1,
58207
+ CLINICIAN_AGE_RANGE_SPECIALTY_ADULT = 2
58212
58208
  }
58213
58209
 
58214
58210
  /** Properties of a Coach. */
@@ -69861,6 +69857,15 @@ export namespace productcatalog {
69861
69857
 
69862
69858
  /** product id */
69863
69859
  productId?: (string|null);
69860
+
69861
+ /**
69862
+ * Billing term previews for the sku. Each preview includes the duration of the term, and its prices grouped by
69863
+ * currency + country.
69864
+ * - ORDER MATTERS: the first preview term will be the first term experienced by a user who has purchased this sku.
69865
+ * - By default, only the fist two preview terms are returned (initial term and first renewal term). But if the sku
69866
+ * is a free trial, the array will be PREPENDED by a free trial initial term (is_billing_delay = true).
69867
+ */
69868
+ billingTermPreviews?: (productcatalog.IBillingTermPreview[]|null);
69864
69869
  }
69865
69870
 
69866
69871
  /** Represents a ProductSku. */
@@ -69905,6 +69910,15 @@ export namespace productcatalog {
69905
69910
  /** product id */
69906
69911
  public productId: string;
69907
69912
 
69913
+ /**
69914
+ * - Billing term previews for the sku. Each preview includes the duration of the term, and its prices grouped by
69915
+ * currency + country.
69916
+ * - ORDER MATTERS: the first preview term will be the first term experienced by a user who has purchased this sku.
69917
+ * - By default, only the fist two preview terms are returned (initial term and first renewal term). But if the sku
69918
+ * is a free trial, the array will be PREPENDED by a free trial initial term (is_billing_delay = true).
69919
+ */
69920
+ public billingTermPreviews: productcatalog.IBillingTermPreview[];
69921
+
69908
69922
  /**
69909
69923
  * Creates a new ProductSku instance using the specified properties.
69910
69924
  * @param [properties] Properties to set
@@ -70558,6 +70572,222 @@ export namespace productcatalog {
70558
70572
  TAG_FAMILY = 2,
70559
70573
  TAG_STUDENT_ALUMNI = 3
70560
70574
  }
70575
+
70576
+ /** Properties of a BillingTermPreviewTier. */
70577
+ interface IBillingTermPreviewTier {
70578
+
70579
+ /** BillingTermPreviewTier currency */
70580
+ currency?: (string|null);
70581
+
70582
+ /** BillingTermPreviewTier country */
70583
+ country?: (string|null);
70584
+
70585
+ /** BillingTermPreviewTier price */
70586
+ price?: (number|null);
70587
+
70588
+ /** BillingTermPreviewTier basePrice */
70589
+ basePrice?: (number|null);
70590
+ }
70591
+
70592
+ /** Represents a BillingTermPreviewTier. */
70593
+ class BillingTermPreviewTier implements IBillingTermPreviewTier {
70594
+
70595
+ /**
70596
+ * Constructs a new BillingTermPreviewTier.
70597
+ * @param [properties] Properties to set
70598
+ */
70599
+ constructor(properties?: productcatalog.IBillingTermPreviewTier);
70600
+
70601
+ /** BillingTermPreviewTier currency. */
70602
+ public currency: string;
70603
+
70604
+ /** BillingTermPreviewTier country. */
70605
+ public country: string;
70606
+
70607
+ /** BillingTermPreviewTier price. */
70608
+ public price: number;
70609
+
70610
+ /** BillingTermPreviewTier basePrice. */
70611
+ public basePrice: number;
70612
+
70613
+ /**
70614
+ * Creates a new BillingTermPreviewTier instance using the specified properties.
70615
+ * @param [properties] Properties to set
70616
+ * @returns BillingTermPreviewTier instance
70617
+ */
70618
+ public static create(properties?: productcatalog.IBillingTermPreviewTier): productcatalog.BillingTermPreviewTier;
70619
+
70620
+ /**
70621
+ * Encodes the specified BillingTermPreviewTier message. Does not implicitly {@link productcatalog.BillingTermPreviewTier.verify|verify} messages.
70622
+ * @param message BillingTermPreviewTier message or plain object to encode
70623
+ * @param [writer] Writer to encode to
70624
+ * @returns Writer
70625
+ */
70626
+ public static encode(message: productcatalog.IBillingTermPreviewTier, writer?: $protobuf.Writer): $protobuf.Writer;
70627
+
70628
+ /**
70629
+ * Encodes the specified BillingTermPreviewTier message, length delimited. Does not implicitly {@link productcatalog.BillingTermPreviewTier.verify|verify} messages.
70630
+ * @param message BillingTermPreviewTier message or plain object to encode
70631
+ * @param [writer] Writer to encode to
70632
+ * @returns Writer
70633
+ */
70634
+ public static encodeDelimited(message: productcatalog.IBillingTermPreviewTier, writer?: $protobuf.Writer): $protobuf.Writer;
70635
+
70636
+ /**
70637
+ * Decodes a BillingTermPreviewTier message from the specified reader or buffer.
70638
+ * @param reader Reader or buffer to decode from
70639
+ * @param [length] Message length if known beforehand
70640
+ * @returns BillingTermPreviewTier
70641
+ * @throws {Error} If the payload is not a reader or valid buffer
70642
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
70643
+ */
70644
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): productcatalog.BillingTermPreviewTier;
70645
+
70646
+ /**
70647
+ * Decodes a BillingTermPreviewTier message from the specified reader or buffer, length delimited.
70648
+ * @param reader Reader or buffer to decode from
70649
+ * @returns BillingTermPreviewTier
70650
+ * @throws {Error} If the payload is not a reader or valid buffer
70651
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
70652
+ */
70653
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): productcatalog.BillingTermPreviewTier;
70654
+
70655
+ /**
70656
+ * Verifies a BillingTermPreviewTier message.
70657
+ * @param message Plain object to verify
70658
+ * @returns `null` if valid, otherwise the reason why it is not
70659
+ */
70660
+ public static verify(message: { [k: string]: any }): (string|null);
70661
+
70662
+ /**
70663
+ * Creates a BillingTermPreviewTier message from a plain object. Also converts values to their respective internal types.
70664
+ * @param object Plain object
70665
+ * @returns BillingTermPreviewTier
70666
+ */
70667
+ public static fromObject(object: { [k: string]: any }): productcatalog.BillingTermPreviewTier;
70668
+
70669
+ /**
70670
+ * Creates a plain object from a BillingTermPreviewTier message. Also converts values to other types if specified.
70671
+ * @param message BillingTermPreviewTier
70672
+ * @param [options] Conversion options
70673
+ * @returns Plain object
70674
+ */
70675
+ public static toObject(message: productcatalog.BillingTermPreviewTier, options?: $protobuf.IConversionOptions): { [k: string]: any };
70676
+
70677
+ /**
70678
+ * Converts this BillingTermPreviewTier to JSON.
70679
+ * @returns JSON object
70680
+ */
70681
+ public toJSON(): { [k: string]: any };
70682
+ }
70683
+
70684
+ /** Properties of a BillingTermPreview. */
70685
+ interface IBillingTermPreview {
70686
+
70687
+ /** BillingTermPreview isBillingDelay */
70688
+ isBillingDelay?: (boolean|null);
70689
+
70690
+ /** BillingTermPreview period */
70691
+ period?: (productcatalog.ProductSkuCalendarPeriod|null);
70692
+
70693
+ /** BillingTermPreview numPeriods */
70694
+ numPeriods?: (number|null);
70695
+
70696
+ /** BillingTermPreview tiers */
70697
+ tiers?: (productcatalog.IBillingTermPreviewTier[]|null);
70698
+ }
70699
+
70700
+ /** Represents a BillingTermPreview. */
70701
+ class BillingTermPreview implements IBillingTermPreview {
70702
+
70703
+ /**
70704
+ * Constructs a new BillingTermPreview.
70705
+ * @param [properties] Properties to set
70706
+ */
70707
+ constructor(properties?: productcatalog.IBillingTermPreview);
70708
+
70709
+ /** BillingTermPreview isBillingDelay. */
70710
+ public isBillingDelay: boolean;
70711
+
70712
+ /** BillingTermPreview period. */
70713
+ public period: productcatalog.ProductSkuCalendarPeriod;
70714
+
70715
+ /** BillingTermPreview numPeriods. */
70716
+ public numPeriods: number;
70717
+
70718
+ /** BillingTermPreview tiers. */
70719
+ public tiers: productcatalog.IBillingTermPreviewTier[];
70720
+
70721
+ /**
70722
+ * Creates a new BillingTermPreview instance using the specified properties.
70723
+ * @param [properties] Properties to set
70724
+ * @returns BillingTermPreview instance
70725
+ */
70726
+ public static create(properties?: productcatalog.IBillingTermPreview): productcatalog.BillingTermPreview;
70727
+
70728
+ /**
70729
+ * Encodes the specified BillingTermPreview message. Does not implicitly {@link productcatalog.BillingTermPreview.verify|verify} messages.
70730
+ * @param message BillingTermPreview message or plain object to encode
70731
+ * @param [writer] Writer to encode to
70732
+ * @returns Writer
70733
+ */
70734
+ public static encode(message: productcatalog.IBillingTermPreview, writer?: $protobuf.Writer): $protobuf.Writer;
70735
+
70736
+ /**
70737
+ * Encodes the specified BillingTermPreview message, length delimited. Does not implicitly {@link productcatalog.BillingTermPreview.verify|verify} messages.
70738
+ * @param message BillingTermPreview message or plain object to encode
70739
+ * @param [writer] Writer to encode to
70740
+ * @returns Writer
70741
+ */
70742
+ public static encodeDelimited(message: productcatalog.IBillingTermPreview, writer?: $protobuf.Writer): $protobuf.Writer;
70743
+
70744
+ /**
70745
+ * Decodes a BillingTermPreview message from the specified reader or buffer.
70746
+ * @param reader Reader or buffer to decode from
70747
+ * @param [length] Message length if known beforehand
70748
+ * @returns BillingTermPreview
70749
+ * @throws {Error} If the payload is not a reader or valid buffer
70750
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
70751
+ */
70752
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): productcatalog.BillingTermPreview;
70753
+
70754
+ /**
70755
+ * Decodes a BillingTermPreview message from the specified reader or buffer, length delimited.
70756
+ * @param reader Reader or buffer to decode from
70757
+ * @returns BillingTermPreview
70758
+ * @throws {Error} If the payload is not a reader or valid buffer
70759
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
70760
+ */
70761
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): productcatalog.BillingTermPreview;
70762
+
70763
+ /**
70764
+ * Verifies a BillingTermPreview message.
70765
+ * @param message Plain object to verify
70766
+ * @returns `null` if valid, otherwise the reason why it is not
70767
+ */
70768
+ public static verify(message: { [k: string]: any }): (string|null);
70769
+
70770
+ /**
70771
+ * Creates a BillingTermPreview message from a plain object. Also converts values to their respective internal types.
70772
+ * @param object Plain object
70773
+ * @returns BillingTermPreview
70774
+ */
70775
+ public static fromObject(object: { [k: string]: any }): productcatalog.BillingTermPreview;
70776
+
70777
+ /**
70778
+ * Creates a plain object from a BillingTermPreview message. Also converts values to other types if specified.
70779
+ * @param message BillingTermPreview
70780
+ * @param [options] Conversion options
70781
+ * @returns Plain object
70782
+ */
70783
+ public static toObject(message: productcatalog.BillingTermPreview, options?: $protobuf.IConversionOptions): { [k: string]: any };
70784
+
70785
+ /**
70786
+ * Converts this BillingTermPreview to JSON.
70787
+ * @returns JSON object
70788
+ */
70789
+ public toJSON(): { [k: string]: any };
70790
+ }
70561
70791
  }
70562
70792
 
70563
70793
  /** Namespace scim. */
package/lib/index.js CHANGED
@@ -165537,6 +165537,7 @@ $root.clinical = (function() {
165537
165537
  return "languagesSpecialties: enum value[] expected";
165538
165538
  case 0:
165539
165539
  case 1:
165540
+ case 2:
165540
165541
  break;
165541
165542
  }
165542
165543
  }
@@ -165549,6 +165550,7 @@ $root.clinical = (function() {
165549
165550
  return "ageRangeSpecialties: enum value[] expected";
165550
165551
  case 0:
165551
165552
  case 1:
165553
+ case 2:
165552
165554
  break;
165553
165555
  }
165554
165556
  }
@@ -165813,6 +165815,10 @@ $root.clinical = (function() {
165813
165815
  case 1:
165814
165816
  message.languagesSpecialties[i] = 1;
165815
165817
  break;
165818
+ case "CLINICIAN_LANGUAGE_SPECIALTY_ENGLISH":
165819
+ case 2:
165820
+ message.languagesSpecialties[i] = 2;
165821
+ break;
165816
165822
  }
165817
165823
  }
165818
165824
  if (object.ageRangeSpecialties) {
@@ -165830,6 +165836,10 @@ $root.clinical = (function() {
165830
165836
  case 1:
165831
165837
  message.ageRangeSpecialties[i] = 1;
165832
165838
  break;
165839
+ case "CLINICIAN_AGE_RANGE_SPECIALTY_ADULT":
165840
+ case 2:
165841
+ message.ageRangeSpecialties[i] = 2;
165842
+ break;
165833
165843
  }
165834
165844
  }
165835
165845
  if (object.races) {
@@ -166427,32 +166437,34 @@ $root.clinical = (function() {
166427
166437
  })();
166428
166438
 
166429
166439
  /**
166430
- * List of clinician's language specialties (the clinican can be assigned to members with specific languages),
166431
- * there is not language for english speaking members
166440
+ * List of clinician's language specialties (the clinican can be assigned to members with specific languages)
166432
166441
  * @name clinical.ClinicianLanguageSpecialty
166433
166442
  * @enum {string}
166434
166443
  * @property {number} CLINICIAN_LANGUAGE_SPECIALTY_UNKNOWN=0 CLINICIAN_LANGUAGE_SPECIALTY_UNKNOWN value
166435
166444
  * @property {number} CLINICIAN_LANGUAGE_SPECIALTY_SPANISH=1 CLINICIAN_LANGUAGE_SPECIALTY_SPANISH value
166445
+ * @property {number} CLINICIAN_LANGUAGE_SPECIALTY_ENGLISH=2 CLINICIAN_LANGUAGE_SPECIALTY_ENGLISH value
166436
166446
  */
166437
166447
  clinical.ClinicianLanguageSpecialty = (function() {
166438
166448
  var valuesById = {}, values = Object.create(valuesById);
166439
166449
  values[valuesById[0] = "CLINICIAN_LANGUAGE_SPECIALTY_UNKNOWN"] = 0;
166440
166450
  values[valuesById[1] = "CLINICIAN_LANGUAGE_SPECIALTY_SPANISH"] = 1;
166451
+ values[valuesById[2] = "CLINICIAN_LANGUAGE_SPECIALTY_ENGLISH"] = 2;
166441
166452
  return values;
166442
166453
  })();
166443
166454
 
166444
166455
  /**
166445
- * List of clinician's age range specialties (the clinican can be assigned to members with specific age ranges),
166446
- * there is not age range for adults
166456
+ * List of clinician's age range specialties (the clinican can be assigned to members with specific age ranges)
166447
166457
  * @name clinical.ClinicianAgeRangeSpecialty
166448
166458
  * @enum {string}
166449
166459
  * @property {number} CLINICIAN_AGE_RANGE_SPECIALTY_UNKNOWN=0 CLINICIAN_AGE_RANGE_SPECIALTY_UNKNOWN value
166450
166460
  * @property {number} CLINICIAN_AGE_RANGE_SPECIALTY_ADOLESCENT=1 CLINICIAN_AGE_RANGE_SPECIALTY_ADOLESCENT value
166461
+ * @property {number} CLINICIAN_AGE_RANGE_SPECIALTY_ADULT=2 CLINICIAN_AGE_RANGE_SPECIALTY_ADULT value
166451
166462
  */
166452
166463
  clinical.ClinicianAgeRangeSpecialty = (function() {
166453
166464
  var valuesById = {}, values = Object.create(valuesById);
166454
166465
  values[valuesById[0] = "CLINICIAN_AGE_RANGE_SPECIALTY_UNKNOWN"] = 0;
166455
166466
  values[valuesById[1] = "CLINICIAN_AGE_RANGE_SPECIALTY_ADOLESCENT"] = 1;
166467
+ values[valuesById[2] = "CLINICIAN_AGE_RANGE_SPECIALTY_ADULT"] = 2;
166456
166468
  return values;
166457
166469
  })();
166458
166470
 
@@ -197107,6 +197119,11 @@ $root.productcatalog = (function() {
197107
197119
  * @property {productcatalog.IBillingPlan|null} [billingPlan] billing information
197108
197120
  * @property {Array.<productcatalog.ProductSkuTag>|null} [tags] extra information (e.g. student, family)
197109
197121
  * @property {string|null} [productId] product id
197122
+ * @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
197123
+ * currency + country.
197124
+ * - ORDER MATTERS: the first preview term will be the first term experienced by a user who has purchased this sku.
197125
+ * - By default, only the fist two preview terms are returned (initial term and first renewal term). But if the sku
197126
+ * is a free trial, the array will be PREPENDED by a free trial initial term (is_billing_delay = true).
197110
197127
  */
197111
197128
 
197112
197129
  /**
@@ -197119,6 +197136,7 @@ $root.productcatalog = (function() {
197119
197136
  */
197120
197137
  function ProductSku(properties) {
197121
197138
  this.tags = [];
197139
+ this.billingTermPreviews = [];
197122
197140
  if (properties)
197123
197141
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
197124
197142
  if (properties[keys[i]] != null)
@@ -197213,6 +197231,18 @@ $root.productcatalog = (function() {
197213
197231
  */
197214
197232
  ProductSku.prototype.productId = "";
197215
197233
 
197234
+ /**
197235
+ * - Billing term previews for the sku. Each preview includes the duration of the term, and its prices grouped by
197236
+ * currency + country.
197237
+ * - ORDER MATTERS: the first preview term will be the first term experienced by a user who has purchased this sku.
197238
+ * - By default, only the fist two preview terms are returned (initial term and first renewal term). But if the sku
197239
+ * is a free trial, the array will be PREPENDED by a free trial initial term (is_billing_delay = true).
197240
+ * @member {Array.<productcatalog.IBillingTermPreview>} billingTermPreviews
197241
+ * @memberof productcatalog.ProductSku
197242
+ * @instance
197243
+ */
197244
+ ProductSku.prototype.billingTermPreviews = $util.emptyArray;
197245
+
197216
197246
  /**
197217
197247
  * Creates a new ProductSku instance using the specified properties.
197218
197248
  * @function create
@@ -197263,6 +197293,9 @@ $root.productcatalog = (function() {
197263
197293
  }
197264
197294
  if (message.productId != null && message.hasOwnProperty("productId"))
197265
197295
  writer.uint32(/* id 11, wireType 2 =*/90).string(message.productId);
197296
+ if (message.billingTermPreviews != null && message.billingTermPreviews.length)
197297
+ for (var i = 0; i < message.billingTermPreviews.length; ++i)
197298
+ $root.productcatalog.BillingTermPreview.encode(message.billingTermPreviews[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
197266
197299
  return writer;
197267
197300
  };
197268
197301
 
@@ -197337,6 +197370,11 @@ $root.productcatalog = (function() {
197337
197370
  case 11:
197338
197371
  message.productId = reader.string();
197339
197372
  break;
197373
+ case 12:
197374
+ if (!(message.billingTermPreviews && message.billingTermPreviews.length))
197375
+ message.billingTermPreviews = [];
197376
+ message.billingTermPreviews.push($root.productcatalog.BillingTermPreview.decode(reader, reader.uint32()));
197377
+ break;
197340
197378
  default:
197341
197379
  reader.skipType(tag & 7);
197342
197380
  break;
@@ -197446,6 +197484,15 @@ $root.productcatalog = (function() {
197446
197484
  if (message.productId != null && message.hasOwnProperty("productId"))
197447
197485
  if (!$util.isString(message.productId))
197448
197486
  return "productId: string expected";
197487
+ if (message.billingTermPreviews != null && message.hasOwnProperty("billingTermPreviews")) {
197488
+ if (!Array.isArray(message.billingTermPreviews))
197489
+ return "billingTermPreviews: array expected";
197490
+ for (var i = 0; i < message.billingTermPreviews.length; ++i) {
197491
+ var error = $root.productcatalog.BillingTermPreview.verify(message.billingTermPreviews[i]);
197492
+ if (error)
197493
+ return "billingTermPreviews." + error;
197494
+ }
197495
+ }
197449
197496
  return null;
197450
197497
  };
197451
197498
 
@@ -197582,6 +197629,16 @@ $root.productcatalog = (function() {
197582
197629
  }
197583
197630
  if (object.productId != null)
197584
197631
  message.productId = String(object.productId);
197632
+ if (object.billingTermPreviews) {
197633
+ if (!Array.isArray(object.billingTermPreviews))
197634
+ throw TypeError(".productcatalog.ProductSku.billingTermPreviews: array expected");
197635
+ message.billingTermPreviews = [];
197636
+ for (var i = 0; i < object.billingTermPreviews.length; ++i) {
197637
+ if (typeof object.billingTermPreviews[i] !== "object")
197638
+ throw TypeError(".productcatalog.ProductSku.billingTermPreviews: object expected");
197639
+ message.billingTermPreviews[i] = $root.productcatalog.BillingTermPreview.fromObject(object.billingTermPreviews[i]);
197640
+ }
197641
+ }
197585
197642
  return message;
197586
197643
  };
197587
197644
 
@@ -197598,8 +197655,10 @@ $root.productcatalog = (function() {
197598
197655
  if (!options)
197599
197656
  options = {};
197600
197657
  var object = {};
197601
- if (options.arrays || options.defaults)
197658
+ if (options.arrays || options.defaults) {
197602
197659
  object.tags = [];
197660
+ object.billingTermPreviews = [];
197661
+ }
197603
197662
  if (options.defaults) {
197604
197663
  object.id = "";
197605
197664
  object.slug = "";
@@ -197637,6 +197696,11 @@ $root.productcatalog = (function() {
197637
197696
  }
197638
197697
  if (message.productId != null && message.hasOwnProperty("productId"))
197639
197698
  object.productId = message.productId;
197699
+ if (message.billingTermPreviews && message.billingTermPreviews.length) {
197700
+ object.billingTermPreviews = [];
197701
+ for (var j = 0; j < message.billingTermPreviews.length; ++j)
197702
+ object.billingTermPreviews[j] = $root.productcatalog.BillingTermPreview.toObject(message.billingTermPreviews[j], options);
197703
+ }
197640
197704
  return object;
197641
197705
  };
197642
197706
 
@@ -199240,6 +199304,584 @@ $root.productcatalog = (function() {
199240
199304
  return values;
199241
199305
  })();
199242
199306
 
199307
+ productcatalog.BillingTermPreviewTier = (function() {
199308
+
199309
+ /**
199310
+ * Properties of a BillingTermPreviewTier.
199311
+ * @memberof productcatalog
199312
+ * @interface IBillingTermPreviewTier
199313
+ * @property {string|null} [currency] BillingTermPreviewTier currency
199314
+ * @property {string|null} [country] BillingTermPreviewTier country
199315
+ * @property {number|null} [price] BillingTermPreviewTier price
199316
+ * @property {number|null} [basePrice] BillingTermPreviewTier basePrice
199317
+ */
199318
+
199319
+ /**
199320
+ * Constructs a new BillingTermPreviewTier.
199321
+ * @memberof productcatalog
199322
+ * @classdesc Represents a BillingTermPreviewTier.
199323
+ * @implements IBillingTermPreviewTier
199324
+ * @constructor
199325
+ * @param {productcatalog.IBillingTermPreviewTier=} [properties] Properties to set
199326
+ */
199327
+ function BillingTermPreviewTier(properties) {
199328
+ if (properties)
199329
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
199330
+ if (properties[keys[i]] != null)
199331
+ this[keys[i]] = properties[keys[i]];
199332
+ }
199333
+
199334
+ /**
199335
+ * BillingTermPreviewTier currency.
199336
+ * @member {string} currency
199337
+ * @memberof productcatalog.BillingTermPreviewTier
199338
+ * @instance
199339
+ */
199340
+ BillingTermPreviewTier.prototype.currency = "";
199341
+
199342
+ /**
199343
+ * BillingTermPreviewTier country.
199344
+ * @member {string} country
199345
+ * @memberof productcatalog.BillingTermPreviewTier
199346
+ * @instance
199347
+ */
199348
+ BillingTermPreviewTier.prototype.country = "";
199349
+
199350
+ /**
199351
+ * BillingTermPreviewTier price.
199352
+ * @member {number} price
199353
+ * @memberof productcatalog.BillingTermPreviewTier
199354
+ * @instance
199355
+ */
199356
+ BillingTermPreviewTier.prototype.price = 0;
199357
+
199358
+ /**
199359
+ * BillingTermPreviewTier basePrice.
199360
+ * @member {number} basePrice
199361
+ * @memberof productcatalog.BillingTermPreviewTier
199362
+ * @instance
199363
+ */
199364
+ BillingTermPreviewTier.prototype.basePrice = 0;
199365
+
199366
+ /**
199367
+ * Creates a new BillingTermPreviewTier instance using the specified properties.
199368
+ * @function create
199369
+ * @memberof productcatalog.BillingTermPreviewTier
199370
+ * @static
199371
+ * @param {productcatalog.IBillingTermPreviewTier=} [properties] Properties to set
199372
+ * @returns {productcatalog.BillingTermPreviewTier} BillingTermPreviewTier instance
199373
+ */
199374
+ BillingTermPreviewTier.create = function create(properties) {
199375
+ return new BillingTermPreviewTier(properties);
199376
+ };
199377
+
199378
+ /**
199379
+ * Encodes the specified BillingTermPreviewTier message. Does not implicitly {@link productcatalog.BillingTermPreviewTier.verify|verify} messages.
199380
+ * @function encode
199381
+ * @memberof productcatalog.BillingTermPreviewTier
199382
+ * @static
199383
+ * @param {productcatalog.IBillingTermPreviewTier} message BillingTermPreviewTier message or plain object to encode
199384
+ * @param {$protobuf.Writer} [writer] Writer to encode to
199385
+ * @returns {$protobuf.Writer} Writer
199386
+ */
199387
+ BillingTermPreviewTier.encode = function encode(message, writer) {
199388
+ if (!writer)
199389
+ writer = $Writer.create();
199390
+ if (message.currency != null && message.hasOwnProperty("currency"))
199391
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.currency);
199392
+ if (message.country != null && message.hasOwnProperty("country"))
199393
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.country);
199394
+ if (message.price != null && message.hasOwnProperty("price"))
199395
+ writer.uint32(/* id 3, wireType 1 =*/25).double(message.price);
199396
+ if (message.basePrice != null && message.hasOwnProperty("basePrice"))
199397
+ writer.uint32(/* id 4, wireType 1 =*/33).double(message.basePrice);
199398
+ return writer;
199399
+ };
199400
+
199401
+ /**
199402
+ * Encodes the specified BillingTermPreviewTier message, length delimited. Does not implicitly {@link productcatalog.BillingTermPreviewTier.verify|verify} messages.
199403
+ * @function encodeDelimited
199404
+ * @memberof productcatalog.BillingTermPreviewTier
199405
+ * @static
199406
+ * @param {productcatalog.IBillingTermPreviewTier} message BillingTermPreviewTier message or plain object to encode
199407
+ * @param {$protobuf.Writer} [writer] Writer to encode to
199408
+ * @returns {$protobuf.Writer} Writer
199409
+ */
199410
+ BillingTermPreviewTier.encodeDelimited = function encodeDelimited(message, writer) {
199411
+ return this.encode(message, writer).ldelim();
199412
+ };
199413
+
199414
+ /**
199415
+ * Decodes a BillingTermPreviewTier message from the specified reader or buffer.
199416
+ * @function decode
199417
+ * @memberof productcatalog.BillingTermPreviewTier
199418
+ * @static
199419
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
199420
+ * @param {number} [length] Message length if known beforehand
199421
+ * @returns {productcatalog.BillingTermPreviewTier} BillingTermPreviewTier
199422
+ * @throws {Error} If the payload is not a reader or valid buffer
199423
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
199424
+ */
199425
+ BillingTermPreviewTier.decode = function decode(reader, length) {
199426
+ if (!(reader instanceof $Reader))
199427
+ reader = $Reader.create(reader);
199428
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.productcatalog.BillingTermPreviewTier();
199429
+ while (reader.pos < end) {
199430
+ var tag = reader.uint32();
199431
+ switch (tag >>> 3) {
199432
+ case 1:
199433
+ message.currency = reader.string();
199434
+ break;
199435
+ case 2:
199436
+ message.country = reader.string();
199437
+ break;
199438
+ case 3:
199439
+ message.price = reader.double();
199440
+ break;
199441
+ case 4:
199442
+ message.basePrice = reader.double();
199443
+ break;
199444
+ default:
199445
+ reader.skipType(tag & 7);
199446
+ break;
199447
+ }
199448
+ }
199449
+ return message;
199450
+ };
199451
+
199452
+ /**
199453
+ * Decodes a BillingTermPreviewTier message from the specified reader or buffer, length delimited.
199454
+ * @function decodeDelimited
199455
+ * @memberof productcatalog.BillingTermPreviewTier
199456
+ * @static
199457
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
199458
+ * @returns {productcatalog.BillingTermPreviewTier} BillingTermPreviewTier
199459
+ * @throws {Error} If the payload is not a reader or valid buffer
199460
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
199461
+ */
199462
+ BillingTermPreviewTier.decodeDelimited = function decodeDelimited(reader) {
199463
+ if (!(reader instanceof $Reader))
199464
+ reader = new $Reader(reader);
199465
+ return this.decode(reader, reader.uint32());
199466
+ };
199467
+
199468
+ /**
199469
+ * Verifies a BillingTermPreviewTier message.
199470
+ * @function verify
199471
+ * @memberof productcatalog.BillingTermPreviewTier
199472
+ * @static
199473
+ * @param {Object.<string,*>} message Plain object to verify
199474
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
199475
+ */
199476
+ BillingTermPreviewTier.verify = function verify(message) {
199477
+ if (typeof message !== "object" || message === null)
199478
+ return "object expected";
199479
+ if (message.currency != null && message.hasOwnProperty("currency"))
199480
+ if (!$util.isString(message.currency))
199481
+ return "currency: string expected";
199482
+ if (message.country != null && message.hasOwnProperty("country"))
199483
+ if (!$util.isString(message.country))
199484
+ return "country: string expected";
199485
+ if (message.price != null && message.hasOwnProperty("price"))
199486
+ if (typeof message.price !== "number")
199487
+ return "price: number expected";
199488
+ if (message.basePrice != null && message.hasOwnProperty("basePrice"))
199489
+ if (typeof message.basePrice !== "number")
199490
+ return "basePrice: number expected";
199491
+ return null;
199492
+ };
199493
+
199494
+ /**
199495
+ * Creates a BillingTermPreviewTier message from a plain object. Also converts values to their respective internal types.
199496
+ * @function fromObject
199497
+ * @memberof productcatalog.BillingTermPreviewTier
199498
+ * @static
199499
+ * @param {Object.<string,*>} object Plain object
199500
+ * @returns {productcatalog.BillingTermPreviewTier} BillingTermPreviewTier
199501
+ */
199502
+ BillingTermPreviewTier.fromObject = function fromObject(object) {
199503
+ if (object instanceof $root.productcatalog.BillingTermPreviewTier)
199504
+ return object;
199505
+ var message = new $root.productcatalog.BillingTermPreviewTier();
199506
+ if (object.currency != null)
199507
+ message.currency = String(object.currency);
199508
+ if (object.country != null)
199509
+ message.country = String(object.country);
199510
+ if (object.price != null)
199511
+ message.price = Number(object.price);
199512
+ if (object.basePrice != null)
199513
+ message.basePrice = Number(object.basePrice);
199514
+ return message;
199515
+ };
199516
+
199517
+ /**
199518
+ * Creates a plain object from a BillingTermPreviewTier message. Also converts values to other types if specified.
199519
+ * @function toObject
199520
+ * @memberof productcatalog.BillingTermPreviewTier
199521
+ * @static
199522
+ * @param {productcatalog.BillingTermPreviewTier} message BillingTermPreviewTier
199523
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
199524
+ * @returns {Object.<string,*>} Plain object
199525
+ */
199526
+ BillingTermPreviewTier.toObject = function toObject(message, options) {
199527
+ if (!options)
199528
+ options = {};
199529
+ var object = {};
199530
+ if (options.defaults) {
199531
+ object.currency = "";
199532
+ object.country = "";
199533
+ object.price = 0;
199534
+ object.basePrice = 0;
199535
+ }
199536
+ if (message.currency != null && message.hasOwnProperty("currency"))
199537
+ object.currency = message.currency;
199538
+ if (message.country != null && message.hasOwnProperty("country"))
199539
+ object.country = message.country;
199540
+ if (message.price != null && message.hasOwnProperty("price"))
199541
+ object.price = options.json && !isFinite(message.price) ? String(message.price) : message.price;
199542
+ if (message.basePrice != null && message.hasOwnProperty("basePrice"))
199543
+ object.basePrice = options.json && !isFinite(message.basePrice) ? String(message.basePrice) : message.basePrice;
199544
+ return object;
199545
+ };
199546
+
199547
+ /**
199548
+ * Converts this BillingTermPreviewTier to JSON.
199549
+ * @function toJSON
199550
+ * @memberof productcatalog.BillingTermPreviewTier
199551
+ * @instance
199552
+ * @returns {Object.<string,*>} JSON object
199553
+ */
199554
+ BillingTermPreviewTier.prototype.toJSON = function toJSON() {
199555
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
199556
+ };
199557
+
199558
+ return BillingTermPreviewTier;
199559
+ })();
199560
+
199561
+ productcatalog.BillingTermPreview = (function() {
199562
+
199563
+ /**
199564
+ * Properties of a BillingTermPreview.
199565
+ * @memberof productcatalog
199566
+ * @interface IBillingTermPreview
199567
+ * @property {boolean|null} [isBillingDelay] BillingTermPreview isBillingDelay
199568
+ * @property {productcatalog.ProductSkuCalendarPeriod|null} [period] BillingTermPreview period
199569
+ * @property {number|null} [numPeriods] BillingTermPreview numPeriods
199570
+ * @property {Array.<productcatalog.IBillingTermPreviewTier>|null} [tiers] BillingTermPreview tiers
199571
+ */
199572
+
199573
+ /**
199574
+ * Constructs a new BillingTermPreview.
199575
+ * @memberof productcatalog
199576
+ * @classdesc Represents a BillingTermPreview.
199577
+ * @implements IBillingTermPreview
199578
+ * @constructor
199579
+ * @param {productcatalog.IBillingTermPreview=} [properties] Properties to set
199580
+ */
199581
+ function BillingTermPreview(properties) {
199582
+ this.tiers = [];
199583
+ if (properties)
199584
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
199585
+ if (properties[keys[i]] != null)
199586
+ this[keys[i]] = properties[keys[i]];
199587
+ }
199588
+
199589
+ /**
199590
+ * BillingTermPreview isBillingDelay.
199591
+ * @member {boolean} isBillingDelay
199592
+ * @memberof productcatalog.BillingTermPreview
199593
+ * @instance
199594
+ */
199595
+ BillingTermPreview.prototype.isBillingDelay = false;
199596
+
199597
+ /**
199598
+ * BillingTermPreview period.
199599
+ * @member {productcatalog.ProductSkuCalendarPeriod} period
199600
+ * @memberof productcatalog.BillingTermPreview
199601
+ * @instance
199602
+ */
199603
+ BillingTermPreview.prototype.period = 0;
199604
+
199605
+ /**
199606
+ * BillingTermPreview numPeriods.
199607
+ * @member {number} numPeriods
199608
+ * @memberof productcatalog.BillingTermPreview
199609
+ * @instance
199610
+ */
199611
+ BillingTermPreview.prototype.numPeriods = 0;
199612
+
199613
+ /**
199614
+ * BillingTermPreview tiers.
199615
+ * @member {Array.<productcatalog.IBillingTermPreviewTier>} tiers
199616
+ * @memberof productcatalog.BillingTermPreview
199617
+ * @instance
199618
+ */
199619
+ BillingTermPreview.prototype.tiers = $util.emptyArray;
199620
+
199621
+ /**
199622
+ * Creates a new BillingTermPreview instance using the specified properties.
199623
+ * @function create
199624
+ * @memberof productcatalog.BillingTermPreview
199625
+ * @static
199626
+ * @param {productcatalog.IBillingTermPreview=} [properties] Properties to set
199627
+ * @returns {productcatalog.BillingTermPreview} BillingTermPreview instance
199628
+ */
199629
+ BillingTermPreview.create = function create(properties) {
199630
+ return new BillingTermPreview(properties);
199631
+ };
199632
+
199633
+ /**
199634
+ * Encodes the specified BillingTermPreview message. Does not implicitly {@link productcatalog.BillingTermPreview.verify|verify} messages.
199635
+ * @function encode
199636
+ * @memberof productcatalog.BillingTermPreview
199637
+ * @static
199638
+ * @param {productcatalog.IBillingTermPreview} message BillingTermPreview message or plain object to encode
199639
+ * @param {$protobuf.Writer} [writer] Writer to encode to
199640
+ * @returns {$protobuf.Writer} Writer
199641
+ */
199642
+ BillingTermPreview.encode = function encode(message, writer) {
199643
+ if (!writer)
199644
+ writer = $Writer.create();
199645
+ if (message.isBillingDelay != null && message.hasOwnProperty("isBillingDelay"))
199646
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isBillingDelay);
199647
+ if (message.period != null && message.hasOwnProperty("period"))
199648
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.period);
199649
+ if (message.numPeriods != null && message.hasOwnProperty("numPeriods"))
199650
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.numPeriods);
199651
+ if (message.tiers != null && message.tiers.length)
199652
+ for (var i = 0; i < message.tiers.length; ++i)
199653
+ $root.productcatalog.BillingTermPreviewTier.encode(message.tiers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
199654
+ return writer;
199655
+ };
199656
+
199657
+ /**
199658
+ * Encodes the specified BillingTermPreview message, length delimited. Does not implicitly {@link productcatalog.BillingTermPreview.verify|verify} messages.
199659
+ * @function encodeDelimited
199660
+ * @memberof productcatalog.BillingTermPreview
199661
+ * @static
199662
+ * @param {productcatalog.IBillingTermPreview} message BillingTermPreview message or plain object to encode
199663
+ * @param {$protobuf.Writer} [writer] Writer to encode to
199664
+ * @returns {$protobuf.Writer} Writer
199665
+ */
199666
+ BillingTermPreview.encodeDelimited = function encodeDelimited(message, writer) {
199667
+ return this.encode(message, writer).ldelim();
199668
+ };
199669
+
199670
+ /**
199671
+ * Decodes a BillingTermPreview message from the specified reader or buffer.
199672
+ * @function decode
199673
+ * @memberof productcatalog.BillingTermPreview
199674
+ * @static
199675
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
199676
+ * @param {number} [length] Message length if known beforehand
199677
+ * @returns {productcatalog.BillingTermPreview} BillingTermPreview
199678
+ * @throws {Error} If the payload is not a reader or valid buffer
199679
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
199680
+ */
199681
+ BillingTermPreview.decode = function decode(reader, length) {
199682
+ if (!(reader instanceof $Reader))
199683
+ reader = $Reader.create(reader);
199684
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.productcatalog.BillingTermPreview();
199685
+ while (reader.pos < end) {
199686
+ var tag = reader.uint32();
199687
+ switch (tag >>> 3) {
199688
+ case 1:
199689
+ message.isBillingDelay = reader.bool();
199690
+ break;
199691
+ case 2:
199692
+ message.period = reader.int32();
199693
+ break;
199694
+ case 3:
199695
+ message.numPeriods = reader.int32();
199696
+ break;
199697
+ case 4:
199698
+ if (!(message.tiers && message.tiers.length))
199699
+ message.tiers = [];
199700
+ message.tiers.push($root.productcatalog.BillingTermPreviewTier.decode(reader, reader.uint32()));
199701
+ break;
199702
+ default:
199703
+ reader.skipType(tag & 7);
199704
+ break;
199705
+ }
199706
+ }
199707
+ return message;
199708
+ };
199709
+
199710
+ /**
199711
+ * Decodes a BillingTermPreview message from the specified reader or buffer, length delimited.
199712
+ * @function decodeDelimited
199713
+ * @memberof productcatalog.BillingTermPreview
199714
+ * @static
199715
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
199716
+ * @returns {productcatalog.BillingTermPreview} BillingTermPreview
199717
+ * @throws {Error} If the payload is not a reader or valid buffer
199718
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
199719
+ */
199720
+ BillingTermPreview.decodeDelimited = function decodeDelimited(reader) {
199721
+ if (!(reader instanceof $Reader))
199722
+ reader = new $Reader(reader);
199723
+ return this.decode(reader, reader.uint32());
199724
+ };
199725
+
199726
+ /**
199727
+ * Verifies a BillingTermPreview message.
199728
+ * @function verify
199729
+ * @memberof productcatalog.BillingTermPreview
199730
+ * @static
199731
+ * @param {Object.<string,*>} message Plain object to verify
199732
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
199733
+ */
199734
+ BillingTermPreview.verify = function verify(message) {
199735
+ if (typeof message !== "object" || message === null)
199736
+ return "object expected";
199737
+ if (message.isBillingDelay != null && message.hasOwnProperty("isBillingDelay"))
199738
+ if (typeof message.isBillingDelay !== "boolean")
199739
+ return "isBillingDelay: boolean expected";
199740
+ if (message.period != null && message.hasOwnProperty("period"))
199741
+ switch (message.period) {
199742
+ default:
199743
+ return "period: enum value expected";
199744
+ case 0:
199745
+ case 1:
199746
+ case 2:
199747
+ case 3:
199748
+ case 4:
199749
+ case 5:
199750
+ case 7:
199751
+ case 8:
199752
+ case 9:
199753
+ break;
199754
+ }
199755
+ if (message.numPeriods != null && message.hasOwnProperty("numPeriods"))
199756
+ if (!$util.isInteger(message.numPeriods))
199757
+ return "numPeriods: integer expected";
199758
+ if (message.tiers != null && message.hasOwnProperty("tiers")) {
199759
+ if (!Array.isArray(message.tiers))
199760
+ return "tiers: array expected";
199761
+ for (var i = 0; i < message.tiers.length; ++i) {
199762
+ var error = $root.productcatalog.BillingTermPreviewTier.verify(message.tiers[i]);
199763
+ if (error)
199764
+ return "tiers." + error;
199765
+ }
199766
+ }
199767
+ return null;
199768
+ };
199769
+
199770
+ /**
199771
+ * Creates a BillingTermPreview message from a plain object. Also converts values to their respective internal types.
199772
+ * @function fromObject
199773
+ * @memberof productcatalog.BillingTermPreview
199774
+ * @static
199775
+ * @param {Object.<string,*>} object Plain object
199776
+ * @returns {productcatalog.BillingTermPreview} BillingTermPreview
199777
+ */
199778
+ BillingTermPreview.fromObject = function fromObject(object) {
199779
+ if (object instanceof $root.productcatalog.BillingTermPreview)
199780
+ return object;
199781
+ var message = new $root.productcatalog.BillingTermPreview();
199782
+ if (object.isBillingDelay != null)
199783
+ message.isBillingDelay = Boolean(object.isBillingDelay);
199784
+ switch (object.period) {
199785
+ case "CP_UNKNOWN":
199786
+ case 0:
199787
+ message.period = 0;
199788
+ break;
199789
+ case "CP_DAY":
199790
+ case 1:
199791
+ message.period = 1;
199792
+ break;
199793
+ case "CP_MONTH":
199794
+ case 2:
199795
+ message.period = 2;
199796
+ break;
199797
+ case "CP_YEAR":
199798
+ case 3:
199799
+ message.period = 3;
199800
+ break;
199801
+ case "CP_LIFETIME":
199802
+ case 4:
199803
+ message.period = 4;
199804
+ break;
199805
+ case "CP_ONE_TIME":
199806
+ case 5:
199807
+ message.period = 5;
199808
+ break;
199809
+ case "CP_HALF_YEAR":
199810
+ case 7:
199811
+ message.period = 7;
199812
+ break;
199813
+ case "CP_TWO_YEARS":
199814
+ case 8:
199815
+ message.period = 8;
199816
+ break;
199817
+ case "CP_FIVE_YEARS":
199818
+ case 9:
199819
+ message.period = 9;
199820
+ break;
199821
+ }
199822
+ if (object.numPeriods != null)
199823
+ message.numPeriods = object.numPeriods | 0;
199824
+ if (object.tiers) {
199825
+ if (!Array.isArray(object.tiers))
199826
+ throw TypeError(".productcatalog.BillingTermPreview.tiers: array expected");
199827
+ message.tiers = [];
199828
+ for (var i = 0; i < object.tiers.length; ++i) {
199829
+ if (typeof object.tiers[i] !== "object")
199830
+ throw TypeError(".productcatalog.BillingTermPreview.tiers: object expected");
199831
+ message.tiers[i] = $root.productcatalog.BillingTermPreviewTier.fromObject(object.tiers[i]);
199832
+ }
199833
+ }
199834
+ return message;
199835
+ };
199836
+
199837
+ /**
199838
+ * Creates a plain object from a BillingTermPreview message. Also converts values to other types if specified.
199839
+ * @function toObject
199840
+ * @memberof productcatalog.BillingTermPreview
199841
+ * @static
199842
+ * @param {productcatalog.BillingTermPreview} message BillingTermPreview
199843
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
199844
+ * @returns {Object.<string,*>} Plain object
199845
+ */
199846
+ BillingTermPreview.toObject = function toObject(message, options) {
199847
+ if (!options)
199848
+ options = {};
199849
+ var object = {};
199850
+ if (options.arrays || options.defaults)
199851
+ object.tiers = [];
199852
+ if (options.defaults) {
199853
+ object.isBillingDelay = false;
199854
+ object.period = options.enums === String ? "CP_UNKNOWN" : 0;
199855
+ object.numPeriods = 0;
199856
+ }
199857
+ if (message.isBillingDelay != null && message.hasOwnProperty("isBillingDelay"))
199858
+ object.isBillingDelay = message.isBillingDelay;
199859
+ if (message.period != null && message.hasOwnProperty("period"))
199860
+ object.period = options.enums === String ? $root.productcatalog.ProductSkuCalendarPeriod[message.period] : message.period;
199861
+ if (message.numPeriods != null && message.hasOwnProperty("numPeriods"))
199862
+ object.numPeriods = message.numPeriods;
199863
+ if (message.tiers && message.tiers.length) {
199864
+ object.tiers = [];
199865
+ for (var j = 0; j < message.tiers.length; ++j)
199866
+ object.tiers[j] = $root.productcatalog.BillingTermPreviewTier.toObject(message.tiers[j], options);
199867
+ }
199868
+ return object;
199869
+ };
199870
+
199871
+ /**
199872
+ * Converts this BillingTermPreview to JSON.
199873
+ * @function toJSON
199874
+ * @memberof productcatalog.BillingTermPreview
199875
+ * @instance
199876
+ * @returns {Object.<string,*>} JSON object
199877
+ */
199878
+ BillingTermPreview.prototype.toJSON = function toJSON() {
199879
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
199880
+ };
199881
+
199882
+ return BillingTermPreview;
199883
+ })();
199884
+
199243
199885
  return productcatalog;
199244
199886
  })();
199245
199887
 
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.715.0"
19
+ "version": "1.717.0"
20
20
  }