Skip to main content

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