Skip to main content

ghl_models/v2/
products.rs

1//! `products` data models for GoHighLevel API V2 (64 types).
2//!
3//! Generated from HighLevel's official OpenAPI spec for the
4//! **Products** module. Every endpoint that uses these types, with its
5//! parameters, required scopes and enum values, is documented in the
6//! [`products` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/products.md).
7//!
8//! Enable with `features = ["products"]`.
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/// `BulkEditPriceDto` from the GoHighLevel OpenAPI spec.
22#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct BulkEditPriceDto {
24    /// Price ID
25    /// Required by the API.
26    #[serde(rename = "_id")]
27    pub id: String,
28    /// Price name
29    #[serde(default, skip_serializing_if = "Option::is_none")]
30    pub name: Option<String>,
31    /// Price amount
32    #[serde(default, skip_serializing_if = "Option::is_none")]
33    pub amount: Option<f64>,
34    /// Price currency
35    #[serde(default, skip_serializing_if = "Option::is_none")]
36    pub currency: Option<String>,
37    /// Compare at price
38    #[serde(
39        rename = "compareAtPrice",
40        default,
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub compare_at_price: Option<f64>,
44    /// Available quantity
45    #[serde(
46        rename = "availableQuantity",
47        default,
48        skip_serializing_if = "Option::is_none"
49    )]
50    pub available_quantity: Option<f64>,
51    /// Track inventory
52    #[serde(
53        rename = "trackInventory",
54        default,
55        skip_serializing_if = "Option::is_none"
56    )]
57    pub track_inventory: Option<bool>,
58    /// Allow out of stock purchases
59    #[serde(
60        rename = "allowOutOfStockPurchases",
61        default,
62        skip_serializing_if = "Option::is_none"
63    )]
64    pub allow_out_of_stock_purchases: Option<bool>,
65    /// SKU
66    #[serde(default, skip_serializing_if = "Option::is_none")]
67    pub sku: Option<String>,
68    /// Trial period in days
69    #[serde(
70        rename = "trialPeriod",
71        default,
72        skip_serializing_if = "Option::is_none"
73    )]
74    pub trial_period: Option<f64>,
75    /// Total billing cycles
76    #[serde(
77        rename = "totalCycles",
78        default,
79        skip_serializing_if = "Option::is_none"
80    )]
81    pub total_cycles: Option<f64>,
82    /// Setup fee
83    #[serde(rename = "setupFee", default, skip_serializing_if = "Option::is_none")]
84    pub setup_fee: Option<f64>,
85    /// Shipping options
86    #[serde(
87        rename = "shippingOptions",
88        default,
89        skip_serializing_if = "Option::is_none"
90    )]
91    pub shipping_options: Option<ShippingOptionsDto>,
92    /// Recurring details
93    #[serde(default, skip_serializing_if = "Option::is_none")]
94    pub recurring: Option<RecurringDto>,
95}
96
97/// `BulkEditProductDto` from the GoHighLevel OpenAPI spec.
98#[derive(Debug, Clone, Default, Serialize, Deserialize)]
99pub struct BulkEditProductDto {
100    /// Product ID
101    /// Required by the API.
102    #[serde(rename = "_id")]
103    pub id: String,
104    /// Product name
105    #[serde(default, skip_serializing_if = "Option::is_none")]
106    pub name: Option<String>,
107    /// Product description
108    #[serde(default, skip_serializing_if = "Option::is_none")]
109    pub description: Option<String>,
110    /// Product image
111    #[serde(default, skip_serializing_if = "Option::is_none")]
112    pub image: Option<String>,
113    /// Product availability in store
114    #[serde(
115        rename = "availableInStore",
116        default,
117        skip_serializing_if = "Option::is_none"
118    )]
119    pub available_in_store: Option<bool>,
120    /// Array of price variants for the product
121    #[serde(default, skip_serializing_if = "Vec::is_empty")]
122    pub prices: Vec<BulkEditPriceDto>,
123    /// Collection IDs
124    #[serde(
125        rename = "collectionIds",
126        default,
127        skip_serializing_if = "Vec::is_empty"
128    )]
129    pub collection_ids: Vec<String>,
130    /// Enable product label
131    #[serde(
132        rename = "isLabelEnabled",
133        default,
134        skip_serializing_if = "Option::is_none"
135    )]
136    pub is_label_enabled: Option<bool>,
137    /// Enable taxes
138    #[serde(
139        rename = "isTaxesEnabled",
140        default,
141        skip_serializing_if = "Option::is_none"
142    )]
143    pub is_taxes_enabled: Option<bool>,
144    /// SEO metadata for the product
145    #[serde(default, skip_serializing_if = "Option::is_none")]
146    pub seo: Option<ProductSEODto>,
147    /// Product URL slug
148    #[serde(default, skip_serializing_if = "Option::is_none")]
149    pub slug: Option<String>,
150    /// Automatic tax category ID
151    #[serde(
152        rename = "automaticTaxCategoryId",
153        default,
154        skip_serializing_if = "Option::is_none"
155    )]
156    pub automatic_tax_category_id: Option<String>,
157    /// Tax inclusive pricing
158    #[serde(
159        rename = "taxInclusive",
160        default,
161        skip_serializing_if = "Option::is_none"
162    )]
163    pub tax_inclusive: Option<bool>,
164    /// Product taxes
165    #[serde(default, skip_serializing_if = "Vec::is_empty")]
166    pub taxes: Vec<serde_json::Value>,
167    /// Product media
168    #[serde(default, skip_serializing_if = "Vec::is_empty")]
169    pub medias: Vec<serde_json::Value>,
170    /// Product label
171    #[serde(default, skip_serializing_if = "Option::is_none")]
172    pub label: Option<serde_json::Value>,
173}
174
175/// `BulkEditRequestDto` from the GoHighLevel OpenAPI spec.
176#[derive(Debug, Clone, Default, Serialize, Deserialize)]
177pub struct BulkEditRequestDto {
178    /// Location Id or Agency Id
179    /// Required by the API.
180    #[serde(rename = "altId")]
181    pub alt_id: String,
182    /// Allowed values: `location`.
183    /// Required by the API.
184    #[serde(rename = "altType")]
185    pub alt_type: String,
186    /// Array of products to update. Note: The total count includes all prices within each
187    /// product.
188    /// Required by the API.
189    #[serde(default, skip_serializing_if = "Vec::is_empty")]
190    pub products: Vec<BulkEditProductDto>,
191}
192
193/// `BulkEditResponseDto` from the GoHighLevel OpenAPI spec.
194#[derive(Debug, Clone, Default, Serialize, Deserialize)]
195pub struct BulkEditResponseDto {
196    /// Success message
197    /// Required by the API.
198    /// (Optional here so responses that omit it still parse.)
199    #[serde(default, skip_serializing_if = "Option::is_none")]
200    pub message: Option<String>,
201    /// Operation status
202    /// Required by the API.
203    /// (Optional here so responses that omit it still parse.)
204    #[serde(default, skip_serializing_if = "Option::is_none")]
205    pub status: Option<bool>,
206    /// Number of products updated
207    /// Required by the API.
208    /// (Optional here so responses that omit it still parse.)
209    #[serde(
210        rename = "updatedCount",
211        default,
212        skip_serializing_if = "Option::is_none"
213    )]
214    pub updated_count: Option<f64>,
215}
216
217/// `BulkUpdateDto` from the GoHighLevel OpenAPI spec.
218#[derive(Debug, Clone, Default, Serialize, Deserialize)]
219pub struct BulkUpdateDto {
220    /// Location Id or Agency Id
221    /// Required by the API.
222    #[serde(rename = "altId")]
223    pub alt_id: String,
224    /// Allowed values: `location`.
225    /// Required by the API.
226    #[serde(rename = "altType")]
227    pub alt_type: String,
228    /// Type of bulk update operation
229    /// Allowed values: `bulk-update-price`, `bulk-update-availability`,
230    /// `bulk-update-product-collection`, `bulk-delete-products`, `bulk-update-currency`.
231    /// Required by the API.
232    #[serde(rename = "type")]
233    pub type_: String,
234    /// Array of product IDs
235    /// Required by the API.
236    #[serde(rename = "productIds", default, skip_serializing_if = "Vec::is_empty")]
237    pub product_ids: Vec<String>,
238    /// Filters to apply when selectAll is true
239    #[serde(default, skip_serializing_if = "Option::is_none")]
240    pub filters: Option<BulkUpdateFilters>,
241    /// Price update configuration
242    #[serde(default, skip_serializing_if = "Option::is_none")]
243    pub price: Option<PriceUpdateField>,
244    /// Compare at price update configuration
245    #[serde(
246        rename = "compareAtPrice",
247        default,
248        skip_serializing_if = "Option::is_none"
249    )]
250    pub compare_at_price: Option<PriceUpdateField>,
251    /// New availability status
252    #[serde(default, skip_serializing_if = "Option::is_none")]
253    pub availability: Option<bool>,
254    /// Array of collection IDs
255    #[serde(
256        rename = "collectionIds",
257        default,
258        skip_serializing_if = "Vec::is_empty"
259    )]
260    pub collection_ids: Vec<String>,
261    /// Currency code
262    #[serde(default, skip_serializing_if = "Option::is_none")]
263    pub currency: Option<String>,
264}
265
266/// `BulkUpdateFilters` from the GoHighLevel OpenAPI spec.
267#[derive(Debug, Clone, Default, Serialize, Deserialize)]
268pub struct BulkUpdateFilters {
269    /// Filter by collection IDs
270    #[serde(
271        rename = "collectionIds",
272        default,
273        skip_serializing_if = "Vec::is_empty"
274    )]
275    pub collection_ids: Vec<String>,
276    /// Filter by product type
277    #[serde(
278        rename = "productType",
279        default,
280        skip_serializing_if = "Option::is_none"
281    )]
282    pub product_type: Option<String>,
283    /// Filter by availability status
284    #[serde(
285        rename = "availableInStore",
286        default,
287        skip_serializing_if = "Option::is_none"
288    )]
289    pub available_in_store: Option<bool>,
290    /// Filter by search term
291    #[serde(default, skip_serializing_if = "Option::is_none")]
292    pub search: Option<String>,
293}
294
295/// `BulkUpdateResponseDto` from the GoHighLevel OpenAPI spec.
296#[derive(Debug, Clone, Default, Serialize, Deserialize)]
297pub struct BulkUpdateResponseDto {
298    /// Status of api action
299    /// Required by the API.
300    /// (Optional here so responses that omit it still parse.)
301    #[serde(default, skip_serializing_if = "Option::is_none")]
302    pub status: Option<bool>,
303    /// Success message
304    #[serde(default, skip_serializing_if = "Option::is_none")]
305    pub message: Option<String>,
306}
307
308/// `CollectionSEODto` from the GoHighLevel OpenAPI spec.
309#[derive(Debug, Clone, Default, Serialize, Deserialize)]
310pub struct CollectionSEODto {
311    /// The title which will be displayed as an SEO format
312    #[serde(default, skip_serializing_if = "Option::is_none")]
313    pub title: Option<String>,
314    /// The description which would be displayed in preview purposes
315    #[serde(default, skip_serializing_if = "Option::is_none")]
316    pub description: Option<String>,
317}
318
319/// `CollectionSchema` from the GoHighLevel OpenAPI spec.
320#[derive(Debug, Clone, Default, Serialize, Deserialize)]
321pub struct CollectionSchema {
322    /// The unique identifier for the collection
323    /// Required by the API.
324    /// (Optional here so responses that omit it still parse.)
325    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
326    pub id: Option<String>,
327    /// Location Id to which the collection is associated
328    /// Required by the API.
329    /// (Optional here so responses that omit it still parse.)
330    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
331    pub alt_id: Option<String>,
332    /// Name of the collection
333    /// Required by the API.
334    /// (Optional here so responses that omit it still parse.)
335    #[serde(default, skip_serializing_if = "Option::is_none")]
336    pub name: Option<String>,
337    /// Slug of the collection with which navigation is established. Special Characters and
338    /// spacing is not allowed and should be unique
339    /// Required by the API.
340    /// (Optional here so responses that omit it still parse.)
341    #[serde(default, skip_serializing_if = "Option::is_none")]
342    pub slug: Option<String>,
343    /// The URL of the image that is going to be displayed as the collection Thumbnail
344    /// Required by the API.
345    /// (Optional here so responses that omit it still parse.)
346    #[serde(default, skip_serializing_if = "Option::is_none")]
347    pub image: Option<String>,
348    /// The information which will be displayed in SEO previews
349    /// Required by the API.
350    /// (Optional here so responses that omit it still parse.)
351    #[serde(default, skip_serializing_if = "Option::is_none")]
352    pub seo: Option<CollectionSEODto>,
353    /// Date at which the collection was created
354    /// Required by the API.
355    /// (Optional here so responses that omit it still parse.)
356    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
357    pub created_at: Option<String>,
358}
359
360/// `CountReviewsByStatusResponseDto` from the GoHighLevel OpenAPI spec.
361#[derive(Debug, Clone, Default, Serialize, Deserialize)]
362pub struct CountReviewsByStatusResponseDto {
363    /// Array of review status counts
364    /// Required by the API.
365    /// (Optional here so responses that omit it still parse.)
366    #[serde(default, skip_serializing_if = "Vec::is_empty")]
367    pub data: Vec<Vec<serde_json::Value>>,
368}
369
370/// `CreateCollectionResponseDto` from the GoHighLevel OpenAPI spec.
371#[derive(Debug, Clone, Default, Serialize, Deserialize)]
372pub struct CreateCollectionResponseDto {
373    /// created Collection
374    /// Required by the API.
375    /// (Optional here so responses that omit it still parse.)
376    #[serde(default, skip_serializing_if = "Option::is_none")]
377    pub data: Option<CollectionSchema>,
378}
379
380/// `CreatePriceDto` from the GoHighLevel OpenAPI spec.
381#[derive(Debug, Clone, Default, Serialize, Deserialize)]
382pub struct CreatePriceDto {
383    /// The name of the price.
384    /// Required by the API.
385    pub name: String,
386    /// The type of the price.
387    /// Allowed values: `one_time`, `recurring`.
388    /// Required by the API.
389    #[serde(rename = "type")]
390    pub type_: String,
391    /// The currency of the price.
392    /// Required by the API.
393    pub currency: String,
394    /// The amount of the price. ( min: 0 )
395    /// Required by the API.
396    pub amount: f64,
397    /// The recurring details of the price (if type is recurring).
398    #[serde(default, skip_serializing_if = "Option::is_none")]
399    pub recurring: Option<RecurringDto>,
400    /// A brief description of the price.
401    #[serde(default, skip_serializing_if = "Option::is_none")]
402    pub description: Option<String>,
403    /// An array of membership offers associated with the price.
404    #[serde(
405        rename = "membershipOffers",
406        default,
407        skip_serializing_if = "Vec::is_empty"
408    )]
409    pub membership_offers: Vec<MembershipOfferDto>,
410    /// The trial period duration in days (if applicable).
411    #[serde(
412        rename = "trialPeriod",
413        default,
414        skip_serializing_if = "Option::is_none"
415    )]
416    pub trial_period: Option<f64>,
417    /// The total number of billing cycles for the price. ( min: 1 )
418    #[serde(
419        rename = "totalCycles",
420        default,
421        skip_serializing_if = "Option::is_none"
422    )]
423    pub total_cycles: Option<f64>,
424    /// The setup fee for the price.
425    #[serde(rename = "setupFee", default, skip_serializing_if = "Option::is_none")]
426    pub setup_fee: Option<f64>,
427    /// An array of variant option IDs associated with the price.
428    #[serde(
429        rename = "variantOptionIds",
430        default,
431        skip_serializing_if = "Vec::is_empty"
432    )]
433    pub variant_option_ids: Vec<String>,
434    /// The compare at price for the price.
435    #[serde(
436        rename = "compareAtPrice",
437        default,
438        skip_serializing_if = "Option::is_none"
439    )]
440    pub compare_at_price: Option<f64>,
441    /// The unique identifier of the location associated with the price.
442    /// Required by the API.
443    #[serde(rename = "locationId")]
444    pub location_id: String,
445    /// The unique identifier of the user who created the price.
446    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
447    pub user_id: Option<String>,
448    /// Additional metadata associated with the price.
449    #[serde(default, skip_serializing_if = "Option::is_none")]
450    pub meta: Option<PriceMetaDto>,
451    /// Need to track inventory stock quantity
452    #[serde(
453        rename = "trackInventory",
454        default,
455        skip_serializing_if = "Option::is_none"
456    )]
457    pub track_inventory: Option<bool>,
458    /// Available inventory stock quantity
459    #[serde(
460        rename = "availableQuantity",
461        default,
462        skip_serializing_if = "Option::is_none"
463    )]
464    pub available_quantity: Option<f64>,
465    /// Continue selling when out of stock
466    #[serde(
467        rename = "allowOutOfStockPurchases",
468        default,
469        skip_serializing_if = "Option::is_none"
470    )]
471    pub allow_out_of_stock_purchases: Option<bool>,
472    /// The unique identifier of the SKU associated with the price
473    #[serde(default, skip_serializing_if = "Option::is_none")]
474    pub sku: Option<String>,
475    /// Shipping options of the Price
476    #[serde(
477        rename = "shippingOptions",
478        default,
479        skip_serializing_if = "Option::is_none"
480    )]
481    pub shipping_options: Option<ShippingOptionsDto>,
482    /// Is the product a digital product
483    #[serde(
484        rename = "isDigitalProduct",
485        default,
486        skip_serializing_if = "Option::is_none"
487    )]
488    pub is_digital_product: Option<bool>,
489    /// Digital delivery options
490    #[serde(
491        rename = "digitalDelivery",
492        default,
493        skip_serializing_if = "Vec::is_empty"
494    )]
495    pub digital_delivery: Vec<String>,
496}
497
498/// `CreatePriceResponseDto` from the GoHighLevel OpenAPI spec.
499#[derive(Debug, Clone, Default, Serialize, Deserialize)]
500pub struct CreatePriceResponseDto {
501    /// The unique identifier for the price.
502    /// Required by the API.
503    /// (Optional here so responses that omit it still parse.)
504    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
505    pub id: Option<String>,
506    /// An array of membership offers associated with the price.
507    #[serde(
508        rename = "membershipOffers",
509        default,
510        skip_serializing_if = "Vec::is_empty"
511    )]
512    pub membership_offers: Vec<MembershipOfferDto>,
513    /// An array of variant option IDs associated with the price.
514    #[serde(
515        rename = "variantOptionIds",
516        default,
517        skip_serializing_if = "Vec::is_empty"
518    )]
519    pub variant_option_ids: Vec<String>,
520    /// The unique identifier for the location.
521    #[serde(
522        rename = "locationId",
523        default,
524        skip_serializing_if = "Option::is_none"
525    )]
526    pub location_id: Option<String>,
527    /// The unique identifier for the associated product.
528    #[serde(default, skip_serializing_if = "Option::is_none")]
529    pub product: Option<String>,
530    /// The unique identifier for the user.
531    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
532    pub user_id: Option<String>,
533    /// The name of the price.
534    /// Required by the API.
535    /// (Optional here so responses that omit it still parse.)
536    #[serde(default, skip_serializing_if = "Option::is_none")]
537    pub name: Option<String>,
538    /// The type of the price (e.g., one_time).
539    /// Allowed values: `one_time`, `recurring`.
540    /// Required by the API.
541    /// (Optional here so responses that omit it still parse.)
542    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
543    pub type_: Option<String>,
544    /// The currency code for the price.
545    /// Required by the API.
546    /// (Optional here so responses that omit it still parse.)
547    #[serde(default, skip_serializing_if = "Option::is_none")]
548    pub currency: Option<String>,
549    /// The amount of the price.
550    /// Required by the API.
551    /// (Optional here so responses that omit it still parse.)
552    #[serde(default, skip_serializing_if = "Option::is_none")]
553    pub amount: Option<f64>,
554    /// The recurring details of the price (if type is recurring).
555    #[serde(default, skip_serializing_if = "Option::is_none")]
556    pub recurring: Option<RecurringDto>,
557    /// The creation timestamp of the price.
558    /// Format: date-time (ISO-8601 string).
559    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
560    pub created_at: Option<String>,
561    /// The last update timestamp of the price.
562    /// Format: date-time (ISO-8601 string).
563    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
564    pub updated_at: Option<String>,
565    /// The compare-at price for comparison purposes.
566    #[serde(
567        rename = "compareAtPrice",
568        default,
569        skip_serializing_if = "Option::is_none"
570    )]
571    pub compare_at_price: Option<f64>,
572    /// Indicates whether inventory tracking is enabled.
573    #[serde(
574        rename = "trackInventory",
575        default,
576        skip_serializing_if = "Option::is_none"
577    )]
578    pub track_inventory: Option<bool>,
579    /// Available inventory stock quantity
580    #[serde(
581        rename = "availableQuantity",
582        default,
583        skip_serializing_if = "Option::is_none"
584    )]
585    pub available_quantity: Option<f64>,
586    /// Continue selling when out of stock
587    #[serde(
588        rename = "allowOutOfStockPurchases",
589        default,
590        skip_serializing_if = "Option::is_none"
591    )]
592    pub allow_out_of_stock_purchases: Option<bool>,
593}
594
595/// `CreateProductCollectionsDto` from the GoHighLevel OpenAPI spec.
596#[derive(Debug, Clone, Default, Serialize, Deserialize)]
597pub struct CreateProductCollectionsDto {
598    /// Location Id
599    /// Required by the API.
600    #[serde(rename = "altId")]
601    pub alt_id: String,
602    /// The type of alt. For now it is only LOCATION
603    /// Allowed values: `location`.
604    /// Required by the API.
605    #[serde(rename = "altType")]
606    pub alt_type: String,
607    /// Unique Identifier of the Product Collection, Mongo Id
608    #[serde(
609        rename = "collectionId",
610        default,
611        skip_serializing_if = "Option::is_none"
612    )]
613    pub collection_id: Option<String>,
614    /// Name of the Product Collection
615    /// Required by the API.
616    pub name: String,
617    /// Slug of the Product Collection which helps in navigation
618    /// Required by the API.
619    pub slug: String,
620    /// The URL of the image that is going to be displayed as the collection Thumbnail
621    #[serde(default, skip_serializing_if = "Option::is_none")]
622    pub image: Option<String>,
623    /// The metadata information which will be displayed in SEO previews
624    #[serde(default, skip_serializing_if = "Option::is_none")]
625    pub seo: Option<CollectionSEODto>,
626}
627
628/// `CreateProductDto` from the GoHighLevel OpenAPI spec.
629#[derive(Debug, Clone, Default, Serialize, Deserialize)]
630pub struct CreateProductDto {
631    /// The name of the product.
632    /// Required by the API.
633    pub name: String,
634    /// The unique identifier for the location.
635    /// Required by the API.
636    #[serde(rename = "locationId")]
637    pub location_id: String,
638    /// A brief description of the product.
639    #[serde(default, skip_serializing_if = "Option::is_none")]
640    pub description: Option<String>,
641    /// Allowed values: `DIGITAL`, `PHYSICAL`, `SERVICE`, `PHYSICAL/DIGITAL`.
642    /// Required by the API.
643    #[serde(rename = "productType")]
644    pub product_type: String,
645    /// The URL for the product image.
646    #[serde(default, skip_serializing_if = "Option::is_none")]
647    pub image: Option<String>,
648    /// The statement descriptor for the product.
649    #[serde(
650        rename = "statementDescriptor",
651        default,
652        skip_serializing_if = "Option::is_none"
653    )]
654    pub statement_descriptor: Option<String>,
655    /// Indicates whether the product is available in-store.
656    #[serde(
657        rename = "availableInStore",
658        default,
659        skip_serializing_if = "Option::is_none"
660    )]
661    pub available_in_store: Option<bool>,
662    /// An array of medias for the product.
663    #[serde(default, skip_serializing_if = "Vec::is_empty")]
664    pub medias: Vec<ProductMediaDto>,
665    /// An array of variants for the product.
666    #[serde(default, skip_serializing_if = "Vec::is_empty")]
667    pub variants: Vec<ProductVariantDto>,
668    /// An array of category Ids for the product
669    #[serde(
670        rename = "collectionIds",
671        default,
672        skip_serializing_if = "Vec::is_empty"
673    )]
674    pub collection_ids: Vec<String>,
675    /// Are there any taxes attached to the product. If this is true, taxes array cannot be
676    /// empty.
677    #[serde(
678        rename = "isTaxesEnabled",
679        default,
680        skip_serializing_if = "Option::is_none"
681    )]
682    pub is_taxes_enabled: Option<bool>,
683    /// List of ids of Taxes attached to the Product. If taxes are passed, isTaxesEnabled should
684    /// be true.
685    #[serde(default, skip_serializing_if = "Vec::is_empty")]
686    pub taxes: Vec<String>,
687    /// Tax category ID for Automatic taxes calculation.
688    #[serde(
689        rename = "automaticTaxCategoryId",
690        default,
691        skip_serializing_if = "Option::is_none"
692    )]
693    pub automatic_tax_category_id: Option<String>,
694    /// Is the product label enabled. If this is true, label object cannot be empty.
695    #[serde(
696        rename = "isLabelEnabled",
697        default,
698        skip_serializing_if = "Option::is_none"
699    )]
700    pub is_label_enabled: Option<bool>,
701    /// Details for Product Label
702    #[serde(default, skip_serializing_if = "Option::is_none")]
703    pub label: Option<ProductLabelDto>,
704    /// The slug using which the product navigation will be handled
705    #[serde(default, skip_serializing_if = "Option::is_none")]
706    pub slug: Option<String>,
707    /// SEO data for the product that will be displayed in the preview
708    #[serde(default, skip_serializing_if = "Option::is_none")]
709    pub seo: Option<ProductSEODto>,
710    /// Whether the taxes should be included in the purchase price
711    #[serde(
712        rename = "taxInclusive",
713        default,
714        skip_serializing_if = "Option::is_none"
715    )]
716    pub tax_inclusive: Option<bool>,
717}
718
719/// `CreateProductResponseDto` from the GoHighLevel OpenAPI spec.
720#[derive(Debug, Clone, Default, Serialize, Deserialize)]
721pub struct CreateProductResponseDto {
722    /// The unique identifier for the product.
723    /// Required by the API.
724    /// (Optional here so responses that omit it still parse.)
725    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
726    pub id: Option<String>,
727    /// product description
728    #[serde(default, skip_serializing_if = "Option::is_none")]
729    pub description: Option<String>,
730    /// An array of variants for the product.
731    #[serde(default, skip_serializing_if = "Vec::is_empty")]
732    pub variants: Vec<ProductVariantDto>,
733    /// The unique identifier for the location.
734    /// Required by the API.
735    /// (Optional here so responses that omit it still parse.)
736    #[serde(
737        rename = "locationId",
738        default,
739        skip_serializing_if = "Option::is_none"
740    )]
741    pub location_id: Option<String>,
742    /// The name of the product.
743    /// Required by the API.
744    /// (Optional here so responses that omit it still parse.)
745    #[serde(default, skip_serializing_if = "Option::is_none")]
746    pub name: Option<String>,
747    /// The type of the product (e.g., PHYSICAL).
748    /// Required by the API.
749    /// (Optional here so responses that omit it still parse.)
750    #[serde(
751        rename = "productType",
752        default,
753        skip_serializing_if = "Option::is_none"
754    )]
755    pub product_type: Option<String>,
756    /// Indicates whether the product is available in-store.
757    #[serde(
758        rename = "availableInStore",
759        default,
760        skip_serializing_if = "Option::is_none"
761    )]
762    pub available_in_store: Option<bool>,
763    /// The creation timestamp of the product.
764    /// Format: date-time (ISO-8601 string).
765    /// Required by the API.
766    /// (Optional here so responses that omit it still parse.)
767    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
768    pub created_at: Option<String>,
769    /// The last update timestamp of the product.
770    /// Format: date-time (ISO-8601 string).
771    /// Required by the API.
772    /// (Optional here so responses that omit it still parse.)
773    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
774    pub updated_at: Option<String>,
775    /// The statement descriptor for the product.
776    #[serde(
777        rename = "statementDescriptor",
778        default,
779        skip_serializing_if = "Option::is_none"
780    )]
781    pub statement_descriptor: Option<String>,
782    /// The URL for the product image.
783    #[serde(default, skip_serializing_if = "Option::is_none")]
784    pub image: Option<String>,
785    /// An array of category Ids for the product
786    #[serde(
787        rename = "collectionIds",
788        default,
789        skip_serializing_if = "Vec::is_empty"
790    )]
791    pub collection_ids: Vec<String>,
792    /// The field indicates whether taxes are enabled for the product or not.
793    #[serde(
794        rename = "isTaxesEnabled",
795        default,
796        skip_serializing_if = "Option::is_none"
797    )]
798    pub is_taxes_enabled: Option<bool>,
799    /// An array of ids of Taxes attached to the Product. If the expand query includes tax, the
800    /// taxes will be of type `ProductTaxDto`. Please refer to the `ProductTaxDto` for
801    /// additional details.
802    #[serde(default, skip_serializing_if = "Vec::is_empty")]
803    pub taxes: Vec<String>,
804    /// Tax category ID for Automatic taxes calculation.
805    #[serde(
806        rename = "automaticTaxCategoryId",
807        default,
808        skip_serializing_if = "Option::is_none"
809    )]
810    pub automatic_tax_category_id: Option<String>,
811    /// The Product label details
812    #[serde(default, skip_serializing_if = "Option::is_none")]
813    pub label: Option<ProductLabelDto>,
814    /// The slug of the product by which the product will be navigated
815    #[serde(default, skip_serializing_if = "Option::is_none")]
816    pub slug: Option<String>,
817}
818
819/// `DefaultCollectionResponseDto` from the GoHighLevel OpenAPI spec.
820#[derive(Debug, Clone, Default, Serialize, Deserialize)]
821pub struct DefaultCollectionResponseDto {
822    /// Collection Data
823    /// Required by the API.
824    /// (Optional here so responses that omit it still parse.)
825    #[serde(default, skip_serializing_if = "Option::is_none")]
826    pub data: Option<ProductCategories>,
827    /// Status of the operation
828    /// Required by the API.
829    /// (Optional here so responses that omit it still parse.)
830    #[serde(default, skip_serializing_if = "Option::is_none")]
831    pub status: Option<bool>,
832}
833
834/// `DefaultPriceResponseDto` from the GoHighLevel OpenAPI spec.
835#[derive(Debug, Clone, Default, Serialize, Deserialize)]
836pub struct DefaultPriceResponseDto {
837    /// The unique identifier for the price.
838    /// Required by the API.
839    /// (Optional here so responses that omit it still parse.)
840    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
841    pub id: Option<String>,
842    /// An array of membership offers associated with the price.
843    #[serde(
844        rename = "membershipOffers",
845        default,
846        skip_serializing_if = "Vec::is_empty"
847    )]
848    pub membership_offers: Vec<MembershipOfferDto>,
849    /// An array of variant option IDs associated with the price.
850    #[serde(
851        rename = "variantOptionIds",
852        default,
853        skip_serializing_if = "Vec::is_empty"
854    )]
855    pub variant_option_ids: Vec<String>,
856    /// The unique identifier for the location.
857    #[serde(
858        rename = "locationId",
859        default,
860        skip_serializing_if = "Option::is_none"
861    )]
862    pub location_id: Option<String>,
863    /// The unique identifier for the associated product.
864    #[serde(default, skip_serializing_if = "Option::is_none")]
865    pub product: Option<String>,
866    /// The unique identifier for the user.
867    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
868    pub user_id: Option<String>,
869    /// The name of the price.
870    /// Required by the API.
871    /// (Optional here so responses that omit it still parse.)
872    #[serde(default, skip_serializing_if = "Option::is_none")]
873    pub name: Option<String>,
874    /// The type of the price (e.g., one_time).
875    /// Allowed values: `one_time`, `recurring`.
876    /// Required by the API.
877    /// (Optional here so responses that omit it still parse.)
878    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
879    pub type_: Option<String>,
880    /// The currency code for the price.
881    /// Required by the API.
882    /// (Optional here so responses that omit it still parse.)
883    #[serde(default, skip_serializing_if = "Option::is_none")]
884    pub currency: Option<String>,
885    /// The amount of the price.
886    /// Required by the API.
887    /// (Optional here so responses that omit it still parse.)
888    #[serde(default, skip_serializing_if = "Option::is_none")]
889    pub amount: Option<f64>,
890    /// The recurring details of the price (if type is recurring).
891    #[serde(default, skip_serializing_if = "Option::is_none")]
892    pub recurring: Option<RecurringDto>,
893    /// The creation timestamp of the price.
894    /// Format: date-time (ISO-8601 string).
895    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
896    pub created_at: Option<String>,
897    /// The last update timestamp of the price.
898    /// Format: date-time (ISO-8601 string).
899    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
900    pub updated_at: Option<String>,
901    /// The compare-at price for comparison purposes.
902    #[serde(
903        rename = "compareAtPrice",
904        default,
905        skip_serializing_if = "Option::is_none"
906    )]
907    pub compare_at_price: Option<f64>,
908    /// Indicates whether inventory tracking is enabled.
909    #[serde(
910        rename = "trackInventory",
911        default,
912        skip_serializing_if = "Option::is_none"
913    )]
914    pub track_inventory: Option<bool>,
915    /// Available inventory stock quantity
916    #[serde(
917        rename = "availableQuantity",
918        default,
919        skip_serializing_if = "Option::is_none"
920    )]
921    pub available_quantity: Option<f64>,
922    /// Continue selling when out of stock
923    #[serde(
924        rename = "allowOutOfStockPurchases",
925        default,
926        skip_serializing_if = "Option::is_none"
927    )]
928    pub allow_out_of_stock_purchases: Option<bool>,
929}
930
931/// `DefaultProductResponseDto` from the GoHighLevel OpenAPI spec.
932#[derive(Debug, Clone, Default, Serialize, Deserialize)]
933pub struct DefaultProductResponseDto {
934    /// The unique identifier for the product.
935    /// Required by the API.
936    /// (Optional here so responses that omit it still parse.)
937    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
938    pub id: Option<String>,
939    /// product description
940    #[serde(default, skip_serializing_if = "Option::is_none")]
941    pub description: Option<String>,
942    /// An array of variants for the product.
943    #[serde(default, skip_serializing_if = "Vec::is_empty")]
944    pub variants: Vec<ProductVariantDto>,
945    /// The unique identifier for the location.
946    /// Required by the API.
947    /// (Optional here so responses that omit it still parse.)
948    #[serde(
949        rename = "locationId",
950        default,
951        skip_serializing_if = "Option::is_none"
952    )]
953    pub location_id: Option<String>,
954    /// The name of the product.
955    /// Required by the API.
956    /// (Optional here so responses that omit it still parse.)
957    #[serde(default, skip_serializing_if = "Option::is_none")]
958    pub name: Option<String>,
959    /// The type of the product (e.g., PHYSICAL).
960    /// Required by the API.
961    /// (Optional here so responses that omit it still parse.)
962    #[serde(
963        rename = "productType",
964        default,
965        skip_serializing_if = "Option::is_none"
966    )]
967    pub product_type: Option<String>,
968    /// Indicates whether the product is available in-store.
969    #[serde(
970        rename = "availableInStore",
971        default,
972        skip_serializing_if = "Option::is_none"
973    )]
974    pub available_in_store: Option<bool>,
975    /// The creation timestamp of the product.
976    /// Format: date-time (ISO-8601 string).
977    /// Required by the API.
978    /// (Optional here so responses that omit it still parse.)
979    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
980    pub created_at: Option<String>,
981    /// The last update timestamp of the product.
982    /// Format: date-time (ISO-8601 string).
983    /// Required by the API.
984    /// (Optional here so responses that omit it still parse.)
985    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
986    pub updated_at: Option<String>,
987    /// The statement descriptor for the product.
988    #[serde(
989        rename = "statementDescriptor",
990        default,
991        skip_serializing_if = "Option::is_none"
992    )]
993    pub statement_descriptor: Option<String>,
994    /// The URL for the product image.
995    #[serde(default, skip_serializing_if = "Option::is_none")]
996    pub image: Option<String>,
997    /// An array of category Ids for the product
998    #[serde(
999        rename = "collectionIds",
1000        default,
1001        skip_serializing_if = "Vec::is_empty"
1002    )]
1003    pub collection_ids: Vec<String>,
1004    /// The field indicates whether taxes are enabled for the product or not.
1005    #[serde(
1006        rename = "isTaxesEnabled",
1007        default,
1008        skip_serializing_if = "Option::is_none"
1009    )]
1010    pub is_taxes_enabled: Option<bool>,
1011    /// An array of ids of Taxes attached to the Product. If the expand query includes tax, the
1012    /// taxes will be of type `ProductTaxDto`. Please refer to the `ProductTaxDto` for
1013    /// additional details.
1014    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1015    pub taxes: Vec<String>,
1016    /// Tax category ID for Automatic taxes calculation.
1017    #[serde(
1018        rename = "automaticTaxCategoryId",
1019        default,
1020        skip_serializing_if = "Option::is_none"
1021    )]
1022    pub automatic_tax_category_id: Option<String>,
1023    /// The Product label details
1024    #[serde(default, skip_serializing_if = "Option::is_none")]
1025    pub label: Option<ProductLabelDto>,
1026    /// The slug of the product by which the product will be navigated
1027    #[serde(default, skip_serializing_if = "Option::is_none")]
1028    pub slug: Option<String>,
1029}
1030
1031/// `DeletePriceResponseDto` from the GoHighLevel OpenAPI spec.
1032#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1033pub struct DeletePriceResponseDto {
1034    /// returns true if the price is successfully deleted
1035    /// Required by the API.
1036    /// (Optional here so responses that omit it still parse.)
1037    #[serde(default, skip_serializing_if = "Option::is_none")]
1038    pub status: Option<bool>,
1039}
1040
1041/// `DeleteProductCollectionResponseDto` from the GoHighLevel OpenAPI spec.
1042#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1043pub struct DeleteProductCollectionResponseDto {
1044    /// Status of api action
1045    /// Required by the API.
1046    /// (Optional here so responses that omit it still parse.)
1047    #[serde(default, skip_serializing_if = "Option::is_none")]
1048    pub status: Option<bool>,
1049    /// Success message
1050    #[serde(default, skip_serializing_if = "Option::is_none")]
1051    pub message: Option<String>,
1052}
1053
1054/// `DeleteProductResponseDto` from the GoHighLevel OpenAPI spec.
1055#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1056pub struct DeleteProductResponseDto {
1057    /// returns true if the product is successfully deleted
1058    /// Required by the API.
1059    /// (Optional here so responses that omit it still parse.)
1060    #[serde(default, skip_serializing_if = "Option::is_none")]
1061    pub status: Option<bool>,
1062}
1063
1064/// `DeleteProductReviewResponseDto` from the GoHighLevel OpenAPI spec.
1065#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1066pub struct DeleteProductReviewResponseDto {
1067    /// Status of api action
1068    /// Required by the API.
1069    /// (Optional here so responses that omit it still parse.)
1070    #[serde(default, skip_serializing_if = "Option::is_none")]
1071    pub status: Option<bool>,
1072    /// Success message
1073    #[serde(default, skip_serializing_if = "Option::is_none")]
1074    pub message: Option<String>,
1075}
1076
1077/// `GetInventoryResponseDto` from the GoHighLevel OpenAPI spec.
1078#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1079pub struct GetInventoryResponseDto {
1080    /// List of inventory items
1081    /// Required by the API.
1082    /// (Optional here so responses that omit it still parse.)
1083    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1084    pub inventory: Vec<InventoryItemDto>,
1085    /// Total count of inventory items
1086    /// Required by the API.
1087    /// (Optional here so responses that omit it still parse.)
1088    #[serde(default, skip_serializing_if = "Option::is_none")]
1089    pub total: Option<serde_json::Value>,
1090}
1091
1092/// `GetPriceResponseDto` from the GoHighLevel OpenAPI spec.
1093#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1094pub struct GetPriceResponseDto {
1095    /// The unique identifier for the price.
1096    /// Required by the API.
1097    /// (Optional here so responses that omit it still parse.)
1098    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1099    pub id: Option<String>,
1100    /// An array of membership offers associated with the price.
1101    #[serde(
1102        rename = "membershipOffers",
1103        default,
1104        skip_serializing_if = "Vec::is_empty"
1105    )]
1106    pub membership_offers: Vec<MembershipOfferDto>,
1107    /// An array of variant option IDs associated with the price.
1108    #[serde(
1109        rename = "variantOptionIds",
1110        default,
1111        skip_serializing_if = "Vec::is_empty"
1112    )]
1113    pub variant_option_ids: Vec<String>,
1114    /// The unique identifier for the location.
1115    #[serde(
1116        rename = "locationId",
1117        default,
1118        skip_serializing_if = "Option::is_none"
1119    )]
1120    pub location_id: Option<String>,
1121    /// The unique identifier for the associated product.
1122    #[serde(default, skip_serializing_if = "Option::is_none")]
1123    pub product: Option<String>,
1124    /// The unique identifier for the user.
1125    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
1126    pub user_id: Option<String>,
1127    /// The name of the price.
1128    /// Required by the API.
1129    /// (Optional here so responses that omit it still parse.)
1130    #[serde(default, skip_serializing_if = "Option::is_none")]
1131    pub name: Option<String>,
1132    /// The type of the price (e.g., one_time).
1133    /// Allowed values: `one_time`, `recurring`.
1134    /// Required by the API.
1135    /// (Optional here so responses that omit it still parse.)
1136    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1137    pub type_: Option<String>,
1138    /// The currency code for the price.
1139    /// Required by the API.
1140    /// (Optional here so responses that omit it still parse.)
1141    #[serde(default, skip_serializing_if = "Option::is_none")]
1142    pub currency: Option<String>,
1143    /// The amount of the price.
1144    /// Required by the API.
1145    /// (Optional here so responses that omit it still parse.)
1146    #[serde(default, skip_serializing_if = "Option::is_none")]
1147    pub amount: Option<f64>,
1148    /// The recurring details of the price (if type is recurring).
1149    #[serde(default, skip_serializing_if = "Option::is_none")]
1150    pub recurring: Option<RecurringDto>,
1151    /// The creation timestamp of the price.
1152    /// Format: date-time (ISO-8601 string).
1153    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1154    pub created_at: Option<String>,
1155    /// The last update timestamp of the price.
1156    /// Format: date-time (ISO-8601 string).
1157    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1158    pub updated_at: Option<String>,
1159    /// The compare-at price for comparison purposes.
1160    #[serde(
1161        rename = "compareAtPrice",
1162        default,
1163        skip_serializing_if = "Option::is_none"
1164    )]
1165    pub compare_at_price: Option<f64>,
1166    /// Indicates whether inventory tracking is enabled.
1167    #[serde(
1168        rename = "trackInventory",
1169        default,
1170        skip_serializing_if = "Option::is_none"
1171    )]
1172    pub track_inventory: Option<bool>,
1173    /// Available inventory stock quantity
1174    #[serde(
1175        rename = "availableQuantity",
1176        default,
1177        skip_serializing_if = "Option::is_none"
1178    )]
1179    pub available_quantity: Option<f64>,
1180    /// Continue selling when out of stock
1181    #[serde(
1182        rename = "allowOutOfStockPurchases",
1183        default,
1184        skip_serializing_if = "Option::is_none"
1185    )]
1186    pub allow_out_of_stock_purchases: Option<bool>,
1187}
1188
1189/// `GetProductResponseDto` from the GoHighLevel OpenAPI spec.
1190#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1191pub struct GetProductResponseDto {
1192    /// The unique identifier for the product.
1193    /// Required by the API.
1194    /// (Optional here so responses that omit it still parse.)
1195    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1196    pub id: Option<String>,
1197    /// product description
1198    #[serde(default, skip_serializing_if = "Option::is_none")]
1199    pub description: Option<String>,
1200    /// An array of variants for the product.
1201    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1202    pub variants: Vec<ProductVariantDto>,
1203    /// The unique identifier for the location.
1204    /// Required by the API.
1205    /// (Optional here so responses that omit it still parse.)
1206    #[serde(
1207        rename = "locationId",
1208        default,
1209        skip_serializing_if = "Option::is_none"
1210    )]
1211    pub location_id: Option<String>,
1212    /// The name of the product.
1213    /// Required by the API.
1214    /// (Optional here so responses that omit it still parse.)
1215    #[serde(default, skip_serializing_if = "Option::is_none")]
1216    pub name: Option<String>,
1217    /// The type of the product (e.g., PHYSICAL).
1218    /// Required by the API.
1219    /// (Optional here so responses that omit it still parse.)
1220    #[serde(
1221        rename = "productType",
1222        default,
1223        skip_serializing_if = "Option::is_none"
1224    )]
1225    pub product_type: Option<String>,
1226    /// Indicates whether the product is available in-store.
1227    #[serde(
1228        rename = "availableInStore",
1229        default,
1230        skip_serializing_if = "Option::is_none"
1231    )]
1232    pub available_in_store: Option<bool>,
1233    /// The creation timestamp of the product.
1234    /// Format: date-time (ISO-8601 string).
1235    /// Required by the API.
1236    /// (Optional here so responses that omit it still parse.)
1237    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1238    pub created_at: Option<String>,
1239    /// The last update timestamp of the product.
1240    /// Format: date-time (ISO-8601 string).
1241    /// Required by the API.
1242    /// (Optional here so responses that omit it still parse.)
1243    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1244    pub updated_at: Option<String>,
1245    /// The statement descriptor for the product.
1246    #[serde(
1247        rename = "statementDescriptor",
1248        default,
1249        skip_serializing_if = "Option::is_none"
1250    )]
1251    pub statement_descriptor: Option<String>,
1252    /// The URL for the product image.
1253    #[serde(default, skip_serializing_if = "Option::is_none")]
1254    pub image: Option<String>,
1255    /// An array of category Ids for the product
1256    #[serde(
1257        rename = "collectionIds",
1258        default,
1259        skip_serializing_if = "Vec::is_empty"
1260    )]
1261    pub collection_ids: Vec<String>,
1262    /// The field indicates whether taxes are enabled for the product or not.
1263    #[serde(
1264        rename = "isTaxesEnabled",
1265        default,
1266        skip_serializing_if = "Option::is_none"
1267    )]
1268    pub is_taxes_enabled: Option<bool>,
1269    /// An array of ids of Taxes attached to the Product. If the expand query includes tax, the
1270    /// taxes will be of type `ProductTaxDto`. Please refer to the `ProductTaxDto` for
1271    /// additional details.
1272    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1273    pub taxes: Vec<String>,
1274    /// Tax category ID for Automatic taxes calculation.
1275    #[serde(
1276        rename = "automaticTaxCategoryId",
1277        default,
1278        skip_serializing_if = "Option::is_none"
1279    )]
1280    pub automatic_tax_category_id: Option<String>,
1281    /// The Product label details
1282    #[serde(default, skip_serializing_if = "Option::is_none")]
1283    pub label: Option<ProductLabelDto>,
1284    /// The slug of the product by which the product will be navigated
1285    #[serde(default, skip_serializing_if = "Option::is_none")]
1286    pub slug: Option<String>,
1287}
1288
1289/// `GetProductStatsResponseDto` from the GoHighLevel OpenAPI spec.
1290#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1291pub struct GetProductStatsResponseDto {
1292    /// Total number of products
1293    /// Required by the API.
1294    /// (Optional here so responses that omit it still parse.)
1295    #[serde(
1296        rename = "totalProducts",
1297        default,
1298        skip_serializing_if = "Option::is_none"
1299    )]
1300    pub total_products: Option<f64>,
1301    /// Number of products included in the store
1302    /// Required by the API.
1303    /// (Optional here so responses that omit it still parse.)
1304    #[serde(
1305        rename = "includedInStore",
1306        default,
1307        skip_serializing_if = "Option::is_none"
1308    )]
1309    pub included_in_store: Option<f64>,
1310    /// Number of products excluded from the store
1311    /// Required by the API.
1312    /// (Optional here so responses that omit it still parse.)
1313    #[serde(
1314        rename = "excludedFromStore",
1315        default,
1316        skip_serializing_if = "Option::is_none"
1317    )]
1318    pub excluded_from_store: Option<f64>,
1319}
1320
1321/// `InventoryItemDto` from the GoHighLevel OpenAPI spec.
1322#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1323pub struct InventoryItemDto {
1324    /// The unique identifier for the price
1325    /// Required by the API.
1326    /// (Optional here so responses that omit it still parse.)
1327    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1328    pub id: Option<String>,
1329    /// Name of the price/variant
1330    /// Required by the API.
1331    /// (Optional here so responses that omit it still parse.)
1332    #[serde(default, skip_serializing_if = "Option::is_none")]
1333    pub name: Option<String>,
1334    /// Available quantity in inventory
1335    /// Required by the API.
1336    /// (Optional here so responses that omit it still parse.)
1337    #[serde(
1338        rename = "availableQuantity",
1339        default,
1340        skip_serializing_if = "Option::is_none"
1341    )]
1342    pub available_quantity: Option<f64>,
1343    /// SKU for the product variant
1344    /// Required by the API.
1345    /// (Optional here so responses that omit it still parse.)
1346    #[serde(default, skip_serializing_if = "Option::is_none")]
1347    pub sku: Option<String>,
1348    /// Whether out of stock purchases are allowed
1349    /// Required by the API.
1350    /// (Optional here so responses that omit it still parse.)
1351    #[serde(
1352        rename = "allowOutOfStockPurchases",
1353        default,
1354        skip_serializing_if = "Option::is_none"
1355    )]
1356    pub allow_out_of_stock_purchases: Option<bool>,
1357    /// Product ID this price belongs to
1358    /// Required by the API.
1359    /// (Optional here so responses that omit it still parse.)
1360    #[serde(default, skip_serializing_if = "Option::is_none")]
1361    pub product: Option<String>,
1362    /// Last update timestamp
1363    /// Required by the API.
1364    /// (Optional here so responses that omit it still parse.)
1365    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1366    pub updated_at: Option<String>,
1367    /// Product image URL
1368    #[serde(default, skip_serializing_if = "Option::is_none")]
1369    pub image: Option<String>,
1370    /// Product name
1371    #[serde(
1372        rename = "productName",
1373        default,
1374        skip_serializing_if = "Option::is_none"
1375    )]
1376    pub product_name: Option<String>,
1377}
1378
1379/// `ListCollectionResponseDto` from the GoHighLevel OpenAPI spec.
1380#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1381pub struct ListCollectionResponseDto {
1382    /// Array of Collections
1383    /// Required by the API.
1384    /// (Optional here so responses that omit it still parse.)
1385    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1386    pub data: Vec<Vec<serde_json::Value>>,
1387    /// The total count of the collections present, which is useful to calculate the pagination
1388    /// Required by the API.
1389    /// (Optional here so responses that omit it still parse.)
1390    #[serde(default, skip_serializing_if = "Option::is_none")]
1391    pub total: Option<f64>,
1392}
1393
1394/// `ListPricesResponseDto` from the GoHighLevel OpenAPI spec.
1395#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1396pub struct ListPricesResponseDto {
1397    /// An array of prices
1398    /// Required by the API.
1399    /// (Optional here so responses that omit it still parse.)
1400    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1401    pub prices: Vec<DefaultPriceResponseDto>,
1402    /// Required by the API.
1403    /// (Optional here so responses that omit it still parse.)
1404    #[serde(default, skip_serializing_if = "Option::is_none")]
1405    pub total: Option<f64>,
1406}
1407
1408/// `ListProductReviewsResponseDto` from the GoHighLevel OpenAPI spec.
1409#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1410pub struct ListProductReviewsResponseDto {
1411    /// Array of Collections
1412    /// Required by the API.
1413    /// (Optional here so responses that omit it still parse.)
1414    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1415    pub data: Vec<Vec<serde_json::Value>>,
1416    /// The total count of the collections present, which is useful to calculate the pagination
1417    /// Required by the API.
1418    /// (Optional here so responses that omit it still parse.)
1419    #[serde(default, skip_serializing_if = "Option::is_none")]
1420    pub total: Option<f64>,
1421}
1422
1423/// `ListProductsResponseDto` from the GoHighLevel OpenAPI spec.
1424#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1425pub struct ListProductsResponseDto {
1426    /// An array of products
1427    /// Required by the API.
1428    /// (Optional here so responses that omit it still parse.)
1429    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1430    pub products: Vec<DefaultProductResponseDto>,
1431    /// list products status
1432    /// Required by the API.
1433    /// (Optional here so responses that omit it still parse.)
1434    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1435    pub total: Vec<ListProductsStats>,
1436}
1437
1438/// `ListProductsStats` from the GoHighLevel OpenAPI spec.
1439#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1440pub struct ListProductsStats {
1441    /// Total number of products
1442    /// Required by the API.
1443    /// (Optional here so responses that omit it still parse.)
1444    #[serde(default, skip_serializing_if = "Option::is_none")]
1445    pub total: Option<f64>,
1446}
1447
1448/// `MembershipOfferDto` from the GoHighLevel OpenAPI spec.
1449#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1450pub struct MembershipOfferDto {
1451    /// Membership offer label
1452    /// Required by the API.
1453    /// (Optional here so responses that omit it still parse.)
1454    #[serde(default, skip_serializing_if = "Option::is_none")]
1455    pub label: Option<String>,
1456    /// Membership offer label
1457    /// Required by the API.
1458    /// (Optional here so responses that omit it still parse.)
1459    #[serde(default, skip_serializing_if = "Option::is_none")]
1460    pub value: Option<String>,
1461    /// The unique identifier for the membership offer.
1462    /// Required by the API.
1463    /// (Optional here so responses that omit it still parse.)
1464    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1465    pub id: Option<String>,
1466}
1467
1468/// `PriceDimensionsDto` from the GoHighLevel OpenAPI spec.
1469#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1470pub struct PriceDimensionsDto {
1471    /// Height of the price
1472    /// Required by the API.
1473    pub height: f64,
1474    /// Width of the price
1475    /// Required by the API.
1476    pub width: f64,
1477    /// Length of the price
1478    /// Required by the API.
1479    pub length: f64,
1480    /// Unit of the price dimensions
1481    /// Allowed values: `cm`, `in`, `m`.
1482    /// Required by the API.
1483    pub unit: String,
1484}
1485
1486/// `PriceMetaDto` from the GoHighLevel OpenAPI spec.
1487#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1488pub struct PriceMetaDto {
1489    /// The source of the price.
1490    /// Allowed values: `stripe`, `woocommerce`, `shopify`.
1491    /// Required by the API.
1492    pub source: String,
1493    /// The id of the source of the price from where it is imported
1494    #[serde(rename = "sourceId", default, skip_serializing_if = "Option::is_none")]
1495    pub source_id: Option<String>,
1496    /// The Stripe price ID associated with the price.
1497    /// Required by the API.
1498    #[serde(rename = "stripePriceId")]
1499    pub stripe_price_id: String,
1500    /// The internal source of the price.
1501    /// Allowed values: `agency_plan`, `funnel`, `membership`, `communities`, `gokollab`,
1502    /// `calendar`.
1503    /// Required by the API.
1504    #[serde(rename = "internalSource")]
1505    pub internal_source: String,
1506}
1507
1508/// `PriceUpdateField` from the GoHighLevel OpenAPI spec.
1509#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1510pub struct PriceUpdateField {
1511    /// Type of price update
1512    /// Allowed values: `INCREASE_BY_AMOUNT`, `REDUCE_BY_AMOUNT`, `SET_NEW_PRICE`,
1513    /// `INCREASE_BY_PERCENTAGE`, `REDUCE_BY_PERCENTAGE`.
1514    /// Required by the API.
1515    #[serde(rename = "type")]
1516    pub type_: String,
1517    /// Value to update (amount or percentage based on type)
1518    /// Required by the API.
1519    pub value: f64,
1520    /// Round to nearest whole number
1521    #[serde(
1522        rename = "roundToWhole",
1523        default,
1524        skip_serializing_if = "Option::is_none"
1525    )]
1526    pub round_to_whole: Option<bool>,
1527}
1528
1529/// `ProductCategories` from the GoHighLevel OpenAPI spec.
1530#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1531pub struct ProductCategories {
1532    /// The spec defines no fields for this schema.
1533    #[serde(flatten)]
1534    pub extra: serde_json::Map<String, serde_json::Value>,
1535}
1536
1537/// `ProductLabelDto` from the GoHighLevel OpenAPI spec.
1538#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1539pub struct ProductLabelDto {
1540    /// The content for the product label.
1541    /// Required by the API.
1542    /// (Optional here so responses that omit it still parse.)
1543    #[serde(default, skip_serializing_if = "Option::is_none")]
1544    pub title: Option<String>,
1545    /// Start date in YYYY-MM-DDTHH:mm:ssZ format
1546    #[serde(rename = "startDate", default, skip_serializing_if = "Option::is_none")]
1547    pub start_date: Option<String>,
1548    /// Start date in YYYY-MM-DDTHH:mm:ssZ format
1549    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
1550    pub end_date: Option<String>,
1551}
1552
1553/// `ProductMediaDto` from the GoHighLevel OpenAPI spec.
1554#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1555pub struct ProductMediaDto {
1556    /// The unique identifier for the media.
1557    /// Required by the API.
1558    pub id: String,
1559    /// The title of the media file.
1560    #[serde(default, skip_serializing_if = "Option::is_none")]
1561    pub title: Option<String>,
1562    /// The URL where the media file is stored.
1563    /// Required by the API.
1564    pub url: String,
1565    /// The type of the media file (e.g., image, video will be supporting soon).
1566    /// Allowed values: `image`, `video`.
1567    /// Required by the API.
1568    #[serde(rename = "type")]
1569    pub type_: String,
1570    /// Indicates whether the media is featured.
1571    #[serde(
1572        rename = "isFeatured",
1573        default,
1574        skip_serializing_if = "Option::is_none"
1575    )]
1576    pub is_featured: Option<bool>,
1577    /// Mongo ObjectIds of the prices for which the media is assigned
1578    #[serde(rename = "priceIds", default, skip_serializing_if = "Vec::is_empty")]
1579    pub price_ids: Vec<Vec<serde_json::Value>>,
1580}
1581
1582/// `ProductReviewDto` from the GoHighLevel OpenAPI spec.
1583#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1584pub struct ProductReviewDto {
1585    /// Headline of the Review
1586    /// Required by the API.
1587    pub headline: String,
1588    /// Detailed Review of the product
1589    /// Required by the API.
1590    pub comment: String,
1591    /// User who is giving the review/reply
1592    /// Required by the API.
1593    pub user: UserDetailsDto,
1594}
1595
1596/// `ProductSEODto` from the GoHighLevel OpenAPI spec.
1597#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1598pub struct ProductSEODto {
1599    /// SEO title
1600    #[serde(default, skip_serializing_if = "Option::is_none")]
1601    pub title: Option<String>,
1602    /// SEO description
1603    #[serde(default, skip_serializing_if = "Option::is_none")]
1604    pub description: Option<String>,
1605}
1606
1607/// `ProductVariantDto` from the GoHighLevel OpenAPI spec.
1608#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1609pub struct ProductVariantDto {
1610    /// A unique identifier for the variant.
1611    /// Required by the API.
1612    /// (Optional here so responses that omit it still parse.)
1613    #[serde(default, skip_serializing_if = "Option::is_none")]
1614    pub id: Option<String>,
1615    /// The name of the variant.
1616    /// Required by the API.
1617    /// (Optional here so responses that omit it still parse.)
1618    #[serde(default, skip_serializing_if = "Option::is_none")]
1619    pub name: Option<String>,
1620    /// An array of options for the variant.
1621    /// Required by the API.
1622    /// (Optional here so responses that omit it still parse.)
1623    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1624    pub options: Vec<ProductVariantOptionDto>,
1625}
1626
1627/// `ProductVariantOptionDto` from the GoHighLevel OpenAPI spec.
1628#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1629pub struct ProductVariantOptionDto {
1630    /// The unique identifier for the option.
1631    /// Required by the API.
1632    /// (Optional here so responses that omit it still parse.)
1633    #[serde(default, skip_serializing_if = "Option::is_none")]
1634    pub id: Option<String>,
1635    /// The name of the option.
1636    /// Required by the API.
1637    /// (Optional here so responses that omit it still parse.)
1638    #[serde(default, skip_serializing_if = "Option::is_none")]
1639    pub name: Option<String>,
1640}
1641
1642/// `RecurringDto` from the GoHighLevel OpenAPI spec.
1643#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1644pub struct RecurringDto {
1645    /// The interval at which the recurring event occurs.
1646    /// Allowed values: `day`, `month`, `week`, `year`.
1647    /// Required by the API.
1648    /// (Optional here so responses that omit it still parse.)
1649    #[serde(default, skip_serializing_if = "Option::is_none")]
1650    pub interval: Option<String>,
1651    /// The number of intervals between each occurrence of the event.
1652    /// Required by the API.
1653    /// (Optional here so responses that omit it still parse.)
1654    #[serde(
1655        rename = "intervalCount",
1656        default,
1657        skip_serializing_if = "Option::is_none"
1658    )]
1659    pub interval_count: Option<f64>,
1660}
1661
1662/// `ShippingOptionsDto` from the GoHighLevel OpenAPI spec.
1663#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1664pub struct ShippingOptionsDto {
1665    /// Weight options of the product
1666    #[serde(default, skip_serializing_if = "Option::is_none")]
1667    pub weight: Option<WeightOptionsDto>,
1668    /// Dimensions of the product
1669    #[serde(default, skip_serializing_if = "Option::is_none")]
1670    pub dimensions: Option<PriceDimensionsDto>,
1671}
1672
1673/// `UpdateDisplayPriorityBodyDto` from the GoHighLevel OpenAPI spec.
1674#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1675pub struct UpdateDisplayPriorityBodyDto {
1676    /// Location Id or Agency Id
1677    /// Required by the API.
1678    #[serde(rename = "altId")]
1679    pub alt_id: String,
1680    /// Allowed values: `location`.
1681    /// Required by the API.
1682    #[serde(rename = "altType")]
1683    pub alt_type: String,
1684    /// Array of products with their display priorities
1685    /// Required by the API.
1686    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1687    pub products: Vec<Vec<serde_json::Value>>,
1688}
1689
1690/// `UpdateInventoryDto` from the GoHighLevel OpenAPI spec.
1691#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1692pub struct UpdateInventoryDto {
1693    /// Location Id or Agency Id
1694    /// Required by the API.
1695    #[serde(rename = "altId")]
1696    pub alt_id: String,
1697    /// Allowed values: `location`.
1698    /// Required by the API.
1699    #[serde(rename = "altType")]
1700    pub alt_type: String,
1701    /// Array of items to update in the inventory.
1702    /// Required by the API.
1703    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1704    pub items: Vec<UpdateInventoryItemDto>,
1705}
1706
1707/// `UpdateInventoryItemDto` from the GoHighLevel OpenAPI spec.
1708#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1709pub struct UpdateInventoryItemDto {
1710    /// The unique identifier for the price, in MongoDB ID format.
1711    /// Required by the API.
1712    #[serde(rename = "priceId")]
1713    pub price_id: String,
1714    /// The available quantity of the item.
1715    #[serde(
1716        rename = "availableQuantity",
1717        default,
1718        skip_serializing_if = "Option::is_none"
1719    )]
1720    pub available_quantity: Option<f64>,
1721    /// Whether to continue selling the item when out of stock.
1722    #[serde(
1723        rename = "allowOutOfStockPurchases",
1724        default,
1725        skip_serializing_if = "Option::is_none"
1726    )]
1727    pub allow_out_of_stock_purchases: Option<bool>,
1728}
1729
1730/// `UpdateInventoryResponseDto` from the GoHighLevel OpenAPI spec.
1731#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1732pub struct UpdateInventoryResponseDto {
1733    /// Status of api action
1734    /// Required by the API.
1735    /// (Optional here so responses that omit it still parse.)
1736    #[serde(default, skip_serializing_if = "Option::is_none")]
1737    pub status: Option<bool>,
1738    /// Success message
1739    #[serde(default, skip_serializing_if = "Option::is_none")]
1740    pub message: Option<String>,
1741}
1742
1743/// `UpdatePriceDto` from the GoHighLevel OpenAPI spec.
1744#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1745pub struct UpdatePriceDto {
1746    /// The name of the price.
1747    /// Required by the API.
1748    pub name: String,
1749    /// The type of the price.
1750    /// Allowed values: `one_time`, `recurring`.
1751    /// Required by the API.
1752    #[serde(rename = "type")]
1753    pub type_: String,
1754    /// The currency of the price.
1755    /// Required by the API.
1756    pub currency: String,
1757    /// The amount of the price. ( min: 0 )
1758    /// Required by the API.
1759    pub amount: f64,
1760    /// The recurring details of the price (if type is recurring).
1761    #[serde(default, skip_serializing_if = "Option::is_none")]
1762    pub recurring: Option<RecurringDto>,
1763    /// A brief description of the price.
1764    #[serde(default, skip_serializing_if = "Option::is_none")]
1765    pub description: Option<String>,
1766    /// An array of membership offers associated with the price.
1767    #[serde(
1768        rename = "membershipOffers",
1769        default,
1770        skip_serializing_if = "Vec::is_empty"
1771    )]
1772    pub membership_offers: Vec<MembershipOfferDto>,
1773    /// The trial period duration in days (if applicable).
1774    #[serde(
1775        rename = "trialPeriod",
1776        default,
1777        skip_serializing_if = "Option::is_none"
1778    )]
1779    pub trial_period: Option<f64>,
1780    /// The total number of billing cycles for the price. ( min: 1 )
1781    #[serde(
1782        rename = "totalCycles",
1783        default,
1784        skip_serializing_if = "Option::is_none"
1785    )]
1786    pub total_cycles: Option<f64>,
1787    /// The setup fee for the price.
1788    #[serde(rename = "setupFee", default, skip_serializing_if = "Option::is_none")]
1789    pub setup_fee: Option<f64>,
1790    /// An array of variant option IDs associated with the price.
1791    #[serde(
1792        rename = "variantOptionIds",
1793        default,
1794        skip_serializing_if = "Vec::is_empty"
1795    )]
1796    pub variant_option_ids: Vec<String>,
1797    /// The compare at price for the price.
1798    #[serde(
1799        rename = "compareAtPrice",
1800        default,
1801        skip_serializing_if = "Option::is_none"
1802    )]
1803    pub compare_at_price: Option<f64>,
1804    /// The unique identifier of the location associated with the price.
1805    /// Required by the API.
1806    #[serde(rename = "locationId")]
1807    pub location_id: String,
1808    /// The unique identifier of the user who created the price.
1809    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
1810    pub user_id: Option<String>,
1811    /// Additional metadata associated with the price.
1812    #[serde(default, skip_serializing_if = "Option::is_none")]
1813    pub meta: Option<PriceMetaDto>,
1814    /// Need to track inventory stock quantity
1815    #[serde(
1816        rename = "trackInventory",
1817        default,
1818        skip_serializing_if = "Option::is_none"
1819    )]
1820    pub track_inventory: Option<bool>,
1821    /// Available inventory stock quantity
1822    #[serde(
1823        rename = "availableQuantity",
1824        default,
1825        skip_serializing_if = "Option::is_none"
1826    )]
1827    pub available_quantity: Option<f64>,
1828    /// Continue selling when out of stock
1829    #[serde(
1830        rename = "allowOutOfStockPurchases",
1831        default,
1832        skip_serializing_if = "Option::is_none"
1833    )]
1834    pub allow_out_of_stock_purchases: Option<bool>,
1835    /// The unique identifier of the SKU associated with the price
1836    #[serde(default, skip_serializing_if = "Option::is_none")]
1837    pub sku: Option<String>,
1838    /// Shipping options of the Price
1839    #[serde(
1840        rename = "shippingOptions",
1841        default,
1842        skip_serializing_if = "Option::is_none"
1843    )]
1844    pub shipping_options: Option<ShippingOptionsDto>,
1845    /// Is the product a digital product
1846    #[serde(
1847        rename = "isDigitalProduct",
1848        default,
1849        skip_serializing_if = "Option::is_none"
1850    )]
1851    pub is_digital_product: Option<bool>,
1852    /// Digital delivery options
1853    #[serde(
1854        rename = "digitalDelivery",
1855        default,
1856        skip_serializing_if = "Vec::is_empty"
1857    )]
1858    pub digital_delivery: Vec<String>,
1859}
1860
1861/// `UpdatePriceResponseDto` from the GoHighLevel OpenAPI spec.
1862#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1863pub struct UpdatePriceResponseDto {
1864    /// The unique identifier for the price.
1865    /// Required by the API.
1866    /// (Optional here so responses that omit it still parse.)
1867    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1868    pub id: Option<String>,
1869    /// An array of membership offers associated with the price.
1870    #[serde(
1871        rename = "membershipOffers",
1872        default,
1873        skip_serializing_if = "Vec::is_empty"
1874    )]
1875    pub membership_offers: Vec<MembershipOfferDto>,
1876    /// An array of variant option IDs associated with the price.
1877    #[serde(
1878        rename = "variantOptionIds",
1879        default,
1880        skip_serializing_if = "Vec::is_empty"
1881    )]
1882    pub variant_option_ids: Vec<String>,
1883    /// The unique identifier for the location.
1884    #[serde(
1885        rename = "locationId",
1886        default,
1887        skip_serializing_if = "Option::is_none"
1888    )]
1889    pub location_id: Option<String>,
1890    /// The unique identifier for the associated product.
1891    #[serde(default, skip_serializing_if = "Option::is_none")]
1892    pub product: Option<String>,
1893    /// The unique identifier for the user.
1894    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
1895    pub user_id: Option<String>,
1896    /// The name of the price.
1897    /// Required by the API.
1898    /// (Optional here so responses that omit it still parse.)
1899    #[serde(default, skip_serializing_if = "Option::is_none")]
1900    pub name: Option<String>,
1901    /// The type of the price (e.g., one_time).
1902    /// Allowed values: `one_time`, `recurring`.
1903    /// Required by the API.
1904    /// (Optional here so responses that omit it still parse.)
1905    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1906    pub type_: Option<String>,
1907    /// The currency code for the price.
1908    /// Required by the API.
1909    /// (Optional here so responses that omit it still parse.)
1910    #[serde(default, skip_serializing_if = "Option::is_none")]
1911    pub currency: Option<String>,
1912    /// The amount of the price.
1913    /// Required by the API.
1914    /// (Optional here so responses that omit it still parse.)
1915    #[serde(default, skip_serializing_if = "Option::is_none")]
1916    pub amount: Option<f64>,
1917    /// The recurring details of the price (if type is recurring).
1918    #[serde(default, skip_serializing_if = "Option::is_none")]
1919    pub recurring: Option<RecurringDto>,
1920    /// The creation timestamp of the price.
1921    /// Format: date-time (ISO-8601 string).
1922    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1923    pub created_at: Option<String>,
1924    /// The last update timestamp of the price.
1925    /// Format: date-time (ISO-8601 string).
1926    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1927    pub updated_at: Option<String>,
1928    /// The compare-at price for comparison purposes.
1929    #[serde(
1930        rename = "compareAtPrice",
1931        default,
1932        skip_serializing_if = "Option::is_none"
1933    )]
1934    pub compare_at_price: Option<f64>,
1935    /// Indicates whether inventory tracking is enabled.
1936    #[serde(
1937        rename = "trackInventory",
1938        default,
1939        skip_serializing_if = "Option::is_none"
1940    )]
1941    pub track_inventory: Option<bool>,
1942    /// Available inventory stock quantity
1943    #[serde(
1944        rename = "availableQuantity",
1945        default,
1946        skip_serializing_if = "Option::is_none"
1947    )]
1948    pub available_quantity: Option<f64>,
1949    /// Continue selling when out of stock
1950    #[serde(
1951        rename = "allowOutOfStockPurchases",
1952        default,
1953        skip_serializing_if = "Option::is_none"
1954    )]
1955    pub allow_out_of_stock_purchases: Option<bool>,
1956}
1957
1958/// `UpdateProductCollectionResponseDto` from the GoHighLevel OpenAPI spec.
1959#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1960pub struct UpdateProductCollectionResponseDto {
1961    /// Status of api action
1962    /// Required by the API.
1963    /// (Optional here so responses that omit it still parse.)
1964    #[serde(default, skip_serializing_if = "Option::is_none")]
1965    pub status: Option<bool>,
1966    /// Success message
1967    #[serde(default, skip_serializing_if = "Option::is_none")]
1968    pub message: Option<String>,
1969}
1970
1971/// `UpdateProductCollectionsDto` from the GoHighLevel OpenAPI spec.
1972#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1973pub struct UpdateProductCollectionsDto {
1974    /// Location Id
1975    /// Required by the API.
1976    #[serde(rename = "altId")]
1977    pub alt_id: String,
1978    /// The type of alt. For now it is only LOCATION
1979    /// Allowed values: `location`.
1980    /// Required by the API.
1981    #[serde(rename = "altType")]
1982    pub alt_type: String,
1983    /// Name of the Product Collection
1984    #[serde(default, skip_serializing_if = "Option::is_none")]
1985    pub name: Option<String>,
1986    /// Slug of the Product Collection which helps in navigation
1987    #[serde(default, skip_serializing_if = "Option::is_none")]
1988    pub slug: Option<String>,
1989    /// The URL of the image that is going to be displayed as the collection Thumbnail
1990    #[serde(default, skip_serializing_if = "Option::is_none")]
1991    pub image: Option<String>,
1992    /// The metadata information which will be displayed in SEO previews
1993    #[serde(default, skip_serializing_if = "Option::is_none")]
1994    pub seo: Option<CollectionSEODto>,
1995}
1996
1997/// `UpdateProductDto` from the GoHighLevel OpenAPI spec.
1998#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1999pub struct UpdateProductDto {
2000    /// The name of the product.
2001    /// Required by the API.
2002    pub name: String,
2003    /// The unique identifier for the location.
2004    /// Required by the API.
2005    #[serde(rename = "locationId")]
2006    pub location_id: String,
2007    /// A brief description of the product.
2008    #[serde(default, skip_serializing_if = "Option::is_none")]
2009    pub description: Option<String>,
2010    /// Allowed values: `DIGITAL`, `PHYSICAL`, `SERVICE`, `PHYSICAL/DIGITAL`.
2011    /// Required by the API.
2012    #[serde(rename = "productType")]
2013    pub product_type: String,
2014    /// The URL for the product image.
2015    #[serde(default, skip_serializing_if = "Option::is_none")]
2016    pub image: Option<String>,
2017    /// The statement descriptor for the product.
2018    #[serde(
2019        rename = "statementDescriptor",
2020        default,
2021        skip_serializing_if = "Option::is_none"
2022    )]
2023    pub statement_descriptor: Option<String>,
2024    /// Indicates whether the product is available in-store.
2025    #[serde(
2026        rename = "availableInStore",
2027        default,
2028        skip_serializing_if = "Option::is_none"
2029    )]
2030    pub available_in_store: Option<bool>,
2031    /// An array of medias for the product.
2032    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2033    pub medias: Vec<ProductMediaDto>,
2034    /// An array of variants for the product.
2035    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2036    pub variants: Vec<ProductVariantDto>,
2037    /// An array of category Ids for the product
2038    #[serde(
2039        rename = "collectionIds",
2040        default,
2041        skip_serializing_if = "Vec::is_empty"
2042    )]
2043    pub collection_ids: Vec<String>,
2044    /// Are there any taxes attached to the product. If this is true, taxes array cannot be
2045    /// empty.
2046    #[serde(
2047        rename = "isTaxesEnabled",
2048        default,
2049        skip_serializing_if = "Option::is_none"
2050    )]
2051    pub is_taxes_enabled: Option<bool>,
2052    /// List of ids of Taxes attached to the Product. If taxes are passed, isTaxesEnabled should
2053    /// be true.
2054    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2055    pub taxes: Vec<String>,
2056    /// Tax category ID for Automatic taxes calculation.
2057    #[serde(
2058        rename = "automaticTaxCategoryId",
2059        default,
2060        skip_serializing_if = "Option::is_none"
2061    )]
2062    pub automatic_tax_category_id: Option<String>,
2063    /// Is the product label enabled. If this is true, label object cannot be empty.
2064    #[serde(
2065        rename = "isLabelEnabled",
2066        default,
2067        skip_serializing_if = "Option::is_none"
2068    )]
2069    pub is_label_enabled: Option<bool>,
2070    /// Details for Product Label
2071    #[serde(default, skip_serializing_if = "Option::is_none")]
2072    pub label: Option<ProductLabelDto>,
2073    /// The slug using which the product navigation will be handled
2074    #[serde(default, skip_serializing_if = "Option::is_none")]
2075    pub slug: Option<String>,
2076    /// SEO data for the product that will be displayed in the preview
2077    #[serde(default, skip_serializing_if = "Option::is_none")]
2078    pub seo: Option<ProductSEODto>,
2079    /// Whether the taxes should be included in the purchase price
2080    #[serde(
2081        rename = "taxInclusive",
2082        default,
2083        skip_serializing_if = "Option::is_none"
2084    )]
2085    pub tax_inclusive: Option<bool>,
2086    /// The prices of the product
2087    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2088    pub prices: Vec<String>,
2089}
2090
2091/// `UpdateProductResponseDto` from the GoHighLevel OpenAPI spec.
2092#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2093pub struct UpdateProductResponseDto {
2094    /// The unique identifier for the product.
2095    /// Required by the API.
2096    /// (Optional here so responses that omit it still parse.)
2097    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
2098    pub id: Option<String>,
2099    /// product description
2100    #[serde(default, skip_serializing_if = "Option::is_none")]
2101    pub description: Option<String>,
2102    /// An array of variants for the product.
2103    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2104    pub variants: Vec<ProductVariantDto>,
2105    /// The unique identifier for the location.
2106    /// Required by the API.
2107    /// (Optional here so responses that omit it still parse.)
2108    #[serde(
2109        rename = "locationId",
2110        default,
2111        skip_serializing_if = "Option::is_none"
2112    )]
2113    pub location_id: Option<String>,
2114    /// The name of the product.
2115    /// Required by the API.
2116    /// (Optional here so responses that omit it still parse.)
2117    #[serde(default, skip_serializing_if = "Option::is_none")]
2118    pub name: Option<String>,
2119    /// The type of the product (e.g., PHYSICAL).
2120    /// Required by the API.
2121    /// (Optional here so responses that omit it still parse.)
2122    #[serde(
2123        rename = "productType",
2124        default,
2125        skip_serializing_if = "Option::is_none"
2126    )]
2127    pub product_type: Option<String>,
2128    /// Indicates whether the product is available in-store.
2129    #[serde(
2130        rename = "availableInStore",
2131        default,
2132        skip_serializing_if = "Option::is_none"
2133    )]
2134    pub available_in_store: Option<bool>,
2135    /// The creation timestamp of the product.
2136    /// Format: date-time (ISO-8601 string).
2137    /// Required by the API.
2138    /// (Optional here so responses that omit it still parse.)
2139    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
2140    pub created_at: Option<String>,
2141    /// The last update timestamp of the product.
2142    /// Format: date-time (ISO-8601 string).
2143    /// Required by the API.
2144    /// (Optional here so responses that omit it still parse.)
2145    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
2146    pub updated_at: Option<String>,
2147    /// The statement descriptor for the product.
2148    #[serde(
2149        rename = "statementDescriptor",
2150        default,
2151        skip_serializing_if = "Option::is_none"
2152    )]
2153    pub statement_descriptor: Option<String>,
2154    /// The URL for the product image.
2155    #[serde(default, skip_serializing_if = "Option::is_none")]
2156    pub image: Option<String>,
2157    /// An array of category Ids for the product
2158    #[serde(
2159        rename = "collectionIds",
2160        default,
2161        skip_serializing_if = "Vec::is_empty"
2162    )]
2163    pub collection_ids: Vec<String>,
2164    /// The field indicates whether taxes are enabled for the product or not.
2165    #[serde(
2166        rename = "isTaxesEnabled",
2167        default,
2168        skip_serializing_if = "Option::is_none"
2169    )]
2170    pub is_taxes_enabled: Option<bool>,
2171    /// An array of ids of Taxes attached to the Product. If the expand query includes tax, the
2172    /// taxes will be of type `ProductTaxDto`. Please refer to the `ProductTaxDto` for
2173    /// additional details.
2174    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2175    pub taxes: Vec<String>,
2176    /// Tax category ID for Automatic taxes calculation.
2177    #[serde(
2178        rename = "automaticTaxCategoryId",
2179        default,
2180        skip_serializing_if = "Option::is_none"
2181    )]
2182    pub automatic_tax_category_id: Option<String>,
2183    /// The Product label details
2184    #[serde(default, skip_serializing_if = "Option::is_none")]
2185    pub label: Option<ProductLabelDto>,
2186    /// The slug of the product by which the product will be navigated
2187    #[serde(default, skip_serializing_if = "Option::is_none")]
2188    pub slug: Option<String>,
2189}
2190
2191/// `UpdateProductReviewDto` from the GoHighLevel OpenAPI spec.
2192#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2193pub struct UpdateProductReviewDto {
2194    /// Location Id or Agency Id
2195    /// Required by the API.
2196    #[serde(rename = "altId")]
2197    pub alt_id: String,
2198    /// Allowed values: `location`.
2199    /// Required by the API.
2200    #[serde(rename = "altType")]
2201    pub alt_type: String,
2202    /// Product Id
2203    /// Required by the API.
2204    #[serde(rename = "productId")]
2205    pub product_id: String,
2206    /// Status of the review
2207    /// Required by the API.
2208    pub status: String,
2209    /// Reply of the review
2210    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2211    pub reply: Vec<ProductReviewDto>,
2212    /// Rating of the product
2213    #[serde(default, skip_serializing_if = "Option::is_none")]
2214    pub rating: Option<f64>,
2215    /// Headline of the Review
2216    #[serde(default, skip_serializing_if = "Option::is_none")]
2217    pub headline: Option<String>,
2218    /// Detailed Review of the product
2219    #[serde(default, skip_serializing_if = "Option::is_none")]
2220    pub detail: Option<String>,
2221}
2222
2223/// `UpdateProductReviewObjectDto` from the GoHighLevel OpenAPI spec.
2224#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2225pub struct UpdateProductReviewObjectDto {
2226    /// Review Id
2227    /// Required by the API.
2228    #[serde(rename = "reviewId")]
2229    pub review_id: String,
2230    /// Product Id
2231    /// Required by the API.
2232    #[serde(rename = "productId")]
2233    pub product_id: String,
2234    /// Store Id
2235    /// Required by the API.
2236    #[serde(rename = "storeId")]
2237    pub store_id: String,
2238}
2239
2240/// `UpdateProductReviewsDto` from the GoHighLevel OpenAPI spec.
2241#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2242pub struct UpdateProductReviewsDto {
2243    /// Location Id or Agency Id
2244    /// Required by the API.
2245    #[serde(rename = "altId")]
2246    pub alt_id: String,
2247    /// Allowed values: `location`.
2248    /// Required by the API.
2249    #[serde(rename = "altType")]
2250    pub alt_type: String,
2251    /// Array of Product Reviews
2252    /// Required by the API.
2253    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2254    pub reviews: Vec<UpdateProductReviewObjectDto>,
2255    /// Status of the review
2256    /// Required by the API.
2257    pub status: serde_json::Value,
2258}
2259
2260/// `UpdateProductReviewsResponseDto` from the GoHighLevel OpenAPI spec.
2261#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2262pub struct UpdateProductReviewsResponseDto {
2263    /// Status of api action
2264    /// Required by the API.
2265    /// (Optional here so responses that omit it still parse.)
2266    #[serde(default, skip_serializing_if = "Option::is_none")]
2267    pub status: Option<bool>,
2268    /// Success message
2269    #[serde(default, skip_serializing_if = "Option::is_none")]
2270    pub message: Option<String>,
2271}
2272
2273/// `UpdateProductStoreDto` from the GoHighLevel OpenAPI spec.
2274#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2275pub struct UpdateProductStoreDto {
2276    /// Location Id or Agency Id
2277    /// Required by the API.
2278    #[serde(rename = "altId")]
2279    pub alt_id: String,
2280    /// Allowed values: `location`.
2281    /// Required by the API.
2282    #[serde(rename = "altType")]
2283    pub alt_type: String,
2284    /// Action to include or exclude the product from the store
2285    /// Allowed values: `include`, `exclude`.
2286    /// Required by the API.
2287    pub action: String,
2288    /// Array of product IDs
2289    /// Required by the API.
2290    #[serde(rename = "productIds", default, skip_serializing_if = "Vec::is_empty")]
2291    pub product_ids: Vec<String>,
2292}
2293
2294/// `UpdateProductStoreResponseDto` from the GoHighLevel OpenAPI spec.
2295#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2296pub struct UpdateProductStoreResponseDto {
2297    /// Status of api action
2298    /// Required by the API.
2299    /// (Optional here so responses that omit it still parse.)
2300    #[serde(default, skip_serializing_if = "Option::is_none")]
2301    pub status: Option<bool>,
2302    /// Success message
2303    #[serde(default, skip_serializing_if = "Option::is_none")]
2304    pub message: Option<String>,
2305}
2306
2307/// `UserDetailsDto` from the GoHighLevel OpenAPI spec.
2308#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2309pub struct UserDetailsDto {
2310    /// Name of the customer
2311    /// Required by the API.
2312    pub name: String,
2313    /// Email of the customer
2314    /// Required by the API.
2315    pub email: String,
2316    /// Phone no of the customer
2317    #[serde(default, skip_serializing_if = "Option::is_none")]
2318    pub phone: Option<String>,
2319    /// Is the person an admin or customer
2320    #[serde(
2321        rename = "isCustomer",
2322        default,
2323        skip_serializing_if = "Option::is_none"
2324    )]
2325    pub is_customer: Option<bool>,
2326}
2327
2328/// `WeightOptionsDto` from the GoHighLevel OpenAPI spec.
2329#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2330pub struct WeightOptionsDto {
2331    /// Actual weight of the product
2332    /// Required by the API.
2333    pub value: f64,
2334    /// Weight unit of the product
2335    /// Allowed values: `kg`, `lb`, `g`, `oz`.
2336    /// Required by the API.
2337    pub unit: String,
2338}