Skip to main content

ghl_models/v3/
payments.rs

1//! `payments` data models for GoHighLevel API V3 (55 types).
2//!
3//! Generated from HighLevel's official OpenAPI spec for the
4//! **Payments** module. Every endpoint that uses these types, with its
5//! parameters, required scopes and enum values, is documented in the
6//! [`payments` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/payments.md).
7//!
8//! Enable with `features = ["payments"]`.
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/// `AmountSummary` from the GoHighLevel OpenAPI spec.
22#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct AmountSummary {
24    /// Order sub-total value.
25    /// Required by the API.
26    /// (Optional here so responses that omit it still parse.)
27    #[serde(default, skip_serializing_if = "Option::is_none")]
28    pub subtotal: Option<f64>,
29    /// Discount value on order.
30    #[serde(default, skip_serializing_if = "Option::is_none")]
31    pub discount: Option<f64>,
32}
33
34/// `ApplyToFuturePaymentsConfig` from the GoHighLevel OpenAPI spec.
35#[derive(Debug, Clone, Default, Serialize, Deserialize)]
36pub struct ApplyToFuturePaymentsConfig {
37    /// Type of the config
38    /// Allowed values: `forever`, `fixed`.
39    /// Required by the API.
40    #[serde(rename = "type")]
41    pub type_: String,
42    /// Duration the coupon to be applied in a subscription
43    /// Required by the API.
44    pub duration: f64,
45    /// Type of the duration
46    /// Allowed values: `months`.
47    /// Required by the API.
48    #[serde(rename = "durationType")]
49    pub duration_type: String,
50}
51
52/// `ApplyToFuturePaymentsConfigDto` from the GoHighLevel OpenAPI spec.
53#[derive(Debug, Clone, Default, Serialize, Deserialize)]
54pub struct ApplyToFuturePaymentsConfigDto {
55    /// Type of future payments configuration
56    /// Allowed values: `forever`, `fixed`.
57    /// Required by the API.
58    /// (Optional here so responses that omit it still parse.)
59    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
60    pub type_: Option<String>,
61    /// Duration value for fixed type configurations
62    #[serde(default, skip_serializing_if = "Option::is_none")]
63    pub duration: Option<f64>,
64    /// Duration type for fixed configurations (e.g. months)
65    #[serde(
66        rename = "durationType",
67        default,
68        skip_serializing_if = "Option::is_none"
69    )]
70    pub duration_type: Option<String>,
71}
72
73/// `CardDto` from the GoHighLevel OpenAPI spec.
74#[derive(Debug, Clone, Default, Serialize, Deserialize)]
75pub struct CardDto {
76    /// Allowed values: `visa`, `mastercard`, `other`.
77    /// Required by the API.
78    #[serde(rename = "type")]
79    pub type_: String,
80    /// Last 4 digit of the card
81    /// Required by the API.
82    pub last4: String,
83}
84
85/// `ChequeDto` from the GoHighLevel OpenAPI spec.
86#[derive(Debug, Clone, Default, Serialize, Deserialize)]
87pub struct ChequeDto {
88    /// check number
89    /// Required by the API.
90    pub number: String,
91}
92
93/// `ConnectCustomProvidersConfigDto` from the GoHighLevel OpenAPI spec.
94#[derive(Debug, Clone, Default, Serialize, Deserialize)]
95pub struct ConnectCustomProvidersConfigDto {
96    /// Live config containing api-key and publishable key for live payments
97    /// Required by the API.
98    pub live: CustomProviderKeys,
99    /// Test config containing api-key and publishable-key for test payments
100    /// Required by the API.
101    pub test: CustomProviderKeys,
102}
103
104/// `ConnectCustomProvidersResponseSchema` from the GoHighLevel OpenAPI spec.
105#[derive(Debug, Clone, Default, Serialize, Deserialize)]
106pub struct ConnectCustomProvidersResponseSchema {
107    /// The name of the custom provider
108    /// Required by the API.
109    /// (Optional here so responses that omit it still parse.)
110    #[serde(default, skip_serializing_if = "Option::is_none")]
111    pub name: Option<String>,
112    /// Description of payment gateway. Shown on the payments integrations page as subtext
113    /// Required by the API.
114    /// (Optional here so responses that omit it still parse.)
115    #[serde(default, skip_serializing_if = "Option::is_none")]
116    pub description: Option<String>,
117    /// This url will be loaded in iFrame to start a payment session.
118    /// Required by the API.
119    /// (Optional here so responses that omit it still parse.)
120    #[serde(
121        rename = "paymentsUrl",
122        default,
123        skip_serializing_if = "Option::is_none"
124    )]
125    pub payments_url: Option<String>,
126    /// The url used for querying payments related events. Ex. verify, refund, subscription etc.
127    /// Required by the API.
128    /// (Optional here so responses that omit it still parse.)
129    #[serde(rename = "queryUrl", default, skip_serializing_if = "Option::is_none")]
130    pub query_url: Option<String>,
131    /// Public image url for logo of the payment gateway displayed on the payments integrations
132    /// page.
133    /// Required by the API.
134    /// (Optional here so responses that omit it still parse.)
135    #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
136    pub image_url: Option<String>,
137    /// The unique identifier for the custom provider.
138    /// Required by the API.
139    /// (Optional here so responses that omit it still parse.)
140    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
141    pub id: Option<String>,
142    /// Location id
143    /// Required by the API.
144    /// (Optional here so responses that omit it still parse.)
145    #[serde(
146        rename = "locationId",
147        default,
148        skip_serializing_if = "Option::is_none"
149    )]
150    pub location_id: Option<String>,
151    /// The application id of marketplace
152    /// Required by the API.
153    /// (Optional here so responses that omit it still parse.)
154    #[serde(
155        rename = "marketplaceAppId",
156        default,
157        skip_serializing_if = "Option::is_none"
158    )]
159    pub marketplace_app_id: Option<String>,
160    /// Payment provider details.
161    #[serde(
162        rename = "paymentProvider",
163        default,
164        skip_serializing_if = "Option::is_none"
165    )]
166    pub payment_provider: Option<serde_json::Value>,
167    /// Whether the config is deleted or not. true represents config is deleted
168    /// Required by the API.
169    /// (Optional here so responses that omit it still parse.)
170    #[serde(default, skip_serializing_if = "Option::is_none")]
171    pub deleted: Option<bool>,
172    /// The creation timestamp of the custom provider.
173    /// Format: date-time (ISO-8601 string).
174    /// Required by the API.
175    /// (Optional here so responses that omit it still parse.)
176    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
177    pub created_at: Option<String>,
178    /// The last update timestamp of the custom provider.
179    /// Format: date-time (ISO-8601 string).
180    /// Required by the API.
181    /// (Optional here so responses that omit it still parse.)
182    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
183    pub updated_at: Option<String>,
184    /// Trace id of the custom provider.
185    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
186    pub trace_id: Option<String>,
187}
188
189/// `CouponDto` from the GoHighLevel OpenAPI spec.
190#[derive(Debug, Clone, Default, Serialize, Deserialize)]
191pub struct CouponDto {
192    /// Unique MongoDB identifier for the coupon
193    /// Required by the API.
194    /// (Optional here so responses that omit it still parse.)
195    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
196    pub id: Option<String>,
197    /// Number of times the coupon has been used
198    /// Required by the API.
199    /// (Optional here so responses that omit it still parse.)
200    #[serde(
201        rename = "usageCount",
202        default,
203        skip_serializing_if = "Option::is_none"
204    )]
205    pub usage_count: Option<f64>,
206    /// Maximum number of times a customer can use this coupon (0 for unlimited)
207    /// Required by the API.
208    /// (Optional here so responses that omit it still parse.)
209    #[serde(
210        rename = "limitPerCustomer",
211        default,
212        skip_serializing_if = "Option::is_none"
213    )]
214    pub limit_per_customer: Option<f64>,
215    /// Location Id
216    /// Required by the API.
217    /// (Optional here so responses that omit it still parse.)
218    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
219    pub alt_id: Option<String>,
220    /// Type of entity
221    /// Required by the API.
222    /// (Optional here so responses that omit it still parse.)
223    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
224    pub alt_type: Option<String>,
225    /// Display name of the coupon
226    /// Required by the API.
227    /// (Optional here so responses that omit it still parse.)
228    #[serde(default, skip_serializing_if = "Option::is_none")]
229    pub name: Option<String>,
230    /// Redemption code for the coupon
231    /// Required by the API.
232    /// (Optional here so responses that omit it still parse.)
233    #[serde(default, skip_serializing_if = "Option::is_none")]
234    pub code: Option<String>,
235    /// Type of discount (percentage or amount)
236    /// Allowed values: `percentage`, `amount`.
237    /// Required by the API.
238    /// (Optional here so responses that omit it still parse.)
239    #[serde(
240        rename = "discountType",
241        default,
242        skip_serializing_if = "Option::is_none"
243    )]
244    pub discount_type: Option<String>,
245    /// Value of the discount (percentage or fixed amount)
246    /// Required by the API.
247    /// (Optional here so responses that omit it still parse.)
248    #[serde(
249        rename = "discountValue",
250        default,
251        skip_serializing_if = "Option::is_none"
252    )]
253    pub discount_value: Option<f64>,
254    /// Current status of the coupon
255    /// Allowed values: `scheduled`, `active`, `expired`.
256    /// Required by the API.
257    /// (Optional here so responses that omit it still parse.)
258    #[serde(default, skip_serializing_if = "Option::is_none")]
259    pub status: Option<String>,
260    /// Date when the coupon becomes active
261    /// Required by the API.
262    /// (Optional here so responses that omit it still parse.)
263    #[serde(rename = "startDate", default, skip_serializing_if = "Option::is_none")]
264    pub start_date: Option<String>,
265    /// End date when the coupon expires
266    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
267    pub end_date: Option<String>,
268    /// Indicates if the coupon applies to future recurring payments
269    /// Required by the API.
270    /// (Optional here so responses that omit it still parse.)
271    #[serde(
272        rename = "applyToFuturePayments",
273        default,
274        skip_serializing_if = "Option::is_none"
275    )]
276    pub apply_to_future_payments: Option<bool>,
277    /// Configuration for how the coupon applies to future payments
278    /// Required by the API.
279    /// (Optional here so responses that omit it still parse.)
280    #[serde(
281        rename = "applyToFuturePaymentsConfig",
282        default,
283        skip_serializing_if = "Option::is_none"
284    )]
285    pub apply_to_future_payments_config: Option<ApplyToFuturePaymentsConfigDto>,
286    /// Product Ids
287    #[serde(rename = "productIds", default, skip_serializing_if = "Vec::is_empty")]
288    pub product_ids: Vec<String>,
289    /// Price Ids
290    #[serde(rename = "priceIds", default, skip_serializing_if = "Vec::is_empty")]
291    pub price_ids: Vec<String>,
292    /// Variant Ids
293    #[serde(rename = "variantIds", default, skip_serializing_if = "Vec::is_empty")]
294    pub variant_ids: Vec<String>,
295    /// User ID associated with the coupon (if applicable)
296    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
297    pub user_id: Option<String>,
298    /// Creation timestamp
299    /// Required by the API.
300    /// (Optional here so responses that omit it still parse.)
301    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
302    pub created_at: Option<String>,
303    /// Last update timestamp
304    /// Required by the API.
305    /// (Optional here so responses that omit it still parse.)
306    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
307    pub updated_at: Option<String>,
308}
309
310/// `CreateCouponParams` from the GoHighLevel OpenAPI spec.
311#[derive(Debug, Clone, Default, Serialize, Deserialize)]
312pub struct CreateCouponParams {
313    /// Location Id
314    /// Required by the API.
315    #[serde(rename = "altId")]
316    pub alt_id: String,
317    /// Alt Type
318    /// Allowed values: `location`.
319    /// Required by the API.
320    #[serde(rename = "altType")]
321    pub alt_type: String,
322    /// Coupon Name
323    /// Required by the API.
324    pub name: String,
325    /// Coupon Code
326    /// Required by the API.
327    pub code: String,
328    /// Discount Type
329    /// Allowed values: `percentage`, `amount`.
330    /// Required by the API.
331    #[serde(rename = "discountType")]
332    pub discount_type: String,
333    /// Discount Value
334    /// Required by the API.
335    #[serde(rename = "discountValue")]
336    pub discount_value: f64,
337    /// Start date in YYYY-MM-DDTHH:mm:ssZ format
338    /// Required by the API.
339    #[serde(rename = "startDate")]
340    pub start_date: String,
341    /// End date in YYYY-MM-DDTHH:mm:ssZ format
342    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
343    pub end_date: Option<String>,
344    /// Max number of times coupon can be used
345    #[serde(
346        rename = "usageLimit",
347        default,
348        skip_serializing_if = "Option::is_none"
349    )]
350    pub usage_limit: Option<f64>,
351    /// Product Ids
352    #[serde(rename = "productIds", default, skip_serializing_if = "Vec::is_empty")]
353    pub product_ids: Vec<String>,
354    /// Price Ids
355    #[serde(rename = "priceIds", default, skip_serializing_if = "Vec::is_empty")]
356    pub price_ids: Vec<String>,
357    /// Variant Ids
358    #[serde(rename = "variantIds", default, skip_serializing_if = "Vec::is_empty")]
359    pub variant_ids: Vec<String>,
360    /// Is Coupon applicable on upcoming subscription transactions
361    #[serde(
362        rename = "applyToFuturePayments",
363        default,
364        skip_serializing_if = "Option::is_none"
365    )]
366    pub apply_to_future_payments: Option<bool>,
367    /// If coupon is applicable on upcoming subscription transactions, how many months should it
368    /// be applicable for a subscription
369    #[serde(
370        rename = "applyToFuturePaymentsConfig",
371        default,
372        skip_serializing_if = "Option::is_none"
373    )]
374    pub apply_to_future_payments_config: Option<ApplyToFuturePaymentsConfig>,
375    /// Limits whether a coupon can be redeemed only once per customer.
376    #[serde(
377        rename = "limitPerCustomer",
378        default,
379        skip_serializing_if = "Option::is_none"
380    )]
381    pub limit_per_customer: Option<bool>,
382}
383
384/// `CreateCouponResponseDto` from the GoHighLevel OpenAPI spec.
385#[derive(Debug, Clone, Default, Serialize, Deserialize)]
386pub struct CreateCouponResponseDto {
387    /// Unique MongoDB identifier for the coupon
388    /// Required by the API.
389    /// (Optional here so responses that omit it still parse.)
390    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
391    pub id: Option<String>,
392    /// Number of times the coupon has been used
393    /// Required by the API.
394    /// (Optional here so responses that omit it still parse.)
395    #[serde(
396        rename = "usageCount",
397        default,
398        skip_serializing_if = "Option::is_none"
399    )]
400    pub usage_count: Option<f64>,
401    /// Maximum number of times a customer can use this coupon (0 for unlimited)
402    /// Required by the API.
403    /// (Optional here so responses that omit it still parse.)
404    #[serde(
405        rename = "limitPerCustomer",
406        default,
407        skip_serializing_if = "Option::is_none"
408    )]
409    pub limit_per_customer: Option<f64>,
410    /// Location Id
411    /// Required by the API.
412    /// (Optional here so responses that omit it still parse.)
413    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
414    pub alt_id: Option<String>,
415    /// Type of entity
416    /// Required by the API.
417    /// (Optional here so responses that omit it still parse.)
418    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
419    pub alt_type: Option<String>,
420    /// Display name of the coupon
421    /// Required by the API.
422    /// (Optional here so responses that omit it still parse.)
423    #[serde(default, skip_serializing_if = "Option::is_none")]
424    pub name: Option<String>,
425    /// Redemption code for the coupon
426    /// Required by the API.
427    /// (Optional here so responses that omit it still parse.)
428    #[serde(default, skip_serializing_if = "Option::is_none")]
429    pub code: Option<String>,
430    /// Type of discount (percentage or amount)
431    /// Allowed values: `percentage`, `amount`.
432    /// Required by the API.
433    /// (Optional here so responses that omit it still parse.)
434    #[serde(
435        rename = "discountType",
436        default,
437        skip_serializing_if = "Option::is_none"
438    )]
439    pub discount_type: Option<String>,
440    /// Value of the discount (percentage or fixed amount)
441    /// Required by the API.
442    /// (Optional here so responses that omit it still parse.)
443    #[serde(
444        rename = "discountValue",
445        default,
446        skip_serializing_if = "Option::is_none"
447    )]
448    pub discount_value: Option<f64>,
449    /// Current status of the coupon
450    /// Allowed values: `scheduled`, `active`, `expired`.
451    /// Required by the API.
452    /// (Optional here so responses that omit it still parse.)
453    #[serde(default, skip_serializing_if = "Option::is_none")]
454    pub status: Option<String>,
455    /// Date when the coupon becomes active
456    /// Required by the API.
457    /// (Optional here so responses that omit it still parse.)
458    #[serde(rename = "startDate", default, skip_serializing_if = "Option::is_none")]
459    pub start_date: Option<String>,
460    /// End date when the coupon expires
461    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
462    pub end_date: Option<String>,
463    /// Indicates if the coupon applies to future recurring payments
464    /// Required by the API.
465    /// (Optional here so responses that omit it still parse.)
466    #[serde(
467        rename = "applyToFuturePayments",
468        default,
469        skip_serializing_if = "Option::is_none"
470    )]
471    pub apply_to_future_payments: Option<bool>,
472    /// Configuration for how the coupon applies to future payments
473    /// Required by the API.
474    /// (Optional here so responses that omit it still parse.)
475    #[serde(
476        rename = "applyToFuturePaymentsConfig",
477        default,
478        skip_serializing_if = "Option::is_none"
479    )]
480    pub apply_to_future_payments_config: Option<ApplyToFuturePaymentsConfigDto>,
481    /// User ID associated with the coupon (if applicable)
482    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
483    pub user_id: Option<String>,
484    /// Creation timestamp
485    /// Required by the API.
486    /// (Optional here so responses that omit it still parse.)
487    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
488    pub created_at: Option<String>,
489    /// Last update timestamp
490    /// Required by the API.
491    /// (Optional here so responses that omit it still parse.)
492    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
493    pub updated_at: Option<String>,
494    /// Unique identifier for tracing this API request
495    /// Required by the API.
496    /// (Optional here so responses that omit it still parse.)
497    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
498    pub trace_id: Option<String>,
499}
500
501/// `CreateCustomProvidersDto` from the GoHighLevel OpenAPI spec.
502#[derive(Debug, Clone, Default, Serialize, Deserialize)]
503pub struct CreateCustomProvidersDto {
504    /// The name of the custom provider
505    /// Required by the API.
506    pub name: String,
507    /// Description of payment gateway. Shown on the payments integrations page as subtext
508    /// Required by the API.
509    pub description: String,
510    /// This url will be loaded in iFrame to start a payment session.
511    /// Required by the API.
512    #[serde(rename = "paymentsUrl")]
513    pub payments_url: String,
514    /// The url used for querying payments related events. Ex. verify, refund, subscription etc.
515    /// Required by the API.
516    #[serde(rename = "queryUrl")]
517    pub query_url: String,
518    /// Public image url for logo of the payment gateway displayed on the payments integrations
519    /// page.
520    /// Required by the API.
521    #[serde(rename = "imageUrl")]
522    pub image_url: String,
523    /// Whether the config supports subscription schedule or not. true represents config
524    /// supports subscription schedule
525    /// Required by the API.
526    #[serde(rename = "supportsSubscriptionSchedule")]
527    pub supports_subscription_schedule: bool,
528}
529
530/// `CreateCustomProvidersResponseSchema` from the GoHighLevel OpenAPI spec.
531#[derive(Debug, Clone, Default, Serialize, Deserialize)]
532pub struct CreateCustomProvidersResponseSchema {
533    /// The name of the custom provider
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    /// Description of payment gateway. Shown on the payments integrations page as subtext
539    /// Required by the API.
540    /// (Optional here so responses that omit it still parse.)
541    #[serde(default, skip_serializing_if = "Option::is_none")]
542    pub description: Option<String>,
543    /// This url will be loaded in iFrame to start a payment session.
544    /// Required by the API.
545    /// (Optional here so responses that omit it still parse.)
546    #[serde(
547        rename = "paymentsUrl",
548        default,
549        skip_serializing_if = "Option::is_none"
550    )]
551    pub payments_url: Option<String>,
552    /// The url used for querying payments related events. Ex. verify, refund, subscription etc.
553    /// Required by the API.
554    /// (Optional here so responses that omit it still parse.)
555    #[serde(rename = "queryUrl", default, skip_serializing_if = "Option::is_none")]
556    pub query_url: Option<String>,
557    /// Public image url for logo of the payment gateway displayed on the payments integrations
558    /// page.
559    /// Required by the API.
560    /// (Optional here so responses that omit it still parse.)
561    #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
562    pub image_url: Option<String>,
563    /// The unique identifier for the custom provider.
564    /// Required by the API.
565    /// (Optional here so responses that omit it still parse.)
566    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
567    pub id: Option<String>,
568    /// Location id
569    /// Required by the API.
570    /// (Optional here so responses that omit it still parse.)
571    #[serde(
572        rename = "locationId",
573        default,
574        skip_serializing_if = "Option::is_none"
575    )]
576    pub location_id: Option<String>,
577    /// The application id of marketplace
578    /// Required by the API.
579    /// (Optional here so responses that omit it still parse.)
580    #[serde(
581        rename = "marketplaceAppId",
582        default,
583        skip_serializing_if = "Option::is_none"
584    )]
585    pub marketplace_app_id: Option<String>,
586    /// Payment provider details.
587    #[serde(
588        rename = "paymentProvider",
589        default,
590        skip_serializing_if = "Option::is_none"
591    )]
592    pub payment_provider: Option<serde_json::Value>,
593    /// Whether the config is deleted or not. true represents config is deleted
594    /// Required by the API.
595    /// (Optional here so responses that omit it still parse.)
596    #[serde(default, skip_serializing_if = "Option::is_none")]
597    pub deleted: Option<bool>,
598    /// The creation timestamp of the custom provider.
599    /// Format: date-time (ISO-8601 string).
600    /// Required by the API.
601    /// (Optional here so responses that omit it still parse.)
602    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
603    pub created_at: Option<String>,
604    /// The last update timestamp of the custom provider.
605    /// Format: date-time (ISO-8601 string).
606    /// Required by the API.
607    /// (Optional here so responses that omit it still parse.)
608    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
609    pub updated_at: Option<String>,
610    /// Trace id of the custom provider.
611    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
612    pub trace_id: Option<String>,
613}
614
615/// `CreateFulfillmentDto` from the GoHighLevel OpenAPI spec.
616#[derive(Debug, Clone, Default, Serialize, Deserialize)]
617pub struct CreateFulfillmentDto {
618    /// Location Id or Agency Id
619    /// Required by the API.
620    #[serde(rename = "altId")]
621    pub alt_id: String,
622    /// Allowed values: `location`.
623    /// Required by the API.
624    #[serde(rename = "altType")]
625    pub alt_type: String,
626    /// Fulfillment tracking information
627    /// Required by the API.
628    #[serde(default, skip_serializing_if = "Vec::is_empty")]
629    pub trackings: Vec<FulfillmentTracking>,
630    /// Fulfilled items
631    /// Required by the API.
632    #[serde(default, skip_serializing_if = "Vec::is_empty")]
633    pub items: Vec<FulfillmentItems>,
634    /// Need to send a notification to customer
635    /// Required by the API.
636    #[serde(rename = "notifyCustomer")]
637    pub notify_customer: bool,
638}
639
640/// `CreateFulfillmentResponseDto` from the GoHighLevel OpenAPI spec.
641#[derive(Debug, Clone, Default, Serialize, Deserialize)]
642pub struct CreateFulfillmentResponseDto {
643    /// Status of api action
644    /// Required by the API.
645    /// (Optional here so responses that omit it still parse.)
646    #[serde(default, skip_serializing_if = "Option::is_none")]
647    pub status: Option<bool>,
648    /// fulfillment data
649    /// Required by the API.
650    /// (Optional here so responses that omit it still parse.)
651    #[serde(default, skip_serializing_if = "Option::is_none")]
652    pub data: Option<FulfillmentSchema>,
653}
654
655/// `CreateWhiteLabelIntegrationProviderDto` from the GoHighLevel OpenAPI spec.
656#[derive(Debug, Clone, Default, Serialize, Deserialize)]
657pub struct CreateWhiteLabelIntegrationProviderDto {
658    /// location Id / company Id based on altType
659    /// Required by the API.
660    #[serde(rename = "altId")]
661    pub alt_id: String,
662    /// Alt Type
663    /// Allowed values: `location`.
664    /// Required by the API.
665    #[serde(rename = "altType")]
666    pub alt_type: String,
667    /// A unique name given to the integration provider, uniqueName must start and end with a
668    /// character. Only lowercase characters and hyphens (-) are supported
669    /// Required by the API.
670    #[serde(rename = "uniqueName")]
671    pub unique_name: String,
672    /// The title or name of the integration provider.
673    /// Required by the API.
674    pub title: String,
675    /// The type of payment provider associated with the integration provider.
676    /// Allowed values: `authorize-net`, `nmi`.
677    /// Required by the API.
678    pub provider: String,
679    /// A brief description providing additional information about the integration provider.
680    /// Required by the API.
681    pub description: String,
682    /// The URL to an image representing the integration provider. The imageUrl should start
683    /// with "<https://"> and ensure that this URL is publicly accessible.
684    /// Required by the API.
685    #[serde(rename = "imageUrl")]
686    pub image_url: String,
687}
688
689/// `CreateWhitelabelIntegrationResponseDto` from the GoHighLevel OpenAPI spec.
690#[derive(Debug, Clone, Default, Serialize, Deserialize)]
691pub struct CreateWhitelabelIntegrationResponseDto {
692    /// The unique identifier of the integration provider.
693    /// Required by the API.
694    /// (Optional here so responses that omit it still parse.)
695    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
696    pub id: Option<String>,
697    /// The altId / locationId of the integration provider.
698    /// Required by the API.
699    /// (Optional here so responses that omit it still parse.)
700    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
701    pub alt_id: Option<String>,
702    /// The altType of the integration provider.
703    /// Required by the API.
704    /// (Optional here so responses that omit it still parse.)
705    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
706    pub alt_type: Option<String>,
707    /// The title or name of the integration provider.
708    /// Required by the API.
709    /// (Optional here so responses that omit it still parse.)
710    #[serde(default, skip_serializing_if = "Option::is_none")]
711    pub title: Option<String>,
712    /// The route name associated with the integration provider.
713    /// Required by the API.
714    /// (Optional here so responses that omit it still parse.)
715    #[serde(default, skip_serializing_if = "Option::is_none")]
716    pub route: Option<String>,
717    /// The payment provider associated with the integration provider.
718    /// Required by the API.
719    /// (Optional here so responses that omit it still parse.)
720    #[serde(default, skip_serializing_if = "Option::is_none")]
721    pub provider: Option<String>,
722    /// A brief description providing additional information about the integration provider.
723    /// Required by the API.
724    /// (Optional here so responses that omit it still parse.)
725    #[serde(default, skip_serializing_if = "Option::is_none")]
726    pub description: Option<String>,
727    /// The URL to an image representing the integration provider.
728    /// Required by the API.
729    /// (Optional here so responses that omit it still parse.)
730    #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
731    pub image_url: Option<String>,
732    /// The timestamp when the integration provider was created.
733    /// Format: date-time (ISO-8601 string).
734    /// Required by the API.
735    /// (Optional here so responses that omit it still parse.)
736    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
737    pub created_at: Option<String>,
738    /// The timestamp when the integration provider was last updated.
739    /// Format: date-time (ISO-8601 string).
740    /// Required by the API.
741    /// (Optional here so responses that omit it still parse.)
742    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
743    pub updated_at: Option<String>,
744}
745
746/// `CustomProviderKeys` from the GoHighLevel OpenAPI spec.
747#[derive(Debug, Clone, Default, Serialize, Deserialize)]
748pub struct CustomProviderKeys {
749    /// Api-key for custom payment provider config
750    /// Required by the API.
751    #[serde(rename = "apiKey")]
752    pub api_key: String,
753    /// Publishable-key for custom payment provider config
754    /// Required by the API.
755    #[serde(rename = "publishableKey")]
756    pub publishable_key: String,
757}
758
759/// `CustomRRuleOptionsDto` from the GoHighLevel OpenAPI spec.
760#[derive(Debug, Clone, Default, Serialize, Deserialize)]
761pub struct CustomRRuleOptionsDto {
762    /// Allowed values: `yearly`, `monthly`, `weekly`, `daily`, `hourly`, `minutely`,
763    /// `secondly`.
764    /// Required by the API.
765    /// (Optional here so responses that omit it still parse.)
766    #[serde(
767        rename = "intervalType",
768        default,
769        skip_serializing_if = "Option::is_none"
770    )]
771    pub interval_type: Option<String>,
772    /// Required by the API.
773    /// (Optional here so responses that omit it still parse.)
774    #[serde(default, skip_serializing_if = "Option::is_none")]
775    pub interval: Option<f64>,
776    /// Start date in YYYY-MM-DD format
777    /// Required by the API.
778    /// (Optional here so responses that omit it still parse.)
779    #[serde(rename = "startDate", default, skip_serializing_if = "Option::is_none")]
780    pub start_date: Option<String>,
781    /// Start time in HH:mm:ss format
782    #[serde(rename = "startTime", default, skip_serializing_if = "Option::is_none")]
783    pub start_time: Option<String>,
784    /// End date in YYYY-MM-DD format
785    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
786    pub end_date: Option<String>,
787    /// End time in HH:mm:ss format
788    #[serde(rename = "endTime", default, skip_serializing_if = "Option::is_none")]
789    pub end_time: Option<String>,
790    /// -1, 1, 2, 3, ..., 27, 28
791    #[serde(
792        rename = "dayOfMonth",
793        default,
794        skip_serializing_if = "Option::is_none"
795    )]
796    pub day_of_month: Option<f64>,
797    /// Allowed values: `mo`, `tu`, `we`, `th`, `fr`, `sa`, `su`.
798    #[serde(rename = "dayOfWeek", default, skip_serializing_if = "Option::is_none")]
799    pub day_of_week: Option<String>,
800    /// -1, 1, 2, 3, 4
801    #[serde(rename = "numOfWeek", default, skip_serializing_if = "Option::is_none")]
802    pub num_of_week: Option<f64>,
803    /// Allowed values: `jan`, `feb`, `mar`, `apr`, `may`, `jun`, `jul`, `aug`, `sep`, `oct`,
804    /// `nov`, `dec`.
805    #[serde(
806        rename = "monthOfYear",
807        default,
808        skip_serializing_if = "Option::is_none"
809    )]
810    pub month_of_year: Option<String>,
811    /// Max number of task executions
812    #[serde(default, skip_serializing_if = "Option::is_none")]
813    pub count: Option<f64>,
814    /// Execute task number of days before
815    #[serde(
816        rename = "daysBefore",
817        default,
818        skip_serializing_if = "Option::is_none"
819    )]
820    pub days_before: Option<f64>,
821}
822
823/// `DefaultPriceResponseDto` from the GoHighLevel OpenAPI spec.
824#[derive(Debug, Clone, Default, Serialize, Deserialize)]
825pub struct DefaultPriceResponseDto {
826    /// The unique identifier for the price.
827    /// Required by the API.
828    /// (Optional here so responses that omit it still parse.)
829    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
830    pub id: Option<String>,
831    /// An array of membership offers associated with the price.
832    #[serde(
833        rename = "membershipOffers",
834        default,
835        skip_serializing_if = "Vec::is_empty"
836    )]
837    pub membership_offers: Vec<MembershipOfferDto>,
838    /// An array of variant option IDs associated with the price.
839    #[serde(
840        rename = "variantOptionIds",
841        default,
842        skip_serializing_if = "Vec::is_empty"
843    )]
844    pub variant_option_ids: Vec<String>,
845    /// The unique identifier for the location.
846    #[serde(
847        rename = "locationId",
848        default,
849        skip_serializing_if = "Option::is_none"
850    )]
851    pub location_id: Option<String>,
852    /// The unique identifier for the associated product.
853    #[serde(default, skip_serializing_if = "Option::is_none")]
854    pub product: Option<String>,
855    /// The unique identifier for the user.
856    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
857    pub user_id: Option<String>,
858    /// The name of the price.
859    /// Required by the API.
860    /// (Optional here so responses that omit it still parse.)
861    #[serde(default, skip_serializing_if = "Option::is_none")]
862    pub name: Option<String>,
863    /// The type of the price (e.g., one_time).
864    /// Allowed values: `one_time`, `recurring`.
865    /// Required by the API.
866    /// (Optional here so responses that omit it still parse.)
867    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
868    pub type_: Option<String>,
869    /// The currency code for 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 currency: Option<String>,
874    /// The amount of the price.
875    /// Required by the API.
876    /// (Optional here so responses that omit it still parse.)
877    #[serde(default, skip_serializing_if = "Option::is_none")]
878    pub amount: Option<f64>,
879    /// The recurring details of the price (if type is recurring).
880    #[serde(default, skip_serializing_if = "Option::is_none")]
881    pub recurring: Option<RecurringDto>,
882    /// The creation timestamp of the price.
883    /// Format: date-time (ISO-8601 string).
884    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
885    pub created_at: Option<String>,
886    /// The last update timestamp of the price.
887    /// Format: date-time (ISO-8601 string).
888    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
889    pub updated_at: Option<String>,
890    /// The compare-at price for comparison purposes.
891    #[serde(
892        rename = "compareAtPrice",
893        default,
894        skip_serializing_if = "Option::is_none"
895    )]
896    pub compare_at_price: Option<f64>,
897    /// Indicates whether inventory tracking is enabled.
898    #[serde(
899        rename = "trackInventory",
900        default,
901        skip_serializing_if = "Option::is_none"
902    )]
903    pub track_inventory: Option<bool>,
904    /// Available inventory stock quantity
905    #[serde(
906        rename = "availableQuantity",
907        default,
908        skip_serializing_if = "Option::is_none"
909    )]
910    pub available_quantity: Option<f64>,
911    /// Continue selling when out of stock
912    #[serde(
913        rename = "allowOutOfStockPurchases",
914        default,
915        skip_serializing_if = "Option::is_none"
916    )]
917    pub allow_out_of_stock_purchases: Option<bool>,
918}
919
920/// `DefaultProductResponseDto` from the GoHighLevel OpenAPI spec.
921#[derive(Debug, Clone, Default, Serialize, Deserialize)]
922pub struct DefaultProductResponseDto {
923    /// The unique identifier for the product.
924    /// Required by the API.
925    /// (Optional here so responses that omit it still parse.)
926    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
927    pub id: Option<String>,
928    /// product description
929    #[serde(default, skip_serializing_if = "Option::is_none")]
930    pub description: Option<String>,
931    /// An array of variants for the product.
932    #[serde(default, skip_serializing_if = "Vec::is_empty")]
933    pub variants: Vec<ProductVariantDto>,
934    /// The unique identifier for the location.
935    /// Required by the API.
936    /// (Optional here so responses that omit it still parse.)
937    #[serde(
938        rename = "locationId",
939        default,
940        skip_serializing_if = "Option::is_none"
941    )]
942    pub location_id: Option<String>,
943    /// The name of the product.
944    /// Required by the API.
945    /// (Optional here so responses that omit it still parse.)
946    #[serde(default, skip_serializing_if = "Option::is_none")]
947    pub name: Option<String>,
948    /// The type of the product (e.g., PHYSICAL).
949    /// Required by the API.
950    /// (Optional here so responses that omit it still parse.)
951    #[serde(
952        rename = "productType",
953        default,
954        skip_serializing_if = "Option::is_none"
955    )]
956    pub product_type: Option<String>,
957    /// Indicates whether the product is available in-store.
958    #[serde(
959        rename = "availableInStore",
960        default,
961        skip_serializing_if = "Option::is_none"
962    )]
963    pub available_in_store: Option<bool>,
964    /// The creation timestamp of the product.
965    /// Format: date-time (ISO-8601 string).
966    /// Required by the API.
967    /// (Optional here so responses that omit it still parse.)
968    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
969    pub created_at: Option<String>,
970    /// The last update timestamp of the product.
971    /// Format: date-time (ISO-8601 string).
972    /// Required by the API.
973    /// (Optional here so responses that omit it still parse.)
974    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
975    pub updated_at: Option<String>,
976    /// The statement descriptor for the product.
977    #[serde(
978        rename = "statementDescriptor",
979        default,
980        skip_serializing_if = "Option::is_none"
981    )]
982    pub statement_descriptor: Option<String>,
983    /// The URL for the product image.
984    #[serde(default, skip_serializing_if = "Option::is_none")]
985    pub image: Option<String>,
986    /// An array of category Ids for the product
987    #[serde(
988        rename = "collectionIds",
989        default,
990        skip_serializing_if = "Vec::is_empty"
991    )]
992    pub collection_ids: Vec<String>,
993    /// The field indicates whether taxes are enabled for the product or not.
994    #[serde(
995        rename = "isTaxesEnabled",
996        default,
997        skip_serializing_if = "Option::is_none"
998    )]
999    pub is_taxes_enabled: Option<bool>,
1000    /// An array of ids of Taxes attached to the Product. If the expand query includes tax, the
1001    /// taxes will be of type `ProductTaxDto`. Please refer to the `ProductTaxDto` for
1002    /// additional details.
1003    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1004    pub taxes: Vec<String>,
1005    /// Tax category ID for Automatic taxes calculation.
1006    #[serde(
1007        rename = "automaticTaxCategoryId",
1008        default,
1009        skip_serializing_if = "Option::is_none"
1010    )]
1011    pub automatic_tax_category_id: Option<String>,
1012    /// The Product label details
1013    #[serde(default, skip_serializing_if = "Option::is_none")]
1014    pub label: Option<ProductLabelDto>,
1015    /// The slug of the product by which the product will be navigated
1016    #[serde(default, skip_serializing_if = "Option::is_none")]
1017    pub slug: Option<String>,
1018}
1019
1020/// `DeleteCouponParams` from the GoHighLevel OpenAPI spec.
1021#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1022pub struct DeleteCouponParams {
1023    /// Location Id
1024    /// Required by the API.
1025    #[serde(rename = "altId")]
1026    pub alt_id: String,
1027    /// Alt Type
1028    /// Allowed values: `location`.
1029    /// Required by the API.
1030    #[serde(rename = "altType")]
1031    pub alt_type: String,
1032    /// Coupon Id
1033    /// Required by the API.
1034    pub id: String,
1035}
1036
1037/// `DeleteCouponResponseDto` from the GoHighLevel OpenAPI spec.
1038#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1039pub struct DeleteCouponResponseDto {
1040    /// Indicates whether the delete was successful
1041    /// Required by the API.
1042    /// (Optional here so responses that omit it still parse.)
1043    #[serde(default, skip_serializing_if = "Option::is_none")]
1044    pub success: Option<bool>,
1045    /// Unique identifier for tracing this API request
1046    /// Required by the API.
1047    /// (Optional here so responses that omit it still parse.)
1048    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1049    pub trace_id: Option<String>,
1050}
1051
1052/// `DeleteCustomProvidersConfigDto` from the GoHighLevel OpenAPI spec.
1053#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1054pub struct DeleteCustomProvidersConfigDto {
1055    /// Whether the config is for test mode or live mode. true represents config is for live
1056    /// payments
1057    /// Required by the API.
1058    #[serde(rename = "liveMode")]
1059    pub live_mode: bool,
1060}
1061
1062/// `DeleteCustomProvidersResponseSchema` from the GoHighLevel OpenAPI spec.
1063#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1064pub struct DeleteCustomProvidersResponseSchema {
1065    /// Whether the custom provider config is disconnect or not. true represents config is
1066    /// disconnect
1067    /// Required by the API.
1068    /// (Optional here so responses that omit it still parse.)
1069    #[serde(default, skip_serializing_if = "Option::is_none")]
1070    pub success: Option<bool>,
1071}
1072
1073/// `DisconnectCustomProvidersResponseSchema` from the GoHighLevel OpenAPI spec.
1074#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1075pub struct DisconnectCustomProvidersResponseSchema {
1076    /// Whether the custom provider config is disconnect or not. true represents config is
1077    /// disconnect
1078    /// Required by the API.
1079    /// (Optional here so responses that omit it still parse.)
1080    #[serde(default, skip_serializing_if = "Option::is_none")]
1081    pub success: Option<bool>,
1082}
1083
1084/// `FulfilledItem` from the GoHighLevel OpenAPI spec.
1085#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1086pub struct FulfilledItem {
1087    /// The id of product price
1088    /// Required by the API.
1089    /// (Optional here so responses that omit it still parse.)
1090    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1091    pub id: Option<String>,
1092    /// Name
1093    /// Required by the API.
1094    /// (Optional here so responses that omit it still parse.)
1095    #[serde(default, skip_serializing_if = "Option::is_none")]
1096    pub name: Option<String>,
1097    /// Product details
1098    /// Required by the API.
1099    /// (Optional here so responses that omit it still parse.)
1100    #[serde(default, skip_serializing_if = "Option::is_none")]
1101    pub product: Option<DefaultProductResponseDto>,
1102    /// Price details
1103    /// Required by the API.
1104    /// (Optional here so responses that omit it still parse.)
1105    #[serde(default, skip_serializing_if = "Option::is_none")]
1106    pub price: Option<DefaultPriceResponseDto>,
1107    /// The no of quantity of the current fulfilled item
1108    /// Required by the API.
1109    /// (Optional here so responses that omit it still parse.)
1110    #[serde(default, skip_serializing_if = "Option::is_none")]
1111    pub qty: Option<f64>,
1112}
1113
1114/// `FulfillmentItems` from the GoHighLevel OpenAPI spec.
1115#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1116pub struct FulfillmentItems {
1117    /// The id of product price
1118    /// Required by the API.
1119    #[serde(rename = "priceId")]
1120    pub price_id: String,
1121    /// The no of quantity of the item
1122    /// Required by the API.
1123    pub qty: f64,
1124}
1125
1126/// `FulfillmentSchema` from the GoHighLevel OpenAPI spec.
1127#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1128pub struct FulfillmentSchema {
1129    /// Location Id or Agency Id
1130    /// Required by the API.
1131    /// (Optional here so responses that omit it still parse.)
1132    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
1133    pub alt_id: Option<String>,
1134    /// Allowed values: `location`.
1135    /// Required by the API.
1136    /// (Optional here so responses that omit it still parse.)
1137    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
1138    pub alt_type: Option<String>,
1139    /// Fulfillment tracking information
1140    /// Required by the API.
1141    /// (Optional here so responses that omit it still parse.)
1142    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1143    pub trackings: Vec<FulfillmentTracking>,
1144    /// The unique identifier for the fulfillment item.
1145    /// Required by the API.
1146    /// (Optional here so responses that omit it still parse.)
1147    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1148    pub id: Option<String>,
1149    /// Fulfilled items
1150    /// Required by the API.
1151    /// (Optional here so responses that omit it still parse.)
1152    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1153    pub items: Vec<FulfilledItem>,
1154    /// created at
1155    /// Required by the API.
1156    /// (Optional here so responses that omit it still parse.)
1157    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1158    pub created_at: Option<String>,
1159    /// updated at
1160    /// Required by the API.
1161    /// (Optional here so responses that omit it still parse.)
1162    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1163    pub updated_at: Option<String>,
1164}
1165
1166/// `FulfillmentTracking` from the GoHighLevel OpenAPI spec.
1167#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1168pub struct FulfillmentTracking {
1169    /// Tracking number provided by the shipping carrier
1170    #[serde(
1171        rename = "trackingNumber",
1172        default,
1173        skip_serializing_if = "Option::is_none"
1174    )]
1175    pub tracking_number: Option<String>,
1176    /// Shipping carrier name
1177    #[serde(
1178        rename = "shippingCarrier",
1179        default,
1180        skip_serializing_if = "Option::is_none"
1181    )]
1182    pub shipping_carrier: Option<String>,
1183    /// Tracking URL
1184    #[serde(
1185        rename = "trackingUrl",
1186        default,
1187        skip_serializing_if = "Option::is_none"
1188    )]
1189    pub tracking_url: Option<String>,
1190}
1191
1192/// `GetCustomProvidersResponseSchema` from the GoHighLevel OpenAPI spec.
1193#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1194pub struct GetCustomProvidersResponseSchema {
1195    /// The name of the custom provider
1196    /// Required by the API.
1197    /// (Optional here so responses that omit it still parse.)
1198    #[serde(default, skip_serializing_if = "Option::is_none")]
1199    pub name: Option<String>,
1200    /// Description of payment gateway. Shown on the payments integrations page as subtext
1201    /// Required by the API.
1202    /// (Optional here so responses that omit it still parse.)
1203    #[serde(default, skip_serializing_if = "Option::is_none")]
1204    pub description: Option<String>,
1205    /// This url will be loaded in iFrame to start a payment session.
1206    /// Required by the API.
1207    /// (Optional here so responses that omit it still parse.)
1208    #[serde(
1209        rename = "paymentsUrl",
1210        default,
1211        skip_serializing_if = "Option::is_none"
1212    )]
1213    pub payments_url: Option<String>,
1214    /// The url used for querying payments related events. Ex. verify, refund, subscription etc.
1215    /// Required by the API.
1216    /// (Optional here so responses that omit it still parse.)
1217    #[serde(rename = "queryUrl", default, skip_serializing_if = "Option::is_none")]
1218    pub query_url: Option<String>,
1219    /// Public image url for logo of the payment gateway displayed on the payments integrations
1220    /// page.
1221    /// Required by the API.
1222    /// (Optional here so responses that omit it still parse.)
1223    #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
1224    pub image_url: Option<String>,
1225    /// The unique identifier for the custom provider.
1226    /// Required by the API.
1227    /// (Optional here so responses that omit it still parse.)
1228    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1229    pub id: Option<String>,
1230    /// Location id
1231    /// Required by the API.
1232    /// (Optional here so responses that omit it still parse.)
1233    #[serde(
1234        rename = "locationId",
1235        default,
1236        skip_serializing_if = "Option::is_none"
1237    )]
1238    pub location_id: Option<String>,
1239    /// The application id of marketplace
1240    /// Required by the API.
1241    /// (Optional here so responses that omit it still parse.)
1242    #[serde(
1243        rename = "marketplaceAppId",
1244        default,
1245        skip_serializing_if = "Option::is_none"
1246    )]
1247    pub marketplace_app_id: Option<String>,
1248    /// Payment provider details.
1249    #[serde(
1250        rename = "paymentProvider",
1251        default,
1252        skip_serializing_if = "Option::is_none"
1253    )]
1254    pub payment_provider: Option<serde_json::Value>,
1255    /// Whether the config is deleted or not. true represents config is deleted
1256    /// Required by the API.
1257    /// (Optional here so responses that omit it still parse.)
1258    #[serde(default, skip_serializing_if = "Option::is_none")]
1259    pub deleted: Option<bool>,
1260    /// The creation timestamp of the custom provider.
1261    /// Format: date-time (ISO-8601 string).
1262    /// Required by the API.
1263    /// (Optional here so responses that omit it still parse.)
1264    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1265    pub created_at: Option<String>,
1266    /// The last update timestamp of the custom provider.
1267    /// Format: date-time (ISO-8601 string).
1268    /// Required by the API.
1269    /// (Optional here so responses that omit it still parse.)
1270    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1271    pub updated_at: Option<String>,
1272    /// Trace id of the custom provider.
1273    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1274    pub trace_id: Option<String>,
1275}
1276
1277/// `GetOrderResponseSchema` from the GoHighLevel OpenAPI spec.
1278#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1279pub struct GetOrderResponseSchema {
1280    /// The unique identifier for the order.
1281    /// Required by the API.
1282    /// (Optional here so responses that omit it still parse.)
1283    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1284    pub id: Option<String>,
1285    /// AltId is the unique identifier eg: location id.
1286    /// Required by the API.
1287    /// (Optional here so responses that omit it still parse.)
1288    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
1289    pub alt_id: Option<String>,
1290    /// AltType is the type of identifier.
1291    /// Required by the API.
1292    /// (Optional here so responses that omit it still parse.)
1293    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
1294    pub alt_type: Option<String>,
1295    /// Contact id corresponding to the order.
1296    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
1297    pub contact_id: Option<String>,
1298    /// Currency in which order was created.
1299    #[serde(default, skip_serializing_if = "Option::is_none")]
1300    pub currency: Option<String>,
1301    /// Order value.
1302    #[serde(default, skip_serializing_if = "Option::is_none")]
1303    pub amount: Option<f64>,
1304    /// The status of the order (e.g., completed).
1305    /// Required by the API.
1306    /// (Optional here so responses that omit it still parse.)
1307    #[serde(default, skip_serializing_if = "Option::is_none")]
1308    pub status: Option<String>,
1309    /// Order is in live / test mode.
1310    #[serde(rename = "liveMode", default, skip_serializing_if = "Option::is_none")]
1311    pub live_mode: Option<bool>,
1312    /// The creation timestamp of the order.
1313    /// Format: date-time (ISO-8601 string).
1314    /// Required by the API.
1315    /// (Optional here so responses that omit it still parse.)
1316    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1317    pub created_at: Option<String>,
1318    /// The last update timestamp of the order.
1319    /// Format: date-time (ISO-8601 string).
1320    /// Required by the API.
1321    /// (Optional here so responses that omit it still parse.)
1322    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1323    pub updated_at: Option<String>,
1324    /// Fulfillment status of the order.
1325    #[serde(
1326        rename = "fulfillmentStatus",
1327        default,
1328        skip_serializing_if = "Option::is_none"
1329    )]
1330    pub fulfillment_status: Option<String>,
1331    /// Contact details of the order.
1332    #[serde(
1333        rename = "contactSnapshot",
1334        default,
1335        skip_serializing_if = "Option::is_none"
1336    )]
1337    pub contact_snapshot: Option<serde_json::Value>,
1338    /// Amount details of the order.
1339    #[serde(
1340        rename = "amountSummary",
1341        default,
1342        skip_serializing_if = "Option::is_none"
1343    )]
1344    pub amount_summary: Option<AmountSummary>,
1345    /// Source details of the order.
1346    #[serde(default, skip_serializing_if = "Option::is_none")]
1347    pub source: Option<OrderSource>,
1348    /// Item details of the order.
1349    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1350    pub items: Vec<String>,
1351    /// Coupon details of the order.
1352    #[serde(default, skip_serializing_if = "Option::is_none")]
1353    pub coupon: Option<serde_json::Value>,
1354    /// Tracking id of the order.
1355    #[serde(
1356        rename = "trackingId",
1357        default,
1358        skip_serializing_if = "Option::is_none"
1359    )]
1360    pub tracking_id: Option<String>,
1361    /// Fingerprint id of the order.
1362    #[serde(default, skip_serializing_if = "Option::is_none")]
1363    pub fingerprint: Option<String>,
1364    /// Meta details of the order.
1365    #[serde(default, skip_serializing_if = "Option::is_none")]
1366    pub meta: Option<serde_json::Value>,
1367    /// Is test order.
1368    #[serde(
1369        rename = "markAsTest",
1370        default,
1371        skip_serializing_if = "Option::is_none"
1372    )]
1373    pub mark_as_test: Option<bool>,
1374    /// Trace id of the order.
1375    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1376    pub trace_id: Option<String>,
1377    /// Automatic taxes applied for the Order
1378    #[serde(
1379        rename = "automaticTaxesCalculated",
1380        default,
1381        skip_serializing_if = "Option::is_none"
1382    )]
1383    pub automatic_taxes_calculated: Option<bool>,
1384    /// Provider name for automatic tax calculation
1385    #[serde(
1386        rename = "taxCalculationProvider",
1387        default,
1388        skip_serializing_if = "Option::is_none"
1389    )]
1390    pub tax_calculation_provider: Option<serde_json::Value>,
1391    /// User ID who created the order.
1392    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
1393    pub created_by: Option<String>,
1394}
1395
1396/// `GetSubscriptionResponseSchema` from the GoHighLevel OpenAPI spec.
1397#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1398pub struct GetSubscriptionResponseSchema {
1399    /// The unique identifier for the subscription.
1400    /// Required by the API.
1401    /// (Optional here so responses that omit it still parse.)
1402    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1403    pub id: Option<String>,
1404    /// AltType is the type of identifier.
1405    /// Required by the API.
1406    /// (Optional here so responses that omit it still parse.)
1407    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
1408    pub alt_type: Option<serde_json::Value>,
1409    /// AltId is the unique identifier eg: location id.
1410    /// Required by the API.
1411    /// (Optional here so responses that omit it still parse.)
1412    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
1413    pub alt_id: Option<String>,
1414    /// Contact id corresponding to the subscription.
1415    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
1416    pub contact_id: Option<String>,
1417    /// Contact details of the subscriber.
1418    #[serde(
1419        rename = "contactSnapshot",
1420        default,
1421        skip_serializing_if = "Option::is_none"
1422    )]
1423    pub contact_snapshot: Option<serde_json::Value>,
1424    /// Coupon details of the subscription.
1425    #[serde(default, skip_serializing_if = "Option::is_none")]
1426    pub coupon: Option<serde_json::Value>,
1427    /// Currency in which subscription was made.
1428    #[serde(default, skip_serializing_if = "Option::is_none")]
1429    pub currency: Option<String>,
1430    /// Subscription value.
1431    #[serde(default, skip_serializing_if = "Option::is_none")]
1432    pub amount: Option<f64>,
1433    /// Subscription status.
1434    #[serde(default, skip_serializing_if = "Option::is_none")]
1435    pub status: Option<serde_json::Value>,
1436    /// Subscription is in live / test mode.
1437    #[serde(rename = "liveMode", default, skip_serializing_if = "Option::is_none")]
1438    pub live_mode: Option<bool>,
1439    /// Entity type of subscription (eg: order).
1440    #[serde(
1441        rename = "entityType",
1442        default,
1443        skip_serializing_if = "Option::is_none"
1444    )]
1445    pub entity_type: Option<String>,
1446    /// Entity id for the subscription. e.g: order id
1447    #[serde(rename = "entityId", default, skip_serializing_if = "Option::is_none")]
1448    pub entity_id: Option<String>,
1449    /// Entity source details for the subscription.
1450    #[serde(
1451        rename = "entitySource",
1452        default,
1453        skip_serializing_if = "Option::is_none"
1454    )]
1455    pub entity_source: Option<OrderSource>,
1456    /// Subscription id for subscription.
1457    #[serde(
1458        rename = "subscriptionId",
1459        default,
1460        skip_serializing_if = "Option::is_none"
1461    )]
1462    pub subscription_id: Option<String>,
1463    /// Snapshot of subscription.
1464    #[serde(
1465        rename = "subscriptionSnapshot",
1466        default,
1467        skip_serializing_if = "Option::is_none"
1468    )]
1469    pub subscription_snapshot: Option<serde_json::Value>,
1470    /// Payment provider details for the subscription.
1471    #[serde(
1472        rename = "paymentProvider",
1473        default,
1474        skip_serializing_if = "Option::is_none"
1475    )]
1476    pub payment_provider: Option<serde_json::Value>,
1477    /// Ip address from where subscription was initiated.
1478    #[serde(rename = "ipAddress", default, skip_serializing_if = "Option::is_none")]
1479    pub ip_address: Option<String>,
1480    /// The creation timestamp of the subscription.
1481    /// Format: date-time (ISO-8601 string).
1482    /// Required by the API.
1483    /// (Optional here so responses that omit it still parse.)
1484    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1485    pub created_at: Option<String>,
1486    /// The last update timestamp of the subscription.
1487    /// Format: date-time (ISO-8601 string).
1488    /// Required by the API.
1489    /// (Optional here so responses that omit it still parse.)
1490    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1491    pub updated_at: Option<String>,
1492    /// Meta details of the subscription.
1493    #[serde(default, skip_serializing_if = "Option::is_none")]
1494    pub meta: Option<serde_json::Value>,
1495    /// Is test subscription.
1496    #[serde(
1497        rename = "markAsTest",
1498        default,
1499        skip_serializing_if = "Option::is_none"
1500    )]
1501    pub mark_as_test: Option<bool>,
1502    /// Scedule details for the subscription.
1503    #[serde(default, skip_serializing_if = "Option::is_none")]
1504    pub schedule: Option<ScheduleOptionsDto>,
1505    /// Auto payment details of the subscription.
1506    #[serde(
1507        rename = "autoPayment",
1508        default,
1509        skip_serializing_if = "Option::is_none"
1510    )]
1511    pub auto_payment: Option<serde_json::Value>,
1512    /// Recurring product details of the subscription.
1513    #[serde(
1514        rename = "recurringProduct",
1515        default,
1516        skip_serializing_if = "Option::is_none"
1517    )]
1518    pub recurring_product: Option<serde_json::Value>,
1519    /// Cancellation timestamp of the subscription.
1520    /// Format: date-time (ISO-8601 string).
1521    #[serde(
1522        rename = "canceledAt",
1523        default,
1524        skip_serializing_if = "Option::is_none"
1525    )]
1526    pub canceled_at: Option<String>,
1527    /// User id who cancelled the subscription.
1528    #[serde(
1529        rename = "canceledBy",
1530        default,
1531        skip_serializing_if = "Option::is_none"
1532    )]
1533    pub canceled_by: Option<String>,
1534    /// Trace id of the subscription.
1535    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1536    pub trace_id: Option<String>,
1537    /// User ID who created the subscription.
1538    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
1539    pub created_by: Option<String>,
1540}
1541
1542/// `GetTxnResponseSchema` from the GoHighLevel OpenAPI spec.
1543#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1544pub struct GetTxnResponseSchema {
1545    /// The unique identifier for the transaction.
1546    /// Required by the API.
1547    /// (Optional here so responses that omit it still parse.)
1548    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1549    pub id: Option<String>,
1550    /// AltType is the type of identifier.
1551    /// Required by the API.
1552    /// (Optional here so responses that omit it still parse.)
1553    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
1554    pub alt_type: Option<String>,
1555    /// AltId is the unique identifier eg: location id.
1556    /// Required by the API.
1557    /// (Optional here so responses that omit it still parse.)
1558    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
1559    pub alt_id: Option<String>,
1560    /// Contact id corresponding to the transaction.
1561    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
1562    pub contact_id: Option<String>,
1563    /// Contact details of the transaction.
1564    #[serde(
1565        rename = "contactSnapshot",
1566        default,
1567        skip_serializing_if = "Option::is_none"
1568    )]
1569    pub contact_snapshot: Option<serde_json::Value>,
1570    /// Currency in which transaction was made.
1571    #[serde(default, skip_serializing_if = "Option::is_none")]
1572    pub currency: Option<String>,
1573    /// Transaction value.
1574    #[serde(default, skip_serializing_if = "Option::is_none")]
1575    pub amount: Option<f64>,
1576    /// Transaction status.
1577    #[serde(default, skip_serializing_if = "Option::is_none")]
1578    pub status: Option<serde_json::Value>,
1579    /// Transaction is in live / test mode.
1580    #[serde(rename = "liveMode", default, skip_serializing_if = "Option::is_none")]
1581    pub live_mode: Option<bool>,
1582    /// The creation timestamp of the transaction.
1583    /// Format: date-time (ISO-8601 string).
1584    /// Required by the API.
1585    /// (Optional here so responses that omit it still parse.)
1586    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1587    pub created_at: Option<String>,
1588    /// The last update timestamp of the transaction.
1589    /// Format: date-time (ISO-8601 string).
1590    /// Required by the API.
1591    /// (Optional here so responses that omit it still parse.)
1592    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1593    pub updated_at: Option<String>,
1594    /// Entity type of transaction (eg: order).
1595    #[serde(
1596        rename = "entityType",
1597        default,
1598        skip_serializing_if = "Option::is_none"
1599    )]
1600    pub entity_type: Option<String>,
1601    /// Entity id for the transaction. e.g: order id
1602    #[serde(rename = "entityId", default, skip_serializing_if = "Option::is_none")]
1603    pub entity_id: Option<String>,
1604    /// Entity source details for the transaction.
1605    #[serde(
1606        rename = "entitySource",
1607        default,
1608        skip_serializing_if = "Option::is_none"
1609    )]
1610    pub entity_source: Option<OrderSource>,
1611    /// Charge id for transaction.
1612    #[serde(rename = "chargeId", default, skip_serializing_if = "Option::is_none")]
1613    pub charge_id: Option<String>,
1614    /// Charge snapshot of transaction.
1615    #[serde(
1616        rename = "chargeSnapshot",
1617        default,
1618        skip_serializing_if = "Option::is_none"
1619    )]
1620    pub charge_snapshot: Option<serde_json::Value>,
1621    /// Invoice id for the transaction.
1622    #[serde(rename = "invoiceId", default, skip_serializing_if = "Option::is_none")]
1623    pub invoice_id: Option<String>,
1624    /// Subscription id for transaction.
1625    #[serde(
1626        rename = "subscriptionId",
1627        default,
1628        skip_serializing_if = "Option::is_none"
1629    )]
1630    pub subscription_id: Option<String>,
1631    /// Payment provider details of the transaction.
1632    #[serde(
1633        rename = "paymentProvider",
1634        default,
1635        skip_serializing_if = "Option::is_none"
1636    )]
1637    pub payment_provider: Option<serde_json::Value>,
1638    /// Ip address from where transaction was initiated.
1639    #[serde(rename = "ipAddress", default, skip_serializing_if = "Option::is_none")]
1640    pub ip_address: Option<String>,
1641    /// Meta details of the transaction.
1642    #[serde(default, skip_serializing_if = "Option::is_none")]
1643    pub meta: Option<serde_json::Value>,
1644    /// Is test transaction.
1645    #[serde(
1646        rename = "markAsTest",
1647        default,
1648        skip_serializing_if = "Option::is_none"
1649    )]
1650    pub mark_as_test: Option<bool>,
1651    /// Is parent transaction.
1652    #[serde(rename = "isParent", default, skip_serializing_if = "Option::is_none")]
1653    pub is_parent: Option<bool>,
1654    /// Transaction amount refunded.
1655    #[serde(
1656        rename = "amountRefunded",
1657        default,
1658        skip_serializing_if = "Option::is_none"
1659    )]
1660    pub amount_refunded: Option<f64>,
1661    /// Receipt id for transaction.
1662    #[serde(rename = "receiptId", default, skip_serializing_if = "Option::is_none")]
1663    pub receipt_id: Option<String>,
1664    /// Is transaction qbo synced.
1665    #[serde(rename = "qboSynced", default, skip_serializing_if = "Option::is_none")]
1666    pub qbo_synced: Option<bool>,
1667    /// Qbo details of the transaction.
1668    #[serde(
1669        rename = "qboResponse",
1670        default,
1671        skip_serializing_if = "Option::is_none"
1672    )]
1673    pub qbo_response: Option<serde_json::Value>,
1674    /// Trace id of the transaction.
1675    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1676    pub trace_id: Option<String>,
1677    /// ID of the contact that was merged from.
1678    #[serde(
1679        rename = "mergedFromContactId",
1680        default,
1681        skip_serializing_if = "Option::is_none"
1682    )]
1683    pub merged_from_contact_id: Option<String>,
1684    /// User ID who created the transaction.
1685    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
1686    pub created_by: Option<String>,
1687}
1688
1689/// `IntegrationProviderSchema` from the GoHighLevel OpenAPI spec.
1690#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1691pub struct IntegrationProviderSchema {
1692    /// The unique identifier of the integration provider.
1693    /// Required by the API.
1694    /// (Optional here so responses that omit it still parse.)
1695    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1696    pub id: Option<String>,
1697    /// The altId / locationId of the integration provider.
1698    /// Required by the API.
1699    /// (Optional here so responses that omit it still parse.)
1700    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
1701    pub alt_id: Option<String>,
1702    /// The altType of the integration provider.
1703    /// Required by the API.
1704    /// (Optional here so responses that omit it still parse.)
1705    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
1706    pub alt_type: Option<String>,
1707    /// The title or name of the integration provider.
1708    /// Required by the API.
1709    /// (Optional here so responses that omit it still parse.)
1710    #[serde(default, skip_serializing_if = "Option::is_none")]
1711    pub title: Option<String>,
1712    /// The route name associated with the integration provider.
1713    /// Required by the API.
1714    /// (Optional here so responses that omit it still parse.)
1715    #[serde(default, skip_serializing_if = "Option::is_none")]
1716    pub route: Option<String>,
1717    /// The payment provider associated with the integration provider.
1718    /// Required by the API.
1719    /// (Optional here so responses that omit it still parse.)
1720    #[serde(default, skip_serializing_if = "Option::is_none")]
1721    pub provider: Option<String>,
1722    /// A brief description providing additional information about the integration provider.
1723    /// Required by the API.
1724    /// (Optional here so responses that omit it still parse.)
1725    #[serde(default, skip_serializing_if = "Option::is_none")]
1726    pub description: Option<String>,
1727    /// The URL to an image representing the integration provider.
1728    /// Required by the API.
1729    /// (Optional here so responses that omit it still parse.)
1730    #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
1731    pub image_url: Option<String>,
1732    /// The timestamp when the integration provider was created.
1733    /// Format: date-time (ISO-8601 string).
1734    /// Required by the API.
1735    /// (Optional here so responses that omit it still parse.)
1736    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1737    pub created_at: Option<String>,
1738    /// The timestamp when the integration provider was last updated.
1739    /// Format: date-time (ISO-8601 string).
1740    /// Required by the API.
1741    /// (Optional here so responses that omit it still parse.)
1742    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1743    pub updated_at: Option<String>,
1744}
1745
1746/// `ListCouponsResponseDto` from the GoHighLevel OpenAPI spec.
1747#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1748pub struct ListCouponsResponseDto {
1749    /// Array of coupon objects
1750    /// Required by the API.
1751    /// (Optional here so responses that omit it still parse.)
1752    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1753    pub data: Vec<CouponDto>,
1754    /// Total number of coupons matching the query criteria
1755    /// Required by the API.
1756    /// (Optional here so responses that omit it still parse.)
1757    #[serde(
1758        rename = "totalCount",
1759        default,
1760        skip_serializing_if = "Option::is_none"
1761    )]
1762    pub total_count: Option<f64>,
1763    /// Unique identifier for tracing this API request
1764    /// Required by the API.
1765    /// (Optional here so responses that omit it still parse.)
1766    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1767    pub trace_id: Option<String>,
1768}
1769
1770/// `ListFulfillmentResponseDto` from the GoHighLevel OpenAPI spec.
1771#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1772pub struct ListFulfillmentResponseDto {
1773    /// Status of api action
1774    /// Required by the API.
1775    /// (Optional here so responses that omit it still parse.)
1776    #[serde(default, skip_serializing_if = "Option::is_none")]
1777    pub status: Option<bool>,
1778    /// An array of fulfilled items
1779    /// Required by the API.
1780    /// (Optional here so responses that omit it still parse.)
1781    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1782    pub data: Vec<FulfillmentSchema>,
1783}
1784
1785/// `ListOrdersResponseDto` from the GoHighLevel OpenAPI spec.
1786#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1787pub struct ListOrdersResponseDto {
1788    /// An array of orders
1789    /// Required by the API.
1790    /// (Optional here so responses that omit it still parse.)
1791    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1792    pub data: Vec<OrderResponseSchema>,
1793    /// total orders count
1794    /// Required by the API.
1795    /// (Optional here so responses that omit it still parse.)
1796    #[serde(
1797        rename = "totalCount",
1798        default,
1799        skip_serializing_if = "Option::is_none"
1800    )]
1801    pub total_count: Option<f64>,
1802}
1803
1804/// `ListSubscriptionResponseDto` from the GoHighLevel OpenAPI spec.
1805#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1806pub struct ListSubscriptionResponseDto {
1807    /// An array of subscriptions
1808    /// Required by the API.
1809    /// (Optional here so responses that omit it still parse.)
1810    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1811    pub data: Vec<SubscriptionResponseSchema>,
1812    /// total subscriptions count
1813    /// Required by the API.
1814    /// (Optional here so responses that omit it still parse.)
1815    #[serde(
1816        rename = "totalCount",
1817        default,
1818        skip_serializing_if = "Option::is_none"
1819    )]
1820    pub total_count: Option<f64>,
1821}
1822
1823/// `ListTxnsResponseDto` from the GoHighLevel OpenAPI spec.
1824#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1825pub struct ListTxnsResponseDto {
1826    /// An array of transactions
1827    /// Required by the API.
1828    /// (Optional here so responses that omit it still parse.)
1829    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1830    pub data: Vec<TxnResponseSchema>,
1831    /// total transactions count
1832    /// Required by the API.
1833    /// (Optional here so responses that omit it still parse.)
1834    #[serde(
1835        rename = "totalCount",
1836        default,
1837        skip_serializing_if = "Option::is_none"
1838    )]
1839    pub total_count: Option<f64>,
1840}
1841
1842/// `ListWhitelabelIntegrationProviderResponseDto` from the GoHighLevel OpenAPI spec.
1843#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1844pub struct ListWhitelabelIntegrationProviderResponseDto {
1845    /// list of integration provider.
1846    /// Required by the API.
1847    /// (Optional here so responses that omit it still parse.)
1848    #[serde(default, skip_serializing_if = "Option::is_none")]
1849    pub providers: Option<IntegrationProviderSchema>,
1850}
1851
1852/// `MembershipOfferDto` from the GoHighLevel OpenAPI spec.
1853#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1854pub struct MembershipOfferDto {
1855    /// Membership offer label
1856    /// Required by the API.
1857    /// (Optional here so responses that omit it still parse.)
1858    #[serde(default, skip_serializing_if = "Option::is_none")]
1859    pub label: Option<String>,
1860    /// Membership offer label
1861    /// Required by the API.
1862    /// (Optional here so responses that omit it still parse.)
1863    #[serde(default, skip_serializing_if = "Option::is_none")]
1864    pub value: Option<String>,
1865    /// The unique identifier for the membership offer.
1866    /// Required by the API.
1867    /// (Optional here so responses that omit it still parse.)
1868    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1869    pub id: Option<String>,
1870}
1871
1872/// `OrderResponseSchema` from the GoHighLevel OpenAPI spec.
1873#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1874pub struct OrderResponseSchema {
1875    /// The unique identifier for the order.
1876    /// Required by the API.
1877    /// (Optional here so responses that omit it still parse.)
1878    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1879    pub id: Option<String>,
1880    /// AltId is the unique identifier eg: location id.
1881    /// Required by the API.
1882    /// (Optional here so responses that omit it still parse.)
1883    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
1884    pub alt_id: Option<String>,
1885    /// AltType is the type of identifier.
1886    /// Required by the API.
1887    /// (Optional here so responses that omit it still parse.)
1888    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
1889    pub alt_type: Option<String>,
1890    /// Contact id corresponding to the order.
1891    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
1892    pub contact_id: Option<String>,
1893    /// Contact name corresponding to the order.
1894    #[serde(
1895        rename = "contactName",
1896        default,
1897        skip_serializing_if = "Option::is_none"
1898    )]
1899    pub contact_name: Option<String>,
1900    /// Contact email corresponding to the order.
1901    #[serde(
1902        rename = "contactEmail",
1903        default,
1904        skip_serializing_if = "Option::is_none"
1905    )]
1906    pub contact_email: Option<String>,
1907    /// Currency in which order was created.
1908    #[serde(default, skip_serializing_if = "Option::is_none")]
1909    pub currency: Option<String>,
1910    /// Order value.
1911    #[serde(default, skip_serializing_if = "Option::is_none")]
1912    pub amount: Option<f64>,
1913    /// Order sub-total value.
1914    #[serde(default, skip_serializing_if = "Option::is_none")]
1915    pub subtotal: Option<f64>,
1916    /// Discount value on order.
1917    #[serde(default, skip_serializing_if = "Option::is_none")]
1918    pub discount: Option<f64>,
1919    /// The status of the order (e.g., completed).
1920    /// Required by the API.
1921    /// (Optional here so responses that omit it still parse.)
1922    #[serde(default, skip_serializing_if = "Option::is_none")]
1923    pub status: Option<String>,
1924    /// Order is in live / test mode.
1925    #[serde(rename = "liveMode", default, skip_serializing_if = "Option::is_none")]
1926    pub live_mode: Option<bool>,
1927    /// Total products in an order.
1928    #[serde(
1929        rename = "totalProducts",
1930        default,
1931        skip_serializing_if = "Option::is_none"
1932    )]
1933    pub total_products: Option<f64>,
1934    /// Source type of order (eg: funnel).
1935    /// Required by the API.
1936    /// (Optional here so responses that omit it still parse.)
1937    #[serde(
1938        rename = "sourceType",
1939        default,
1940        skip_serializing_if = "Option::is_none"
1941    )]
1942    pub source_type: Option<String>,
1943    /// Source name for the order.
1944    #[serde(
1945        rename = "sourceName",
1946        default,
1947        skip_serializing_if = "Option::is_none"
1948    )]
1949    pub source_name: Option<String>,
1950    /// Source id for the order.
1951    #[serde(rename = "sourceId", default, skip_serializing_if = "Option::is_none")]
1952    pub source_id: Option<String>,
1953    /// Meta content for the source of order.
1954    #[serde(
1955        rename = "sourceMeta",
1956        default,
1957        skip_serializing_if = "Option::is_none"
1958    )]
1959    pub source_meta: Option<serde_json::Value>,
1960    /// Coupon code for the order.
1961    #[serde(
1962        rename = "couponCode",
1963        default,
1964        skip_serializing_if = "Option::is_none"
1965    )]
1966    pub coupon_code: Option<String>,
1967    /// The creation timestamp of the order.
1968    /// Format: date-time (ISO-8601 string).
1969    /// Required by the API.
1970    /// (Optional here so responses that omit it still parse.)
1971    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1972    pub created_at: Option<String>,
1973    /// The last update timestamp of the order.
1974    /// Format: date-time (ISO-8601 string).
1975    /// Required by the API.
1976    /// (Optional here so responses that omit it still parse.)
1977    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1978    pub updated_at: Option<String>,
1979    /// Source sub-type for the order.
1980    #[serde(
1981        rename = "sourceSubType",
1982        default,
1983        skip_serializing_if = "Option::is_none"
1984    )]
1985    pub source_sub_type: Option<String>,
1986    /// Fulfillment status of the order.
1987    #[serde(
1988        rename = "fulfillmentStatus",
1989        default,
1990        skip_serializing_if = "Option::is_none"
1991    )]
1992    pub fulfillment_status: Option<String>,
1993    /// Total one time products in an order.
1994    #[serde(
1995        rename = "onetimeProducts",
1996        default,
1997        skip_serializing_if = "Option::is_none"
1998    )]
1999    pub onetime_products: Option<f64>,
2000    /// Total recurring time products in an order.
2001    #[serde(
2002        rename = "recurringProducts",
2003        default,
2004        skip_serializing_if = "Option::is_none"
2005    )]
2006    pub recurring_products: Option<f64>,
2007    /// User ID who created the order.
2008    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
2009    pub created_by: Option<String>,
2010}
2011
2012/// `OrderSource` from the GoHighLevel OpenAPI spec.
2013#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2014pub struct OrderSource {
2015    /// Allowed values: `funnel`, `website`, `invoice`, `calendar`, `text2Pay`,
2016    /// `document_contracts`, `membership`, `mobile_app`, `communities`, `point_of_sale`,
2017    /// `manual`, `form`.
2018    /// Required by the API.
2019    /// (Optional here so responses that omit it still parse.)
2020    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
2021    pub type_: Option<String>,
2022    /// Allowed values: `one_step_order_form`, `two_step_order_form`, `upsell`, `tap_to_pay`,
2023    /// `card_payment`, `store`, `contact_view`, `email_campaign`, `payments_dashboard`,
2024    /// `shopify`, `subscription_view`, `store_upsell`.
2025    #[serde(rename = "subType", default, skip_serializing_if = "Option::is_none")]
2026    pub sub_type: Option<String>,
2027    /// Required by the API.
2028    /// (Optional here so responses that omit it still parse.)
2029    #[serde(default, skip_serializing_if = "Option::is_none")]
2030    pub id: Option<String>,
2031    #[serde(default, skip_serializing_if = "Option::is_none")]
2032    pub name: Option<String>,
2033    #[serde(default, skip_serializing_if = "Option::is_none")]
2034    pub meta: Option<serde_json::Value>,
2035}
2036
2037/// `PostRecordOrderPaymentBody` from the GoHighLevel OpenAPI spec.
2038#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2039pub struct PostRecordOrderPaymentBody {
2040    /// location Id / company Id based on altType
2041    /// Required by the API.
2042    #[serde(rename = "altId")]
2043    pub alt_id: String,
2044    /// Alt Type
2045    /// Allowed values: `location`.
2046    /// Required by the API.
2047    #[serde(rename = "altType")]
2048    pub alt_type: String,
2049    /// manual payment method
2050    /// Allowed values: `cash`, `card`, `cheque`, `bank_transfer`, `other`.
2051    /// Required by the API.
2052    pub mode: String,
2053    /// Details of Card if used for payment
2054    #[serde(default, skip_serializing_if = "Option::is_none")]
2055    pub card: Option<CardDto>,
2056    /// Details of the Cheque if used for payment
2057    #[serde(default, skip_serializing_if = "Option::is_none")]
2058    pub cheque: Option<ChequeDto>,
2059    /// Any note to be recorded with the transaction
2060    #[serde(default, skip_serializing_if = "Option::is_none")]
2061    pub notes: Option<String>,
2062    /// Amount to be paid against the invoice.
2063    #[serde(default, skip_serializing_if = "Option::is_none")]
2064    pub amount: Option<f64>,
2065    /// Meta data to be recorded with the transaction
2066    #[serde(default, skip_serializing_if = "Option::is_none")]
2067    pub meta: Option<serde_json::Value>,
2068    /// Indicates if the order is intended to be a partial payment.
2069    #[serde(
2070        rename = "isPartialPayment",
2071        default,
2072        skip_serializing_if = "Option::is_none"
2073    )]
2074    pub is_partial_payment: Option<bool>,
2075}
2076
2077/// `PostRecordOrderPaymentResponse` from the GoHighLevel OpenAPI spec.
2078#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2079pub struct PostRecordOrderPaymentResponse {
2080    /// Success status of the request
2081    /// Required by the API.
2082    /// (Optional here so responses that omit it still parse.)
2083    #[serde(default, skip_serializing_if = "Option::is_none")]
2084    pub success: Option<bool>,
2085}
2086
2087/// `ProductLabelDto` from the GoHighLevel OpenAPI spec.
2088#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2089pub struct ProductLabelDto {
2090    /// The content for the product label.
2091    /// Required by the API.
2092    /// (Optional here so responses that omit it still parse.)
2093    #[serde(default, skip_serializing_if = "Option::is_none")]
2094    pub title: Option<String>,
2095    /// Start date in YYYY-MM-DDTHH:mm:ssZ format
2096    #[serde(rename = "startDate", default, skip_serializing_if = "Option::is_none")]
2097    pub start_date: Option<String>,
2098    /// Start date in YYYY-MM-DDTHH:mm:ssZ format
2099    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
2100    pub end_date: Option<String>,
2101}
2102
2103/// `ProductVariantDto` from the GoHighLevel OpenAPI spec.
2104#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2105pub struct ProductVariantDto {
2106    /// A unique identifier for the variant.
2107    /// Required by the API.
2108    /// (Optional here so responses that omit it still parse.)
2109    #[serde(default, skip_serializing_if = "Option::is_none")]
2110    pub id: Option<String>,
2111    /// The name of the variant.
2112    /// Required by the API.
2113    /// (Optional here so responses that omit it still parse.)
2114    #[serde(default, skip_serializing_if = "Option::is_none")]
2115    pub name: Option<String>,
2116    /// An array of options for the variant.
2117    /// Required by the API.
2118    /// (Optional here so responses that omit it still parse.)
2119    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2120    pub options: Vec<ProductVariantOptionDto>,
2121}
2122
2123/// `ProductVariantOptionDto` from the GoHighLevel OpenAPI spec.
2124#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2125pub struct ProductVariantOptionDto {
2126    /// The unique identifier for the option.
2127    /// Required by the API.
2128    /// (Optional here so responses that omit it still parse.)
2129    #[serde(default, skip_serializing_if = "Option::is_none")]
2130    pub id: Option<String>,
2131    /// The name of the option.
2132    /// Required by the API.
2133    /// (Optional here so responses that omit it still parse.)
2134    #[serde(default, skip_serializing_if = "Option::is_none")]
2135    pub name: Option<String>,
2136}
2137
2138/// `RecurringDto` from the GoHighLevel OpenAPI spec.
2139#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2140pub struct RecurringDto {
2141    /// The interval at which the recurring event occurs.
2142    /// Allowed values: `day`, `month`, `week`, `year`.
2143    /// Required by the API.
2144    /// (Optional here so responses that omit it still parse.)
2145    #[serde(default, skip_serializing_if = "Option::is_none")]
2146    pub interval: Option<String>,
2147    /// The number of intervals between each occurrence of the event.
2148    /// Required by the API.
2149    /// (Optional here so responses that omit it still parse.)
2150    #[serde(
2151        rename = "intervalCount",
2152        default,
2153        skip_serializing_if = "Option::is_none"
2154    )]
2155    pub interval_count: Option<f64>,
2156}
2157
2158/// `ScheduleOptionsDto` from the GoHighLevel OpenAPI spec.
2159#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2160pub struct ScheduleOptionsDto {
2161    #[serde(rename = "executeAt", default, skip_serializing_if = "Option::is_none")]
2162    pub execute_at: Option<String>,
2163    #[serde(default, skip_serializing_if = "Option::is_none")]
2164    pub rrule: Option<CustomRRuleOptionsDto>,
2165}
2166
2167/// `SubscriptionResponseSchema` from the GoHighLevel OpenAPI spec.
2168#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2169pub struct SubscriptionResponseSchema {
2170    /// The unique identifier for the subscription.
2171    /// Required by the API.
2172    /// (Optional here so responses that omit it still parse.)
2173    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
2174    pub id: Option<String>,
2175    /// AltId is the unique identifier eg: location id.
2176    /// Required by the API.
2177    /// (Optional here so responses that omit it still parse.)
2178    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
2179    pub alt_id: Option<String>,
2180    /// AltType is the type of identifier.
2181    /// Allowed values: `location`.
2182    /// Required by the API.
2183    /// (Optional here so responses that omit it still parse.)
2184    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
2185    pub alt_type: Option<String>,
2186    /// Contact id corresponding to the subscription.
2187    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
2188    pub contact_id: Option<String>,
2189    /// Contact name corresponding to the subscription.
2190    #[serde(
2191        rename = "contactName",
2192        default,
2193        skip_serializing_if = "Option::is_none"
2194    )]
2195    pub contact_name: Option<String>,
2196    /// Contact email corresponding to the subscription.
2197    #[serde(
2198        rename = "contactEmail",
2199        default,
2200        skip_serializing_if = "Option::is_none"
2201    )]
2202    pub contact_email: Option<String>,
2203    /// Currency in which subscription occurred.
2204    #[serde(default, skip_serializing_if = "Option::is_none")]
2205    pub currency: Option<String>,
2206    /// Subscription value.
2207    #[serde(default, skip_serializing_if = "Option::is_none")]
2208    pub amount: Option<f64>,
2209    /// The status of the subscription (e.g., succeeded).
2210    /// Required by the API.
2211    /// (Optional here so responses that omit it still parse.)
2212    #[serde(default, skip_serializing_if = "Option::is_none")]
2213    pub status: Option<serde_json::Value>,
2214    /// Subscription is in live / test mode.
2215    #[serde(rename = "liveMode", default, skip_serializing_if = "Option::is_none")]
2216    pub live_mode: Option<bool>,
2217    /// Entity type of subscription (eg: order).
2218    #[serde(
2219        rename = "entityType",
2220        default,
2221        skip_serializing_if = "Option::is_none"
2222    )]
2223    pub entity_type: Option<String>,
2224    /// Entity id for the subscription. e.g: order id
2225    #[serde(rename = "entityId", default, skip_serializing_if = "Option::is_none")]
2226    pub entity_id: Option<String>,
2227    /// Entity source type of subscription (eg: funnel).
2228    /// Required by the API.
2229    /// (Optional here so responses that omit it still parse.)
2230    #[serde(
2231        rename = "entitySourceType",
2232        default,
2233        skip_serializing_if = "Option::is_none"
2234    )]
2235    pub entity_source_type: Option<String>,
2236    /// Entity source name for the subscription.
2237    #[serde(
2238        rename = "entitySourceName",
2239        default,
2240        skip_serializing_if = "Option::is_none"
2241    )]
2242    pub entity_source_name: Option<String>,
2243    /// Entity source id for the subscription.
2244    #[serde(
2245        rename = "entitySourceId",
2246        default,
2247        skip_serializing_if = "Option::is_none"
2248    )]
2249    pub entity_source_id: Option<String>,
2250    /// Meta content for the entity source of subscription.
2251    #[serde(
2252        rename = "entitySourceMeta",
2253        default,
2254        skip_serializing_if = "Option::is_none"
2255    )]
2256    pub entity_source_meta: Option<serde_json::Value>,
2257    /// Subscription id for subscription.
2258    #[serde(
2259        rename = "subscriptionId",
2260        default,
2261        skip_serializing_if = "Option::is_none"
2262    )]
2263    pub subscription_id: Option<String>,
2264    /// Snapshot of subscription.
2265    #[serde(
2266        rename = "subscriptionSnapshot",
2267        default,
2268        skip_serializing_if = "Option::is_none"
2269    )]
2270    pub subscription_snapshot: Option<serde_json::Value>,
2271    /// Payment provider for subscription.
2272    #[serde(
2273        rename = "paymentProviderType",
2274        default,
2275        skip_serializing_if = "Option::is_none"
2276    )]
2277    pub payment_provider_type: Option<String>,
2278    /// Payment provider connected account id for subscription.
2279    #[serde(
2280        rename = "paymentProviderConnectedAccount",
2281        default,
2282        skip_serializing_if = "Option::is_none"
2283    )]
2284    pub payment_provider_connected_account: Option<String>,
2285    /// Ip address from where subscription was initiated.
2286    #[serde(rename = "ipAddress", default, skip_serializing_if = "Option::is_none")]
2287    pub ip_address: Option<String>,
2288    /// The creation timestamp of the subscription.
2289    /// Format: date-time (ISO-8601 string).
2290    /// Required by the API.
2291    /// (Optional here so responses that omit it still parse.)
2292    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
2293    pub created_at: Option<String>,
2294    /// The update timestamp of the subscription.
2295    /// Format: date-time (ISO-8601 string).
2296    /// Required by the API.
2297    /// (Optional here so responses that omit it still parse.)
2298    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
2299    pub updated_at: Option<String>,
2300    /// User ID who created the subscription.
2301    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
2302    pub created_by: Option<String>,
2303}
2304
2305/// `TxnResponseSchema` from the GoHighLevel OpenAPI spec.
2306#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2307pub struct TxnResponseSchema {
2308    /// The unique identifier for the transaction.
2309    /// Required by the API.
2310    /// (Optional here so responses that omit it still parse.)
2311    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
2312    pub id: Option<String>,
2313    /// AltId is the unique identifier eg: location id.
2314    /// Required by the API.
2315    /// (Optional here so responses that omit it still parse.)
2316    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
2317    pub alt_id: Option<String>,
2318    /// AltType is the type of identifier.
2319    /// Required by the API.
2320    /// (Optional here so responses that omit it still parse.)
2321    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
2322    pub alt_type: Option<String>,
2323    /// Contact id corresponding to the transaction.
2324    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
2325    pub contact_id: Option<String>,
2326    /// ID of the contact that was merged from.
2327    #[serde(
2328        rename = "mergedFromContactId",
2329        default,
2330        skip_serializing_if = "Option::is_none"
2331    )]
2332    pub merged_from_contact_id: Option<String>,
2333    /// Contact name corresponding to the transaction.
2334    #[serde(
2335        rename = "contactName",
2336        default,
2337        skip_serializing_if = "Option::is_none"
2338    )]
2339    pub contact_name: Option<String>,
2340    /// Contact email corresponding to the transaction.
2341    #[serde(
2342        rename = "contactEmail",
2343        default,
2344        skip_serializing_if = "Option::is_none"
2345    )]
2346    pub contact_email: Option<String>,
2347    /// Currency in which transaction occurred.
2348    #[serde(default, skip_serializing_if = "Option::is_none")]
2349    pub currency: Option<String>,
2350    /// Transaction value.
2351    #[serde(default, skip_serializing_if = "Option::is_none")]
2352    pub amount: Option<f64>,
2353    /// The status of the transaction (e.g., succeeded).
2354    /// Required by the API.
2355    /// (Optional here so responses that omit it still parse.)
2356    #[serde(default, skip_serializing_if = "Option::is_none")]
2357    pub status: Option<serde_json::Value>,
2358    /// Transaction is in live / test mode.
2359    #[serde(rename = "liveMode", default, skip_serializing_if = "Option::is_none")]
2360    pub live_mode: Option<bool>,
2361    /// Entity type of transaction (eg: order).
2362    #[serde(
2363        rename = "entityType",
2364        default,
2365        skip_serializing_if = "Option::is_none"
2366    )]
2367    pub entity_type: Option<String>,
2368    /// Entity id for the transaction. e.g: order id
2369    #[serde(rename = "entityId", default, skip_serializing_if = "Option::is_none")]
2370    pub entity_id: Option<String>,
2371    /// Entity source type of transaction (eg: funnel).
2372    /// Required by the API.
2373    /// (Optional here so responses that omit it still parse.)
2374    #[serde(
2375        rename = "entitySourceType",
2376        default,
2377        skip_serializing_if = "Option::is_none"
2378    )]
2379    pub entity_source_type: Option<String>,
2380    /// Entity source sub-type of the transactions.
2381    #[serde(
2382        rename = "entitySourceSubType",
2383        default,
2384        skip_serializing_if = "Option::is_none"
2385    )]
2386    pub entity_source_sub_type: Option<String>,
2387    /// Entity source name for the transaction.
2388    #[serde(
2389        rename = "entitySourceName",
2390        default,
2391        skip_serializing_if = "Option::is_none"
2392    )]
2393    pub entity_source_name: Option<String>,
2394    /// Entity source id for the transaction.
2395    #[serde(
2396        rename = "entitySourceId",
2397        default,
2398        skip_serializing_if = "Option::is_none"
2399    )]
2400    pub entity_source_id: Option<String>,
2401    /// Meta content for the entity source of transaction.
2402    #[serde(
2403        rename = "entitySourceMeta",
2404        default,
2405        skip_serializing_if = "Option::is_none"
2406    )]
2407    pub entity_source_meta: Option<serde_json::Value>,
2408    /// Subscription id for transaction.
2409    #[serde(
2410        rename = "subscriptionId",
2411        default,
2412        skip_serializing_if = "Option::is_none"
2413    )]
2414    pub subscription_id: Option<String>,
2415    /// Charge id for transaction.
2416    #[serde(rename = "chargeId", default, skip_serializing_if = "Option::is_none")]
2417    pub charge_id: Option<String>,
2418    /// Charge snapshot of transaction.
2419    #[serde(
2420        rename = "chargeSnapshot",
2421        default,
2422        skip_serializing_if = "Option::is_none"
2423    )]
2424    pub charge_snapshot: Option<serde_json::Value>,
2425    /// Payment provider for transaction.
2426    #[serde(
2427        rename = "paymentProviderType",
2428        default,
2429        skip_serializing_if = "Option::is_none"
2430    )]
2431    pub payment_provider_type: Option<String>,
2432    /// Payment provider account id for transaction.
2433    #[serde(
2434        rename = "paymentProviderConnectedAccount",
2435        default,
2436        skip_serializing_if = "Option::is_none"
2437    )]
2438    pub payment_provider_connected_account: Option<String>,
2439    /// Ip address from where transaction was initiated.
2440    #[serde(rename = "ipAddress", default, skip_serializing_if = "Option::is_none")]
2441    pub ip_address: Option<String>,
2442    /// The creation timestamp of the transaction.
2443    /// Format: date-time (ISO-8601 string).
2444    /// Required by the API.
2445    /// (Optional here so responses that omit it still parse.)
2446    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
2447    pub created_at: Option<String>,
2448    /// The update timestamp of the transaction.
2449    /// Format: date-time (ISO-8601 string).
2450    /// Required by the API.
2451    /// (Optional here so responses that omit it still parse.)
2452    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
2453    pub updated_at: Option<String>,
2454    /// Transaction amount refunded.
2455    #[serde(
2456        rename = "amountRefunded",
2457        default,
2458        skip_serializing_if = "Option::is_none"
2459    )]
2460    pub amount_refunded: Option<f64>,
2461    /// Transaction payment method details.
2462    #[serde(
2463        rename = "paymentMethod",
2464        default,
2465        skip_serializing_if = "Option::is_none"
2466    )]
2467    pub payment_method: Option<serde_json::Value>,
2468    /// The charged timestamp of the transaction.
2469    /// Format: date-time (ISO-8601 string).
2470    /// Required by the API.
2471    /// (Optional here so responses that omit it still parse.)
2472    #[serde(
2473        rename = "fulfilledAt",
2474        default,
2475        skip_serializing_if = "Option::is_none"
2476    )]
2477    pub fulfilled_at: Option<String>,
2478    /// User ID who created the transaction.
2479    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
2480    pub created_by: Option<String>,
2481}
2482
2483/// `UpdateCouponParams` from the GoHighLevel OpenAPI spec.
2484#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2485pub struct UpdateCouponParams {
2486    /// Location Id
2487    /// Required by the API.
2488    #[serde(rename = "altId")]
2489    pub alt_id: String,
2490    /// Alt Type
2491    /// Allowed values: `location`.
2492    /// Required by the API.
2493    #[serde(rename = "altType")]
2494    pub alt_type: String,
2495    /// Coupon Name
2496    /// Required by the API.
2497    pub name: String,
2498    /// Coupon Code
2499    /// Required by the API.
2500    pub code: String,
2501    /// Discount Type
2502    /// Allowed values: `percentage`, `amount`.
2503    /// Required by the API.
2504    #[serde(rename = "discountType")]
2505    pub discount_type: String,
2506    /// Discount Value
2507    /// Required by the API.
2508    #[serde(rename = "discountValue")]
2509    pub discount_value: f64,
2510    /// Start date in YYYY-MM-DDTHH:mm:ssZ format
2511    /// Required by the API.
2512    #[serde(rename = "startDate")]
2513    pub start_date: String,
2514    /// End date in YYYY-MM-DDTHH:mm:ssZ format
2515    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
2516    pub end_date: Option<String>,
2517    /// Max number of times coupon can be used
2518    #[serde(
2519        rename = "usageLimit",
2520        default,
2521        skip_serializing_if = "Option::is_none"
2522    )]
2523    pub usage_limit: Option<f64>,
2524    /// Product Ids
2525    #[serde(rename = "productIds", default, skip_serializing_if = "Vec::is_empty")]
2526    pub product_ids: Vec<String>,
2527    /// Price Ids
2528    #[serde(rename = "priceIds", default, skip_serializing_if = "Vec::is_empty")]
2529    pub price_ids: Vec<String>,
2530    /// Variant Ids
2531    #[serde(rename = "variantIds", default, skip_serializing_if = "Vec::is_empty")]
2532    pub variant_ids: Vec<String>,
2533    /// Is Coupon applicable on upcoming subscription transactions
2534    #[serde(
2535        rename = "applyToFuturePayments",
2536        default,
2537        skip_serializing_if = "Option::is_none"
2538    )]
2539    pub apply_to_future_payments: Option<bool>,
2540    /// If coupon is applicable on upcoming subscription transactions, how many months should it
2541    /// be applicable for a subscription
2542    #[serde(
2543        rename = "applyToFuturePaymentsConfig",
2544        default,
2545        skip_serializing_if = "Option::is_none"
2546    )]
2547    pub apply_to_future_payments_config: Option<ApplyToFuturePaymentsConfig>,
2548    /// Limits whether a coupon can be redeemed only once per customer.
2549    #[serde(
2550        rename = "limitPerCustomer",
2551        default,
2552        skip_serializing_if = "Option::is_none"
2553    )]
2554    pub limit_per_customer: Option<bool>,
2555    /// Coupon Id
2556    /// Required by the API.
2557    pub id: String,
2558}
2559
2560/// `UpdateCustomProviderCapabilitiesDto` from the GoHighLevel OpenAPI spec.
2561#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2562pub struct UpdateCustomProviderCapabilitiesDto {
2563    /// Whether the marketplace app supports subscription schedules or not
2564    /// Required by the API.
2565    #[serde(rename = "supportsSubscriptionSchedules")]
2566    pub supports_subscription_schedules: bool,
2567    /// Company id. Mandatory if locationId is not provided
2568    #[serde(rename = "companyId", default, skip_serializing_if = "Option::is_none")]
2569    pub company_id: Option<String>,
2570    /// Location / Sub-account id. Mandatory if companyId is not provided
2571    #[serde(
2572        rename = "locationId",
2573        default,
2574        skip_serializing_if = "Option::is_none"
2575    )]
2576    pub location_id: Option<String>,
2577}
2578
2579/// `UpdateCustomProviderCapabilitiesResponseSchema` from the GoHighLevel OpenAPI spec.
2580#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2581pub struct UpdateCustomProviderCapabilitiesResponseSchema {
2582    /// Whether the custom provider capabilities are updated or not. true represents
2583    /// capabilities are updated
2584    /// Required by the API.
2585    /// (Optional here so responses that omit it still parse.)
2586    #[serde(default, skip_serializing_if = "Option::is_none")]
2587    pub success: Option<bool>,
2588}