Skip to main content

ghl_models/v3/
saas.rs

1//! `saas` data models for GoHighLevel API V3 (25 types).
2//!
3//! Generated from HighLevel's official OpenAPI spec for the
4//! **Saas** module. Every endpoint that uses these types, with its
5//! parameters, required scopes and enum values, is documented in the
6//! [`saas` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/saas.md).
7//!
8//! Enable with `features = ["saas"]`.
9// @generated by xtask/generate_models.py — do not edit by hand.
10// Source: https://github.com/GoHighLevel/highlevel-api-docs
11// Doc comments are HighLevel's own field descriptions, reflowed verbatim, so
12// they aren't held to rustdoc's markdown conventions.
13#![allow(
14    missing_docs,
15    clippy::doc_lazy_continuation,
16    clippy::doc_overindented_list_items
17)]
18
19use serde::{Deserialize, Serialize};
20
21/// `AgencyPlanResponseDto` from the GoHighLevel OpenAPI spec.
22#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct AgencyPlanResponseDto {
24    /// Unique identifier for the plan
25    /// Required by the API.
26    /// (Optional here so responses that omit it still parse.)
27    #[serde(rename = "planId", default, skip_serializing_if = "Option::is_none")]
28    pub plan_id: Option<String>,
29    /// Title of the plan
30    /// Required by the API.
31    /// (Optional here so responses that omit it still parse.)
32    #[serde(default, skip_serializing_if = "Option::is_none")]
33    pub title: Option<String>,
34    /// Description of the plan
35    /// Required by the API.
36    /// (Optional here so responses that omit it still parse.)
37    #[serde(default, skip_serializing_if = "Option::is_none")]
38    pub description: Option<String>,
39    /// Array of SaaS products included in the plan
40    /// Required by the API.
41    /// (Optional here so responses that omit it still parse.)
42    #[serde(
43        rename = "saasProducts",
44        default,
45        skip_serializing_if = "Vec::is_empty"
46    )]
47    pub saas_products: Vec<String>,
48    /// Array of add-ons included in the plan
49    #[serde(rename = "addOns", default, skip_serializing_if = "Vec::is_empty")]
50    pub add_ons: Vec<String>,
51    /// Level of the plan (0-4)
52    /// Required by the API.
53    /// (Optional here so responses that omit it still parse.)
54    #[serde(rename = "planLevel", default, skip_serializing_if = "Option::is_none")]
55    pub plan_level: Option<f64>,
56    /// Trial period in days
57    /// Required by the API.
58    /// (Optional here so responses that omit it still parse.)
59    #[serde(
60        rename = "trialPeriod",
61        default,
62        skip_serializing_if = "Option::is_none"
63    )]
64    pub trial_period: Option<f64>,
65    /// User limit for the plan
66    #[serde(rename = "userLimit", default, skip_serializing_if = "Option::is_none")]
67    pub user_limit: Option<f64>,
68    /// Contact limit for the plan
69    #[serde(
70        rename = "contactLimit",
71        default,
72        skip_serializing_if = "Option::is_none"
73    )]
74    pub contact_limit: Option<f64>,
75    /// Pricing information for the plan
76    /// Nested object; raw JSON (see the API docs for its fields).
77    /// Required by the API.
78    /// (Optional here so responses that omit it still parse.)
79    #[serde(default, skip_serializing_if = "Vec::is_empty")]
80    pub prices: Vec<serde_json::Value>,
81    /// Category ID for the plan
82    #[serde(
83        rename = "categoryId",
84        default,
85        skip_serializing_if = "Option::is_none"
86    )]
87    pub category_id: Option<String>,
88    /// Snapshot ID for the plan
89    #[serde(
90        rename = "snapshotId",
91        default,
92        skip_serializing_if = "Option::is_none"
93    )]
94    pub snapshot_id: Option<String>,
95    /// Product ID for the plan
96    #[serde(rename = "productId", default, skip_serializing_if = "Option::is_none")]
97    pub product_id: Option<String>,
98    /// Indicates if this is a SaaS V2 plan
99    /// Required by the API.
100    /// (Optional here so responses that omit it still parse.)
101    #[serde(rename = "isSaaSV2", default, skip_serializing_if = "Option::is_none")]
102    pub is_saa_sv2: Option<bool>,
103    /// Provider location ID
104    #[serde(
105        rename = "providerLocationId",
106        default,
107        skip_serializing_if = "Option::is_none"
108    )]
109    pub provider_location_id: Option<String>,
110    /// Creation timestamp
111    /// Required by the API.
112    /// (Optional here so responses that omit it still parse.)
113    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
114    pub created_at: Option<String>,
115    /// Last update timestamp
116    /// Required by the API.
117    /// (Optional here so responses that omit it still parse.)
118    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
119    pub updated_at: Option<String>,
120}
121
122/// `AllowAttachRebillingDto` from the GoHighLevel OpenAPI spec.
123#[derive(Debug, Clone, Default, Serialize, Deserialize)]
124pub struct AllowAttachRebillingDto {
125    /// Company ID owning the location
126    /// Required by the API.
127    #[serde(rename = "companyId")]
128    pub company_id: String,
129    /// Map of rebilling product code to its config. When provided, this gets stored on the
130    /// sub-account so it can be applied when the rebilling config is created. Omit to only mark
131    /// the sub-account as awaiting rebilling attach without any pre-configured products.
132    /// Possible product keys: `contentAI`, `workflow_premium_actions`, `workflow_ai`,
133    /// `conversationAI`, `whatsApp`, `reviewsAI`, `EmailVerification`, `funnelAI`,
134    /// `domainPurchase`, `Phone`, `Email`, `agentStudio`, `askai`, `aiStudio`.
135    #[serde(
136        rename = "attachedRebillingConfig",
137        default,
138        skip_serializing_if = "Option::is_none"
139    )]
140    pub attached_rebilling_config: Option<serde_json::Value>,
141}
142
143/// `AllowAttachRebillingResponseDto` from the GoHighLevel OpenAPI spec.
144#[derive(Debug, Clone, Default, Serialize, Deserialize)]
145pub struct AllowAttachRebillingResponseDto {
146    /// Indicates if the allow attach rebilling operation succeeded
147    /// Required by the API.
148    /// (Optional here so responses that omit it still parse.)
149    #[serde(default, skip_serializing_if = "Option::is_none")]
150    pub success: Option<bool>,
151    /// Location ID the rebilling config was attached to
152    /// Required by the API.
153    /// (Optional here so responses that omit it still parse.)
154    #[serde(
155        rename = "locationId",
156        default,
157        skip_serializing_if = "Option::is_none"
158    )]
159    pub location_id: Option<String>,
160    /// Stored rebilling configuration on the location. Markup is the internal percentage value
161    /// converted from the request multiplier (e.g. 4 -> 300%, 3 -> 200%).
162    /// Required by the API.
163    /// (Optional here so responses that omit it still parse.)
164    #[serde(
165        rename = "attachedRebillingConfig",
166        default,
167        skip_serializing_if = "Option::is_none"
168    )]
169    pub attached_rebilling_config: Option<serde_json::Value>,
170}
171
172/// `AttachedRebillingProductConfigDto` from the GoHighLevel OpenAPI spec.
173#[derive(Debug, Clone, Default, Serialize, Deserialize)]
174pub struct AttachedRebillingProductConfigDto {
175    /// Enable rebilling for the product
176    /// Required by the API.
177    pub enabled: bool,
178    /// Additional value to be added in terms of percentage
179    /// Required by the API.
180    pub markup: f64,
181    /// Product price override
182    #[serde(default, skip_serializing_if = "Option::is_none")]
183    pub price: Option<f64>,
184}
185
186/// `BadRequestDTO` from the GoHighLevel OpenAPI spec.
187#[derive(Debug, Clone, Default, Serialize, Deserialize)]
188pub struct BadRequestDTO {
189    /// Status code
190    #[serde(
191        rename = "statusCode",
192        default,
193        skip_serializing_if = "Option::is_none"
194    )]
195    pub status_code: Option<f64>,
196    /// Error message
197    #[serde(default, skip_serializing_if = "Option::is_none")]
198    pub message: Option<String>,
199}
200
201/// `BulkDisableSaasDto` from the GoHighLevel OpenAPI spec.
202#[derive(Debug, Clone, Default, Serialize, Deserialize)]
203pub struct BulkDisableSaasDto {
204    /// Location IDs
205    /// Required by the API.
206    #[serde(rename = "locationIds", default, skip_serializing_if = "Vec::is_empty")]
207    pub location_ids: Vec<String>,
208}
209
210/// `BulkDisableSaasResponseDto` from the GoHighLevel OpenAPI spec.
211#[derive(Debug, Clone, Default, Serialize, Deserialize)]
212pub struct BulkDisableSaasResponseDto {
213    /// Response data from the bulk disable SaaS operation
214    /// Required by the API.
215    /// (Optional here so responses that omit it still parse.)
216    #[serde(default, skip_serializing_if = "Option::is_none")]
217    pub data: Option<serde_json::Value>,
218}
219
220/// `BulkEnableSaasActionPayloadDto` from the GoHighLevel OpenAPI spec.
221#[derive(Debug, Clone, Default, Serialize, Deserialize)]
222pub struct BulkEnableSaasActionPayloadDto {
223    /// Price ID for the SaaS plan
224    #[serde(rename = "priceId", default, skip_serializing_if = "Option::is_none")]
225    pub price_id: Option<String>,
226    /// Stripe account ID
227    #[serde(
228        rename = "stripeAccountId",
229        default,
230        skip_serializing_if = "Option::is_none"
231    )]
232    pub stripe_account_id: Option<String>,
233    /// SaaS plan ID
234    /// Required by the API.
235    #[serde(rename = "saasPlanId")]
236    pub saas_plan_id: String,
237    /// Provider location ID
238    #[serde(
239        rename = "providerLocationId",
240        default,
241        skip_serializing_if = "Option::is_none"
242    )]
243    pub provider_location_id: Option<String>,
244}
245
246/// `BulkEnableSaasRequestDto` from the GoHighLevel OpenAPI spec.
247#[derive(Debug, Clone, Default, Serialize, Deserialize)]
248pub struct BulkEnableSaasRequestDto {
249    /// Array of location IDs to enable SaaS for
250    /// Required by the API.
251    #[serde(rename = "locationIds", default, skip_serializing_if = "Vec::is_empty")]
252    pub location_ids: Vec<String>,
253    /// Indicates if the SaaS is V2
254    /// Required by the API.
255    #[serde(rename = "isSaaSV2")]
256    pub is_saa_sv2: bool,
257    /// Action payload for the bulk enable SaaS operation
258    /// Required by the API.
259    #[serde(rename = "actionPayload")]
260    pub action_payload: BulkEnableSaasActionPayloadDto,
261}
262
263/// `BulkEnableSaasResponseDto` from the GoHighLevel OpenAPI spec.
264#[derive(Debug, Clone, Default, Serialize, Deserialize)]
265pub struct BulkEnableSaasResponseDto {
266    /// Indicates if the bulk enable SaaS operation was successful
267    /// Required by the API.
268    /// (Optional here so responses that omit it still parse.)
269    #[serde(default, skip_serializing_if = "Option::is_none")]
270    pub success: Option<bool>,
271    /// Message indicating the bulk enable SaaS operation
272    /// Required by the API.
273    /// (Optional here so responses that omit it still parse.)
274    #[serde(default, skip_serializing_if = "Option::is_none")]
275    pub message: Option<String>,
276    /// URL for the bulk enable SaaS operation
277    #[serde(
278        rename = "bulkActionUrl",
279        default,
280        skip_serializing_if = "Option::is_none"
281    )]
282    pub bulk_action_url: Option<String>,
283}
284
285/// `ComplimentaryCreditDTO` from the GoHighLevel OpenAPI spec.
286#[derive(Debug, Clone, Default, Serialize, Deserialize)]
287pub struct ComplimentaryCreditDTO {
288    /// Credit amount to be added
289    #[serde(
290        rename = "complimentaryCreditsAmount",
291        default,
292        skip_serializing_if = "Option::is_none"
293    )]
294    pub complimentary_credits_amount: Option<f64>,
295}
296
297/// `EnableSaasDto` from the GoHighLevel OpenAPI spec.
298#[derive(Debug, Clone, Default, Serialize, Deserialize)]
299pub struct EnableSaasDto {
300    /// Stripe account id(Required only for SaaS V1)
301    #[serde(
302        rename = "stripeAccountId",
303        default,
304        skip_serializing_if = "Option::is_none"
305    )]
306    pub stripe_account_id: Option<String>,
307    /// Name of the stripe customer(Required only for SaaS V1)
308    #[serde(default, skip_serializing_if = "Option::is_none")]
309    pub name: Option<String>,
310    /// Email of the stripe customer(Required only for SaaS V1)
311    #[serde(default, skip_serializing_if = "Option::is_none")]
312    pub email: Option<String>,
313    /// Stripe customer id if exists(Required only for SaaS V1)
314    #[serde(
315        rename = "stripeCustomerId",
316        default,
317        skip_serializing_if = "Option::is_none"
318    )]
319    pub stripe_customer_id: Option<String>,
320    /// Required by the API.
321    #[serde(rename = "companyId")]
322    pub company_id: String,
323    /// Denotes if it is a saas v2 or v1 sub-account
324    /// Required by the API.
325    #[serde(rename = "isSaaSV2")]
326    pub is_saa_sv2: bool,
327    /// Agency subaccount used for payment provider integration(Required Only for SaaS V2)
328    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
329    pub contact_id: Option<String>,
330    /// Agency Subaccount ID
331    #[serde(
332        rename = "providerLocationId",
333        default,
334        skip_serializing_if = "Option::is_none"
335    )]
336    pub provider_location_id: Option<String>,
337    /// Description
338    #[serde(default, skip_serializing_if = "Option::is_none")]
339    pub description: Option<String>,
340    /// Required only while pre-configuring saas subscription
341    #[serde(
342        rename = "saasPlanId",
343        default,
344        skip_serializing_if = "Option::is_none"
345    )]
346    pub saas_plan_id: Option<String>,
347    /// Required only while pre-configuring saas subscription
348    #[serde(rename = "priceId", default, skip_serializing_if = "Option::is_none")]
349    pub price_id: Option<String>,
350}
351
352/// `EnableSaasResponseDto` from the GoHighLevel OpenAPI spec.
353#[derive(Debug, Clone, Default, Serialize, Deserialize)]
354pub struct EnableSaasResponseDto {
355    /// Response data from the enable SaaS operation
356    /// Required by the API.
357    /// (Optional here so responses that omit it still parse.)
358    #[serde(default, skip_serializing_if = "Option::is_none")]
359    pub data: Option<serde_json::Value>,
360}
361
362/// `GetSaasLocationsResponseDto` from the GoHighLevel OpenAPI spec.
363#[derive(Debug, Clone, Default, Serialize, Deserialize)]
364pub struct GetSaasLocationsResponseDto {
365    /// Array of SaaS locations
366    /// Required by the API.
367    /// (Optional here so responses that omit it still parse.)
368    #[serde(default, skip_serializing_if = "Vec::is_empty")]
369    pub locations: Vec<SaasLocationDto>,
370    /// Nested object; raw JSON (see the API docs for its fields).
371    /// Required by the API.
372    /// (Optional here so responses that omit it still parse.)
373    #[serde(default, skip_serializing_if = "Option::is_none")]
374    pub pagination: Option<serde_json::Value>,
375}
376
377/// `InternalServerErrorDTO` from the GoHighLevel OpenAPI spec.
378#[derive(Debug, Clone, Default, Serialize, Deserialize)]
379pub struct InternalServerErrorDTO {
380    /// Status code
381    #[serde(
382        rename = "statusCode",
383        default,
384        skip_serializing_if = "Option::is_none"
385    )]
386    pub status_code: Option<f64>,
387    /// Error message
388    #[serde(default, skip_serializing_if = "Option::is_none")]
389    pub message: Option<String>,
390}
391
392/// `LocationSubscriptionResponseDto` from the GoHighLevel OpenAPI spec.
393#[derive(Debug, Clone, Default, Serialize, Deserialize)]
394pub struct LocationSubscriptionResponseDto {
395    /// Location ID
396    /// Required by the API.
397    /// (Optional here so responses that omit it still parse.)
398    #[serde(
399        rename = "locationId",
400        default,
401        skip_serializing_if = "Option::is_none"
402    )]
403    pub location_id: Option<String>,
404    /// Indicates if the SaaS is V2
405    /// Required by the API.
406    /// (Optional here so responses that omit it still parse.)
407    #[serde(rename = "isSaaSV2", default, skip_serializing_if = "Option::is_none")]
408    pub is_saa_sv2: Option<bool>,
409    /// Company ID
410    /// Required by the API.
411    /// (Optional here so responses that omit it still parse.)
412    #[serde(rename = "companyId", default, skip_serializing_if = "Option::is_none")]
413    pub company_id: Option<String>,
414    /// SaaS mode
415    #[serde(rename = "saasMode", default, skip_serializing_if = "Option::is_none")]
416    pub saas_mode: Option<String>,
417    /// Subscription ID
418    #[serde(
419        rename = "subscriptionId",
420        default,
421        skip_serializing_if = "Option::is_none"
422    )]
423    pub subscription_id: Option<String>,
424    /// Customer ID
425    #[serde(
426        rename = "customerId",
427        default,
428        skip_serializing_if = "Option::is_none"
429    )]
430    pub customer_id: Option<String>,
431    /// Product ID
432    #[serde(rename = "productId", default, skip_serializing_if = "Option::is_none")]
433    pub product_id: Option<String>,
434    /// Price ID
435    #[serde(rename = "priceId", default, skip_serializing_if = "Option::is_none")]
436    pub price_id: Option<String>,
437    /// SaaS plan ID
438    #[serde(
439        rename = "saasPlanId",
440        default,
441        skip_serializing_if = "Option::is_none"
442    )]
443    pub saas_plan_id: Option<String>,
444    /// Subscription status
445    #[serde(
446        rename = "subscriptionStatus",
447        default,
448        skip_serializing_if = "Option::is_none"
449    )]
450    pub subscription_status: Option<String>,
451}
452
453/// `LocationWalletBalanceDto` from the GoHighLevel OpenAPI spec.
454#[derive(Debug, Clone, Default, Serialize, Deserialize)]
455pub struct LocationWalletBalanceDto {
456    /// Wallet Id
457    /// Required by the API.
458    /// (Optional here so responses that omit it still parse.)
459    #[serde(rename = "walletId", default, skip_serializing_if = "Option::is_none")]
460    pub wallet_id: Option<String>,
461    /// Current wallet balance
462    /// Required by the API.
463    /// (Optional here so responses that omit it still parse.)
464    #[serde(default, skip_serializing_if = "Option::is_none")]
465    pub balance: Option<f64>,
466    /// Complimentary credits amount
467    /// Required by the API.
468    /// (Optional here so responses that omit it still parse.)
469    #[serde(
470        rename = "complimentaryCredits",
471        default,
472        skip_serializing_if = "Option::is_none"
473    )]
474    pub complimentary_credits: Option<f64>,
475}
476
477/// `PauseLocationDto` from the GoHighLevel OpenAPI spec.
478#[derive(Debug, Clone, Default, Serialize, Deserialize)]
479pub struct PauseLocationDto {
480    /// Paused
481    /// Required by the API.
482    pub paused: bool,
483    /// Company ID
484    /// Required by the API.
485    #[serde(rename = "companyId")]
486    pub company_id: String,
487}
488
489/// `ResourceNotFoundDTO` from the GoHighLevel OpenAPI spec.
490#[derive(Debug, Clone, Default, Serialize, Deserialize)]
491pub struct ResourceNotFoundDTO {
492    /// Status code
493    #[serde(
494        rename = "statusCode",
495        default,
496        skip_serializing_if = "Option::is_none"
497    )]
498    pub status_code: Option<f64>,
499    /// Error message
500    #[serde(default, skip_serializing_if = "Option::is_none")]
501    pub message: Option<String>,
502}
503
504/// `SaasLocationDto` from the GoHighLevel OpenAPI spec.
505#[derive(Debug, Clone, Default, Serialize, Deserialize)]
506pub struct SaasLocationDto {
507    /// Location ID
508    /// Required by the API.
509    /// (Optional here so responses that omit it still parse.)
510    #[serde(
511        rename = "locationId",
512        default,
513        skip_serializing_if = "Option::is_none"
514    )]
515    pub location_id: Option<String>,
516    /// Company ID
517    /// Required by the API.
518    /// (Optional here so responses that omit it still parse.)
519    #[serde(rename = "companyId", default, skip_serializing_if = "Option::is_none")]
520    pub company_id: Option<String>,
521    /// SaaS mode
522    /// Required by the API.
523    /// (Optional here so responses that omit it still parse.)
524    #[serde(rename = "saasMode", default, skip_serializing_if = "Option::is_none")]
525    pub saas_mode: Option<String>,
526    /// Subscription ID
527    /// Required by the API.
528    /// (Optional here so responses that omit it still parse.)
529    #[serde(
530        rename = "subscriptionId",
531        default,
532        skip_serializing_if = "Option::is_none"
533    )]
534    pub subscription_id: Option<String>,
535    /// Customer ID
536    #[serde(
537        rename = "customerId",
538        default,
539        skip_serializing_if = "Option::is_none"
540    )]
541    pub customer_id: Option<String>,
542    /// Name
543    #[serde(default, skip_serializing_if = "Option::is_none")]
544    pub name: Option<String>,
545    /// Email
546    #[serde(default, skip_serializing_if = "Option::is_none")]
547    pub email: Option<String>,
548    /// Provider location ID
549    #[serde(
550        rename = "providerLocationId",
551        default,
552        skip_serializing_if = "Option::is_none"
553    )]
554    pub provider_location_id: Option<String>,
555    /// Indicates if the SaaS is V2
556    #[serde(rename = "isSaaSV2", default, skip_serializing_if = "Option::is_none")]
557    pub is_saa_sv2: Option<bool>,
558    /// Subscription information
559    #[serde(
560        rename = "subscriptionInfo",
561        default,
562        skip_serializing_if = "Option::is_none"
563    )]
564    pub subscription_info: Option<serde_json::Value>,
565}
566
567/// `SaasPlanResponseDto` from the GoHighLevel OpenAPI spec.
568#[derive(Debug, Clone, Default, Serialize, Deserialize)]
569pub struct SaasPlanResponseDto {
570    /// Unique identifier for the SaaS plan
571    /// Required by the API.
572    /// (Optional here so responses that omit it still parse.)
573    #[serde(rename = "planId", default, skip_serializing_if = "Option::is_none")]
574    pub plan_id: Option<String>,
575    /// Company ID associated with the SaaS plan
576    /// Required by the API.
577    /// (Optional here so responses that omit it still parse.)
578    #[serde(rename = "companyId", default, skip_serializing_if = "Option::is_none")]
579    pub company_id: Option<String>,
580    /// Title of the SaaS plan
581    /// Required by the API.
582    /// (Optional here so responses that omit it still parse.)
583    #[serde(default, skip_serializing_if = "Option::is_none")]
584    pub title: Option<String>,
585    /// Description of the SaaS plan
586    /// Required by the API.
587    /// (Optional here so responses that omit it still parse.)
588    #[serde(default, skip_serializing_if = "Option::is_none")]
589    pub description: Option<String>,
590    /// Array of SaaS products included in the plan
591    /// Required by the API.
592    /// (Optional here so responses that omit it still parse.)
593    #[serde(
594        rename = "saasProducts",
595        default,
596        skip_serializing_if = "Vec::is_empty"
597    )]
598    pub saas_products: Vec<String>,
599    /// Array of add-ons included in the plan
600    #[serde(rename = "addOns", default, skip_serializing_if = "Vec::is_empty")]
601    pub add_ons: Vec<String>,
602    /// Level of the plan (0-4)
603    /// Required by the API.
604    /// (Optional here so responses that omit it still parse.)
605    #[serde(rename = "planLevel", default, skip_serializing_if = "Option::is_none")]
606    pub plan_level: Option<f64>,
607    /// Trial period in days
608    /// Required by the API.
609    /// (Optional here so responses that omit it still parse.)
610    #[serde(
611        rename = "trialPeriod",
612        default,
613        skip_serializing_if = "Option::is_none"
614    )]
615    pub trial_period: Option<f64>,
616    /// Setup fee for the plan
617    #[serde(rename = "setupFee", default, skip_serializing_if = "Option::is_none")]
618    pub setup_fee: Option<f64>,
619    /// User limit for the plan
620    #[serde(rename = "userLimit", default, skip_serializing_if = "Option::is_none")]
621    pub user_limit: Option<f64>,
622    /// Contact limit for the plan
623    #[serde(
624        rename = "contactLimit",
625        default,
626        skip_serializing_if = "Option::is_none"
627    )]
628    pub contact_limit: Option<f64>,
629    /// Prices for the plan
630    /// Nested object; raw JSON (see the API docs for its fields).
631    /// Required by the API.
632    /// (Optional here so responses that omit it still parse.)
633    #[serde(default, skip_serializing_if = "Vec::is_empty")]
634    pub prices: Vec<serde_json::Value>,
635    /// Category ID for the plan
636    #[serde(
637        rename = "categoryId",
638        default,
639        skip_serializing_if = "Option::is_none"
640    )]
641    pub category_id: Option<String>,
642    /// Snapshot ID for the plan
643    #[serde(
644        rename = "snapshotId",
645        default,
646        skip_serializing_if = "Option::is_none"
647    )]
648    pub snapshot_id: Option<String>,
649    /// Provider location ID
650    #[serde(
651        rename = "providerLocationId",
652        default,
653        skip_serializing_if = "Option::is_none"
654    )]
655    pub provider_location_id: Option<String>,
656    /// Product ID for the plan
657    #[serde(rename = "productId", default, skip_serializing_if = "Option::is_none")]
658    pub product_id: Option<String>,
659    /// Indicates if this is a SaaS V2 plan
660    /// Required by the API.
661    /// (Optional here so responses that omit it still parse.)
662    #[serde(rename = "isSaaSV2", default, skip_serializing_if = "Option::is_none")]
663    pub is_saa_sv2: Option<bool>,
664    /// Creation timestamp
665    /// Format: date-time (ISO-8601 string).
666    /// Required by the API.
667    /// (Optional here so responses that omit it still parse.)
668    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
669    pub created_at: Option<String>,
670    /// Last update timestamp
671    /// Format: date-time (ISO-8601 string).
672    /// Required by the API.
673    /// (Optional here so responses that omit it still parse.)
674    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
675    pub updated_at: Option<String>,
676}
677
678/// `UnauthorizedDTO` from the GoHighLevel OpenAPI spec.
679#[derive(Debug, Clone, Default, Serialize, Deserialize)]
680pub struct UnauthorizedDTO {
681    /// Status code
682    #[serde(
683        rename = "statusCode",
684        default,
685        skip_serializing_if = "Option::is_none"
686    )]
687    pub status_code: Option<f64>,
688    /// Error message
689    #[serde(default, skip_serializing_if = "Option::is_none")]
690    pub message: Option<String>,
691    /// Error message
692    #[serde(default, skip_serializing_if = "Option::is_none")]
693    pub error: Option<String>,
694}
695
696/// `UpdateRebillingDto` from the GoHighLevel OpenAPI spec.
697#[derive(Debug, Clone, Default, Serialize, Deserialize)]
698pub struct UpdateRebillingDto {
699    /// The product to update rebilling for
700    /// Allowed values: `contentAI`, `workflow_premium_actions`, `workflow_ai`,
701    /// `conversationAI`, `EmailNotification`, `whatsApp`, `reviewsAI`, `VERIFIED_CALLER_ID`,
702    /// `WALLET_SALES_TAX`, `NOTIFICATION_SMS`, `EmailSmtp`, `EmailVerification`.
703    /// Required by the API.
704    pub product: String,
705    /// Array of location IDs to update rebilling for
706    /// Required by the API.
707    #[serde(rename = "locationIds", default, skip_serializing_if = "Vec::is_empty")]
708    pub location_ids: Vec<String>,
709    /// Configuration for rebilling settings
710    /// Nested object; raw JSON (see the API docs for its fields).
711    /// Required by the API.
712    pub config: serde_json::Value,
713}
714
715/// `UpdateRebillingResponseDto` from the GoHighLevel OpenAPI spec.
716#[derive(Debug, Clone, Default, Serialize, Deserialize)]
717pub struct UpdateRebillingResponseDto {
718    /// Indicates if the rebilling update was successful
719    /// Required by the API.
720    /// (Optional here so responses that omit it still parse.)
721    #[serde(default, skip_serializing_if = "Option::is_none")]
722    pub success: Option<bool>,
723}
724
725/// `UpdateSubscriptionDto` from the GoHighLevel OpenAPI spec.
726#[derive(Debug, Clone, Default, Serialize, Deserialize)]
727pub struct UpdateSubscriptionDto {
728    /// Subscription ID
729    /// Required by the API.
730    #[serde(rename = "subscriptionId")]
731    pub subscription_id: String,
732    /// Customer ID
733    /// Required by the API.
734    #[serde(rename = "customerId")]
735    pub customer_id: String,
736    /// Company ID
737    /// Required by the API.
738    #[serde(rename = "companyId")]
739    pub company_id: String,
740}