rebilly-js-sdk 62.166.1 → 62.168.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/CHANGELOG.md CHANGED
@@ -1 +1,6 @@
1
- ## [62.166.1](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.166.0...rebilly-js-sdk-v62.166.1) (2026-09-14)
1
+ ## [62.168.0](https://github.com/Rebilly/rebilly/compare/rebilly-js-sdk-v62.167.0...rebilly-js-sdk-v62.168.0) (2026-09-16)
2
+
3
+
4
+ ### Features
5
+
6
+ * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#26172](https://github.com/Rebilly/rebilly/issues/26172)) ([ce0342a](https://github.com/Rebilly/rebilly/commit/ce0342a88b5db8eb5c93b5963c0ad6230098194e))
@@ -12241,59 +12241,6 @@ export interface coreComponents {
12241
12241
  */
12242
12242
  price: number;
12243
12243
  } | null;
12244
- /**
12245
- * Details of the one-time sale plan.
12246
- * Use this plan for non-recurring, one-time, sales.
12247
- */
12248
- OneTimeSalePlan: {
12249
- /**
12250
- * Name of the plan.
12251
- * This name is displayed on invoices and receipts.
12252
- */
12253
- name: string;
12254
- /**
12255
- * Plain-text description of the plan.
12256
- * This field accepts plain-text only.
12257
- */
12258
- description?: string;
12259
- /**
12260
- * Rich-text description of the plan.
12261
- * This field accepts rich text formatting, such as: bold, underline, italic, and hyperlinks.
12262
- */
12263
- richDescription?: string;
12264
- /** ID of the related product. */
12265
- productId: string;
12266
- /** Name-value pairs that specify the product options. */
12267
- productOptions?: { [key: string]: string } | null;
12268
- currency: coreComponents["schemas"]["CurrencyCode"];
12269
- /** Currency sign. */
12270
- currencySign?: string;
12271
- pricing: coreComponents["schemas"]["PlanPriceFormula"];
12272
- setup?: coreComponents["schemas"]["PlanSetup"];
12273
- customFields?: coreComponents["schemas"]["ResourceCustomFields"];
12274
- /** Specifies if the plan is active. */
12275
- isActive?: boolean;
12276
- /**
12277
- * Number of times the plan is modified.
12278
- * Compare this value with materialized subscription item revision values.
12279
- */
12280
- revision?: number;
12281
- /** Specifies if a plan is a trial that does not have recurring instructions. */
12282
- isTrialOnly?: boolean;
12283
- /** Service interval settings. */
12284
- recurringInterval?: { [key: string]: any };
12285
- /** Trial configuration setting. */
12286
- trial?: { [key: string]: any };
12287
- createdTime?: coreComponents["schemas"]["CreatedTime"];
12288
- updatedTime?: coreComponents["schemas"]["UpdatedTime"];
12289
- /** Related links. */
12290
- _links?: {
12291
- /** Link URL. */
12292
- href?: string;
12293
- /** Type of link. */
12294
- rel?: "self" | "attachments";
12295
- }[];
12296
- };
12297
12244
  SchedulingMethodDayAndMonthOfYear: {
12298
12245
  method: "day-and-month-of-year";
12299
12246
  /**
@@ -12388,6 +12335,15 @@ export interface coreComponents {
12388
12335
  * Use this plan for subscriptions or sales that reoccur over a period of time.
12389
12336
  */
12390
12337
  SubscriptionPlan: {
12338
+ /**
12339
+ * Variant of the plan.
12340
+ * This field is optional in create and update requests.
12341
+ * The variant is `subscription` when `recurringInterval` is present.
12342
+ * If included, this field must match the applicable variant.
12343
+ * A mismatch results in an HTTP `422` response.
12344
+ * Responses always include this field.
12345
+ */
12346
+ type?: "subscription";
12391
12347
  /**
12392
12348
  * Name of the plan.
12393
12349
  * This name is displayed on invoices and receipts.
@@ -12480,12 +12436,91 @@ export interface coreComponents {
12480
12436
  rel?: "self" | "attachments";
12481
12437
  }[];
12482
12438
  };
12439
+ SubscriptionPlanDetails: {
12440
+ /** ID of the plan. */
12441
+ id: string;
12442
+ } & coreComponents["schemas"]["SubscriptionPlan"];
12443
+ /**
12444
+ * Details of the one-time sale plan.
12445
+ * Use this plan for non-recurring, one-time, sales.
12446
+ */
12447
+ OneTimeSalePlan: {
12448
+ /**
12449
+ * Variant of the plan.
12450
+ * This field is optional in create and update requests.
12451
+ * The variant is `one-time-sale` when both `recurringInterval` and `trial` are omitted.
12452
+ * If included, this field must match the applicable variant.
12453
+ * A mismatch results in an HTTP `422` response.
12454
+ * Responses always include this field.
12455
+ */
12456
+ type?: "one-time-sale";
12457
+ /**
12458
+ * Name of the plan.
12459
+ * This name is displayed on invoices and receipts.
12460
+ */
12461
+ name: string;
12462
+ /**
12463
+ * Plain-text description of the plan.
12464
+ * This field accepts plain-text only.
12465
+ */
12466
+ description?: string;
12467
+ /**
12468
+ * Rich-text description of the plan.
12469
+ * This field accepts rich text formatting, such as: bold, underline, italic, and hyperlinks.
12470
+ */
12471
+ richDescription?: string;
12472
+ /** ID of the related product. */
12473
+ productId: string;
12474
+ /** Name-value pairs that specify the product options. */
12475
+ productOptions?: { [key: string]: string } | null;
12476
+ currency: coreComponents["schemas"]["CurrencyCode"];
12477
+ /** Currency sign. */
12478
+ currencySign?: string;
12479
+ pricing: coreComponents["schemas"]["PlanPriceFormula"];
12480
+ setup?: coreComponents["schemas"]["PlanSetup"];
12481
+ customFields?: coreComponents["schemas"]["ResourceCustomFields"];
12482
+ /** Specifies if the plan is active. */
12483
+ isActive?: boolean;
12484
+ /**
12485
+ * Number of times the plan is modified.
12486
+ * Compare this value with materialized subscription item revision values.
12487
+ */
12488
+ revision?: number;
12489
+ /** Specifies if a plan is a trial that does not have recurring instructions. */
12490
+ isTrialOnly?: boolean;
12491
+ /** Service interval settings. */
12492
+ recurringInterval?: { [key: string]: any };
12493
+ /** Trial configuration setting. */
12494
+ trial?: { [key: string]: any };
12495
+ createdTime?: coreComponents["schemas"]["CreatedTime"];
12496
+ updatedTime?: coreComponents["schemas"]["UpdatedTime"];
12497
+ /** Related links. */
12498
+ _links?: {
12499
+ /** Link URL. */
12500
+ href?: string;
12501
+ /** Type of link. */
12502
+ rel?: "self" | "attachments";
12503
+ }[];
12504
+ };
12505
+ OneTimeSalePlanDetails: {
12506
+ /** ID of the plan. */
12507
+ id: string;
12508
+ } & coreComponents["schemas"]["OneTimeSalePlan"];
12483
12509
  /**
12484
12510
  * Details of the trial-only plan.
12485
12511
  * Use this plan for limited-time product trials.
12486
12512
  * Trials may have a reduced fee, or may be free.
12487
12513
  */
12488
12514
  TrialOnlyPlan: {
12515
+ /**
12516
+ * Variant of the plan.
12517
+ * This field is optional in create and update requests.
12518
+ * The variant is `trial-only` when `trial` is present without `recurringInterval`.
12519
+ * If included, this field must match the applicable variant.
12520
+ * A mismatch results in an HTTP `422` response.
12521
+ * Responses always include this field.
12522
+ */
12523
+ type?: "trial-only";
12489
12524
  /**
12490
12525
  * Name of the plan.
12491
12526
  * This name is displayed on invoices and receipts.
@@ -12522,7 +12557,7 @@ export interface coreComponents {
12522
12557
  /** Service interval settings. */
12523
12558
  recurringInterval?: { [key: string]: any };
12524
12559
  /** Trial configuration settings. */
12525
- trial: coreComponents["schemas"]["PlanTrial"];
12560
+ trial: { [key: string]: any } & coreComponents["schemas"]["PlanTrial"];
12526
12561
  /**
12527
12562
  * Use invoice time shift to adjust the invoice issue and due date when billing must occur before the service period changes.
12528
12563
  * For example, rent must be paid in advance,
@@ -12540,19 +12575,18 @@ export interface coreComponents {
12540
12575
  rel?: "self" | "attachments";
12541
12576
  }[];
12542
12577
  };
12578
+ TrialOnlyPlanDetails: {
12579
+ /** ID of the plan. */
12580
+ id: string;
12581
+ } & coreComponents["schemas"]["TrialOnlyPlan"];
12543
12582
  Plan:
12544
- | ({
12545
- /** ID of the plan. */
12546
- id: string;
12547
- } & coreComponents["schemas"]["OneTimeSalePlan"])
12548
- | ({
12549
- /** ID of the plan. */
12550
- id: string;
12551
- } & coreComponents["schemas"]["SubscriptionPlan"])
12552
- | ({
12553
- /** ID of the plan. */
12554
- id: string;
12555
- } & coreComponents["schemas"]["TrialOnlyPlan"]);
12583
+ | coreComponents["schemas"]["SubscriptionPlanDetails"]
12584
+ | coreComponents["schemas"]["OneTimeSalePlanDetails"]
12585
+ | coreComponents["schemas"]["TrialOnlyPlanDetails"];
12586
+ PlanRequest:
12587
+ | coreComponents["schemas"]["SubscriptionPlan"]
12588
+ | coreComponents["schemas"]["OneTimeSalePlan"]
12589
+ | coreComponents["schemas"]["TrialOnlyPlan"];
12556
12590
  /**
12557
12591
  * Products are the items that your business sells.
12558
12592
  * Products include digital goods, services, and physical goods.
@@ -27533,6 +27567,13 @@ export interface coreComponents {
27533
27567
  StorefrontPlan: {
27534
27568
  /** ID of the plan. */
27535
27569
  id?: string;
27570
+ /**
27571
+ * Variant of the plan.
27572
+ * The variant is `subscription` when `recurringInterval` is present.
27573
+ * The variant is `trial-only` when `trial` is present without `recurringInterval`.
27574
+ * The variant is `one-time-sale` when both fields are omitted.
27575
+ */
27576
+ type?: "subscription" | "one-time-sale" | "trial-only";
27536
27577
  /**
27537
27578
  * Name of the plan.
27538
27579
  * This name is displayed on invoices and receipts.
@@ -35238,7 +35279,7 @@ export interface operations {
35238
35279
  /** Plan resource. */
35239
35280
  requestBody: {
35240
35281
  content: {
35241
- "application/json": coreComponents["schemas"]["Plan"];
35282
+ "application/json": coreComponents["schemas"]["PlanRequest"];
35242
35283
  };
35243
35284
  };
35244
35285
  };
@@ -35294,7 +35335,7 @@ export interface operations {
35294
35335
  /** Plan resource. */
35295
35336
  requestBody: {
35296
35337
  content: {
35297
- "application/json": coreComponents["schemas"]["Plan"];
35338
+ "application/json": coreComponents["schemas"]["PlanRequest"];
35298
35339
  };
35299
35340
  };
35300
35341
  };
@@ -51923,59 +51964,6 @@ export interface storefrontComponents {
51923
51964
  */
51924
51965
  price: number;
51925
51966
  } | null;
51926
- /**
51927
- * Details of the one-time sale plan.
51928
- * Use this plan for non-recurring, one-time, sales.
51929
- */
51930
- OneTimeSalePlan: {
51931
- /**
51932
- * Name of the plan.
51933
- * This name is displayed on invoices and receipts.
51934
- */
51935
- name: string;
51936
- /**
51937
- * Plain-text description of the plan.
51938
- * This field accepts plain-text only.
51939
- */
51940
- description?: string;
51941
- /**
51942
- * Rich-text description of the plan.
51943
- * This field accepts rich text formatting, such as: bold, underline, italic, and hyperlinks.
51944
- */
51945
- richDescription?: string;
51946
- /** ID of the related product. */
51947
- productId: string;
51948
- /** Name-value pairs that specify the product options. */
51949
- productOptions?: { [key: string]: string } | null;
51950
- currency: storefrontComponents["schemas"]["CurrencyCode"];
51951
- /** Currency sign. */
51952
- currencySign?: string;
51953
- pricing: storefrontComponents["schemas"]["PlanPriceFormula"];
51954
- setup?: storefrontComponents["schemas"]["PlanSetup"];
51955
- customFields?: storefrontComponents["schemas"]["ResourceCustomFields"];
51956
- /** Specifies if the plan is active. */
51957
- isActive?: boolean;
51958
- /**
51959
- * Number of times the plan is modified.
51960
- * Compare this value with materialized subscription item revision values.
51961
- */
51962
- revision?: number;
51963
- /** Specifies if a plan is a trial that does not have recurring instructions. */
51964
- isTrialOnly?: boolean;
51965
- /** Service interval settings. */
51966
- recurringInterval?: { [key: string]: any };
51967
- /** Trial configuration setting. */
51968
- trial?: { [key: string]: any };
51969
- createdTime?: storefrontComponents["schemas"]["CreatedTime"];
51970
- updatedTime?: storefrontComponents["schemas"]["UpdatedTime"];
51971
- /** Related links. */
51972
- _links?: {
51973
- /** Link URL. */
51974
- href?: string;
51975
- /** Type of link. */
51976
- rel?: "self" | "attachments";
51977
- }[];
51978
- };
51979
51967
  SchedulingMethodDayAndMonthOfYear: {
51980
51968
  method: "day-and-month-of-year";
51981
51969
  /**
@@ -52070,6 +52058,15 @@ export interface storefrontComponents {
52070
52058
  * Use this plan for subscriptions or sales that reoccur over a period of time.
52071
52059
  */
52072
52060
  SubscriptionPlan: {
52061
+ /**
52062
+ * Variant of the plan.
52063
+ * This field is optional in create and update requests.
52064
+ * The variant is `subscription` when `recurringInterval` is present.
52065
+ * If included, this field must match the applicable variant.
52066
+ * A mismatch results in an HTTP `422` response.
52067
+ * Responses always include this field.
52068
+ */
52069
+ type?: "subscription";
52073
52070
  /**
52074
52071
  * Name of the plan.
52075
52072
  * This name is displayed on invoices and receipts.
@@ -52162,12 +52159,91 @@ export interface storefrontComponents {
52162
52159
  rel?: "self" | "attachments";
52163
52160
  }[];
52164
52161
  };
52162
+ SubscriptionPlanDetails: {
52163
+ /** ID of the plan. */
52164
+ id: string;
52165
+ } & storefrontComponents["schemas"]["SubscriptionPlan"];
52166
+ /**
52167
+ * Details of the one-time sale plan.
52168
+ * Use this plan for non-recurring, one-time, sales.
52169
+ */
52170
+ OneTimeSalePlan: {
52171
+ /**
52172
+ * Variant of the plan.
52173
+ * This field is optional in create and update requests.
52174
+ * The variant is `one-time-sale` when both `recurringInterval` and `trial` are omitted.
52175
+ * If included, this field must match the applicable variant.
52176
+ * A mismatch results in an HTTP `422` response.
52177
+ * Responses always include this field.
52178
+ */
52179
+ type?: "one-time-sale";
52180
+ /**
52181
+ * Name of the plan.
52182
+ * This name is displayed on invoices and receipts.
52183
+ */
52184
+ name: string;
52185
+ /**
52186
+ * Plain-text description of the plan.
52187
+ * This field accepts plain-text only.
52188
+ */
52189
+ description?: string;
52190
+ /**
52191
+ * Rich-text description of the plan.
52192
+ * This field accepts rich text formatting, such as: bold, underline, italic, and hyperlinks.
52193
+ */
52194
+ richDescription?: string;
52195
+ /** ID of the related product. */
52196
+ productId: string;
52197
+ /** Name-value pairs that specify the product options. */
52198
+ productOptions?: { [key: string]: string } | null;
52199
+ currency: storefrontComponents["schemas"]["CurrencyCode"];
52200
+ /** Currency sign. */
52201
+ currencySign?: string;
52202
+ pricing: storefrontComponents["schemas"]["PlanPriceFormula"];
52203
+ setup?: storefrontComponents["schemas"]["PlanSetup"];
52204
+ customFields?: storefrontComponents["schemas"]["ResourceCustomFields"];
52205
+ /** Specifies if the plan is active. */
52206
+ isActive?: boolean;
52207
+ /**
52208
+ * Number of times the plan is modified.
52209
+ * Compare this value with materialized subscription item revision values.
52210
+ */
52211
+ revision?: number;
52212
+ /** Specifies if a plan is a trial that does not have recurring instructions. */
52213
+ isTrialOnly?: boolean;
52214
+ /** Service interval settings. */
52215
+ recurringInterval?: { [key: string]: any };
52216
+ /** Trial configuration setting. */
52217
+ trial?: { [key: string]: any };
52218
+ createdTime?: storefrontComponents["schemas"]["CreatedTime"];
52219
+ updatedTime?: storefrontComponents["schemas"]["UpdatedTime"];
52220
+ /** Related links. */
52221
+ _links?: {
52222
+ /** Link URL. */
52223
+ href?: string;
52224
+ /** Type of link. */
52225
+ rel?: "self" | "attachments";
52226
+ }[];
52227
+ };
52228
+ OneTimeSalePlanDetails: {
52229
+ /** ID of the plan. */
52230
+ id: string;
52231
+ } & storefrontComponents["schemas"]["OneTimeSalePlan"];
52165
52232
  /**
52166
52233
  * Details of the trial-only plan.
52167
52234
  * Use this plan for limited-time product trials.
52168
52235
  * Trials may have a reduced fee, or may be free.
52169
52236
  */
52170
52237
  TrialOnlyPlan: {
52238
+ /**
52239
+ * Variant of the plan.
52240
+ * This field is optional in create and update requests.
52241
+ * The variant is `trial-only` when `trial` is present without `recurringInterval`.
52242
+ * If included, this field must match the applicable variant.
52243
+ * A mismatch results in an HTTP `422` response.
52244
+ * Responses always include this field.
52245
+ */
52246
+ type?: "trial-only";
52171
52247
  /**
52172
52248
  * Name of the plan.
52173
52249
  * This name is displayed on invoices and receipts.
@@ -52204,7 +52280,7 @@ export interface storefrontComponents {
52204
52280
  /** Service interval settings. */
52205
52281
  recurringInterval?: { [key: string]: any };
52206
52282
  /** Trial configuration settings. */
52207
- trial: storefrontComponents["schemas"]["PlanTrial"];
52283
+ trial: { [key: string]: any } & storefrontComponents["schemas"]["PlanTrial"];
52208
52284
  /**
52209
52285
  * Use invoice time shift to adjust the invoice issue and due date when billing must occur before the service period changes.
52210
52286
  * For example, rent must be paid in advance,
@@ -52222,19 +52298,18 @@ export interface storefrontComponents {
52222
52298
  rel?: "self" | "attachments";
52223
52299
  }[];
52224
52300
  };
52301
+ TrialOnlyPlanDetails: {
52302
+ /** ID of the plan. */
52303
+ id: string;
52304
+ } & storefrontComponents["schemas"]["TrialOnlyPlan"];
52225
52305
  Plan:
52226
- | ({
52227
- /** ID of the plan. */
52228
- id: string;
52229
- } & storefrontComponents["schemas"]["OneTimeSalePlan"])
52230
- | ({
52231
- /** ID of the plan. */
52232
- id: string;
52233
- } & storefrontComponents["schemas"]["SubscriptionPlan"])
52234
- | ({
52235
- /** ID of the plan. */
52236
- id: string;
52237
- } & storefrontComponents["schemas"]["TrialOnlyPlan"]);
52306
+ | storefrontComponents["schemas"]["SubscriptionPlanDetails"]
52307
+ | storefrontComponents["schemas"]["OneTimeSalePlanDetails"]
52308
+ | storefrontComponents["schemas"]["TrialOnlyPlanDetails"];
52309
+ PlanRequest:
52310
+ | storefrontComponents["schemas"]["SubscriptionPlan"]
52311
+ | storefrontComponents["schemas"]["OneTimeSalePlan"]
52312
+ | storefrontComponents["schemas"]["TrialOnlyPlan"];
52238
52313
  /**
52239
52314
  * Products are the items that your business sells.
52240
52315
  * Products include digital goods, services, and physical goods.
@@ -67215,6 +67290,13 @@ export interface storefrontComponents {
67215
67290
  StorefrontPlan: {
67216
67291
  /** ID of the plan. */
67217
67292
  id?: string;
67293
+ /**
67294
+ * Variant of the plan.
67295
+ * The variant is `subscription` when `recurringInterval` is present.
67296
+ * The variant is `trial-only` when `trial` is present without `recurringInterval`.
67297
+ * The variant is `one-time-sale` when both fields are omitted.
67298
+ */
67299
+ type?: "subscription" | "one-time-sale" | "trial-only";
67218
67300
  /**
67219
67301
  * Name of the plan.
67220
67302
  * This name is displayed on invoices and receipts.
@@ -78635,59 +78717,6 @@ export interface reportsComponents {
78635
78717
  */
78636
78718
  price: number;
78637
78719
  } | null;
78638
- /**
78639
- * Details of the one-time sale plan.
78640
- * Use this plan for non-recurring, one-time, sales.
78641
- */
78642
- OneTimeSalePlan: {
78643
- /**
78644
- * Name of the plan.
78645
- * This name is displayed on invoices and receipts.
78646
- */
78647
- name: string;
78648
- /**
78649
- * Plain-text description of the plan.
78650
- * This field accepts plain-text only.
78651
- */
78652
- description?: string;
78653
- /**
78654
- * Rich-text description of the plan.
78655
- * This field accepts rich text formatting, such as: bold, underline, italic, and hyperlinks.
78656
- */
78657
- richDescription?: string;
78658
- /** ID of the related product. */
78659
- productId: string;
78660
- /** Name-value pairs that specify the product options. */
78661
- productOptions?: { [key: string]: string } | null;
78662
- currency: reportsComponents["schemas"]["CurrencyCode"];
78663
- /** Currency sign. */
78664
- currencySign?: string;
78665
- pricing: reportsComponents["schemas"]["PlanPriceFormula"];
78666
- setup?: reportsComponents["schemas"]["PlanSetup"];
78667
- customFields?: reportsComponents["schemas"]["ResourceCustomFields"];
78668
- /** Specifies if the plan is active. */
78669
- isActive?: boolean;
78670
- /**
78671
- * Number of times the plan is modified.
78672
- * Compare this value with materialized subscription item revision values.
78673
- */
78674
- revision?: number;
78675
- /** Specifies if a plan is a trial that does not have recurring instructions. */
78676
- isTrialOnly?: boolean;
78677
- /** Service interval settings. */
78678
- recurringInterval?: { [key: string]: any };
78679
- /** Trial configuration setting. */
78680
- trial?: { [key: string]: any };
78681
- createdTime?: reportsComponents["schemas"]["CreatedTime"];
78682
- updatedTime?: reportsComponents["schemas"]["UpdatedTime"];
78683
- /** Related links. */
78684
- _links?: {
78685
- /** Link URL. */
78686
- href?: string;
78687
- /** Type of link. */
78688
- rel?: "self" | "attachments";
78689
- }[];
78690
- };
78691
78720
  SchedulingMethodDayAndMonthOfYear: {
78692
78721
  method: "day-and-month-of-year";
78693
78722
  /**
@@ -78782,6 +78811,15 @@ export interface reportsComponents {
78782
78811
  * Use this plan for subscriptions or sales that reoccur over a period of time.
78783
78812
  */
78784
78813
  SubscriptionPlan: {
78814
+ /**
78815
+ * Variant of the plan.
78816
+ * This field is optional in create and update requests.
78817
+ * The variant is `subscription` when `recurringInterval` is present.
78818
+ * If included, this field must match the applicable variant.
78819
+ * A mismatch results in an HTTP `422` response.
78820
+ * Responses always include this field.
78821
+ */
78822
+ type?: "subscription";
78785
78823
  /**
78786
78824
  * Name of the plan.
78787
78825
  * This name is displayed on invoices and receipts.
@@ -78874,12 +78912,91 @@ export interface reportsComponents {
78874
78912
  rel?: "self" | "attachments";
78875
78913
  }[];
78876
78914
  };
78915
+ SubscriptionPlanDetails: {
78916
+ /** ID of the plan. */
78917
+ id: string;
78918
+ } & reportsComponents["schemas"]["SubscriptionPlan"];
78919
+ /**
78920
+ * Details of the one-time sale plan.
78921
+ * Use this plan for non-recurring, one-time, sales.
78922
+ */
78923
+ OneTimeSalePlan: {
78924
+ /**
78925
+ * Variant of the plan.
78926
+ * This field is optional in create and update requests.
78927
+ * The variant is `one-time-sale` when both `recurringInterval` and `trial` are omitted.
78928
+ * If included, this field must match the applicable variant.
78929
+ * A mismatch results in an HTTP `422` response.
78930
+ * Responses always include this field.
78931
+ */
78932
+ type?: "one-time-sale";
78933
+ /**
78934
+ * Name of the plan.
78935
+ * This name is displayed on invoices and receipts.
78936
+ */
78937
+ name: string;
78938
+ /**
78939
+ * Plain-text description of the plan.
78940
+ * This field accepts plain-text only.
78941
+ */
78942
+ description?: string;
78943
+ /**
78944
+ * Rich-text description of the plan.
78945
+ * This field accepts rich text formatting, such as: bold, underline, italic, and hyperlinks.
78946
+ */
78947
+ richDescription?: string;
78948
+ /** ID of the related product. */
78949
+ productId: string;
78950
+ /** Name-value pairs that specify the product options. */
78951
+ productOptions?: { [key: string]: string } | null;
78952
+ currency: reportsComponents["schemas"]["CurrencyCode"];
78953
+ /** Currency sign. */
78954
+ currencySign?: string;
78955
+ pricing: reportsComponents["schemas"]["PlanPriceFormula"];
78956
+ setup?: reportsComponents["schemas"]["PlanSetup"];
78957
+ customFields?: reportsComponents["schemas"]["ResourceCustomFields"];
78958
+ /** Specifies if the plan is active. */
78959
+ isActive?: boolean;
78960
+ /**
78961
+ * Number of times the plan is modified.
78962
+ * Compare this value with materialized subscription item revision values.
78963
+ */
78964
+ revision?: number;
78965
+ /** Specifies if a plan is a trial that does not have recurring instructions. */
78966
+ isTrialOnly?: boolean;
78967
+ /** Service interval settings. */
78968
+ recurringInterval?: { [key: string]: any };
78969
+ /** Trial configuration setting. */
78970
+ trial?: { [key: string]: any };
78971
+ createdTime?: reportsComponents["schemas"]["CreatedTime"];
78972
+ updatedTime?: reportsComponents["schemas"]["UpdatedTime"];
78973
+ /** Related links. */
78974
+ _links?: {
78975
+ /** Link URL. */
78976
+ href?: string;
78977
+ /** Type of link. */
78978
+ rel?: "self" | "attachments";
78979
+ }[];
78980
+ };
78981
+ OneTimeSalePlanDetails: {
78982
+ /** ID of the plan. */
78983
+ id: string;
78984
+ } & reportsComponents["schemas"]["OneTimeSalePlan"];
78877
78985
  /**
78878
78986
  * Details of the trial-only plan.
78879
78987
  * Use this plan for limited-time product trials.
78880
78988
  * Trials may have a reduced fee, or may be free.
78881
78989
  */
78882
78990
  TrialOnlyPlan: {
78991
+ /**
78992
+ * Variant of the plan.
78993
+ * This field is optional in create and update requests.
78994
+ * The variant is `trial-only` when `trial` is present without `recurringInterval`.
78995
+ * If included, this field must match the applicable variant.
78996
+ * A mismatch results in an HTTP `422` response.
78997
+ * Responses always include this field.
78998
+ */
78999
+ type?: "trial-only";
78883
79000
  /**
78884
79001
  * Name of the plan.
78885
79002
  * This name is displayed on invoices and receipts.
@@ -78916,7 +79033,7 @@ export interface reportsComponents {
78916
79033
  /** Service interval settings. */
78917
79034
  recurringInterval?: { [key: string]: any };
78918
79035
  /** Trial configuration settings. */
78919
- trial: reportsComponents["schemas"]["PlanTrial"];
79036
+ trial: { [key: string]: any } & reportsComponents["schemas"]["PlanTrial"];
78920
79037
  /**
78921
79038
  * Use invoice time shift to adjust the invoice issue and due date when billing must occur before the service period changes.
78922
79039
  * For example, rent must be paid in advance,
@@ -78934,19 +79051,18 @@ export interface reportsComponents {
78934
79051
  rel?: "self" | "attachments";
78935
79052
  }[];
78936
79053
  };
79054
+ TrialOnlyPlanDetails: {
79055
+ /** ID of the plan. */
79056
+ id: string;
79057
+ } & reportsComponents["schemas"]["TrialOnlyPlan"];
78937
79058
  Plan:
78938
- | ({
78939
- /** ID of the plan. */
78940
- id: string;
78941
- } & reportsComponents["schemas"]["OneTimeSalePlan"])
78942
- | ({
78943
- /** ID of the plan. */
78944
- id: string;
78945
- } & reportsComponents["schemas"]["SubscriptionPlan"])
78946
- | ({
78947
- /** ID of the plan. */
78948
- id: string;
78949
- } & reportsComponents["schemas"]["TrialOnlyPlan"]);
79059
+ | reportsComponents["schemas"]["SubscriptionPlanDetails"]
79060
+ | reportsComponents["schemas"]["OneTimeSalePlanDetails"]
79061
+ | reportsComponents["schemas"]["TrialOnlyPlanDetails"];
79062
+ PlanRequest:
79063
+ | reportsComponents["schemas"]["SubscriptionPlan"]
79064
+ | reportsComponents["schemas"]["OneTimeSalePlan"]
79065
+ | reportsComponents["schemas"]["TrialOnlyPlan"];
78950
79066
  /**
78951
79067
  * Products are the items that your business sells.
78952
79068
  * Products include digital goods, services, and physical goods.
@@ -93927,6 +94043,13 @@ export interface reportsComponents {
93927
94043
  StorefrontPlan: {
93928
94044
  /** ID of the plan. */
93929
94045
  id?: string;
94046
+ /**
94047
+ * Variant of the plan.
94048
+ * The variant is `subscription` when `recurringInterval` is present.
94049
+ * The variant is `trial-only` when `trial` is present without `recurringInterval`.
94050
+ * The variant is `one-time-sale` when both fields are omitted.
94051
+ */
94052
+ type?: "subscription" | "one-time-sale" | "trial-only";
93930
94053
  /**
93931
94054
  * Name of the plan.
93932
94055
  * This name is displayed on invoices and receipts.