universal-mcp-applications 0.1.30rc1__py3-none-any.whl → 0.1.36rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of universal-mcp-applications might be problematic. Click here for more details.

Files changed (106) hide show
  1. universal_mcp/applications/ahrefs/app.py +52 -198
  2. universal_mcp/applications/airtable/app.py +23 -122
  3. universal_mcp/applications/apollo/app.py +111 -464
  4. universal_mcp/applications/asana/app.py +417 -1567
  5. universal_mcp/applications/aws_s3/app.py +33 -100
  6. universal_mcp/applications/bill/app.py +546 -1957
  7. universal_mcp/applications/box/app.py +1068 -3981
  8. universal_mcp/applications/braze/app.py +364 -1430
  9. universal_mcp/applications/browser_use/app.py +2 -8
  10. universal_mcp/applications/cal_com_v2/app.py +207 -625
  11. universal_mcp/applications/calendly/app.py +61 -200
  12. universal_mcp/applications/canva/app.py +45 -110
  13. universal_mcp/applications/clickup/app.py +207 -674
  14. universal_mcp/applications/coda/app.py +146 -426
  15. universal_mcp/applications/confluence/app.py +310 -1098
  16. universal_mcp/applications/contentful/app.py +36 -151
  17. universal_mcp/applications/crustdata/app.py +28 -107
  18. universal_mcp/applications/dialpad/app.py +283 -756
  19. universal_mcp/applications/digitalocean/app.py +1766 -5777
  20. universal_mcp/applications/domain_checker/app.py +3 -54
  21. universal_mcp/applications/e2b/app.py +14 -64
  22. universal_mcp/applications/elevenlabs/app.py +9 -47
  23. universal_mcp/applications/exa/app.py +6 -17
  24. universal_mcp/applications/falai/app.py +23 -100
  25. universal_mcp/applications/figma/app.py +53 -137
  26. universal_mcp/applications/file_system/app.py +2 -13
  27. universal_mcp/applications/firecrawl/app.py +51 -152
  28. universal_mcp/applications/fireflies/app.py +59 -281
  29. universal_mcp/applications/fpl/app.py +91 -528
  30. universal_mcp/applications/fpl/utils/fixtures.py +15 -49
  31. universal_mcp/applications/fpl/utils/helper.py +25 -89
  32. universal_mcp/applications/fpl/utils/league_utils.py +20 -64
  33. universal_mcp/applications/ghost_content/app.py +52 -161
  34. universal_mcp/applications/github/app.py +19 -56
  35. universal_mcp/applications/gong/app.py +88 -248
  36. universal_mcp/applications/google_calendar/app.py +16 -68
  37. universal_mcp/applications/google_docs/app.py +88 -188
  38. universal_mcp/applications/google_drive/app.py +140 -462
  39. universal_mcp/applications/google_gemini/app.py +12 -64
  40. universal_mcp/applications/google_mail/app.py +28 -157
  41. universal_mcp/applications/google_searchconsole/app.py +15 -48
  42. universal_mcp/applications/google_sheet/app.py +101 -578
  43. universal_mcp/applications/google_sheet/helper.py +10 -37
  44. universal_mcp/applications/hashnode/app.py +57 -269
  45. universal_mcp/applications/heygen/app.py +44 -122
  46. universal_mcp/applications/http_tools/app.py +10 -32
  47. universal_mcp/applications/hubspot/api_segments/crm_api.py +460 -1573
  48. universal_mcp/applications/hubspot/api_segments/marketing_api.py +74 -262
  49. universal_mcp/applications/hubspot/app.py +23 -87
  50. universal_mcp/applications/jira/app.py +2071 -7986
  51. universal_mcp/applications/klaviyo/app.py +494 -1376
  52. universal_mcp/applications/linkedin/README.md +23 -4
  53. universal_mcp/applications/linkedin/app.py +392 -212
  54. universal_mcp/applications/mailchimp/app.py +450 -1605
  55. universal_mcp/applications/markitdown/app.py +8 -20
  56. universal_mcp/applications/miro/app.py +217 -699
  57. universal_mcp/applications/ms_teams/app.py +64 -186
  58. universal_mcp/applications/neon/app.py +86 -192
  59. universal_mcp/applications/notion/app.py +21 -36
  60. universal_mcp/applications/onedrive/app.py +14 -36
  61. universal_mcp/applications/openai/app.py +42 -165
  62. universal_mcp/applications/outlook/app.py +16 -76
  63. universal_mcp/applications/perplexity/app.py +4 -19
  64. universal_mcp/applications/pipedrive/app.py +832 -3142
  65. universal_mcp/applications/posthog/app.py +163 -432
  66. universal_mcp/applications/reddit/app.py +40 -139
  67. universal_mcp/applications/resend/app.py +41 -107
  68. universal_mcp/applications/retell/app.py +14 -41
  69. universal_mcp/applications/rocketlane/app.py +221 -934
  70. universal_mcp/applications/scraper/README.md +7 -4
  71. universal_mcp/applications/scraper/app.py +280 -93
  72. universal_mcp/applications/semanticscholar/app.py +22 -64
  73. universal_mcp/applications/semrush/app.py +43 -77
  74. universal_mcp/applications/sendgrid/app.py +512 -1262
  75. universal_mcp/applications/sentry/app.py +271 -906
  76. universal_mcp/applications/serpapi/app.py +40 -143
  77. universal_mcp/applications/sharepoint/app.py +15 -37
  78. universal_mcp/applications/shopify/app.py +1551 -4287
  79. universal_mcp/applications/shortcut/app.py +155 -417
  80. universal_mcp/applications/slack/app.py +50 -101
  81. universal_mcp/applications/spotify/app.py +126 -325
  82. universal_mcp/applications/supabase/app.py +104 -213
  83. universal_mcp/applications/tavily/app.py +1 -1
  84. universal_mcp/applications/trello/app.py +693 -2656
  85. universal_mcp/applications/twilio/app.py +14 -50
  86. universal_mcp/applications/twitter/api_segments/compliance_api.py +4 -14
  87. universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +6 -18
  88. universal_mcp/applications/twitter/api_segments/likes_api.py +1 -3
  89. universal_mcp/applications/twitter/api_segments/lists_api.py +5 -15
  90. universal_mcp/applications/twitter/api_segments/trends_api.py +1 -3
  91. universal_mcp/applications/twitter/api_segments/tweets_api.py +9 -31
  92. universal_mcp/applications/twitter/api_segments/usage_api.py +1 -5
  93. universal_mcp/applications/twitter/api_segments/users_api.py +14 -42
  94. universal_mcp/applications/whatsapp/app.py +35 -186
  95. universal_mcp/applications/whatsapp/audio.py +2 -6
  96. universal_mcp/applications/whatsapp/whatsapp.py +17 -51
  97. universal_mcp/applications/whatsapp_business/app.py +70 -283
  98. universal_mcp/applications/wrike/app.py +45 -118
  99. universal_mcp/applications/yahoo_finance/app.py +19 -65
  100. universal_mcp/applications/youtube/app.py +75 -261
  101. universal_mcp/applications/zenquotes/app.py +2 -2
  102. {universal_mcp_applications-0.1.30rc1.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/METADATA +2 -2
  103. {universal_mcp_applications-0.1.30rc1.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/RECORD +105 -106
  104. universal_mcp/applications/scraper/scraper_testers.py +0 -17
  105. {universal_mcp_applications-0.1.30rc1.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/WHEEL +0 -0
  106. {universal_mcp_applications-0.1.30rc1.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/licenses/LICENSE +0 -0
@@ -1,5 +1,4 @@
1
1
  from typing import Any
2
-
3
2
  from universal_mcp.applications.application import APIApplication
4
3
  from universal_mcp.integrations import Integration
5
4
 
@@ -9,7 +8,7 @@ class MailchimpApp(APIApplication):
9
8
  super().__init__(name="mailchimp", integration=integration, **kwargs)
10
9
  self.base_url = "https://us6.api.mailchimp.com/3.0"
11
10
 
12
- def root_list_resources(self, fields=None, exclude_fields=None) -> dict[str, Any]:
11
+ async def root_list_resources(self, fields=None, exclude_fields=None) -> dict[str, Any]:
13
12
  """
14
13
  Lists available resources by making a GET request to the base URL.
15
14
 
@@ -27,18 +26,12 @@ class MailchimpApp(APIApplication):
27
26
  list, resources, api, get, root
28
27
  """
29
28
  url = f"{self.base_url}/"
30
- query_params = {
31
- k: v
32
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
33
- if v is not None
34
- }
29
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
35
30
  response = self._get(url, params=query_params)
36
31
  response.raise_for_status()
37
32
  return response.json()
38
33
 
39
- def activity_feed_get_latest_chimp_chatter(
40
- self, count=None, offset=None
41
- ) -> dict[str, Any]:
34
+ async def activity_feed_get_latest_chimp_chatter(self, count=None, offset=None) -> dict[str, Any]:
42
35
  """
43
36
  Fetches the latest Chimp Chatter from the activity feed.
44
37
 
@@ -56,16 +49,12 @@ class MailchimpApp(APIApplication):
56
49
  fetch, scrape, async-optional, feed-management
57
50
  """
58
51
  url = f"{self.base_url}/activity-feed/chimp-chatter"
59
- query_params = {
60
- k: v for k, v in [("count", count), ("offset", offset)] if v is not None
61
- }
52
+ query_params = {k: v for k, v in [("count", count), ("offset", offset)] if v is not None}
62
53
  response = self._get(url, params=query_params)
63
54
  response.raise_for_status()
64
55
  return response.json()
65
56
 
66
- def account_exports_list_for_given_account(
67
- self, fields=None, exclude_fields=None, count=None, offset=None
68
- ) -> dict[str, Any]:
57
+ async def account_exports_list_for_given_account(self, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
69
58
  """
70
59
  Retrieves a list of account export jobs for the current account, with optional filtering and pagination.
71
60
 
@@ -86,22 +75,13 @@ class MailchimpApp(APIApplication):
86
75
  """
87
76
  url = f"{self.base_url}/account-exports"
88
77
  query_params = {
89
- k: v
90
- for k, v in [
91
- ("fields", fields),
92
- ("exclude_fields", exclude_fields),
93
- ("count", count),
94
- ("offset", offset),
95
- ]
96
- if v is not None
78
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
97
79
  }
98
80
  response = self._get(url, params=query_params)
99
81
  response.raise_for_status()
100
82
  return response.json()
101
83
 
102
- def account_exports_create_new_export(
103
- self, include_stages, since_timestamp=None
104
- ) -> dict[str, Any]:
84
+ async def account_exports_create_new_export(self, include_stages, since_timestamp=None) -> dict[str, Any]:
105
85
  """
106
86
  Creates a new account export job with configurable stages and an optional starting timestamp.
107
87
 
@@ -121,10 +101,7 @@ class MailchimpApp(APIApplication):
121
101
  """
122
102
  if include_stages is None:
123
103
  raise ValueError("Missing required parameter 'include_stages'")
124
- request_body = {
125
- "include_stages": include_stages,
126
- "since_timestamp": since_timestamp,
127
- }
104
+ request_body = {"include_stages": include_stages, "since_timestamp": since_timestamp}
128
105
  request_body = {k: v for k, v in request_body.items() if v is not None}
129
106
  url = f"{self.base_url}/account-exports"
130
107
  query_params = {}
@@ -132,9 +109,7 @@ class MailchimpApp(APIApplication):
132
109
  response.raise_for_status()
133
110
  return response.json()
134
111
 
135
- def account_export_info(
136
- self, export_id, fields=None, exclude_fields=None
137
- ) -> dict[str, Any]:
112
+ async def account_export_info(self, export_id, fields=None, exclude_fields=None) -> dict[str, Any]:
138
113
  """
139
114
  Retrieves detailed information about a specific account export.
140
115
 
@@ -156,16 +131,12 @@ class MailchimpApp(APIApplication):
156
131
  if export_id is None:
157
132
  raise ValueError("Missing required parameter 'export_id'")
158
133
  url = f"{self.base_url}/account-exports/{export_id}"
159
- query_params = {
160
- k: v
161
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
162
- if v is not None
163
- }
134
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
164
135
  response = self._get(url, params=query_params)
165
136
  response.raise_for_status()
166
137
  return response.json()
167
138
 
168
- def authorized_apps_list_connected_applications(
139
+ async def authorized_apps_list_connected_applications(
169
140
  self, fields=None, exclude_fields=None, count=None, offset=None
170
141
  ) -> dict[str, Any]:
171
142
  """
@@ -188,22 +159,13 @@ class MailchimpApp(APIApplication):
188
159
  """
189
160
  url = f"{self.base_url}/authorized-apps"
190
161
  query_params = {
191
- k: v
192
- for k, v in [
193
- ("fields", fields),
194
- ("exclude_fields", exclude_fields),
195
- ("count", count),
196
- ("offset", offset),
197
- ]
198
- if v is not None
162
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
199
163
  }
200
164
  response = self._get(url, params=query_params)
201
165
  response.raise_for_status()
202
166
  return response.json()
203
167
 
204
- def authorized_apps_get_info(
205
- self, app_id, fields=None, exclude_fields=None
206
- ) -> dict[str, Any]:
168
+ async def authorized_apps_get_info(self, app_id, fields=None, exclude_fields=None) -> dict[str, Any]:
207
169
  """
208
170
  Retrieve detailed information about an authorized application by its ID.
209
171
 
@@ -225,16 +187,12 @@ class MailchimpApp(APIApplication):
225
187
  if app_id is None:
226
188
  raise ValueError("Missing required parameter 'app_id'")
227
189
  url = f"{self.base_url}/authorized-apps/{app_id}"
228
- query_params = {
229
- k: v
230
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
231
- if v is not None
232
- }
190
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
233
191
  response = self._get(url, params=query_params)
234
192
  response.raise_for_status()
235
193
  return response.json()
236
194
 
237
- def automations_list_summary(
195
+ async def automations_list_summary(
238
196
  self,
239
197
  count=None,
240
198
  offset=None,
@@ -289,9 +247,7 @@ class MailchimpApp(APIApplication):
289
247
  response.raise_for_status()
290
248
  return response.json()
291
249
 
292
- def automations_create_classic(
293
- self, recipients, trigger_settings, settings=None
294
- ) -> dict[str, Any]:
250
+ async def automations_create_classic(self, recipients, trigger_settings, settings=None) -> dict[str, Any]:
295
251
  """
296
252
  Creates a classic automation by sending a POST request with the specified recipients and trigger settings.
297
253
 
@@ -314,11 +270,7 @@ class MailchimpApp(APIApplication):
314
270
  raise ValueError("Missing required parameter 'recipients'")
315
271
  if trigger_settings is None:
316
272
  raise ValueError("Missing required parameter 'trigger_settings'")
317
- request_body = {
318
- "recipients": recipients,
319
- "settings": settings,
320
- "trigger_settings": trigger_settings,
321
- }
273
+ request_body = {"recipients": recipients, "settings": settings, "trigger_settings": trigger_settings}
322
274
  request_body = {k: v for k, v in request_body.items() if v is not None}
323
275
  url = f"{self.base_url}/automations"
324
276
  query_params = {}
@@ -326,9 +278,7 @@ class MailchimpApp(APIApplication):
326
278
  response.raise_for_status()
327
279
  return response.json()
328
280
 
329
- def automations_get_classic_workflow_info(
330
- self, workflow_id, fields=None, exclude_fields=None
331
- ) -> dict[str, Any]:
281
+ async def automations_get_classic_workflow_info(self, workflow_id, fields=None, exclude_fields=None) -> dict[str, Any]:
332
282
  """
333
283
  Retrieves information about a classic automation workflow by its unique workflow ID.
334
284
 
@@ -350,16 +300,12 @@ class MailchimpApp(APIApplication):
350
300
  if workflow_id is None:
351
301
  raise ValueError("Missing required parameter 'workflow_id'")
352
302
  url = f"{self.base_url}/automations/{workflow_id}"
353
- query_params = {
354
- k: v
355
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
356
- if v is not None
357
- }
303
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
358
304
  response = self._get(url, params=query_params)
359
305
  response.raise_for_status()
360
306
  return response.json()
361
307
 
362
- def automations_pause_workflow_emails(self, workflow_id) -> Any:
308
+ async def automations_pause_workflow_emails(self, workflow_id) -> Any:
363
309
  """
364
310
  Pauses all workflow emails for a specified automation workflow.
365
311
 
@@ -384,7 +330,7 @@ class MailchimpApp(APIApplication):
384
330
  response.raise_for_status()
385
331
  return response.json()
386
332
 
387
- def automations_start_all_emails(self, workflow_id) -> Any:
333
+ async def automations_start_all_emails(self, workflow_id) -> Any:
388
334
  """
389
335
  Starts all email actions within the specified automation workflow.
390
336
 
@@ -409,7 +355,7 @@ class MailchimpApp(APIApplication):
409
355
  response.raise_for_status()
410
356
  return response.json()
411
357
 
412
- def automations_archive_action(self, workflow_id) -> Any:
358
+ async def automations_archive_action(self, workflow_id) -> Any:
413
359
  """
414
360
  Archives an automation workflow by sending a POST request to the specified API endpoint.
415
361
 
@@ -434,7 +380,7 @@ class MailchimpApp(APIApplication):
434
380
  response.raise_for_status()
435
381
  return response.json()
436
382
 
437
- def automations_get_classic_workflow_emails(self, workflow_id) -> dict[str, Any]:
383
+ async def automations_get_classic_workflow_emails(self, workflow_id) -> dict[str, Any]:
438
384
  """
439
385
  Retrieves the list of emails associated with a classic workflow for a given workflow ID.
440
386
 
@@ -459,9 +405,7 @@ class MailchimpApp(APIApplication):
459
405
  response.raise_for_status()
460
406
  return response.json()
461
407
 
462
- def automations_get_email_info(
463
- self, workflow_id, workflow_email_id
464
- ) -> dict[str, Any]:
408
+ async def automations_get_email_info(self, workflow_id, workflow_email_id) -> dict[str, Any]:
465
409
  """
466
410
  Retrieves information about a specific email within a workflow automation, given the workflow and email identifiers.
467
411
 
@@ -489,7 +433,7 @@ class MailchimpApp(APIApplication):
489
433
  response.raise_for_status()
490
434
  return response.json()
491
435
 
492
- def automations_delete_workflow_email(self, workflow_id, workflow_email_id) -> Any:
436
+ async def automations_delete_workflow_email(self, workflow_id, workflow_email_id) -> Any:
493
437
  """
494
438
  Deletes a specific email from a workflow in the automations system.
495
439
 
@@ -517,9 +461,7 @@ class MailchimpApp(APIApplication):
517
461
  response.raise_for_status()
518
462
  return response.json()
519
463
 
520
- def automations_update_workflow_email(
521
- self, workflow_id, workflow_email_id, settings=None, delay=None
522
- ) -> dict[str, Any]:
464
+ async def automations_update_workflow_email(self, workflow_id, workflow_email_id, settings=None, delay=None) -> dict[str, Any]:
523
465
  """
524
466
  Updates the settings and delay of a specific workflow email in an automation workflow.
525
467
 
@@ -543,10 +485,7 @@ class MailchimpApp(APIApplication):
543
485
  raise ValueError("Missing required parameter 'workflow_id'")
544
486
  if workflow_email_id is None:
545
487
  raise ValueError("Missing required parameter 'workflow_email_id'")
546
- request_body = {
547
- "settings": settings,
548
- "delay": delay,
549
- }
488
+ request_body = {"settings": settings, "delay": delay}
550
489
  request_body = {k: v for k, v in request_body.items() if v is not None}
551
490
  url = f"{self.base_url}/automations/{workflow_id}/emails/{workflow_email_id}"
552
491
  query_params = {}
@@ -554,9 +493,7 @@ class MailchimpApp(APIApplication):
554
493
  response.raise_for_status()
555
494
  return response.json()
556
495
 
557
- def automations_list_queue_emails(
558
- self, workflow_id, workflow_email_id
559
- ) -> dict[str, Any]:
496
+ async def automations_list_queue_emails(self, workflow_id, workflow_email_id) -> dict[str, Any]:
560
497
  """
561
498
  Retrieves the list of queued emails for a specific workflow email in an automation.
562
499
 
@@ -584,9 +521,7 @@ class MailchimpApp(APIApplication):
584
521
  response.raise_for_status()
585
522
  return response.json()
586
523
 
587
- def automations_add_subscriber_to_workflow_email(
588
- self, workflow_id, workflow_email_id, request_body=None
589
- ) -> dict[str, Any]:
524
+ async def automations_add_subscriber_to_workflow_email(self, workflow_id, workflow_email_id, request_body=None) -> dict[str, Any]:
590
525
  """
591
526
  Adds a subscriber to a specific workflow email queue in the automations system by sending a POST request.
592
527
 
@@ -615,9 +550,7 @@ class MailchimpApp(APIApplication):
615
550
  response.raise_for_status()
616
551
  return response.json()
617
552
 
618
- def automations_classic_automation_subscriber_info(
619
- self, workflow_id, workflow_email_id, subscriber_hash
620
- ) -> dict[str, Any]:
553
+ async def automations_classic_automation_subscriber_info(self, workflow_id, workflow_email_id, subscriber_hash) -> dict[str, Any]:
621
554
  """
622
555
  Retrieves detailed information about a specific subscriber in a classic automation email workflow.
623
556
 
@@ -648,7 +581,7 @@ class MailchimpApp(APIApplication):
648
581
  response.raise_for_status()
649
582
  return response.json()
650
583
 
651
- def automations_pause_automated_email(self, workflow_id, workflow_email_id) -> Any:
584
+ async def automations_pause_automated_email(self, workflow_id, workflow_email_id) -> Any:
652
585
  """
653
586
  Pauses an automated email within a specified workflow by sending a POST request to the automation API.
654
587
 
@@ -676,7 +609,7 @@ class MailchimpApp(APIApplication):
676
609
  response.raise_for_status()
677
610
  return response.json()
678
611
 
679
- def automations_start_automated_email(self, workflow_id, workflow_email_id) -> Any:
612
+ async def automations_start_automated_email(self, workflow_id, workflow_email_id) -> Any:
680
613
  """
681
614
  Starts an automated email within a specified workflow using the provided workflow and email identifiers.
682
615
 
@@ -704,7 +637,7 @@ class MailchimpApp(APIApplication):
704
637
  response.raise_for_status()
705
638
  return response.json()
706
639
 
707
- def automations_get_removed_subscribers(self, workflow_id) -> dict[str, Any]:
640
+ async def automations_get_removed_subscribers(self, workflow_id) -> dict[str, Any]:
708
641
  """
709
642
  Retrieves the list of subscribers who have been removed from a specified automation workflow.
710
643
 
@@ -729,9 +662,7 @@ class MailchimpApp(APIApplication):
729
662
  response.raise_for_status()
730
663
  return response.json()
731
664
 
732
- def automations_remove_subscriber_from_workflow(
733
- self, workflow_id, request_body=None
734
- ) -> dict[str, Any]:
665
+ async def automations_remove_subscriber_from_workflow(self, workflow_id, request_body=None) -> dict[str, Any]:
735
666
  """
736
667
  Removes a subscriber from a specified automation workflow.
737
668
 
@@ -757,9 +688,7 @@ class MailchimpApp(APIApplication):
757
688
  response.raise_for_status()
758
689
  return response.json()
759
690
 
760
- def automations_get_removed_subscriber_info(
761
- self, workflow_id, subscriber_hash
762
- ) -> dict[str, Any]:
691
+ async def automations_get_removed_subscriber_info(self, workflow_id, subscriber_hash) -> dict[str, Any]:
763
692
  """
764
693
  Retrieves information about a subscriber who was removed from a specific automation workflow.
765
694
 
@@ -787,9 +716,7 @@ class MailchimpApp(APIApplication):
787
716
  response.raise_for_status()
788
717
  return response.json()
789
718
 
790
- def batches_list_requests_summary(
791
- self, fields=None, exclude_fields=None, count=None, offset=None
792
- ) -> dict[str, Any]:
719
+ async def batches_list_requests_summary(self, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
793
720
  """
794
721
  Retrieves a summary of existing batch requests with optional field selection, exclusion, pagination, and filtering.
795
722
 
@@ -810,20 +737,13 @@ class MailchimpApp(APIApplication):
810
737
  """
811
738
  url = f"{self.base_url}/batches"
812
739
  query_params = {
813
- k: v
814
- for k, v in [
815
- ("fields", fields),
816
- ("exclude_fields", exclude_fields),
817
- ("count", count),
818
- ("offset", offset),
819
- ]
820
- if v is not None
740
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
821
741
  }
822
742
  response = self._get(url, params=query_params)
823
743
  response.raise_for_status()
824
744
  return response.json()
825
745
 
826
- def batches_start_operation_process(self, operations) -> dict[str, Any]:
746
+ async def batches_start_operation_process(self, operations) -> dict[str, Any]:
827
747
  """
828
748
  Starts a batch operation by sending the given operations to the remote service and returns the operation response as a dictionary.
829
749
 
@@ -842,9 +762,7 @@ class MailchimpApp(APIApplication):
842
762
  """
843
763
  if operations is None:
844
764
  raise ValueError("Missing required parameter 'operations'")
845
- request_body = {
846
- "operations": operations,
847
- }
765
+ request_body = {"operations": operations}
848
766
  request_body = {k: v for k, v in request_body.items() if v is not None}
849
767
  url = f"{self.base_url}/batches"
850
768
  query_params = {}
@@ -852,9 +770,7 @@ class MailchimpApp(APIApplication):
852
770
  response.raise_for_status()
853
771
  return response.json()
854
772
 
855
- def batches_get_operation_status(
856
- self, batch_id, fields=None, exclude_fields=None
857
- ) -> dict[str, Any]:
773
+ async def batches_get_operation_status(self, batch_id, fields=None, exclude_fields=None) -> dict[str, Any]:
858
774
  """
859
775
  Retrieves the status and details of a batch operation using its batch ID.
860
776
 
@@ -876,16 +792,12 @@ class MailchimpApp(APIApplication):
876
792
  if batch_id is None:
877
793
  raise ValueError("Missing required parameter 'batch_id'")
878
794
  url = f"{self.base_url}/batches/{batch_id}"
879
- query_params = {
880
- k: v
881
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
882
- if v is not None
883
- }
795
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
884
796
  response = self._get(url, params=query_params)
885
797
  response.raise_for_status()
886
798
  return response.json()
887
799
 
888
- def batches_stop_request(self, batch_id) -> Any:
800
+ async def batches_stop_request(self, batch_id) -> Any:
889
801
  """
890
802
  Stops a running batch job by sending a DELETE request to the batch endpoint.
891
803
 
@@ -910,9 +822,7 @@ class MailchimpApp(APIApplication):
910
822
  response.raise_for_status()
911
823
  return response.json()
912
824
 
913
- def batch_webhooks_list_webhooks(
914
- self, fields=None, exclude_fields=None, count=None, offset=None
915
- ) -> dict[str, Any]:
825
+ async def batch_webhooks_list_webhooks(self, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
916
826
  """
917
827
  Retrieves a list of batch webhooks with optional filtering and pagination.
918
828
 
@@ -933,20 +843,13 @@ class MailchimpApp(APIApplication):
933
843
  """
934
844
  url = f"{self.base_url}/batch-webhooks"
935
845
  query_params = {
936
- k: v
937
- for k, v in [
938
- ("fields", fields),
939
- ("exclude_fields", exclude_fields),
940
- ("count", count),
941
- ("offset", offset),
942
- ]
943
- if v is not None
846
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
944
847
  }
945
848
  response = self._get(url, params=query_params)
946
849
  response.raise_for_status()
947
850
  return response.json()
948
851
 
949
- def batch_webhooks_add_webhook(self, url, enabled=None) -> dict[str, Any]:
852
+ async def batch_webhooks_add_webhook(self, url, enabled=None) -> dict[str, Any]:
950
853
  """
951
854
  Adds a new webhook to the batch webhooks endpoint.
952
855
 
@@ -966,10 +869,7 @@ class MailchimpApp(APIApplication):
966
869
  """
967
870
  if url is None:
968
871
  raise ValueError("Missing required parameter 'url'")
969
- request_body = {
970
- "url": url,
971
- "enabled": enabled,
972
- }
872
+ request_body = {"url": url, "enabled": enabled}
973
873
  request_body = {k: v for k, v in request_body.items() if v is not None}
974
874
  url = f"{self.base_url}/batch-webhooks"
975
875
  query_params = {}
@@ -977,9 +877,7 @@ class MailchimpApp(APIApplication):
977
877
  response.raise_for_status()
978
878
  return response.json()
979
879
 
980
- def batch_webhooks_get_info(
981
- self, batch_webhook_id, fields=None, exclude_fields=None
982
- ) -> dict[str, Any]:
880
+ async def batch_webhooks_get_info(self, batch_webhook_id, fields=None, exclude_fields=None) -> dict[str, Any]:
983
881
  """
984
882
  Retrieves information about a specific batch webhook.
985
883
 
@@ -1001,18 +899,12 @@ class MailchimpApp(APIApplication):
1001
899
  if batch_webhook_id is None:
1002
900
  raise ValueError("Missing required parameter 'batch_webhook_id'")
1003
901
  url = f"{self.base_url}/batch-webhooks/{batch_webhook_id}"
1004
- query_params = {
1005
- k: v
1006
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
1007
- if v is not None
1008
- }
902
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
1009
903
  response = self._get(url, params=query_params)
1010
904
  response.raise_for_status()
1011
905
  return response.json()
1012
906
 
1013
- def batch_webhooks_update_webhook(
1014
- self, batch_webhook_id, url=None, enabled=None
1015
- ) -> dict[str, Any]:
907
+ async def batch_webhooks_update_webhook(self, batch_webhook_id, url=None, enabled=None) -> dict[str, Any]:
1016
908
  """
1017
909
  Updates the configuration of a batch webhook by ID, modifying its URL and/or enabled status.
1018
910
 
@@ -1033,10 +925,7 @@ class MailchimpApp(APIApplication):
1033
925
  """
1034
926
  if batch_webhook_id is None:
1035
927
  raise ValueError("Missing required parameter 'batch_webhook_id'")
1036
- request_body = {
1037
- "url": url,
1038
- "enabled": enabled,
1039
- }
928
+ request_body = {"url": url, "enabled": enabled}
1040
929
  request_body = {k: v for k, v in request_body.items() if v is not None}
1041
930
  url = f"{self.base_url}/batch-webhooks/{batch_webhook_id}"
1042
931
  query_params = {}
@@ -1044,7 +933,7 @@ class MailchimpApp(APIApplication):
1044
933
  response.raise_for_status()
1045
934
  return response.json()
1046
935
 
1047
- def batch_webhooks_remove_webhook(self, batch_webhook_id) -> Any:
936
+ async def batch_webhooks_remove_webhook(self, batch_webhook_id) -> Any:
1048
937
  """
1049
938
  Removes a webhook associated with a given batch webhook ID.
1050
939
 
@@ -1069,9 +958,7 @@ class MailchimpApp(APIApplication):
1069
958
  response.raise_for_status()
1070
959
  return response.json()
1071
960
 
1072
- def template_folders_list_folders(
1073
- self, fields=None, exclude_fields=None, count=None, offset=None
1074
- ) -> dict[str, Any]:
961
+ async def template_folders_list_folders(self, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
1075
962
  """
1076
963
  Retrieves a list of template folders with optional filtering and pagination parameters.
1077
964
 
@@ -1092,20 +979,13 @@ class MailchimpApp(APIApplication):
1092
979
  """
1093
980
  url = f"{self.base_url}/template-folders"
1094
981
  query_params = {
1095
- k: v
1096
- for k, v in [
1097
- ("fields", fields),
1098
- ("exclude_fields", exclude_fields),
1099
- ("count", count),
1100
- ("offset", offset),
1101
- ]
1102
- if v is not None
982
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
1103
983
  }
1104
984
  response = self._get(url, params=query_params)
1105
985
  response.raise_for_status()
1106
986
  return response.json()
1107
987
 
1108
- def template_folders_add_new_folder(self, request_body=None) -> dict[str, Any]:
988
+ async def template_folders_add_new_folder(self, request_body=None) -> dict[str, Any]:
1109
989
  """
1110
990
  Creates a new template folder using the provided request body and returns the server's response.
1111
991
 
@@ -1127,9 +1007,7 @@ class MailchimpApp(APIApplication):
1127
1007
  response.raise_for_status()
1128
1008
  return response.json()
1129
1009
 
1130
- def template_folders_get_info(
1131
- self, folder_id, fields=None, exclude_fields=None
1132
- ) -> dict[str, Any]:
1010
+ async def template_folders_get_info(self, folder_id, fields=None, exclude_fields=None) -> dict[str, Any]:
1133
1011
  """
1134
1012
  Retrieves information about a specific template folder.
1135
1013
 
@@ -1151,18 +1029,12 @@ class MailchimpApp(APIApplication):
1151
1029
  if folder_id is None:
1152
1030
  raise ValueError("Missing required parameter 'folder_id'")
1153
1031
  url = f"{self.base_url}/template-folders/{folder_id}"
1154
- query_params = {
1155
- k: v
1156
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
1157
- if v is not None
1158
- }
1032
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
1159
1033
  response = self._get(url, params=query_params)
1160
1034
  response.raise_for_status()
1161
1035
  return response.json()
1162
1036
 
1163
- def template_folders_update_specific_folder(
1164
- self, folder_id, request_body=None
1165
- ) -> dict[str, Any]:
1037
+ async def template_folders_update_specific_folder(self, folder_id, request_body=None) -> dict[str, Any]:
1166
1038
  """
1167
1039
  Updates a specific template folder with new data using a PATCH request.
1168
1040
 
@@ -1188,7 +1060,7 @@ class MailchimpApp(APIApplication):
1188
1060
  response.raise_for_status()
1189
1061
  return response.json()
1190
1062
 
1191
- def template_folders_delete_specific_folder(self, folder_id) -> Any:
1063
+ async def template_folders_delete_specific_folder(self, folder_id) -> Any:
1192
1064
  """
1193
1065
  Deletes a specific template folder identified by its folder_id.
1194
1066
 
@@ -1213,9 +1085,7 @@ class MailchimpApp(APIApplication):
1213
1085
  response.raise_for_status()
1214
1086
  return response.json()
1215
1087
 
1216
- def campaign_folders_list_campaign_folders(
1217
- self, fields=None, exclude_fields=None, count=None, offset=None
1218
- ) -> dict[str, Any]:
1088
+ async def campaign_folders_list_campaign_folders(self, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
1219
1089
  """
1220
1090
  Retrieves a list of campaign folders with optional filtering and pagination.
1221
1091
 
@@ -1236,20 +1106,13 @@ class MailchimpApp(APIApplication):
1236
1106
  """
1237
1107
  url = f"{self.base_url}/campaign-folders"
1238
1108
  query_params = {
1239
- k: v
1240
- for k, v in [
1241
- ("fields", fields),
1242
- ("exclude_fields", exclude_fields),
1243
- ("count", count),
1244
- ("offset", offset),
1245
- ]
1246
- if v is not None
1109
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
1247
1110
  }
1248
1111
  response = self._get(url, params=query_params)
1249
1112
  response.raise_for_status()
1250
1113
  return response.json()
1251
1114
 
1252
- def campaign_folders_add_new_folder(self, request_body=None) -> dict[str, Any]:
1115
+ async def campaign_folders_add_new_folder(self, request_body=None) -> dict[str, Any]:
1253
1116
  """
1254
1117
  Creates a new campaign folder by sending a POST request with the provided data.
1255
1118
 
@@ -1271,9 +1134,7 @@ class MailchimpApp(APIApplication):
1271
1134
  response.raise_for_status()
1272
1135
  return response.json()
1273
1136
 
1274
- def campaign_folders_get_folder_info(
1275
- self, folder_id, fields=None, exclude_fields=None
1276
- ) -> dict[str, Any]:
1137
+ async def campaign_folders_get_folder_info(self, folder_id, fields=None, exclude_fields=None) -> dict[str, Any]:
1277
1138
  """
1278
1139
  Retrieves information about a specific campaign folder by its unique identifier.
1279
1140
 
@@ -1295,18 +1156,12 @@ class MailchimpApp(APIApplication):
1295
1156
  if folder_id is None:
1296
1157
  raise ValueError("Missing required parameter 'folder_id'")
1297
1158
  url = f"{self.base_url}/campaign-folders/{folder_id}"
1298
- query_params = {
1299
- k: v
1300
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
1301
- if v is not None
1302
- }
1159
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
1303
1160
  response = self._get(url, params=query_params)
1304
1161
  response.raise_for_status()
1305
1162
  return response.json()
1306
1163
 
1307
- def campaign_folders_update_specific_folder(
1308
- self, folder_id, request_body=None
1309
- ) -> dict[str, Any]:
1164
+ async def campaign_folders_update_specific_folder(self, folder_id, request_body=None) -> dict[str, Any]:
1310
1165
  """
1311
1166
  Updates a specific campaign folder by ID.
1312
1167
 
@@ -1332,7 +1187,7 @@ class MailchimpApp(APIApplication):
1332
1187
  response.raise_for_status()
1333
1188
  return response.json()
1334
1189
 
1335
- def campaign_folders_delete_folder(self, folder_id) -> Any:
1190
+ async def campaign_folders_delete_folder(self, folder_id) -> Any:
1336
1191
  """
1337
1192
  Deletes a campaign folder by its unique identifier.
1338
1193
 
@@ -1357,7 +1212,7 @@ class MailchimpApp(APIApplication):
1357
1212
  response.raise_for_status()
1358
1213
  return response.json()
1359
1214
 
1360
- def campaigns_get_all(
1215
+ async def campaigns_get_all(
1361
1216
  self,
1362
1217
  fields=None,
1363
1218
  exclude_fields=None,
@@ -1425,10 +1280,7 @@ class MailchimpApp(APIApplication):
1425
1280
  ("member_id", member_id),
1426
1281
  ("sort_field", sort_field),
1427
1282
  ("sort_dir", sort_dir),
1428
- (
1429
- "include_resend_shortcut_eligibility",
1430
- include_resend_shortcut_eligibility,
1431
- ),
1283
+ ("include_resend_shortcut_eligibility", include_resend_shortcut_eligibility),
1432
1284
  ]
1433
1285
  if v is not None
1434
1286
  }
@@ -1436,16 +1288,8 @@ class MailchimpApp(APIApplication):
1436
1288
  response.raise_for_status()
1437
1289
  return response.json()
1438
1290
 
1439
- def campaigns_create_new_mailchimp_campaign(
1440
- self,
1441
- type,
1442
- recipients=None,
1443
- settings=None,
1444
- variate_settings=None,
1445
- tracking=None,
1446
- rss_opts=None,
1447
- social_card=None,
1448
- content_type=None,
1291
+ async def campaigns_create_new_mailchimp_campaign(
1292
+ self, type, recipients=None, settings=None, variate_settings=None, tracking=None, rss_opts=None, social_card=None, content_type=None
1449
1293
  ) -> dict[str, Any]:
1450
1294
  """
1451
1295
  Creates a new Mailchimp campaign with the specified type and optional configuration settings.
@@ -1489,12 +1333,8 @@ class MailchimpApp(APIApplication):
1489
1333
  response.raise_for_status()
1490
1334
  return response.json()
1491
1335
 
1492
- def campaigns_get_info(
1493
- self,
1494
- campaign_id,
1495
- fields=None,
1496
- exclude_fields=None,
1497
- include_resend_shortcut_eligibility=None,
1336
+ async def campaigns_get_info(
1337
+ self, campaign_id, fields=None, exclude_fields=None, include_resend_shortcut_eligibility=None
1498
1338
  ) -> dict[str, Any]:
1499
1339
  """
1500
1340
  Retrieves detailed information about a specific campaign, supporting optional field filtering and resend shortcut eligibility inclusion.
@@ -1523,10 +1363,7 @@ class MailchimpApp(APIApplication):
1523
1363
  for k, v in [
1524
1364
  ("fields", fields),
1525
1365
  ("exclude_fields", exclude_fields),
1526
- (
1527
- "include_resend_shortcut_eligibility",
1528
- include_resend_shortcut_eligibility,
1529
- ),
1366
+ ("include_resend_shortcut_eligibility", include_resend_shortcut_eligibility),
1530
1367
  ]
1531
1368
  if v is not None
1532
1369
  }
@@ -1534,15 +1371,8 @@ class MailchimpApp(APIApplication):
1534
1371
  response.raise_for_status()
1535
1372
  return response.json()
1536
1373
 
1537
- def campaigns_update_settings(
1538
- self,
1539
- campaign_id,
1540
- settings,
1541
- recipients=None,
1542
- variate_settings=None,
1543
- tracking=None,
1544
- rss_opts=None,
1545
- social_card=None,
1374
+ async def campaigns_update_settings(
1375
+ self, campaign_id, settings, recipients=None, variate_settings=None, tracking=None, rss_opts=None, social_card=None
1546
1376
  ) -> dict[str, Any]:
1547
1377
  """
1548
1378
  Updates the settings of an email campaign with the specified parameters.
@@ -1585,7 +1415,7 @@ class MailchimpApp(APIApplication):
1585
1415
  response.raise_for_status()
1586
1416
  return response.json()
1587
1417
 
1588
- def campaigns_remove_campaign(self, campaign_id) -> Any:
1418
+ async def campaigns_remove_campaign(self, campaign_id) -> Any:
1589
1419
  """
1590
1420
  Removes a campaign identified by the given campaign ID.
1591
1421
 
@@ -1610,7 +1440,7 @@ class MailchimpApp(APIApplication):
1610
1440
  response.raise_for_status()
1611
1441
  return response.json()
1612
1442
 
1613
- def campaigns_cancel_send_action(self, campaign_id) -> Any:
1443
+ async def campaigns_cancel_send_action(self, campaign_id) -> Any:
1614
1444
  """
1615
1445
  Cancels the scheduled sending of a campaign identified by its campaign ID.
1616
1446
 
@@ -1635,7 +1465,7 @@ class MailchimpApp(APIApplication):
1635
1465
  response.raise_for_status()
1636
1466
  return response.json()
1637
1467
 
1638
- def campaigns_replicate_action(self, campaign_id) -> dict[str, Any]:
1468
+ async def campaigns_replicate_action(self, campaign_id) -> dict[str, Any]:
1639
1469
  """
1640
1470
  Replicates an existing campaign by sending a replicate action request to the API.
1641
1471
 
@@ -1660,7 +1490,7 @@ class MailchimpApp(APIApplication):
1660
1490
  response.raise_for_status()
1661
1491
  return response.json()
1662
1492
 
1663
- def campaigns_send_action(self, campaign_id) -> Any:
1493
+ async def campaigns_send_action(self, campaign_id) -> Any:
1664
1494
  """
1665
1495
  Triggers the send action for a specified email campaign.
1666
1496
 
@@ -1685,9 +1515,7 @@ class MailchimpApp(APIApplication):
1685
1515
  response.raise_for_status()
1686
1516
  return response.json()
1687
1517
 
1688
- def campaigns_schedule_delivery(
1689
- self, campaign_id, schedule_time, timewarp=None, batch_delivery=None
1690
- ) -> Any:
1518
+ async def campaigns_schedule_delivery(self, campaign_id, schedule_time, timewarp=None, batch_delivery=None) -> Any:
1691
1519
  """
1692
1520
  Schedules the delivery of an email campaign at a specified time, with optional timewarp and batch delivery settings.
1693
1521
 
@@ -1711,11 +1539,7 @@ class MailchimpApp(APIApplication):
1711
1539
  raise ValueError("Missing required parameter 'campaign_id'")
1712
1540
  if schedule_time is None:
1713
1541
  raise ValueError("Missing required parameter 'schedule_time'")
1714
- request_body = {
1715
- "schedule_time": schedule_time,
1716
- "timewarp": timewarp,
1717
- "batch_delivery": batch_delivery,
1718
- }
1542
+ request_body = {"schedule_time": schedule_time, "timewarp": timewarp, "batch_delivery": batch_delivery}
1719
1543
  request_body = {k: v for k, v in request_body.items() if v is not None}
1720
1544
  url = f"{self.base_url}/campaigns/{campaign_id}/actions/schedule"
1721
1545
  query_params = {}
@@ -1723,7 +1547,7 @@ class MailchimpApp(APIApplication):
1723
1547
  response.raise_for_status()
1724
1548
  return response.json()
1725
1549
 
1726
- def campaigns_unschedule_action(self, campaign_id) -> Any:
1550
+ async def campaigns_unschedule_action(self, campaign_id) -> Any:
1727
1551
  """
1728
1552
  Unschedules an active campaign by sending a POST request to the campaign's unschedule action endpoint.
1729
1553
 
@@ -1748,7 +1572,7 @@ class MailchimpApp(APIApplication):
1748
1572
  response.raise_for_status()
1749
1573
  return response.json()
1750
1574
 
1751
- def campaigns_send_test_email(self, campaign_id, test_emails, send_type) -> Any:
1575
+ async def campaigns_send_test_email(self, campaign_id, test_emails, send_type) -> Any:
1752
1576
  """
1753
1577
  Sends a test email for a specific campaign to a list of test email addresses.
1754
1578
 
@@ -1773,10 +1597,7 @@ class MailchimpApp(APIApplication):
1773
1597
  raise ValueError("Missing required parameter 'test_emails'")
1774
1598
  if send_type is None:
1775
1599
  raise ValueError("Missing required parameter 'send_type'")
1776
- request_body = {
1777
- "test_emails": test_emails,
1778
- "send_type": send_type,
1779
- }
1600
+ request_body = {"test_emails": test_emails, "send_type": send_type}
1780
1601
  request_body = {k: v for k, v in request_body.items() if v is not None}
1781
1602
  url = f"{self.base_url}/campaigns/{campaign_id}/actions/test"
1782
1603
  query_params = {}
@@ -1784,7 +1605,7 @@ class MailchimpApp(APIApplication):
1784
1605
  response.raise_for_status()
1785
1606
  return response.json()
1786
1607
 
1787
- def campaigns_pause_rss_campaign(self, campaign_id) -> Any:
1608
+ async def campaigns_pause_rss_campaign(self, campaign_id) -> Any:
1788
1609
  """
1789
1610
  Pauses an RSS campaign by sending a pause action request to the campaign API endpoint.
1790
1611
 
@@ -1809,7 +1630,7 @@ class MailchimpApp(APIApplication):
1809
1630
  response.raise_for_status()
1810
1631
  return response.json()
1811
1632
 
1812
- def campaigns_resume_rss_campaign(self, campaign_id) -> Any:
1633
+ async def campaigns_resume_rss_campaign(self, campaign_id) -> Any:
1813
1634
  """
1814
1635
  Resumes an RSS campaign with the specified ID.
1815
1636
 
@@ -1834,9 +1655,7 @@ class MailchimpApp(APIApplication):
1834
1655
  response.raise_for_status()
1835
1656
  return response.json()
1836
1657
 
1837
- def campaigns_resend_action(
1838
- self, campaign_id, shortcut_type=None
1839
- ) -> dict[str, Any]:
1658
+ async def campaigns_resend_action(self, campaign_id, shortcut_type=None) -> dict[str, Any]:
1840
1659
  """
1841
1660
  Initiates a resend action for a specified campaign using the provided campaign ID and optional shortcut type.
1842
1661
 
@@ -1856,9 +1675,7 @@ class MailchimpApp(APIApplication):
1856
1675
  """
1857
1676
  if campaign_id is None:
1858
1677
  raise ValueError("Missing required parameter 'campaign_id'")
1859
- request_body = {
1860
- "shortcut_type": shortcut_type,
1861
- }
1678
+ request_body = {"shortcut_type": shortcut_type}
1862
1679
  request_body = {k: v for k, v in request_body.items() if v is not None}
1863
1680
  url = f"{self.base_url}/campaigns/{campaign_id}/actions/create-resend"
1864
1681
  query_params = {}
@@ -1866,9 +1683,7 @@ class MailchimpApp(APIApplication):
1866
1683
  response.raise_for_status()
1867
1684
  return response.json()
1868
1685
 
1869
- def campaigns_get_content(
1870
- self, campaign_id, fields=None, exclude_fields=None
1871
- ) -> dict[str, Any]:
1686
+ async def campaigns_get_content(self, campaign_id, fields=None, exclude_fields=None) -> dict[str, Any]:
1872
1687
  """
1873
1688
  Retrieves the content of a specific campaign, with optional field filtering.
1874
1689
 
@@ -1890,24 +1705,13 @@ class MailchimpApp(APIApplication):
1890
1705
  if campaign_id is None:
1891
1706
  raise ValueError("Missing required parameter 'campaign_id'")
1892
1707
  url = f"{self.base_url}/campaigns/{campaign_id}/content"
1893
- query_params = {
1894
- k: v
1895
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
1896
- if v is not None
1897
- }
1708
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
1898
1709
  response = self._get(url, params=query_params)
1899
1710
  response.raise_for_status()
1900
1711
  return response.json()
1901
1712
 
1902
- def campaigns_set_content(
1903
- self,
1904
- campaign_id,
1905
- plain_text=None,
1906
- html=None,
1907
- url=None,
1908
- template=None,
1909
- archive=None,
1910
- variate_contents=None,
1713
+ async def campaigns_set_content(
1714
+ self, campaign_id, plain_text=None, html=None, url=None, template=None, archive=None, variate_contents=None
1911
1715
  ) -> dict[str, Any]:
1912
1716
  """
1913
1717
  Updates the content of a specific campaign with provided data such as plain text, HTML, URL, template, archive, or variate content.
@@ -1948,9 +1752,7 @@ class MailchimpApp(APIApplication):
1948
1752
  response.raise_for_status()
1949
1753
  return response.json()
1950
1754
 
1951
- def campaigns_list_feedback(
1952
- self, campaign_id, fields=None, exclude_fields=None
1953
- ) -> dict[str, Any]:
1755
+ async def campaigns_list_feedback(self, campaign_id, fields=None, exclude_fields=None) -> dict[str, Any]:
1954
1756
  """
1955
1757
  Retrieves feedback information for a specific email campaign, with optional field filtering.
1956
1758
 
@@ -1972,18 +1774,12 @@ class MailchimpApp(APIApplication):
1972
1774
  if campaign_id is None:
1973
1775
  raise ValueError("Missing required parameter 'campaign_id'")
1974
1776
  url = f"{self.base_url}/campaigns/{campaign_id}/feedback"
1975
- query_params = {
1976
- k: v
1977
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
1978
- if v is not None
1979
- }
1777
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
1980
1778
  response = self._get(url, params=query_params)
1981
1779
  response.raise_for_status()
1982
1780
  return response.json()
1983
1781
 
1984
- def campaigns_add_feedback(
1985
- self, campaign_id, message, block_id=None, is_complete=None
1986
- ) -> dict[str, Any]:
1782
+ async def campaigns_add_feedback(self, campaign_id, message, block_id=None, is_complete=None) -> dict[str, Any]:
1987
1783
  """
1988
1784
  Submit feedback for a specific campaign by sending a message and optional metadata.
1989
1785
 
@@ -2007,11 +1803,7 @@ class MailchimpApp(APIApplication):
2007
1803
  raise ValueError("Missing required parameter 'campaign_id'")
2008
1804
  if message is None:
2009
1805
  raise ValueError("Missing required parameter 'message'")
2010
- request_body = {
2011
- "block_id": block_id,
2012
- "message": message,
2013
- "is_complete": is_complete,
2014
- }
1806
+ request_body = {"block_id": block_id, "message": message, "is_complete": is_complete}
2015
1807
  request_body = {k: v for k, v in request_body.items() if v is not None}
2016
1808
  url = f"{self.base_url}/campaigns/{campaign_id}/feedback"
2017
1809
  query_params = {}
@@ -2019,9 +1811,7 @@ class MailchimpApp(APIApplication):
2019
1811
  response.raise_for_status()
2020
1812
  return response.json()
2021
1813
 
2022
- def campaigns_get_feedback_message(
2023
- self, campaign_id, feedback_id, fields=None, exclude_fields=None
2024
- ) -> dict[str, Any]:
1814
+ async def campaigns_get_feedback_message(self, campaign_id, feedback_id, fields=None, exclude_fields=None) -> dict[str, Any]:
2025
1815
  """
2026
1816
  Retrieves a specific feedback message for a given campaign, with optional field filtering.
2027
1817
 
@@ -2046,16 +1836,12 @@ class MailchimpApp(APIApplication):
2046
1836
  if feedback_id is None:
2047
1837
  raise ValueError("Missing required parameter 'feedback_id'")
2048
1838
  url = f"{self.base_url}/campaigns/{campaign_id}/feedback/{feedback_id}"
2049
- query_params = {
2050
- k: v
2051
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
2052
- if v is not None
2053
- }
1839
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
2054
1840
  response = self._get(url, params=query_params)
2055
1841
  response.raise_for_status()
2056
1842
  return response.json()
2057
1843
 
2058
- def campaigns_update_feedback_message(
1844
+ async def campaigns_update_feedback_message(
2059
1845
  self, campaign_id, feedback_id, block_id=None, message=None, is_complete=None
2060
1846
  ) -> dict[str, Any]:
2061
1847
  """
@@ -2082,11 +1868,7 @@ class MailchimpApp(APIApplication):
2082
1868
  raise ValueError("Missing required parameter 'campaign_id'")
2083
1869
  if feedback_id is None:
2084
1870
  raise ValueError("Missing required parameter 'feedback_id'")
2085
- request_body = {
2086
- "block_id": block_id,
2087
- "message": message,
2088
- "is_complete": is_complete,
2089
- }
1871
+ request_body = {"block_id": block_id, "message": message, "is_complete": is_complete}
2090
1872
  request_body = {k: v for k, v in request_body.items() if v is not None}
2091
1873
  url = f"{self.base_url}/campaigns/{campaign_id}/feedback/{feedback_id}"
2092
1874
  query_params = {}
@@ -2094,7 +1876,7 @@ class MailchimpApp(APIApplication):
2094
1876
  response.raise_for_status()
2095
1877
  return response.json()
2096
1878
 
2097
- def campaigns_remove_feedback_message(self, campaign_id, feedback_id) -> Any:
1879
+ async def campaigns_remove_feedback_message(self, campaign_id, feedback_id) -> Any:
2098
1880
  """
2099
1881
  Removes a specific feedback message from a campaign.
2100
1882
 
@@ -2122,9 +1904,7 @@ class MailchimpApp(APIApplication):
2122
1904
  response.raise_for_status()
2123
1905
  return response.json()
2124
1906
 
2125
- def campaigns_get_send_checklist(
2126
- self, campaign_id, fields=None, exclude_fields=None
2127
- ) -> dict[str, Any]:
1907
+ async def campaigns_get_send_checklist(self, campaign_id, fields=None, exclude_fields=None) -> dict[str, Any]:
2128
1908
  """
2129
1909
  Retrieves the send checklist for a specified campaign, optionally filtering the response fields.
2130
1910
 
@@ -2146,18 +1926,12 @@ class MailchimpApp(APIApplication):
2146
1926
  if campaign_id is None:
2147
1927
  raise ValueError("Missing required parameter 'campaign_id'")
2148
1928
  url = f"{self.base_url}/campaigns/{campaign_id}/send-checklist"
2149
- query_params = {
2150
- k: v
2151
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
2152
- if v is not None
2153
- }
1929
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
2154
1930
  response = self._get(url, params=query_params)
2155
1931
  response.raise_for_status()
2156
1932
  return response.json()
2157
1933
 
2158
- def connected_sites_list_all(
2159
- self, fields=None, exclude_fields=None, count=None, offset=None
2160
- ) -> dict[str, Any]:
1934
+ async def connected_sites_list_all(self, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
2161
1935
  """
2162
1936
  Retrieves a list of all connected sites with optional filtering, field selection, and pagination.
2163
1937
 
@@ -2178,22 +1952,13 @@ class MailchimpApp(APIApplication):
2178
1952
  """
2179
1953
  url = f"{self.base_url}/connected-sites"
2180
1954
  query_params = {
2181
- k: v
2182
- for k, v in [
2183
- ("fields", fields),
2184
- ("exclude_fields", exclude_fields),
2185
- ("count", count),
2186
- ("offset", offset),
2187
- ]
2188
- if v is not None
1955
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
2189
1956
  }
2190
1957
  response = self._get(url, params=query_params)
2191
1958
  response.raise_for_status()
2192
1959
  return response.json()
2193
1960
 
2194
- def connected_sites_create_new_mailchimp_site(
2195
- self, foreign_id, domain
2196
- ) -> dict[str, Any]:
1961
+ async def connected_sites_create_new_mailchimp_site(self, foreign_id, domain) -> dict[str, Any]:
2197
1962
  """
2198
1963
  Creates a new connected site in Mailchimp with the specified foreign ID and domain.
2199
1964
 
@@ -2215,10 +1980,7 @@ class MailchimpApp(APIApplication):
2215
1980
  raise ValueError("Missing required parameter 'foreign_id'")
2216
1981
  if domain is None:
2217
1982
  raise ValueError("Missing required parameter 'domain'")
2218
- request_body = {
2219
- "foreign_id": foreign_id,
2220
- "domain": domain,
2221
- }
1983
+ request_body = {"foreign_id": foreign_id, "domain": domain}
2222
1984
  request_body = {k: v for k, v in request_body.items() if v is not None}
2223
1985
  url = f"{self.base_url}/connected-sites"
2224
1986
  query_params = {}
@@ -2226,9 +1988,7 @@ class MailchimpApp(APIApplication):
2226
1988
  response.raise_for_status()
2227
1989
  return response.json()
2228
1990
 
2229
- def connected_sites_get_info(
2230
- self, connected_site_id, fields=None, exclude_fields=None
2231
- ) -> dict[str, Any]:
1991
+ async def connected_sites_get_info(self, connected_site_id, fields=None, exclude_fields=None) -> dict[str, Any]:
2232
1992
  """
2233
1993
  Retrieve detailed information for a specific connected site by ID, with optional field filtering.
2234
1994
 
@@ -2250,16 +2010,12 @@ class MailchimpApp(APIApplication):
2250
2010
  if connected_site_id is None:
2251
2011
  raise ValueError("Missing required parameter 'connected_site_id'")
2252
2012
  url = f"{self.base_url}/connected-sites/{connected_site_id}"
2253
- query_params = {
2254
- k: v
2255
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
2256
- if v is not None
2257
- }
2013
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
2258
2014
  response = self._get(url, params=query_params)
2259
2015
  response.raise_for_status()
2260
2016
  return response.json()
2261
2017
 
2262
- def connected_sites_remove_site(self, connected_site_id) -> Any:
2018
+ async def connected_sites_remove_site(self, connected_site_id) -> Any:
2263
2019
  """
2264
2020
  Removes a connected site by its unique identifier.
2265
2021
 
@@ -2284,7 +2040,7 @@ class MailchimpApp(APIApplication):
2284
2040
  response.raise_for_status()
2285
2041
  return response.json()
2286
2042
 
2287
- def connected_sites_verify_script_installation(self, connected_site_id) -> Any:
2043
+ async def connected_sites_verify_script_installation(self, connected_site_id) -> Any:
2288
2044
  """
2289
2045
  Verifies whether the tracking script is properly installed on a specified connected site.
2290
2046
 
@@ -2309,15 +2065,8 @@ class MailchimpApp(APIApplication):
2309
2065
  response.raise_for_status()
2310
2066
  return response.json()
2311
2067
 
2312
- def conversations_get_all_conversations(
2313
- self,
2314
- fields=None,
2315
- exclude_fields=None,
2316
- count=None,
2317
- offset=None,
2318
- has_unread_messages=None,
2319
- list_id=None,
2320
- campaign_id=None,
2068
+ async def conversations_get_all_conversations(
2069
+ self, fields=None, exclude_fields=None, count=None, offset=None, has_unread_messages=None, list_id=None, campaign_id=None
2321
2070
  ) -> dict[str, Any]:
2322
2071
  """
2323
2072
  Get all conversations from the API.
@@ -2358,9 +2107,7 @@ class MailchimpApp(APIApplication):
2358
2107
  response.raise_for_status()
2359
2108
  return response.json()
2360
2109
 
2361
- def conversations_get_by_id(
2362
- self, conversation_id, fields=None, exclude_fields=None
2363
- ) -> dict[str, Any]:
2110
+ async def conversations_get_by_id(self, conversation_id, fields=None, exclude_fields=None) -> dict[str, Any]:
2364
2111
  """
2365
2112
  Retrieve the details of a conversation by its unique identifier.
2366
2113
 
@@ -2382,23 +2129,13 @@ class MailchimpApp(APIApplication):
2382
2129
  if conversation_id is None:
2383
2130
  raise ValueError("Missing required parameter 'conversation_id'")
2384
2131
  url = f"{self.base_url}/conversations/{conversation_id}"
2385
- query_params = {
2386
- k: v
2387
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
2388
- if v is not None
2389
- }
2132
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
2390
2133
  response = self._get(url, params=query_params)
2391
2134
  response.raise_for_status()
2392
2135
  return response.json()
2393
2136
 
2394
- def conversations_list_messages_from_conversation(
2395
- self,
2396
- conversation_id,
2397
- fields=None,
2398
- exclude_fields=None,
2399
- is_read=None,
2400
- before_timestamp=None,
2401
- since_timestamp=None,
2137
+ async def conversations_list_messages_from_conversation(
2138
+ self, conversation_id, fields=None, exclude_fields=None, is_read=None, before_timestamp=None, since_timestamp=None
2402
2139
  ) -> dict[str, Any]:
2403
2140
  """
2404
2141
  Retrieves messages from a specified conversation.
@@ -2439,9 +2176,7 @@ class MailchimpApp(APIApplication):
2439
2176
  response.raise_for_status()
2440
2177
  return response.json()
2441
2178
 
2442
- def conversations_get_message_by_id(
2443
- self, conversation_id, message_id, fields=None, exclude_fields=None
2444
- ) -> dict[str, Any]:
2179
+ async def conversations_get_message_by_id(self, conversation_id, message_id, fields=None, exclude_fields=None) -> dict[str, Any]:
2445
2180
  """
2446
2181
  Retrieve a specific message from a conversation by its ID, with optional control over included and excluded fields.
2447
2182
 
@@ -2466,18 +2201,12 @@ class MailchimpApp(APIApplication):
2466
2201
  if message_id is None:
2467
2202
  raise ValueError("Missing required parameter 'message_id'")
2468
2203
  url = f"{self.base_url}/conversations/{conversation_id}/messages/{message_id}"
2469
- query_params = {
2470
- k: v
2471
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
2472
- if v is not None
2473
- }
2204
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
2474
2205
  response = self._get(url, params=query_params)
2475
2206
  response.raise_for_status()
2476
2207
  return response.json()
2477
2208
 
2478
- def customer_journeys_trigger_step_action(
2479
- self, journey_id, step_id, email_address
2480
- ) -> dict[str, Any]:
2209
+ async def customer_journeys_trigger_step_action(self, journey_id, step_id, email_address) -> dict[str, Any]:
2481
2210
  """
2482
2211
  Triggers a specific action for a step in a customer journey for the given email address.
2483
2212
 
@@ -2502,9 +2231,7 @@ class MailchimpApp(APIApplication):
2502
2231
  raise ValueError("Missing required parameter 'step_id'")
2503
2232
  if email_address is None:
2504
2233
  raise ValueError("Missing required parameter 'email_address'")
2505
- request_body = {
2506
- "email_address": email_address,
2507
- }
2234
+ request_body = {"email_address": email_address}
2508
2235
  request_body = {k: v for k, v in request_body.items() if v is not None}
2509
2236
  url = f"{self.base_url}/customer-journeys/journeys/{journey_id}/steps/{step_id}/actions/trigger"
2510
2237
  query_params = {}
@@ -2512,9 +2239,7 @@ class MailchimpApp(APIApplication):
2512
2239
  response.raise_for_status()
2513
2240
  return response.json()
2514
2241
 
2515
- def file_manager_upload_file(
2516
- self, name, file_data, folder_id=None
2517
- ) -> dict[str, Any]:
2242
+ async def file_manager_upload_file(self, name, file_data, folder_id=None) -> dict[str, Any]:
2518
2243
  """
2519
2244
  Uploads a file to the file manager service, associating it with a specified name and optionally a folder.
2520
2245
 
@@ -2537,11 +2262,7 @@ class MailchimpApp(APIApplication):
2537
2262
  raise ValueError("Missing required parameter 'name'")
2538
2263
  if file_data is None:
2539
2264
  raise ValueError("Missing required parameter 'file_data'")
2540
- request_body = {
2541
- "folder_id": folder_id,
2542
- "name": name,
2543
- "file_data": file_data,
2544
- }
2265
+ request_body = {"folder_id": folder_id, "name": name, "file_data": file_data}
2545
2266
  request_body = {k: v for k, v in request_body.items() if v is not None}
2546
2267
  url = f"{self.base_url}/file-manager/files"
2547
2268
  query_params = {}
@@ -2549,9 +2270,7 @@ class MailchimpApp(APIApplication):
2549
2270
  response.raise_for_status()
2550
2271
  return response.json()
2551
2272
 
2552
- def file_manager_get_file(
2553
- self, file_id, fields=None, exclude_fields=None
2554
- ) -> dict[str, Any]:
2273
+ async def file_manager_get_file(self, file_id, fields=None, exclude_fields=None) -> dict[str, Any]:
2555
2274
  """
2556
2275
  Retrieves the details of a file from the file manager by its unique ID, optionally including or excluding specific fields.
2557
2276
 
@@ -2573,18 +2292,12 @@ class MailchimpApp(APIApplication):
2573
2292
  if file_id is None:
2574
2293
  raise ValueError("Missing required parameter 'file_id'")
2575
2294
  url = f"{self.base_url}/file-manager/files/{file_id}"
2576
- query_params = {
2577
- k: v
2578
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
2579
- if v is not None
2580
- }
2295
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
2581
2296
  response = self._get(url, params=query_params)
2582
2297
  response.raise_for_status()
2583
2298
  return response.json()
2584
2299
 
2585
- def file_manager_update_file(
2586
- self, file_id, folder_id=None, name=None
2587
- ) -> dict[str, Any]:
2300
+ async def file_manager_update_file(self, file_id, folder_id=None, name=None) -> dict[str, Any]:
2588
2301
  """
2589
2302
  Updates the specified file's metadata in the file manager, such as its folder or name.
2590
2303
 
@@ -2605,10 +2318,7 @@ class MailchimpApp(APIApplication):
2605
2318
  """
2606
2319
  if file_id is None:
2607
2320
  raise ValueError("Missing required parameter 'file_id'")
2608
- request_body = {
2609
- "folder_id": folder_id,
2610
- "name": name,
2611
- }
2321
+ request_body = {"folder_id": folder_id, "name": name}
2612
2322
  request_body = {k: v for k, v in request_body.items() if v is not None}
2613
2323
  url = f"{self.base_url}/file-manager/files/{file_id}"
2614
2324
  query_params = {}
@@ -2616,7 +2326,7 @@ class MailchimpApp(APIApplication):
2616
2326
  response.raise_for_status()
2617
2327
  return response.json()
2618
2328
 
2619
- def file_manager_remove_file_by_id(self, file_id) -> Any:
2329
+ async def file_manager_remove_file_by_id(self, file_id) -> Any:
2620
2330
  """
2621
2331
  Removes a file from the file manager by its unique identifier.
2622
2332
 
@@ -2641,15 +2351,8 @@ class MailchimpApp(APIApplication):
2641
2351
  response.raise_for_status()
2642
2352
  return response.json()
2643
2353
 
2644
- def file_manager_get_folder_list(
2645
- self,
2646
- fields=None,
2647
- exclude_fields=None,
2648
- count=None,
2649
- offset=None,
2650
- created_by=None,
2651
- before_created_at=None,
2652
- since_created_at=None,
2354
+ async def file_manager_get_folder_list(
2355
+ self, fields=None, exclude_fields=None, count=None, offset=None, created_by=None, before_created_at=None, since_created_at=None
2653
2356
  ) -> dict[str, Any]:
2654
2357
  """
2655
2358
  Retrieves a list of folders from the file manager using optional filtering, field selection, and pagination parameters.
@@ -2690,7 +2393,7 @@ class MailchimpApp(APIApplication):
2690
2393
  response.raise_for_status()
2691
2394
  return response.json()
2692
2395
 
2693
- def file_manager_add_new_folder(self, request_body=None) -> dict[str, Any]:
2396
+ async def file_manager_add_new_folder(self, request_body=None) -> dict[str, Any]:
2694
2397
  """
2695
2398
  Creates a new folder in the file manager using the provided request body data.
2696
2399
 
@@ -2712,9 +2415,7 @@ class MailchimpApp(APIApplication):
2712
2415
  response.raise_for_status()
2713
2416
  return response.json()
2714
2417
 
2715
- def file_manager_get_folder_info(
2716
- self, folder_id, fields=None, exclude_fields=None
2717
- ) -> dict[str, Any]:
2418
+ async def file_manager_get_folder_info(self, folder_id, fields=None, exclude_fields=None) -> dict[str, Any]:
2718
2419
  """
2719
2420
  Retrieves information about a specific folder from the file manager service.
2720
2421
 
@@ -2736,18 +2437,12 @@ class MailchimpApp(APIApplication):
2736
2437
  if folder_id is None:
2737
2438
  raise ValueError("Missing required parameter 'folder_id'")
2738
2439
  url = f"{self.base_url}/file-manager/folders/{folder_id}"
2739
- query_params = {
2740
- k: v
2741
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
2742
- if v is not None
2743
- }
2440
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
2744
2441
  response = self._get(url, params=query_params)
2745
2442
  response.raise_for_status()
2746
2443
  return response.json()
2747
2444
 
2748
- def file_manager_update_specific_folder(
2749
- self, folder_id, request_body=None
2750
- ) -> dict[str, Any]:
2445
+ async def file_manager_update_specific_folder(self, folder_id, request_body=None) -> dict[str, Any]:
2751
2446
  """
2752
2447
  Updates a specific folder in the file manager system.
2753
2448
 
@@ -2773,7 +2468,7 @@ class MailchimpApp(APIApplication):
2773
2468
  response.raise_for_status()
2774
2469
  return response.json()
2775
2470
 
2776
- def file_manager_delete_folder_by_id(self, folder_id) -> Any:
2471
+ async def file_manager_delete_folder_by_id(self, folder_id) -> Any:
2777
2472
  """
2778
2473
  Deletes a folder from the file manager by its unique identifier.
2779
2474
 
@@ -2861,7 +2556,7 @@ class MailchimpApp(APIApplication):
2861
2556
  response.raise_for_status()
2862
2557
  return response.json()
2863
2558
 
2864
- def lists_get_all_info(
2559
+ async def lists_get_all_info(
2865
2560
  self,
2866
2561
  fields=None,
2867
2562
  exclude_fields=None,
@@ -2928,7 +2623,7 @@ class MailchimpApp(APIApplication):
2928
2623
  response.raise_for_status()
2929
2624
  return response.json()
2930
2625
 
2931
- def lists_create_new_list(
2626
+ async def lists_create_new_list(
2932
2627
  self,
2933
2628
  name,
2934
2629
  contact,
@@ -2995,9 +2690,7 @@ class MailchimpApp(APIApplication):
2995
2690
  response.raise_for_status()
2996
2691
  return response.json()
2997
2692
 
2998
- def lists_get_list_info(
2999
- self, list_id, fields=None, exclude_fields=None, include_total_contacts=None
3000
- ) -> dict[str, Any]:
2693
+ async def lists_get_list_info(self, list_id, fields=None, exclude_fields=None, include_total_contacts=None) -> dict[str, Any]:
3001
2694
  """
3002
2695
  Retrieves detailed information about a specific list, including optional field selection and total contacts count.
3003
2696
 
@@ -3022,18 +2715,14 @@ class MailchimpApp(APIApplication):
3022
2715
  url = f"{self.base_url}/lists/{list_id}"
3023
2716
  query_params = {
3024
2717
  k: v
3025
- for k, v in [
3026
- ("fields", fields),
3027
- ("exclude_fields", exclude_fields),
3028
- ("include_total_contacts", include_total_contacts),
3029
- ]
2718
+ for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("include_total_contacts", include_total_contacts)]
3030
2719
  if v is not None
3031
2720
  }
3032
2721
  response = self._get(url, params=query_params)
3033
2722
  response.raise_for_status()
3034
2723
  return response.json()
3035
2724
 
3036
- def lists_update_settings(
2725
+ async def lists_update_settings(
3037
2726
  self,
3038
2727
  list_id,
3039
2728
  name,
@@ -3104,7 +2793,7 @@ class MailchimpApp(APIApplication):
3104
2793
  response.raise_for_status()
3105
2794
  return response.json()
3106
2795
 
3107
- def lists_delete_list(self, list_id) -> Any:
2796
+ async def lists_delete_list(self, list_id) -> Any:
3108
2797
  """
3109
2798
  Deletes a list with the specified list ID via a DELETE request and returns the server's response as JSON.
3110
2799
 
@@ -3129,14 +2818,8 @@ class MailchimpApp(APIApplication):
3129
2818
  response.raise_for_status()
3130
2819
  return response.json()
3131
2820
 
3132
- def lists_batch_subscribe_or_unsubscribe(
3133
- self,
3134
- list_id,
3135
- members,
3136
- skip_merge_validation=None,
3137
- skip_duplicate_check=None,
3138
- sync_tags=None,
3139
- update_existing=None,
2821
+ async def lists_batch_subscribe_or_unsubscribe(
2822
+ self, list_id, members, skip_merge_validation=None, skip_duplicate_check=None, sync_tags=None, update_existing=None
3140
2823
  ) -> dict[str, Any]:
3141
2824
  """
3142
2825
  Batch subscribes or unsubscribes members to a specified mailing list, with optional parameters for merge validation, duplicate checking, tag synchronization, and updating existing members.
@@ -3163,28 +2846,19 @@ class MailchimpApp(APIApplication):
3163
2846
  raise ValueError("Missing required parameter 'list_id'")
3164
2847
  if members is None:
3165
2848
  raise ValueError("Missing required parameter 'members'")
3166
- request_body = {
3167
- "members": members,
3168
- "sync_tags": sync_tags,
3169
- "update_existing": update_existing,
3170
- }
2849
+ request_body = {"members": members, "sync_tags": sync_tags, "update_existing": update_existing}
3171
2850
  request_body = {k: v for k, v in request_body.items() if v is not None}
3172
2851
  url = f"{self.base_url}/lists/{list_id}"
3173
2852
  query_params = {
3174
2853
  k: v
3175
- for k, v in [
3176
- ("skip_merge_validation", skip_merge_validation),
3177
- ("skip_duplicate_check", skip_duplicate_check),
3178
- ]
2854
+ for k, v in [("skip_merge_validation", skip_merge_validation), ("skip_duplicate_check", skip_duplicate_check)]
3179
2855
  if v is not None
3180
2856
  }
3181
2857
  response = self._post(url, data=request_body, params=query_params)
3182
2858
  response.raise_for_status()
3183
2859
  return response.json()
3184
2860
 
3185
- def lists_get_all_abuse_reports(
3186
- self, list_id, fields=None, exclude_fields=None, count=None, offset=None
3187
- ) -> dict[str, Any]:
2861
+ async def lists_get_all_abuse_reports(self, list_id, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
3188
2862
  """
3189
2863
  Retrieves all abuse reports for a specific list, with optional filtering and pagination.
3190
2864
 
@@ -3209,28 +2883,13 @@ class MailchimpApp(APIApplication):
3209
2883
  raise ValueError("Missing required parameter 'list_id'")
3210
2884
  url = f"{self.base_url}/lists/{list_id}/abuse-reports"
3211
2885
  query_params = {
3212
- k: v
3213
- for k, v in [
3214
- ("fields", fields),
3215
- ("exclude_fields", exclude_fields),
3216
- ("count", count),
3217
- ("offset", offset),
3218
- ]
3219
- if v is not None
2886
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
3220
2887
  }
3221
2888
  response = self._get(url, params=query_params)
3222
2889
  response.raise_for_status()
3223
2890
  return response.json()
3224
2891
 
3225
- def lists_get_abuse_report(
3226
- self,
3227
- list_id,
3228
- report_id,
3229
- fields=None,
3230
- exclude_fields=None,
3231
- count=None,
3232
- offset=None,
3233
- ) -> dict[str, Any]:
2892
+ async def lists_get_abuse_report(self, list_id, report_id, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
3234
2893
  """
3235
2894
  Retrieves the details of a specific abuse report for a list.
3236
2895
 
@@ -3258,22 +2917,13 @@ class MailchimpApp(APIApplication):
3258
2917
  raise ValueError("Missing required parameter 'report_id'")
3259
2918
  url = f"{self.base_url}/lists/{list_id}/abuse-reports/{report_id}"
3260
2919
  query_params = {
3261
- k: v
3262
- for k, v in [
3263
- ("fields", fields),
3264
- ("exclude_fields", exclude_fields),
3265
- ("count", count),
3266
- ("offset", offset),
3267
- ]
3268
- if v is not None
2920
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
3269
2921
  }
3270
2922
  response = self._get(url, params=query_params)
3271
2923
  response.raise_for_status()
3272
2924
  return response.json()
3273
2925
 
3274
- def lists_get_recent_activity_stats(
3275
- self, list_id, count=None, offset=None, fields=None, exclude_fields=None
3276
- ) -> dict[str, Any]:
2926
+ async def lists_get_recent_activity_stats(self, list_id, count=None, offset=None, fields=None, exclude_fields=None) -> dict[str, Any]:
3277
2927
  """
3278
2928
  Retrieves recent activity statistics for a specified list, with optional filtering and field selection.
3279
2929
 
@@ -3298,22 +2948,13 @@ class MailchimpApp(APIApplication):
3298
2948
  raise ValueError("Missing required parameter 'list_id'")
3299
2949
  url = f"{self.base_url}/lists/{list_id}/activity"
3300
2950
  query_params = {
3301
- k: v
3302
- for k, v in [
3303
- ("count", count),
3304
- ("offset", offset),
3305
- ("fields", fields),
3306
- ("exclude_fields", exclude_fields),
3307
- ]
3308
- if v is not None
2951
+ k: v for k, v in [("count", count), ("offset", offset), ("fields", fields), ("exclude_fields", exclude_fields)] if v is not None
3309
2952
  }
3310
2953
  response = self._get(url, params=query_params)
3311
2954
  response.raise_for_status()
3312
2955
  return response.json()
3313
2956
 
3314
- def lists_list_top_email_clients(
3315
- self, list_id, fields=None, exclude_fields=None
3316
- ) -> dict[str, Any]:
2957
+ async def lists_list_top_email_clients(self, list_id, fields=None, exclude_fields=None) -> dict[str, Any]:
3317
2958
  """
3318
2959
  Retrieves a summary of the top email clients for a specified email list.
3319
2960
 
@@ -3335,24 +2976,13 @@ class MailchimpApp(APIApplication):
3335
2976
  if list_id is None:
3336
2977
  raise ValueError("Missing required parameter 'list_id'")
3337
2978
  url = f"{self.base_url}/lists/{list_id}/clients"
3338
- query_params = {
3339
- k: v
3340
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
3341
- if v is not None
3342
- }
2979
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
3343
2980
  response = self._get(url, params=query_params)
3344
2981
  response.raise_for_status()
3345
2982
  return response.json()
3346
2983
 
3347
- def lists_get_growth_history_data(
3348
- self,
3349
- list_id,
3350
- fields=None,
3351
- exclude_fields=None,
3352
- count=None,
3353
- offset=None,
3354
- sort_field=None,
3355
- sort_dir=None,
2984
+ async def lists_get_growth_history_data(
2985
+ self, list_id, fields=None, exclude_fields=None, count=None, offset=None, sort_field=None, sort_dir=None
3356
2986
  ) -> dict[str, Any]:
3357
2987
  """
3358
2988
  Retrieves the growth history data for a specific list with optional filtering, sorting, and field selection.
@@ -3395,9 +3025,7 @@ class MailchimpApp(APIApplication):
3395
3025
  response.raise_for_status()
3396
3026
  return response.json()
3397
3027
 
3398
- def lists_get_growth_history_by_month(
3399
- self, list_id, month, fields=None, exclude_fields=None
3400
- ) -> dict[str, Any]:
3028
+ async def lists_get_growth_history_by_month(self, list_id, month, fields=None, exclude_fields=None) -> dict[str, Any]:
3401
3029
  """
3402
3030
  Retrieves the growth history of a specific mailing list for a given month, with optional field filtering.
3403
3031
 
@@ -3422,23 +3050,13 @@ class MailchimpApp(APIApplication):
3422
3050
  if month is None:
3423
3051
  raise ValueError("Missing required parameter 'month'")
3424
3052
  url = f"{self.base_url}/lists/{list_id}/growth-history/{month}"
3425
- query_params = {
3426
- k: v
3427
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
3428
- if v is not None
3429
- }
3053
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
3430
3054
  response = self._get(url, params=query_params)
3431
3055
  response.raise_for_status()
3432
3056
  return response.json()
3433
3057
 
3434
- def lists_list_interest_categories(
3435
- self,
3436
- list_id,
3437
- fields=None,
3438
- exclude_fields=None,
3439
- count=None,
3440
- offset=None,
3441
- type=None,
3058
+ async def lists_list_interest_categories(
3059
+ self, list_id, fields=None, exclude_fields=None, count=None, offset=None, type=None
3442
3060
  ) -> dict[str, Any]:
3443
3061
  """
3444
3062
  Retrieves a list of interest categories for a specific mailing list, with optional filters and pagination.
@@ -3466,20 +3084,14 @@ class MailchimpApp(APIApplication):
3466
3084
  url = f"{self.base_url}/lists/{list_id}/interest-categories"
3467
3085
  query_params = {
3468
3086
  k: v
3469
- for k, v in [
3470
- ("fields", fields),
3471
- ("exclude_fields", exclude_fields),
3472
- ("count", count),
3473
- ("offset", offset),
3474
- ("type", type),
3475
- ]
3087
+ for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset), ("type", type)]
3476
3088
  if v is not None
3477
3089
  }
3478
3090
  response = self._get(url, params=query_params)
3479
3091
  response.raise_for_status()
3480
3092
  return response.json()
3481
3093
 
3482
- def lists_add_interest_category(self, list_id, request_body=None) -> dict[str, Any]:
3094
+ async def lists_add_interest_category(self, list_id, request_body=None) -> dict[str, Any]:
3483
3095
  """
3484
3096
  Adds an interest category to a specified list by making a POST request to the list's interest-categories endpoint.
3485
3097
 
@@ -3505,9 +3117,7 @@ class MailchimpApp(APIApplication):
3505
3117
  response.raise_for_status()
3506
3118
  return response.json()
3507
3119
 
3508
- def lists_get_interest_category_info(
3509
- self, list_id, interest_category_id, fields=None, exclude_fields=None
3510
- ) -> dict[str, Any]:
3120
+ async def lists_get_interest_category_info(self, list_id, interest_category_id, fields=None, exclude_fields=None) -> dict[str, Any]:
3511
3121
  """
3512
3122
  Retrieves detailed information about a specific interest category for a given Mailchimp list.
3513
3123
 
@@ -3532,18 +3142,12 @@ class MailchimpApp(APIApplication):
3532
3142
  if interest_category_id is None:
3533
3143
  raise ValueError("Missing required parameter 'interest_category_id'")
3534
3144
  url = f"{self.base_url}/lists/{list_id}/interest-categories/{interest_category_id}"
3535
- query_params = {
3536
- k: v
3537
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
3538
- if v is not None
3539
- }
3145
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
3540
3146
  response = self._get(url, params=query_params)
3541
3147
  response.raise_for_status()
3542
3148
  return response.json()
3543
3149
 
3544
- def lists_update_interest_category(
3545
- self, list_id, interest_category_id, request_body=None
3546
- ) -> dict[str, Any]:
3150
+ async def lists_update_interest_category(self, list_id, interest_category_id, request_body=None) -> dict[str, Any]:
3547
3151
  """
3548
3152
  Updates an interest category for a specific list using the provided data.
3549
3153
 
@@ -3572,7 +3176,7 @@ class MailchimpApp(APIApplication):
3572
3176
  response.raise_for_status()
3573
3177
  return response.json()
3574
3178
 
3575
- def lists_delete_interest_category(self, list_id, interest_category_id) -> Any:
3179
+ async def lists_delete_interest_category(self, list_id, interest_category_id) -> Any:
3576
3180
  """
3577
3181
  Deletes an interest category from a specified list using the provided IDs.
3578
3182
 
@@ -3600,14 +3204,8 @@ class MailchimpApp(APIApplication):
3600
3204
  response.raise_for_status()
3601
3205
  return response.json()
3602
3206
 
3603
- def lists_list_category_interests(
3604
- self,
3605
- list_id,
3606
- interest_category_id,
3607
- fields=None,
3608
- exclude_fields=None,
3609
- count=None,
3610
- offset=None,
3207
+ async def lists_list_category_interests(
3208
+ self, list_id, interest_category_id, fields=None, exclude_fields=None, count=None, offset=None
3611
3209
  ) -> dict[str, Any]:
3612
3210
  """
3613
3211
  Retrieves all interests (subcategories) for a specific interest category within a Mailchimp list.
@@ -3636,22 +3234,13 @@ class MailchimpApp(APIApplication):
3636
3234
  raise ValueError("Missing required parameter 'interest_category_id'")
3637
3235
  url = f"{self.base_url}/lists/{list_id}/interest-categories/{interest_category_id}/interests"
3638
3236
  query_params = {
3639
- k: v
3640
- for k, v in [
3641
- ("fields", fields),
3642
- ("exclude_fields", exclude_fields),
3643
- ("count", count),
3644
- ("offset", offset),
3645
- ]
3646
- if v is not None
3237
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
3647
3238
  }
3648
3239
  response = self._get(url, params=query_params)
3649
3240
  response.raise_for_status()
3650
3241
  return response.json()
3651
3242
 
3652
- def lists_add_interest_in_category(
3653
- self, list_id, interest_category_id, request_body=None
3654
- ) -> dict[str, Any]:
3243
+ async def lists_add_interest_in_category(self, list_id, interest_category_id, request_body=None) -> dict[str, Any]:
3655
3244
  """
3656
3245
  Adds a new interest to a specified interest category within a list.
3657
3246
 
@@ -3680,13 +3269,8 @@ class MailchimpApp(APIApplication):
3680
3269
  response.raise_for_status()
3681
3270
  return response.json()
3682
3271
 
3683
- def lists_get_interest_in_category(
3684
- self,
3685
- list_id,
3686
- interest_category_id,
3687
- interest_id,
3688
- fields=None,
3689
- exclude_fields=None,
3272
+ async def lists_get_interest_in_category(
3273
+ self, list_id, interest_category_id, interest_id, fields=None, exclude_fields=None
3690
3274
  ) -> dict[str, Any]:
3691
3275
  """
3692
3276
  Retrieves interest information within a category of a list.
@@ -3714,16 +3298,12 @@ class MailchimpApp(APIApplication):
3714
3298
  if interest_id is None:
3715
3299
  raise ValueError("Missing required parameter 'interest_id'")
3716
3300
  url = f"{self.base_url}/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}"
3717
- query_params = {
3718
- k: v
3719
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
3720
- if v is not None
3721
- }
3301
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
3722
3302
  response = self._get(url, params=query_params)
3723
3303
  response.raise_for_status()
3724
3304
  return response.json()
3725
3305
 
3726
- def lists_update_interest_category_interest(
3306
+ async def lists_update_interest_category_interest(
3727
3307
  self, list_id, interest_category_id, interest_id, request_body=None
3728
3308
  ) -> dict[str, Any]:
3729
3309
  """
@@ -3757,9 +3337,7 @@ class MailchimpApp(APIApplication):
3757
3337
  response.raise_for_status()
3758
3338
  return response.json()
3759
3339
 
3760
- def lists_delete_interest_in_category(
3761
- self, list_id, interest_category_id, interest_id
3762
- ) -> Any:
3340
+ async def lists_delete_interest_in_category(self, list_id, interest_category_id, interest_id) -> Any:
3763
3341
  """
3764
3342
  Deletes a specific interest from a given interest category within a mailing list.
3765
3343
 
@@ -3790,7 +3368,7 @@ class MailchimpApp(APIApplication):
3790
3368
  response.raise_for_status()
3791
3369
  return response.json()
3792
3370
 
3793
- def lists_get_segments_info(
3371
+ async def lists_get_segments_info(
3794
3372
  self,
3795
3373
  list_id,
3796
3374
  fields=None,
@@ -3859,9 +3437,7 @@ class MailchimpApp(APIApplication):
3859
3437
  response.raise_for_status()
3860
3438
  return response.json()
3861
3439
 
3862
- def lists_add_new_segment(
3863
- self, list_id, name, static_segment=None, options=None
3864
- ) -> dict[str, Any]:
3440
+ async def lists_add_new_segment(self, list_id, name, static_segment=None, options=None) -> dict[str, Any]:
3865
3441
  """
3866
3442
  Creates a new segment for a specified list, optionally as a static segment, by sending a POST request to the appropriate API endpoint.
3867
3443
 
@@ -3885,11 +3461,7 @@ class MailchimpApp(APIApplication):
3885
3461
  raise ValueError("Missing required parameter 'list_id'")
3886
3462
  if name is None:
3887
3463
  raise ValueError("Missing required parameter 'name'")
3888
- request_body = {
3889
- "name": name,
3890
- "static_segment": static_segment,
3891
- "options": options,
3892
- }
3464
+ request_body = {"name": name, "static_segment": static_segment, "options": options}
3893
3465
  request_body = {k: v for k, v in request_body.items() if v is not None}
3894
3466
  url = f"{self.base_url}/lists/{list_id}/segments"
3895
3467
  query_params = {}
@@ -3897,7 +3469,7 @@ class MailchimpApp(APIApplication):
3897
3469
  response.raise_for_status()
3898
3470
  return response.json()
3899
3471
 
3900
- def lists_get_segment_info(
3472
+ async def lists_get_segment_info(
3901
3473
  self,
3902
3474
  list_id,
3903
3475
  segment_id,
@@ -3949,7 +3521,7 @@ class MailchimpApp(APIApplication):
3949
3521
  response.raise_for_status()
3950
3522
  return response.json()
3951
3523
 
3952
- def lists_delete_segment(self, list_id, segment_id) -> Any:
3524
+ async def lists_delete_segment(self, list_id, segment_id) -> Any:
3953
3525
  """
3954
3526
  Deletes a specific segment from a list by its list and segment identifiers.
3955
3527
 
@@ -3977,9 +3549,7 @@ class MailchimpApp(APIApplication):
3977
3549
  response.raise_for_status()
3978
3550
  return response.json()
3979
3551
 
3980
- def lists_update_segment_by_id(
3981
- self, list_id, segment_id, name, static_segment=None, options=None
3982
- ) -> dict[str, Any]:
3552
+ async def lists_update_segment_by_id(self, list_id, segment_id, name, static_segment=None, options=None) -> dict[str, Any]:
3983
3553
  """
3984
3554
  Updates a specific segment within a list using the provided identifiers and parameters.
3985
3555
 
@@ -4006,11 +3576,7 @@ class MailchimpApp(APIApplication):
4006
3576
  raise ValueError("Missing required parameter 'segment_id'")
4007
3577
  if name is None:
4008
3578
  raise ValueError("Missing required parameter 'name'")
4009
- request_body = {
4010
- "name": name,
4011
- "static_segment": static_segment,
4012
- "options": options,
4013
- }
3579
+ request_body = {"name": name, "static_segment": static_segment, "options": options}
4014
3580
  request_body = {k: v for k, v in request_body.items() if v is not None}
4015
3581
  url = f"{self.base_url}/lists/{list_id}/segments/{segment_id}"
4016
3582
  query_params = {}
@@ -4018,9 +3584,7 @@ class MailchimpApp(APIApplication):
4018
3584
  response.raise_for_status()
4019
3585
  return response.json()
4020
3586
 
4021
- def lists_batch_add_remove_members(
4022
- self, list_id, segment_id, members_to_add=None, members_to_remove=None
4023
- ) -> dict[str, Any]:
3587
+ async def lists_batch_add_remove_members(self, list_id, segment_id, members_to_add=None, members_to_remove=None) -> dict[str, Any]:
4024
3588
  """
4025
3589
  Adds and/or removes members in bulk to a specific segment within a given list.
4026
3590
 
@@ -4044,10 +3608,7 @@ class MailchimpApp(APIApplication):
4044
3608
  raise ValueError("Missing required parameter 'list_id'")
4045
3609
  if segment_id is None:
4046
3610
  raise ValueError("Missing required parameter 'segment_id'")
4047
- request_body = {
4048
- "members_to_add": members_to_add,
4049
- "members_to_remove": members_to_remove,
4050
- }
3611
+ request_body = {"members_to_add": members_to_add, "members_to_remove": members_to_remove}
4051
3612
  request_body = {k: v for k, v in request_body.items() if v is not None}
4052
3613
  url = f"{self.base_url}/lists/{list_id}/segments/{segment_id}"
4053
3614
  query_params = {}
@@ -4055,7 +3616,7 @@ class MailchimpApp(APIApplication):
4055
3616
  response.raise_for_status()
4056
3617
  return response.json()
4057
3618
 
4058
- def lists_get_segment_members(
3619
+ async def lists_get_segment_members(
4059
3620
  self,
4060
3621
  list_id,
4061
3622
  segment_id,
@@ -4113,9 +3674,7 @@ class MailchimpApp(APIApplication):
4113
3674
  response.raise_for_status()
4114
3675
  return response.json()
4115
3676
 
4116
- def lists_add_member_to_segment(
4117
- self, list_id, segment_id, email_address
4118
- ) -> dict[str, Any]:
3677
+ async def lists_add_member_to_segment(self, list_id, segment_id, email_address) -> dict[str, Any]:
4119
3678
  """
4120
3679
  Adds a member to a specified segment within a mailing list.
4121
3680
 
@@ -4140,9 +3699,7 @@ class MailchimpApp(APIApplication):
4140
3699
  raise ValueError("Missing required parameter 'segment_id'")
4141
3700
  if email_address is None:
4142
3701
  raise ValueError("Missing required parameter 'email_address'")
4143
- request_body = {
4144
- "email_address": email_address,
4145
- }
3702
+ request_body = {"email_address": email_address}
4146
3703
  request_body = {k: v for k, v in request_body.items() if v is not None}
4147
3704
  url = f"{self.base_url}/lists/{list_id}/segments/{segment_id}/members"
4148
3705
  query_params = {}
@@ -4150,9 +3707,7 @@ class MailchimpApp(APIApplication):
4150
3707
  response.raise_for_status()
4151
3708
  return response.json()
4152
3709
 
4153
- def lists_remove_member_from_segment(
4154
- self, list_id, segment_id, subscriber_hash
4155
- ) -> Any:
3710
+ async def lists_remove_member_from_segment(self, list_id, segment_id, subscriber_hash) -> Any:
4156
3711
  """
4157
3712
  Removes a member from a segment within a specific list.
4158
3713
 
@@ -4183,7 +3738,7 @@ class MailchimpApp(APIApplication):
4183
3738
  response.raise_for_status()
4184
3739
  return response.json()
4185
3740
 
4186
- def lists_search_tags_by_name(self, list_id, name=None) -> dict[str, Any]:
3741
+ async def lists_search_tags_by_name(self, list_id, name=None) -> dict[str, Any]:
4187
3742
  """
4188
3743
  Searches for tags within a specific list by tag name using the list's unique identifier.
4189
3744
 
@@ -4209,7 +3764,7 @@ class MailchimpApp(APIApplication):
4209
3764
  response.raise_for_status()
4210
3765
  return response.json()
4211
3766
 
4212
- def lists_get_members_info(
3767
+ async def lists_get_members_info(
4213
3768
  self,
4214
3769
  list_id,
4215
3770
  fields=None,
@@ -4298,7 +3853,7 @@ class MailchimpApp(APIApplication):
4298
3853
  response.raise_for_status()
4299
3854
  return response.json()
4300
3855
 
4301
- def lists_add_member_to_list(
3856
+ async def lists_add_member_to_list(
4302
3857
  self,
4303
3858
  list_id,
4304
3859
  email_address,
@@ -4371,18 +3926,12 @@ class MailchimpApp(APIApplication):
4371
3926
  }
4372
3927
  request_body = {k: v for k, v in request_body.items() if v is not None}
4373
3928
  url = f"{self.base_url}/lists/{list_id}/members"
4374
- query_params = {
4375
- k: v
4376
- for k, v in [("skip_merge_validation", skip_merge_validation)]
4377
- if v is not None
4378
- }
3929
+ query_params = {k: v for k, v in [("skip_merge_validation", skip_merge_validation)] if v is not None}
4379
3930
  response = self._post(url, data=request_body, params=query_params)
4380
3931
  response.raise_for_status()
4381
3932
  return response.json()
4382
3933
 
4383
- def lists_get_member_info(
4384
- self, list_id, subscriber_hash, fields=None, exclude_fields=None
4385
- ) -> dict[str, Any]:
3934
+ async def lists_get_member_info(self, list_id, subscriber_hash, fields=None, exclude_fields=None) -> dict[str, Any]:
4386
3935
  """
4387
3936
  Retrieve information about a specific list member from the Mailchimp API.
4388
3937
 
@@ -4407,16 +3956,12 @@ class MailchimpApp(APIApplication):
4407
3956
  if subscriber_hash is None:
4408
3957
  raise ValueError("Missing required parameter 'subscriber_hash'")
4409
3958
  url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}"
4410
- query_params = {
4411
- k: v
4412
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
4413
- if v is not None
4414
- }
3959
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
4415
3960
  response = self._get(url, params=query_params)
4416
3961
  response.raise_for_status()
4417
3962
  return response.json()
4418
3963
 
4419
- def lists_add_or_update_member(
3964
+ async def lists_add_or_update_member(
4420
3965
  self,
4421
3966
  list_id,
4422
3967
  subscriber_hash,
@@ -4494,16 +4039,12 @@ class MailchimpApp(APIApplication):
4494
4039
  }
4495
4040
  request_body = {k: v for k, v in request_body.items() if v is not None}
4496
4041
  url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}"
4497
- query_params = {
4498
- k: v
4499
- for k, v in [("skip_merge_validation", skip_merge_validation)]
4500
- if v is not None
4501
- }
4042
+ query_params = {k: v for k, v in [("skip_merge_validation", skip_merge_validation)] if v is not None}
4502
4043
  response = self._put(url, data=request_body, params=query_params)
4503
4044
  response.raise_for_status()
4504
4045
  return response.json()
4505
4046
 
4506
- def lists_update_member(
4047
+ async def lists_update_member(
4507
4048
  self,
4508
4049
  list_id,
4509
4050
  subscriber_hash,
@@ -4574,16 +4115,12 @@ class MailchimpApp(APIApplication):
4574
4115
  }
4575
4116
  request_body = {k: v for k, v in request_body.items() if v is not None}
4576
4117
  url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}"
4577
- query_params = {
4578
- k: v
4579
- for k, v in [("skip_merge_validation", skip_merge_validation)]
4580
- if v is not None
4581
- }
4118
+ query_params = {k: v for k, v in [("skip_merge_validation", skip_merge_validation)] if v is not None}
4582
4119
  response = self._patch(url, data=request_body, params=query_params)
4583
4120
  response.raise_for_status()
4584
4121
  return response.json()
4585
4122
 
4586
- def lists_archive_member(self, list_id, subscriber_hash) -> Any:
4123
+ async def lists_archive_member(self, list_id, subscriber_hash) -> Any:
4587
4124
  """
4588
4125
  Removes an archived member from a specified list using their unique subscriber hash.
4589
4126
 
@@ -4611,7 +4148,7 @@ class MailchimpApp(APIApplication):
4611
4148
  response.raise_for_status()
4612
4149
  return response.json()
4613
4150
 
4614
- def lists_view_recent_activity_events(
4151
+ async def lists_view_recent_activity_events(
4615
4152
  self, list_id, subscriber_hash, fields=None, exclude_fields=None, action=None
4616
4153
  ) -> dict[str, Any]:
4617
4154
  """
@@ -4639,28 +4176,13 @@ class MailchimpApp(APIApplication):
4639
4176
  if subscriber_hash is None:
4640
4177
  raise ValueError("Missing required parameter 'subscriber_hash'")
4641
4178
  url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/activity"
4642
- query_params = {
4643
- k: v
4644
- for k, v in [
4645
- ("fields", fields),
4646
- ("exclude_fields", exclude_fields),
4647
- ("action", action),
4648
- ]
4649
- if v is not None
4650
- }
4179
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("action", action)] if v is not None}
4651
4180
  response = self._get(url, params=query_params)
4652
4181
  response.raise_for_status()
4653
4182
  return response.json()
4654
4183
 
4655
- def lists_view_recent_activity(
4656
- self,
4657
- list_id,
4658
- subscriber_hash,
4659
- fields=None,
4660
- exclude_fields=None,
4661
- count=None,
4662
- offset=None,
4663
- activity_filters=None,
4184
+ async def lists_view_recent_activity(
4185
+ self, list_id, subscriber_hash, fields=None, exclude_fields=None, count=None, offset=None, activity_filters=None
4664
4186
  ) -> dict[str, Any]:
4665
4187
  """
4666
4188
  Retrieves recent activity for a specific subscriber in a mailing list.
@@ -4704,14 +4226,8 @@ class MailchimpApp(APIApplication):
4704
4226
  response.raise_for_status()
4705
4227
  return response.json()
4706
4228
 
4707
- def lists_get_member_tags(
4708
- self,
4709
- list_id,
4710
- subscriber_hash,
4711
- fields=None,
4712
- exclude_fields=None,
4713
- count=None,
4714
- offset=None,
4229
+ async def lists_get_member_tags(
4230
+ self, list_id, subscriber_hash, fields=None, exclude_fields=None, count=None, offset=None
4715
4231
  ) -> dict[str, Any]:
4716
4232
  """
4717
4233
  Retrieves a list of tags assigned to a specific list member (subscriber) with optional filtering and pagination.
@@ -4740,22 +4256,13 @@ class MailchimpApp(APIApplication):
4740
4256
  raise ValueError("Missing required parameter 'subscriber_hash'")
4741
4257
  url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/tags"
4742
4258
  query_params = {
4743
- k: v
4744
- for k, v in [
4745
- ("fields", fields),
4746
- ("exclude_fields", exclude_fields),
4747
- ("count", count),
4748
- ("offset", offset),
4749
- ]
4750
- if v is not None
4259
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
4751
4260
  }
4752
4261
  response = self._get(url, params=query_params)
4753
4262
  response.raise_for_status()
4754
4263
  return response.json()
4755
4264
 
4756
- def lists_add_member_tags(
4757
- self, list_id, subscriber_hash, tags, is_syncing=None
4758
- ) -> Any:
4265
+ async def lists_add_member_tags(self, list_id, subscriber_hash, tags, is_syncing=None) -> Any:
4759
4266
  """
4760
4267
  Adds member tags to a subscriber in a list.
4761
4268
 
@@ -4781,10 +4288,7 @@ class MailchimpApp(APIApplication):
4781
4288
  raise ValueError("Missing required parameter 'subscriber_hash'")
4782
4289
  if tags is None:
4783
4290
  raise ValueError("Missing required parameter 'tags'")
4784
- request_body = {
4785
- "tags": tags,
4786
- "is_syncing": is_syncing,
4787
- }
4291
+ request_body = {"tags": tags, "is_syncing": is_syncing}
4788
4292
  request_body = {k: v for k, v in request_body.items() if v is not None}
4789
4293
  url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/tags"
4790
4294
  query_params = {}
@@ -4792,14 +4296,8 @@ class MailchimpApp(APIApplication):
4792
4296
  response.raise_for_status()
4793
4297
  return response.json()
4794
4298
 
4795
- def lists_get_member_events(
4796
- self,
4797
- list_id,
4798
- subscriber_hash,
4799
- count=None,
4800
- offset=None,
4801
- fields=None,
4802
- exclude_fields=None,
4299
+ async def lists_get_member_events(
4300
+ self, list_id, subscriber_hash, count=None, offset=None, fields=None, exclude_fields=None
4803
4301
  ) -> dict[str, Any]:
4804
4302
  """
4805
4303
  Retrieves member events for a specific subscriber in a mailing list.
@@ -4827,28 +4325,13 @@ class MailchimpApp(APIApplication):
4827
4325
  raise ValueError("Missing required parameter 'subscriber_hash'")
4828
4326
  url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/events"
4829
4327
  query_params = {
4830
- k: v
4831
- for k, v in [
4832
- ("count", count),
4833
- ("offset", offset),
4834
- ("fields", fields),
4835
- ("exclude_fields", exclude_fields),
4836
- ]
4837
- if v is not None
4328
+ k: v for k, v in [("count", count), ("offset", offset), ("fields", fields), ("exclude_fields", exclude_fields)] if v is not None
4838
4329
  }
4839
4330
  response = self._get(url, params=query_params)
4840
4331
  response.raise_for_status()
4841
4332
  return response.json()
4842
4333
 
4843
- def lists_add_member_event(
4844
- self,
4845
- list_id,
4846
- subscriber_hash,
4847
- name,
4848
- properties=None,
4849
- is_syncing=None,
4850
- occurred_at=None,
4851
- ) -> Any:
4334
+ async def lists_add_member_event(self, list_id, subscriber_hash, name, properties=None, is_syncing=None, occurred_at=None) -> Any:
4852
4335
  """
4853
4336
  Adds a new event for a specific list member by sending a POST request with event details to the API.
4854
4337
 
@@ -4876,12 +4359,7 @@ class MailchimpApp(APIApplication):
4876
4359
  raise ValueError("Missing required parameter 'subscriber_hash'")
4877
4360
  if name is None:
4878
4361
  raise ValueError("Missing required parameter 'name'")
4879
- request_body = {
4880
- "name": name,
4881
- "properties": properties,
4882
- "is_syncing": is_syncing,
4883
- "occurred_at": occurred_at,
4884
- }
4362
+ request_body = {"name": name, "properties": properties, "is_syncing": is_syncing, "occurred_at": occurred_at}
4885
4363
  request_body = {k: v for k, v in request_body.items() if v is not None}
4886
4364
  url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/events"
4887
4365
  query_params = {}
@@ -4889,9 +4367,7 @@ class MailchimpApp(APIApplication):
4889
4367
  response.raise_for_status()
4890
4368
  return response.json()
4891
4369
 
4892
- def lists_get_member_goals(
4893
- self, list_id, subscriber_hash, fields=None, exclude_fields=None
4894
- ) -> dict[str, Any]:
4370
+ async def lists_get_member_goals(self, list_id, subscriber_hash, fields=None, exclude_fields=None) -> dict[str, Any]:
4895
4371
  """
4896
4372
  Retrieves the goal information for a specific list member in Mailchimp.
4897
4373
 
@@ -4916,25 +4392,13 @@ class MailchimpApp(APIApplication):
4916
4392
  if subscriber_hash is None:
4917
4393
  raise ValueError("Missing required parameter 'subscriber_hash'")
4918
4394
  url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/goals"
4919
- query_params = {
4920
- k: v
4921
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
4922
- if v is not None
4923
- }
4395
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
4924
4396
  response = self._get(url, params=query_params)
4925
4397
  response.raise_for_status()
4926
4398
  return response.json()
4927
4399
 
4928
- def lists_get_member_notes(
4929
- self,
4930
- list_id,
4931
- subscriber_hash,
4932
- sort_field=None,
4933
- sort_dir=None,
4934
- fields=None,
4935
- exclude_fields=None,
4936
- count=None,
4937
- offset=None,
4400
+ async def lists_get_member_notes(
4401
+ self, list_id, subscriber_hash, sort_field=None, sort_dir=None, fields=None, exclude_fields=None, count=None, offset=None
4938
4402
  ) -> dict[str, Any]:
4939
4403
  """
4940
4404
  Retrieves notes associated with a specific list member, with optional filtering, sorting, and pagination.
@@ -4980,9 +4444,7 @@ class MailchimpApp(APIApplication):
4980
4444
  response.raise_for_status()
4981
4445
  return response.json()
4982
4446
 
4983
- def lists_add_member_note(
4984
- self, list_id, subscriber_hash, request_body=None
4985
- ) -> dict[str, Any]:
4447
+ async def lists_add_member_note(self, list_id, subscriber_hash, request_body=None) -> dict[str, Any]:
4986
4448
  """
4987
4449
  Adds a note to a member of a mailing list.
4988
4450
 
@@ -5011,9 +4473,7 @@ class MailchimpApp(APIApplication):
5011
4473
  response.raise_for_status()
5012
4474
  return response.json()
5013
4475
 
5014
- def lists_get_member_note(
5015
- self, list_id, subscriber_hash, note_id, fields=None, exclude_fields=None
5016
- ) -> dict[str, Any]:
4476
+ async def lists_get_member_note(self, list_id, subscriber_hash, note_id, fields=None, exclude_fields=None) -> dict[str, Any]:
5017
4477
  """
5018
4478
  Retrieve a specific note associated with a list member from the remote API.
5019
4479
 
@@ -5040,21 +4500,13 @@ class MailchimpApp(APIApplication):
5040
4500
  raise ValueError("Missing required parameter 'subscriber_hash'")
5041
4501
  if note_id is None:
5042
4502
  raise ValueError("Missing required parameter 'note_id'")
5043
- url = (
5044
- f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}"
5045
- )
5046
- query_params = {
5047
- k: v
5048
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
5049
- if v is not None
5050
- }
4503
+ url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}"
4504
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
5051
4505
  response = self._get(url, params=query_params)
5052
4506
  response.raise_for_status()
5053
4507
  return response.json()
5054
4508
 
5055
- def lists_update_note_specific_list_member(
5056
- self, list_id, subscriber_hash, note_id, request_body=None
5057
- ) -> dict[str, Any]:
4509
+ async def lists_update_note_specific_list_member(self, list_id, subscriber_hash, note_id, request_body=None) -> dict[str, Any]:
5058
4510
  """
5059
4511
  Updates a specific note for a list member in the email marketing platform.
5060
4512
 
@@ -5080,15 +4532,13 @@ class MailchimpApp(APIApplication):
5080
4532
  raise ValueError("Missing required parameter 'subscriber_hash'")
5081
4533
  if note_id is None:
5082
4534
  raise ValueError("Missing required parameter 'note_id'")
5083
- url = (
5084
- f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}"
5085
- )
4535
+ url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}"
5086
4536
  query_params = {}
5087
4537
  response = self._patch(url, data=request_body, params=query_params)
5088
4538
  response.raise_for_status()
5089
4539
  return response.json()
5090
4540
 
5091
- def lists_delete_note(self, list_id, subscriber_hash, note_id) -> Any:
4541
+ async def lists_delete_note(self, list_id, subscriber_hash, note_id) -> Any:
5092
4542
  """
5093
4543
  Deletes a note associated with a specific subscriber in a list.
5094
4544
 
@@ -5113,15 +4563,13 @@ class MailchimpApp(APIApplication):
5113
4563
  raise ValueError("Missing required parameter 'subscriber_hash'")
5114
4564
  if note_id is None:
5115
4565
  raise ValueError("Missing required parameter 'note_id'")
5116
- url = (
5117
- f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}"
5118
- )
4566
+ url = f"{self.base_url}/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}"
5119
4567
  query_params = {}
5120
4568
  response = self._delete(url, params=query_params)
5121
4569
  response.raise_for_status()
5122
4570
  return response.json()
5123
4571
 
5124
- def lists_remove_member_permanent(self, list_id, subscriber_hash) -> Any:
4572
+ async def lists_remove_member_permanent(self, list_id, subscriber_hash) -> Any:
5125
4573
  """
5126
4574
  Permanently removes a member from a mailing list using their subscriber hash.
5127
4575
 
@@ -5149,15 +4597,8 @@ class MailchimpApp(APIApplication):
5149
4597
  response.raise_for_status()
5150
4598
  return response.json()
5151
4599
 
5152
- def lists_list_merge_fields(
5153
- self,
5154
- list_id,
5155
- fields=None,
5156
- exclude_fields=None,
5157
- count=None,
5158
- offset=None,
5159
- type=None,
5160
- required=None,
4600
+ async def lists_list_merge_fields(
4601
+ self, list_id, fields=None, exclude_fields=None, count=None, offset=None, type=None, required=None
5161
4602
  ) -> dict[str, Any]:
5162
4603
  """
5163
4604
  Retrieves the list merge fields for a specified list, with optional filtering and pagination parameters.
@@ -5200,7 +4641,7 @@ class MailchimpApp(APIApplication):
5200
4641
  response.raise_for_status()
5201
4642
  return response.json()
5202
4643
 
5203
- def lists_add_merge_field(
4644
+ async def lists_add_merge_field(
5204
4645
  self,
5205
4646
  list_id,
5206
4647
  name,
@@ -5261,9 +4702,7 @@ class MailchimpApp(APIApplication):
5261
4702
  response.raise_for_status()
5262
4703
  return response.json()
5263
4704
 
5264
- def lists_get_merge_field_info(
5265
- self, list_id, merge_id, exclude_fields=None, fields=None
5266
- ) -> dict[str, Any]:
4705
+ async def lists_get_merge_field_info(self, list_id, merge_id, exclude_fields=None, fields=None) -> dict[str, Any]:
5267
4706
  """
5268
4707
  Retrieves detailed information about a specific merge field within a list, allowing optional filtering of returned fields.
5269
4708
 
@@ -5288,16 +4727,12 @@ class MailchimpApp(APIApplication):
5288
4727
  if merge_id is None:
5289
4728
  raise ValueError("Missing required parameter 'merge_id'")
5290
4729
  url = f"{self.base_url}/lists/{list_id}/merge-fields/{merge_id}"
5291
- query_params = {
5292
- k: v
5293
- for k, v in [("exclude_fields", exclude_fields), ("fields", fields)]
5294
- if v is not None
5295
- }
4730
+ query_params = {k: v for k, v in [("exclude_fields", exclude_fields), ("fields", fields)] if v is not None}
5296
4731
  response = self._get(url, params=query_params)
5297
4732
  response.raise_for_status()
5298
4733
  return response.json()
5299
4734
 
5300
- def lists_update_merge_field(
4735
+ async def lists_update_merge_field(
5301
4736
  self,
5302
4737
  list_id,
5303
4738
  merge_id,
@@ -5358,7 +4793,7 @@ class MailchimpApp(APIApplication):
5358
4793
  response.raise_for_status()
5359
4794
  return response.json()
5360
4795
 
5361
- def lists_delete_merge_field(self, list_id, merge_id) -> Any:
4796
+ async def lists_delete_merge_field(self, list_id, merge_id) -> Any:
5362
4797
  """
5363
4798
  Deletes a merge field from a specified list by its merge field ID.
5364
4799
 
@@ -5386,7 +4821,7 @@ class MailchimpApp(APIApplication):
5386
4821
  response.raise_for_status()
5387
4822
  return response.json()
5388
4823
 
5389
- def lists_get_webhooks_info(self, list_id) -> dict[str, Any]:
4824
+ async def lists_get_webhooks_info(self, list_id) -> dict[str, Any]:
5390
4825
  """
5391
4826
  Retrieves webhook information for the specified list.
5392
4827
 
@@ -5411,7 +4846,7 @@ class MailchimpApp(APIApplication):
5411
4846
  response.raise_for_status()
5412
4847
  return response.json()
5413
4848
 
5414
- def lists_create_webhook(self, list_id, request_body=None) -> dict[str, Any]:
4849
+ async def lists_create_webhook(self, list_id, request_body=None) -> dict[str, Any]:
5415
4850
  """
5416
4851
  Creates a new webhook for the specified list by sending a POST request to the API.
5417
4852
 
@@ -5437,7 +4872,7 @@ class MailchimpApp(APIApplication):
5437
4872
  response.raise_for_status()
5438
4873
  return response.json()
5439
4874
 
5440
- def lists_get_webhook_info(self, list_id, webhook_id) -> dict[str, Any]:
4875
+ async def lists_get_webhook_info(self, list_id, webhook_id) -> dict[str, Any]:
5441
4876
  """
5442
4877
  Retrieves detailed information about a specific webhook for a given list.
5443
4878
 
@@ -5465,7 +4900,7 @@ class MailchimpApp(APIApplication):
5465
4900
  response.raise_for_status()
5466
4901
  return response.json()
5467
4902
 
5468
- def lists_delete_webhook(self, list_id, webhook_id) -> Any:
4903
+ async def lists_delete_webhook(self, list_id, webhook_id) -> Any:
5469
4904
  """
5470
4905
  Deletes a webhook from a specified list.
5471
4906
 
@@ -5493,9 +4928,7 @@ class MailchimpApp(APIApplication):
5493
4928
  response.raise_for_status()
5494
4929
  return response.json()
5495
4930
 
5496
- def lists_update_webhook_settings(
5497
- self, list_id, webhook_id, request_body=None
5498
- ) -> dict[str, Any]:
4931
+ async def lists_update_webhook_settings(self, list_id, webhook_id, request_body=None) -> dict[str, Any]:
5499
4932
  """
5500
4933
  Updates the settings of a specific webhook associated with a list.
5501
4934
 
@@ -5524,7 +4957,7 @@ class MailchimpApp(APIApplication):
5524
4957
  response.raise_for_status()
5525
4958
  return response.json()
5526
4959
 
5527
- def lists_get_signup_forms(self, list_id) -> dict[str, Any]:
4960
+ async def lists_get_signup_forms(self, list_id) -> dict[str, Any]:
5528
4961
  """
5529
4962
  Retrieves the signup forms associated with a specific list by its unique identifier.
5530
4963
 
@@ -5549,9 +4982,7 @@ class MailchimpApp(APIApplication):
5549
4982
  response.raise_for_status()
5550
4983
  return response.json()
5551
4984
 
5552
- def lists_customize_signup_form(
5553
- self, list_id, header=None, contents=None, styles=None
5554
- ) -> dict[str, Any]:
4985
+ async def lists_customize_signup_form(self, list_id, header=None, contents=None, styles=None) -> dict[str, Any]:
5555
4986
  """
5556
4987
  Customizes the signup form of a specific list by updating its header, contents, or styles via an API call.
5557
4988
 
@@ -5573,11 +5004,7 @@ class MailchimpApp(APIApplication):
5573
5004
  """
5574
5005
  if list_id is None:
5575
5006
  raise ValueError("Missing required parameter 'list_id'")
5576
- request_body = {
5577
- "header": header,
5578
- "contents": contents,
5579
- "styles": styles,
5580
- }
5007
+ request_body = {"header": header, "contents": contents, "styles": styles}
5581
5008
  request_body = {k: v for k, v in request_body.items() if v is not None}
5582
5009
  url = f"{self.base_url}/lists/{list_id}/signup-forms"
5583
5010
  query_params = {}
@@ -5585,9 +5012,7 @@ class MailchimpApp(APIApplication):
5585
5012
  response.raise_for_status()
5586
5013
  return response.json()
5587
5014
 
5588
- def lists_get_locations(
5589
- self, list_id, fields=None, exclude_fields=None
5590
- ) -> dict[str, Any]:
5015
+ async def lists_get_locations(self, list_id, fields=None, exclude_fields=None) -> dict[str, Any]:
5591
5016
  """
5592
5017
  Retrieves the locations associated with a specific list, optionally filtering the returned fields.
5593
5018
 
@@ -5609,16 +5034,12 @@ class MailchimpApp(APIApplication):
5609
5034
  if list_id is None:
5610
5035
  raise ValueError("Missing required parameter 'list_id'")
5611
5036
  url = f"{self.base_url}/lists/{list_id}/locations"
5612
- query_params = {
5613
- k: v
5614
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
5615
- if v is not None
5616
- }
5037
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
5617
5038
  response = self._get(url, params=query_params)
5618
5039
  response.raise_for_status()
5619
5040
  return response.json()
5620
5041
 
5621
- def lists_get_surveys_info(self, list_id) -> Any:
5042
+ async def lists_get_surveys_info(self, list_id) -> Any:
5622
5043
  """
5623
5044
  Retrieves survey information associated with a specific list ID.
5624
5045
 
@@ -5643,7 +5064,7 @@ class MailchimpApp(APIApplication):
5643
5064
  response.raise_for_status()
5644
5065
  return response.json()
5645
5066
 
5646
- def lists_get_survey_details(self, list_id, survey_id) -> Any:
5067
+ async def lists_get_survey_details(self, list_id, survey_id) -> Any:
5647
5068
  """
5648
5069
  Retrieves the details of a specific survey associated with a given list by making an HTTP GET request.
5649
5070
 
@@ -5671,7 +5092,7 @@ class MailchimpApp(APIApplication):
5671
5092
  response.raise_for_status()
5672
5093
  return response.json()
5673
5094
 
5674
- def surveys_publish_survey_action(self, list_id, survey_id) -> Any:
5095
+ async def surveys_publish_survey_action(self, list_id, survey_id) -> Any:
5675
5096
  """
5676
5097
  Publishes a specified survey for a given list by sending a publish action request.
5677
5098
 
@@ -5699,7 +5120,7 @@ class MailchimpApp(APIApplication):
5699
5120
  response.raise_for_status()
5700
5121
  return response.json()
5701
5122
 
5702
- def surveys_unpublish_survey_action(self, list_id, survey_id) -> Any:
5123
+ async def surveys_unpublish_survey_action(self, list_id, survey_id) -> Any:
5703
5124
  """
5704
5125
  Unpublishes a survey for a specific mailing list.
5705
5126
 
@@ -5727,7 +5148,7 @@ class MailchimpApp(APIApplication):
5727
5148
  response.raise_for_status()
5728
5149
  return response.json()
5729
5150
 
5730
- def surveys_generate_campaign(self, list_id, survey_id) -> dict[str, Any]:
5151
+ async def surveys_generate_campaign(self, list_id, survey_id) -> dict[str, Any]:
5731
5152
  """
5732
5153
  Creates an email campaign for a specific survey and list by triggering the appropriate API action.
5733
5154
 
@@ -5749,22 +5170,13 @@ class MailchimpApp(APIApplication):
5749
5170
  raise ValueError("Missing required parameter 'list_id'")
5750
5171
  if survey_id is None:
5751
5172
  raise ValueError("Missing required parameter 'survey_id'")
5752
- url = (
5753
- f"{self.base_url}/lists/{list_id}/surveys/{survey_id}/actions/create-email"
5754
- )
5173
+ url = f"{self.base_url}/lists/{list_id}/surveys/{survey_id}/actions/create-email"
5755
5174
  query_params = {}
5756
5175
  response = self._post(url, data={}, params=query_params)
5757
5176
  response.raise_for_status()
5758
5177
  return response.json()
5759
5178
 
5760
- def landing_pages_list(
5761
- self,
5762
- sort_dir=None,
5763
- sort_field=None,
5764
- fields=None,
5765
- exclude_fields=None,
5766
- count=None,
5767
- ) -> dict[str, Any]:
5179
+ async def landing_pages_list(self, sort_dir=None, sort_field=None, fields=None, exclude_fields=None, count=None) -> dict[str, Any]:
5768
5180
  """
5769
5181
  Retrieves a list of landing pages from the API, supporting sorting, field selection, and result count customization.
5770
5182
 
@@ -5800,7 +5212,7 @@ class MailchimpApp(APIApplication):
5800
5212
  response.raise_for_status()
5801
5213
  return response.json()
5802
5214
 
5803
- def landing_pages_create_new_mailchimp_landing_page(
5215
+ async def landing_pages_create_new_mailchimp_landing_page(
5804
5216
  self,
5805
5217
  use_default_list=None,
5806
5218
  title=None,
@@ -5847,16 +5259,12 @@ class MailchimpApp(APIApplication):
5847
5259
  }
5848
5260
  request_body = {k: v for k, v in request_body.items() if v is not None}
5849
5261
  url = f"{self.base_url}/landing-pages"
5850
- query_params = {
5851
- k: v for k, v in [("use_default_list", use_default_list)] if v is not None
5852
- }
5262
+ query_params = {k: v for k, v in [("use_default_list", use_default_list)] if v is not None}
5853
5263
  response = self._post(url, data=request_body, params=query_params)
5854
5264
  response.raise_for_status()
5855
5265
  return response.json()
5856
5266
 
5857
- def landing_pages_get_page_info(
5858
- self, page_id, fields=None, exclude_fields=None
5859
- ) -> dict[str, Any]:
5267
+ async def landing_pages_get_page_info(self, page_id, fields=None, exclude_fields=None) -> dict[str, Any]:
5860
5268
  """
5861
5269
  Retrieves information about a specific landing page.
5862
5270
 
@@ -5878,24 +5286,13 @@ class MailchimpApp(APIApplication):
5878
5286
  if page_id is None:
5879
5287
  raise ValueError("Missing required parameter 'page_id'")
5880
5288
  url = f"{self.base_url}/landing-pages/{page_id}"
5881
- query_params = {
5882
- k: v
5883
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
5884
- if v is not None
5885
- }
5289
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
5886
5290
  response = self._get(url, params=query_params)
5887
5291
  response.raise_for_status()
5888
5292
  return response.json()
5889
5293
 
5890
- def landing_pages_update_page_by_id(
5891
- self,
5892
- page_id,
5893
- title=None,
5894
- description=None,
5895
- name=None,
5896
- store_id=None,
5897
- list_id=None,
5898
- tracking=None,
5294
+ async def landing_pages_update_page_by_id(
5295
+ self, page_id, title=None, description=None, name=None, store_id=None, list_id=None, tracking=None
5899
5296
  ) -> dict[str, Any]:
5900
5297
  """
5901
5298
  Updates the details of a landing page identified by its unique ID.
@@ -5936,7 +5333,7 @@ class MailchimpApp(APIApplication):
5936
5333
  response.raise_for_status()
5937
5334
  return response.json()
5938
5335
 
5939
- def landing_pages_delete_page(self, page_id) -> Any:
5336
+ async def landing_pages_delete_page(self, page_id) -> Any:
5940
5337
  """
5941
5338
  Deletes a landing page resource identified by the given page ID.
5942
5339
 
@@ -5961,7 +5358,7 @@ class MailchimpApp(APIApplication):
5961
5358
  response.raise_for_status()
5962
5359
  return response.json()
5963
5360
 
5964
- def landing_pages_publish_action(self, page_id) -> Any:
5361
+ async def landing_pages_publish_action(self, page_id) -> Any:
5965
5362
  """
5966
5363
  Publishes a landing page by sending a POST request to the publish action endpoint for the specified page ID.
5967
5364
 
@@ -5986,7 +5383,7 @@ class MailchimpApp(APIApplication):
5986
5383
  response.raise_for_status()
5987
5384
  return response.json()
5988
5385
 
5989
- def landing_pages_unpublish_action(self, page_id) -> Any:
5386
+ async def landing_pages_unpublish_action(self, page_id) -> Any:
5990
5387
  """
5991
5388
  Unpublishes a landing page by sending a POST request to the corresponding unpublish action endpoint.
5992
5389
 
@@ -6011,9 +5408,7 @@ class MailchimpApp(APIApplication):
6011
5408
  response.raise_for_status()
6012
5409
  return response.json()
6013
5410
 
6014
- def landing_pages_get_content(
6015
- self, page_id, fields=None, exclude_fields=None
6016
- ) -> dict[str, Any]:
5411
+ async def landing_pages_get_content(self, page_id, fields=None, exclude_fields=None) -> dict[str, Any]:
6017
5412
  """
6018
5413
  Fetches the content of a specified landing page, allowing optional filtering of fields to include or exclude.
6019
5414
 
@@ -6035,24 +5430,13 @@ class MailchimpApp(APIApplication):
6035
5430
  if page_id is None:
6036
5431
  raise ValueError("Missing required parameter 'page_id'")
6037
5432
  url = f"{self.base_url}/landing-pages/{page_id}/content"
6038
- query_params = {
6039
- k: v
6040
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6041
- if v is not None
6042
- }
5433
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6043
5434
  response = self._get(url, params=query_params)
6044
5435
  response.raise_for_status()
6045
5436
  return response.json()
6046
5437
 
6047
- def reports_list_campaign_reports(
6048
- self,
6049
- fields=None,
6050
- exclude_fields=None,
6051
- count=None,
6052
- offset=None,
6053
- type=None,
6054
- before_send_time=None,
6055
- since_send_time=None,
5438
+ async def reports_list_campaign_reports(
5439
+ self, fields=None, exclude_fields=None, count=None, offset=None, type=None, before_send_time=None, since_send_time=None
6056
5440
  ) -> dict[str, Any]:
6057
5441
  """
6058
5442
  Retrieves a list of campaign report summaries with optional filtering and pagination.
@@ -6093,9 +5477,7 @@ class MailchimpApp(APIApplication):
6093
5477
  response.raise_for_status()
6094
5478
  return response.json()
6095
5479
 
6096
- def reports_specific_campaign_report(
6097
- self, campaign_id, fields=None, exclude_fields=None
6098
- ) -> dict[str, Any]:
5480
+ async def reports_specific_campaign_report(self, campaign_id, fields=None, exclude_fields=None) -> dict[str, Any]:
6099
5481
  """
6100
5482
  Retrieves a specific campaign report with optional field filtering.
6101
5483
 
@@ -6117,18 +5499,12 @@ class MailchimpApp(APIApplication):
6117
5499
  if campaign_id is None:
6118
5500
  raise ValueError("Missing required parameter 'campaign_id'")
6119
5501
  url = f"{self.base_url}/reports/{campaign_id}"
6120
- query_params = {
6121
- k: v
6122
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6123
- if v is not None
6124
- }
5502
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6125
5503
  response = self._get(url, params=query_params)
6126
5504
  response.raise_for_status()
6127
5505
  return response.json()
6128
5506
 
6129
- def reports_list_abuse_reports(
6130
- self, campaign_id, fields=None, exclude_fields=None
6131
- ) -> dict[str, Any]:
5507
+ async def reports_list_abuse_reports(self, campaign_id, fields=None, exclude_fields=None) -> dict[str, Any]:
6132
5508
  """
6133
5509
  Retrieves the list of abuse reports for a specified email campaign.
6134
5510
 
@@ -6150,18 +5526,12 @@ class MailchimpApp(APIApplication):
6150
5526
  if campaign_id is None:
6151
5527
  raise ValueError("Missing required parameter 'campaign_id'")
6152
5528
  url = f"{self.base_url}/reports/{campaign_id}/abuse-reports"
6153
- query_params = {
6154
- k: v
6155
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6156
- if v is not None
6157
- }
5529
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6158
5530
  response = self._get(url, params=query_params)
6159
5531
  response.raise_for_status()
6160
5532
  return response.json()
6161
5533
 
6162
- def reports_get_abuse_report(
6163
- self, campaign_id, report_id, fields=None, exclude_fields=None
6164
- ) -> dict[str, Any]:
5534
+ async def reports_get_abuse_report(self, campaign_id, report_id, fields=None, exclude_fields=None) -> dict[str, Any]:
6165
5535
  """
6166
5536
  Retrieve detailed information about a specific abuse report for a given campaign.
6167
5537
 
@@ -6186,18 +5556,12 @@ class MailchimpApp(APIApplication):
6186
5556
  if report_id is None:
6187
5557
  raise ValueError("Missing required parameter 'report_id'")
6188
5558
  url = f"{self.base_url}/reports/{campaign_id}/abuse-reports/{report_id}"
6189
- query_params = {
6190
- k: v
6191
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6192
- if v is not None
6193
- }
5559
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6194
5560
  response = self._get(url, params=query_params)
6195
5561
  response.raise_for_status()
6196
5562
  return response.json()
6197
5563
 
6198
- def reports_list_campaign_feedback(
6199
- self, campaign_id, fields=None, exclude_fields=None
6200
- ) -> dict[str, Any]:
5564
+ async def reports_list_campaign_feedback(self, campaign_id, fields=None, exclude_fields=None) -> dict[str, Any]:
6201
5565
  """
6202
5566
  Retrieves campaign feedback advice for a specified campaign report.
6203
5567
 
@@ -6219,24 +5583,13 @@ class MailchimpApp(APIApplication):
6219
5583
  if campaign_id is None:
6220
5584
  raise ValueError("Missing required parameter 'campaign_id'")
6221
5585
  url = f"{self.base_url}/reports/{campaign_id}/advice"
6222
- query_params = {
6223
- k: v
6224
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6225
- if v is not None
6226
- }
5586
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6227
5587
  response = self._get(url, params=query_params)
6228
5588
  response.raise_for_status()
6229
5589
  return response.json()
6230
5590
 
6231
- def reports_get_campaign_click_details(
6232
- self,
6233
- campaign_id,
6234
- fields=None,
6235
- exclude_fields=None,
6236
- count=None,
6237
- offset=None,
6238
- sort_field=None,
6239
- sort_dir=None,
5591
+ async def reports_get_campaign_click_details(
5592
+ self, campaign_id, fields=None, exclude_fields=None, count=None, offset=None, sort_field=None, sort_dir=None
6240
5593
  ) -> dict[str, Any]:
6241
5594
  """
6242
5595
  Retrieves detailed click activity for a specific campaign report.
@@ -6279,9 +5632,7 @@ class MailchimpApp(APIApplication):
6279
5632
  response.raise_for_status()
6280
5633
  return response.json()
6281
5634
 
6282
- def reports_specific_link_details(
6283
- self, campaign_id, link_id, fields=None, exclude_fields=None
6284
- ) -> dict[str, Any]:
5635
+ async def reports_specific_link_details(self, campaign_id, link_id, fields=None, exclude_fields=None) -> dict[str, Any]:
6285
5636
  """
6286
5637
  Retrieves detailed information about a specific link for a campaign.
6287
5638
 
@@ -6306,23 +5657,13 @@ class MailchimpApp(APIApplication):
6306
5657
  if link_id is None:
6307
5658
  raise ValueError("Missing required parameter 'link_id'")
6308
5659
  url = f"{self.base_url}/reports/{campaign_id}/click-details/{link_id}"
6309
- query_params = {
6310
- k: v
6311
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6312
- if v is not None
6313
- }
5660
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6314
5661
  response = self._get(url, params=query_params)
6315
5662
  response.raise_for_status()
6316
5663
  return response.json()
6317
5664
 
6318
- def reports_list_clicked_link_subscribers(
6319
- self,
6320
- campaign_id,
6321
- link_id,
6322
- fields=None,
6323
- exclude_fields=None,
6324
- count=None,
6325
- offset=None,
5665
+ async def reports_list_clicked_link_subscribers(
5666
+ self, campaign_id, link_id, fields=None, exclude_fields=None, count=None, offset=None
6326
5667
  ) -> dict[str, Any]:
6327
5668
  """
6328
5669
  Retrieves a list of subscribers who clicked a specific link in a campaign.
@@ -6351,20 +5692,13 @@ class MailchimpApp(APIApplication):
6351
5692
  raise ValueError("Missing required parameter 'link_id'")
6352
5693
  url = f"{self.base_url}/reports/{campaign_id}/click-details/{link_id}/members"
6353
5694
  query_params = {
6354
- k: v
6355
- for k, v in [
6356
- ("fields", fields),
6357
- ("exclude_fields", exclude_fields),
6358
- ("count", count),
6359
- ("offset", offset),
6360
- ]
6361
- if v is not None
5695
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
6362
5696
  }
6363
5697
  response = self._get(url, params=query_params)
6364
5698
  response.raise_for_status()
6365
5699
  return response.json()
6366
5700
 
6367
- def reports_specific_link_subscriber(
5701
+ async def reports_specific_link_subscriber(
6368
5702
  self, campaign_id, link_id, subscriber_hash, fields=None, exclude_fields=None
6369
5703
  ) -> dict[str, Any]:
6370
5704
  """
@@ -6394,25 +5728,13 @@ class MailchimpApp(APIApplication):
6394
5728
  if subscriber_hash is None:
6395
5729
  raise ValueError("Missing required parameter 'subscriber_hash'")
6396
5730
  url = f"{self.base_url}/reports/{campaign_id}/click-details/{link_id}/members/{subscriber_hash}"
6397
- query_params = {
6398
- k: v
6399
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6400
- if v is not None
6401
- }
5731
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6402
5732
  response = self._get(url, params=query_params)
6403
5733
  response.raise_for_status()
6404
5734
  return response.json()
6405
5735
 
6406
- def reports_list_campaign_open_details(
6407
- self,
6408
- campaign_id,
6409
- fields=None,
6410
- exclude_fields=None,
6411
- count=None,
6412
- offset=None,
6413
- since=None,
6414
- sort_field=None,
6415
- sort_dir=None,
5736
+ async def reports_list_campaign_open_details(
5737
+ self, campaign_id, fields=None, exclude_fields=None, count=None, offset=None, since=None, sort_field=None, sort_dir=None
6416
5738
  ) -> dict[str, Any]:
6417
5739
  """
6418
5740
  Retrieves detailed open reports for a specific email campaign, with optional filtering, sorting, and pagination.
@@ -6457,9 +5779,7 @@ class MailchimpApp(APIApplication):
6457
5779
  response.raise_for_status()
6458
5780
  return response.json()
6459
5781
 
6460
- def reports_open_subscriber_details(
6461
- self, campaign_id, subscriber_hash, fields=None, exclude_fields=None
6462
- ) -> dict[str, Any]:
5782
+ async def reports_open_subscriber_details(self, campaign_id, subscriber_hash, fields=None, exclude_fields=None) -> dict[str, Any]:
6463
5783
  """
6464
5784
  Retrieves detailed open report information for a specific subscriber in a given campaign.
6465
5785
 
@@ -6484,18 +5804,12 @@ class MailchimpApp(APIApplication):
6484
5804
  if subscriber_hash is None:
6485
5805
  raise ValueError("Missing required parameter 'subscriber_hash'")
6486
5806
  url = f"{self.base_url}/reports/{campaign_id}/open-details/{subscriber_hash}"
6487
- query_params = {
6488
- k: v
6489
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6490
- if v is not None
6491
- }
5807
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6492
5808
  response = self._get(url, params=query_params)
6493
5809
  response.raise_for_status()
6494
5810
  return response.json()
6495
5811
 
6496
- def reports_list_domain_performance_stats(
6497
- self, campaign_id, fields=None, exclude_fields=None
6498
- ) -> dict[str, Any]:
5812
+ async def reports_list_domain_performance_stats(self, campaign_id, fields=None, exclude_fields=None) -> dict[str, Any]:
6499
5813
  """
6500
5814
  Retrieves domain performance statistics for a specific campaign, with optional field filtering.
6501
5815
 
@@ -6517,18 +5831,12 @@ class MailchimpApp(APIApplication):
6517
5831
  if campaign_id is None:
6518
5832
  raise ValueError("Missing required parameter 'campaign_id'")
6519
5833
  url = f"{self.base_url}/reports/{campaign_id}/domain-performance"
6520
- query_params = {
6521
- k: v
6522
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6523
- if v is not None
6524
- }
5834
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6525
5835
  response = self._get(url, params=query_params)
6526
5836
  response.raise_for_status()
6527
5837
  return response.json()
6528
5838
 
6529
- def reports_list_eepurl_activity(
6530
- self, campaign_id, fields=None, exclude_fields=None
6531
- ) -> dict[str, Any]:
5839
+ async def reports_list_eepurl_activity(self, campaign_id, fields=None, exclude_fields=None) -> dict[str, Any]:
6532
5840
  """
6533
5841
  Retrieves EepURL activity details for a specified campaign report.
6534
5842
 
@@ -6550,23 +5858,13 @@ class MailchimpApp(APIApplication):
6550
5858
  if campaign_id is None:
6551
5859
  raise ValueError("Missing required parameter 'campaign_id'")
6552
5860
  url = f"{self.base_url}/reports/{campaign_id}/eepurl"
6553
- query_params = {
6554
- k: v
6555
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6556
- if v is not None
6557
- }
5861
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6558
5862
  response = self._get(url, params=query_params)
6559
5863
  response.raise_for_status()
6560
5864
  return response.json()
6561
5865
 
6562
- def reports_list_email_activity(
6563
- self,
6564
- campaign_id,
6565
- fields=None,
6566
- exclude_fields=None,
6567
- count=None,
6568
- offset=None,
6569
- since=None,
5866
+ async def reports_list_email_activity(
5867
+ self, campaign_id, fields=None, exclude_fields=None, count=None, offset=None, since=None
6570
5868
  ) -> dict[str, Any]:
6571
5869
  """
6572
5870
  Retrieves the email activity report for a specific campaign, with optional filtering and field selection.
@@ -6594,20 +5892,14 @@ class MailchimpApp(APIApplication):
6594
5892
  url = f"{self.base_url}/reports/{campaign_id}/email-activity"
6595
5893
  query_params = {
6596
5894
  k: v
6597
- for k, v in [
6598
- ("fields", fields),
6599
- ("exclude_fields", exclude_fields),
6600
- ("count", count),
6601
- ("offset", offset),
6602
- ("since", since),
6603
- ]
5895
+ for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset), ("since", since)]
6604
5896
  if v is not None
6605
5897
  }
6606
5898
  response = self._get(url, params=query_params)
6607
5899
  response.raise_for_status()
6608
5900
  return response.json()
6609
5901
 
6610
- def reports_get_subscriber_activity(
5902
+ async def reports_get_subscriber_activity(
6611
5903
  self, campaign_id, subscriber_hash, fields=None, exclude_fields=None, since=None
6612
5904
  ) -> dict[str, Any]:
6613
5905
  """
@@ -6635,20 +5927,12 @@ class MailchimpApp(APIApplication):
6635
5927
  if subscriber_hash is None:
6636
5928
  raise ValueError("Missing required parameter 'subscriber_hash'")
6637
5929
  url = f"{self.base_url}/reports/{campaign_id}/email-activity/{subscriber_hash}"
6638
- query_params = {
6639
- k: v
6640
- for k, v in [
6641
- ("fields", fields),
6642
- ("exclude_fields", exclude_fields),
6643
- ("since", since),
6644
- ]
6645
- if v is not None
6646
- }
5930
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("since", since)] if v is not None}
6647
5931
  response = self._get(url, params=query_params)
6648
5932
  response.raise_for_status()
6649
5933
  return response.json()
6650
5934
 
6651
- def reports_list_top_open_locations(
5935
+ async def reports_list_top_open_locations(
6652
5936
  self, campaign_id, fields=None, exclude_fields=None, count=None, offset=None
6653
5937
  ) -> dict[str, Any]:
6654
5938
  """
@@ -6675,20 +5959,13 @@ class MailchimpApp(APIApplication):
6675
5959
  raise ValueError("Missing required parameter 'campaign_id'")
6676
5960
  url = f"{self.base_url}/reports/{campaign_id}/locations"
6677
5961
  query_params = {
6678
- k: v
6679
- for k, v in [
6680
- ("fields", fields),
6681
- ("exclude_fields", exclude_fields),
6682
- ("count", count),
6683
- ("offset", offset),
6684
- ]
6685
- if v is not None
5962
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
6686
5963
  }
6687
5964
  response = self._get(url, params=query_params)
6688
5965
  response.raise_for_status()
6689
5966
  return response.json()
6690
5967
 
6691
- def reports_list_campaign_recipients(
5968
+ async def reports_list_campaign_recipients(
6692
5969
  self, campaign_id, fields=None, exclude_fields=None, count=None, offset=None
6693
5970
  ) -> dict[str, Any]:
6694
5971
  """
@@ -6715,22 +5992,13 @@ class MailchimpApp(APIApplication):
6715
5992
  raise ValueError("Missing required parameter 'campaign_id'")
6716
5993
  url = f"{self.base_url}/reports/{campaign_id}/sent-to"
6717
5994
  query_params = {
6718
- k: v
6719
- for k, v in [
6720
- ("fields", fields),
6721
- ("exclude_fields", exclude_fields),
6722
- ("count", count),
6723
- ("offset", offset),
6724
- ]
6725
- if v is not None
5995
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
6726
5996
  }
6727
5997
  response = self._get(url, params=query_params)
6728
5998
  response.raise_for_status()
6729
5999
  return response.json()
6730
6000
 
6731
- def reports_campaign_recipient_info(
6732
- self, campaign_id, subscriber_hash, fields=None, exclude_fields=None
6733
- ) -> dict[str, Any]:
6001
+ async def reports_campaign_recipient_info(self, campaign_id, subscriber_hash, fields=None, exclude_fields=None) -> dict[str, Any]:
6734
6002
  """
6735
6003
  Retrieves detailed information about a recipient's interaction with a specific campaign report.
6736
6004
 
@@ -6755,18 +6023,12 @@ class MailchimpApp(APIApplication):
6755
6023
  if subscriber_hash is None:
6756
6024
  raise ValueError("Missing required parameter 'subscriber_hash'")
6757
6025
  url = f"{self.base_url}/reports/{campaign_id}/sent-to/{subscriber_hash}"
6758
- query_params = {
6759
- k: v
6760
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6761
- if v is not None
6762
- }
6026
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6763
6027
  response = self._get(url, params=query_params)
6764
6028
  response.raise_for_status()
6765
6029
  return response.json()
6766
6030
 
6767
- def reports_list_child_campaign_reports(
6768
- self, campaign_id, fields=None, exclude_fields=None
6769
- ) -> dict[str, Any]:
6031
+ async def reports_list_child_campaign_reports(self, campaign_id, fields=None, exclude_fields=None) -> dict[str, Any]:
6770
6032
  """
6771
6033
  Lists child campaign reports for a specified campaign.
6772
6034
 
@@ -6788,16 +6050,12 @@ class MailchimpApp(APIApplication):
6788
6050
  if campaign_id is None:
6789
6051
  raise ValueError("Missing required parameter 'campaign_id'")
6790
6052
  url = f"{self.base_url}/reports/{campaign_id}/sub-reports"
6791
- query_params = {
6792
- k: v
6793
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6794
- if v is not None
6795
- }
6053
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6796
6054
  response = self._get(url, params=query_params)
6797
6055
  response.raise_for_status()
6798
6056
  return response.json()
6799
6057
 
6800
- def reports_list_unsubscribed_members(
6058
+ async def reports_list_unsubscribed_members(
6801
6059
  self, campaign_id, fields=None, exclude_fields=None, count=None, offset=None
6802
6060
  ) -> dict[str, Any]:
6803
6061
  """
@@ -6823,22 +6081,13 @@ class MailchimpApp(APIApplication):
6823
6081
  raise ValueError("Missing required parameter 'campaign_id'")
6824
6082
  url = f"{self.base_url}/reports/{campaign_id}/unsubscribed"
6825
6083
  query_params = {
6826
- k: v
6827
- for k, v in [
6828
- ("fields", fields),
6829
- ("exclude_fields", exclude_fields),
6830
- ("count", count),
6831
- ("offset", offset),
6832
- ]
6833
- if v is not None
6084
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
6834
6085
  }
6835
6086
  response = self._get(url, params=query_params)
6836
6087
  response.raise_for_status()
6837
6088
  return response.json()
6838
6089
 
6839
- def reports_get_unsubscribed_member_info(
6840
- self, campaign_id, subscriber_hash, fields=None, exclude_fields=None
6841
- ) -> dict[str, Any]:
6090
+ async def reports_get_unsubscribed_member_info(self, campaign_id, subscriber_hash, fields=None, exclude_fields=None) -> dict[str, Any]:
6842
6091
  """
6843
6092
  Retrieves information about a member who unsubscribed from a specific campaign report.
6844
6093
 
@@ -6863,23 +6112,13 @@ class MailchimpApp(APIApplication):
6863
6112
  if subscriber_hash is None:
6864
6113
  raise ValueError("Missing required parameter 'subscriber_hash'")
6865
6114
  url = f"{self.base_url}/reports/{campaign_id}/unsubscribed/{subscriber_hash}"
6866
- query_params = {
6867
- k: v
6868
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
6869
- if v is not None
6870
- }
6115
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
6871
6116
  response = self._get(url, params=query_params)
6872
6117
  response.raise_for_status()
6873
6118
  return response.json()
6874
6119
 
6875
- def reports_get_campaign_product_activity(
6876
- self,
6877
- campaign_id,
6878
- fields=None,
6879
- exclude_fields=None,
6880
- count=None,
6881
- offset=None,
6882
- sort_field=None,
6120
+ async def reports_get_campaign_product_activity(
6121
+ self, campaign_id, fields=None, exclude_fields=None, count=None, offset=None, sort_field=None
6883
6122
  ) -> dict[str, Any]:
6884
6123
  """
6885
6124
  Retrieves ecommerce product activity reports for a specified campaign, with optional filtering, pagination, and sorting.
@@ -6920,7 +6159,7 @@ class MailchimpApp(APIApplication):
6920
6159
  response.raise_for_status()
6921
6160
  return response.json()
6922
6161
 
6923
- def templates_list_available_templates(
6162
+ async def templates_list_available_templates(
6924
6163
  self,
6925
6164
  fields=None,
6926
6165
  exclude_fields=None,
@@ -6987,7 +6226,7 @@ class MailchimpApp(APIApplication):
6987
6226
  response.raise_for_status()
6988
6227
  return response.json()
6989
6228
 
6990
- def templates_create_new_template(self, request_body=None) -> dict[str, Any]:
6229
+ async def templates_create_new_template(self, request_body=None) -> dict[str, Any]:
6991
6230
  """
6992
6231
  Creates a new template by sending a POST request to the templates endpoint.
6993
6232
 
@@ -7009,9 +6248,7 @@ class MailchimpApp(APIApplication):
7009
6248
  response.raise_for_status()
7010
6249
  return response.json()
7011
6250
 
7012
- def templates_get_info(
7013
- self, template_id, fields=None, exclude_fields=None
7014
- ) -> dict[str, Any]:
6251
+ async def templates_get_info(self, template_id, fields=None, exclude_fields=None) -> dict[str, Any]:
7015
6252
  """
7016
6253
  Retrieve detailed information about a specific template, with optional field filtering.
7017
6254
 
@@ -7033,18 +6270,12 @@ class MailchimpApp(APIApplication):
7033
6270
  if template_id is None:
7034
6271
  raise ValueError("Missing required parameter 'template_id'")
7035
6272
  url = f"{self.base_url}/templates/{template_id}"
7036
- query_params = {
7037
- k: v
7038
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
7039
- if v is not None
7040
- }
6273
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
7041
6274
  response = self._get(url, params=query_params)
7042
6275
  response.raise_for_status()
7043
6276
  return response.json()
7044
6277
 
7045
- def templates_update_template_by_id(
7046
- self, template_id, request_body=None
7047
- ) -> dict[str, Any]:
6278
+ async def templates_update_template_by_id(self, template_id, request_body=None) -> dict[str, Any]:
7048
6279
  """
7049
6280
  Updates an existing template by its unique ID using provided data.
7050
6281
 
@@ -7070,7 +6301,7 @@ class MailchimpApp(APIApplication):
7070
6301
  response.raise_for_status()
7071
6302
  return response.json()
7072
6303
 
7073
- def templates_delete_specific_template(self, template_id) -> Any:
6304
+ async def templates_delete_specific_template(self, template_id) -> Any:
7074
6305
  """
7075
6306
  Deletes a specific template identified by its template ID.
7076
6307
 
@@ -7095,9 +6326,7 @@ class MailchimpApp(APIApplication):
7095
6326
  response.raise_for_status()
7096
6327
  return response.json()
7097
6328
 
7098
- def templates_view_default_content(
7099
- self, template_id, fields=None, exclude_fields=None
7100
- ) -> dict[str, Any]:
6329
+ async def templates_view_default_content(self, template_id, fields=None, exclude_fields=None) -> dict[str, Any]:
7101
6330
  """
7102
6331
  Retrieves the default content for a specific template, optionally filtering included or excluded fields.
7103
6332
 
@@ -7119,16 +6348,12 @@ class MailchimpApp(APIApplication):
7119
6348
  if template_id is None:
7120
6349
  raise ValueError("Missing required parameter 'template_id'")
7121
6350
  url = f"{self.base_url}/templates/{template_id}/default-content"
7122
- query_params = {
7123
- k: v
7124
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
7125
- if v is not None
7126
- }
6351
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
7127
6352
  response = self._get(url, params=query_params)
7128
6353
  response.raise_for_status()
7129
6354
  return response.json()
7130
6355
 
7131
- def ecommerce_list_account_orders(
6356
+ async def ecommerce_list_account_orders(
7132
6357
  self,
7133
6358
  fields=None,
7134
6359
  exclude_fields=None,
@@ -7180,9 +6405,7 @@ class MailchimpApp(APIApplication):
7180
6405
  response.raise_for_status()
7181
6406
  return response.json()
7182
6407
 
7183
- def ecommerce_list_stores(
7184
- self, fields=None, exclude_fields=None, count=None, offset=None
7185
- ) -> dict[str, Any]:
6408
+ async def ecommerce_list_stores(self, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
7186
6409
  """
7187
6410
  Retrieves a list of e-commerce stores accessible to the authenticated user, with optional filtering and pagination.
7188
6411
 
@@ -7203,20 +6426,13 @@ class MailchimpApp(APIApplication):
7203
6426
  """
7204
6427
  url = f"{self.base_url}/ecommerce/stores"
7205
6428
  query_params = {
7206
- k: v
7207
- for k, v in [
7208
- ("fields", fields),
7209
- ("exclude_fields", exclude_fields),
7210
- ("count", count),
7211
- ("offset", offset),
7212
- ]
7213
- if v is not None
6429
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
7214
6430
  }
7215
6431
  response = self._get(url, params=query_params)
7216
6432
  response.raise_for_status()
7217
6433
  return response.json()
7218
6434
 
7219
- def ecommerce_add_store_to_mailchimp_account(
6435
+ async def ecommerce_add_store_to_mailchimp_account(
7220
6436
  self,
7221
6437
  id,
7222
6438
  list_id,
@@ -7290,9 +6506,7 @@ class MailchimpApp(APIApplication):
7290
6506
  response.raise_for_status()
7291
6507
  return response.json()
7292
6508
 
7293
- def ecommerce_get_store_info(
7294
- self, store_id, fields=None, exclude_fields=None
7295
- ) -> dict[str, Any]:
6509
+ async def ecommerce_get_store_info(self, store_id, fields=None, exclude_fields=None) -> dict[str, Any]:
7296
6510
  """
7297
6511
  Fetches information about a specific e-commerce store, allowing optional inclusion or exclusion of specified fields.
7298
6512
 
@@ -7314,16 +6528,12 @@ class MailchimpApp(APIApplication):
7314
6528
  if store_id is None:
7315
6529
  raise ValueError("Missing required parameter 'store_id'")
7316
6530
  url = f"{self.base_url}/ecommerce/stores/{store_id}"
7317
- query_params = {
7318
- k: v
7319
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
7320
- if v is not None
7321
- }
6531
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
7322
6532
  response = self._get(url, params=query_params)
7323
6533
  response.raise_for_status()
7324
6534
  return response.json()
7325
6535
 
7326
- def ecommerce_update_store(
6536
+ async def ecommerce_update_store(
7327
6537
  self,
7328
6538
  store_id,
7329
6539
  name=None,
@@ -7387,7 +6597,7 @@ class MailchimpApp(APIApplication):
7387
6597
  response.raise_for_status()
7388
6598
  return response.json()
7389
6599
 
7390
- def ecommerce_delete_store(self, store_id) -> dict[str, Any]:
6600
+ async def ecommerce_delete_store(self, store_id) -> dict[str, Any]:
7391
6601
  """
7392
6602
  Deletes an e-commerce store identified by the given store ID.
7393
6603
 
@@ -7412,9 +6622,7 @@ class MailchimpApp(APIApplication):
7412
6622
  response.raise_for_status()
7413
6623
  return response.json()
7414
6624
 
7415
- def ecommerce_get_store_carts(
7416
- self, store_id, fields=None, exclude_fields=None, count=None, offset=None
7417
- ) -> dict[str, Any]:
6625
+ async def ecommerce_get_store_carts(self, store_id, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
7418
6626
  """
7419
6627
  Retrieves a list of carts from an e-commerce store with optional field filtering and pagination.
7420
6628
 
@@ -7439,30 +6647,14 @@ class MailchimpApp(APIApplication):
7439
6647
  raise ValueError("Missing required parameter 'store_id'")
7440
6648
  url = f"{self.base_url}/ecommerce/stores/{store_id}/carts"
7441
6649
  query_params = {
7442
- k: v
7443
- for k, v in [
7444
- ("fields", fields),
7445
- ("exclude_fields", exclude_fields),
7446
- ("count", count),
7447
- ("offset", offset),
7448
- ]
7449
- if v is not None
6650
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
7450
6651
  }
7451
6652
  response = self._get(url, params=query_params)
7452
6653
  response.raise_for_status()
7453
6654
  return response.json()
7454
6655
 
7455
- def ecommerce_add_cart_to_store(
7456
- self,
7457
- store_id,
7458
- id,
7459
- customer,
7460
- currency_code,
7461
- order_total,
7462
- lines,
7463
- campaign_id=None,
7464
- checkout_url=None,
7465
- tax_total=None,
6656
+ async def ecommerce_add_cart_to_store(
6657
+ self, store_id, id, customer, currency_code, order_total, lines, campaign_id=None, checkout_url=None, tax_total=None
7466
6658
  ) -> dict[str, Any]:
7467
6659
  """
7468
6660
  Adds a shopping cart to the specified e-commerce store with customer, order, and line item details.
@@ -7517,9 +6709,7 @@ class MailchimpApp(APIApplication):
7517
6709
  response.raise_for_status()
7518
6710
  return response.json()
7519
6711
 
7520
- def ecommerce_get_cart_info(
7521
- self, store_id, cart_id, fields=None, exclude_fields=None
7522
- ) -> dict[str, Any]:
6712
+ async def ecommerce_get_cart_info(self, store_id, cart_id, fields=None, exclude_fields=None) -> dict[str, Any]:
7523
6713
  """
7524
6714
  Retrieves detailed information about a specific ecommerce cart from the specified store.
7525
6715
 
@@ -7544,16 +6734,12 @@ class MailchimpApp(APIApplication):
7544
6734
  if cart_id is None:
7545
6735
  raise ValueError("Missing required parameter 'cart_id'")
7546
6736
  url = f"{self.base_url}/ecommerce/stores/{store_id}/carts/{cart_id}"
7547
- query_params = {
7548
- k: v
7549
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
7550
- if v is not None
7551
- }
6737
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
7552
6738
  response = self._get(url, params=query_params)
7553
6739
  response.raise_for_status()
7554
6740
  return response.json()
7555
6741
 
7556
- def ecommerce_update_cart_by_id(
6742
+ async def ecommerce_update_cart_by_id(
7557
6743
  self,
7558
6744
  store_id,
7559
6745
  cart_id,
@@ -7609,7 +6795,7 @@ class MailchimpApp(APIApplication):
7609
6795
  response.raise_for_status()
7610
6796
  return response.json()
7611
6797
 
7612
- def ecommerce_remove_cart(self, store_id, cart_id) -> Any:
6798
+ async def ecommerce_remove_cart(self, store_id, cart_id) -> Any:
7613
6799
  """
7614
6800
  Removes a specific cart from an e-commerce store by cart ID.
7615
6801
 
@@ -7637,14 +6823,8 @@ class MailchimpApp(APIApplication):
7637
6823
  response.raise_for_status()
7638
6824
  return response.json()
7639
6825
 
7640
- def ecommerce_list_cart_lines(
7641
- self,
7642
- store_id,
7643
- cart_id,
7644
- fields=None,
7645
- exclude_fields=None,
7646
- count=None,
7647
- offset=None,
6826
+ async def ecommerce_list_cart_lines(
6827
+ self, store_id, cart_id, fields=None, exclude_fields=None, count=None, offset=None
7648
6828
  ) -> dict[str, Any]:
7649
6829
  """
7650
6830
  Retrieves the list of line items from a specific e-commerce cart within a store.
@@ -7673,22 +6853,13 @@ class MailchimpApp(APIApplication):
7673
6853
  raise ValueError("Missing required parameter 'cart_id'")
7674
6854
  url = f"{self.base_url}/ecommerce/stores/{store_id}/carts/{cart_id}/lines"
7675
6855
  query_params = {
7676
- k: v
7677
- for k, v in [
7678
- ("fields", fields),
7679
- ("exclude_fields", exclude_fields),
7680
- ("count", count),
7681
- ("offset", offset),
7682
- ]
7683
- if v is not None
6856
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
7684
6857
  }
7685
6858
  response = self._get(url, params=query_params)
7686
6859
  response.raise_for_status()
7687
6860
  return response.json()
7688
6861
 
7689
- def ecommerce_add_cart_line_item(
7690
- self, store_id, cart_id, id, product_id, product_variant_id, quantity, price
7691
- ) -> dict[str, Any]:
6862
+ async def ecommerce_add_cart_line_item(self, store_id, cart_id, id, product_id, product_variant_id, quantity, price) -> dict[str, Any]:
7692
6863
  """
7693
6864
  Adds a line item to an existing cart in the specified ecommerce store.
7694
6865
 
@@ -7725,13 +6896,7 @@ class MailchimpApp(APIApplication):
7725
6896
  raise ValueError("Missing required parameter 'quantity'")
7726
6897
  if price is None:
7727
6898
  raise ValueError("Missing required parameter 'price'")
7728
- request_body = {
7729
- "id": id,
7730
- "product_id": product_id,
7731
- "product_variant_id": product_variant_id,
7732
- "quantity": quantity,
7733
- "price": price,
7734
- }
6899
+ request_body = {"id": id, "product_id": product_id, "product_variant_id": product_variant_id, "quantity": quantity, "price": price}
7735
6900
  request_body = {k: v for k, v in request_body.items() if v is not None}
7736
6901
  url = f"{self.base_url}/ecommerce/stores/{store_id}/carts/{cart_id}/lines"
7737
6902
  query_params = {}
@@ -7739,9 +6904,7 @@ class MailchimpApp(APIApplication):
7739
6904
  response.raise_for_status()
7740
6905
  return response.json()
7741
6906
 
7742
- def ecommerce_get_cart_line_item(
7743
- self, store_id, cart_id, line_id, fields=None, exclude_fields=None
7744
- ) -> dict[str, Any]:
6907
+ async def ecommerce_get_cart_line_item(self, store_id, cart_id, line_id, fields=None, exclude_fields=None) -> dict[str, Any]:
7745
6908
  """
7746
6909
  Retrieves a specific cart line item from an e-commerce store by store, cart, and line identifiers, with optional field selection.
7747
6910
 
@@ -7769,24 +6932,13 @@ class MailchimpApp(APIApplication):
7769
6932
  if line_id is None:
7770
6933
  raise ValueError("Missing required parameter 'line_id'")
7771
6934
  url = f"{self.base_url}/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}"
7772
- query_params = {
7773
- k: v
7774
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
7775
- if v is not None
7776
- }
6935
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
7777
6936
  response = self._get(url, params=query_params)
7778
6937
  response.raise_for_status()
7779
6938
  return response.json()
7780
6939
 
7781
- def ecommerce_update_cart_line_item(
7782
- self,
7783
- store_id,
7784
- cart_id,
7785
- line_id,
7786
- product_id=None,
7787
- product_variant_id=None,
7788
- quantity=None,
7789
- price=None,
6940
+ async def ecommerce_update_cart_line_item(
6941
+ self, store_id, cart_id, line_id, product_id=None, product_variant_id=None, quantity=None, price=None
7790
6942
  ) -> dict[str, Any]:
7791
6943
  """
7792
6944
  Updates a specific line item in an e-commerce cart with new product details, quantity, or price.
@@ -7816,12 +6968,7 @@ class MailchimpApp(APIApplication):
7816
6968
  raise ValueError("Missing required parameter 'cart_id'")
7817
6969
  if line_id is None:
7818
6970
  raise ValueError("Missing required parameter 'line_id'")
7819
- request_body = {
7820
- "product_id": product_id,
7821
- "product_variant_id": product_variant_id,
7822
- "quantity": quantity,
7823
- "price": price,
7824
- }
6971
+ request_body = {"product_id": product_id, "product_variant_id": product_variant_id, "quantity": quantity, "price": price}
7825
6972
  request_body = {k: v for k, v in request_body.items() if v is not None}
7826
6973
  url = f"{self.base_url}/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}"
7827
6974
  query_params = {}
@@ -7829,7 +6976,7 @@ class MailchimpApp(APIApplication):
7829
6976
  response.raise_for_status()
7830
6977
  return response.json()
7831
6978
 
7832
- def ecommerce_delete_cart_line_item(self, store_id, cart_id, line_id) -> Any:
6979
+ async def ecommerce_delete_cart_line_item(self, store_id, cart_id, line_id) -> Any:
7833
6980
  """
7834
6981
  Deletes a specific line item from a shopping cart in the specified store.
7835
6982
 
@@ -7860,14 +7007,8 @@ class MailchimpApp(APIApplication):
7860
7007
  response.raise_for_status()
7861
7008
  return response.json()
7862
7009
 
7863
- def ecommerce_get_store_customers(
7864
- self,
7865
- store_id,
7866
- fields=None,
7867
- exclude_fields=None,
7868
- count=None,
7869
- offset=None,
7870
- email_address=None,
7010
+ async def ecommerce_get_store_customers(
7011
+ self, store_id, fields=None, exclude_fields=None, count=None, offset=None, email_address=None
7871
7012
  ) -> dict[str, Any]:
7872
7013
  """
7873
7014
  Retrieves customers for a specified ecommerce store.
@@ -7907,16 +7048,8 @@ class MailchimpApp(APIApplication):
7907
7048
  response.raise_for_status()
7908
7049
  return response.json()
7909
7050
 
7910
- def ecommerce_add_customer_to_store(
7911
- self,
7912
- store_id,
7913
- id,
7914
- email_address,
7915
- opt_in_status,
7916
- company=None,
7917
- first_name=None,
7918
- last_name=None,
7919
- address=None,
7051
+ async def ecommerce_add_customer_to_store(
7052
+ self, store_id, id, email_address, opt_in_status, company=None, first_name=None, last_name=None, address=None
7920
7053
  ) -> dict[str, Any]:
7921
7054
  """
7922
7055
  Adds a customer to a specified e-commerce store.
@@ -7965,9 +7098,7 @@ class MailchimpApp(APIApplication):
7965
7098
  response.raise_for_status()
7966
7099
  return response.json()
7967
7100
 
7968
- def ecommerce_get_customer_info(
7969
- self, store_id, customer_id, fields=None, exclude_fields=None
7970
- ) -> dict[str, Any]:
7101
+ async def ecommerce_get_customer_info(self, store_id, customer_id, fields=None, exclude_fields=None) -> dict[str, Any]:
7971
7102
  """
7972
7103
  Retrieve detailed information about a specific customer in an e-commerce store.
7973
7104
 
@@ -7992,26 +7123,13 @@ class MailchimpApp(APIApplication):
7992
7123
  if customer_id is None:
7993
7124
  raise ValueError("Missing required parameter 'customer_id'")
7994
7125
  url = f"{self.base_url}/ecommerce/stores/{store_id}/customers/{customer_id}"
7995
- query_params = {
7996
- k: v
7997
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
7998
- if v is not None
7999
- }
7126
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
8000
7127
  response = self._get(url, params=query_params)
8001
7128
  response.raise_for_status()
8002
7129
  return response.json()
8003
7130
 
8004
- def ecommerce_add_or_update_customer(
8005
- self,
8006
- store_id,
8007
- customer_id,
8008
- id,
8009
- email_address,
8010
- opt_in_status,
8011
- company=None,
8012
- first_name=None,
8013
- last_name=None,
8014
- address=None,
7131
+ async def ecommerce_add_or_update_customer(
7132
+ self, store_id, customer_id, id, email_address, opt_in_status, company=None, first_name=None, last_name=None, address=None
8015
7133
  ) -> dict[str, Any]:
8016
7134
  """
8017
7135
  Adds a new e-commerce customer or updates an existing customer record for a specific store.
@@ -8063,15 +7181,8 @@ class MailchimpApp(APIApplication):
8063
7181
  response.raise_for_status()
8064
7182
  return response.json()
8065
7183
 
8066
- def ecommerce_update_customer(
8067
- self,
8068
- store_id,
8069
- customer_id,
8070
- opt_in_status=None,
8071
- company=None,
8072
- first_name=None,
8073
- last_name=None,
8074
- address=None,
7184
+ async def ecommerce_update_customer(
7185
+ self, store_id, customer_id, opt_in_status=None, company=None, first_name=None, last_name=None, address=None
8075
7186
  ) -> dict[str, Any]:
8076
7187
  """
8077
7188
  Updates an existing customer's information in an e-commerce store.
@@ -8113,7 +7224,7 @@ class MailchimpApp(APIApplication):
8113
7224
  response.raise_for_status()
8114
7225
  return response.json()
8115
7226
 
8116
- def ecommerce_remove_customer(self, store_id, customer_id) -> Any:
7227
+ async def ecommerce_remove_customer(self, store_id, customer_id) -> Any:
8117
7228
  """
8118
7229
  Removes a customer from an e-commerce store
8119
7230
 
@@ -8140,9 +7251,7 @@ class MailchimpApp(APIApplication):
8140
7251
  response.raise_for_status()
8141
7252
  return response.json()
8142
7253
 
8143
- def ecommerce_get_store_promo_rules(
8144
- self, store_id, fields=None, exclude_fields=None, count=None, offset=None
8145
- ) -> dict[str, Any]:
7254
+ async def ecommerce_get_store_promo_rules(self, store_id, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
8146
7255
  """
8147
7256
  Retrieves a list of promotional rules for a specified e-commerce store, with optional filtering and pagination.
8148
7257
 
@@ -8167,20 +7276,13 @@ class MailchimpApp(APIApplication):
8167
7276
  raise ValueError("Missing required parameter 'store_id'")
8168
7277
  url = f"{self.base_url}/ecommerce/stores/{store_id}/promo-rules"
8169
7278
  query_params = {
8170
- k: v
8171
- for k, v in [
8172
- ("fields", fields),
8173
- ("exclude_fields", exclude_fields),
8174
- ("count", count),
8175
- ("offset", offset),
8176
- ]
8177
- if v is not None
7279
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
8178
7280
  }
8179
7281
  response = self._get(url, params=query_params)
8180
7282
  response.raise_for_status()
8181
7283
  return response.json()
8182
7284
 
8183
- def ecommerce_add_promo_rule(
7285
+ async def ecommerce_add_promo_rule(
8184
7286
  self,
8185
7287
  store_id,
8186
7288
  description,
@@ -8254,9 +7356,7 @@ class MailchimpApp(APIApplication):
8254
7356
  response.raise_for_status()
8255
7357
  return response.json()
8256
7358
 
8257
- def ecommerce_get_store_promo_rule(
8258
- self, store_id, promo_rule_id, fields=None, exclude_fields=None
8259
- ) -> dict[str, Any]:
7359
+ async def ecommerce_get_store_promo_rule(self, store_id, promo_rule_id, fields=None, exclude_fields=None) -> dict[str, Any]:
8260
7360
  """
8261
7361
  Retrieves a specific promotional rule for an e-commerce store, optionally filtering the response fields.
8262
7362
 
@@ -8281,16 +7381,12 @@ class MailchimpApp(APIApplication):
8281
7381
  if promo_rule_id is None:
8282
7382
  raise ValueError("Missing required parameter 'promo_rule_id'")
8283
7383
  url = f"{self.base_url}/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}"
8284
- query_params = {
8285
- k: v
8286
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
8287
- if v is not None
8288
- }
7384
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
8289
7385
  response = self._get(url, params=query_params)
8290
7386
  response.raise_for_status()
8291
7387
  return response.json()
8292
7388
 
8293
- def ecommerce_update_promo_rule(
7389
+ async def ecommerce_update_promo_rule(
8294
7390
  self,
8295
7391
  store_id,
8296
7392
  promo_rule_id,
@@ -8355,7 +7451,7 @@ class MailchimpApp(APIApplication):
8355
7451
  response.raise_for_status()
8356
7452
  return response.json()
8357
7453
 
8358
- def ecommerce_delete_promo_rule(self, store_id, promo_rule_id) -> Any:
7454
+ async def ecommerce_delete_promo_rule(self, store_id, promo_rule_id) -> Any:
8359
7455
  """
8360
7456
  Deletes a specific promotional rule from an e-commerce store.
8361
7457
 
@@ -8383,14 +7479,8 @@ class MailchimpApp(APIApplication):
8383
7479
  response.raise_for_status()
8384
7480
  return response.json()
8385
7481
 
8386
- def ecommerce_get_store_promo_codes(
8387
- self,
8388
- store_id,
8389
- promo_rule_id,
8390
- fields=None,
8391
- exclude_fields=None,
8392
- count=None,
8393
- offset=None,
7482
+ async def ecommerce_get_store_promo_codes(
7483
+ self, store_id, promo_rule_id, fields=None, exclude_fields=None, count=None, offset=None
8394
7484
  ) -> dict[str, Any]:
8395
7485
  """
8396
7486
  Retrieves a list of promo codes associated with a specific promo rule for a store from the e-commerce API.
@@ -8419,20 +7509,13 @@ class MailchimpApp(APIApplication):
8419
7509
  raise ValueError("Missing required parameter 'promo_rule_id'")
8420
7510
  url = f"{self.base_url}/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes"
8421
7511
  query_params = {
8422
- k: v
8423
- for k, v in [
8424
- ("fields", fields),
8425
- ("exclude_fields", exclude_fields),
8426
- ("count", count),
8427
- ("offset", offset),
8428
- ]
8429
- if v is not None
7512
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
8430
7513
  }
8431
7514
  response = self._get(url, params=query_params)
8432
7515
  response.raise_for_status()
8433
7516
  return response.json()
8434
7517
 
8435
- def ecommerce_add_promo_code(
7518
+ async def ecommerce_add_promo_code(
8436
7519
  self,
8437
7520
  store_id,
8438
7521
  promo_rule_id,
@@ -8494,9 +7577,7 @@ class MailchimpApp(APIApplication):
8494
7577
  response.raise_for_status()
8495
7578
  return response.json()
8496
7579
 
8497
- def ecommerce_get_promo_code(
8498
- self, store_id, promo_rule_id, promo_code_id, fields=None, exclude_fields=None
8499
- ) -> dict[str, Any]:
7580
+ async def ecommerce_get_promo_code(self, store_id, promo_rule_id, promo_code_id, fields=None, exclude_fields=None) -> dict[str, Any]:
8500
7581
  """
8501
7582
  Fetches a promo code for an ecommerce store using a specific promo rule and promo code ID.
8502
7583
 
@@ -8523,16 +7604,12 @@ class MailchimpApp(APIApplication):
8523
7604
  if promo_code_id is None:
8524
7605
  raise ValueError("Missing required parameter 'promo_code_id'")
8525
7606
  url = f"{self.base_url}/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}"
8526
- query_params = {
8527
- k: v
8528
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
8529
- if v is not None
8530
- }
7607
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
8531
7608
  response = self._get(url, params=query_params)
8532
7609
  response.raise_for_status()
8533
7610
  return response.json()
8534
7611
 
8535
- def ecommerce_update_promo_code(
7612
+ async def ecommerce_update_promo_code(
8536
7613
  self,
8537
7614
  store_id,
8538
7615
  promo_rule_id,
@@ -8589,9 +7666,7 @@ class MailchimpApp(APIApplication):
8589
7666
  response.raise_for_status()
8590
7667
  return response.json()
8591
7668
 
8592
- def ecommerce_delete_promo_code(
8593
- self, store_id, promo_rule_id, promo_code_id
8594
- ) -> Any:
7669
+ async def ecommerce_delete_promo_code(self, store_id, promo_rule_id, promo_code_id) -> Any:
8595
7670
  """
8596
7671
  Deletes a specific promotional code from an e-commerce store.
8597
7672
 
@@ -8622,7 +7697,7 @@ class MailchimpApp(APIApplication):
8622
7697
  response.raise_for_status()
8623
7698
  return response.json()
8624
7699
 
8625
- def ecommerce_list_store_orders(
7700
+ async def ecommerce_list_store_orders(
8626
7701
  self,
8627
7702
  store_id,
8628
7703
  fields=None,
@@ -8679,7 +7754,7 @@ class MailchimpApp(APIApplication):
8679
7754
  response.raise_for_status()
8680
7755
  return response.json()
8681
7756
 
8682
- def ecommerce_add_order_to_store(
7757
+ async def ecommerce_add_order_to_store(
8683
7758
  self,
8684
7759
  store_id,
8685
7760
  id,
@@ -8792,9 +7867,7 @@ class MailchimpApp(APIApplication):
8792
7867
  response.raise_for_status()
8793
7868
  return response.json()
8794
7869
 
8795
- def ecommerce_get_store_order_info(
8796
- self, store_id, order_id, fields=None, exclude_fields=None
8797
- ) -> dict[str, Any]:
7870
+ async def ecommerce_get_store_order_info(self, store_id, order_id, fields=None, exclude_fields=None) -> dict[str, Any]:
8798
7871
  """
8799
7872
  Retrieves information for a specific order from an e-commerce store.
8800
7873
 
@@ -8819,16 +7892,12 @@ class MailchimpApp(APIApplication):
8819
7892
  if order_id is None:
8820
7893
  raise ValueError("Missing required parameter 'order_id'")
8821
7894
  url = f"{self.base_url}/ecommerce/stores/{store_id}/orders/{order_id}"
8822
- query_params = {
8823
- k: v
8824
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
8825
- if v is not None
8826
- }
7895
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
8827
7896
  response = self._get(url, params=query_params)
8828
7897
  response.raise_for_status()
8829
7898
  return response.json()
8830
7899
 
8831
- def ecommerce_update_specific_order(
7900
+ async def ecommerce_update_specific_order(
8832
7901
  self,
8833
7902
  store_id,
8834
7903
  order_id,
@@ -8932,7 +8001,7 @@ class MailchimpApp(APIApplication):
8932
8001
  response.raise_for_status()
8933
8002
  return response.json()
8934
8003
 
8935
- def ecommerce_delete_order(self, store_id, order_id) -> Any:
8004
+ async def ecommerce_delete_order(self, store_id, order_id) -> Any:
8936
8005
  """
8937
8006
  Deletes an order from an ecommerce store based on the provided store ID and order ID.
8938
8007
 
@@ -8959,14 +8028,8 @@ class MailchimpApp(APIApplication):
8959
8028
  response.raise_for_status()
8960
8029
  return response.json()
8961
8030
 
8962
- def ecommerce_get_store_order_lines(
8963
- self,
8964
- store_id,
8965
- order_id,
8966
- fields=None,
8967
- exclude_fields=None,
8968
- count=None,
8969
- offset=None,
8031
+ async def ecommerce_get_store_order_lines(
8032
+ self, store_id, order_id, fields=None, exclude_fields=None, count=None, offset=None
8970
8033
  ) -> dict[str, Any]:
8971
8034
  """
8972
8035
  Retrieves the order line items for a specific order in a store, with optional field selection and pagination.
@@ -8995,29 +8058,14 @@ class MailchimpApp(APIApplication):
8995
8058
  raise ValueError("Missing required parameter 'order_id'")
8996
8059
  url = f"{self.base_url}/ecommerce/stores/{store_id}/orders/{order_id}/lines"
8997
8060
  query_params = {
8998
- k: v
8999
- for k, v in [
9000
- ("fields", fields),
9001
- ("exclude_fields", exclude_fields),
9002
- ("count", count),
9003
- ("offset", offset),
9004
- ]
9005
- if v is not None
8061
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
9006
8062
  }
9007
8063
  response = self._get(url, params=query_params)
9008
8064
  response.raise_for_status()
9009
8065
  return response.json()
9010
8066
 
9011
- def ecommerce_add_order_line_item(
9012
- self,
9013
- store_id,
9014
- order_id,
9015
- id,
9016
- product_id,
9017
- product_variant_id,
9018
- quantity,
9019
- price,
9020
- discount=None,
8067
+ async def ecommerce_add_order_line_item(
8068
+ self, store_id, order_id, id, product_id, product_variant_id, quantity, price, discount=None
9021
8069
  ) -> dict[str, Any]:
9022
8070
  """
9023
8071
  Adds a line item to an existing order in the specified e-commerce store.
@@ -9071,9 +8119,7 @@ class MailchimpApp(APIApplication):
9071
8119
  response.raise_for_status()
9072
8120
  return response.json()
9073
8121
 
9074
- def ecommerce_get_order_line_item(
9075
- self, store_id, order_id, line_id, fields=None, exclude_fields=None
9076
- ) -> dict[str, Any]:
8122
+ async def ecommerce_get_order_line_item(self, store_id, order_id, line_id, fields=None, exclude_fields=None) -> dict[str, Any]:
9077
8123
  """
9078
8124
  Retrieves a specific line item from an order in the specified ecommerce store.
9079
8125
 
@@ -9101,25 +8147,13 @@ class MailchimpApp(APIApplication):
9101
8147
  if line_id is None:
9102
8148
  raise ValueError("Missing required parameter 'line_id'")
9103
8149
  url = f"{self.base_url}/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}"
9104
- query_params = {
9105
- k: v
9106
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
9107
- if v is not None
9108
- }
8150
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
9109
8151
  response = self._get(url, params=query_params)
9110
8152
  response.raise_for_status()
9111
8153
  return response.json()
9112
8154
 
9113
- def ecommerce_update_order_line(
9114
- self,
9115
- store_id,
9116
- order_id,
9117
- line_id,
9118
- product_id=None,
9119
- product_variant_id=None,
9120
- quantity=None,
9121
- price=None,
9122
- discount=None,
8155
+ async def ecommerce_update_order_line(
8156
+ self, store_id, order_id, line_id, product_id=None, product_variant_id=None, quantity=None, price=None, discount=None
9123
8157
  ) -> dict[str, Any]:
9124
8158
  """
9125
8159
  Updates an existing order line in a store's e-commerce order with new product or pricing information.
@@ -9164,7 +8198,7 @@ class MailchimpApp(APIApplication):
9164
8198
  response.raise_for_status()
9165
8199
  return response.json()
9166
8200
 
9167
- def ecommerce_delete_order_line(self, store_id, order_id, line_id) -> Any:
8201
+ async def ecommerce_delete_order_line(self, store_id, order_id, line_id) -> Any:
9168
8202
  """
9169
8203
  Deletes a specific line item from an order in the specified store via the e-commerce API.
9170
8204
 
@@ -9195,9 +8229,7 @@ class MailchimpApp(APIApplication):
9195
8229
  response.raise_for_status()
9196
8230
  return response.json()
9197
8231
 
9198
- def ecommerce_get_store_products(
9199
- self, store_id, fields=None, exclude_fields=None, count=None, offset=None
9200
- ) -> dict[str, Any]:
8232
+ async def ecommerce_get_store_products(self, store_id, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
9201
8233
  """
9202
8234
  Retrieves products from a specified ecommerce store
9203
8235
 
@@ -9221,20 +8253,13 @@ class MailchimpApp(APIApplication):
9221
8253
  raise ValueError("Missing required parameter 'store_id'")
9222
8254
  url = f"{self.base_url}/ecommerce/stores/{store_id}/products"
9223
8255
  query_params = {
9224
- k: v
9225
- for k, v in [
9226
- ("fields", fields),
9227
- ("exclude_fields", exclude_fields),
9228
- ("count", count),
9229
- ("offset", offset),
9230
- ]
9231
- if v is not None
8256
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
9232
8257
  }
9233
8258
  response = self._get(url, params=query_params)
9234
8259
  response.raise_for_status()
9235
8260
  return response.json()
9236
8261
 
9237
- def ecommerce_add_product_to_store(
8262
+ async def ecommerce_add_product_to_store(
9238
8263
  self,
9239
8264
  store_id,
9240
8265
  title,
@@ -9304,9 +8329,7 @@ class MailchimpApp(APIApplication):
9304
8329
  response.raise_for_status()
9305
8330
  return response.json()
9306
8331
 
9307
- def ecommerce_get_store_product_info(
9308
- self, store_id, product_id, fields=None, exclude_fields=None
9309
- ) -> dict[str, Any]:
8332
+ async def ecommerce_get_store_product_info(self, store_id, product_id, fields=None, exclude_fields=None) -> dict[str, Any]:
9310
8333
  """
9311
8334
  Retrieves detailed information about a specific product from an e-commerce store.
9312
8335
 
@@ -9331,16 +8354,12 @@ class MailchimpApp(APIApplication):
9331
8354
  if product_id is None:
9332
8355
  raise ValueError("Missing required parameter 'product_id'")
9333
8356
  url = f"{self.base_url}/ecommerce/stores/{store_id}/products/{product_id}"
9334
- query_params = {
9335
- k: v
9336
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
9337
- if v is not None
9338
- }
8357
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
9339
8358
  response = self._get(url, params=query_params)
9340
8359
  response.raise_for_status()
9341
8360
  return response.json()
9342
8361
 
9343
- def ecommerce_update_product(
8362
+ async def ecommerce_update_product(
9344
8363
  self,
9345
8364
  store_id,
9346
8365
  product_id,
@@ -9405,7 +8424,7 @@ class MailchimpApp(APIApplication):
9405
8424
  response.raise_for_status()
9406
8425
  return response.json()
9407
8426
 
9408
- def ecommerce_delete_product(self, store_id, product_id) -> Any:
8427
+ async def ecommerce_delete_product(self, store_id, product_id) -> Any:
9409
8428
  """
9410
8429
  Deletes a product from an e-commerce store by store and product ID.
9411
8430
 
@@ -9433,14 +8452,8 @@ class MailchimpApp(APIApplication):
9433
8452
  response.raise_for_status()
9434
8453
  return response.json()
9435
8454
 
9436
- def ecommerce_list_product_variants(
9437
- self,
9438
- store_id,
9439
- product_id,
9440
- fields=None,
9441
- exclude_fields=None,
9442
- count=None,
9443
- offset=None,
8455
+ async def ecommerce_list_product_variants(
8456
+ self, store_id, product_id, fields=None, exclude_fields=None, count=None, offset=None
9444
8457
  ) -> dict[str, Any]:
9445
8458
  """
9446
8459
  Retrieves a list of variants for a specified product in a given e-commerce store, with optional filtering and pagination.
@@ -9469,22 +8482,13 @@ class MailchimpApp(APIApplication):
9469
8482
  raise ValueError("Missing required parameter 'product_id'")
9470
8483
  url = f"{self.base_url}/ecommerce/stores/{store_id}/products/{product_id}/variants"
9471
8484
  query_params = {
9472
- k: v
9473
- for k, v in [
9474
- ("fields", fields),
9475
- ("exclude_fields", exclude_fields),
9476
- ("count", count),
9477
- ("offset", offset),
9478
- ]
9479
- if v is not None
8485
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
9480
8486
  }
9481
8487
  response = self._get(url, params=query_params)
9482
8488
  response.raise_for_status()
9483
8489
  return response.json()
9484
8490
 
9485
- def ecommerce_add_product_variant(
9486
- self, store_id, product_id, request_body=None
9487
- ) -> dict[str, Any]:
8491
+ async def ecommerce_add_product_variant(self, store_id, product_id, request_body=None) -> dict[str, Any]:
9488
8492
  """
9489
8493
  Adds a new product variant to the specified product in an ecommerce store.
9490
8494
 
@@ -9513,7 +8517,7 @@ class MailchimpApp(APIApplication):
9513
8517
  response.raise_for_status()
9514
8518
  return response.json()
9515
8519
 
9516
- def ecommerce_get_product_variant_info(
8520
+ async def ecommerce_get_product_variant_info(
9517
8521
  self, store_id, product_id, variant_id, fields=None, exclude_fields=None
9518
8522
  ) -> dict[str, Any]:
9519
8523
  """
@@ -9543,18 +8547,12 @@ class MailchimpApp(APIApplication):
9543
8547
  if variant_id is None:
9544
8548
  raise ValueError("Missing required parameter 'variant_id'")
9545
8549
  url = f"{self.base_url}/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}"
9546
- query_params = {
9547
- k: v
9548
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
9549
- if v is not None
9550
- }
8550
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
9551
8551
  response = self._get(url, params=query_params)
9552
8552
  response.raise_for_status()
9553
8553
  return response.json()
9554
8554
 
9555
- def ecommerce_add_or_update_product_variant(
9556
- self, store_id, product_id, variant_id, request_body=None
9557
- ) -> dict[str, Any]:
8555
+ async def ecommerce_add_or_update_product_variant(self, store_id, product_id, variant_id, request_body=None) -> dict[str, Any]:
9558
8556
  """
9559
8557
  Adds a new product variant or updates an existing variant in the specified store's product catalog.
9560
8558
 
@@ -9586,7 +8584,7 @@ class MailchimpApp(APIApplication):
9586
8584
  response.raise_for_status()
9587
8585
  return response.json()
9588
8586
 
9589
- def ecommerce_update_product_variant(
8587
+ async def ecommerce_update_product_variant(
9590
8588
  self,
9591
8589
  store_id,
9592
8590
  product_id,
@@ -9649,7 +8647,7 @@ class MailchimpApp(APIApplication):
9649
8647
  response.raise_for_status()
9650
8648
  return response.json()
9651
8649
 
9652
- def ecommerce_delete_product_variant(self, store_id, product_id, variant_id) -> Any:
8650
+ async def ecommerce_delete_product_variant(self, store_id, product_id, variant_id) -> Any:
9653
8651
  """
9654
8652
  Deletes a specific product variant from an ecommerce store by issuing a DELETE request to the API.
9655
8653
 
@@ -9680,14 +8678,8 @@ class MailchimpApp(APIApplication):
9680
8678
  response.raise_for_status()
9681
8679
  return response.json()
9682
8680
 
9683
- def ecommerce_get_product_images(
9684
- self,
9685
- store_id,
9686
- product_id,
9687
- fields=None,
9688
- exclude_fields=None,
9689
- count=None,
9690
- offset=None,
8681
+ async def ecommerce_get_product_images(
8682
+ self, store_id, product_id, fields=None, exclude_fields=None, count=None, offset=None
9691
8683
  ) -> dict[str, Any]:
9692
8684
  """
9693
8685
  Retrieves product images for a given store and product from an ecommerce API.
@@ -9713,26 +8705,15 @@ class MailchimpApp(APIApplication):
9713
8705
  raise ValueError("Missing required parameter 'store_id'")
9714
8706
  if product_id is None:
9715
8707
  raise ValueError("Missing required parameter 'product_id'")
9716
- url = (
9717
- f"{self.base_url}/ecommerce/stores/{store_id}/products/{product_id}/images"
9718
- )
8708
+ url = f"{self.base_url}/ecommerce/stores/{store_id}/products/{product_id}/images"
9719
8709
  query_params = {
9720
- k: v
9721
- for k, v in [
9722
- ("fields", fields),
9723
- ("exclude_fields", exclude_fields),
9724
- ("count", count),
9725
- ("offset", offset),
9726
- ]
9727
- if v is not None
8710
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
9728
8711
  }
9729
8712
  response = self._get(url, params=query_params)
9730
8713
  response.raise_for_status()
9731
8714
  return response.json()
9732
8715
 
9733
- def ecommerce_add_product_image(
9734
- self, store_id, product_id, id, url, variant_ids=None
9735
- ) -> dict[str, Any]:
8716
+ async def ecommerce_add_product_image(self, store_id, product_id, id, url, variant_ids=None) -> dict[str, Any]:
9736
8717
  """
9737
8718
  Adds an image to a product in the specified e-commerce store.
9738
8719
 
@@ -9761,23 +8742,15 @@ class MailchimpApp(APIApplication):
9761
8742
  raise ValueError("Missing required parameter 'id'")
9762
8743
  if url is None:
9763
8744
  raise ValueError("Missing required parameter 'url'")
9764
- request_body = {
9765
- "id": id,
9766
- "url": url,
9767
- "variant_ids": variant_ids,
9768
- }
8745
+ request_body = {"id": id, "url": url, "variant_ids": variant_ids}
9769
8746
  request_body = {k: v for k, v in request_body.items() if v is not None}
9770
- url = (
9771
- f"{self.base_url}/ecommerce/stores/{store_id}/products/{product_id}/images"
9772
- )
8747
+ url = f"{self.base_url}/ecommerce/stores/{store_id}/products/{product_id}/images"
9773
8748
  query_params = {}
9774
8749
  response = self._post(url, data=request_body, params=query_params)
9775
8750
  response.raise_for_status()
9776
8751
  return response.json()
9777
8752
 
9778
- def ecommerce_get_product_image_info(
9779
- self, store_id, product_id, image_id, fields=None, exclude_fields=None
9780
- ) -> dict[str, Any]:
8753
+ async def ecommerce_get_product_image_info(self, store_id, product_id, image_id, fields=None, exclude_fields=None) -> dict[str, Any]:
9781
8754
  """
9782
8755
  Retrieves detailed information about a specific product image from the e-commerce store, allowing optional filtering of returned fields.
9783
8756
 
@@ -9805,18 +8778,12 @@ class MailchimpApp(APIApplication):
9805
8778
  if image_id is None:
9806
8779
  raise ValueError("Missing required parameter 'image_id'")
9807
8780
  url = f"{self.base_url}/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}"
9808
- query_params = {
9809
- k: v
9810
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
9811
- if v is not None
9812
- }
8781
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
9813
8782
  response = self._get(url, params=query_params)
9814
8783
  response.raise_for_status()
9815
8784
  return response.json()
9816
8785
 
9817
- def ecommerce_update_product_image(
9818
- self, store_id, product_id, image_id, id=None, url=None, variant_ids=None
9819
- ) -> dict[str, Any]:
8786
+ async def ecommerce_update_product_image(self, store_id, product_id, image_id, id=None, url=None, variant_ids=None) -> dict[str, Any]:
9820
8787
  """
9821
8788
  Updates details of a product image in an ecommerce store using the provided identifiers and optional parameters.
9822
8789
 
@@ -9844,11 +8811,7 @@ class MailchimpApp(APIApplication):
9844
8811
  raise ValueError("Missing required parameter 'product_id'")
9845
8812
  if image_id is None:
9846
8813
  raise ValueError("Missing required parameter 'image_id'")
9847
- request_body = {
9848
- "id": id,
9849
- "url": url,
9850
- "variant_ids": variant_ids,
9851
- }
8814
+ request_body = {"id": id, "url": url, "variant_ids": variant_ids}
9852
8815
  request_body = {k: v for k, v in request_body.items() if v is not None}
9853
8816
  url = f"{self.base_url}/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}"
9854
8817
  query_params = {}
@@ -9856,7 +8819,7 @@ class MailchimpApp(APIApplication):
9856
8819
  response.raise_for_status()
9857
8820
  return response.json()
9858
8821
 
9859
- def ecommerce_delete_product_image(self, store_id, product_id, image_id) -> Any:
8822
+ async def ecommerce_delete_product_image(self, store_id, product_id, image_id) -> Any:
9860
8823
  """
9861
8824
  Deletes an image from a specified product in an e-commerce store.
9862
8825
 
@@ -9887,9 +8850,7 @@ class MailchimpApp(APIApplication):
9887
8850
  response.raise_for_status()
9888
8851
  return response.json()
9889
8852
 
9890
- def search_campaigns_by_query_terms(
9891
- self, query, fields=None, exclude_fields=None
9892
- ) -> dict[str, Any]:
8853
+ async def search_campaigns_by_query_terms(self, query, fields=None, exclude_fields=None) -> dict[str, Any]:
9893
8854
  """
9894
8855
  Searches for campaigns matching the specified query terms and returns the results as a dictionary.
9895
8856
 
@@ -9911,22 +8872,12 @@ class MailchimpApp(APIApplication):
9911
8872
  if query is None:
9912
8873
  raise ValueError("Missing required parameter 'query'")
9913
8874
  url = f"{self.base_url}/search-campaigns"
9914
- query_params = {
9915
- k: v
9916
- for k, v in [
9917
- ("fields", fields),
9918
- ("exclude_fields", exclude_fields),
9919
- ("query", query),
9920
- ]
9921
- if v is not None
9922
- }
8875
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("query", query)] if v is not None}
9923
8876
  response = self._get(url, params=query_params)
9924
8877
  response.raise_for_status()
9925
8878
  return response.json()
9926
8879
 
9927
- def search_members_list_members(
9928
- self, query, fields=None, exclude_fields=None, list_id=None
9929
- ) -> dict[str, Any]:
8880
+ async def search_members_list_members(self, query, fields=None, exclude_fields=None, list_id=None) -> dict[str, Any]:
9930
8881
  """
9931
8882
  Searches for and retrieves a list of members matching the given query from a specific list, with optional field filtering.
9932
8883
 
@@ -9951,21 +8902,14 @@ class MailchimpApp(APIApplication):
9951
8902
  url = f"{self.base_url}/search-members"
9952
8903
  query_params = {
9953
8904
  k: v
9954
- for k, v in [
9955
- ("fields", fields),
9956
- ("exclude_fields", exclude_fields),
9957
- ("query", query),
9958
- ("list_id", list_id),
9959
- ]
8905
+ for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("query", query), ("list_id", list_id)]
9960
8906
  if v is not None
9961
8907
  }
9962
8908
  response = self._get(url, params=query_params)
9963
8909
  response.raise_for_status()
9964
8910
  return response.json()
9965
8911
 
9966
- def ping_health_check(
9967
- self,
9968
- ) -> dict[str, Any]:
8912
+ async def ping_health_check(self) -> dict[str, Any]:
9969
8913
  """
9970
8914
  Checks the health status of the service by sending a ping request and returns the server's response as JSON.
9971
8915
 
@@ -9987,14 +8931,8 @@ class MailchimpApp(APIApplication):
9987
8931
  response.raise_for_status()
9988
8932
  return response.json()
9989
8933
 
9990
- def facebook_ads_list_ads(
9991
- self,
9992
- fields=None,
9993
- exclude_fields=None,
9994
- count=None,
9995
- offset=None,
9996
- sort_field=None,
9997
- sort_dir=None,
8934
+ async def facebook_ads_list_ads(
8935
+ self, fields=None, exclude_fields=None, count=None, offset=None, sort_field=None, sort_dir=None
9998
8936
  ) -> dict[str, Any]:
9999
8937
  """
10000
8938
  Retrieves a list of Facebook ads with optional filtering, field selection, pagination, and sorting.
@@ -10033,9 +8971,7 @@ class MailchimpApp(APIApplication):
10033
8971
  response.raise_for_status()
10034
8972
  return response.json()
10035
8973
 
10036
- def facebook_ads_get_info(
10037
- self, outreach_id, fields=None, exclude_fields=None
10038
- ) -> dict[str, Any]:
8974
+ async def facebook_ads_get_info(self, outreach_id, fields=None, exclude_fields=None) -> dict[str, Any]:
10039
8975
  """
10040
8976
  Retrieves detailed information about a specific Facebook Ads outreach object using its ID, with optional field selection or exclusion.
10041
8977
 
@@ -10057,23 +8993,13 @@ class MailchimpApp(APIApplication):
10057
8993
  if outreach_id is None:
10058
8994
  raise ValueError("Missing required parameter 'outreach_id'")
10059
8995
  url = f"{self.base_url}/facebook-ads/{outreach_id}"
10060
- query_params = {
10061
- k: v
10062
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
10063
- if v is not None
10064
- }
8996
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
10065
8997
  response = self._get(url, params=query_params)
10066
8998
  response.raise_for_status()
10067
8999
  return response.json()
10068
9000
 
10069
- def reporting_list_facebook_ads_reports(
10070
- self,
10071
- fields=None,
10072
- exclude_fields=None,
10073
- count=None,
10074
- offset=None,
10075
- sort_field=None,
10076
- sort_dir=None,
9001
+ async def reporting_list_facebook_ads_reports(
9002
+ self, fields=None, exclude_fields=None, count=None, offset=None, sort_field=None, sort_dir=None
10077
9003
  ) -> dict[str, Any]:
10078
9004
  """
10079
9005
  Retrieves a list of Facebook Ads reports with optional filtering, pagination, and sorting.
@@ -10112,9 +9038,7 @@ class MailchimpApp(APIApplication):
10112
9038
  response.raise_for_status()
10113
9039
  return response.json()
10114
9040
 
10115
- def reporting_facebook_ad_report(
10116
- self, outreach_id, fields=None, exclude_fields=None
10117
- ) -> dict[str, Any]:
9041
+ async def reporting_facebook_ad_report(self, outreach_id, fields=None, exclude_fields=None) -> dict[str, Any]:
10118
9042
  """
10119
9043
  Retrieves detailed Facebook Ads reporting data for a specific outreach using the given outreach ID.
10120
9044
 
@@ -10136,23 +9060,13 @@ class MailchimpApp(APIApplication):
10136
9060
  if outreach_id is None:
10137
9061
  raise ValueError("Missing required parameter 'outreach_id'")
10138
9062
  url = f"{self.base_url}/reporting/facebook-ads/{outreach_id}"
10139
- query_params = {
10140
- k: v
10141
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
10142
- if v is not None
10143
- }
9063
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
10144
9064
  response = self._get(url, params=query_params)
10145
9065
  response.raise_for_status()
10146
9066
  return response.json()
10147
9067
 
10148
- def reporting_list_facebook_ecommerce_report(
10149
- self,
10150
- outreach_id,
10151
- fields=None,
10152
- exclude_fields=None,
10153
- count=None,
10154
- offset=None,
10155
- sort_field=None,
9068
+ async def reporting_list_facebook_ecommerce_report(
9069
+ self, outreach_id, fields=None, exclude_fields=None, count=None, offset=None, sort_field=None
10156
9070
  ) -> dict[str, Any]:
10157
9071
  """
10158
9072
  Retrieves a Facebook e-commerce product activity report for a specified outreach ID.
@@ -10193,9 +9107,7 @@ class MailchimpApp(APIApplication):
10193
9107
  response.raise_for_status()
10194
9108
  return response.json()
10195
9109
 
10196
- def reporting_get_landing_page_report(
10197
- self, outreach_id, fields=None, exclude_fields=None
10198
- ) -> dict[str, Any]:
9110
+ async def reporting_get_landing_page_report(self, outreach_id, fields=None, exclude_fields=None) -> dict[str, Any]:
10199
9111
  """
10200
9112
  Retrieves a landing page report for a specific outreach ID from the reporting API.
10201
9113
 
@@ -10217,18 +9129,12 @@ class MailchimpApp(APIApplication):
10217
9129
  if outreach_id is None:
10218
9130
  raise ValueError("Missing required parameter 'outreach_id'")
10219
9131
  url = f"{self.base_url}/reporting/landing-pages/{outreach_id}"
10220
- query_params = {
10221
- k: v
10222
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
10223
- if v is not None
10224
- }
9132
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
10225
9133
  response = self._get(url, params=query_params)
10226
9134
  response.raise_for_status()
10227
9135
  return response.json()
10228
9136
 
10229
- def reporting_list_landing_pages_reports(
10230
- self, fields=None, exclude_fields=None, count=None, offset=None
10231
- ) -> dict[str, Any]:
9137
+ async def reporting_list_landing_pages_reports(self, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
10232
9138
  """
10233
9139
  Retrieves a list of landing pages reports with optional filtering, field selection, and pagination.
10234
9140
 
@@ -10249,22 +9155,13 @@ class MailchimpApp(APIApplication):
10249
9155
  """
10250
9156
  url = f"{self.base_url}/reporting/landing-pages"
10251
9157
  query_params = {
10252
- k: v
10253
- for k, v in [
10254
- ("fields", fields),
10255
- ("exclude_fields", exclude_fields),
10256
- ("count", count),
10257
- ("offset", offset),
10258
- ]
10259
- if v is not None
9158
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
10260
9159
  }
10261
9160
  response = self._get(url, params=query_params)
10262
9161
  response.raise_for_status()
10263
9162
  return response.json()
10264
9163
 
10265
- def reporting_list_survey_reports(
10266
- self, fields=None, exclude_fields=None, count=None, offset=None
10267
- ) -> dict[str, Any]:
9164
+ async def reporting_list_survey_reports(self, fields=None, exclude_fields=None, count=None, offset=None) -> dict[str, Any]:
10268
9165
  """
10269
9166
  Retrieves a list of survey reports with optional filtering and pagination.
10270
9167
 
@@ -10285,22 +9182,13 @@ class MailchimpApp(APIApplication):
10285
9182
  """
10286
9183
  url = f"{self.base_url}/reporting/surveys"
10287
9184
  query_params = {
10288
- k: v
10289
- for k, v in [
10290
- ("fields", fields),
10291
- ("exclude_fields", exclude_fields),
10292
- ("count", count),
10293
- ("offset", offset),
10294
- ]
10295
- if v is not None
9185
+ k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("count", count), ("offset", offset)] if v is not None
10296
9186
  }
10297
9187
  response = self._get(url, params=query_params)
10298
9188
  response.raise_for_status()
10299
9189
  return response.json()
10300
9190
 
10301
- def reporting_get_survey_report(
10302
- self, survey_id, fields=None, exclude_fields=None
10303
- ) -> dict[str, Any]:
9191
+ async def reporting_get_survey_report(self, survey_id, fields=None, exclude_fields=None) -> dict[str, Any]:
10304
9192
  """
10305
9193
  Retrieves a survey report by its ID with optional field inclusions or exclusions.
10306
9194
 
@@ -10321,18 +9209,12 @@ class MailchimpApp(APIApplication):
10321
9209
  if survey_id is None:
10322
9210
  raise ValueError("Missing required parameter 'survey_id'")
10323
9211
  url = f"{self.base_url}/reporting/surveys/{survey_id}"
10324
- query_params = {
10325
- k: v
10326
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
10327
- if v is not None
10328
- }
9212
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
10329
9213
  response = self._get(url, params=query_params)
10330
9214
  response.raise_for_status()
10331
9215
  return response.json()
10332
9216
 
10333
- def reporting_list_survey_questions_reports(
10334
- self, survey_id, fields=None, exclude_fields=None
10335
- ) -> dict[str, Any]:
9217
+ async def reporting_list_survey_questions_reports(self, survey_id, fields=None, exclude_fields=None) -> dict[str, Any]:
10336
9218
  """
10337
9219
  Fetches a list of survey question reports for a specified survey, with optional control over included or excluded fields.
10338
9220
 
@@ -10354,18 +9236,12 @@ class MailchimpApp(APIApplication):
10354
9236
  if survey_id is None:
10355
9237
  raise ValueError("Missing required parameter 'survey_id'")
10356
9238
  url = f"{self.base_url}/reporting/surveys/{survey_id}/questions"
10357
- query_params = {
10358
- k: v
10359
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
10360
- if v is not None
10361
- }
9239
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
10362
9240
  response = self._get(url, params=query_params)
10363
9241
  response.raise_for_status()
10364
9242
  return response.json()
10365
9243
 
10366
- def reporting_survey_question_report(
10367
- self, survey_id, question_id, fields=None, exclude_fields=None
10368
- ) -> dict[str, Any]:
9244
+ async def reporting_survey_question_report(self, survey_id, question_id, fields=None, exclude_fields=None) -> dict[str, Any]:
10369
9245
  """
10370
9246
  Retrieves a detailed report for a specific survey question, with optional field filtering.
10371
9247
 
@@ -10390,22 +9266,13 @@ class MailchimpApp(APIApplication):
10390
9266
  if question_id is None:
10391
9267
  raise ValueError("Missing required parameter 'question_id'")
10392
9268
  url = f"{self.base_url}/reporting/surveys/{survey_id}/questions/{question_id}"
10393
- query_params = {
10394
- k: v
10395
- for k, v in [("fields", fields), ("exclude_fields", exclude_fields)]
10396
- if v is not None
10397
- }
9269
+ query_params = {k: v for k, v in [("fields", fields), ("exclude_fields", exclude_fields)] if v is not None}
10398
9270
  response = self._get(url, params=query_params)
10399
9271
  response.raise_for_status()
10400
9272
  return response.json()
10401
9273
 
10402
- def reporting_survey_question_answers_list(
10403
- self,
10404
- survey_id,
10405
- question_id,
10406
- fields=None,
10407
- exclude_fields=None,
10408
- respondent_familiarity_is=None,
9274
+ async def reporting_survey_question_answers_list(
9275
+ self, survey_id, question_id, fields=None, exclude_fields=None, respondent_familiarity_is=None
10409
9276
  ) -> dict[str, Any]:
10410
9277
  """
10411
9278
  Retrieves a list of answers for a specific survey question, with optional filtering and field selection.
@@ -10434,25 +9301,15 @@ class MailchimpApp(APIApplication):
10434
9301
  url = f"{self.base_url}/reporting/surveys/{survey_id}/questions/{question_id}/answers"
10435
9302
  query_params = {
10436
9303
  k: v
10437
- for k, v in [
10438
- ("fields", fields),
10439
- ("exclude_fields", exclude_fields),
10440
- ("respondent_familiarity_is", respondent_familiarity_is),
10441
- ]
9304
+ for k, v in [("fields", fields), ("exclude_fields", exclude_fields), ("respondent_familiarity_is", respondent_familiarity_is)]
10442
9305
  if v is not None
10443
9306
  }
10444
9307
  response = self._get(url, params=query_params)
10445
9308
  response.raise_for_status()
10446
9309
  return response.json()
10447
9310
 
10448
- def reporting_survey_responses_list(
10449
- self,
10450
- survey_id,
10451
- fields=None,
10452
- exclude_fields=None,
10453
- answered_question=None,
10454
- chose_answer=None,
10455
- respondent_familiarity_is=None,
9311
+ async def reporting_survey_responses_list(
9312
+ self, survey_id, fields=None, exclude_fields=None, answered_question=None, chose_answer=None, respondent_familiarity_is=None
10456
9313
  ) -> dict[str, Any]:
10457
9314
  """
10458
9315
  Retrieves a list of survey response data for a specified survey, with optional filtering and field selection.
@@ -10493,9 +9350,7 @@ class MailchimpApp(APIApplication):
10493
9350
  response.raise_for_status()
10494
9351
  return response.json()
10495
9352
 
10496
- def reporting_single_survey_response(
10497
- self, survey_id, response_id
10498
- ) -> dict[str, Any]:
9353
+ async def reporting_single_survey_response(self, survey_id, response_id) -> dict[str, Any]:
10499
9354
  """
10500
9355
  Retrieves detailed information for a single survey response based on the provided survey and response identifiers.
10501
9356
 
@@ -10523,7 +9378,7 @@ class MailchimpApp(APIApplication):
10523
9378
  response.raise_for_status()
10524
9379
  return response.json()
10525
9380
 
10526
- def verified_domains_get_info(self, domain_name) -> dict[str, Any]:
9381
+ async def verified_domains_get_info(self, domain_name) -> dict[str, Any]:
10527
9382
  """
10528
9383
  Retrieves information about a verified domain by its domain name.
10529
9384
 
@@ -10548,7 +9403,7 @@ class MailchimpApp(APIApplication):
10548
9403
  response.raise_for_status()
10549
9404
  return response.json()
10550
9405
 
10551
- def verified_domains_delete_domain(self, domain_name) -> Any:
9406
+ async def verified_domains_delete_domain(self, domain_name) -> Any:
10552
9407
  """
10553
9408
  Deletes a verified domain by its domain name using a DELETE request to the API endpoint.
10554
9409
 
@@ -10573,9 +9428,7 @@ class MailchimpApp(APIApplication):
10573
9428
  response.raise_for_status()
10574
9429
  return response.json()
10575
9430
 
10576
- def verified_domains_verify_domain_for_sending(
10577
- self, domain_name, code
10578
- ) -> dict[str, Any]:
9431
+ async def verified_domains_verify_domain_for_sending(self, domain_name, code) -> dict[str, Any]:
10579
9432
  """
10580
9433
  Verifies a specified domain for sending capabilities using a provided verification code.
10581
9434
 
@@ -10597,9 +9450,7 @@ class MailchimpApp(APIApplication):
10597
9450
  raise ValueError("Missing required parameter 'domain_name'")
10598
9451
  if code is None:
10599
9452
  raise ValueError("Missing required parameter 'code'")
10600
- request_body = {
10601
- "code": code,
10602
- }
9453
+ request_body = {"code": code}
10603
9454
  request_body = {k: v for k, v in request_body.items() if v is not None}
10604
9455
  url = f"{self.base_url}/verified-domains/{domain_name}/actions/verify"
10605
9456
  query_params = {}
@@ -10607,9 +9458,7 @@ class MailchimpApp(APIApplication):
10607
9458
  response.raise_for_status()
10608
9459
  return response.json()
10609
9460
 
10610
- def verified_domains_list_sending_domains(
10611
- self,
10612
- ) -> dict[str, Any]:
9461
+ async def verified_domains_list_sending_domains(self) -> dict[str, Any]:
10613
9462
  """
10614
9463
  Retrieves a list of verified sending domains associated with the account.
10615
9464
 
@@ -10631,9 +9480,7 @@ class MailchimpApp(APIApplication):
10631
9480
  response.raise_for_status()
10632
9481
  return response.json()
10633
9482
 
10634
- def verified_domains_add_domain_to_account(
10635
- self, verification_email
10636
- ) -> dict[str, Any]:
9483
+ async def verified_domains_add_domain_to_account(self, verification_email) -> dict[str, Any]:
10637
9484
  """
10638
9485
  Adds a domain to the account for verification using the provided email address.
10639
9486
 
@@ -10652,9 +9499,7 @@ class MailchimpApp(APIApplication):
10652
9499
  """
10653
9500
  if verification_email is None:
10654
9501
  raise ValueError("Missing required parameter 'verification_email'")
10655
- request_body = {
10656
- "verification_email": verification_email,
10657
- }
9502
+ request_body = {"verification_email": verification_email}
10658
9503
  request_body = {k: v for k, v in request_body.items() if v is not None}
10659
9504
  url = f"{self.base_url}/verified-domains"
10660
9505
  query_params = {}