Skip to main content

ghl_models/v2/
payments.rs

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