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