Skip to main content

ghl_models/v3/
payments.rs

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