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