@vrplatform/hyperline-client 1.0.12 → 1.0.14

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.
@@ -312,6 +312,58 @@ export interface paths {
312
312
  patch?: never;
313
313
  trace?: never;
314
314
  };
315
+ "/v1/promotion-codes": {
316
+ parameters: {
317
+ query?: never;
318
+ header?: never;
319
+ path?: never;
320
+ cookie?: never;
321
+ };
322
+ /**
323
+ * Get promotion codes
324
+ * @description Retrieve all existing promotion codes.
325
+ */
326
+ get: operations["getPromotionCodes"];
327
+ put?: never;
328
+ /**
329
+ * Create promotion code
330
+ * @description Create a new promotion code.
331
+ */
332
+ post: operations["createPromotionCode"];
333
+ delete?: never;
334
+ options?: never;
335
+ head?: never;
336
+ patch?: never;
337
+ trace?: never;
338
+ };
339
+ "/v1/promotion-codes/{id}": {
340
+ parameters: {
341
+ query?: never;
342
+ header?: never;
343
+ path?: never;
344
+ cookie?: never;
345
+ };
346
+ /**
347
+ * Get promotion code
348
+ * @description Retrieve the details of an existing promotion code.
349
+ */
350
+ get: operations["getPromotionCode"];
351
+ put?: never;
352
+ post?: never;
353
+ /**
354
+ * Delete promotion code
355
+ * @description Delete an existing promotion code.
356
+ */
357
+ delete: operations["deletePromotionCode"];
358
+ options?: never;
359
+ head?: never;
360
+ /**
361
+ * Update promotion code
362
+ * @description Update the details of an existing promotion code.
363
+ */
364
+ patch: operations["updatePromotionCode"];
365
+ trace?: never;
366
+ };
315
367
  "/v1/custom-properties": {
316
368
  parameters: {
317
369
  query?: never;
@@ -371,7 +423,7 @@ export interface paths {
371
423
  * Get credit products
372
424
  * @description List all credits products attached to a customer.
373
425
  */
374
- get: operations["listCustomerCredits"];
426
+ get: operations["getCustomerCredits"];
375
427
  put?: never;
376
428
  /**
377
429
  * Create credit product
@@ -415,7 +467,7 @@ export interface paths {
415
467
  * Get credit transactions
416
468
  * @description Retrieve all credit transactions associated with a credit product for a specific customer.
417
469
  */
418
- get: operations["listCreditTransactionsForCustomer"];
470
+ get: operations["getCreditTransactionsForCustomer"];
419
471
  put?: never;
420
472
  post?: never;
421
473
  delete?: never;
@@ -671,7 +723,7 @@ export interface paths {
671
723
  * Get payment methods
672
724
  * @description List all payment methods attached to a customer.
673
725
  */
674
- get: operations["listCustomerPaymentMethods"];
726
+ get: operations["getCustomerPaymentMethods"];
675
727
  put?: never;
676
728
  post?: never;
677
729
  delete?: never;
@@ -1928,6 +1980,11 @@ export interface components {
1928
1980
  * @example pm_1ryTrMj4TTAT1N
1929
1981
  */
1930
1982
  payment_method_id: string | null;
1983
+ /**
1984
+ * @description ID of the bank account displayed on the invoice.
1985
+ * @example bac_KJyPrMA1toAqRG
1986
+ */
1987
+ bank_account_id: string | null;
1931
1988
  /**
1932
1989
  * @description Custom note added to the invoice.
1933
1990
  * @example Thank you for your purchase!
@@ -2459,6 +2516,11 @@ export interface components {
2459
2516
  * @example pm_1ryTrMj4TTAT1N
2460
2517
  */
2461
2518
  payment_method_id?: string;
2519
+ /**
2520
+ * @description ID of the bank account displayed on the invoice.
2521
+ * @example bac_KJyPrMA1toAqRG
2522
+ */
2523
+ bank_account_id?: string;
2462
2524
  emitted_at?: components["schemas"]["DateTime"] & string;
2463
2525
  due_at?: components["schemas"]["DateTime"] & string;
2464
2526
  settled_at?: components["schemas"]["DateTime"] & string;
@@ -2505,6 +2567,18 @@ export interface components {
2505
2567
  */
2506
2568
  tax_scheme: "auto" | "not_eligible";
2507
2569
  line_items?: components["schemas"]["CreateInvoiceLineItem"][];
2570
+ /** @enum {string|null} */
2571
+ payment_method_type?: "external" | null;
2572
+ /**
2573
+ * @description ID of the payment method used to pay the invoice.
2574
+ * @example pm_1ryTrMj4TTAT1N
2575
+ */
2576
+ payment_method_id?: string | null;
2577
+ /**
2578
+ * @description ID of the bank account displayed on the invoice.
2579
+ * @example bac_KJyPrMA1toAqRG
2580
+ */
2581
+ bank_account_id?: string | null;
2508
2582
  };
2509
2583
  /** @description A file in binary format. Accepted MIME types: application/pdf. Max size: 5000000 bytes. */
2510
2584
  File: unknown;
@@ -2662,6 +2736,92 @@ export interface components {
2662
2736
  */
2663
2737
  discount_percent: number;
2664
2738
  });
2739
+ PaginatedPromotionCode: {
2740
+ meta: {
2741
+ /**
2742
+ * @description Total of existing items.
2743
+ * @example 1
2744
+ */
2745
+ total: number;
2746
+ /**
2747
+ * @description Number of items returned.
2748
+ * @example 1
2749
+ */
2750
+ taken: number;
2751
+ /**
2752
+ * @description Number of items skipped.
2753
+ * @example 0
2754
+ */
2755
+ skipped: number;
2756
+ };
2757
+ /** @description List of PromotionCode. */
2758
+ data: {
2759
+ /**
2760
+ * @description Promotion code ID.
2761
+ * @example promo_DKL4Xcb5VSa8CQ
2762
+ */
2763
+ id: string;
2764
+ /**
2765
+ * @description Promotion code.
2766
+ * @example PROMO123
2767
+ */
2768
+ code: string;
2769
+ /**
2770
+ * @description Coupon ID.
2771
+ * @example cou_DKL4Xcb5VSa8CQ
2772
+ */
2773
+ coupon_id: string;
2774
+ /**
2775
+ * @description Client ID.
2776
+ * @example cli_DKL4Xcb5VSa8CQ
2777
+ */
2778
+ client_id: string;
2779
+ /**
2780
+ * @description If a `customer_id` is set, this promotion code will only be available to this customer.
2781
+ * @example cus_DKL4Xcb5VSa8CQ
2782
+ */
2783
+ customer_id: string | null;
2784
+ /**
2785
+ * @description If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.
2786
+ * @example plan_DKL4Xcb5VSa8CQ
2787
+ */
2788
+ plan_id: string | null;
2789
+ /**
2790
+ * @description If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.
2791
+ * @example itm_DKL4Xcb5VSa8CQ
2792
+ */
2793
+ product_id: string | null;
2794
+ created_at: components["schemas"]["DateTime"] & string;
2795
+ updated_at: components["schemas"]["DateTime"] & string;
2796
+ expires_at: components["schemas"]["DateTime"] & unknown;
2797
+ /**
2798
+ * @description Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.
2799
+ * @example 10
2800
+ */
2801
+ max_redemptions: number | null;
2802
+ /**
2803
+ * @description Current number of redemptions for the promotion code.
2804
+ * @example 0
2805
+ */
2806
+ current_redemptions: number | null;
2807
+ /**
2808
+ * @description Duration count applied to the subscription for the promotion code. 0 or null for `once`
2809
+ * @example 1
2810
+ */
2811
+ duration_count: number | null;
2812
+ /**
2813
+ * @description Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`
2814
+ * @example months
2815
+ * @enum {string|null}
2816
+ */
2817
+ duration_period: "once" | "days" | "weeks" | "months" | "years" | null;
2818
+ /**
2819
+ * @description Whether the promotion code is only for first time orders. Defaults to `false`
2820
+ * @example false
2821
+ */
2822
+ only_for_first_time_order: boolean | null;
2823
+ }[];
2824
+ };
2665
2825
  CustomProperty: {
2666
2826
  /**
2667
2827
  * @description Custom property ID.
@@ -2977,7 +3137,7 @@ export interface components {
2977
3137
  * @example Europe/Paris
2978
3138
  * @enum {string|null}
2979
3139
  */
2980
- timezone: "Pacific/Niue" | "Pacific/Midway" | "Pacific/Pago_Pago" | "Pacific/Rarotonga" | "Pacific/Honolulu" | "Pacific/Tahiti" | "Pacific/Marquesas" | "Pacific/Gambier" | "America/Adak" | "America/Anchorage" | "Pacific/Pitcairn" | "America/Hermosillo" | "America/Phoenix" | "America/Los_Angeles" | "America/Tijuana" | "America/Vancouver" | "America/Whitehorse" | "America/Belize" | "America/Guatemala" | "America/Managua" | "America/Mexico_City" | "America/Costa_Rica" | "America/El_Salvador" | "America/Regina" | "America/Tegucigalpa" | "Pacific/Easter" | "Pacific/Galapagos" | "America/Edmonton" | "America/Ciudad_Juarez" | "America/Denver" | "America/Rio_Branco" | "America/Chicago" | "America/Matamoros" | "America/Winnipeg" | "America/Bogota" | "America/Atikokan" | "America/Cancun" | "America/Cayman" | "America/Jamaica" | "America/Panama" | "America/Guayaquil" | "America/Lima" | "America/Manaus" | "America/St_Kitts" | "America/Blanc-Sablon" | "America/Montserrat" | "America/Barbados" | "America/St_Lucia" | "America/Port_of_Spain" | "America/Martinique" | "America/St_Barthelemy" | "America/St_Vincent" | "America/Kralendijk" | "America/Guadeloupe" | "America/Marigot" | "America/Aruba" | "America/Lower_Princes" | "America/Tortola" | "America/Dominica" | "America/St_Thomas" | "America/Grenada" | "America/Antigua" | "America/Puerto_Rico" | "America/Santo_Domingo" | "America/Anguilla" | "America/Curacao" | "America/La_Paz" | "America/Santiago" | "America/Havana" | "America/Grand_Turk" | "America/Nassau" | "America/New_York" | "America/Port-au-Prince" | "America/Toronto" | "America/Guyana" | "America/Asuncion" | "America/Caracas" | "America/Argentina/Buenos_Aires" | "America/Halifax" | "Atlantic/Bermuda" | "America/Thule" | "America/Sao_Paulo" | "Antarctica/Palmer" | "America/Punta_Arenas" | "Atlantic/Stanley" | "America/Cayenne" | "America/Paramaribo" | "America/Montevideo" | "America/St_Johns" | "America/Noronha" | "Atlantic/South_Georgia" | "America/Miquelon" | "Atlantic/Cape_Verde" | "America/Scoresbysund" | "America/Nuuk" | "Atlantic/Azores" | "Etc/UTC" | "Africa/Abidjan" | "Africa/Bamako" | "Africa/Bissau" | "Africa/Conakry" | "Africa/Dakar" | "America/Danmarkshavn" | "Africa/Freetown" | "Atlantic/St_Helena" | "Africa/Accra" | "Africa/Lome" | "Africa/Monrovia" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Atlantic/Reykjavik" | "Africa/Sao_Tome" | "Africa/Banjul" | "Africa/Algiers" | "Africa/Tunis" | "Europe/Isle_of_Man" | "Europe/Dublin" | "Europe/London" | "Europe/Jersey" | "Europe/Guernsey" | "Africa/Bangui" | "Africa/Malabo" | "Africa/Brazzaville" | "Africa/Porto-Novo" | "Africa/Douala" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Luanda" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Casablanca" | "Africa/El_Aaiun" | "Atlantic/Canary" | "Europe/Lisbon" | "Atlantic/Faroe" | "Africa/Bujumbura" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Juba" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Blantyre" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Maputo" | "Africa/Windhoek" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Gibraltar" | "Europe/Ljubljana" | "Arctic/Longyearbyen" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Monaco" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Rome" | "Europe/San_Marino" | "Europe/Malta" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Stockholm" | "Europe/Tirane" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "Europe/Kaliningrad" | "Africa/Tripoli" | "Antarctica/Troll" | "Africa/Johannesburg" | "Africa/Mbabane" | "Africa/Maseru" | "Asia/Kuwait" | "Asia/Bahrain" | "Asia/Baghdad" | "Asia/Qatar" | "Asia/Riyadh" | "Asia/Aden" | "Asia/Amman" | "Asia/Damascus" | "Africa/Addis_Ababa" | "Indian/Antananarivo" | "Africa/Asmara" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Kampala" | "Indian/Mayotte" | "Africa/Mogadishu" | "Indian/Comoro" | "Africa/Nairobi" | "Europe/Athens" | "Asia/Beirut" | "Europe/Bucharest" | "Africa/Cairo" | "Europe/Chisinau" | "Asia/Hebron" | "Europe/Helsinki" | "Europe/Kyiv" | "Europe/Mariehamn" | "Asia/Nicosia" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Vilnius" | "Asia/Jerusalem" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Simferopol" | "Antarctica/Syowa" | "Europe/Istanbul" | "Asia/Tehran" | "Asia/Yerevan" | "Asia/Baku" | "Asia/Tbilisi" | "Asia/Dubai" | "Asia/Muscat" | "Indian/Mauritius" | "Indian/Reunion" | "Europe/Samara" | "Indian/Mahe" | "Asia/Kabul" | "Asia/Almaty" | "Indian/Kerguelen" | "Indian/Maldives" | "Antarctica/Mawson" | "Asia/Karachi" | "Asia/Dushanbe" | "Asia/Ashgabat" | "Asia/Tashkent" | "Antarctica/Vostok" | "Asia/Aqtobe" | "Asia/Yekaterinburg" | "Asia/Colombo" | "Asia/Kolkata" | "Asia/Kathmandu" | "Asia/Dhaka" | "Asia/Thimphu" | "Asia/Urumqi" | "Indian/Chagos" | "Asia/Bishkek" | "Asia/Omsk" | "Indian/Cocos" | "Asia/Yangon" | "Indian/Christmas" | "Antarctica/Davis" | "Asia/Hovd" | "Asia/Bangkok" | "Asia/Ho_Chi_Minh" | "Asia/Phnom_Penh" | "Asia/Vientiane" | "Asia/Novosibirsk" | "Asia/Jakarta" | "Australia/Perth" | "Asia/Brunei" | "Antarctica/Casey" | "Asia/Makassar" | "Asia/Macau" | "Asia/Shanghai" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Kuala_Lumpur" | "Asia/Manila" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Eucla" | "Asia/Dili" | "Asia/Jayapura" | "Asia/Tokyo" | "Asia/Pyongyang" | "Asia/Seoul" | "Pacific/Palau" | "Asia/Chita" | "Australia/Adelaide" | "Australia/Darwin" | "Australia/Brisbane" | "Australia/Sydney" | "Pacific/Guam" | "Pacific/Saipan" | "Pacific/Chuuk" | "Antarctica/DumontDUrville" | "Pacific/Port_Moresby" | "Asia/Vladivostok" | "Australia/Lord_Howe" | "Pacific/Bougainville" | "Pacific/Kosrae" | "Pacific/Noumea" | "Pacific/Norfolk" | "Asia/Sakhalin" | "Pacific/Guadalcanal" | "Pacific/Efate" | "Pacific/Fiji" | "Pacific/Tarawa" | "Pacific/Majuro" | "Pacific/Nauru" | "Pacific/Auckland" | "Antarctica/McMurdo" | "Asia/Kamchatka" | "Pacific/Funafuti" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Chatham" | "Pacific/Apia" | "Pacific/Kanton" | "Pacific/Fakaofo" | "Pacific/Tongatapu" | "Pacific/Kiritimati" | null;
3140
+ timezone: "Pacific/Niue" | "Pacific/Midway" | "Pacific/Pago_Pago" | "Pacific/Rarotonga" | "Pacific/Honolulu" | "Pacific/Tahiti" | "Pacific/Marquesas" | "Pacific/Gambier" | "America/Adak" | "America/Anchorage" | "Pacific/Pitcairn" | "America/Hermosillo" | "America/Phoenix" | "America/Los_Angeles" | "America/Tijuana" | "America/Vancouver" | "America/Whitehorse" | "America/Belize" | "America/Guatemala" | "America/Managua" | "America/Mexico_City" | "America/Costa_Rica" | "America/El_Salvador" | "America/Regina" | "America/Tegucigalpa" | "Pacific/Easter" | "Pacific/Galapagos" | "America/Edmonton" | "America/Ciudad_Juarez" | "America/Denver" | "America/Rio_Branco" | "America/Chicago" | "America/Matamoros" | "America/Winnipeg" | "America/Bogota" | "America/Atikokan" | "America/Cancun" | "America/Cayman" | "America/Jamaica" | "America/Panama" | "America/Guayaquil" | "America/Lima" | "America/Manaus" | "America/St_Kitts" | "America/Blanc-Sablon" | "America/Montserrat" | "America/Barbados" | "America/St_Lucia" | "America/Port_of_Spain" | "America/Martinique" | "America/St_Barthelemy" | "America/St_Vincent" | "America/Kralendijk" | "America/Guadeloupe" | "America/Marigot" | "America/Aruba" | "America/Lower_Princes" | "America/Tortola" | "America/Dominica" | "America/St_Thomas" | "America/Grenada" | "America/Antigua" | "America/Puerto_Rico" | "America/Santo_Domingo" | "America/Anguilla" | "America/Curacao" | "America/La_Paz" | "America/Santiago" | "America/Havana" | "America/Grand_Turk" | "America/Nassau" | "America/New_York" | "America/Port-au-Prince" | "America/Toronto" | "America/Guyana" | "America/Caracas" | "America/Argentina/Buenos_Aires" | "America/Halifax" | "Atlantic/Bermuda" | "America/Thule" | "America/Sao_Paulo" | "Antarctica/Palmer" | "America/Punta_Arenas" | "Atlantic/Stanley" | "America/Cayenne" | "America/Asuncion" | "America/Paramaribo" | "America/Montevideo" | "America/St_Johns" | "America/Noronha" | "Atlantic/South_Georgia" | "America/Miquelon" | "Atlantic/Cape_Verde" | "America/Scoresbysund" | "America/Nuuk" | "Atlantic/Azores" | "Etc/UTC" | "Africa/Abidjan" | "Africa/Bamako" | "Africa/Bissau" | "Africa/Conakry" | "Africa/Dakar" | "America/Danmarkshavn" | "Africa/Freetown" | "Atlantic/St_Helena" | "Africa/Accra" | "Africa/Lome" | "Africa/Monrovia" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Atlantic/Reykjavik" | "Africa/Sao_Tome" | "Africa/Banjul" | "Africa/Algiers" | "Africa/Tunis" | "Europe/Isle_of_Man" | "Europe/Dublin" | "Europe/London" | "Europe/Jersey" | "Europe/Guernsey" | "Africa/Bangui" | "Africa/Malabo" | "Africa/Brazzaville" | "Africa/Porto-Novo" | "Africa/Douala" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Luanda" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Casablanca" | "Africa/El_Aaiun" | "Atlantic/Canary" | "Europe/Lisbon" | "Atlantic/Faroe" | "Africa/Bujumbura" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Juba" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Blantyre" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Maputo" | "Africa/Windhoek" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Gibraltar" | "Europe/Ljubljana" | "Arctic/Longyearbyen" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Monaco" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Rome" | "Europe/San_Marino" | "Europe/Malta" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Stockholm" | "Europe/Tirane" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "Europe/Kaliningrad" | "Africa/Tripoli" | "Antarctica/Troll" | "Africa/Johannesburg" | "Africa/Mbabane" | "Africa/Maseru" | "Asia/Kuwait" | "Asia/Bahrain" | "Asia/Baghdad" | "Asia/Qatar" | "Asia/Riyadh" | "Asia/Aden" | "Asia/Amman" | "Asia/Damascus" | "Africa/Addis_Ababa" | "Indian/Antananarivo" | "Africa/Asmara" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Kampala" | "Indian/Mayotte" | "Africa/Mogadishu" | "Indian/Comoro" | "Africa/Nairobi" | "Europe/Athens" | "Asia/Beirut" | "Europe/Bucharest" | "Africa/Cairo" | "Europe/Chisinau" | "Asia/Hebron" | "Europe/Helsinki" | "Europe/Kyiv" | "Europe/Mariehamn" | "Asia/Nicosia" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Vilnius" | "Asia/Jerusalem" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Simferopol" | "Antarctica/Syowa" | "Europe/Istanbul" | "Asia/Tehran" | "Asia/Yerevan" | "Asia/Baku" | "Asia/Tbilisi" | "Asia/Dubai" | "Asia/Muscat" | "Indian/Mauritius" | "Indian/Reunion" | "Europe/Samara" | "Indian/Mahe" | "Asia/Kabul" | "Asia/Almaty" | "Indian/Kerguelen" | "Indian/Maldives" | "Antarctica/Mawson" | "Asia/Karachi" | "Asia/Dushanbe" | "Asia/Ashgabat" | "Asia/Tashkent" | "Antarctica/Vostok" | "Asia/Aqtobe" | "Asia/Yekaterinburg" | "Asia/Colombo" | "Asia/Kolkata" | "Asia/Kathmandu" | "Asia/Dhaka" | "Asia/Thimphu" | "Asia/Urumqi" | "Indian/Chagos" | "Asia/Bishkek" | "Asia/Omsk" | "Indian/Cocos" | "Asia/Yangon" | "Indian/Christmas" | "Antarctica/Davis" | "Asia/Hovd" | "Asia/Bangkok" | "Asia/Ho_Chi_Minh" | "Asia/Phnom_Penh" | "Asia/Vientiane" | "Asia/Novosibirsk" | "Asia/Jakarta" | "Australia/Perth" | "Asia/Brunei" | "Antarctica/Casey" | "Asia/Makassar" | "Asia/Macau" | "Asia/Shanghai" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Kuala_Lumpur" | "Asia/Manila" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Eucla" | "Asia/Dili" | "Asia/Jayapura" | "Asia/Tokyo" | "Asia/Pyongyang" | "Asia/Seoul" | "Pacific/Palau" | "Asia/Chita" | "Australia/Adelaide" | "Australia/Darwin" | "Australia/Brisbane" | "Australia/Sydney" | "Pacific/Guam" | "Pacific/Saipan" | "Pacific/Chuuk" | "Antarctica/DumontDUrville" | "Pacific/Port_Moresby" | "Asia/Vladivostok" | "Australia/Lord_Howe" | "Pacific/Bougainville" | "Pacific/Kosrae" | "Pacific/Noumea" | "Pacific/Norfolk" | "Asia/Sakhalin" | "Pacific/Guadalcanal" | "Pacific/Efate" | "Pacific/Fiji" | "Pacific/Tarawa" | "Pacific/Majuro" | "Pacific/Nauru" | "Pacific/Auckland" | "Antarctica/McMurdo" | "Asia/Kamchatka" | "Pacific/Funafuti" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Chatham" | "Pacific/Apia" | "Pacific/Kanton" | "Pacific/Fakaofo" | "Pacific/Tongatapu" | "Pacific/Kiritimati" | null;
2981
3141
  /** @description ID of the customer in your system. This helps matching your customer with the one on Hyperline. */
2982
3142
  external_id: string | null;
2983
3143
  /** @description Key/value pairs to store any information you find useful. */
@@ -3098,7 +3258,7 @@ export interface components {
3098
3258
  };
3099
3259
  CustomerDetails: components["schemas"]["Customer"] & {
3100
3260
  /**
3101
- * @description Provider/ID mapping of the customer in the related providers. Provider (key) can be gocardless, mollie, stripe, airwallex, hubspot, salesforce, xero, exact-online, pennylane, netsuite.
3261
+ * @description Provider/ID mapping of the customer in the related providers. Provider (key) can be gocardless, mollie, stripe, airwallex, hubspot, salesforce, xero, exact-online, pennylane, quickbooks, netsuite.
3102
3262
  * @example {
3103
3263
  * "stripe": "cus_Ol3QIaTstxxxxx"
3104
3264
  * }
@@ -3113,6 +3273,7 @@ export interface components {
3113
3273
  xero?: string;
3114
3274
  "exact-online"?: string;
3115
3275
  pennylane?: string;
3276
+ quickbooks?: string;
3116
3277
  netsuite?: string;
3117
3278
  };
3118
3279
  current_payment_method: components["schemas"]["PaymentMethod"] & unknown;
@@ -3215,7 +3376,7 @@ export interface components {
3215
3376
  * @example Europe/Paris
3216
3377
  * @enum {string}
3217
3378
  */
3218
- timezone?: "Pacific/Niue" | "Pacific/Midway" | "Pacific/Pago_Pago" | "Pacific/Rarotonga" | "Pacific/Honolulu" | "Pacific/Tahiti" | "Pacific/Marquesas" | "Pacific/Gambier" | "America/Adak" | "America/Anchorage" | "Pacific/Pitcairn" | "America/Hermosillo" | "America/Phoenix" | "America/Los_Angeles" | "America/Tijuana" | "America/Vancouver" | "America/Whitehorse" | "America/Belize" | "America/Guatemala" | "America/Managua" | "America/Mexico_City" | "America/Costa_Rica" | "America/El_Salvador" | "America/Regina" | "America/Tegucigalpa" | "Pacific/Easter" | "Pacific/Galapagos" | "America/Edmonton" | "America/Ciudad_Juarez" | "America/Denver" | "America/Rio_Branco" | "America/Chicago" | "America/Matamoros" | "America/Winnipeg" | "America/Bogota" | "America/Atikokan" | "America/Cancun" | "America/Cayman" | "America/Jamaica" | "America/Panama" | "America/Guayaquil" | "America/Lima" | "America/Manaus" | "America/St_Kitts" | "America/Blanc-Sablon" | "America/Montserrat" | "America/Barbados" | "America/St_Lucia" | "America/Port_of_Spain" | "America/Martinique" | "America/St_Barthelemy" | "America/St_Vincent" | "America/Kralendijk" | "America/Guadeloupe" | "America/Marigot" | "America/Aruba" | "America/Lower_Princes" | "America/Tortola" | "America/Dominica" | "America/St_Thomas" | "America/Grenada" | "America/Antigua" | "America/Puerto_Rico" | "America/Santo_Domingo" | "America/Anguilla" | "America/Curacao" | "America/La_Paz" | "America/Santiago" | "America/Havana" | "America/Grand_Turk" | "America/Nassau" | "America/New_York" | "America/Port-au-Prince" | "America/Toronto" | "America/Guyana" | "America/Asuncion" | "America/Caracas" | "America/Argentina/Buenos_Aires" | "America/Halifax" | "Atlantic/Bermuda" | "America/Thule" | "America/Sao_Paulo" | "Antarctica/Palmer" | "America/Punta_Arenas" | "Atlantic/Stanley" | "America/Cayenne" | "America/Paramaribo" | "America/Montevideo" | "America/St_Johns" | "America/Noronha" | "Atlantic/South_Georgia" | "America/Miquelon" | "Atlantic/Cape_Verde" | "America/Scoresbysund" | "America/Nuuk" | "Atlantic/Azores" | "Etc/UTC" | "Africa/Abidjan" | "Africa/Bamako" | "Africa/Bissau" | "Africa/Conakry" | "Africa/Dakar" | "America/Danmarkshavn" | "Africa/Freetown" | "Atlantic/St_Helena" | "Africa/Accra" | "Africa/Lome" | "Africa/Monrovia" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Atlantic/Reykjavik" | "Africa/Sao_Tome" | "Africa/Banjul" | "Africa/Algiers" | "Africa/Tunis" | "Europe/Isle_of_Man" | "Europe/Dublin" | "Europe/London" | "Europe/Jersey" | "Europe/Guernsey" | "Africa/Bangui" | "Africa/Malabo" | "Africa/Brazzaville" | "Africa/Porto-Novo" | "Africa/Douala" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Luanda" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Casablanca" | "Africa/El_Aaiun" | "Atlantic/Canary" | "Europe/Lisbon" | "Atlantic/Faroe" | "Africa/Bujumbura" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Juba" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Blantyre" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Maputo" | "Africa/Windhoek" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Gibraltar" | "Europe/Ljubljana" | "Arctic/Longyearbyen" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Monaco" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Rome" | "Europe/San_Marino" | "Europe/Malta" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Stockholm" | "Europe/Tirane" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "Europe/Kaliningrad" | "Africa/Tripoli" | "Antarctica/Troll" | "Africa/Johannesburg" | "Africa/Mbabane" | "Africa/Maseru" | "Asia/Kuwait" | "Asia/Bahrain" | "Asia/Baghdad" | "Asia/Qatar" | "Asia/Riyadh" | "Asia/Aden" | "Asia/Amman" | "Asia/Damascus" | "Africa/Addis_Ababa" | "Indian/Antananarivo" | "Africa/Asmara" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Kampala" | "Indian/Mayotte" | "Africa/Mogadishu" | "Indian/Comoro" | "Africa/Nairobi" | "Europe/Athens" | "Asia/Beirut" | "Europe/Bucharest" | "Africa/Cairo" | "Europe/Chisinau" | "Asia/Hebron" | "Europe/Helsinki" | "Europe/Kyiv" | "Europe/Mariehamn" | "Asia/Nicosia" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Vilnius" | "Asia/Jerusalem" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Simferopol" | "Antarctica/Syowa" | "Europe/Istanbul" | "Asia/Tehran" | "Asia/Yerevan" | "Asia/Baku" | "Asia/Tbilisi" | "Asia/Dubai" | "Asia/Muscat" | "Indian/Mauritius" | "Indian/Reunion" | "Europe/Samara" | "Indian/Mahe" | "Asia/Kabul" | "Asia/Almaty" | "Indian/Kerguelen" | "Indian/Maldives" | "Antarctica/Mawson" | "Asia/Karachi" | "Asia/Dushanbe" | "Asia/Ashgabat" | "Asia/Tashkent" | "Antarctica/Vostok" | "Asia/Aqtobe" | "Asia/Yekaterinburg" | "Asia/Colombo" | "Asia/Kolkata" | "Asia/Kathmandu" | "Asia/Dhaka" | "Asia/Thimphu" | "Asia/Urumqi" | "Indian/Chagos" | "Asia/Bishkek" | "Asia/Omsk" | "Indian/Cocos" | "Asia/Yangon" | "Indian/Christmas" | "Antarctica/Davis" | "Asia/Hovd" | "Asia/Bangkok" | "Asia/Ho_Chi_Minh" | "Asia/Phnom_Penh" | "Asia/Vientiane" | "Asia/Novosibirsk" | "Asia/Jakarta" | "Australia/Perth" | "Asia/Brunei" | "Antarctica/Casey" | "Asia/Makassar" | "Asia/Macau" | "Asia/Shanghai" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Kuala_Lumpur" | "Asia/Manila" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Eucla" | "Asia/Dili" | "Asia/Jayapura" | "Asia/Tokyo" | "Asia/Pyongyang" | "Asia/Seoul" | "Pacific/Palau" | "Asia/Chita" | "Australia/Adelaide" | "Australia/Darwin" | "Australia/Brisbane" | "Australia/Sydney" | "Pacific/Guam" | "Pacific/Saipan" | "Pacific/Chuuk" | "Antarctica/DumontDUrville" | "Pacific/Port_Moresby" | "Asia/Vladivostok" | "Australia/Lord_Howe" | "Pacific/Bougainville" | "Pacific/Kosrae" | "Pacific/Noumea" | "Pacific/Norfolk" | "Asia/Sakhalin" | "Pacific/Guadalcanal" | "Pacific/Efate" | "Pacific/Fiji" | "Pacific/Tarawa" | "Pacific/Majuro" | "Pacific/Nauru" | "Pacific/Auckland" | "Antarctica/McMurdo" | "Asia/Kamchatka" | "Pacific/Funafuti" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Chatham" | "Pacific/Apia" | "Pacific/Kanton" | "Pacific/Fakaofo" | "Pacific/Tongatapu" | "Pacific/Kiritimati";
3379
+ timezone?: "Pacific/Niue" | "Pacific/Midway" | "Pacific/Pago_Pago" | "Pacific/Rarotonga" | "Pacific/Honolulu" | "Pacific/Tahiti" | "Pacific/Marquesas" | "Pacific/Gambier" | "America/Adak" | "America/Anchorage" | "Pacific/Pitcairn" | "America/Hermosillo" | "America/Phoenix" | "America/Los_Angeles" | "America/Tijuana" | "America/Vancouver" | "America/Whitehorse" | "America/Belize" | "America/Guatemala" | "America/Managua" | "America/Mexico_City" | "America/Costa_Rica" | "America/El_Salvador" | "America/Regina" | "America/Tegucigalpa" | "Pacific/Easter" | "Pacific/Galapagos" | "America/Edmonton" | "America/Ciudad_Juarez" | "America/Denver" | "America/Rio_Branco" | "America/Chicago" | "America/Matamoros" | "America/Winnipeg" | "America/Bogota" | "America/Atikokan" | "America/Cancun" | "America/Cayman" | "America/Jamaica" | "America/Panama" | "America/Guayaquil" | "America/Lima" | "America/Manaus" | "America/St_Kitts" | "America/Blanc-Sablon" | "America/Montserrat" | "America/Barbados" | "America/St_Lucia" | "America/Port_of_Spain" | "America/Martinique" | "America/St_Barthelemy" | "America/St_Vincent" | "America/Kralendijk" | "America/Guadeloupe" | "America/Marigot" | "America/Aruba" | "America/Lower_Princes" | "America/Tortola" | "America/Dominica" | "America/St_Thomas" | "America/Grenada" | "America/Antigua" | "America/Puerto_Rico" | "America/Santo_Domingo" | "America/Anguilla" | "America/Curacao" | "America/La_Paz" | "America/Santiago" | "America/Havana" | "America/Grand_Turk" | "America/Nassau" | "America/New_York" | "America/Port-au-Prince" | "America/Toronto" | "America/Guyana" | "America/Caracas" | "America/Argentina/Buenos_Aires" | "America/Halifax" | "Atlantic/Bermuda" | "America/Thule" | "America/Sao_Paulo" | "Antarctica/Palmer" | "America/Punta_Arenas" | "Atlantic/Stanley" | "America/Cayenne" | "America/Asuncion" | "America/Paramaribo" | "America/Montevideo" | "America/St_Johns" | "America/Noronha" | "Atlantic/South_Georgia" | "America/Miquelon" | "Atlantic/Cape_Verde" | "America/Scoresbysund" | "America/Nuuk" | "Atlantic/Azores" | "Etc/UTC" | "Africa/Abidjan" | "Africa/Bamako" | "Africa/Bissau" | "Africa/Conakry" | "Africa/Dakar" | "America/Danmarkshavn" | "Africa/Freetown" | "Atlantic/St_Helena" | "Africa/Accra" | "Africa/Lome" | "Africa/Monrovia" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Atlantic/Reykjavik" | "Africa/Sao_Tome" | "Africa/Banjul" | "Africa/Algiers" | "Africa/Tunis" | "Europe/Isle_of_Man" | "Europe/Dublin" | "Europe/London" | "Europe/Jersey" | "Europe/Guernsey" | "Africa/Bangui" | "Africa/Malabo" | "Africa/Brazzaville" | "Africa/Porto-Novo" | "Africa/Douala" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Luanda" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Casablanca" | "Africa/El_Aaiun" | "Atlantic/Canary" | "Europe/Lisbon" | "Atlantic/Faroe" | "Africa/Bujumbura" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Juba" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Blantyre" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Maputo" | "Africa/Windhoek" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Gibraltar" | "Europe/Ljubljana" | "Arctic/Longyearbyen" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Monaco" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Rome" | "Europe/San_Marino" | "Europe/Malta" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Stockholm" | "Europe/Tirane" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "Europe/Kaliningrad" | "Africa/Tripoli" | "Antarctica/Troll" | "Africa/Johannesburg" | "Africa/Mbabane" | "Africa/Maseru" | "Asia/Kuwait" | "Asia/Bahrain" | "Asia/Baghdad" | "Asia/Qatar" | "Asia/Riyadh" | "Asia/Aden" | "Asia/Amman" | "Asia/Damascus" | "Africa/Addis_Ababa" | "Indian/Antananarivo" | "Africa/Asmara" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Kampala" | "Indian/Mayotte" | "Africa/Mogadishu" | "Indian/Comoro" | "Africa/Nairobi" | "Europe/Athens" | "Asia/Beirut" | "Europe/Bucharest" | "Africa/Cairo" | "Europe/Chisinau" | "Asia/Hebron" | "Europe/Helsinki" | "Europe/Kyiv" | "Europe/Mariehamn" | "Asia/Nicosia" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Vilnius" | "Asia/Jerusalem" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Simferopol" | "Antarctica/Syowa" | "Europe/Istanbul" | "Asia/Tehran" | "Asia/Yerevan" | "Asia/Baku" | "Asia/Tbilisi" | "Asia/Dubai" | "Asia/Muscat" | "Indian/Mauritius" | "Indian/Reunion" | "Europe/Samara" | "Indian/Mahe" | "Asia/Kabul" | "Asia/Almaty" | "Indian/Kerguelen" | "Indian/Maldives" | "Antarctica/Mawson" | "Asia/Karachi" | "Asia/Dushanbe" | "Asia/Ashgabat" | "Asia/Tashkent" | "Antarctica/Vostok" | "Asia/Aqtobe" | "Asia/Yekaterinburg" | "Asia/Colombo" | "Asia/Kolkata" | "Asia/Kathmandu" | "Asia/Dhaka" | "Asia/Thimphu" | "Asia/Urumqi" | "Indian/Chagos" | "Asia/Bishkek" | "Asia/Omsk" | "Indian/Cocos" | "Asia/Yangon" | "Indian/Christmas" | "Antarctica/Davis" | "Asia/Hovd" | "Asia/Bangkok" | "Asia/Ho_Chi_Minh" | "Asia/Phnom_Penh" | "Asia/Vientiane" | "Asia/Novosibirsk" | "Asia/Jakarta" | "Australia/Perth" | "Asia/Brunei" | "Antarctica/Casey" | "Asia/Makassar" | "Asia/Macau" | "Asia/Shanghai" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Kuala_Lumpur" | "Asia/Manila" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Eucla" | "Asia/Dili" | "Asia/Jayapura" | "Asia/Tokyo" | "Asia/Pyongyang" | "Asia/Seoul" | "Pacific/Palau" | "Asia/Chita" | "Australia/Adelaide" | "Australia/Darwin" | "Australia/Brisbane" | "Australia/Sydney" | "Pacific/Guam" | "Pacific/Saipan" | "Pacific/Chuuk" | "Antarctica/DumontDUrville" | "Pacific/Port_Moresby" | "Asia/Vladivostok" | "Australia/Lord_Howe" | "Pacific/Bougainville" | "Pacific/Kosrae" | "Pacific/Noumea" | "Pacific/Norfolk" | "Asia/Sakhalin" | "Pacific/Guadalcanal" | "Pacific/Efate" | "Pacific/Fiji" | "Pacific/Tarawa" | "Pacific/Majuro" | "Pacific/Nauru" | "Pacific/Auckland" | "Antarctica/McMurdo" | "Asia/Kamchatka" | "Pacific/Funafuti" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Chatham" | "Pacific/Apia" | "Pacific/Kanton" | "Pacific/Fakaofo" | "Pacific/Tongatapu" | "Pacific/Kiritimati";
3219
3380
  /**
3220
3381
  * @description List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.
3221
3382
  * @example [
@@ -3317,7 +3478,7 @@ export interface components {
3317
3478
  * @example Europe/Paris
3318
3479
  * @enum {string}
3319
3480
  */
3320
- timezone?: "Pacific/Niue" | "Pacific/Midway" | "Pacific/Pago_Pago" | "Pacific/Rarotonga" | "Pacific/Honolulu" | "Pacific/Tahiti" | "Pacific/Marquesas" | "Pacific/Gambier" | "America/Adak" | "America/Anchorage" | "Pacific/Pitcairn" | "America/Hermosillo" | "America/Phoenix" | "America/Los_Angeles" | "America/Tijuana" | "America/Vancouver" | "America/Whitehorse" | "America/Belize" | "America/Guatemala" | "America/Managua" | "America/Mexico_City" | "America/Costa_Rica" | "America/El_Salvador" | "America/Regina" | "America/Tegucigalpa" | "Pacific/Easter" | "Pacific/Galapagos" | "America/Edmonton" | "America/Ciudad_Juarez" | "America/Denver" | "America/Rio_Branco" | "America/Chicago" | "America/Matamoros" | "America/Winnipeg" | "America/Bogota" | "America/Atikokan" | "America/Cancun" | "America/Cayman" | "America/Jamaica" | "America/Panama" | "America/Guayaquil" | "America/Lima" | "America/Manaus" | "America/St_Kitts" | "America/Blanc-Sablon" | "America/Montserrat" | "America/Barbados" | "America/St_Lucia" | "America/Port_of_Spain" | "America/Martinique" | "America/St_Barthelemy" | "America/St_Vincent" | "America/Kralendijk" | "America/Guadeloupe" | "America/Marigot" | "America/Aruba" | "America/Lower_Princes" | "America/Tortola" | "America/Dominica" | "America/St_Thomas" | "America/Grenada" | "America/Antigua" | "America/Puerto_Rico" | "America/Santo_Domingo" | "America/Anguilla" | "America/Curacao" | "America/La_Paz" | "America/Santiago" | "America/Havana" | "America/Grand_Turk" | "America/Nassau" | "America/New_York" | "America/Port-au-Prince" | "America/Toronto" | "America/Guyana" | "America/Asuncion" | "America/Caracas" | "America/Argentina/Buenos_Aires" | "America/Halifax" | "Atlantic/Bermuda" | "America/Thule" | "America/Sao_Paulo" | "Antarctica/Palmer" | "America/Punta_Arenas" | "Atlantic/Stanley" | "America/Cayenne" | "America/Paramaribo" | "America/Montevideo" | "America/St_Johns" | "America/Noronha" | "Atlantic/South_Georgia" | "America/Miquelon" | "Atlantic/Cape_Verde" | "America/Scoresbysund" | "America/Nuuk" | "Atlantic/Azores" | "Etc/UTC" | "Africa/Abidjan" | "Africa/Bamako" | "Africa/Bissau" | "Africa/Conakry" | "Africa/Dakar" | "America/Danmarkshavn" | "Africa/Freetown" | "Atlantic/St_Helena" | "Africa/Accra" | "Africa/Lome" | "Africa/Monrovia" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Atlantic/Reykjavik" | "Africa/Sao_Tome" | "Africa/Banjul" | "Africa/Algiers" | "Africa/Tunis" | "Europe/Isle_of_Man" | "Europe/Dublin" | "Europe/London" | "Europe/Jersey" | "Europe/Guernsey" | "Africa/Bangui" | "Africa/Malabo" | "Africa/Brazzaville" | "Africa/Porto-Novo" | "Africa/Douala" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Luanda" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Casablanca" | "Africa/El_Aaiun" | "Atlantic/Canary" | "Europe/Lisbon" | "Atlantic/Faroe" | "Africa/Bujumbura" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Juba" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Blantyre" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Maputo" | "Africa/Windhoek" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Gibraltar" | "Europe/Ljubljana" | "Arctic/Longyearbyen" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Monaco" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Rome" | "Europe/San_Marino" | "Europe/Malta" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Stockholm" | "Europe/Tirane" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "Europe/Kaliningrad" | "Africa/Tripoli" | "Antarctica/Troll" | "Africa/Johannesburg" | "Africa/Mbabane" | "Africa/Maseru" | "Asia/Kuwait" | "Asia/Bahrain" | "Asia/Baghdad" | "Asia/Qatar" | "Asia/Riyadh" | "Asia/Aden" | "Asia/Amman" | "Asia/Damascus" | "Africa/Addis_Ababa" | "Indian/Antananarivo" | "Africa/Asmara" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Kampala" | "Indian/Mayotte" | "Africa/Mogadishu" | "Indian/Comoro" | "Africa/Nairobi" | "Europe/Athens" | "Asia/Beirut" | "Europe/Bucharest" | "Africa/Cairo" | "Europe/Chisinau" | "Asia/Hebron" | "Europe/Helsinki" | "Europe/Kyiv" | "Europe/Mariehamn" | "Asia/Nicosia" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Vilnius" | "Asia/Jerusalem" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Simferopol" | "Antarctica/Syowa" | "Europe/Istanbul" | "Asia/Tehran" | "Asia/Yerevan" | "Asia/Baku" | "Asia/Tbilisi" | "Asia/Dubai" | "Asia/Muscat" | "Indian/Mauritius" | "Indian/Reunion" | "Europe/Samara" | "Indian/Mahe" | "Asia/Kabul" | "Asia/Almaty" | "Indian/Kerguelen" | "Indian/Maldives" | "Antarctica/Mawson" | "Asia/Karachi" | "Asia/Dushanbe" | "Asia/Ashgabat" | "Asia/Tashkent" | "Antarctica/Vostok" | "Asia/Aqtobe" | "Asia/Yekaterinburg" | "Asia/Colombo" | "Asia/Kolkata" | "Asia/Kathmandu" | "Asia/Dhaka" | "Asia/Thimphu" | "Asia/Urumqi" | "Indian/Chagos" | "Asia/Bishkek" | "Asia/Omsk" | "Indian/Cocos" | "Asia/Yangon" | "Indian/Christmas" | "Antarctica/Davis" | "Asia/Hovd" | "Asia/Bangkok" | "Asia/Ho_Chi_Minh" | "Asia/Phnom_Penh" | "Asia/Vientiane" | "Asia/Novosibirsk" | "Asia/Jakarta" | "Australia/Perth" | "Asia/Brunei" | "Antarctica/Casey" | "Asia/Makassar" | "Asia/Macau" | "Asia/Shanghai" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Kuala_Lumpur" | "Asia/Manila" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Eucla" | "Asia/Dili" | "Asia/Jayapura" | "Asia/Tokyo" | "Asia/Pyongyang" | "Asia/Seoul" | "Pacific/Palau" | "Asia/Chita" | "Australia/Adelaide" | "Australia/Darwin" | "Australia/Brisbane" | "Australia/Sydney" | "Pacific/Guam" | "Pacific/Saipan" | "Pacific/Chuuk" | "Antarctica/DumontDUrville" | "Pacific/Port_Moresby" | "Asia/Vladivostok" | "Australia/Lord_Howe" | "Pacific/Bougainville" | "Pacific/Kosrae" | "Pacific/Noumea" | "Pacific/Norfolk" | "Asia/Sakhalin" | "Pacific/Guadalcanal" | "Pacific/Efate" | "Pacific/Fiji" | "Pacific/Tarawa" | "Pacific/Majuro" | "Pacific/Nauru" | "Pacific/Auckland" | "Antarctica/McMurdo" | "Asia/Kamchatka" | "Pacific/Funafuti" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Chatham" | "Pacific/Apia" | "Pacific/Kanton" | "Pacific/Fakaofo" | "Pacific/Tongatapu" | "Pacific/Kiritimati";
3481
+ timezone?: "Pacific/Niue" | "Pacific/Midway" | "Pacific/Pago_Pago" | "Pacific/Rarotonga" | "Pacific/Honolulu" | "Pacific/Tahiti" | "Pacific/Marquesas" | "Pacific/Gambier" | "America/Adak" | "America/Anchorage" | "Pacific/Pitcairn" | "America/Hermosillo" | "America/Phoenix" | "America/Los_Angeles" | "America/Tijuana" | "America/Vancouver" | "America/Whitehorse" | "America/Belize" | "America/Guatemala" | "America/Managua" | "America/Mexico_City" | "America/Costa_Rica" | "America/El_Salvador" | "America/Regina" | "America/Tegucigalpa" | "Pacific/Easter" | "Pacific/Galapagos" | "America/Edmonton" | "America/Ciudad_Juarez" | "America/Denver" | "America/Rio_Branco" | "America/Chicago" | "America/Matamoros" | "America/Winnipeg" | "America/Bogota" | "America/Atikokan" | "America/Cancun" | "America/Cayman" | "America/Jamaica" | "America/Panama" | "America/Guayaquil" | "America/Lima" | "America/Manaus" | "America/St_Kitts" | "America/Blanc-Sablon" | "America/Montserrat" | "America/Barbados" | "America/St_Lucia" | "America/Port_of_Spain" | "America/Martinique" | "America/St_Barthelemy" | "America/St_Vincent" | "America/Kralendijk" | "America/Guadeloupe" | "America/Marigot" | "America/Aruba" | "America/Lower_Princes" | "America/Tortola" | "America/Dominica" | "America/St_Thomas" | "America/Grenada" | "America/Antigua" | "America/Puerto_Rico" | "America/Santo_Domingo" | "America/Anguilla" | "America/Curacao" | "America/La_Paz" | "America/Santiago" | "America/Havana" | "America/Grand_Turk" | "America/Nassau" | "America/New_York" | "America/Port-au-Prince" | "America/Toronto" | "America/Guyana" | "America/Caracas" | "America/Argentina/Buenos_Aires" | "America/Halifax" | "Atlantic/Bermuda" | "America/Thule" | "America/Sao_Paulo" | "Antarctica/Palmer" | "America/Punta_Arenas" | "Atlantic/Stanley" | "America/Cayenne" | "America/Asuncion" | "America/Paramaribo" | "America/Montevideo" | "America/St_Johns" | "America/Noronha" | "Atlantic/South_Georgia" | "America/Miquelon" | "Atlantic/Cape_Verde" | "America/Scoresbysund" | "America/Nuuk" | "Atlantic/Azores" | "Etc/UTC" | "Africa/Abidjan" | "Africa/Bamako" | "Africa/Bissau" | "Africa/Conakry" | "Africa/Dakar" | "America/Danmarkshavn" | "Africa/Freetown" | "Atlantic/St_Helena" | "Africa/Accra" | "Africa/Lome" | "Africa/Monrovia" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Atlantic/Reykjavik" | "Africa/Sao_Tome" | "Africa/Banjul" | "Africa/Algiers" | "Africa/Tunis" | "Europe/Isle_of_Man" | "Europe/Dublin" | "Europe/London" | "Europe/Jersey" | "Europe/Guernsey" | "Africa/Bangui" | "Africa/Malabo" | "Africa/Brazzaville" | "Africa/Porto-Novo" | "Africa/Douala" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Luanda" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Casablanca" | "Africa/El_Aaiun" | "Atlantic/Canary" | "Europe/Lisbon" | "Atlantic/Faroe" | "Africa/Bujumbura" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Juba" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Blantyre" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Maputo" | "Africa/Windhoek" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Gibraltar" | "Europe/Ljubljana" | "Arctic/Longyearbyen" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Monaco" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Rome" | "Europe/San_Marino" | "Europe/Malta" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Stockholm" | "Europe/Tirane" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "Europe/Kaliningrad" | "Africa/Tripoli" | "Antarctica/Troll" | "Africa/Johannesburg" | "Africa/Mbabane" | "Africa/Maseru" | "Asia/Kuwait" | "Asia/Bahrain" | "Asia/Baghdad" | "Asia/Qatar" | "Asia/Riyadh" | "Asia/Aden" | "Asia/Amman" | "Asia/Damascus" | "Africa/Addis_Ababa" | "Indian/Antananarivo" | "Africa/Asmara" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Kampala" | "Indian/Mayotte" | "Africa/Mogadishu" | "Indian/Comoro" | "Africa/Nairobi" | "Europe/Athens" | "Asia/Beirut" | "Europe/Bucharest" | "Africa/Cairo" | "Europe/Chisinau" | "Asia/Hebron" | "Europe/Helsinki" | "Europe/Kyiv" | "Europe/Mariehamn" | "Asia/Nicosia" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Vilnius" | "Asia/Jerusalem" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Simferopol" | "Antarctica/Syowa" | "Europe/Istanbul" | "Asia/Tehran" | "Asia/Yerevan" | "Asia/Baku" | "Asia/Tbilisi" | "Asia/Dubai" | "Asia/Muscat" | "Indian/Mauritius" | "Indian/Reunion" | "Europe/Samara" | "Indian/Mahe" | "Asia/Kabul" | "Asia/Almaty" | "Indian/Kerguelen" | "Indian/Maldives" | "Antarctica/Mawson" | "Asia/Karachi" | "Asia/Dushanbe" | "Asia/Ashgabat" | "Asia/Tashkent" | "Antarctica/Vostok" | "Asia/Aqtobe" | "Asia/Yekaterinburg" | "Asia/Colombo" | "Asia/Kolkata" | "Asia/Kathmandu" | "Asia/Dhaka" | "Asia/Thimphu" | "Asia/Urumqi" | "Indian/Chagos" | "Asia/Bishkek" | "Asia/Omsk" | "Indian/Cocos" | "Asia/Yangon" | "Indian/Christmas" | "Antarctica/Davis" | "Asia/Hovd" | "Asia/Bangkok" | "Asia/Ho_Chi_Minh" | "Asia/Phnom_Penh" | "Asia/Vientiane" | "Asia/Novosibirsk" | "Asia/Jakarta" | "Australia/Perth" | "Asia/Brunei" | "Antarctica/Casey" | "Asia/Makassar" | "Asia/Macau" | "Asia/Shanghai" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Kuala_Lumpur" | "Asia/Manila" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Eucla" | "Asia/Dili" | "Asia/Jayapura" | "Asia/Tokyo" | "Asia/Pyongyang" | "Asia/Seoul" | "Pacific/Palau" | "Asia/Chita" | "Australia/Adelaide" | "Australia/Darwin" | "Australia/Brisbane" | "Australia/Sydney" | "Pacific/Guam" | "Pacific/Saipan" | "Pacific/Chuuk" | "Antarctica/DumontDUrville" | "Pacific/Port_Moresby" | "Asia/Vladivostok" | "Australia/Lord_Howe" | "Pacific/Bougainville" | "Pacific/Kosrae" | "Pacific/Noumea" | "Pacific/Norfolk" | "Asia/Sakhalin" | "Pacific/Guadalcanal" | "Pacific/Efate" | "Pacific/Fiji" | "Pacific/Tarawa" | "Pacific/Majuro" | "Pacific/Nauru" | "Pacific/Auckland" | "Antarctica/McMurdo" | "Asia/Kamchatka" | "Pacific/Funafuti" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Chatham" | "Pacific/Apia" | "Pacific/Kanton" | "Pacific/Fakaofo" | "Pacific/Tongatapu" | "Pacific/Kiritimati";
3321
3482
  /**
3322
3483
  * @description List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.
3323
3484
  * @example [
@@ -5217,294 +5378,316 @@ export interface components {
5217
5378
  /** @description List of Plan. */
5218
5379
  data: components["schemas"]["PlanSimple"][];
5219
5380
  };
5220
- Plan: {
5381
+ PlanProductFee: {
5221
5382
  /**
5222
- * @description Plan ID.
5223
- * @example plan_zHmjoDea4ZRmQV
5383
+ * @description Product ID.
5384
+ * @example itm_3kXODDF42QXtnL
5224
5385
  */
5225
5386
  id: string;
5226
5387
  /**
5227
- * @description Plan name.
5228
- * @example Starter
5388
+ * @description Product name.
5389
+ * @example Product name
5229
5390
  */
5230
5391
  name: string;
5231
5392
  /**
5232
- * @description Plan description.
5233
- * @example Starter pack
5393
+ * @description Product description.
5394
+ * @example Product internal description
5234
5395
  */
5235
5396
  description: string | null;
5397
+ /** @description Indicates if the dates of the interval should be automatically added in the product description on the invoices. */
5398
+ description_display_interval_dates: boolean;
5236
5399
  /**
5237
- * @description Interval used to represent the commitment period of the plan.
5400
+ * @description The interval between payments for the product
5238
5401
  * @example {
5239
- * "period": "years",
5402
+ * "period": "months",
5240
5403
  * "count": 1
5241
5404
  * }
5242
5405
  */
5243
- commitment_interval: {
5406
+ payment_interval: {
5407
+ /** @enum {string} */
5408
+ period: "once";
5409
+ } | {
5244
5410
  /** @enum {string} */
5245
5411
  period: "days" | "weeks" | "months" | "years";
5246
5412
  count: number;
5247
5413
  } | null;
5248
5414
  /**
5249
- * @description Strategy used to trigger the start of the subscription contract.
5250
- * @example start_date
5251
- * @enum {string}
5415
+ * @description The schedule of payments for the product
5416
+ * @example start
5417
+ * @enum {string|null}
5252
5418
  */
5253
- contract_start_strategy: "start_date" | "immediately" | "manual" | "manual_with_latest" | "quote_signature" | "checkout";
5254
- contract_start: components["schemas"]["DateTime"] & unknown;
5419
+ payment_schedule: "start" | "end" | null;
5255
5420
  /**
5256
- * @description Strategy used to trigger the end of the subscription contract.
5257
- * @example duration
5421
+ * @description discriminator enum property added by openapi-typescript
5258
5422
  * @enum {string}
5259
5423
  */
5260
- contract_end_strategy: "duration" | "manual" | "end_date";
5261
- contract_end: components["schemas"]["DateTime"] & unknown;
5424
+ type: "flat_fee";
5425
+ /** @description Price tiers of the product. If fixed amount, only one price is available. */
5426
+ prices: (components["schemas"]["PriceFee"] & {
5427
+ country: "all" | (components["schemas"]["Country"] & string) | null;
5428
+ currency: components["schemas"]["Currency"] & (string | null);
5429
+ })[];
5430
+ };
5431
+ PlanProductSeat: {
5262
5432
  /**
5263
- * @description Duration of the initial contract for the created subscription.
5433
+ * @description Product ID.
5434
+ * @example itm_3kXODDF42QXtnL
5435
+ */
5436
+ id: string;
5437
+ /**
5438
+ * @description Product name.
5439
+ * @example Product name
5440
+ */
5441
+ name: string;
5442
+ /**
5443
+ * @description Product description.
5444
+ * @example Product internal description
5445
+ */
5446
+ description: string | null;
5447
+ /** @description Indicates if the dates of the interval should be automatically added in the product description on the invoices. */
5448
+ description_display_interval_dates: boolean;
5449
+ /**
5450
+ * @description The interval between payments for the product
5264
5451
  * @example {
5265
- * "period": "years",
5452
+ * "period": "months",
5266
5453
  * "count": 1
5267
5454
  * }
5268
5455
  */
5269
- contract_duration: {
5456
+ payment_interval: {
5270
5457
  /** @enum {string} */
5271
- period: "days" | "weeks" | "months" | "years" | "forever";
5272
- count: number | null;
5458
+ period: "once";
5459
+ } | {
5460
+ /** @enum {string} */
5461
+ period: "days" | "weeks" | "months" | "years";
5462
+ count: number;
5273
5463
  } | null;
5274
5464
  /**
5275
- * @description Indicates if the subscription to the plan should automatically renew.
5276
- * @example true
5465
+ * @description The schedule of payments for the product
5466
+ * @example start
5467
+ * @enum {string|null}
5277
5468
  */
5278
- renew_automatically: boolean;
5469
+ payment_schedule: "start" | "end" | null;
5279
5470
  /**
5280
- * @description Interval to renew thr subscription for if `renew_automatically` is enabled.
5471
+ * @description discriminator enum property added by openapi-typescript
5472
+ * @enum {string}
5473
+ */
5474
+ type: "seat";
5475
+ /**
5476
+ * @description Name of the unit.
5477
+ * @example user
5478
+ */
5479
+ unit_name: string | null;
5480
+ /** @description Price tiers of the product. If fixed amount, only one price is available. */
5481
+ prices: (components["schemas"]["PriceVolume"] | components["schemas"]["PricePackaged"] | components["schemas"]["PriceBulk"])[];
5482
+ };
5483
+ PlanProductDynamic: {
5484
+ /**
5485
+ * @description Product ID.
5486
+ * @example itm_3kXODDF42QXtnL
5487
+ */
5488
+ id: string;
5489
+ /**
5490
+ * @description Product name.
5491
+ * @example Product name
5492
+ */
5493
+ name: string;
5494
+ /**
5495
+ * @description Product description.
5496
+ * @example Product internal description
5497
+ */
5498
+ description: string | null;
5499
+ /** @description Indicates if the dates of the interval should be automatically added in the product description on the invoices. */
5500
+ description_display_interval_dates: boolean;
5501
+ /**
5502
+ * @description The interval between payments for the product
5281
5503
  * @example {
5282
- * "period": "years",
5504
+ * "period": "months",
5283
5505
  * "count": 1
5284
5506
  * }
5285
5507
  */
5286
- renew_for: {
5508
+ payment_interval: {
5509
+ /** @enum {string} */
5510
+ period: "once";
5511
+ } | {
5287
5512
  /** @enum {string} */
5288
5513
  period: "days" | "weeks" | "months" | "years";
5289
- count: number | null;
5514
+ count: number;
5290
5515
  } | null;
5291
- products: ({
5292
- /**
5293
- * @description Product ID.
5294
- * @example itm_FJKlqUb8COXw55
5295
- */
5296
- id: string;
5297
- /**
5298
- * @description Product name. This will appear on the final invoices.
5299
- * @example Product name
5300
- */
5301
- name: string;
5302
- /**
5303
- * @description Product description. This will appear on the final invoices.
5304
- * @example A description of the product.
5305
- */
5306
- description: string | null;
5307
- /** @description Indicates if the dates of the interval should be automatically added in the product description on the invoices. */
5308
- description_display_interval_dates: boolean;
5309
- /**
5310
- * @description Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval.
5311
- * @example {
5312
- * "period": "months",
5313
- * "count": 1
5314
- * }
5315
- */
5316
- payment_interval: {
5317
- /** @enum {string} */
5318
- period: "once";
5319
- } | {
5320
- /** @enum {string} */
5321
- period: "days" | "weeks" | "months" | "years";
5322
- count: number;
5323
- } | null;
5324
- /**
5325
- * @description Indicates if the product should be billed at the start or the end of the payment interval.
5326
- * @example start
5327
- * @enum {string|null}
5328
- */
5329
- payment_schedule: "start" | "end" | null;
5516
+ /**
5517
+ * @description The schedule of payments for the product
5518
+ * @example start
5519
+ * @enum {string|null}
5520
+ */
5521
+ payment_schedule: "start" | "end" | null;
5522
+ /**
5523
+ * @description discriminator enum property added by openapi-typescript
5524
+ * @enum {string}
5525
+ */
5526
+ type: "dynamic";
5527
+ /**
5528
+ * @description Name of the unit.
5529
+ * @example hour
5530
+ */
5531
+ unit_name: string | null;
5532
+ /**
5533
+ * @description Minimum of units committed. If usage is less than this number, then this value will be used.
5534
+ * @example 2000
5535
+ */
5536
+ min_committed_count: number | null;
5537
+ /** @description Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. */
5538
+ min_amount: number | null;
5539
+ /** @description Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. */
5540
+ max_amount: number | null;
5541
+ /**
5542
+ * @description
5543
+ * Indicates on which type of interval the usage should be aggregated.
5544
+ *
5545
+ * - `subscription_commitment`: For the usage contained within the subscription commitment period.
5546
+ * - `payment_interval`: For the usage contained within the payment interval of the product.
5547
+ * - `full_database`: For all the usage we ingested for this product, no matter the period.
5548
+ *
5549
+ * @enum {string|null}
5550
+ */
5551
+ metering_interval_type: "subscription_commitment" | "payment_interval" | "full_database" | "phase_duration" | null;
5552
+ /** @description Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. */
5553
+ bill_usage_difference: boolean;
5554
+ /** @description Price tiers of the product. If fixed amount, only one price is available. */
5555
+ prices: ((components["schemas"]["PriceVolume"] | components["schemas"]["PricePackaged"] | components["schemas"]["PriceBulk"] | components["schemas"]["PriceBps"]) & {
5556
+ metering_filter: components["schemas"]["MeteringFilter"];
5557
+ })[];
5558
+ };
5559
+ PlanProductCredit: {
5560
+ /**
5561
+ * @description Product ID.
5562
+ * @example itm_3kXODDF42QXtnL
5563
+ */
5564
+ id: string;
5565
+ /**
5566
+ * @description Product name.
5567
+ * @example Product name
5568
+ */
5569
+ name: string;
5570
+ /**
5571
+ * @description Product description.
5572
+ * @example Product internal description
5573
+ */
5574
+ description: string | null;
5575
+ /** @description Indicates if the dates of the interval should be automatically added in the product description on the invoices. */
5576
+ description_display_interval_dates: boolean;
5577
+ /**
5578
+ * @description The interval between payments for the product
5579
+ * @example {
5580
+ * "period": "months",
5581
+ * "count": 1
5582
+ * }
5583
+ */
5584
+ payment_interval: {
5330
5585
  /** @enum {string} */
5331
- type: "flat_fee";
5332
- /** @description Price tiers of the product. If fixed amount, only one price is available. */
5333
- prices: components["schemas"]["PriceFee"][];
5586
+ period: "once";
5334
5587
  } | {
5335
- /**
5336
- * @description Product ID.
5337
- * @example itm_FJKlqUb8COXw55
5338
- */
5339
- id: string;
5340
- /**
5341
- * @description Product name. This will appear on the final invoices.
5342
- * @example Product name
5343
- */
5344
- name: string;
5345
- /**
5346
- * @description Product description. This will appear on the final invoices.
5347
- * @example A description of the product.
5348
- */
5349
- description: string | null;
5350
- /** @description Indicates if the dates of the interval should be automatically added in the product description on the invoices. */
5351
- description_display_interval_dates: boolean;
5352
- /**
5353
- * @description Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval.
5354
- * @example {
5355
- * "period": "months",
5356
- * "count": 1
5357
- * }
5358
- */
5359
- payment_interval: {
5360
- /** @enum {string} */
5361
- period: "once";
5362
- } | {
5363
- /** @enum {string} */
5364
- period: "days" | "weeks" | "months" | "years";
5365
- count: number;
5366
- } | null;
5367
- /**
5368
- * @description Indicates if the product should be billed at the start or the end of the payment interval.
5369
- * @example start
5370
- * @enum {string|null}
5371
- */
5372
- payment_schedule: "start" | "end" | null;
5373
5588
  /** @enum {string} */
5374
- type: "seat";
5375
- /**
5376
- * @description Name of the unit.
5377
- * @example user
5378
- */
5379
- unit_name: string | null;
5380
- /** @description Price tiers of the product. If fixed amount, only one price is available. */
5381
- prices: (components["schemas"]["PriceVolume"] | components["schemas"]["PricePackaged"] | components["schemas"]["PriceBulk"])[];
5382
- } | {
5383
- /**
5384
- * @description Product ID.
5385
- * @example itm_FJKlqUb8COXw55
5386
- */
5387
- id: string;
5388
- /**
5389
- * @description Product name. This will appear on the final invoices.
5390
- * @example Product name
5391
- */
5392
- name: string;
5393
- /**
5394
- * @description Product description. This will appear on the final invoices.
5395
- * @example A description of the product.
5396
- */
5397
- description: string | null;
5398
- /** @description Indicates if the dates of the interval should be automatically added in the product description on the invoices. */
5399
- description_display_interval_dates: boolean;
5400
- /**
5401
- * @description Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval.
5402
- * @example {
5403
- * "period": "months",
5404
- * "count": 1
5405
- * }
5406
- */
5407
- payment_interval: {
5408
- /** @enum {string} */
5409
- period: "once";
5410
- } | {
5411
- /** @enum {string} */
5412
- period: "days" | "weeks" | "months" | "years";
5413
- count: number;
5414
- } | null;
5415
- /**
5416
- * @description Indicates if the product should be billed at the start or the end of the payment interval.
5417
- * @example start
5418
- * @enum {string|null}
5419
- */
5420
- payment_schedule: "start" | "end" | null;
5589
+ period: "days" | "weeks" | "months" | "years";
5590
+ count: number;
5591
+ } | null;
5592
+ /**
5593
+ * @description The schedule of payments for the product
5594
+ * @example start
5595
+ * @enum {string|null}
5596
+ */
5597
+ payment_schedule: "start" | "end" | null;
5598
+ /**
5599
+ * @description discriminator enum property added by openapi-typescript
5600
+ * @enum {string}
5601
+ */
5602
+ type: "credit";
5603
+ /**
5604
+ * @description Name of the unit.
5605
+ * @example hour
5606
+ */
5607
+ unit_name: string | null;
5608
+ /** @description Price tiers of the product. If fixed amount, only one price is available. */
5609
+ prices: (components["schemas"]["PriceBulk"] & {
5421
5610
  /** @enum {string} */
5422
- type: "dynamic";
5423
- /**
5424
- * @description Name of the unit.
5425
- * @example hour
5426
- */
5427
- unit_name: string | null;
5428
- /**
5429
- * @description Minimum of units committed. If usage is less than this number, then this value will be used.
5430
- * @example 2000
5431
- */
5432
- min_committed_count: number | null;
5433
- /** @description Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. */
5434
- min_amount: number | null;
5435
- /** @description Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. */
5436
- max_amount: number | null;
5437
- /**
5438
- * @description
5439
- * Indicates on which type of interval the usage should be aggregated.
5440
- *
5441
- * - `subscription_commitment`: For the usage contained within the subscription commitment period.
5442
- * - `payment_interval`: For the usage contained within the payment interval of the product.
5443
- * - `full_database`: For all the usage we ingested for this product, no matter the period.
5444
- *
5445
- * @enum {string|null}
5446
- */
5447
- metering_interval_type: "subscription_commitment" | "payment_interval" | "full_database" | "phase_duration" | null;
5448
- /** @description Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. */
5449
- bill_usage_difference: boolean;
5450
- /** @description Price tiers of the product. If fixed amount, only one price is available. */
5451
- prices: ((components["schemas"]["PriceVolume"] | components["schemas"]["PricePackaged"] | components["schemas"]["PriceBulk"] | components["schemas"]["PriceBps"]) & {
5452
- metering_filter: components["schemas"]["MeteringFilter"];
5453
- })[];
5454
- } | {
5455
- /**
5456
- * @description Product ID.
5457
- * @example itm_FJKlqUb8COXw55
5458
- */
5459
- id: string;
5460
- /**
5461
- * @description Product name. This will appear on the final invoices.
5462
- * @example Product name
5463
- */
5464
- name: string;
5465
- /**
5466
- * @description Product description. This will appear on the final invoices.
5467
- * @example A description of the product.
5468
- */
5469
- description: string | null;
5470
- /** @description Indicates if the dates of the interval should be automatically added in the product description on the invoices. */
5471
- description_display_interval_dates: boolean;
5472
- /**
5473
- * @description Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval.
5474
- * @example {
5475
- * "period": "months",
5476
- * "count": 1
5477
- * }
5478
- */
5479
- payment_interval: {
5480
- /** @enum {string} */
5481
- period: "once";
5482
- } | {
5483
- /** @enum {string} */
5484
- period: "days" | "weeks" | "months" | "years";
5485
- count: number;
5486
- } | null;
5487
- /**
5488
- * @description Indicates if the product should be billed at the start or the end of the payment interval.
5489
- * @example start
5490
- * @enum {string|null}
5491
- */
5492
- payment_schedule: "start" | "end" | null;
5611
+ type: "bundle";
5612
+ /** @description Price ID. */
5613
+ id?: string;
5614
+ amount: components["schemas"]["Amount"] & unknown;
5615
+ /** @description Number of units considered for the amount. */
5616
+ unit_count: number;
5617
+ })[];
5618
+ };
5619
+ Plan: {
5620
+ /**
5621
+ * @description Plan ID.
5622
+ * @example plan_zHmjoDea4ZRmQV
5623
+ */
5624
+ id: string;
5625
+ /**
5626
+ * @description Plan name.
5627
+ * @example Starter
5628
+ */
5629
+ name: string;
5630
+ /**
5631
+ * @description Plan description.
5632
+ * @example Starter pack
5633
+ */
5634
+ description: string | null;
5635
+ /**
5636
+ * @description Interval used to represent the commitment period of the plan.
5637
+ * @example {
5638
+ * "period": "years",
5639
+ * "count": 1
5640
+ * }
5641
+ */
5642
+ commitment_interval: {
5493
5643
  /** @enum {string} */
5494
- type: "credit";
5495
- /**
5496
- * @description Name of the unit.
5497
- * @example hour
5498
- */
5499
- unit_name: string | null;
5500
- /**
5501
- * @description Number of product units.
5502
- * @example 2
5503
- */
5644
+ period: "days" | "weeks" | "months" | "years";
5504
5645
  count: number;
5505
- /** @description Price tiers of the product. If fixed amount, only one price is available. */
5506
- prices: components["schemas"]["PriceFee"][];
5507
- })[];
5646
+ } | null;
5647
+ /**
5648
+ * @description Strategy used to trigger the start of the subscription contract.
5649
+ * @example start_date
5650
+ * @enum {string}
5651
+ */
5652
+ contract_start_strategy: "start_date" | "immediately" | "manual" | "manual_with_latest" | "quote_signature" | "checkout";
5653
+ contract_start: components["schemas"]["DateTime"] & unknown;
5654
+ /**
5655
+ * @description Strategy used to trigger the end of the subscription contract.
5656
+ * @example duration
5657
+ * @enum {string}
5658
+ */
5659
+ contract_end_strategy: "duration" | "manual" | "end_date";
5660
+ contract_end: components["schemas"]["DateTime"] & unknown;
5661
+ /**
5662
+ * @description Duration of the initial contract for the created subscription.
5663
+ * @example {
5664
+ * "period": "years",
5665
+ * "count": 1
5666
+ * }
5667
+ */
5668
+ contract_duration: {
5669
+ /** @enum {string} */
5670
+ period: "days" | "weeks" | "months" | "years" | "forever";
5671
+ count: number | null;
5672
+ } | null;
5673
+ /**
5674
+ * @description Indicates if the subscription to the plan should automatically renew.
5675
+ * @example true
5676
+ */
5677
+ renew_automatically: boolean;
5678
+ /**
5679
+ * @description Interval to renew thr subscription for if `renew_automatically` is enabled.
5680
+ * @example {
5681
+ * "period": "years",
5682
+ * "count": 1
5683
+ * }
5684
+ */
5685
+ renew_for: {
5686
+ /** @enum {string} */
5687
+ period: "days" | "weeks" | "months" | "years";
5688
+ count: number | null;
5689
+ } | null;
5690
+ products: (components["schemas"]["PlanProductFee"] | components["schemas"]["PlanProductSeat"] | components["schemas"]["PlanProductDynamic"] | components["schemas"]["PlanProductCredit"])[];
5508
5691
  /** @description A list of key value with the ID or the name of the custom property as the key and the custom property value as value. */
5509
5692
  custom_properties: {
5510
5693
  [key: string]: string | number | boolean | (components["schemas"]["DateTime"] & string) | null;
@@ -6222,7 +6405,7 @@ export interface components {
6222
6405
  generate_draft_invoices: boolean | ("true" | "false");
6223
6406
  /**
6224
6407
  * @deprecated
6225
- * @description Use `contract_start` `contract_end` and `renew_automatically` instead. Interval previously used to represent the commitment period of the subscription.
6408
+ * @description Use `contract_terms` instead. Interval previously used to represent the commitment period of the subscription.
6226
6409
  * @example {
6227
6410
  * "period": "years",
6228
6411
  * "count": 1
@@ -6234,13 +6417,15 @@ export interface components {
6234
6417
  count: number;
6235
6418
  };
6236
6419
  /**
6237
- * @description Indicates if the subscription should automatically renew.
6420
+ * @deprecated
6421
+ * @description Use `contract_terms` instead. Indicates if the subscription should automatically renew.
6238
6422
  * @default true
6239
6423
  * @example true
6240
6424
  */
6241
6425
  renew_automatically: boolean | ("true" | "false");
6242
6426
  /**
6243
- * @description If `renew_automatically` is enabled, will renew the subscription for the given interval.
6427
+ * @deprecated
6428
+ * @description Use `contract_terms` instead. If `renew_automatically` is enabled, will renew the subscription for the given interval.
6244
6429
  * @example {
6245
6430
  * "period": "years",
6246
6431
  * "count": 1
@@ -6284,6 +6469,78 @@ export interface components {
6284
6469
  custom_properties?: {
6285
6470
  [key: string]: string | number | boolean | (components["schemas"]["DateTime"] & string) | null;
6286
6471
  };
6472
+ /** @description
6473
+ * Contract terms linked to the subscription.
6474
+ * */
6475
+ contract_terms?: {
6476
+ starts_at?: components["schemas"]["DateTime"] & string;
6477
+ ends_at?: components["schemas"]["DateTime"] & string;
6478
+ /**
6479
+ * @description Interval over which the contract initially spans. Only applies to `duration` end strategy.
6480
+ * @example {
6481
+ * "count": 6,
6482
+ * "period": "months"
6483
+ * }
6484
+ */
6485
+ duration?: {
6486
+ /** @enum {string} */
6487
+ period: "days" | "weeks" | "months" | "years";
6488
+ /** @default 1 */
6489
+ count: number;
6490
+ };
6491
+ /**
6492
+ * @description
6493
+ * Indicates if the contract should be renewed automatically.
6494
+ *
6495
+ * - `true`: The contract will be renewed automatically.
6496
+ * - `false`: The contract will not be renewed automatically.
6497
+ *
6498
+ * @example true
6499
+ */
6500
+ renew_automatically?: boolean | ("true" | "false");
6501
+ /**
6502
+ * @description
6503
+ * Interval over which the contract will be renewed. Only applies if `renew_automatically` is true.
6504
+ *
6505
+ * @example {
6506
+ * "count": 1,
6507
+ * "period": "years"
6508
+ * }
6509
+ */
6510
+ renew_for_duration?: {
6511
+ /** @enum {string} */
6512
+ period: "days" | "weeks" | "months" | "years";
6513
+ /** @default 1 */
6514
+ count: number;
6515
+ };
6516
+ } & {
6517
+ /**
6518
+ * @description
6519
+ * Activation strategy of the contract.
6520
+ *
6521
+ * - `immediately`: The contract will be activated immediately.
6522
+ * - `manual`: The contract will be activated when a user manually activates it.
6523
+ * - `start_date`: The contract will be activated on a specified date.
6524
+ * - `quote_signature`: The contract will be activated when the subscription quote is signed.
6525
+ * - `checkout`: The contract will be activated when the subscription checkout is completed.
6526
+ *
6527
+ * @example start_date
6528
+ * @enum {string}
6529
+ */
6530
+ activation_strategy: "start_date" | "immediately" | "manual" | "quote_signature" | "checkout";
6531
+ /**
6532
+ * @description
6533
+ * End strategy of contract.
6534
+ *
6535
+ * - `manual`: The contract ends when a user manually stops it.
6536
+ * - `end_date`: The contract ends on a specified date.
6537
+ * - `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.
6538
+ *
6539
+ * @example duration
6540
+ * @enum {string}
6541
+ */
6542
+ end_strategy: "end_date" | "duration" | "manual";
6543
+ };
6287
6544
  } & {
6288
6545
  /** @description Create a free trial phase based on the plan configuration. */
6289
6546
  trial?: {
@@ -6291,23 +6548,132 @@ export interface components {
6291
6548
  * @description Defines how the free trial will end.
6292
6549
  * @enum {string}
6293
6550
  */
6294
- end_strategy: "manual" | "end_date" | "duration";
6295
- starts_at?: components["schemas"]["DateTime"] & string;
6296
- ends_at?: components["schemas"]["DateTime"] & string;
6551
+ end_strategy: "manual" | "end_date" | "duration";
6552
+ starts_at?: components["schemas"]["DateTime"] & string;
6553
+ ends_at?: components["schemas"]["DateTime"] & string;
6554
+ duration?: {
6555
+ /**
6556
+ * @description Free trial duration period. Only applies if the end strategy is `duration`.
6557
+ * @enum {string}
6558
+ */
6559
+ period: "days" | "weeks" | "months" | "years";
6560
+ /** @description Free trial duration count. Only applies if the end strategy is `duration`. */
6561
+ count: number;
6562
+ };
6563
+ };
6564
+ } & ({
6565
+ phases: {
6566
+ /**
6567
+ * @description
6568
+ * Type of subscription phase.
6569
+ *
6570
+ * - `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.
6571
+ * - `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.
6572
+ * - `standard`: The phase represents a standard recurring billing.
6573
+ *
6574
+ * @default standard
6575
+ * @example standard
6576
+ * @enum {string}
6577
+ */
6578
+ type: "setup" | "trial" | "standard";
6579
+ /**
6580
+ * @description Order in which the phase is executed within all subscription phases.
6581
+ * @example 0
6582
+ */
6583
+ order?: number;
6584
+ /**
6585
+ * @description
6586
+ * Activation strategy of subscription phase.
6587
+ *
6588
+ * - `immediately`: The phase starts as soon as the subscription is activated.
6589
+ * - `manual`: The phase starts when a user manually activates it.
6590
+ * - `start_date`: The phase starts on a specified date.
6591
+ * - `quote_signature`: The phase starts when the subscription quote is signed.
6592
+ * - `checkout`: The phase starts when the subscription checkout is completed.
6593
+ * - `contract_start_date`: The phase starts on the start date of the related subscription contract.
6594
+ * - `previous_phase_end`: The phase starts when the previous phase ends.
6595
+ *
6596
+ * @example manual
6597
+ * @enum {string}
6598
+ */
6599
+ activation_strategy: "immediately" | "manual" | "start_date" | "quote_signature" | "checkout" | "contract_start_date" | "previous_phase_end";
6600
+ /**
6601
+ * @description
6602
+ * End strategy of subscription phase.
6603
+ *
6604
+ * - `manual`: The phase ends when a user manually stops it.
6605
+ * - `end_date`: The phase ends on a specified date.
6606
+ * - `duration`: The phase ends after a specific relative duration.
6607
+ * - `contract_end_date`: The phase ends on the end date of the related subscription contract.
6608
+ *
6609
+ * @example duration
6610
+ * @enum {string}
6611
+ */
6612
+ end_strategy: "manual" | "end_date" | "duration" | "contract_end_date";
6613
+ /**
6614
+ * @description Interval over which the subscription phase spans. Only applies to `duration` end strategy.
6615
+ * @example {
6616
+ * "count": 1,
6617
+ * "period": "years"
6618
+ * }
6619
+ */
6297
6620
  duration?: {
6298
- /**
6299
- * @description Free trial duration period. Only applies if the end strategy is `duration`.
6300
- * @enum {string}
6301
- */
6621
+ /** @enum {string} */
6302
6622
  period: "days" | "weeks" | "months" | "years";
6303
- /** @description Free trial duration count. Only applies if the end strategy is `duration`. */
6623
+ /** @default 1 */
6304
6624
  count: number;
6305
6625
  };
6306
- };
6307
- } & ({
6308
- phases: ({
6309
- /** @enum {string} */
6310
- activation_strategy: "start_date" | "manual" | "checkout" | "contract_start_date" | "previous_phase_end" | "immediately" | "quote_signature";
6626
+ /**
6627
+ * @description
6628
+ * Represents when the first billing date occurs.
6629
+ *
6630
+ * - `phase_start`: Aligns with the start of the phase.
6631
+ * - `specific_date`: Occurs on a specified date.
6632
+ *
6633
+ * @example phase_start
6634
+ * @enum {string}
6635
+ */
6636
+ billing_date_setting: "phase_start" | "specific_date";
6637
+ initial_billing_at?: components["schemas"]["DateTime"] & string;
6638
+ starts_at?: components["schemas"]["DateTime"] & string;
6639
+ ends_at?: components["schemas"]["DateTime"] & string;
6640
+ /**
6641
+ * @description
6642
+ * Alignment of product billing cycles.
6643
+ *
6644
+ * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
6645
+ * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
6646
+ *
6647
+ * @default anniversary
6648
+ * @example anniversary
6649
+ * @enum {string}
6650
+ */
6651
+ billing_cycle_alignment: "calendar_period" | "anniversary";
6652
+ /**
6653
+ * @description
6654
+ * Calculation method used when transitioning from one phase to the next one.
6655
+ *
6656
+ * - `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.
6657
+ * - `pay_in_full`: The full amount for the phase billing period must be paid.
6658
+ * - `none`: No amount will need to be paid, phase will simply transition from one to the next.
6659
+ *
6660
+ * @default prorata
6661
+ * @example prorata
6662
+ * @enum {string}
6663
+ */
6664
+ transition_calculation_method: "prorata" | "pay_in_full" | "none";
6665
+ /**
6666
+ * @description
6667
+ * Represents when the transition amount will be invoiced.
6668
+ *
6669
+ * - `immediately`: An invoice will be generated immediately with the corresponding amount.
6670
+ *
6671
+ * @default immediately
6672
+ * @example immediately
6673
+ * @enum {string}
6674
+ */
6675
+ transition_invoicing_schedule: "immediately";
6676
+ /** @description Products comprising the subscription phase. */
6311
6677
  products: {
6312
6678
  /**
6313
6679
  * @description Product ID.
@@ -6407,6 +6773,7 @@ export interface components {
6407
6773
  */
6408
6774
  bill_usage_difference: boolean | ("true" | "false");
6409
6775
  }[];
6776
+ /** @description Coupons comprising the subscription phase. */
6410
6777
  coupons?: (({
6411
6778
  /** @description Coupon ID. */
6412
6779
  id: string;
@@ -6440,113 +6807,7 @@ export interface components {
6440
6807
  /** @description Product IDs to which the coupon will be applied. */
6441
6808
  product_ids?: string[];
6442
6809
  })[];
6443
- /**
6444
- * @description
6445
- * Alignment of product billing cycles.
6446
- *
6447
- * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
6448
- * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
6449
- *
6450
- * @default anniversary
6451
- * @enum {string}
6452
- */
6453
- billing_cycle_alignment: "calendar_period" | "anniversary";
6454
- } & {
6455
- /**
6456
- * @description
6457
- * Activation strategy of subscription phase.
6458
- *
6459
- * - `immediately`: The phase starts as soon as the subscription is activated.
6460
- * - `manual`: The phase starts when a user manually activates it.
6461
- * - `start_date`: The phase starts on a specified date.
6462
- * - `quote_signature`: The phase starts when the subscription quote is signed.
6463
- * - `checkout`: The phase starts when the subscription checkout is completed.
6464
- * - `contract_start_date`: The phase starts on the start date of the related subscription contract.
6465
- * - `previous_phase_end`: The phase starts when the previous phase ends.
6466
- *
6467
- * @example manual
6468
- * @enum {string}
6469
- */
6470
- activation_strategy: "immediately" | "manual" | "start_date" | "quote_signature" | "checkout" | "contract_start_date" | "previous_phase_end";
6471
- /**
6472
- * @description
6473
- * End strategy of subscription phase.
6474
- *
6475
- * - `manual`: The phase ends when a user manually stops it.
6476
- * - `end_date`: The phase ends on a specified date.
6477
- * - `duration`: The phase ends after a specific relative duration.
6478
- * - `contract_end_date`: The phase ends on the end date of the related subscription contract.
6479
- *
6480
- * @example duration
6481
- * @enum {string}
6482
- */
6483
- end_strategy: "manual" | "end_date" | "duration" | "contract_end_date";
6484
- starts_at: components["schemas"]["DateTime"] & unknown;
6485
- ends_at: components["schemas"]["DateTime"] & unknown;
6486
- /**
6487
- * @description
6488
- * Represents when the first billing date occurs.
6489
- *
6490
- * - `phase_start`: Aligns with the start of the phase.
6491
- * - `specific_date`: Occurs on a specified date.
6492
- *
6493
- * @example phase_start
6494
- * @enum {string}
6495
- */
6496
- billing_date_setting: "phase_start" | "specific_date";
6497
- initial_billing_at: components["schemas"]["DateTime"] & unknown;
6498
- /**
6499
- * @description Interval over which the subscription phase spans. Only applies to `duration` end strategy.
6500
- * @example {
6501
- * "count": 1,
6502
- * "period": "years"
6503
- * }
6504
- */
6505
- duration: {
6506
- /** @enum {string} */
6507
- period: "days" | "weeks" | "months" | "years";
6508
- count: number;
6509
- } | null;
6510
- /**
6511
- * @description Order in which the phase is executed within all subscription phases.
6512
- * @example 0
6513
- */
6514
- order: number;
6515
- /**
6516
- * @description
6517
- * Calculation method used when transitioning from one phase to the next one.
6518
- *
6519
- * - `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.
6520
- * - `pay_in_full`: The full amount for the phase billing period must be paid.
6521
- * - `none`: No amount will need to be paid, phase will simply transition from one to the next.
6522
- *
6523
- * @example prorata
6524
- * @enum {string}
6525
- */
6526
- transition_calculation_method: "prorata" | "pay_in_full" | "none";
6527
- /**
6528
- * @description
6529
- * Represents when the transition amount will be invoiced.
6530
- *
6531
- * - `immediately`: An invoice will be generated immediately with the corresponding amount.
6532
- *
6533
- * @example immediately
6534
- * @enum {string}
6535
- */
6536
- transition_invoicing_schedule: "immediately";
6537
- /**
6538
- * @description
6539
- * Type of subscription phase.
6540
- *
6541
- * - `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.
6542
- * - `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.
6543
- * - `standard`: The phase represents a standard recurring billing.
6544
- *
6545
- * @example standard
6546
- * @enum {string}
6547
- */
6548
- type: "setup" | "trial" | "standard";
6549
- })[];
6810
+ }[];
6550
6811
  } | {
6551
6812
  /** @description Products that make up the subscription. */
6552
6813
  products?: {
@@ -6702,7 +6963,7 @@ export interface components {
6702
6963
  generate_draft_invoices: boolean | ("true" | "false");
6703
6964
  /**
6704
6965
  * @deprecated
6705
- * @description Use `contract_start` `contract_end` and `renew_automatically` instead. Interval previously used to represent the commitment period of the subscription.
6966
+ * @description Use `contract_terms` instead. Interval previously used to represent the commitment period of the subscription.
6706
6967
  * @example {
6707
6968
  * "period": "years",
6708
6969
  * "count": 1
@@ -6714,13 +6975,15 @@ export interface components {
6714
6975
  count: number;
6715
6976
  };
6716
6977
  /**
6717
- * @description Indicates if the subscription should automatically renew.
6978
+ * @deprecated
6979
+ * @description Use `contract_terms` instead. Indicates if the subscription should automatically renew.
6718
6980
  * @default true
6719
6981
  * @example true
6720
6982
  */
6721
6983
  renew_automatically: boolean | ("true" | "false");
6722
6984
  /**
6723
- * @description If `renew_automatically` is enabled, will renew the subscription for the given interval.
6985
+ * @deprecated
6986
+ * @description Use `contract_terms` instead. If `renew_automatically` is enabled, will renew the subscription for the given interval.
6724
6987
  * @example {
6725
6988
  * "period": "years",
6726
6989
  * "count": 1
@@ -6764,30 +7027,211 @@ export interface components {
6764
7027
  custom_properties?: {
6765
7028
  [key: string]: string | number | boolean | (components["schemas"]["DateTime"] & string) | null;
6766
7029
  };
7030
+ /** @description
7031
+ * Contract terms linked to the subscription.
7032
+ * */
7033
+ contract_terms?: {
7034
+ starts_at?: components["schemas"]["DateTime"] & string;
7035
+ ends_at?: components["schemas"]["DateTime"] & string;
7036
+ /**
7037
+ * @description Interval over which the contract initially spans. Only applies to `duration` end strategy.
7038
+ * @example {
7039
+ * "count": 6,
7040
+ * "period": "months"
7041
+ * }
7042
+ */
7043
+ duration?: {
7044
+ /** @enum {string} */
7045
+ period: "days" | "weeks" | "months" | "years";
7046
+ /** @default 1 */
7047
+ count: number;
7048
+ };
7049
+ /**
7050
+ * @description
7051
+ * Indicates if the contract should be renewed automatically.
7052
+ *
7053
+ * - `true`: The contract will be renewed automatically.
7054
+ * - `false`: The contract will not be renewed automatically.
7055
+ *
7056
+ * @example true
7057
+ */
7058
+ renew_automatically?: boolean | ("true" | "false");
7059
+ /**
7060
+ * @description
7061
+ * Interval over which the contract will be renewed. Only applies if `renew_automatically` is true.
7062
+ *
7063
+ * @example {
7064
+ * "count": 1,
7065
+ * "period": "years"
7066
+ * }
7067
+ */
7068
+ renew_for_duration?: {
7069
+ /** @enum {string} */
7070
+ period: "days" | "weeks" | "months" | "years";
7071
+ /** @default 1 */
7072
+ count: number;
7073
+ };
7074
+ } & {
7075
+ /**
7076
+ * @description
7077
+ * Activation strategy of the contract.
7078
+ *
7079
+ * - `immediately`: The contract will be activated immediately.
7080
+ * - `manual`: The contract will be activated when a user manually activates it.
7081
+ * - `start_date`: The contract will be activated on a specified date.
7082
+ * - `quote_signature`: The contract will be activated when the subscription quote is signed.
7083
+ * - `checkout`: The contract will be activated when the subscription checkout is completed.
7084
+ *
7085
+ * @example start_date
7086
+ * @enum {string}
7087
+ */
7088
+ activation_strategy: "start_date" | "immediately" | "manual" | "quote_signature" | "checkout";
7089
+ /**
7090
+ * @description
7091
+ * End strategy of contract.
7092
+ *
7093
+ * - `manual`: The contract ends when a user manually stops it.
7094
+ * - `end_date`: The contract ends on a specified date.
7095
+ * - `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.
7096
+ *
7097
+ * @example duration
7098
+ * @enum {string}
7099
+ */
7100
+ end_strategy: "end_date" | "duration" | "manual";
7101
+ };
6767
7102
  } & {
6768
7103
  /** @description Create a free trial phase based on the plan configuration. */
6769
7104
  trial?: {
6770
7105
  /**
6771
- * @description Defines how the free trial will end.
7106
+ * @description Defines how the free trial will end.
7107
+ * @enum {string}
7108
+ */
7109
+ end_strategy: "manual" | "end_date" | "duration";
7110
+ starts_at?: components["schemas"]["DateTime"] & string;
7111
+ ends_at?: components["schemas"]["DateTime"] & string;
7112
+ duration?: {
7113
+ /**
7114
+ * @description Free trial duration period. Only applies if the end strategy is `duration`.
7115
+ * @enum {string}
7116
+ */
7117
+ period: "days" | "weeks" | "months" | "years";
7118
+ /** @description Free trial duration count. Only applies if the end strategy is `duration`. */
7119
+ count: number;
7120
+ };
7121
+ };
7122
+ } & ({
7123
+ phases: {
7124
+ /**
7125
+ * @description
7126
+ * Type of subscription phase.
7127
+ *
7128
+ * - `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.
7129
+ * - `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.
7130
+ * - `standard`: The phase represents a standard recurring billing.
7131
+ *
7132
+ * @default standard
7133
+ * @example standard
7134
+ * @enum {string}
7135
+ */
7136
+ type: "setup" | "trial" | "standard";
7137
+ /**
7138
+ * @description Order in which the phase is executed within all subscription phases.
7139
+ * @example 0
7140
+ */
7141
+ order?: number;
7142
+ /**
7143
+ * @description
7144
+ * Activation strategy of subscription phase.
7145
+ *
7146
+ * - `immediately`: The phase starts as soon as the subscription is activated.
7147
+ * - `manual`: The phase starts when a user manually activates it.
7148
+ * - `start_date`: The phase starts on a specified date.
7149
+ * - `quote_signature`: The phase starts when the subscription quote is signed.
7150
+ * - `checkout`: The phase starts when the subscription checkout is completed.
7151
+ * - `contract_start_date`: The phase starts on the start date of the related subscription contract.
7152
+ * - `previous_phase_end`: The phase starts when the previous phase ends.
7153
+ *
7154
+ * @example manual
6772
7155
  * @enum {string}
6773
7156
  */
6774
- end_strategy: "manual" | "end_date" | "duration";
6775
- starts_at?: components["schemas"]["DateTime"] & string;
6776
- ends_at?: components["schemas"]["DateTime"] & string;
7157
+ activation_strategy: "immediately" | "manual" | "start_date" | "quote_signature" | "checkout" | "contract_start_date" | "previous_phase_end";
7158
+ /**
7159
+ * @description
7160
+ * End strategy of subscription phase.
7161
+ *
7162
+ * - `manual`: The phase ends when a user manually stops it.
7163
+ * - `end_date`: The phase ends on a specified date.
7164
+ * - `duration`: The phase ends after a specific relative duration.
7165
+ * - `contract_end_date`: The phase ends on the end date of the related subscription contract.
7166
+ *
7167
+ * @example duration
7168
+ * @enum {string}
7169
+ */
7170
+ end_strategy: "manual" | "end_date" | "duration" | "contract_end_date";
7171
+ /**
7172
+ * @description Interval over which the subscription phase spans. Only applies to `duration` end strategy.
7173
+ * @example {
7174
+ * "count": 1,
7175
+ * "period": "years"
7176
+ * }
7177
+ */
6777
7178
  duration?: {
6778
- /**
6779
- * @description Free trial duration period. Only applies if the end strategy is `duration`.
6780
- * @enum {string}
6781
- */
7179
+ /** @enum {string} */
6782
7180
  period: "days" | "weeks" | "months" | "years";
6783
- /** @description Free trial duration count. Only applies if the end strategy is `duration`. */
7181
+ /** @default 1 */
6784
7182
  count: number;
6785
7183
  };
6786
- };
6787
- } & ({
6788
- phases: ({
6789
- /** @enum {string} */
6790
- activation_strategy: "start_date" | "manual" | "checkout" | "contract_start_date" | "previous_phase_end" | "immediately" | "quote_signature";
7184
+ /**
7185
+ * @description
7186
+ * Represents when the first billing date occurs.
7187
+ *
7188
+ * - `phase_start`: Aligns with the start of the phase.
7189
+ * - `specific_date`: Occurs on a specified date.
7190
+ *
7191
+ * @example phase_start
7192
+ * @enum {string}
7193
+ */
7194
+ billing_date_setting: "phase_start" | "specific_date";
7195
+ initial_billing_at?: components["schemas"]["DateTime"] & string;
7196
+ starts_at?: components["schemas"]["DateTime"] & string;
7197
+ ends_at?: components["schemas"]["DateTime"] & string;
7198
+ /**
7199
+ * @description
7200
+ * Alignment of product billing cycles.
7201
+ *
7202
+ * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
7203
+ * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
7204
+ *
7205
+ * @default anniversary
7206
+ * @example anniversary
7207
+ * @enum {string}
7208
+ */
7209
+ billing_cycle_alignment: "calendar_period" | "anniversary";
7210
+ /**
7211
+ * @description
7212
+ * Calculation method used when transitioning from one phase to the next one.
7213
+ *
7214
+ * - `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.
7215
+ * - `pay_in_full`: The full amount for the phase billing period must be paid.
7216
+ * - `none`: No amount will need to be paid, phase will simply transition from one to the next.
7217
+ *
7218
+ * @default prorata
7219
+ * @example prorata
7220
+ * @enum {string}
7221
+ */
7222
+ transition_calculation_method: "prorata" | "pay_in_full" | "none";
7223
+ /**
7224
+ * @description
7225
+ * Represents when the transition amount will be invoiced.
7226
+ *
7227
+ * - `immediately`: An invoice will be generated immediately with the corresponding amount.
7228
+ *
7229
+ * @default immediately
7230
+ * @example immediately
7231
+ * @enum {string}
7232
+ */
7233
+ transition_invoicing_schedule: "immediately";
7234
+ /** @description Products comprising the subscription phase. */
6791
7235
  products: {
6792
7236
  /**
6793
7237
  * @description Product ID.
@@ -6887,6 +7331,7 @@ export interface components {
6887
7331
  */
6888
7332
  bill_usage_difference: boolean | ("true" | "false");
6889
7333
  }[];
7334
+ /** @description Coupons comprising the subscription phase. */
6890
7335
  coupons?: (({
6891
7336
  /** @description Coupon ID. */
6892
7337
  id: string;
@@ -6920,113 +7365,7 @@ export interface components {
6920
7365
  /** @description Product IDs to which the coupon will be applied. */
6921
7366
  product_ids?: string[];
6922
7367
  })[];
6923
- /**
6924
- * @description
6925
- * Alignment of product billing cycles.
6926
- *
6927
- * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
6928
- * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
6929
- *
6930
- * @default anniversary
6931
- * @enum {string}
6932
- */
6933
- billing_cycle_alignment: "calendar_period" | "anniversary";
6934
- } & {
6935
- /**
6936
- * @description
6937
- * Activation strategy of subscription phase.
6938
- *
6939
- * - `immediately`: The phase starts as soon as the subscription is activated.
6940
- * - `manual`: The phase starts when a user manually activates it.
6941
- * - `start_date`: The phase starts on a specified date.
6942
- * - `quote_signature`: The phase starts when the subscription quote is signed.
6943
- * - `checkout`: The phase starts when the subscription checkout is completed.
6944
- * - `contract_start_date`: The phase starts on the start date of the related subscription contract.
6945
- * - `previous_phase_end`: The phase starts when the previous phase ends.
6946
- *
6947
- * @example manual
6948
- * @enum {string}
6949
- */
6950
- activation_strategy: "immediately" | "manual" | "start_date" | "quote_signature" | "checkout" | "contract_start_date" | "previous_phase_end";
6951
- /**
6952
- * @description
6953
- * End strategy of subscription phase.
6954
- *
6955
- * - `manual`: The phase ends when a user manually stops it.
6956
- * - `end_date`: The phase ends on a specified date.
6957
- * - `duration`: The phase ends after a specific relative duration.
6958
- * - `contract_end_date`: The phase ends on the end date of the related subscription contract.
6959
- *
6960
- * @example duration
6961
- * @enum {string}
6962
- */
6963
- end_strategy: "manual" | "end_date" | "duration" | "contract_end_date";
6964
- starts_at: components["schemas"]["DateTime"] & unknown;
6965
- ends_at: components["schemas"]["DateTime"] & unknown;
6966
- /**
6967
- * @description
6968
- * Represents when the first billing date occurs.
6969
- *
6970
- * - `phase_start`: Aligns with the start of the phase.
6971
- * - `specific_date`: Occurs on a specified date.
6972
- *
6973
- * @example phase_start
6974
- * @enum {string}
6975
- */
6976
- billing_date_setting: "phase_start" | "specific_date";
6977
- initial_billing_at: components["schemas"]["DateTime"] & unknown;
6978
- /**
6979
- * @description Interval over which the subscription phase spans. Only applies to `duration` end strategy.
6980
- * @example {
6981
- * "count": 1,
6982
- * "period": "years"
6983
- * }
6984
- */
6985
- duration: {
6986
- /** @enum {string} */
6987
- period: "days" | "weeks" | "months" | "years";
6988
- count: number;
6989
- } | null;
6990
- /**
6991
- * @description Order in which the phase is executed within all subscription phases.
6992
- * @example 0
6993
- */
6994
- order: number;
6995
- /**
6996
- * @description
6997
- * Calculation method used when transitioning from one phase to the next one.
6998
- *
6999
- * - `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.
7000
- * - `pay_in_full`: The full amount for the phase billing period must be paid.
7001
- * - `none`: No amount will need to be paid, phase will simply transition from one to the next.
7002
- *
7003
- * @example prorata
7004
- * @enum {string}
7005
- */
7006
- transition_calculation_method: "prorata" | "pay_in_full" | "none";
7007
- /**
7008
- * @description
7009
- * Represents when the transition amount will be invoiced.
7010
- *
7011
- * - `immediately`: An invoice will be generated immediately with the corresponding amount.
7012
- *
7013
- * @example immediately
7014
- * @enum {string}
7015
- */
7016
- transition_invoicing_schedule: "immediately";
7017
- /**
7018
- * @description
7019
- * Type of subscription phase.
7020
- *
7021
- * - `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.
7022
- * - `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.
7023
- * - `standard`: The phase represents a standard recurring billing.
7024
- *
7025
- * @example standard
7026
- * @enum {string}
7027
- */
7028
- type: "setup" | "trial" | "standard";
7029
- })[];
7368
+ }[];
7030
7369
  } | {
7031
7370
  /** @description Products that make up the subscription. */
7032
7371
  products?: {
@@ -7795,7 +8134,7 @@ export interface components {
7795
8134
  minimum_invoice_fee: number | null;
7796
8135
  /**
7797
8136
  * @deprecated
7798
- * @description Use `contract_start` `contract_end` and `renew_automatically` instead. Interval previously used to represent the commitment period of the subscription.
8137
+ * @description Use `contract_terms` instead. Interval previously used to represent the commitment period of the subscription.
7799
8138
  * @example {
7800
8139
  * "period": "years",
7801
8140
  * "count": 1
@@ -7807,12 +8146,12 @@ export interface components {
7807
8146
  count: number;
7808
8147
  } | null;
7809
8148
  /**
7810
- * @description Indicates if the subscription should automatically renew.
8149
+ * @description Use `contract_terms` instead. Indicates if the subscription should automatically renew.
7811
8150
  * @example true
7812
8151
  */
7813
8152
  renew_automatically: boolean;
7814
8153
  /**
7815
- * @description If `renew_automatically` is enabled, will renew the subscription for the given interval.
8154
+ * @description Use `contract_terms` instead. If `renew_automatically` is enabled, will renew the subscription for the given interval.
7816
8155
  * @example {
7817
8156
  * "period": "years",
7818
8157
  * "count": 1
@@ -8217,6 +8556,8 @@ export interface components {
8217
8556
  * @example cou_DKL4Xcb5VSa8CQ
8218
8557
  */
8219
8558
  id: string | null;
8559
+ /** @description Promotion code ID if the coupon has been created from a promotion code. */
8560
+ promotion_code_id: string | null;
8220
8561
  /**
8221
8562
  * @description Coupon name.
8222
8563
  * @example Partner discount
@@ -8347,6 +8688,7 @@ export interface components {
8347
8688
  * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
8348
8689
  * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
8349
8690
  *
8691
+ * @example anniversary
8350
8692
  * @enum {string}
8351
8693
  */
8352
8694
  billing_cycle_alignment: "calendar_period" | "anniversary";
@@ -8406,6 +8748,8 @@ export interface components {
8406
8748
  * @example cou_DKL4Xcb5VSa8CQ
8407
8749
  */
8408
8750
  id: string | null;
8751
+ /** @description Promotion code ID if the coupon has been created from a promotion code. */
8752
+ promotion_code_id: string | null;
8409
8753
  /**
8410
8754
  * @description Coupon name.
8411
8755
  * @example Partner discount
@@ -8475,6 +8819,89 @@ export interface components {
8475
8819
  payment_method: components["schemas"]["PaymentMethod"] & unknown;
8476
8820
  /** @description Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent */
8477
8821
  generate_draft_invoices: boolean;
8822
+ /** @description
8823
+ * Contract terms linked to the subscription.
8824
+ * */
8825
+ contract_terms: {
8826
+ /**
8827
+ * @description
8828
+ * Contract status.
8829
+ *
8830
+ * - `active`: The contract is active.
8831
+ * - `pending`: The contract is pending. It will be activated according to the activation strategy.
8832
+ * - `finished`: The contract has ended.
8833
+ *
8834
+ * @example active
8835
+ * @enum {string}
8836
+ */
8837
+ status: "active" | "pending" | "finished";
8838
+ /**
8839
+ * @description
8840
+ * Activation strategy of the contract.
8841
+ *
8842
+ * - `immediately`: The contract will be activated immediately.
8843
+ * - `manual`: The contract will be activated when a user manually activates it.
8844
+ * - `start_date`: The contract will be activated on a specified date.
8845
+ * - `quote_signature`: The contract will be activated when the subscription quote is signed.
8846
+ * - `checkout`: The contract will be activated when the subscription checkout is completed.
8847
+ *
8848
+ * @example start_date
8849
+ * @enum {string}
8850
+ */
8851
+ activation_strategy: "start_date" | "immediately" | "manual" | "quote_signature" | "checkout";
8852
+ /**
8853
+ * @description
8854
+ * End strategy of contract.
8855
+ *
8856
+ * - `manual`: The contract ends when a user manually stops it.
8857
+ * - `end_date`: The contract ends on a specified date.
8858
+ * - `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.
8859
+ *
8860
+ * @example duration
8861
+ * @enum {string}
8862
+ */
8863
+ end_strategy: "end_date" | "duration" | "manual";
8864
+ starts_at: components["schemas"]["DateTime"] & unknown;
8865
+ ends_at: components["schemas"]["DateTime"] & unknown;
8866
+ /**
8867
+ * @description Interval over which the contract initially spans. Only applies to `duration` end strategy.
8868
+ * @example {
8869
+ * "count": 6,
8870
+ * "period": "months"
8871
+ * }
8872
+ */
8873
+ duration: {
8874
+ /** @enum {string} */
8875
+ period: "days" | "weeks" | "months" | "years";
8876
+ count: number;
8877
+ } | null;
8878
+ /**
8879
+ * @description
8880
+ * Indicates if the contract should be renewed automatically.
8881
+ *
8882
+ * - `true`: The contract will be renewed automatically.
8883
+ * - `false`: The contract will not be renewed automatically.
8884
+ *
8885
+ * @example true
8886
+ */
8887
+ renew_automatically: boolean | ("true" | "false");
8888
+ /**
8889
+ * @description
8890
+ * Interval over which the contract will be renewed. Only applies if `renew_automatically` is true.
8891
+ *
8892
+ * @example {
8893
+ * "count": 1,
8894
+ * "period": "years"
8895
+ * }
8896
+ */
8897
+ renew_for_duration: {
8898
+ /** @enum {string} */
8899
+ period: "days" | "weeks" | "months" | "years";
8900
+ count: number;
8901
+ } | null;
8902
+ current_period_started_at: components["schemas"]["DateTime"] & unknown;
8903
+ current_period_ends_at: components["schemas"]["DateTime"] & unknown;
8904
+ } | null;
8478
8905
  };
8479
8906
  CancelSubscription: {
8480
8907
  cancel_at?: components["schemas"]["DateTime"] & string;
@@ -8498,7 +8925,7 @@ export interface components {
8498
8925
  generate_draft_invoices: boolean | ("true" | "false");
8499
8926
  /**
8500
8927
  * @deprecated
8501
- * @description Use `contract_start` `contract_end` and `renew_automatically` instead. Interval previously used to represent the commitment period of the subscription.
8928
+ * @description Use `contract_terms` instead. Interval previously used to represent the commitment period of the subscription.
8502
8929
  * @example {
8503
8930
  * "period": "years",
8504
8931
  * "count": 1
@@ -8510,13 +8937,15 @@ export interface components {
8510
8937
  count: number;
8511
8938
  };
8512
8939
  /**
8513
- * @description Indicates if the subscription should automatically renew.
8940
+ * @deprecated
8941
+ * @description Use `contract_terms` instead. Indicates if the subscription should automatically renew.
8514
8942
  * @default true
8515
8943
  * @example true
8516
8944
  */
8517
8945
  renew_automatically: boolean | ("true" | "false");
8518
8946
  /**
8519
- * @description If `renew_automatically` is enabled, will renew the subscription for the given interval.
8947
+ * @deprecated
8948
+ * @description Use `contract_terms` instead. If `renew_automatically` is enabled, will renew the subscription for the given interval.
8520
8949
  * @example {
8521
8950
  * "period": "years",
8522
8951
  * "count": 1
@@ -8560,6 +8989,78 @@ export interface components {
8560
8989
  custom_properties?: {
8561
8990
  [key: string]: string | number | boolean | (components["schemas"]["DateTime"] & string) | null;
8562
8991
  };
8992
+ /** @description
8993
+ * Contract terms linked to the subscription.
8994
+ * */
8995
+ contract_terms?: {
8996
+ starts_at?: components["schemas"]["DateTime"] & string;
8997
+ ends_at?: components["schemas"]["DateTime"] & string;
8998
+ /**
8999
+ * @description Interval over which the contract initially spans. Only applies to `duration` end strategy.
9000
+ * @example {
9001
+ * "count": 6,
9002
+ * "period": "months"
9003
+ * }
9004
+ */
9005
+ duration?: {
9006
+ /** @enum {string} */
9007
+ period: "days" | "weeks" | "months" | "years";
9008
+ /** @default 1 */
9009
+ count: number;
9010
+ };
9011
+ /**
9012
+ * @description
9013
+ * Indicates if the contract should be renewed automatically.
9014
+ *
9015
+ * - `true`: The contract will be renewed automatically.
9016
+ * - `false`: The contract will not be renewed automatically.
9017
+ *
9018
+ * @example true
9019
+ */
9020
+ renew_automatically?: boolean | ("true" | "false");
9021
+ /**
9022
+ * @description
9023
+ * Interval over which the contract will be renewed. Only applies if `renew_automatically` is true.
9024
+ *
9025
+ * @example {
9026
+ * "count": 1,
9027
+ * "period": "years"
9028
+ * }
9029
+ */
9030
+ renew_for_duration?: {
9031
+ /** @enum {string} */
9032
+ period: "days" | "weeks" | "months" | "years";
9033
+ /** @default 1 */
9034
+ count: number;
9035
+ };
9036
+ } & {
9037
+ /**
9038
+ * @description
9039
+ * Activation strategy of the contract.
9040
+ *
9041
+ * - `immediately`: The contract will be activated immediately.
9042
+ * - `manual`: The contract will be activated when a user manually activates it.
9043
+ * - `start_date`: The contract will be activated on a specified date.
9044
+ * - `quote_signature`: The contract will be activated when the subscription quote is signed.
9045
+ * - `checkout`: The contract will be activated when the subscription checkout is completed.
9046
+ *
9047
+ * @example start_date
9048
+ * @enum {string}
9049
+ */
9050
+ activation_strategy: "start_date" | "immediately" | "manual" | "quote_signature" | "checkout";
9051
+ /**
9052
+ * @description
9053
+ * End strategy of contract.
9054
+ *
9055
+ * - `manual`: The contract ends when a user manually stops it.
9056
+ * - `end_date`: The contract ends on a specified date.
9057
+ * - `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.
9058
+ *
9059
+ * @example duration
9060
+ * @enum {string}
9061
+ */
9062
+ end_strategy: "end_date" | "duration" | "manual";
9063
+ };
8563
9064
  } & ({
8564
9065
  /**
8565
9066
  * @description
@@ -8708,9 +9209,118 @@ export interface components {
8708
9209
  product_ids?: string[];
8709
9210
  })[];
8710
9211
  } | {
8711
- phases: ({
8712
- /** @enum {string} */
8713
- activation_strategy: "start_date" | "manual" | "checkout" | "contract_start_date" | "previous_phase_end" | "immediately" | "quote_signature";
9212
+ phases: {
9213
+ /**
9214
+ * @description
9215
+ * Type of subscription phase.
9216
+ *
9217
+ * - `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.
9218
+ * - `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.
9219
+ * - `standard`: The phase represents a standard recurring billing.
9220
+ *
9221
+ * @default standard
9222
+ * @example standard
9223
+ * @enum {string}
9224
+ */
9225
+ type: "setup" | "trial" | "standard";
9226
+ /**
9227
+ * @description Order in which the phase is executed within all subscription phases.
9228
+ * @example 0
9229
+ */
9230
+ order?: number;
9231
+ /**
9232
+ * @description
9233
+ * Activation strategy of subscription phase.
9234
+ *
9235
+ * - `immediately`: The phase starts as soon as the subscription is activated.
9236
+ * - `manual`: The phase starts when a user manually activates it.
9237
+ * - `start_date`: The phase starts on a specified date.
9238
+ * - `quote_signature`: The phase starts when the subscription quote is signed.
9239
+ * - `checkout`: The phase starts when the subscription checkout is completed.
9240
+ * - `contract_start_date`: The phase starts on the start date of the related subscription contract.
9241
+ * - `previous_phase_end`: The phase starts when the previous phase ends.
9242
+ *
9243
+ * @example manual
9244
+ * @enum {string}
9245
+ */
9246
+ activation_strategy: "immediately" | "manual" | "start_date" | "quote_signature" | "checkout" | "contract_start_date" | "previous_phase_end";
9247
+ /**
9248
+ * @description
9249
+ * End strategy of subscription phase.
9250
+ *
9251
+ * - `manual`: The phase ends when a user manually stops it.
9252
+ * - `end_date`: The phase ends on a specified date.
9253
+ * - `duration`: The phase ends after a specific relative duration.
9254
+ * - `contract_end_date`: The phase ends on the end date of the related subscription contract.
9255
+ *
9256
+ * @example duration
9257
+ * @enum {string}
9258
+ */
9259
+ end_strategy: "manual" | "end_date" | "duration" | "contract_end_date";
9260
+ /**
9261
+ * @description Interval over which the subscription phase spans. Only applies to `duration` end strategy.
9262
+ * @example {
9263
+ * "count": 1,
9264
+ * "period": "years"
9265
+ * }
9266
+ */
9267
+ duration?: {
9268
+ /** @enum {string} */
9269
+ period: "days" | "weeks" | "months" | "years";
9270
+ /** @default 1 */
9271
+ count: number;
9272
+ };
9273
+ /**
9274
+ * @description
9275
+ * Represents when the first billing date occurs.
9276
+ *
9277
+ * - `phase_start`: Aligns with the start of the phase.
9278
+ * - `specific_date`: Occurs on a specified date.
9279
+ *
9280
+ * @example phase_start
9281
+ * @enum {string}
9282
+ */
9283
+ billing_date_setting: "phase_start" | "specific_date";
9284
+ initial_billing_at?: components["schemas"]["DateTime"] & string;
9285
+ starts_at?: components["schemas"]["DateTime"] & string;
9286
+ ends_at?: components["schemas"]["DateTime"] & string;
9287
+ /**
9288
+ * @description
9289
+ * Alignment of product billing cycles.
9290
+ *
9291
+ * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
9292
+ * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
9293
+ *
9294
+ * @default anniversary
9295
+ * @example anniversary
9296
+ * @enum {string}
9297
+ */
9298
+ billing_cycle_alignment: "calendar_period" | "anniversary";
9299
+ /**
9300
+ * @description
9301
+ * Calculation method used when transitioning from one phase to the next one.
9302
+ *
9303
+ * - `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.
9304
+ * - `pay_in_full`: The full amount for the phase billing period must be paid.
9305
+ * - `none`: No amount will need to be paid, phase will simply transition from one to the next.
9306
+ *
9307
+ * @default prorata
9308
+ * @example prorata
9309
+ * @enum {string}
9310
+ */
9311
+ transition_calculation_method: "prorata" | "pay_in_full" | "none";
9312
+ /**
9313
+ * @description
9314
+ * Represents when the transition amount will be invoiced.
9315
+ *
9316
+ * - `immediately`: An invoice will be generated immediately with the corresponding amount.
9317
+ *
9318
+ * @default immediately
9319
+ * @example immediately
9320
+ * @enum {string}
9321
+ */
9322
+ transition_invoicing_schedule: "immediately";
9323
+ /** @description Products comprising the subscription phase. */
8714
9324
  products: {
8715
9325
  /**
8716
9326
  * @description Product ID.
@@ -8802,154 +9412,49 @@ export interface components {
8802
9412
  * - `full_database`: For all the usage we ingested for this product, no matter the period.
8803
9413
  * Only applies to products of type `usage`.
8804
9414
  * @enum {string}
8805
- */
8806
- metering_interval_type?: "subscription_commitment" | "payment_interval" | "full_database";
8807
- /**
8808
- * @description Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`.
8809
- * @default false
8810
- */
8811
- bill_usage_difference: boolean | ("true" | "false");
8812
- }[];
8813
- coupons?: (({
8814
- /** @description Coupon ID. */
8815
- id: string;
8816
- } | {
8817
- /** @enum {string} */
8818
- type: "amount";
8819
- /** @description Coupon name. */
8820
- name?: string;
8821
- discount_amount: components["schemas"]["Amount"] & unknown;
8822
- } | {
8823
- /** @enum {string} */
8824
- type: "percent";
8825
- /** @description Coupon name. */
8826
- name?: string;
8827
- /** @description Coupon discount percentage. */
8828
- discount_percent: number;
8829
- }) & {
8830
- /**
8831
- * @description
8832
- * Coupon frequency.
8833
- *
8834
- * - `once`: Will apply the coupon only to the first one invoice.
8835
- * - `forever`: Will apply the coupon to all invoices.
8836
- * - `custom`: Will apply to coupon until a specified expiration date.
8837
- *
8838
- * @enum {string}
8839
- */
8840
- repeat: "once" | "forever" | "custom";
8841
- expires_at?: components["schemas"]["DateTime"] & string;
8842
- apply_at?: components["schemas"]["DateTime"] & string;
8843
- /** @description Product IDs to which the coupon will be applied. */
8844
- product_ids?: string[];
8845
- })[];
8846
- /**
8847
- * @description
8848
- * Alignment of product billing cycles.
8849
- *
8850
- * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
8851
- * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
8852
- *
8853
- * @default anniversary
8854
- * @enum {string}
8855
- */
8856
- billing_cycle_alignment: "calendar_period" | "anniversary";
8857
- } & {
8858
- /**
8859
- * @description
8860
- * Activation strategy of subscription phase.
8861
- *
8862
- * - `immediately`: The phase starts as soon as the subscription is activated.
8863
- * - `manual`: The phase starts when a user manually activates it.
8864
- * - `start_date`: The phase starts on a specified date.
8865
- * - `quote_signature`: The phase starts when the subscription quote is signed.
8866
- * - `checkout`: The phase starts when the subscription checkout is completed.
8867
- * - `contract_start_date`: The phase starts on the start date of the related subscription contract.
8868
- * - `previous_phase_end`: The phase starts when the previous phase ends.
8869
- *
8870
- * @example manual
8871
- * @enum {string}
8872
- */
8873
- activation_strategy: "immediately" | "manual" | "start_date" | "quote_signature" | "checkout" | "contract_start_date" | "previous_phase_end";
8874
- /**
8875
- * @description
8876
- * End strategy of subscription phase.
8877
- *
8878
- * - `manual`: The phase ends when a user manually stops it.
8879
- * - `end_date`: The phase ends on a specified date.
8880
- * - `duration`: The phase ends after a specific relative duration.
8881
- * - `contract_end_date`: The phase ends on the end date of the related subscription contract.
8882
- *
8883
- * @example duration
8884
- * @enum {string}
8885
- */
8886
- end_strategy: "manual" | "end_date" | "duration" | "contract_end_date";
8887
- starts_at: components["schemas"]["DateTime"] & unknown;
8888
- ends_at: components["schemas"]["DateTime"] & unknown;
8889
- /**
8890
- * @description
8891
- * Represents when the first billing date occurs.
8892
- *
8893
- * - `phase_start`: Aligns with the start of the phase.
8894
- * - `specific_date`: Occurs on a specified date.
8895
- *
8896
- * @example phase_start
8897
- * @enum {string}
8898
- */
8899
- billing_date_setting: "phase_start" | "specific_date";
8900
- initial_billing_at: components["schemas"]["DateTime"] & unknown;
8901
- /**
8902
- * @description Interval over which the subscription phase spans. Only applies to `duration` end strategy.
8903
- * @example {
8904
- * "count": 1,
8905
- * "period": "years"
8906
- * }
8907
- */
8908
- duration: {
9415
+ */
9416
+ metering_interval_type?: "subscription_commitment" | "payment_interval" | "full_database";
9417
+ /**
9418
+ * @description Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`.
9419
+ * @default false
9420
+ */
9421
+ bill_usage_difference: boolean | ("true" | "false");
9422
+ }[];
9423
+ /** @description Coupons comprising the subscription phase. */
9424
+ coupons?: (({
9425
+ /** @description Coupon ID. */
9426
+ id: string;
9427
+ } | {
8909
9428
  /** @enum {string} */
8910
- period: "days" | "weeks" | "months" | "years";
8911
- count: number;
8912
- } | null;
8913
- /**
8914
- * @description Order in which the phase is executed within all subscription phases.
8915
- * @example 0
8916
- */
8917
- order: number;
8918
- /**
8919
- * @description
8920
- * Calculation method used when transitioning from one phase to the next one.
8921
- *
8922
- * - `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.
8923
- * - `pay_in_full`: The full amount for the phase billing period must be paid.
8924
- * - `none`: No amount will need to be paid, phase will simply transition from one to the next.
8925
- *
8926
- * @example prorata
8927
- * @enum {string}
8928
- */
8929
- transition_calculation_method: "prorata" | "pay_in_full" | "none";
8930
- /**
8931
- * @description
8932
- * Represents when the transition amount will be invoiced.
8933
- *
8934
- * - `immediately`: An invoice will be generated immediately with the corresponding amount.
8935
- *
8936
- * @example immediately
8937
- * @enum {string}
8938
- */
8939
- transition_invoicing_schedule: "immediately";
8940
- /**
8941
- * @description
8942
- * Type of subscription phase.
8943
- *
8944
- * - `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.
8945
- * - `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.
8946
- * - `standard`: The phase represents a standard recurring billing.
8947
- *
8948
- * @example standard
8949
- * @enum {string}
8950
- */
8951
- type: "setup" | "trial" | "standard";
8952
- })[];
9429
+ type: "amount";
9430
+ /** @description Coupon name. */
9431
+ name?: string;
9432
+ discount_amount: components["schemas"]["Amount"] & unknown;
9433
+ } | {
9434
+ /** @enum {string} */
9435
+ type: "percent";
9436
+ /** @description Coupon name. */
9437
+ name?: string;
9438
+ /** @description Coupon discount percentage. */
9439
+ discount_percent: number;
9440
+ }) & {
9441
+ /**
9442
+ * @description
9443
+ * Coupon frequency.
9444
+ *
9445
+ * - `once`: Will apply the coupon only to the first one invoice.
9446
+ * - `forever`: Will apply the coupon to all invoices.
9447
+ * - `custom`: Will apply to coupon until a specified expiration date.
9448
+ *
9449
+ * @enum {string}
9450
+ */
9451
+ repeat: "once" | "forever" | "custom";
9452
+ expires_at?: components["schemas"]["DateTime"] & string;
9453
+ apply_at?: components["schemas"]["DateTime"] & string;
9454
+ /** @description Product IDs to which the coupon will be applied. */
9455
+ product_ids?: string[];
9456
+ })[];
9457
+ }[];
8953
9458
  }) & {
8954
9459
  /**
8955
9460
  * @description ID of the customer.
@@ -9186,6 +9691,7 @@ export interface components {
9186
9691
  * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
9187
9692
  * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
9188
9693
  *
9694
+ * @example anniversary
9189
9695
  * @enum {string}
9190
9696
  */
9191
9697
  billing_cycle_alignment: "calendar_period" | "anniversary";
@@ -9245,6 +9751,8 @@ export interface components {
9245
9751
  * @example cou_DKL4Xcb5VSa8CQ
9246
9752
  */
9247
9753
  id: string | null;
9754
+ /** @description Promotion code ID if the coupon has been created from a promotion code. */
9755
+ promotion_code_id: string | null;
9248
9756
  /**
9249
9757
  * @description Coupon name.
9250
9758
  * @example Partner discount
@@ -9830,6 +10338,7 @@ export interface operations {
9830
10338
  search?: string;
9831
10339
  category?: ("refund" | "subscription" | "otp") | string;
9832
10340
  category__in?: ("refund" | "subscription" | "otp") | string;
10341
+ clientProviderId?: string;
9833
10342
  customer_external_id?: string;
9834
10343
  };
9835
10344
  header?: never;
@@ -10516,18 +11025,293 @@ export interface operations {
10516
11025
  };
10517
11026
  };
10518
11027
  responses: {
10519
- /** @description The newly created coupon */
11028
+ /** @description The newly created coupon */
11029
+ 201: {
11030
+ headers: {
11031
+ [name: string]: unknown;
11032
+ };
11033
+ content: {
11034
+ "application/json": components["schemas"]["Coupon"];
11035
+ };
11036
+ };
11037
+ };
11038
+ };
11039
+ getCoupon: {
11040
+ parameters: {
11041
+ query?: never;
11042
+ header?: never;
11043
+ path: {
11044
+ id: string;
11045
+ };
11046
+ cookie?: never;
11047
+ };
11048
+ requestBody?: never;
11049
+ responses: {
11050
+ 200: {
11051
+ headers: {
11052
+ [name: string]: unknown;
11053
+ };
11054
+ content: {
11055
+ "application/json": components["schemas"]["Coupon"] & {
11056
+ deletedAt: components["schemas"]["DateTime"] & unknown;
11057
+ };
11058
+ };
11059
+ };
11060
+ /** @description Coupon not found */
11061
+ 404: {
11062
+ headers: {
11063
+ [name: string]: unknown;
11064
+ };
11065
+ content: {
11066
+ "application/json": {
11067
+ message: string;
11068
+ };
11069
+ };
11070
+ };
11071
+ };
11072
+ };
11073
+ updateCoupon: {
11074
+ parameters: {
11075
+ query?: never;
11076
+ header?: never;
11077
+ path: {
11078
+ id: string;
11079
+ };
11080
+ cookie?: never;
11081
+ };
11082
+ requestBody?: {
11083
+ content: {
11084
+ "application/json": components["schemas"]["UpdateCoupon"];
11085
+ };
11086
+ };
11087
+ responses: {
11088
+ 200: {
11089
+ headers: {
11090
+ [name: string]: unknown;
11091
+ };
11092
+ content: {
11093
+ "application/json": components["schemas"]["Coupon"];
11094
+ };
11095
+ };
11096
+ /** @description Coupon not found */
11097
+ 404: {
11098
+ headers: {
11099
+ [name: string]: unknown;
11100
+ };
11101
+ content: {
11102
+ "application/json": {
11103
+ message: string;
11104
+ };
11105
+ };
11106
+ };
11107
+ };
11108
+ };
11109
+ deleteCoupon: {
11110
+ parameters: {
11111
+ query?: never;
11112
+ header?: never;
11113
+ path: {
11114
+ id: string;
11115
+ };
11116
+ cookie?: never;
11117
+ };
11118
+ requestBody?: never;
11119
+ responses: {
11120
+ /** @description Customer deleted */
11121
+ 204: {
11122
+ headers: {
11123
+ [name: string]: unknown;
11124
+ };
11125
+ content?: never;
11126
+ };
11127
+ /** @description Coupon not found */
11128
+ 404: {
11129
+ headers: {
11130
+ [name: string]: unknown;
11131
+ };
11132
+ content: {
11133
+ "application/json": {
11134
+ message: string;
11135
+ };
11136
+ };
11137
+ };
11138
+ };
11139
+ };
11140
+ getPromotionCodes: {
11141
+ parameters: {
11142
+ query?: {
11143
+ take?: number;
11144
+ skip?: number | null;
11145
+ coupon_id?: string;
11146
+ coupon_id__not?: string;
11147
+ coupon_id__isNull?: string;
11148
+ coupon_id__isNotNull?: string;
11149
+ coupon_id__equals?: string;
11150
+ coupon_id__contains?: string;
11151
+ coupon_id__startsWith?: string;
11152
+ coupon_id__endWith?: string;
11153
+ };
11154
+ header?: never;
11155
+ path?: never;
11156
+ cookie?: never;
11157
+ };
11158
+ requestBody?: never;
11159
+ responses: {
11160
+ 200: {
11161
+ headers: {
11162
+ [name: string]: unknown;
11163
+ };
11164
+ content: {
11165
+ "application/json": components["schemas"]["PaginatedPromotionCode"];
11166
+ };
11167
+ };
11168
+ };
11169
+ };
11170
+ createPromotionCode: {
11171
+ parameters: {
11172
+ query?: never;
11173
+ header?: never;
11174
+ path?: never;
11175
+ cookie?: never;
11176
+ };
11177
+ /** @description Create promotion code payload */
11178
+ requestBody?: {
11179
+ content: {
11180
+ "application/json": {
11181
+ /**
11182
+ * @description Promotion code.
11183
+ * @example PROMO123
11184
+ */
11185
+ code: string;
11186
+ /**
11187
+ * @description Coupon ID.
11188
+ * @example cou_DKL4Xcb5VSa8CQ
11189
+ */
11190
+ coupon_id: string;
11191
+ /**
11192
+ * @description If a `customer_id` is set, this promotion code will only be available to this customer.
11193
+ * @example cus_DKL4Xcb5VSa8CQ
11194
+ */
11195
+ customer_id?: string | null;
11196
+ /**
11197
+ * @description If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.
11198
+ * @example plan_DKL4Xcb5VSa8CQ
11199
+ */
11200
+ plan_id?: string | null;
11201
+ /**
11202
+ * @description If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.
11203
+ * @example itm_DKL4Xcb5VSa8CQ
11204
+ */
11205
+ product_id?: string | null;
11206
+ expires_at?: components["schemas"]["DateTime"] & unknown;
11207
+ /**
11208
+ * @description Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.
11209
+ * @example 10
11210
+ */
11211
+ max_redemptions?: number | null;
11212
+ /**
11213
+ * @description Current number of redemptions for the promotion code.
11214
+ * @example 0
11215
+ */
11216
+ current_redemptions?: number | null;
11217
+ /**
11218
+ * @description Duration count applied to the subscription for the promotion code. 0 or null for `once`
11219
+ * @example 1
11220
+ */
11221
+ duration_count?: number | null;
11222
+ /**
11223
+ * @description Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`
11224
+ * @example months
11225
+ * @enum {string|null}
11226
+ */
11227
+ duration_period?: "once" | "days" | "weeks" | "months" | "years" | null;
11228
+ /**
11229
+ * @description Whether the promotion code is only for first time orders. Defaults to `false`
11230
+ * @default false
11231
+ * @example false
11232
+ */
11233
+ only_for_first_time_order?: boolean | null;
11234
+ };
11235
+ };
11236
+ };
11237
+ responses: {
11238
+ /** @description The newly created promotion code */
10520
11239
  201: {
10521
11240
  headers: {
10522
11241
  [name: string]: unknown;
10523
11242
  };
10524
11243
  content: {
10525
- "application/json": components["schemas"]["Coupon"];
11244
+ "application/json": {
11245
+ /**
11246
+ * @description Promotion code ID.
11247
+ * @example promo_DKL4Xcb5VSa8CQ
11248
+ */
11249
+ id: string;
11250
+ /**
11251
+ * @description Promotion code.
11252
+ * @example PROMO123
11253
+ */
11254
+ code: string;
11255
+ /**
11256
+ * @description Coupon ID.
11257
+ * @example cou_DKL4Xcb5VSa8CQ
11258
+ */
11259
+ coupon_id: string;
11260
+ /**
11261
+ * @description Client ID.
11262
+ * @example cli_DKL4Xcb5VSa8CQ
11263
+ */
11264
+ client_id: string;
11265
+ /**
11266
+ * @description If a `customer_id` is set, this promotion code will only be available to this customer.
11267
+ * @example cus_DKL4Xcb5VSa8CQ
11268
+ */
11269
+ customer_id: string | null;
11270
+ /**
11271
+ * @description If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.
11272
+ * @example plan_DKL4Xcb5VSa8CQ
11273
+ */
11274
+ plan_id: string | null;
11275
+ /**
11276
+ * @description If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.
11277
+ * @example itm_DKL4Xcb5VSa8CQ
11278
+ */
11279
+ product_id: string | null;
11280
+ created_at: components["schemas"]["DateTime"] & string;
11281
+ updated_at: components["schemas"]["DateTime"] & string;
11282
+ expires_at: components["schemas"]["DateTime"] & unknown;
11283
+ /**
11284
+ * @description Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.
11285
+ * @example 10
11286
+ */
11287
+ max_redemptions: number | null;
11288
+ /**
11289
+ * @description Current number of redemptions for the promotion code.
11290
+ * @example 0
11291
+ */
11292
+ current_redemptions: number | null;
11293
+ /**
11294
+ * @description Duration count applied to the subscription for the promotion code. 0 or null for `once`
11295
+ * @example 1
11296
+ */
11297
+ duration_count: number | null;
11298
+ /**
11299
+ * @description Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`
11300
+ * @example months
11301
+ * @enum {string|null}
11302
+ */
11303
+ duration_period: "once" | "days" | "weeks" | "months" | "years" | null;
11304
+ /**
11305
+ * @description Whether the promotion code is only for first time orders. Defaults to `false`
11306
+ * @example false
11307
+ */
11308
+ only_for_first_time_order: boolean | null;
11309
+ };
10526
11310
  };
10527
11311
  };
10528
11312
  };
10529
11313
  };
10530
- getCoupon: {
11314
+ getPromotionCode: {
10531
11315
  parameters: {
10532
11316
  query?: never;
10533
11317
  header?: never;
@@ -10543,12 +11327,75 @@ export interface operations {
10543
11327
  [name: string]: unknown;
10544
11328
  };
10545
11329
  content: {
10546
- "application/json": components["schemas"]["Coupon"] & {
10547
- deletedAt: components["schemas"]["DateTime"] & unknown;
11330
+ "application/json": {
11331
+ /**
11332
+ * @description Promotion code ID.
11333
+ * @example promo_DKL4Xcb5VSa8CQ
11334
+ */
11335
+ id: string;
11336
+ /**
11337
+ * @description Promotion code.
11338
+ * @example PROMO123
11339
+ */
11340
+ code: string;
11341
+ /**
11342
+ * @description Coupon ID.
11343
+ * @example cou_DKL4Xcb5VSa8CQ
11344
+ */
11345
+ coupon_id: string;
11346
+ /**
11347
+ * @description Client ID.
11348
+ * @example cli_DKL4Xcb5VSa8CQ
11349
+ */
11350
+ client_id: string;
11351
+ /**
11352
+ * @description If a `customer_id` is set, this promotion code will only be available to this customer.
11353
+ * @example cus_DKL4Xcb5VSa8CQ
11354
+ */
11355
+ customer_id: string | null;
11356
+ /**
11357
+ * @description If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.
11358
+ * @example plan_DKL4Xcb5VSa8CQ
11359
+ */
11360
+ plan_id: string | null;
11361
+ /**
11362
+ * @description If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.
11363
+ * @example itm_DKL4Xcb5VSa8CQ
11364
+ */
11365
+ product_id: string | null;
11366
+ created_at: components["schemas"]["DateTime"] & string;
11367
+ updated_at: components["schemas"]["DateTime"] & string;
11368
+ expires_at: components["schemas"]["DateTime"] & unknown;
11369
+ /**
11370
+ * @description Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.
11371
+ * @example 10
11372
+ */
11373
+ max_redemptions: number | null;
11374
+ /**
11375
+ * @description Current number of redemptions for the promotion code.
11376
+ * @example 0
11377
+ */
11378
+ current_redemptions: number | null;
11379
+ /**
11380
+ * @description Duration count applied to the subscription for the promotion code. 0 or null for `once`
11381
+ * @example 1
11382
+ */
11383
+ duration_count: number | null;
11384
+ /**
11385
+ * @description Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`
11386
+ * @example months
11387
+ * @enum {string|null}
11388
+ */
11389
+ duration_period: "once" | "days" | "weeks" | "months" | "years" | null;
11390
+ /**
11391
+ * @description Whether the promotion code is only for first time orders. Defaults to `false`
11392
+ * @example false
11393
+ */
11394
+ only_for_first_time_order: boolean | null;
10548
11395
  };
10549
11396
  };
10550
11397
  };
10551
- /** @description Coupon not found */
11398
+ /** @description Promotion code not found */
10552
11399
  404: {
10553
11400
  headers: {
10554
11401
  [name: string]: unknown;
@@ -10561,7 +11408,7 @@ export interface operations {
10561
11408
  };
10562
11409
  };
10563
11410
  };
10564
- updateCoupon: {
11411
+ deletePromotionCode: {
10565
11412
  parameters: {
10566
11413
  query?: never;
10567
11414
  header?: never;
@@ -10570,21 +11417,16 @@ export interface operations {
10570
11417
  };
10571
11418
  cookie?: never;
10572
11419
  };
10573
- requestBody?: {
10574
- content: {
10575
- "application/json": components["schemas"]["UpdateCoupon"];
10576
- };
10577
- };
11420
+ requestBody?: never;
10578
11421
  responses: {
10579
- 200: {
11422
+ /** @description Promotion code deleted */
11423
+ 204: {
10580
11424
  headers: {
10581
11425
  [name: string]: unknown;
10582
11426
  };
10583
- content: {
10584
- "application/json": components["schemas"]["Coupon"];
10585
- };
11427
+ content?: never;
10586
11428
  };
10587
- /** @description Coupon not found */
11429
+ /** @description Promotion code not found */
10588
11430
  404: {
10589
11431
  headers: {
10590
11432
  [name: string]: unknown;
@@ -10597,7 +11439,7 @@ export interface operations {
10597
11439
  };
10598
11440
  };
10599
11441
  };
10600
- deleteCoupon: {
11442
+ updatePromotionCode: {
10601
11443
  parameters: {
10602
11444
  query?: never;
10603
11445
  header?: never;
@@ -10606,16 +11448,135 @@ export interface operations {
10606
11448
  };
10607
11449
  cookie?: never;
10608
11450
  };
10609
- requestBody?: never;
11451
+ requestBody?: {
11452
+ content: {
11453
+ "application/json": {
11454
+ /**
11455
+ * @description Promotion code.
11456
+ * @example PROMO123
11457
+ */
11458
+ code?: string;
11459
+ /**
11460
+ * @description If a `customer_id` is set, this promotion code will only be available to this customer.
11461
+ * @example cus_DKL4Xcb5VSa8CQ
11462
+ */
11463
+ customer_id?: string | null;
11464
+ /**
11465
+ * @description If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.
11466
+ * @example plan_DKL4Xcb5VSa8CQ
11467
+ */
11468
+ plan_id?: string | null;
11469
+ /**
11470
+ * @description If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.
11471
+ * @example itm_DKL4Xcb5VSa8CQ
11472
+ */
11473
+ product_id?: string | null;
11474
+ expires_at?: components["schemas"]["DateTime"] & unknown;
11475
+ /**
11476
+ * @description Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.
11477
+ * @example 10
11478
+ */
11479
+ max_redemptions?: number | null;
11480
+ /**
11481
+ * @description Current number of redemptions for the promotion code.
11482
+ * @example 0
11483
+ */
11484
+ current_redemptions?: number | null;
11485
+ /**
11486
+ * @description Duration count applied to the subscription for the promotion code. 0 or null for `once`
11487
+ * @example 1
11488
+ */
11489
+ duration_count?: number | null;
11490
+ /**
11491
+ * @description Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`
11492
+ * @example months
11493
+ * @enum {string|null}
11494
+ */
11495
+ duration_period?: "once" | "days" | "weeks" | "months" | "years" | null;
11496
+ /**
11497
+ * @description Whether the promotion code is only for first time orders. Defaults to `false`
11498
+ * @default false
11499
+ * @example false
11500
+ */
11501
+ only_for_first_time_order?: boolean | null;
11502
+ };
11503
+ };
11504
+ };
10610
11505
  responses: {
10611
- /** @description Customer deleted */
10612
- 204: {
11506
+ 200: {
10613
11507
  headers: {
10614
11508
  [name: string]: unknown;
10615
11509
  };
10616
- content?: never;
11510
+ content: {
11511
+ "application/json": {
11512
+ /**
11513
+ * @description Promotion code ID.
11514
+ * @example promo_DKL4Xcb5VSa8CQ
11515
+ */
11516
+ id: string;
11517
+ /**
11518
+ * @description Promotion code.
11519
+ * @example PROMO123
11520
+ */
11521
+ code: string;
11522
+ /**
11523
+ * @description Coupon ID.
11524
+ * @example cou_DKL4Xcb5VSa8CQ
11525
+ */
11526
+ coupon_id: string;
11527
+ /**
11528
+ * @description Client ID.
11529
+ * @example cli_DKL4Xcb5VSa8CQ
11530
+ */
11531
+ client_id: string;
11532
+ /**
11533
+ * @description If a `customer_id` is set, this promotion code will only be available to this customer.
11534
+ * @example cus_DKL4Xcb5VSa8CQ
11535
+ */
11536
+ customer_id: string | null;
11537
+ /**
11538
+ * @description If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.
11539
+ * @example plan_DKL4Xcb5VSa8CQ
11540
+ */
11541
+ plan_id: string | null;
11542
+ /**
11543
+ * @description If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.
11544
+ * @example itm_DKL4Xcb5VSa8CQ
11545
+ */
11546
+ product_id: string | null;
11547
+ created_at: components["schemas"]["DateTime"] & string;
11548
+ updated_at: components["schemas"]["DateTime"] & string;
11549
+ expires_at: components["schemas"]["DateTime"] & unknown;
11550
+ /**
11551
+ * @description Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.
11552
+ * @example 10
11553
+ */
11554
+ max_redemptions: number | null;
11555
+ /**
11556
+ * @description Current number of redemptions for the promotion code.
11557
+ * @example 0
11558
+ */
11559
+ current_redemptions: number | null;
11560
+ /**
11561
+ * @description Duration count applied to the subscription for the promotion code. 0 or null for `once`
11562
+ * @example 1
11563
+ */
11564
+ duration_count: number | null;
11565
+ /**
11566
+ * @description Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`
11567
+ * @example months
11568
+ * @enum {string|null}
11569
+ */
11570
+ duration_period: "once" | "days" | "weeks" | "months" | "years" | null;
11571
+ /**
11572
+ * @description Whether the promotion code is only for first time orders. Defaults to `false`
11573
+ * @example false
11574
+ */
11575
+ only_for_first_time_order: boolean | null;
11576
+ };
11577
+ };
10617
11578
  };
10618
- /** @description Coupon not found */
11579
+ /** @description Promotion code not found */
10619
11580
  404: {
10620
11581
  headers: {
10621
11582
  [name: string]: unknown;
@@ -10732,7 +11693,7 @@ export interface operations {
10732
11693
  };
10733
11694
  };
10734
11695
  };
10735
- listCustomerCredits: {
11696
+ getCustomerCredits: {
10736
11697
  parameters: {
10737
11698
  query?: never;
10738
11699
  header?: never;
@@ -10802,7 +11763,7 @@ export interface operations {
10802
11763
  };
10803
11764
  };
10804
11765
  };
10805
- listCreditTransactionsForCustomer: {
11766
+ getCreditTransactionsForCustomer: {
10806
11767
  parameters: {
10807
11768
  query?: {
10808
11769
  take?: number;
@@ -11272,7 +12233,7 @@ export interface operations {
11272
12233
  * @description Provider name.
11273
12234
  * @enum {string}
11274
12235
  */
11275
- provider_name: "mollie" | "stripe" | "gocardless" | "airwallex" | "hubspot" | "salesforce" | "xero" | "exact-online" | "pennylane";
12236
+ provider_name: "mollie" | "stripe" | "gocardless" | "airwallex" | "hubspot" | "salesforce" | "xero" | "exact-online" | "pennylane" | "quickbooks";
11276
12237
  /** @description Provider ID. Required if multiple instances of the same provider are connected in Hyperline. */
11277
12238
  provider_id?: string;
11278
12239
  /** @description ID of the customer on the provider side. Using a null value will reset the previously saved ID. */
@@ -11402,7 +12363,7 @@ export interface operations {
11402
12363
  };
11403
12364
  };
11404
12365
  };
11405
- listCustomerPaymentMethods: {
12366
+ getCustomerPaymentMethods: {
11406
12367
  parameters: {
11407
12368
  query?: never;
11408
12369
  header?: never;
@@ -13129,7 +14090,7 @@ export interface operations {
13129
14090
  generate_draft_invoices?: boolean | ("true" | "false");
13130
14091
  /**
13131
14092
  * @deprecated
13132
- * @description Use `contract_start` `contract_end` and `renew_automatically` instead. Interval previously used to represent the commitment period of the subscription.
14093
+ * @description Use `contract_terms` instead. Interval previously used to represent the commitment period of the subscription.
13133
14094
  * @example {
13134
14095
  * "period": "years",
13135
14096
  * "count": 1
@@ -13141,13 +14102,15 @@ export interface operations {
13141
14102
  count: number;
13142
14103
  };
13143
14104
  /**
13144
- * @description Indicates if the subscription should automatically renew.
14105
+ * @deprecated
14106
+ * @description Use `contract_terms` instead. Indicates if the subscription should automatically renew.
13145
14107
  * @default true
13146
14108
  * @example true
13147
14109
  */
13148
14110
  renew_automatically?: boolean | ("true" | "false");
13149
14111
  /**
13150
- * @description If `renew_automatically` is enabled, will renew the subscription for the given interval.
14112
+ * @deprecated
14113
+ * @description Use `contract_terms` instead. If `renew_automatically` is enabled, will renew the subscription for the given interval.
13151
14114
  * @example {
13152
14115
  * "period": "years",
13153
14116
  * "count": 1
@@ -13191,6 +14154,78 @@ export interface operations {
13191
14154
  custom_properties?: {
13192
14155
  [key: string]: string | number | boolean | (components["schemas"]["DateTime"] & string) | null;
13193
14156
  };
14157
+ /** @description
14158
+ * Contract terms linked to the subscription.
14159
+ * */
14160
+ contract_terms?: {
14161
+ starts_at?: components["schemas"]["DateTime"] & string;
14162
+ ends_at?: components["schemas"]["DateTime"] & string;
14163
+ /**
14164
+ * @description Interval over which the contract initially spans. Only applies to `duration` end strategy.
14165
+ * @example {
14166
+ * "count": 6,
14167
+ * "period": "months"
14168
+ * }
14169
+ */
14170
+ duration?: {
14171
+ /** @enum {string} */
14172
+ period: "days" | "weeks" | "months" | "years";
14173
+ /** @default 1 */
14174
+ count?: number;
14175
+ };
14176
+ /**
14177
+ * @description
14178
+ * Indicates if the contract should be renewed automatically.
14179
+ *
14180
+ * - `true`: The contract will be renewed automatically.
14181
+ * - `false`: The contract will not be renewed automatically.
14182
+ *
14183
+ * @example true
14184
+ */
14185
+ renew_automatically?: boolean | ("true" | "false");
14186
+ /**
14187
+ * @description
14188
+ * Interval over which the contract will be renewed. Only applies if `renew_automatically` is true.
14189
+ *
14190
+ * @example {
14191
+ * "count": 1,
14192
+ * "period": "years"
14193
+ * }
14194
+ */
14195
+ renew_for_duration?: {
14196
+ /** @enum {string} */
14197
+ period: "days" | "weeks" | "months" | "years";
14198
+ /** @default 1 */
14199
+ count?: number;
14200
+ };
14201
+ } & {
14202
+ /**
14203
+ * @description
14204
+ * Activation strategy of the contract.
14205
+ *
14206
+ * - `immediately`: The contract will be activated immediately.
14207
+ * - `manual`: The contract will be activated when a user manually activates it.
14208
+ * - `start_date`: The contract will be activated on a specified date.
14209
+ * - `quote_signature`: The contract will be activated when the subscription quote is signed.
14210
+ * - `checkout`: The contract will be activated when the subscription checkout is completed.
14211
+ *
14212
+ * @example start_date
14213
+ * @enum {string}
14214
+ */
14215
+ activation_strategy: "start_date" | "immediately" | "manual" | "quote_signature" | "checkout";
14216
+ /**
14217
+ * @description
14218
+ * End strategy of contract.
14219
+ *
14220
+ * - `manual`: The contract ends when a user manually stops it.
14221
+ * - `end_date`: The contract ends on a specified date.
14222
+ * - `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.
14223
+ *
14224
+ * @example duration
14225
+ * @enum {string}
14226
+ */
14227
+ end_strategy: "end_date" | "duration" | "manual";
14228
+ };
13194
14229
  } & {
13195
14230
  /** @description Create a free trial phase based on the plan configuration. */
13196
14231
  trial?: {
@@ -13198,23 +14233,132 @@ export interface operations {
13198
14233
  * @description Defines how the free trial will end.
13199
14234
  * @enum {string}
13200
14235
  */
13201
- end_strategy: "manual" | "end_date" | "duration";
13202
- starts_at?: components["schemas"]["DateTime"] & string;
13203
- ends_at?: components["schemas"]["DateTime"] & string;
14236
+ end_strategy: "manual" | "end_date" | "duration";
14237
+ starts_at?: components["schemas"]["DateTime"] & string;
14238
+ ends_at?: components["schemas"]["DateTime"] & string;
14239
+ duration?: {
14240
+ /**
14241
+ * @description Free trial duration period. Only applies if the end strategy is `duration`.
14242
+ * @enum {string}
14243
+ */
14244
+ period: "days" | "weeks" | "months" | "years";
14245
+ /** @description Free trial duration count. Only applies if the end strategy is `duration`. */
14246
+ count: number;
14247
+ };
14248
+ };
14249
+ } & ({
14250
+ phases: {
14251
+ /**
14252
+ * @description
14253
+ * Type of subscription phase.
14254
+ *
14255
+ * - `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.
14256
+ * - `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.
14257
+ * - `standard`: The phase represents a standard recurring billing.
14258
+ *
14259
+ * @default standard
14260
+ * @example standard
14261
+ * @enum {string}
14262
+ */
14263
+ type?: "setup" | "trial" | "standard";
14264
+ /**
14265
+ * @description Order in which the phase is executed within all subscription phases.
14266
+ * @example 0
14267
+ */
14268
+ order?: number;
14269
+ /**
14270
+ * @description
14271
+ * Activation strategy of subscription phase.
14272
+ *
14273
+ * - `immediately`: The phase starts as soon as the subscription is activated.
14274
+ * - `manual`: The phase starts when a user manually activates it.
14275
+ * - `start_date`: The phase starts on a specified date.
14276
+ * - `quote_signature`: The phase starts when the subscription quote is signed.
14277
+ * - `checkout`: The phase starts when the subscription checkout is completed.
14278
+ * - `contract_start_date`: The phase starts on the start date of the related subscription contract.
14279
+ * - `previous_phase_end`: The phase starts when the previous phase ends.
14280
+ *
14281
+ * @example manual
14282
+ * @enum {string}
14283
+ */
14284
+ activation_strategy: "immediately" | "manual" | "start_date" | "quote_signature" | "checkout" | "contract_start_date" | "previous_phase_end";
14285
+ /**
14286
+ * @description
14287
+ * End strategy of subscription phase.
14288
+ *
14289
+ * - `manual`: The phase ends when a user manually stops it.
14290
+ * - `end_date`: The phase ends on a specified date.
14291
+ * - `duration`: The phase ends after a specific relative duration.
14292
+ * - `contract_end_date`: The phase ends on the end date of the related subscription contract.
14293
+ *
14294
+ * @example duration
14295
+ * @enum {string}
14296
+ */
14297
+ end_strategy: "manual" | "end_date" | "duration" | "contract_end_date";
14298
+ /**
14299
+ * @description Interval over which the subscription phase spans. Only applies to `duration` end strategy.
14300
+ * @example {
14301
+ * "count": 1,
14302
+ * "period": "years"
14303
+ * }
14304
+ */
13204
14305
  duration?: {
13205
- /**
13206
- * @description Free trial duration period. Only applies if the end strategy is `duration`.
13207
- * @enum {string}
13208
- */
14306
+ /** @enum {string} */
13209
14307
  period: "days" | "weeks" | "months" | "years";
13210
- /** @description Free trial duration count. Only applies if the end strategy is `duration`. */
13211
- count: number;
14308
+ /** @default 1 */
14309
+ count?: number;
13212
14310
  };
13213
- };
13214
- } & ({
13215
- phases: ({
13216
- /** @enum {string} */
13217
- activation_strategy: "start_date" | "manual" | "checkout" | "contract_start_date" | "previous_phase_end" | "immediately" | "quote_signature";
14311
+ /**
14312
+ * @description
14313
+ * Represents when the first billing date occurs.
14314
+ *
14315
+ * - `phase_start`: Aligns with the start of the phase.
14316
+ * - `specific_date`: Occurs on a specified date.
14317
+ *
14318
+ * @example phase_start
14319
+ * @enum {string}
14320
+ */
14321
+ billing_date_setting: "phase_start" | "specific_date";
14322
+ initial_billing_at?: components["schemas"]["DateTime"] & string;
14323
+ starts_at?: components["schemas"]["DateTime"] & string;
14324
+ ends_at?: components["schemas"]["DateTime"] & string;
14325
+ /**
14326
+ * @description
14327
+ * Alignment of product billing cycles.
14328
+ *
14329
+ * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
14330
+ * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
14331
+ *
14332
+ * @default anniversary
14333
+ * @example anniversary
14334
+ * @enum {string}
14335
+ */
14336
+ billing_cycle_alignment?: "calendar_period" | "anniversary";
14337
+ /**
14338
+ * @description
14339
+ * Calculation method used when transitioning from one phase to the next one.
14340
+ *
14341
+ * - `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.
14342
+ * - `pay_in_full`: The full amount for the phase billing period must be paid.
14343
+ * - `none`: No amount will need to be paid, phase will simply transition from one to the next.
14344
+ *
14345
+ * @default prorata
14346
+ * @example prorata
14347
+ * @enum {string}
14348
+ */
14349
+ transition_calculation_method?: "prorata" | "pay_in_full" | "none";
14350
+ /**
14351
+ * @description
14352
+ * Represents when the transition amount will be invoiced.
14353
+ *
14354
+ * - `immediately`: An invoice will be generated immediately with the corresponding amount.
14355
+ *
14356
+ * @default immediately
14357
+ * @example immediately
14358
+ * @enum {string}
14359
+ */
14360
+ transition_invoicing_schedule?: "immediately";
14361
+ /** @description Products comprising the subscription phase. */
13218
14362
  products: {
13219
14363
  /**
13220
14364
  * @description Product ID.
@@ -13314,6 +14458,7 @@ export interface operations {
13314
14458
  */
13315
14459
  bill_usage_difference?: boolean | ("true" | "false");
13316
14460
  }[];
14461
+ /** @description Coupons comprising the subscription phase. */
13317
14462
  coupons?: (({
13318
14463
  /** @description Coupon ID. */
13319
14464
  id: string;
@@ -13347,113 +14492,7 @@ export interface operations {
13347
14492
  /** @description Product IDs to which the coupon will be applied. */
13348
14493
  product_ids?: string[];
13349
14494
  })[];
13350
- /**
13351
- * @description
13352
- * Alignment of product billing cycles.
13353
- *
13354
- * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
13355
- * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
13356
- *
13357
- * @default anniversary
13358
- * @enum {string}
13359
- */
13360
- billing_cycle_alignment?: "calendar_period" | "anniversary";
13361
- } & {
13362
- /**
13363
- * @description
13364
- * Activation strategy of subscription phase.
13365
- *
13366
- * - `immediately`: The phase starts as soon as the subscription is activated.
13367
- * - `manual`: The phase starts when a user manually activates it.
13368
- * - `start_date`: The phase starts on a specified date.
13369
- * - `quote_signature`: The phase starts when the subscription quote is signed.
13370
- * - `checkout`: The phase starts when the subscription checkout is completed.
13371
- * - `contract_start_date`: The phase starts on the start date of the related subscription contract.
13372
- * - `previous_phase_end`: The phase starts when the previous phase ends.
13373
- *
13374
- * @example manual
13375
- * @enum {string}
13376
- */
13377
- activation_strategy: "immediately" | "manual" | "start_date" | "quote_signature" | "checkout" | "contract_start_date" | "previous_phase_end";
13378
- /**
13379
- * @description
13380
- * End strategy of subscription phase.
13381
- *
13382
- * - `manual`: The phase ends when a user manually stops it.
13383
- * - `end_date`: The phase ends on a specified date.
13384
- * - `duration`: The phase ends after a specific relative duration.
13385
- * - `contract_end_date`: The phase ends on the end date of the related subscription contract.
13386
- *
13387
- * @example duration
13388
- * @enum {string}
13389
- */
13390
- end_strategy: "manual" | "end_date" | "duration" | "contract_end_date";
13391
- starts_at: components["schemas"]["DateTime"] & unknown;
13392
- ends_at: components["schemas"]["DateTime"] & unknown;
13393
- /**
13394
- * @description
13395
- * Represents when the first billing date occurs.
13396
- *
13397
- * - `phase_start`: Aligns with the start of the phase.
13398
- * - `specific_date`: Occurs on a specified date.
13399
- *
13400
- * @example phase_start
13401
- * @enum {string}
13402
- */
13403
- billing_date_setting: "phase_start" | "specific_date";
13404
- initial_billing_at: components["schemas"]["DateTime"] & unknown;
13405
- /**
13406
- * @description Interval over which the subscription phase spans. Only applies to `duration` end strategy.
13407
- * @example {
13408
- * "count": 1,
13409
- * "period": "years"
13410
- * }
13411
- */
13412
- duration: {
13413
- /** @enum {string} */
13414
- period: "days" | "weeks" | "months" | "years";
13415
- count: number;
13416
- } | null;
13417
- /**
13418
- * @description Order in which the phase is executed within all subscription phases.
13419
- * @example 0
13420
- */
13421
- order: number;
13422
- /**
13423
- * @description
13424
- * Calculation method used when transitioning from one phase to the next one.
13425
- *
13426
- * - `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.
13427
- * - `pay_in_full`: The full amount for the phase billing period must be paid.
13428
- * - `none`: No amount will need to be paid, phase will simply transition from one to the next.
13429
- *
13430
- * @example prorata
13431
- * @enum {string}
13432
- */
13433
- transition_calculation_method: "prorata" | "pay_in_full" | "none";
13434
- /**
13435
- * @description
13436
- * Represents when the transition amount will be invoiced.
13437
- *
13438
- * - `immediately`: An invoice will be generated immediately with the corresponding amount.
13439
- *
13440
- * @example immediately
13441
- * @enum {string}
13442
- */
13443
- transition_invoicing_schedule: "immediately";
13444
- /**
13445
- * @description
13446
- * Type of subscription phase.
13447
- *
13448
- * - `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.
13449
- * - `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.
13450
- * - `standard`: The phase represents a standard recurring billing.
13451
- *
13452
- * @example standard
13453
- * @enum {string}
13454
- */
13455
- type: "setup" | "trial" | "standard";
13456
- })[];
14495
+ }[];
13457
14496
  } | {
13458
14497
  /** @description Products that make up the subscription. */
13459
14498
  products?: {
@@ -13609,7 +14648,7 @@ export interface operations {
13609
14648
  generate_draft_invoices?: boolean | ("true" | "false");
13610
14649
  /**
13611
14650
  * @deprecated
13612
- * @description Use `contract_start` `contract_end` and `renew_automatically` instead. Interval previously used to represent the commitment period of the subscription.
14651
+ * @description Use `contract_terms` instead. Interval previously used to represent the commitment period of the subscription.
13613
14652
  * @example {
13614
14653
  * "period": "years",
13615
14654
  * "count": 1
@@ -13621,13 +14660,15 @@ export interface operations {
13621
14660
  count: number;
13622
14661
  };
13623
14662
  /**
13624
- * @description Indicates if the subscription should automatically renew.
14663
+ * @deprecated
14664
+ * @description Use `contract_terms` instead. Indicates if the subscription should automatically renew.
13625
14665
  * @default true
13626
14666
  * @example true
13627
14667
  */
13628
14668
  renew_automatically?: boolean | ("true" | "false");
13629
14669
  /**
13630
- * @description If `renew_automatically` is enabled, will renew the subscription for the given interval.
14670
+ * @deprecated
14671
+ * @description Use `contract_terms` instead. If `renew_automatically` is enabled, will renew the subscription for the given interval.
13631
14672
  * @example {
13632
14673
  * "period": "years",
13633
14674
  * "count": 1
@@ -13671,30 +14712,211 @@ export interface operations {
13671
14712
  custom_properties?: {
13672
14713
  [key: string]: string | number | boolean | (components["schemas"]["DateTime"] & string) | null;
13673
14714
  };
14715
+ /** @description
14716
+ * Contract terms linked to the subscription.
14717
+ * */
14718
+ contract_terms?: {
14719
+ starts_at?: components["schemas"]["DateTime"] & string;
14720
+ ends_at?: components["schemas"]["DateTime"] & string;
14721
+ /**
14722
+ * @description Interval over which the contract initially spans. Only applies to `duration` end strategy.
14723
+ * @example {
14724
+ * "count": 6,
14725
+ * "period": "months"
14726
+ * }
14727
+ */
14728
+ duration?: {
14729
+ /** @enum {string} */
14730
+ period: "days" | "weeks" | "months" | "years";
14731
+ /** @default 1 */
14732
+ count?: number;
14733
+ };
14734
+ /**
14735
+ * @description
14736
+ * Indicates if the contract should be renewed automatically.
14737
+ *
14738
+ * - `true`: The contract will be renewed automatically.
14739
+ * - `false`: The contract will not be renewed automatically.
14740
+ *
14741
+ * @example true
14742
+ */
14743
+ renew_automatically?: boolean | ("true" | "false");
14744
+ /**
14745
+ * @description
14746
+ * Interval over which the contract will be renewed. Only applies if `renew_automatically` is true.
14747
+ *
14748
+ * @example {
14749
+ * "count": 1,
14750
+ * "period": "years"
14751
+ * }
14752
+ */
14753
+ renew_for_duration?: {
14754
+ /** @enum {string} */
14755
+ period: "days" | "weeks" | "months" | "years";
14756
+ /** @default 1 */
14757
+ count?: number;
14758
+ };
14759
+ } & {
14760
+ /**
14761
+ * @description
14762
+ * Activation strategy of the contract.
14763
+ *
14764
+ * - `immediately`: The contract will be activated immediately.
14765
+ * - `manual`: The contract will be activated when a user manually activates it.
14766
+ * - `start_date`: The contract will be activated on a specified date.
14767
+ * - `quote_signature`: The contract will be activated when the subscription quote is signed.
14768
+ * - `checkout`: The contract will be activated when the subscription checkout is completed.
14769
+ *
14770
+ * @example start_date
14771
+ * @enum {string}
14772
+ */
14773
+ activation_strategy: "start_date" | "immediately" | "manual" | "quote_signature" | "checkout";
14774
+ /**
14775
+ * @description
14776
+ * End strategy of contract.
14777
+ *
14778
+ * - `manual`: The contract ends when a user manually stops it.
14779
+ * - `end_date`: The contract ends on a specified date.
14780
+ * - `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.
14781
+ *
14782
+ * @example duration
14783
+ * @enum {string}
14784
+ */
14785
+ end_strategy: "end_date" | "duration" | "manual";
14786
+ };
13674
14787
  } & {
13675
14788
  /** @description Create a free trial phase based on the plan configuration. */
13676
14789
  trial?: {
13677
14790
  /**
13678
- * @description Defines how the free trial will end.
14791
+ * @description Defines how the free trial will end.
14792
+ * @enum {string}
14793
+ */
14794
+ end_strategy: "manual" | "end_date" | "duration";
14795
+ starts_at?: components["schemas"]["DateTime"] & string;
14796
+ ends_at?: components["schemas"]["DateTime"] & string;
14797
+ duration?: {
14798
+ /**
14799
+ * @description Free trial duration period. Only applies if the end strategy is `duration`.
14800
+ * @enum {string}
14801
+ */
14802
+ period: "days" | "weeks" | "months" | "years";
14803
+ /** @description Free trial duration count. Only applies if the end strategy is `duration`. */
14804
+ count: number;
14805
+ };
14806
+ };
14807
+ } & ({
14808
+ phases: {
14809
+ /**
14810
+ * @description
14811
+ * Type of subscription phase.
14812
+ *
14813
+ * - `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.
14814
+ * - `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.
14815
+ * - `standard`: The phase represents a standard recurring billing.
14816
+ *
14817
+ * @default standard
14818
+ * @example standard
14819
+ * @enum {string}
14820
+ */
14821
+ type?: "setup" | "trial" | "standard";
14822
+ /**
14823
+ * @description Order in which the phase is executed within all subscription phases.
14824
+ * @example 0
14825
+ */
14826
+ order?: number;
14827
+ /**
14828
+ * @description
14829
+ * Activation strategy of subscription phase.
14830
+ *
14831
+ * - `immediately`: The phase starts as soon as the subscription is activated.
14832
+ * - `manual`: The phase starts when a user manually activates it.
14833
+ * - `start_date`: The phase starts on a specified date.
14834
+ * - `quote_signature`: The phase starts when the subscription quote is signed.
14835
+ * - `checkout`: The phase starts when the subscription checkout is completed.
14836
+ * - `contract_start_date`: The phase starts on the start date of the related subscription contract.
14837
+ * - `previous_phase_end`: The phase starts when the previous phase ends.
14838
+ *
14839
+ * @example manual
13679
14840
  * @enum {string}
13680
14841
  */
13681
- end_strategy: "manual" | "end_date" | "duration";
13682
- starts_at?: components["schemas"]["DateTime"] & string;
13683
- ends_at?: components["schemas"]["DateTime"] & string;
14842
+ activation_strategy: "immediately" | "manual" | "start_date" | "quote_signature" | "checkout" | "contract_start_date" | "previous_phase_end";
14843
+ /**
14844
+ * @description
14845
+ * End strategy of subscription phase.
14846
+ *
14847
+ * - `manual`: The phase ends when a user manually stops it.
14848
+ * - `end_date`: The phase ends on a specified date.
14849
+ * - `duration`: The phase ends after a specific relative duration.
14850
+ * - `contract_end_date`: The phase ends on the end date of the related subscription contract.
14851
+ *
14852
+ * @example duration
14853
+ * @enum {string}
14854
+ */
14855
+ end_strategy: "manual" | "end_date" | "duration" | "contract_end_date";
14856
+ /**
14857
+ * @description Interval over which the subscription phase spans. Only applies to `duration` end strategy.
14858
+ * @example {
14859
+ * "count": 1,
14860
+ * "period": "years"
14861
+ * }
14862
+ */
13684
14863
  duration?: {
13685
- /**
13686
- * @description Free trial duration period. Only applies if the end strategy is `duration`.
13687
- * @enum {string}
13688
- */
14864
+ /** @enum {string} */
13689
14865
  period: "days" | "weeks" | "months" | "years";
13690
- /** @description Free trial duration count. Only applies if the end strategy is `duration`. */
13691
- count: number;
14866
+ /** @default 1 */
14867
+ count?: number;
13692
14868
  };
13693
- };
13694
- } & ({
13695
- phases: ({
13696
- /** @enum {string} */
13697
- activation_strategy: "start_date" | "manual" | "checkout" | "contract_start_date" | "previous_phase_end" | "immediately" | "quote_signature";
14869
+ /**
14870
+ * @description
14871
+ * Represents when the first billing date occurs.
14872
+ *
14873
+ * - `phase_start`: Aligns with the start of the phase.
14874
+ * - `specific_date`: Occurs on a specified date.
14875
+ *
14876
+ * @example phase_start
14877
+ * @enum {string}
14878
+ */
14879
+ billing_date_setting: "phase_start" | "specific_date";
14880
+ initial_billing_at?: components["schemas"]["DateTime"] & string;
14881
+ starts_at?: components["schemas"]["DateTime"] & string;
14882
+ ends_at?: components["schemas"]["DateTime"] & string;
14883
+ /**
14884
+ * @description
14885
+ * Alignment of product billing cycles.
14886
+ *
14887
+ * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
14888
+ * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
14889
+ *
14890
+ * @default anniversary
14891
+ * @example anniversary
14892
+ * @enum {string}
14893
+ */
14894
+ billing_cycle_alignment?: "calendar_period" | "anniversary";
14895
+ /**
14896
+ * @description
14897
+ * Calculation method used when transitioning from one phase to the next one.
14898
+ *
14899
+ * - `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.
14900
+ * - `pay_in_full`: The full amount for the phase billing period must be paid.
14901
+ * - `none`: No amount will need to be paid, phase will simply transition from one to the next.
14902
+ *
14903
+ * @default prorata
14904
+ * @example prorata
14905
+ * @enum {string}
14906
+ */
14907
+ transition_calculation_method?: "prorata" | "pay_in_full" | "none";
14908
+ /**
14909
+ * @description
14910
+ * Represents when the transition amount will be invoiced.
14911
+ *
14912
+ * - `immediately`: An invoice will be generated immediately with the corresponding amount.
14913
+ *
14914
+ * @default immediately
14915
+ * @example immediately
14916
+ * @enum {string}
14917
+ */
14918
+ transition_invoicing_schedule?: "immediately";
14919
+ /** @description Products comprising the subscription phase. */
13698
14920
  products: {
13699
14921
  /**
13700
14922
  * @description Product ID.
@@ -13794,6 +15016,7 @@ export interface operations {
13794
15016
  */
13795
15017
  bill_usage_difference?: boolean | ("true" | "false");
13796
15018
  }[];
15019
+ /** @description Coupons comprising the subscription phase. */
13797
15020
  coupons?: (({
13798
15021
  /** @description Coupon ID. */
13799
15022
  id: string;
@@ -13827,113 +15050,7 @@ export interface operations {
13827
15050
  /** @description Product IDs to which the coupon will be applied. */
13828
15051
  product_ids?: string[];
13829
15052
  })[];
13830
- /**
13831
- * @description
13832
- * Alignment of product billing cycles.
13833
- *
13834
- * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
13835
- * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
13836
- *
13837
- * @default anniversary
13838
- * @enum {string}
13839
- */
13840
- billing_cycle_alignment?: "calendar_period" | "anniversary";
13841
- } & {
13842
- /**
13843
- * @description
13844
- * Activation strategy of subscription phase.
13845
- *
13846
- * - `immediately`: The phase starts as soon as the subscription is activated.
13847
- * - `manual`: The phase starts when a user manually activates it.
13848
- * - `start_date`: The phase starts on a specified date.
13849
- * - `quote_signature`: The phase starts when the subscription quote is signed.
13850
- * - `checkout`: The phase starts when the subscription checkout is completed.
13851
- * - `contract_start_date`: The phase starts on the start date of the related subscription contract.
13852
- * - `previous_phase_end`: The phase starts when the previous phase ends.
13853
- *
13854
- * @example manual
13855
- * @enum {string}
13856
- */
13857
- activation_strategy: "immediately" | "manual" | "start_date" | "quote_signature" | "checkout" | "contract_start_date" | "previous_phase_end";
13858
- /**
13859
- * @description
13860
- * End strategy of subscription phase.
13861
- *
13862
- * - `manual`: The phase ends when a user manually stops it.
13863
- * - `end_date`: The phase ends on a specified date.
13864
- * - `duration`: The phase ends after a specific relative duration.
13865
- * - `contract_end_date`: The phase ends on the end date of the related subscription contract.
13866
- *
13867
- * @example duration
13868
- * @enum {string}
13869
- */
13870
- end_strategy: "manual" | "end_date" | "duration" | "contract_end_date";
13871
- starts_at: components["schemas"]["DateTime"] & unknown;
13872
- ends_at: components["schemas"]["DateTime"] & unknown;
13873
- /**
13874
- * @description
13875
- * Represents when the first billing date occurs.
13876
- *
13877
- * - `phase_start`: Aligns with the start of the phase.
13878
- * - `specific_date`: Occurs on a specified date.
13879
- *
13880
- * @example phase_start
13881
- * @enum {string}
13882
- */
13883
- billing_date_setting: "phase_start" | "specific_date";
13884
- initial_billing_at: components["schemas"]["DateTime"] & unknown;
13885
- /**
13886
- * @description Interval over which the subscription phase spans. Only applies to `duration` end strategy.
13887
- * @example {
13888
- * "count": 1,
13889
- * "period": "years"
13890
- * }
13891
- */
13892
- duration: {
13893
- /** @enum {string} */
13894
- period: "days" | "weeks" | "months" | "years";
13895
- count: number;
13896
- } | null;
13897
- /**
13898
- * @description Order in which the phase is executed within all subscription phases.
13899
- * @example 0
13900
- */
13901
- order: number;
13902
- /**
13903
- * @description
13904
- * Calculation method used when transitioning from one phase to the next one.
13905
- *
13906
- * - `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.
13907
- * - `pay_in_full`: The full amount for the phase billing period must be paid.
13908
- * - `none`: No amount will need to be paid, phase will simply transition from one to the next.
13909
- *
13910
- * @example prorata
13911
- * @enum {string}
13912
- */
13913
- transition_calculation_method: "prorata" | "pay_in_full" | "none";
13914
- /**
13915
- * @description
13916
- * Represents when the transition amount will be invoiced.
13917
- *
13918
- * - `immediately`: An invoice will be generated immediately with the corresponding amount.
13919
- *
13920
- * @example immediately
13921
- * @enum {string}
13922
- */
13923
- transition_invoicing_schedule: "immediately";
13924
- /**
13925
- * @description
13926
- * Type of subscription phase.
13927
- *
13928
- * - `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.
13929
- * - `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.
13930
- * - `standard`: The phase represents a standard recurring billing.
13931
- *
13932
- * @example standard
13933
- * @enum {string}
13934
- */
13935
- type: "setup" | "trial" | "standard";
13936
- })[];
15053
+ }[];
13937
15054
  } | {
13938
15055
  /** @description Products that make up the subscription. */
13939
15056
  products?: {
@@ -14541,6 +15658,14 @@ export interface operations {
14541
15658
  invoicing_entity_id__startsWith?: string;
14542
15659
  invoicing_entity_id__endWith?: string;
14543
15660
  customer_external_id?: string;
15661
+ purchase_order?: string;
15662
+ purchase_order__not?: string;
15663
+ purchase_order__isNull?: string;
15664
+ purchase_order__isNotNull?: string;
15665
+ purchase_order__equals?: string;
15666
+ purchase_order__contains?: string;
15667
+ purchase_order__startsWith?: string;
15668
+ purchase_order__endWith?: string;
14544
15669
  updated_at?: string;
14545
15670
  updated_at__not?: string;
14546
15671
  updated_at__isNull?: string;
@@ -14649,6 +15774,8 @@ export interface operations {
14649
15774
  * @example cou_DKL4Xcb5VSa8CQ
14650
15775
  */
14651
15776
  id: string | null;
15777
+ /** @description Promotion code ID if the coupon has been created from a promotion code. */
15778
+ promotion_code_id: string | null;
14652
15779
  /**
14653
15780
  * @description Coupon name.
14654
15781
  * @example Partner discount
@@ -14779,6 +15906,7 @@ export interface operations {
14779
15906
  * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
14780
15907
  * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
14781
15908
  *
15909
+ * @example anniversary
14782
15910
  * @enum {string}
14783
15911
  */
14784
15912
  billing_cycle_alignment: "calendar_period" | "anniversary";
@@ -14838,6 +15966,8 @@ export interface operations {
14838
15966
  * @example cou_DKL4Xcb5VSa8CQ
14839
15967
  */
14840
15968
  id: string | null;
15969
+ /** @description Promotion code ID if the coupon has been created from a promotion code. */
15970
+ promotion_code_id: string | null;
14841
15971
  /**
14842
15972
  * @description Coupon name.
14843
15973
  * @example Partner discount
@@ -14907,6 +16037,89 @@ export interface operations {
14907
16037
  payment_method: components["schemas"]["PaymentMethod"] & unknown;
14908
16038
  /** @description Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent */
14909
16039
  generate_draft_invoices: boolean;
16040
+ /** @description
16041
+ * Contract terms linked to the subscription.
16042
+ * */
16043
+ contract_terms: {
16044
+ /**
16045
+ * @description
16046
+ * Contract status.
16047
+ *
16048
+ * - `active`: The contract is active.
16049
+ * - `pending`: The contract is pending. It will be activated according to the activation strategy.
16050
+ * - `finished`: The contract has ended.
16051
+ *
16052
+ * @example active
16053
+ * @enum {string}
16054
+ */
16055
+ status: "active" | "pending" | "finished";
16056
+ /**
16057
+ * @description
16058
+ * Activation strategy of the contract.
16059
+ *
16060
+ * - `immediately`: The contract will be activated immediately.
16061
+ * - `manual`: The contract will be activated when a user manually activates it.
16062
+ * - `start_date`: The contract will be activated on a specified date.
16063
+ * - `quote_signature`: The contract will be activated when the subscription quote is signed.
16064
+ * - `checkout`: The contract will be activated when the subscription checkout is completed.
16065
+ *
16066
+ * @example start_date
16067
+ * @enum {string}
16068
+ */
16069
+ activation_strategy: "start_date" | "immediately" | "manual" | "quote_signature" | "checkout";
16070
+ /**
16071
+ * @description
16072
+ * End strategy of contract.
16073
+ *
16074
+ * - `manual`: The contract ends when a user manually stops it.
16075
+ * - `end_date`: The contract ends on a specified date.
16076
+ * - `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.
16077
+ *
16078
+ * @example duration
16079
+ * @enum {string}
16080
+ */
16081
+ end_strategy: "end_date" | "duration" | "manual";
16082
+ starts_at: components["schemas"]["DateTime"] & unknown;
16083
+ ends_at: components["schemas"]["DateTime"] & unknown;
16084
+ /**
16085
+ * @description Interval over which the contract initially spans. Only applies to `duration` end strategy.
16086
+ * @example {
16087
+ * "count": 6,
16088
+ * "period": "months"
16089
+ * }
16090
+ */
16091
+ duration: {
16092
+ /** @enum {string} */
16093
+ period: "days" | "weeks" | "months" | "years";
16094
+ count: number;
16095
+ } | null;
16096
+ /**
16097
+ * @description
16098
+ * Indicates if the contract should be renewed automatically.
16099
+ *
16100
+ * - `true`: The contract will be renewed automatically.
16101
+ * - `false`: The contract will not be renewed automatically.
16102
+ *
16103
+ * @example true
16104
+ */
16105
+ renew_automatically: boolean | ("true" | "false");
16106
+ /**
16107
+ * @description
16108
+ * Interval over which the contract will be renewed. Only applies if `renew_automatically` is true.
16109
+ *
16110
+ * @example {
16111
+ * "count": 1,
16112
+ * "period": "years"
16113
+ * }
16114
+ */
16115
+ renew_for_duration: {
16116
+ /** @enum {string} */
16117
+ period: "days" | "weeks" | "months" | "years";
16118
+ count: number;
16119
+ } | null;
16120
+ current_period_started_at: components["schemas"]["DateTime"] & unknown;
16121
+ current_period_ends_at: components["schemas"]["DateTime"] & unknown;
16122
+ } | null;
14910
16123
  } & {
14911
16124
  live_billing?: components["schemas"]["LiveBilling"];
14912
16125
  };
@@ -15134,6 +16347,7 @@ export interface operations {
15134
16347
  * - `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
15135
16348
  * - `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
15136
16349
  *
16350
+ * @example anniversary
15137
16351
  * @enum {string}
15138
16352
  */
15139
16353
  billing_cycle_alignment: "calendar_period" | "anniversary";
@@ -15193,6 +16407,8 @@ export interface operations {
15193
16407
  * @example cou_DKL4Xcb5VSa8CQ
15194
16408
  */
15195
16409
  id: string | null;
16410
+ /** @description Promotion code ID if the coupon has been created from a promotion code. */
16411
+ promotion_code_id: string | null;
15196
16412
  /**
15197
16413
  * @description Coupon name.
15198
16414
  * @example Partner discount