Skip to main content

ghl_models/v2/
payments.rs

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