ghl-models 0.5.2

Rust data models (DTOs) for the GoHighLevel (HighLevel) API v2 and v3, generated from the official OpenAPI specifications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
//! `affiliate-manager` data models for GoHighLevel API V3 (13 types).
//!
//! Generated from HighLevel's official OpenAPI spec for the
//! **Affiliate Manager** module. Every endpoint that uses these types, with its
//! parameters, required scopes and enum values, is documented in the
//! [`affiliate-manager` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/affiliate-manager.md).
//!
//! Enable with `features = ["affiliate-manager"]`.
// @generated by xtask/generate_models.py — do not edit by hand.
// Source: https://github.com/GoHighLevel/highlevel-api-docs
// Doc comments are HighLevel's own field descriptions, reflowed verbatim, so
// they aren't held to rustdoc's markdown conventions.
#![allow(
    missing_docs,
    clippy::doc_lazy_continuation,
    clippy::doc_overindented_list_items
)]

use serde::{Deserialize, Serialize};

/// `AffiliateListMetaResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct AffiliateListMetaResponseDto {
    /// Total affiliates matching the applied filters
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub count: Option<f64>,
}

/// `CommissionAffiliateResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CommissionAffiliateResponseDto {
    /// Affiliate id
    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Affiliate display name
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Affiliate email
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
}

/// `CommissionCampaignResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CommissionCampaignResponseDto {
    /// Campaign id
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Campaign name
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Whether the campaign is in live mode
    #[serde(rename = "liveMode", default, skip_serializing_if = "Option::is_none")]
    pub live_mode: Option<bool>,
}

/// `CommissionCustomerResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CommissionCustomerResponseDto {
    /// Customer id
    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Customer first name
    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
    pub first_name: Option<String>,
    /// Customer last name
    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
    pub last_name: Option<String>,
    /// Customer email
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    /// Customer type
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<String>,
}

/// `CommissionListItemResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CommissionListItemResponseDto {
    /// Commission id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Product id
    #[serde(rename = "productId", default, skip_serializing_if = "Option::is_none")]
    pub product_id: Option<String>,
    /// Product name
    #[serde(
        rename = "productName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub product_name: Option<String>,
    /// Quantity
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub qty: Option<f64>,
    /// Product commission amount
    #[serde(
        rename = "productCommission",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub product_commission: Option<f64>,
    /// Commission amount
    #[serde(
        rename = "commissionAmount",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub commission_amount: Option<f64>,
    /// Base amount
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub amount: Option<f64>,
    /// Unit discount
    #[serde(
        rename = "unitDiscount",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub unit_discount: Option<f64>,
    /// Campaign name
    #[serde(
        rename = "campaignName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub campaign_name: Option<String>,
    /// Commission percentage or value
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub commission: Option<f64>,
    /// Commission type
    #[serde(
        rename = "commissionType",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub commission_type: Option<String>,
    /// Transaction time
    #[serde(
        rename = "transactionAt",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub transaction_at: Option<String>,
    /// Transaction id
    #[serde(
        rename = "transactionId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub transaction_id: Option<String>,
    /// Affiliate id
    #[serde(
        rename = "affiliateId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub affiliate_id: Option<String>,
    /// Payout id
    #[serde(rename = "payoutId", default, skip_serializing_if = "Option::is_none")]
    pub payout_id: Option<String>,
    /// Commission status
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// Currency
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// Whether the item is a trial commission
    #[serde(rename = "isTrial", default, skip_serializing_if = "Option::is_none")]
    pub is_trial: Option<bool>,
    /// Customer details
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub customer: Option<CommissionCustomerResponseDto>,
    /// Created at
    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Event id
    #[serde(rename = "eventId", default, skip_serializing_if = "Option::is_none")]
    pub event_id: Option<String>,
    /// Campaign details
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub campaign: Option<CommissionCampaignResponseDto>,
    /// Affiliate details
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub affiliate: Option<CommissionAffiliateResponseDto>,
    /// Due date
    #[serde(rename = "dueAt", default, skip_serializing_if = "Option::is_none")]
    pub due_at: Option<String>,
    /// Whether the commission is in live mode
    #[serde(rename = "liveMode", default, skip_serializing_if = "Option::is_none")]
    pub live_mode: Option<bool>,
    /// Commission tier
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tier: Option<f64>,
}

/// `CommissionListMetaResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CommissionListMetaResponseDto {
    /// Total commissions matching the filters
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub count: Option<f64>,
}

/// `GetAffiliateResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GetAffiliateResponseDto {
    /// Affiliate id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Affiliate first name
    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
    pub first_name: Option<String>,
    /// Affiliate last name
    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
    pub last_name: Option<String>,
    /// Affiliate phone number
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub phone: Option<String>,
    /// Whether the affiliate is deleted
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub deleted: Option<bool>,
    /// Location id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "locationId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub location_id: Option<String>,
    /// Whether the affiliate is active
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub active: Option<bool>,
    /// Affiliate address
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub address: Option<String>,
    /// Affiliate avatar URL
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub avatar: Option<String>,
    /// Created at timestamp
    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Created by audit info
    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
    pub created_by: Option<serde_json::Value>,
    /// Facebook URL
    #[serde(
        rename = "facebookUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub facebook_url: Option<String>,
    /// Instagram URL
    #[serde(
        rename = "instagramUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub instagram_url: Option<String>,
    /// LinkedIn URL
    #[serde(
        rename = "linkedInUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub linked_in_url: Option<String>,
    /// Twitter URL
    #[serde(
        rename = "twitterUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub twitter_url: Option<String>,
    /// YouTube URL
    #[serde(
        rename = "youtubeUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub youtube_url: Option<String>,
    /// Website URL
    #[serde(
        rename = "websiteUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub website_url: Option<String>,
    /// Contact id associated with the affiliate
    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
    pub contact_id: Option<String>,
    /// Campaign ids
    #[serde(rename = "campaignIds", default, skip_serializing_if = "Vec::is_empty")]
    pub campaign_ids: Vec<String>,
    /// VAT ID
    #[serde(rename = "vatId", default, skip_serializing_if = "Option::is_none")]
    pub vat_id: Option<String>,
    /// Updated at timestamp
    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
    /// W8 form URL
    #[serde(rename = "w8Form", default, skip_serializing_if = "Option::is_none")]
    pub w8_form: Option<String>,
    /// W9 form URL
    #[serde(rename = "w9Form", default, skip_serializing_if = "Option::is_none")]
    pub w9_form: Option<String>,
    /// Last updated by audit info
    #[serde(
        rename = "lastUpdatedBy",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_updated_by: Option<serde_json::Value>,
    /// Affiliate email
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    /// Affiliate revenue
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub revenue: Option<f64>,
    /// Customer count
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub customer: Option<f64>,
    /// Lead count
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lead: Option<f64>,
    /// Dropped customer count
    #[serde(
        rename = "droppedCustomer",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub dropped_customer: Option<f64>,
    /// Click count
    #[serde(
        rename = "clickCount",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub click_count: Option<f64>,
    /// Paid amount
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub paid: Option<f64>,
    /// Currency code
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// Owned amount
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub owned: Option<f64>,
}

/// `GetCommissionListResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GetCommissionListResponseDto {
    /// Commission list
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub commissions: Vec<CommissionListItemResponseDto>,
    /// Pagination metadata
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub meta: Option<CommissionListMetaResponseDto>,
}

/// `GetPayoutListResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GetPayoutListResponseDto {
    /// Payout list
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub payouts: Vec<PayoutListItemResponseDto>,
    /// Pagination metadata
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub meta: Option<PayoutListMetaResponseDto>,
}

/// `ListAffiliatesResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ListAffiliatesResponseDto {
    /// Affiliate list
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub affiliates: Vec<OAuthAffiliateListItemResponseDto>,
    /// Pagination metadata
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub meta: Option<AffiliateListMetaResponseDto>,
}

/// `OAuthAffiliateListItemResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct OAuthAffiliateListItemResponseDto {
    /// Affiliate id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Affiliate first name
    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
    pub first_name: Option<String>,
    /// Affiliate last name
    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
    pub last_name: Option<String>,
    /// Affiliate phone number
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub phone: Option<String>,
    /// Whether the affiliate is deleted
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub deleted: Option<bool>,
    /// Location id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "locationId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub location_id: Option<String>,
    /// Whether the affiliate is active
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub active: Option<bool>,
    /// Affiliate address
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub address: Option<String>,
    /// Affiliate avatar URL
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub avatar: Option<String>,
    /// Created at timestamp
    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Created by audit info
    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
    pub created_by: Option<serde_json::Value>,
    /// Facebook URL
    #[serde(
        rename = "facebookUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub facebook_url: Option<String>,
    /// Instagram URL
    #[serde(
        rename = "instagramUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub instagram_url: Option<String>,
    /// LinkedIn URL
    #[serde(
        rename = "linkedInUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub linked_in_url: Option<String>,
    /// Twitter URL
    #[serde(
        rename = "twitterUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub twitter_url: Option<String>,
    /// YouTube URL
    #[serde(
        rename = "youtubeUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub youtube_url: Option<String>,
    /// Website URL
    #[serde(
        rename = "websiteUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub website_url: Option<String>,
    /// Contact id associated with the affiliate
    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
    pub contact_id: Option<String>,
    /// Campaign ids
    #[serde(rename = "campaignIds", default, skip_serializing_if = "Vec::is_empty")]
    pub campaign_ids: Vec<String>,
    /// VAT ID
    #[serde(rename = "vatId", default, skip_serializing_if = "Option::is_none")]
    pub vat_id: Option<String>,
    /// Updated at timestamp
    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
    /// W8 form URL
    #[serde(rename = "w8Form", default, skip_serializing_if = "Option::is_none")]
    pub w8_form: Option<String>,
    /// W9 form URL
    #[serde(rename = "w9Form", default, skip_serializing_if = "Option::is_none")]
    pub w9_form: Option<String>,
    /// Last updated by audit info
    #[serde(
        rename = "lastUpdatedBy",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_updated_by: Option<serde_json::Value>,
    /// Affiliate email
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    /// Affiliate revenue
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub revenue: Option<f64>,
    /// Customer count
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub customer: Option<f64>,
    /// Lead count
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lead: Option<f64>,
    /// Dropped customer count
    #[serde(
        rename = "droppedCustomer",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub dropped_customer: Option<f64>,
    /// Click count
    #[serde(
        rename = "clickCount",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub click_count: Option<f64>,
    /// Paid amount
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub paid: Option<f64>,
    /// Currency code
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// Owned amount
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub owned: Option<f64>,
}

/// `PayoutListItemResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct PayoutListItemResponseDto {
    /// Payout id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Location id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "locationId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub location_id: Option<String>,
    /// Affiliate id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "affiliateId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub affiliate_id: Option<String>,
    /// Campaign id
    #[serde(
        rename = "campaignId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub campaign_id: Option<String>,
    /// Payout currency
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// Payout amount
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub amount: Option<f64>,
    /// Payout status
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// Payout month
    #[serde(
        rename = "payoutMonth",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub payout_month: Option<String>,
    /// Payout due date
    #[serde(rename = "dueAt", default, skip_serializing_if = "Option::is_none")]
    pub due_at: Option<String>,
    /// Payout paid date
    #[serde(rename = "paidAt", default, skip_serializing_if = "Option::is_none")]
    pub paid_at: Option<String>,
    /// Payout metadata
    #[serde(rename = "paidMeta", default, skip_serializing_if = "Option::is_none")]
    pub paid_meta: Option<serde_json::Value>,
    /// Payout paid method
    #[serde(
        rename = "paidMethod",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub paid_method: Option<String>,
    /// Alternate id
    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
    pub alt_id: Option<String>,
    /// Whether the payout is deleted
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub deleted: Option<bool>,
    /// Whether the payout is migrated
    #[serde(
        rename = "isMigrated",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub is_migrated: Option<bool>,
    /// Created at timestamp
    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Updated at timestamp
    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
    /// Campaign name
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub campaign: Option<String>,
    /// Affiliate display name
    #[serde(
        rename = "affiliateName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub affiliate_name: Option<String>,
    /// Affiliate email
    #[serde(
        rename = "affiliateEmail",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub affiliate_email: Option<String>,
    /// Primary payout method
    #[serde(
        rename = "payoutMethod",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub payout_method: Option<String>,
    /// Affiliate details
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub affiliate: Option<OAuthAffiliateListItemResponseDto>,
}

/// `PayoutListMetaResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct PayoutListMetaResponseDto {
    /// Total payouts matching the filters
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub count: Option<f64>,
}