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