diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
new file mode 100644
index 0000000..76cfec9
--- /dev/null
+++ b/.github/workflows/python.yml
@@ -0,0 +1,85 @@
+name: Python Release
+on:
+ push:
+ branches: [ main ]
+jobs:
+ validate:
+ name: Validate
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ strategy:
+ matrix:
+ python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install flake8 pytest
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+ if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
+
+ build:
+ name: Build
+ needs:
+ - validate
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: 3.11
+ - name: Build package
+ run: python setup.py sdist
+ - name: Store the distribution packages
+ uses: actions/upload-artifact@v4
+ with:
+ name: sdist
+ path: dist
+ release:
+ name: Release
+ needs:
+ - build
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - name: Create tag from commit
+ uses: christophebedard/tag-version-commit@v1
+ id: tag_version
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ version_regex: '([0-9]+\.[0-9]+\.[0-9]+)'
+ - name: Create a GitHub release
+ uses: ncipollo/release-action@v1
+ with:
+ tag: ${{ steps.tag_version.outputs.tag }}
+ name: Release ${{ steps.tag_version.outputs.tag }}
+ publish:
+ name: Publish python distribution
+ needs:
+ - build
+ runs-on: ubuntu-latest
+ permissions:
+ id-token: write
+ environment:
+ name: pypi
+ url: https://pypi.org/p/constant-contact-v3api
+ steps:
+ - name: Download all the dists
+ uses: actions/download-artifact@v4
+ with:
+ name: sdist
+ path: dist/
+ - name: Publish package
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ verbose: true
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ab32082
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,71 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*,cover
+.hypothesis/
+venv/
+.venv/
+.python-version
+.pytest_cache
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+#Ipython Notebook
+.ipynb_checkpoints
+
+# OpenApi Generator
+git_push.sh
+.gitlab-ci.yml
+.travis.yml
diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore
new file mode 100644
index 0000000..7484ee5
--- /dev/null
+++ b/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
new file mode 100644
index 0000000..09c256e
--- /dev/null
+++ b/.openapi-generator/FILES
@@ -0,0 +1,401 @@
+.github/workflows/python.yml
+.github/workflows/python.yml
+.gitignore
+.gitlab-ci.yml
+.openapi-generator-ignore
+CHANGELOG.md
+LICENSE
+README.md
+constant_contact_api_client/__init__.py
+constant_contact_api_client/api/__init__.py
+constant_contact_api_client/api/account_services_api.py
+constant_contact_api_client/api/bulk_activities_api.py
+constant_contact_api_client/api/contact_lists_api.py
+constant_contact_api_client/api/contact_tags_api.py
+constant_contact_api_client/api/contacts_api.py
+constant_contact_api_client/api/contacts_custom_fields_api.py
+constant_contact_api_client/api/contacts_reporting_api.py
+constant_contact_api_client/api/email_campaigns_ab_tests_api.py
+constant_contact_api_client/api/email_campaigns_api.py
+constant_contact_api_client/api/email_reporting_api.py
+constant_contact_api_client/api/email_scheduling_api.py
+constant_contact_api_client/api/landing_pages_reporting_api.py
+constant_contact_api_client/api/segments_api.py
+constant_contact_api_client/api_client.py
+constant_contact_api_client/api_response.py
+constant_contact_api_client/configuration.py
+constant_contact_api_client/exceptions.py
+constant_contact_api_client/models/__init__.py
+constant_contact_api_client/models/ab_test_data.py
+constant_contact_api_client/models/access_token_response.py
+constant_contact_api_client/models/account_cancellation.py
+constant_contact_api_client/models/account_email_create_response.py
+constant_contact_api_client/models/account_email_input.py
+constant_contact_api_client/models/account_physical_address.py
+constant_contact_api_client/models/account_suspension.py
+constant_contact_api_client/models/activities.py
+constant_contact_api_client/models/activity.py
+constant_contact_api_client/models/activity_delete_custom_fields.py
+constant_contact_api_client/models/activity_delete_list_response.py
+constant_contact_api_client/models/activity_delete_lists_response.py
+constant_contact_api_client/models/activity_delete_status.py
+constant_contact_api_client/models/activity_errors.py
+constant_contact_api_client/models/activity_export_status.py
+constant_contact_api_client/models/activity_generic.py
+constant_contact_api_client/models/activity_generic_status.py
+constant_contact_api_client/models/activity_import.py
+constant_contact_api_client/models/activity_links.py
+constant_contact_api_client/models/activity_lists_membership.py
+constant_contact_api_client/models/activity_reference.py
+constant_contact_api_client/models/activity_status.py
+constant_contact_api_client/models/activity_status_export_link.py
+constant_contact_api_client/models/activity_status_link.py
+constant_contact_api_client/models/activity_tagging.py
+constant_contact_api_client/models/activity_tagging_status.py
+constant_contact_api_client/models/add_account_email_address201_response.py
+constant_contact_api_client/models/add_account_email_address_request.py
+constant_contact_api_client/models/api_error_schema_inner.py
+constant_contact_api_client/models/authorization_error_schema.py
+constant_contact_api_client/models/bounces_tracking_activities_page.py
+constant_contact_api_client/models/bounces_tracking_activity.py
+constant_contact_api_client/models/bulk_email_campaign_summaries_page.py
+constant_contact_api_client/models/bulk_email_campaign_summaries_percents.py
+constant_contact_api_client/models/bulk_email_campaign_summary.py
+constant_contact_api_client/models/campaign_activity_stats_query_result_email.py
+constant_contact_api_client/models/campaign_activity_stats_result_generic_stats_email_activity.py
+constant_contact_api_client/models/campaign_activity_summary.py
+constant_contact_api_client/models/campaign_stats_query_result_email.py
+constant_contact_api_client/models/campaign_stats_result_generic_stats_email_percents_email.py
+constant_contact_api_client/models/clicks_tracking_activities_page.py
+constant_contact_api_client/models/clicks_tracking_activity.py
+constant_contact_api_client/models/company_logo.py
+constant_contact_api_client/models/contact_campaign_activities_summary.py
+constant_contact_api_client/models/contact_create_or_update_input.py
+constant_contact_api_client/models/contact_create_or_update_response.py
+constant_contact_api_client/models/contact_custom_field.py
+constant_contact_api_client/models/contact_delete.py
+constant_contact_api_client/models/contact_list.py
+constant_contact_api_client/models/contact_list_array.py
+constant_contact_api_client/models/contact_list_put_post.py
+constant_contact_api_client/models/contact_open_and_click_rates.py
+constant_contact_api_client/models/contact_post_request.py
+constant_contact_api_client/models/contact_put_request.py
+constant_contact_api_client/models/contact_resource.py
+constant_contact_api_client/models/contact_tracking_activities_page.py
+constant_contact_api_client/models/contact_tracking_activity.py
+constant_contact_api_client/models/contact_xref.py
+constant_contact_api_client/models/contact_xrefs.py
+constant_contact_api_client/models/contacts.py
+constant_contact_api_client/models/contacts_counts.py
+constant_contact_api_client/models/contacts_export.py
+constant_contact_api_client/models/contacts_json_import.py
+constant_contact_api_client/models/create_contact_request.py
+constant_contact_api_client/models/create_contact_request_email_address.py
+constant_contact_api_client/models/create_csv_import_activity201_response.py
+constant_contact_api_client/models/create_csv_import_activity201_response_links.py
+constant_contact_api_client/models/create_csv_import_activity201_response_status.py
+constant_contact_api_client/models/create_delete_activity201_response.py
+constant_contact_api_client/models/create_delete_activity201_response_links.py
+constant_contact_api_client/models/create_delete_activity201_response_links_self.py
+constant_contact_api_client/models/create_delete_activity201_response_status.py
+constant_contact_api_client/models/create_delete_activity_request.py
+constant_contact_api_client/models/create_email_campaign200_response.py
+constant_contact_api_client/models/create_email_campaign200_response_campaign_activities_inner.py
+constant_contact_api_client/models/create_email_campaign_request.py
+constant_contact_api_client/models/create_email_campaign_request_email_campaign_activities_inner.py
+constant_contact_api_client/models/create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer.py
+constant_contact_api_client/models/create_export_activity201_response.py
+constant_contact_api_client/models/create_export_activity201_response_status.py
+constant_contact_api_client/models/create_export_activity_request.py
+constant_contact_api_client/models/create_import_json_activity_request.py
+constant_contact_api_client/models/create_import_json_activity_request_import_data_inner.py
+constant_contact_api_client/models/create_list_add_activity_request.py
+constant_contact_api_client/models/create_list_add_activity_request_exclude.py
+constant_contact_api_client/models/create_list_add_activity_request_source.py
+constant_contact_api_client/models/create_list_delete_activity201_response.py
+constant_contact_api_client/models/create_list_delete_activity201_response_links.py
+constant_contact_api_client/models/create_list_delete_activity201_response_links_self.py
+constant_contact_api_client/models/create_list_delete_activity201_response_status.py
+constant_contact_api_client/models/create_list_delete_activity_request.py
+constant_contact_api_client/models/create_list_remove_activity201_response.py
+constant_contact_api_client/models/create_list_remove_activity201_response_status.py
+constant_contact_api_client/models/create_list_remove_activity_request.py
+constant_contact_api_client/models/create_list_remove_activity_request_exclude.py
+constant_contact_api_client/models/create_list_remove_activity_request_source.py
+constant_contact_api_client/models/create_or_update_contact200_response.py
+constant_contact_api_client/models/create_or_update_contact_custom_field.py
+constant_contact_api_client/models/create_or_update_contact_request.py
+constant_contact_api_client/models/create_or_update_contact_request_custom_fields_inner.py
+constant_contact_api_client/models/create_or_update_contact_request_street_address.py
+constant_contact_api_client/models/create_resend_email_campaign201_response.py
+constant_contact_api_client/models/create_resend_email_campaign_request.py
+constant_contact_api_client/models/create_segment201_response.py
+constant_contact_api_client/models/create_segment_request.py
+constant_contact_api_client/models/create_tag_delete_activity_request.py
+constant_contact_api_client/models/create_tag_remove_activity201_response.py
+constant_contact_api_client/models/create_tag_remove_activity201_response_links.py
+constant_contact_api_client/models/create_tag_remove_activity201_response_links_results.py
+constant_contact_api_client/models/create_tag_remove_activity201_response_links_self.py
+constant_contact_api_client/models/create_tag_remove_activity201_response_status.py
+constant_contact_api_client/models/create_tag_remove_activity_request.py
+constant_contact_api_client/models/create_tag_remove_activity_request_exclude.py
+constant_contact_api_client/models/create_tag_remove_activity_request_source.py
+constant_contact_api_client/models/cross_reference.py
+constant_contact_api_client/models/cross_reference_response.py
+constant_contact_api_client/models/custom_field_id100.py
+constant_contact_api_client/models/custom_field_input.py
+constant_contact_api_client/models/custom_field_resource.py
+constant_contact_api_client/models/custom_fields.py
+constant_contact_api_client/models/customer.py
+constant_contact_api_client/models/customer_put.py
+constant_contact_api_client/models/delete_list202_response.py
+constant_contact_api_client/models/delete_tag202_response.py
+constant_contact_api_client/models/delete_tag202_response_activity_errors_inner.py
+constant_contact_api_client/models/delete_tag202_response_links.py
+constant_contact_api_client/models/delete_tag202_response_links_self.py
+constant_contact_api_client/models/delete_tag202_response_status.py
+constant_contact_api_client/models/device_flow_response.py
+constant_contact_api_client/models/did_not_opens_tracking_activities_page.py
+constant_contact_api_client/models/did_not_opens_tracking_activity.py
+constant_contact_api_client/models/email_address.py
+constant_contact_api_client/models/email_address_post.py
+constant_contact_api_client/models/email_address_put.py
+constant_contact_api_client/models/email_campaign.py
+constant_contact_api_client/models/email_campaign_activity.py
+constant_contact_api_client/models/email_campaign_activity_input.py
+constant_contact_api_client/models/email_campaign_activity_preview.py
+constant_contact_api_client/models/email_campaign_complete.py
+constant_contact_api_client/models/email_campaign_name.py
+constant_contact_api_client/models/email_campaigns.py
+constant_contact_api_client/models/email_link_click_count.py
+constant_contact_api_client/models/email_links.py
+constant_contact_api_client/models/email_physical_address.py
+constant_contact_api_client/models/email_schedule_input.py
+constant_contact_api_client/models/email_test_send_input.py
+constant_contact_api_client/models/emails_link.py
+constant_contact_api_client/models/emails_paging_links.py
+constant_contact_api_client/models/file_object.py
+constant_contact_api_client/models/file_status_array_inner.py
+constant_contact_api_client/models/forwards_tracking_activities_page.py
+constant_contact_api_client/models/forwards_tracking_activity.py
+constant_contact_api_client/models/get_ab_test_email_campaign200_response.py
+constant_contact_api_client/models/get_account_details200_response.py
+constant_contact_api_client/models/get_account_details200_response_company_logo.py
+constant_contact_api_client/models/get_account_details200_response_physical_address.py
+constant_contact_api_client/models/get_activity_by_id200_response.py
+constant_contact_api_client/models/get_all_account_email_addresses200_response_inner.py
+constant_contact_api_client/models/get_all_activities200_response.py
+constant_contact_api_client/models/get_all_activities200_response_activities_inner.py
+constant_contact_api_client/models/get_all_activities200_response_activities_inner_links.py
+constant_contact_api_client/models/get_all_activities200_response_activities_inner_links_results.py
+constant_contact_api_client/models/get_all_activities200_response_activities_inner_links_self.py
+constant_contact_api_client/models/get_all_activities200_response_activities_inner_status.py
+constant_contact_api_client/models/get_all_activities200_response_links.py
+constant_contact_api_client/models/get_all_activities200_response_links_next.py
+constant_contact_api_client/models/get_all_contacts200_response.py
+constant_contact_api_client/models/get_all_custom_fields200_response.py
+constant_contact_api_client/models/get_all_email_campaigns200_response.py
+constant_contact_api_client/models/get_all_email_campaigns200_response_campaigns_inner.py
+constant_contact_api_client/models/get_all_email_campaigns200_response_links.py
+constant_contact_api_client/models/get_all_lists200_response.py
+constant_contact_api_client/models/get_all_segments200_response.py
+constant_contact_api_client/models/get_all_segments200_response_links.py
+constant_contact_api_client/models/get_all_segments200_response_links_next.py
+constant_contact_api_client/models/get_all_segments200_response_segments_inner.py
+constant_contact_api_client/models/get_all_tags200_response.py
+constant_contact_api_client/models/get_all_tags200_response_links.py
+constant_contact_api_client/models/get_all_tags200_response_links_next.py
+constant_contact_api_client/models/get_all_tags200_response_links_next_next.py
+constant_contact_api_client/models/get_bounces_report200_response.py
+constant_contact_api_client/models/get_bounces_report200_response_links.py
+constant_contact_api_client/models/get_bounces_report200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_campaign_activity_link_report200_response.py
+constant_contact_api_client/models/get_campaign_activity_link_report200_response_link_click_counts_inner.py
+constant_contact_api_client/models/get_clicks_report200_response.py
+constant_contact_api_client/models/get_clicks_report200_response_links.py
+constant_contact_api_client/models/get_clicks_report200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_contact_adds200_response.py
+constant_contact_api_client/models/get_contact_adds200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_contact_by_id200_response.py
+constant_contact_api_client/models/get_contact_by_id200_response_custom_fields_inner.py
+constant_contact_api_client/models/get_contact_by_id200_response_email_address.py
+constant_contact_api_client/models/get_contact_by_id200_response_notes_inner.py
+constant_contact_api_client/models/get_contact_by_id200_response_phone_numbers_inner.py
+constant_contact_api_client/models/get_contact_by_id200_response_sms_channel.py
+constant_contact_api_client/models/get_contact_by_id200_response_sms_channel_sms_channel_consents_inner.py
+constant_contact_api_client/models/get_contact_by_id200_response_street_addresses_inner.py
+constant_contact_api_client/models/get_contact_counts200_response.py
+constant_contact_api_client/models/get_contact_id_xrefs200_response.py
+constant_contact_api_client/models/get_contact_id_xrefs200_response_xrefs_inner.py
+constant_contact_api_client/models/get_contact_open_click_rate_report200_response.py
+constant_contact_api_client/models/get_contact_tracking_count_report200_response.py
+constant_contact_api_client/models/get_contact_tracking_count_report200_response_campaign_activities_inner.py
+constant_contact_api_client/models/get_contact_tracking_count_report200_response_links.py
+constant_contact_api_client/models/get_contact_tracking_report200_response.py
+constant_contact_api_client/models/get_contact_tracking_report200_response_links.py
+constant_contact_api_client/models/get_contact_tracking_report200_response_links_next.py
+constant_contact_api_client/models/get_contact_tracking_report200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_custom_field200_response.py
+constant_contact_api_client/models/get_did_not_opens_report200_response.py
+constant_contact_api_client/models/get_did_not_opens_report200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_email_campaign_activity200_response.py
+constant_contact_api_client/models/get_email_campaign_activity200_response_document_properties.py
+constant_contact_api_client/models/get_email_campaign_activity200_response_physical_address_in_footer.py
+constant_contact_api_client/models/get_email_campaign_activity_preview200_response.py
+constant_contact_api_client/models/get_email_campaign_activity_report200_response.py
+constant_contact_api_client/models/get_email_campaign_activity_report200_response_results_inner.py
+constant_contact_api_client/models/get_email_campaign_activity_report200_response_results_inner_stats.py
+constant_contact_api_client/models/get_email_campaign_activity_schedule200_response_inner.py
+constant_contact_api_client/models/get_email_campaign_activity_send_history200_response_inner.py
+constant_contact_api_client/models/get_email_campaign_report200_response.py
+constant_contact_api_client/models/get_email_campaign_report200_response_aggregate_percents.py
+constant_contact_api_client/models/get_email_campaign_report200_response_bulk_email_campaign_summaries_inner.py
+constant_contact_api_client/models/get_email_campaign_report200_response_bulk_email_campaign_summaries_inner_unique_counts.py
+constant_contact_api_client/models/get_email_campaign_xrefs200_response.py
+constant_contact_api_client/models/get_email_campaign_xrefs200_response_xrefs_inner.py
+constant_contact_api_client/models/get_email_opens_report200_response.py
+constant_contact_api_client/models/get_email_opens_report200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_email_sends_report200_response.py
+constant_contact_api_client/models/get_email_sends_report200_response_links.py
+constant_contact_api_client/models/get_email_sends_report200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_email_stats_report200_response.py
+constant_contact_api_client/models/get_email_stats_report200_response_errors_inner.py
+constant_contact_api_client/models/get_email_stats_report200_response_results_inner.py
+constant_contact_api_client/models/get_email_stats_report200_response_results_inner_percents.py
+constant_contact_api_client/models/get_email_stats_report200_response_results_inner_stats.py
+constant_contact_api_client/models/get_forwards_report200_response.py
+constant_contact_api_client/models/get_forwards_report200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_list200_response.py
+constant_contact_api_client/models/get_list_id_xrefs200_response.py
+constant_contact_api_client/models/get_list_id_xrefs200_response_xrefs_inner.py
+constant_contact_api_client/models/get_optouts_report200_response.py
+constant_contact_api_client/models/get_optouts_report200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_resend_email_campaign200_response_inner.py
+constant_contact_api_client/models/get_sms_engagement_history200_response_inner.py
+constant_contact_api_client/models/get_sms_engagement_history200_response_inner_history_details.py
+constant_contact_api_client/models/get_tag200_response.py
+constant_contact_api_client/models/get_unique_contact_clicks200_response.py
+constant_contact_api_client/models/get_unique_contact_clicks200_response_links.py
+constant_contact_api_client/models/get_unique_contact_clicks200_response_links_next.py
+constant_contact_api_client/models/get_unique_contact_clicks200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel.py
+constant_contact_api_client/models/get_unique_contact_opens200_response.py
+constant_contact_api_client/models/get_unique_contact_opens200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_unique_contact_sms_opt_ins200_response.py
+constant_contact_api_client/models/get_unique_contact_sms_opt_ins200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_unique_contact_updates200_response.py
+constant_contact_api_client/models/get_unique_contact_updates200_response_tracking_activities_inner.py
+constant_contact_api_client/models/get_user_privileges200_response_inner.py
+constant_contact_api_client/models/headers_object.py
+constant_contact_api_client/models/history_details.py
+constant_contact_api_client/models/json_import_contact.py
+constant_contact_api_client/models/link.py
+constant_contact_api_client/models/links.py
+constant_contact_api_client/models/list_activity_add_contacts.py
+constant_contact_api_client/models/list_activity_remove_contacts.py
+constant_contact_api_client/models/list_id_list100.py
+constant_contact_api_client/models/list_input.py
+constant_contact_api_client/models/list_xref.py
+constant_contact_api_client/models/list_xrefs.py
+constant_contact_api_client/models/lpreporting_links.py
+constant_contact_api_client/models/lpreporting_next.py
+constant_contact_api_client/models/my_library_file_collection_inner.py
+constant_contact_api_client/models/my_library_file_collection_inner_thumbnail.py
+constant_contact_api_client/models/next.py
+constant_contact_api_client/models/note.py
+constant_contact_api_client/models/o_auth_error.py
+constant_contact_api_client/models/opens_tracking_activities_page.py
+constant_contact_api_client/models/opens_tracking_activity.py
+constant_contact_api_client/models/optouts_tracking_activities_page.py
+constant_contact_api_client/models/optouts_tracking_activity.py
+constant_contact_api_client/models/p_contact_add_tracking_activities_page.py
+constant_contact_api_client/models/p_contact_add_tracking_activity.py
+constant_contact_api_client/models/p_contact_click_tracking_activities_page.py
+constant_contact_api_client/models/p_contact_click_tracking_activity.py
+constant_contact_api_client/models/p_contact_open_tracking_activity.py
+constant_contact_api_client/models/p_contact_opens_tracking_activities_page.py
+constant_contact_api_client/models/p_contact_sms_opt_in_tracking_activities_page.py
+constant_contact_api_client/models/p_contact_sms_opt_in_tracking_activity.py
+constant_contact_api_client/models/p_contact_update_tracking_activities_page.py
+constant_contact_api_client/models/p_contact_update_tracking_activity.py
+constant_contact_api_client/models/paged_email_campaign_response.py
+constant_contact_api_client/models/pagination_links.py
+constant_contact_api_client/models/pagination_links_next.py
+constant_contact_api_client/models/paging_links.py
+constant_contact_api_client/models/partner_account.py
+constant_contact_api_client/models/partner_account_links.py
+constant_contact_api_client/models/partner_account_operations_request.py
+constant_contact_api_client/models/partner_account_operations_request_account_operation_headers_inner.py
+constant_contact_api_client/models/partner_account_operations_request_account_operation_path_parameters_inner.py
+constant_contact_api_client/models/partner_account_operations_request_account_operation_query_parameters_inner.py
+constant_contact_api_client/models/partner_account_site_owner_list_inner.py
+constant_contact_api_client/models/partners_link.py
+constant_contact_api_client/models/patch_email_campaign_name_request.py
+constant_contact_api_client/models/path_param_object.py
+constant_contact_api_client/models/percents_email.py
+constant_contact_api_client/models/phone_number.py
+constant_contact_api_client/models/phone_number_put.py
+constant_contact_api_client/models/plan_info.py
+constant_contact_api_client/models/plan_tiers_object.py
+constant_contact_api_client/models/plan_tiers_object_current_tiers_inner.py
+constant_contact_api_client/models/post_custom_field_delete201_response.py
+constant_contact_api_client/models/post_custom_field_delete_request.py
+constant_contact_api_client/models/post_tag_request.py
+constant_contact_api_client/models/provision.py
+constant_contact_api_client/models/provision_response.py
+constant_contact_api_client/models/put_tag_request.py
+constant_contact_api_client/models/query_param_object.py
+constant_contact_api_client/models/reporting_links.py
+constant_contact_api_client/models/reporting_next.py
+constant_contact_api_client/models/resend_to_non_openers_input.py
+constant_contact_api_client/models/resend_to_non_openers_object.py
+constant_contact_api_client/models/schedule_email_campaign_activity_request.py
+constant_contact_api_client/models/segment_data.py
+constant_contact_api_client/models/segment_detail.py
+constant_contact_api_client/models/segment_master.py
+constant_contact_api_client/models/segment_name.py
+constant_contact_api_client/models/segments_dto.py
+constant_contact_api_client/models/sends_tracking_activities_page.py
+constant_contact_api_client/models/sends_tracking_activity.py
+constant_contact_api_client/models/sms_channel_consent_details.py
+constant_contact_api_client/models/sso_user.py
+constant_contact_api_client/models/stats_email.py
+constant_contact_api_client/models/stats_email_activity.py
+constant_contact_api_client/models/stats_error.py
+constant_contact_api_client/models/street_address.py
+constant_contact_api_client/models/street_address_put.py
+constant_contact_api_client/models/tag.py
+constant_contact_api_client/models/tag_add_remove_contacts.py
+constant_contact_api_client/models/tag_id_list500_limit.py
+constant_contact_api_client/models/tag_post.py
+constant_contact_api_client/models/tag_put.py
+constant_contact_api_client/models/tags.py
+constant_contact_api_client/models/tags_activity_links.py
+constant_contact_api_client/models/tags_links.py
+constant_contact_api_client/models/tags_paging_links.py
+constant_contact_api_client/models/test_send_email_campaign_activity_request.py
+constant_contact_api_client/models/tier_object.py
+constant_contact_api_client/models/tracking_activity_sms_channel_dto.py
+constant_contact_api_client/models/unique_email_counts.py
+constant_contact_api_client/models/update_account_request.py
+constant_contact_api_client/models/update_contact_request.py
+constant_contact_api_client/models/update_contact_request_email_address.py
+constant_contact_api_client/models/update_contact_request_phone_numbers_inner.py
+constant_contact_api_client/models/update_contact_request_street_addresses_inner.py
+constant_contact_api_client/models/update_custom_field_request.py
+constant_contact_api_client/models/update_list200_response.py
+constant_contact_api_client/models/update_list_request.py
+constant_contact_api_client/models/update_segment_name_request.py
+constant_contact_api_client/models/webhooks_subscription_body.py
+constant_contact_api_client/models/webhooks_subscription_collection_inner.py
+constant_contact_api_client/models/webhooks_subscription_put_resp.py
+constant_contact_api_client/models/webhooks_subscription_response.py
+constant_contact_api_client/models/webhooks_test_send.py
+constant_contact_api_client/py.typed
+constant_contact_api_client/rest.py
+pyproject.toml
+requirements.txt
+setup.cfg
+setup.py
+test-requirements.txt
+tox.ini
diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION
new file mode 100644
index 0000000..4b49d9b
--- /dev/null
+++ b/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.2.0
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..5a57ddd
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,48 @@
+# Constant Contact Python API Client
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/).
+
+## 1.0.95 - 2024-10-03
+
+## 1.0.94 - 2024-10-03
+
+## 1.0.93 - 2024-10-03
+
+## 1.0.92 - 2024-10-03
+
+## 1.0.91 - 2024-10-03
+
+## 1.0.90 - 2024-10-01
+
+## 1.0.89 - 2024-10-01
+
+## 1.0.88 - 2024-10-01
+
+## 1.0.87 - 2024-10-01
+
+## 1.0.85 - 2024-10-01
+
+## 1.0.83 - 2024-10-01
+
+## 1.0.82 - 2024-09-30
+
+## 1.0.81 - 2024-09-30
+
+## 1.0.77 - 2024-09-30
+
+## 1.0.76 - 2024-09-30
+
+## 1.0.74 - 2024-09-23
+
+## 1.0.73 - 2024-09-20
+
+## 1.0.71 - 2024-09-19
+
+## 1.0.69 - 2024-05-21
+
+## 1.0.68 - 2024-05-08
+
+## 1.0.67 - 2024-04-24
+
+## 1.0.63 - 2024-03-29
diff --git a/LICENSE b/LICENSE
index 6149c73..e9d9368 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,20 +1,21 @@
BSD 3-Clause License
-Copyright (c) 2024, Constant Contact
+Copyright (c) 2022, Constant-Contact-Public-API
+All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
+list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -25,4 +26,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/README.md b/README.md
index 64e4126..b35849a 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,56 @@
-# constant-contact-v3api-client-python
-Repo for public-api python SDK
+# Constant Contact V3 API Python client SDK
+ Swagger build version 3.0.2475
+
+This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
+
+- API version: 1.0.97
+- Package version: 1.0.0
+- Build package: org.openapitools.codegen.languages.PythonClientCodegen
+
+## Requirements.
+
+Python 3.7+
+
+## Installation & Usage
+### pip install
+
+You can install directly using:
+
+```sh
+pip install git+https://github.com/constantcontact/constant-contact-v3api-client-python.git
+```
+(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/constantcontact/constant-contact-v3api-client-python.git`)
+
+Then import the package:
+```python
+import constant_contact_api_client
+```
+
+### Setuptools
+
+Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
+
+```sh
+python setup.py install --user
+```
+(or `sudo python setup.py install` to install the package for all users)
+
+Then import the package:
+```python
+import constant_contact_api_client
+```
+## Getting Started
+This example demonstrates using an access token to send a request.
+> You will need to provide a valid access token to successfully send API requests.
+```python
+from constant_contact_api_client import Configuration, ApiException, ApiClient, EmailCampaignsApi
+
+configuration = Configuration(access_token='eyJraW...')
+api_client = ApiClient(configuration=configuration)
+emails_api = EmailCampaignsApi(api_client=api_client)
+try:
+ emails = emails_api.get_all_email_campaigns
+except ApiException as e:
+ print(e)
+```
+The following example is to use a webserver oauth2 client to get a V3 API access token and refresh it whenever necessary
diff --git a/constant_contact_api_client/__init__.py b/constant_contact_api_client/__init__.py
new file mode 100644
index 0000000..76ad413
--- /dev/null
+++ b/constant_contact_api_client/__init__.py
@@ -0,0 +1,411 @@
+# coding: utf-8
+
+# flake8: noqa
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+__version__ = "1.0.0"
+
+# import apis into sdk package
+from constant_contact_api_client.api.account_services_api import AccountServicesApi
+from constant_contact_api_client.api.bulk_activities_api import BulkActivitiesApi
+from constant_contact_api_client.api.contact_lists_api import ContactListsApi
+from constant_contact_api_client.api.contact_tags_api import ContactTagsApi
+from constant_contact_api_client.api.contacts_api import ContactsApi
+from constant_contact_api_client.api.contacts_custom_fields_api import ContactsCustomFieldsApi
+from constant_contact_api_client.api.contacts_reporting_api import ContactsReportingApi
+from constant_contact_api_client.api.email_campaigns_api import EmailCampaignsApi
+from constant_contact_api_client.api.email_campaigns_ab_tests_api import EmailCampaignsABTestsApi
+from constant_contact_api_client.api.email_reporting_api import EmailReportingApi
+from constant_contact_api_client.api.email_scheduling_api import EmailSchedulingApi
+from constant_contact_api_client.api.landing_pages_reporting_api import LandingPagesReportingApi
+from constant_contact_api_client.api.segments_api import SegmentsApi
+
+# import ApiClient
+from constant_contact_api_client.api_response import ApiResponse
+from constant_contact_api_client.api_client import ApiClient
+from constant_contact_api_client.configuration import Configuration
+from constant_contact_api_client.exceptions import OpenApiException
+from constant_contact_api_client.exceptions import ApiTypeError
+from constant_contact_api_client.exceptions import ApiValueError
+from constant_contact_api_client.exceptions import ApiKeyError
+from constant_contact_api_client.exceptions import ApiAttributeError
+from constant_contact_api_client.exceptions import ApiException
+
+# import models into sdk package
+from constant_contact_api_client.models.ab_test_data import ABTestData
+from constant_contact_api_client.models.api_error_schema_inner import APIErrorSchemaInner
+from constant_contact_api_client.models.access_token_response import AccessTokenResponse
+from constant_contact_api_client.models.account_cancellation import AccountCancellation
+from constant_contact_api_client.models.account_email_create_response import AccountEmailCreateResponse
+from constant_contact_api_client.models.account_email_input import AccountEmailInput
+from constant_contact_api_client.models.account_physical_address import AccountPhysicalAddress
+from constant_contact_api_client.models.account_suspension import AccountSuspension
+from constant_contact_api_client.models.activities import Activities
+from constant_contact_api_client.models.activity import Activity
+from constant_contact_api_client.models.activity_delete_custom_fields import ActivityDeleteCustomFields
+from constant_contact_api_client.models.activity_delete_list_response import ActivityDeleteListResponse
+from constant_contact_api_client.models.activity_delete_lists_response import ActivityDeleteListsResponse
+from constant_contact_api_client.models.activity_delete_status import ActivityDeleteStatus
+from constant_contact_api_client.models.activity_errors import ActivityErrors
+from constant_contact_api_client.models.activity_export_status import ActivityExportStatus
+from constant_contact_api_client.models.activity_generic import ActivityGeneric
+from constant_contact_api_client.models.activity_generic_status import ActivityGenericStatus
+from constant_contact_api_client.models.activity_import import ActivityImport
+from constant_contact_api_client.models.activity_links import ActivityLinks
+from constant_contact_api_client.models.activity_lists_membership import ActivityListsMembership
+from constant_contact_api_client.models.activity_reference import ActivityReference
+from constant_contact_api_client.models.activity_status import ActivityStatus
+from constant_contact_api_client.models.activity_status_export_link import ActivityStatusExportLink
+from constant_contact_api_client.models.activity_status_link import ActivityStatusLink
+from constant_contact_api_client.models.activity_tagging import ActivityTagging
+from constant_contact_api_client.models.activity_tagging_status import ActivityTaggingStatus
+from constant_contact_api_client.models.add_account_email_address201_response import AddAccountEmailAddress201Response
+from constant_contact_api_client.models.add_account_email_address_request import AddAccountEmailAddressRequest
+from constant_contact_api_client.models.authorization_error_schema import AuthorizationErrorSchema
+from constant_contact_api_client.models.bounces_tracking_activities_page import BouncesTrackingActivitiesPage
+from constant_contact_api_client.models.bounces_tracking_activity import BouncesTrackingActivity
+from constant_contact_api_client.models.bulk_email_campaign_summaries_page import BulkEmailCampaignSummariesPage
+from constant_contact_api_client.models.bulk_email_campaign_summaries_percents import BulkEmailCampaignSummariesPercents
+from constant_contact_api_client.models.bulk_email_campaign_summary import BulkEmailCampaignSummary
+from constant_contact_api_client.models.campaign_activity_stats_query_result_email import CampaignActivityStatsQueryResultEmail
+from constant_contact_api_client.models.campaign_activity_stats_result_generic_stats_email_activity import CampaignActivityStatsResultGenericStatsEmailActivity
+from constant_contact_api_client.models.campaign_activity_summary import CampaignActivitySummary
+from constant_contact_api_client.models.campaign_stats_query_result_email import CampaignStatsQueryResultEmail
+from constant_contact_api_client.models.campaign_stats_result_generic_stats_email_percents_email import CampaignStatsResultGenericStatsEmailPercentsEmail
+from constant_contact_api_client.models.clicks_tracking_activities_page import ClicksTrackingActivitiesPage
+from constant_contact_api_client.models.clicks_tracking_activity import ClicksTrackingActivity
+from constant_contact_api_client.models.company_logo import CompanyLogo
+from constant_contact_api_client.models.contact_campaign_activities_summary import ContactCampaignActivitiesSummary
+from constant_contact_api_client.models.contact_create_or_update_input import ContactCreateOrUpdateInput
+from constant_contact_api_client.models.contact_create_or_update_response import ContactCreateOrUpdateResponse
+from constant_contact_api_client.models.contact_custom_field import ContactCustomField
+from constant_contact_api_client.models.contact_delete import ContactDelete
+from constant_contact_api_client.models.contact_list import ContactList
+from constant_contact_api_client.models.contact_list_array import ContactListArray
+from constant_contact_api_client.models.contact_list_put_post import ContactListPutPost
+from constant_contact_api_client.models.contact_open_and_click_rates import ContactOpenAndClickRates
+from constant_contact_api_client.models.contact_post_request import ContactPostRequest
+from constant_contact_api_client.models.contact_put_request import ContactPutRequest
+from constant_contact_api_client.models.contact_resource import ContactResource
+from constant_contact_api_client.models.contact_tracking_activities_page import ContactTrackingActivitiesPage
+from constant_contact_api_client.models.contact_tracking_activity import ContactTrackingActivity
+from constant_contact_api_client.models.contact_xref import ContactXref
+from constant_contact_api_client.models.contact_xrefs import ContactXrefs
+from constant_contact_api_client.models.contacts import Contacts
+from constant_contact_api_client.models.contacts_counts import ContactsCounts
+from constant_contact_api_client.models.contacts_export import ContactsExport
+from constant_contact_api_client.models.contacts_json_import import ContactsJsonImport
+from constant_contact_api_client.models.create_csv_import_activity201_response import CreateCSVImportActivity201Response
+from constant_contact_api_client.models.create_csv_import_activity201_response_links import CreateCSVImportActivity201ResponseLinks
+from constant_contact_api_client.models.create_csv_import_activity201_response_status import CreateCSVImportActivity201ResponseStatus
+from constant_contact_api_client.models.create_contact_request import CreateContactRequest
+from constant_contact_api_client.models.create_contact_request_email_address import CreateContactRequestEmailAddress
+from constant_contact_api_client.models.create_delete_activity201_response import CreateDeleteActivity201Response
+from constant_contact_api_client.models.create_delete_activity201_response_links import CreateDeleteActivity201ResponseLinks
+from constant_contact_api_client.models.create_delete_activity201_response_links_self import CreateDeleteActivity201ResponseLinksSelf
+from constant_contact_api_client.models.create_delete_activity201_response_status import CreateDeleteActivity201ResponseStatus
+from constant_contact_api_client.models.create_delete_activity_request import CreateDeleteActivityRequest
+from constant_contact_api_client.models.create_email_campaign200_response import CreateEmailCampaign200Response
+from constant_contact_api_client.models.create_email_campaign200_response_campaign_activities_inner import CreateEmailCampaign200ResponseCampaignActivitiesInner
+from constant_contact_api_client.models.create_email_campaign_request import CreateEmailCampaignRequest
+from constant_contact_api_client.models.create_email_campaign_request_email_campaign_activities_inner import CreateEmailCampaignRequestEmailCampaignActivitiesInner
+from constant_contact_api_client.models.create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer import CreateEmailCampaignRequestEmailCampaignActivitiesInnerPhysicalAddressInFooter
+from constant_contact_api_client.models.create_export_activity201_response import CreateExportActivity201Response
+from constant_contact_api_client.models.create_export_activity201_response_status import CreateExportActivity201ResponseStatus
+from constant_contact_api_client.models.create_export_activity_request import CreateExportActivityRequest
+from constant_contact_api_client.models.create_import_json_activity_request import CreateImportJSONActivityRequest
+from constant_contact_api_client.models.create_import_json_activity_request_import_data_inner import CreateImportJSONActivityRequestImportDataInner
+from constant_contact_api_client.models.create_list_add_activity_request import CreateListAddActivityRequest
+from constant_contact_api_client.models.create_list_add_activity_request_exclude import CreateListAddActivityRequestExclude
+from constant_contact_api_client.models.create_list_add_activity_request_source import CreateListAddActivityRequestSource
+from constant_contact_api_client.models.create_list_delete_activity201_response import CreateListDeleteActivity201Response
+from constant_contact_api_client.models.create_list_delete_activity201_response_links import CreateListDeleteActivity201ResponseLinks
+from constant_contact_api_client.models.create_list_delete_activity201_response_links_self import CreateListDeleteActivity201ResponseLinksSelf
+from constant_contact_api_client.models.create_list_delete_activity201_response_status import CreateListDeleteActivity201ResponseStatus
+from constant_contact_api_client.models.create_list_delete_activity_request import CreateListDeleteActivityRequest
+from constant_contact_api_client.models.create_list_remove_activity201_response import CreateListRemoveActivity201Response
+from constant_contact_api_client.models.create_list_remove_activity201_response_status import CreateListRemoveActivity201ResponseStatus
+from constant_contact_api_client.models.create_list_remove_activity_request import CreateListRemoveActivityRequest
+from constant_contact_api_client.models.create_list_remove_activity_request_exclude import CreateListRemoveActivityRequestExclude
+from constant_contact_api_client.models.create_list_remove_activity_request_source import CreateListRemoveActivityRequestSource
+from constant_contact_api_client.models.create_or_update_contact200_response import CreateOrUpdateContact200Response
+from constant_contact_api_client.models.create_or_update_contact_custom_field import CreateOrUpdateContactCustomField
+from constant_contact_api_client.models.create_or_update_contact_request import CreateOrUpdateContactRequest
+from constant_contact_api_client.models.create_or_update_contact_request_custom_fields_inner import CreateOrUpdateContactRequestCustomFieldsInner
+from constant_contact_api_client.models.create_or_update_contact_request_street_address import CreateOrUpdateContactRequestStreetAddress
+from constant_contact_api_client.models.create_resend_email_campaign201_response import CreateResendEmailCampaign201Response
+from constant_contact_api_client.models.create_resend_email_campaign_request import CreateResendEmailCampaignRequest
+from constant_contact_api_client.models.create_segment201_response import CreateSegment201Response
+from constant_contact_api_client.models.create_segment_request import CreateSegmentRequest
+from constant_contact_api_client.models.create_tag_delete_activity_request import CreateTagDeleteActivityRequest
+from constant_contact_api_client.models.create_tag_remove_activity201_response import CreateTagRemoveActivity201Response
+from constant_contact_api_client.models.create_tag_remove_activity201_response_links import CreateTagRemoveActivity201ResponseLinks
+from constant_contact_api_client.models.create_tag_remove_activity201_response_links_results import CreateTagRemoveActivity201ResponseLinksResults
+from constant_contact_api_client.models.create_tag_remove_activity201_response_links_self import CreateTagRemoveActivity201ResponseLinksSelf
+from constant_contact_api_client.models.create_tag_remove_activity201_response_status import CreateTagRemoveActivity201ResponseStatus
+from constant_contact_api_client.models.create_tag_remove_activity_request import CreateTagRemoveActivityRequest
+from constant_contact_api_client.models.create_tag_remove_activity_request_exclude import CreateTagRemoveActivityRequestExclude
+from constant_contact_api_client.models.create_tag_remove_activity_request_source import CreateTagRemoveActivityRequestSource
+from constant_contact_api_client.models.cross_reference import CrossReference
+from constant_contact_api_client.models.cross_reference_response import CrossReferenceResponse
+from constant_contact_api_client.models.custom_field_id100 import CustomFieldId100
+from constant_contact_api_client.models.custom_field_input import CustomFieldInput
+from constant_contact_api_client.models.custom_field_resource import CustomFieldResource
+from constant_contact_api_client.models.custom_fields import CustomFields
+from constant_contact_api_client.models.customer import Customer
+from constant_contact_api_client.models.customer_put import CustomerPut
+from constant_contact_api_client.models.delete_list202_response import DeleteList202Response
+from constant_contact_api_client.models.delete_tag202_response import DeleteTag202Response
+from constant_contact_api_client.models.delete_tag202_response_activity_errors_inner import DeleteTag202ResponseActivityErrorsInner
+from constant_contact_api_client.models.delete_tag202_response_links import DeleteTag202ResponseLinks
+from constant_contact_api_client.models.delete_tag202_response_links_self import DeleteTag202ResponseLinksSelf
+from constant_contact_api_client.models.delete_tag202_response_status import DeleteTag202ResponseStatus
+from constant_contact_api_client.models.device_flow_response import DeviceFlowResponse
+from constant_contact_api_client.models.did_not_opens_tracking_activities_page import DidNotOpensTrackingActivitiesPage
+from constant_contact_api_client.models.did_not_opens_tracking_activity import DidNotOpensTrackingActivity
+from constant_contact_api_client.models.email_address import EmailAddress
+from constant_contact_api_client.models.email_address_post import EmailAddressPost
+from constant_contact_api_client.models.email_address_put import EmailAddressPut
+from constant_contact_api_client.models.email_campaign import EmailCampaign
+from constant_contact_api_client.models.email_campaign_activity import EmailCampaignActivity
+from constant_contact_api_client.models.email_campaign_activity_input import EmailCampaignActivityInput
+from constant_contact_api_client.models.email_campaign_activity_preview import EmailCampaignActivityPreview
+from constant_contact_api_client.models.email_campaign_complete import EmailCampaignComplete
+from constant_contact_api_client.models.email_campaign_name import EmailCampaignName
+from constant_contact_api_client.models.email_campaigns import EmailCampaigns
+from constant_contact_api_client.models.email_link_click_count import EmailLinkClickCount
+from constant_contact_api_client.models.email_links import EmailLinks
+from constant_contact_api_client.models.email_physical_address import EmailPhysicalAddress
+from constant_contact_api_client.models.email_schedule_input import EmailScheduleInput
+from constant_contact_api_client.models.email_test_send_input import EmailTestSendInput
+from constant_contact_api_client.models.emails_link import EmailsLink
+from constant_contact_api_client.models.emails_paging_links import EmailsPagingLinks
+from constant_contact_api_client.models.file_object import FileObject
+from constant_contact_api_client.models.file_status_array_inner import FileStatusArrayInner
+from constant_contact_api_client.models.forwards_tracking_activities_page import ForwardsTrackingActivitiesPage
+from constant_contact_api_client.models.forwards_tracking_activity import ForwardsTrackingActivity
+from constant_contact_api_client.models.get_ab_test_email_campaign200_response import GetABTestEmailCampaign200Response
+from constant_contact_api_client.models.get_account_details200_response import GetAccountDetails200Response
+from constant_contact_api_client.models.get_account_details200_response_company_logo import GetAccountDetails200ResponseCompanyLogo
+from constant_contact_api_client.models.get_account_details200_response_physical_address import GetAccountDetails200ResponsePhysicalAddress
+from constant_contact_api_client.models.get_activity_by_id200_response import GetActivityById200Response
+from constant_contact_api_client.models.get_all_account_email_addresses200_response_inner import GetAllAccountEmailAddresses200ResponseInner
+from constant_contact_api_client.models.get_all_activities200_response import GetAllActivities200Response
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner import GetAllActivities200ResponseActivitiesInner
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links import GetAllActivities200ResponseActivitiesInnerLinks
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links_results import GetAllActivities200ResponseActivitiesInnerLinksResults
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links_self import GetAllActivities200ResponseActivitiesInnerLinksSelf
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_status import GetAllActivities200ResponseActivitiesInnerStatus
+from constant_contact_api_client.models.get_all_activities200_response_links import GetAllActivities200ResponseLinks
+from constant_contact_api_client.models.get_all_activities200_response_links_next import GetAllActivities200ResponseLinksNext
+from constant_contact_api_client.models.get_all_contacts200_response import GetAllContacts200Response
+from constant_contact_api_client.models.get_all_custom_fields200_response import GetAllCustomFields200Response
+from constant_contact_api_client.models.get_all_email_campaigns200_response import GetAllEmailCampaigns200Response
+from constant_contact_api_client.models.get_all_email_campaigns200_response_campaigns_inner import GetAllEmailCampaigns200ResponseCampaignsInner
+from constant_contact_api_client.models.get_all_email_campaigns200_response_links import GetAllEmailCampaigns200ResponseLinks
+from constant_contact_api_client.models.get_all_lists200_response import GetAllLists200Response
+from constant_contact_api_client.models.get_all_segments200_response import GetAllSegments200Response
+from constant_contact_api_client.models.get_all_segments200_response_links import GetAllSegments200ResponseLinks
+from constant_contact_api_client.models.get_all_segments200_response_links_next import GetAllSegments200ResponseLinksNext
+from constant_contact_api_client.models.get_all_segments200_response_segments_inner import GetAllSegments200ResponseSegmentsInner
+from constant_contact_api_client.models.get_all_tags200_response import GetAllTags200Response
+from constant_contact_api_client.models.get_all_tags200_response_links import GetAllTags200ResponseLinks
+from constant_contact_api_client.models.get_all_tags200_response_links_next import GetAllTags200ResponseLinksNext
+from constant_contact_api_client.models.get_all_tags200_response_links_next_next import GetAllTags200ResponseLinksNextNext
+from constant_contact_api_client.models.get_bounces_report200_response import GetBouncesReport200Response
+from constant_contact_api_client.models.get_bounces_report200_response_links import GetBouncesReport200ResponseLinks
+from constant_contact_api_client.models.get_bounces_report200_response_tracking_activities_inner import GetBouncesReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_campaign_activity_link_report200_response import GetCampaignActivityLinkReport200Response
+from constant_contact_api_client.models.get_campaign_activity_link_report200_response_link_click_counts_inner import GetCampaignActivityLinkReport200ResponseLinkClickCountsInner
+from constant_contact_api_client.models.get_clicks_report200_response import GetClicksReport200Response
+from constant_contact_api_client.models.get_clicks_report200_response_links import GetClicksReport200ResponseLinks
+from constant_contact_api_client.models.get_clicks_report200_response_tracking_activities_inner import GetClicksReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_contact_adds200_response import GetContactAdds200Response
+from constant_contact_api_client.models.get_contact_adds200_response_tracking_activities_inner import GetContactAdds200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_contact_by_id200_response import GetContactById200Response
+from constant_contact_api_client.models.get_contact_by_id200_response_custom_fields_inner import GetContactById200ResponseCustomFieldsInner
+from constant_contact_api_client.models.get_contact_by_id200_response_email_address import GetContactById200ResponseEmailAddress
+from constant_contact_api_client.models.get_contact_by_id200_response_notes_inner import GetContactById200ResponseNotesInner
+from constant_contact_api_client.models.get_contact_by_id200_response_phone_numbers_inner import GetContactById200ResponsePhoneNumbersInner
+from constant_contact_api_client.models.get_contact_by_id200_response_sms_channel import GetContactById200ResponseSmsChannel
+from constant_contact_api_client.models.get_contact_by_id200_response_sms_channel_sms_channel_consents_inner import GetContactById200ResponseSmsChannelSmsChannelConsentsInner
+from constant_contact_api_client.models.get_contact_by_id200_response_street_addresses_inner import GetContactById200ResponseStreetAddressesInner
+from constant_contact_api_client.models.get_contact_counts200_response import GetContactCounts200Response
+from constant_contact_api_client.models.get_contact_id_xrefs200_response import GetContactIdXrefs200Response
+from constant_contact_api_client.models.get_contact_id_xrefs200_response_xrefs_inner import GetContactIdXrefs200ResponseXrefsInner
+from constant_contact_api_client.models.get_contact_open_click_rate_report200_response import GetContactOpenClickRateReport200Response
+from constant_contact_api_client.models.get_contact_tracking_count_report200_response import GetContactTrackingCountReport200Response
+from constant_contact_api_client.models.get_contact_tracking_count_report200_response_campaign_activities_inner import GetContactTrackingCountReport200ResponseCampaignActivitiesInner
+from constant_contact_api_client.models.get_contact_tracking_count_report200_response_links import GetContactTrackingCountReport200ResponseLinks
+from constant_contact_api_client.models.get_contact_tracking_report200_response import GetContactTrackingReport200Response
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links import GetContactTrackingReport200ResponseLinks
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links_next import GetContactTrackingReport200ResponseLinksNext
+from constant_contact_api_client.models.get_contact_tracking_report200_response_tracking_activities_inner import GetContactTrackingReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_custom_field200_response import GetCustomField200Response
+from constant_contact_api_client.models.get_did_not_opens_report200_response import GetDidNotOpensReport200Response
+from constant_contact_api_client.models.get_did_not_opens_report200_response_tracking_activities_inner import GetDidNotOpensReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_email_campaign_activity200_response import GetEmailCampaignActivity200Response
+from constant_contact_api_client.models.get_email_campaign_activity200_response_document_properties import GetEmailCampaignActivity200ResponseDocumentProperties
+from constant_contact_api_client.models.get_email_campaign_activity200_response_physical_address_in_footer import GetEmailCampaignActivity200ResponsePhysicalAddressInFooter
+from constant_contact_api_client.models.get_email_campaign_activity_preview200_response import GetEmailCampaignActivityPreview200Response
+from constant_contact_api_client.models.get_email_campaign_activity_report200_response import GetEmailCampaignActivityReport200Response
+from constant_contact_api_client.models.get_email_campaign_activity_report200_response_results_inner import GetEmailCampaignActivityReport200ResponseResultsInner
+from constant_contact_api_client.models.get_email_campaign_activity_report200_response_results_inner_stats import GetEmailCampaignActivityReport200ResponseResultsInnerStats
+from constant_contact_api_client.models.get_email_campaign_activity_schedule200_response_inner import GetEmailCampaignActivitySchedule200ResponseInner
+from constant_contact_api_client.models.get_email_campaign_activity_send_history200_response_inner import GetEmailCampaignActivitySendHistory200ResponseInner
+from constant_contact_api_client.models.get_email_campaign_report200_response import GetEmailCampaignReport200Response
+from constant_contact_api_client.models.get_email_campaign_report200_response_aggregate_percents import GetEmailCampaignReport200ResponseAggregatePercents
+from constant_contact_api_client.models.get_email_campaign_report200_response_bulk_email_campaign_summaries_inner import GetEmailCampaignReport200ResponseBulkEmailCampaignSummariesInner
+from constant_contact_api_client.models.get_email_campaign_report200_response_bulk_email_campaign_summaries_inner_unique_counts import GetEmailCampaignReport200ResponseBulkEmailCampaignSummariesInnerUniqueCounts
+from constant_contact_api_client.models.get_email_campaign_xrefs200_response import GetEmailCampaignXrefs200Response
+from constant_contact_api_client.models.get_email_campaign_xrefs200_response_xrefs_inner import GetEmailCampaignXrefs200ResponseXrefsInner
+from constant_contact_api_client.models.get_email_opens_report200_response import GetEmailOpensReport200Response
+from constant_contact_api_client.models.get_email_opens_report200_response_tracking_activities_inner import GetEmailOpensReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_email_sends_report200_response import GetEmailSendsReport200Response
+from constant_contact_api_client.models.get_email_sends_report200_response_links import GetEmailSendsReport200ResponseLinks
+from constant_contact_api_client.models.get_email_sends_report200_response_tracking_activities_inner import GetEmailSendsReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_email_stats_report200_response import GetEmailStatsReport200Response
+from constant_contact_api_client.models.get_email_stats_report200_response_errors_inner import GetEmailStatsReport200ResponseErrorsInner
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner import GetEmailStatsReport200ResponseResultsInner
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner_percents import GetEmailStatsReport200ResponseResultsInnerPercents
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner_stats import GetEmailStatsReport200ResponseResultsInnerStats
+from constant_contact_api_client.models.get_forwards_report200_response import GetForwardsReport200Response
+from constant_contact_api_client.models.get_forwards_report200_response_tracking_activities_inner import GetForwardsReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_list200_response import GetList200Response
+from constant_contact_api_client.models.get_list_id_xrefs200_response import GetListIdXrefs200Response
+from constant_contact_api_client.models.get_list_id_xrefs200_response_xrefs_inner import GetListIdXrefs200ResponseXrefsInner
+from constant_contact_api_client.models.get_optouts_report200_response import GetOptoutsReport200Response
+from constant_contact_api_client.models.get_optouts_report200_response_tracking_activities_inner import GetOptoutsReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_resend_email_campaign200_response_inner import GetResendEmailCampaign200ResponseInner
+from constant_contact_api_client.models.get_sms_engagement_history200_response_inner import GetSmsEngagementHistory200ResponseInner
+from constant_contact_api_client.models.get_sms_engagement_history200_response_inner_history_details import GetSmsEngagementHistory200ResponseInnerHistoryDetails
+from constant_contact_api_client.models.get_tag200_response import GetTag200Response
+from constant_contact_api_client.models.get_unique_contact_clicks200_response import GetUniqueContactClicks200Response
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links_next import GetUniqueContactClicks200ResponseLinksNext
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner import GetUniqueContactClicks200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+from constant_contact_api_client.models.get_unique_contact_opens200_response import GetUniqueContactOpens200Response
+from constant_contact_api_client.models.get_unique_contact_opens200_response_tracking_activities_inner import GetUniqueContactOpens200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_unique_contact_sms_opt_ins200_response import GetUniqueContactSMSOptIns200Response
+from constant_contact_api_client.models.get_unique_contact_sms_opt_ins200_response_tracking_activities_inner import GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_unique_contact_updates200_response import GetUniqueContactUpdates200Response
+from constant_contact_api_client.models.get_unique_contact_updates200_response_tracking_activities_inner import GetUniqueContactUpdates200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_user_privileges200_response_inner import GetUserPrivileges200ResponseInner
+from constant_contact_api_client.models.headers_object import HeadersObject
+from constant_contact_api_client.models.history_details import HistoryDetails
+from constant_contact_api_client.models.json_import_contact import JsonImportContact
+from constant_contact_api_client.models.link import Link
+from constant_contact_api_client.models.links import Links
+from constant_contact_api_client.models.list_activity_add_contacts import ListActivityAddContacts
+from constant_contact_api_client.models.list_activity_remove_contacts import ListActivityRemoveContacts
+from constant_contact_api_client.models.list_id_list100 import ListIdList100
+from constant_contact_api_client.models.list_input import ListInput
+from constant_contact_api_client.models.list_xref import ListXref
+from constant_contact_api_client.models.list_xrefs import ListXrefs
+from constant_contact_api_client.models.lpreporting_links import LpreportingLinks
+from constant_contact_api_client.models.lpreporting_next import LpreportingNext
+from constant_contact_api_client.models.my_library_file_collection_inner import MyLibraryFileCollectionInner
+from constant_contact_api_client.models.my_library_file_collection_inner_thumbnail import MyLibraryFileCollectionInnerThumbnail
+from constant_contact_api_client.models.next import Next
+from constant_contact_api_client.models.note import Note
+from constant_contact_api_client.models.o_auth_error import OAuthError
+from constant_contact_api_client.models.opens_tracking_activities_page import OpensTrackingActivitiesPage
+from constant_contact_api_client.models.opens_tracking_activity import OpensTrackingActivity
+from constant_contact_api_client.models.optouts_tracking_activities_page import OptoutsTrackingActivitiesPage
+from constant_contact_api_client.models.optouts_tracking_activity import OptoutsTrackingActivity
+from constant_contact_api_client.models.p_contact_add_tracking_activities_page import PContactAddTrackingActivitiesPage
+from constant_contact_api_client.models.p_contact_add_tracking_activity import PContactAddTrackingActivity
+from constant_contact_api_client.models.p_contact_click_tracking_activities_page import PContactClickTrackingActivitiesPage
+from constant_contact_api_client.models.p_contact_click_tracking_activity import PContactClickTrackingActivity
+from constant_contact_api_client.models.p_contact_open_tracking_activity import PContactOpenTrackingActivity
+from constant_contact_api_client.models.p_contact_opens_tracking_activities_page import PContactOpensTrackingActivitiesPage
+from constant_contact_api_client.models.p_contact_sms_opt_in_tracking_activities_page import PContactSMSOptInTrackingActivitiesPage
+from constant_contact_api_client.models.p_contact_sms_opt_in_tracking_activity import PContactSMSOptInTrackingActivity
+from constant_contact_api_client.models.p_contact_update_tracking_activities_page import PContactUpdateTrackingActivitiesPage
+from constant_contact_api_client.models.p_contact_update_tracking_activity import PContactUpdateTrackingActivity
+from constant_contact_api_client.models.paged_email_campaign_response import PagedEmailCampaignResponse
+from constant_contact_api_client.models.pagination_links import PaginationLinks
+from constant_contact_api_client.models.pagination_links_next import PaginationLinksNext
+from constant_contact_api_client.models.paging_links import PagingLinks
+from constant_contact_api_client.models.partner_account import PartnerAccount
+from constant_contact_api_client.models.partner_account_links import PartnerAccountLinks
+from constant_contact_api_client.models.partner_account_operations_request import PartnerAccountOperationsRequest
+from constant_contact_api_client.models.partner_account_operations_request_account_operation_headers_inner import PartnerAccountOperationsRequestAccountOperationHeadersInner
+from constant_contact_api_client.models.partner_account_operations_request_account_operation_path_parameters_inner import PartnerAccountOperationsRequestAccountOperationPathParametersInner
+from constant_contact_api_client.models.partner_account_operations_request_account_operation_query_parameters_inner import PartnerAccountOperationsRequestAccountOperationQueryParametersInner
+from constant_contact_api_client.models.partner_account_site_owner_list_inner import PartnerAccountSiteOwnerListInner
+from constant_contact_api_client.models.partners_link import PartnersLink
+from constant_contact_api_client.models.patch_email_campaign_name_request import PatchEmailCampaignNameRequest
+from constant_contact_api_client.models.path_param_object import PathParamObject
+from constant_contact_api_client.models.percents_email import PercentsEmail
+from constant_contact_api_client.models.phone_number import PhoneNumber
+from constant_contact_api_client.models.phone_number_put import PhoneNumberPut
+from constant_contact_api_client.models.plan_info import PlanInfo
+from constant_contact_api_client.models.plan_tiers_object import PlanTiersObject
+from constant_contact_api_client.models.plan_tiers_object_current_tiers_inner import PlanTiersObjectCurrentTiersInner
+from constant_contact_api_client.models.post_custom_field_delete201_response import PostCustomFieldDelete201Response
+from constant_contact_api_client.models.post_custom_field_delete_request import PostCustomFieldDeleteRequest
+from constant_contact_api_client.models.post_tag_request import PostTagRequest
+from constant_contact_api_client.models.provision import Provision
+from constant_contact_api_client.models.provision_response import ProvisionResponse
+from constant_contact_api_client.models.put_tag_request import PutTagRequest
+from constant_contact_api_client.models.query_param_object import QueryParamObject
+from constant_contact_api_client.models.reporting_links import ReportingLinks
+from constant_contact_api_client.models.reporting_next import ReportingNext
+from constant_contact_api_client.models.resend_to_non_openers_input import ResendToNonOpenersInput
+from constant_contact_api_client.models.resend_to_non_openers_object import ResendToNonOpenersObject
+from constant_contact_api_client.models.sso_user import SSOUser
+from constant_contact_api_client.models.schedule_email_campaign_activity_request import ScheduleEmailCampaignActivityRequest
+from constant_contact_api_client.models.segment_data import SegmentData
+from constant_contact_api_client.models.segment_detail import SegmentDetail
+from constant_contact_api_client.models.segment_master import SegmentMaster
+from constant_contact_api_client.models.segment_name import SegmentName
+from constant_contact_api_client.models.segments_dto import SegmentsDTO
+from constant_contact_api_client.models.sends_tracking_activities_page import SendsTrackingActivitiesPage
+from constant_contact_api_client.models.sends_tracking_activity import SendsTrackingActivity
+from constant_contact_api_client.models.sms_channel_consent_details import SmsChannelConsentDetails
+from constant_contact_api_client.models.stats_email import StatsEmail
+from constant_contact_api_client.models.stats_email_activity import StatsEmailActivity
+from constant_contact_api_client.models.stats_error import StatsError
+from constant_contact_api_client.models.street_address import StreetAddress
+from constant_contact_api_client.models.street_address_put import StreetAddressPut
+from constant_contact_api_client.models.tag import Tag
+from constant_contact_api_client.models.tag_add_remove_contacts import TagAddRemoveContacts
+from constant_contact_api_client.models.tag_id_list500_limit import TagIdList500Limit
+from constant_contact_api_client.models.tag_post import TagPost
+from constant_contact_api_client.models.tag_put import TagPut
+from constant_contact_api_client.models.tags import Tags
+from constant_contact_api_client.models.tags_activity_links import TagsActivityLinks
+from constant_contact_api_client.models.tags_links import TagsLinks
+from constant_contact_api_client.models.tags_paging_links import TagsPagingLinks
+from constant_contact_api_client.models.test_send_email_campaign_activity_request import TestSendEmailCampaignActivityRequest
+from constant_contact_api_client.models.tier_object import TierObject
+from constant_contact_api_client.models.tracking_activity_sms_channel_dto import TrackingActivitySmsChannelDTO
+from constant_contact_api_client.models.unique_email_counts import UniqueEmailCounts
+from constant_contact_api_client.models.update_account_request import UpdateAccountRequest
+from constant_contact_api_client.models.update_contact_request import UpdateContactRequest
+from constant_contact_api_client.models.update_contact_request_email_address import UpdateContactRequestEmailAddress
+from constant_contact_api_client.models.update_contact_request_phone_numbers_inner import UpdateContactRequestPhoneNumbersInner
+from constant_contact_api_client.models.update_contact_request_street_addresses_inner import UpdateContactRequestStreetAddressesInner
+from constant_contact_api_client.models.update_custom_field_request import UpdateCustomFieldRequest
+from constant_contact_api_client.models.update_list200_response import UpdateList200Response
+from constant_contact_api_client.models.update_list_request import UpdateListRequest
+from constant_contact_api_client.models.update_segment_name_request import UpdateSegmentNameRequest
+from constant_contact_api_client.models.webhooks_subscription_body import WebhooksSubscriptionBody
+from constant_contact_api_client.models.webhooks_subscription_collection_inner import WebhooksSubscriptionCollectionInner
+from constant_contact_api_client.models.webhooks_subscription_put_resp import WebhooksSubscriptionPutResp
+from constant_contact_api_client.models.webhooks_subscription_response import WebhooksSubscriptionResponse
+from constant_contact_api_client.models.webhooks_test_send import WebhooksTestSend
diff --git a/constant_contact_api_client/api/__init__.py b/constant_contact_api_client/api/__init__.py
new file mode 100644
index 0000000..c54ebb8
--- /dev/null
+++ b/constant_contact_api_client/api/__init__.py
@@ -0,0 +1,17 @@
+# flake8: noqa
+
+# import apis into api package
+from constant_contact_api_client.api.account_services_api import AccountServicesApi
+from constant_contact_api_client.api.bulk_activities_api import BulkActivitiesApi
+from constant_contact_api_client.api.contact_lists_api import ContactListsApi
+from constant_contact_api_client.api.contact_tags_api import ContactTagsApi
+from constant_contact_api_client.api.contacts_api import ContactsApi
+from constant_contact_api_client.api.contacts_custom_fields_api import ContactsCustomFieldsApi
+from constant_contact_api_client.api.contacts_reporting_api import ContactsReportingApi
+from constant_contact_api_client.api.email_campaigns_api import EmailCampaignsApi
+from constant_contact_api_client.api.email_campaigns_ab_tests_api import EmailCampaignsABTestsApi
+from constant_contact_api_client.api.email_reporting_api import EmailReportingApi
+from constant_contact_api_client.api.email_scheduling_api import EmailSchedulingApi
+from constant_contact_api_client.api.landing_pages_reporting_api import LandingPagesReportingApi
+from constant_contact_api_client.api.segments_api import SegmentsApi
+
diff --git a/constant_contact_api_client/api/account_services_api.py b/constant_contact_api_client/api/account_services_api.py
new file mode 100644
index 0000000..2b5cb2b
--- /dev/null
+++ b/constant_contact_api_client/api/account_services_api.py
@@ -0,0 +1,2329 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
+
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictStr, field_validator
+
+from typing import List, Optional
+
+from constant_contact_api_client.models.add_account_email_address201_response import AddAccountEmailAddress201Response
+from constant_contact_api_client.models.add_account_email_address_request import AddAccountEmailAddressRequest
+from constant_contact_api_client.models.get_account_details200_response import GetAccountDetails200Response
+from constant_contact_api_client.models.get_account_details200_response_physical_address import GetAccountDetails200ResponsePhysicalAddress
+from constant_contact_api_client.models.get_all_account_email_addresses200_response_inner import GetAllAccountEmailAddresses200ResponseInner
+from constant_contact_api_client.models.get_user_privileges200_response_inner import GetUserPrivileges200ResponseInner
+from constant_contact_api_client.models.update_account_request import UpdateAccountRequest
+
+from constant_contact_api_client.api_client import ApiClient
+from constant_contact_api_client.api_response import ApiResponse
+from constant_contact_api_client.rest import RESTResponseType
+
+
+class AccountServicesApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def add_account_email_address(
+ self,
+ add_account_email_address_request: Annotated[AddAccountEmailAddressRequest, Field(description="A JSON request payload containing the new email address you want to add to the Constant Contact account.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> AddAccountEmailAddress201Response:
+ """POST Add an Account Email Address
+
+ Use this method to add a new email address to a Constant Contact account. If the email address you are adding already exists in the account the API will return a 409 conflict error. When you add a new email address to an account, Constant Contact automatically sends an email to that address with a link to confirm it. After a user clicks that link, the account email status changes from `UNCONFIRMED` to `CONFIRMED`. You can use confirmed account email addresses in the email campaign `from_email` and `reply_to_email` headers. For more use case information, see [Add an Account Email Address](/api_guide/account_post_emails.html) in the API guide.
+
+ :param add_account_email_address_request: A JSON request payload containing the new email address you want to add to the Constant Contact account. (required)
+ :type add_account_email_address_request: AddAccountEmailAddressRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_account_email_address_serialize(
+ add_account_email_address_request=add_account_email_address_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "AddAccountEmailAddress201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def add_account_email_address_with_http_info(
+ self,
+ add_account_email_address_request: Annotated[AddAccountEmailAddressRequest, Field(description="A JSON request payload containing the new email address you want to add to the Constant Contact account.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[AddAccountEmailAddress201Response]:
+ """POST Add an Account Email Address
+
+ Use this method to add a new email address to a Constant Contact account. If the email address you are adding already exists in the account the API will return a 409 conflict error. When you add a new email address to an account, Constant Contact automatically sends an email to that address with a link to confirm it. After a user clicks that link, the account email status changes from `UNCONFIRMED` to `CONFIRMED`. You can use confirmed account email addresses in the email campaign `from_email` and `reply_to_email` headers. For more use case information, see [Add an Account Email Address](/api_guide/account_post_emails.html) in the API guide.
+
+ :param add_account_email_address_request: A JSON request payload containing the new email address you want to add to the Constant Contact account. (required)
+ :type add_account_email_address_request: AddAccountEmailAddressRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_account_email_address_serialize(
+ add_account_email_address_request=add_account_email_address_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "AddAccountEmailAddress201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def add_account_email_address_without_preload_content(
+ self,
+ add_account_email_address_request: Annotated[AddAccountEmailAddressRequest, Field(description="A JSON request payload containing the new email address you want to add to the Constant Contact account.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """POST Add an Account Email Address
+
+ Use this method to add a new email address to a Constant Contact account. If the email address you are adding already exists in the account the API will return a 409 conflict error. When you add a new email address to an account, Constant Contact automatically sends an email to that address with a link to confirm it. After a user clicks that link, the account email status changes from `UNCONFIRMED` to `CONFIRMED`. You can use confirmed account email addresses in the email campaign `from_email` and `reply_to_email` headers. For more use case information, see [Add an Account Email Address](/api_guide/account_post_emails.html) in the API guide.
+
+ :param add_account_email_address_request: A JSON request payload containing the new email address you want to add to the Constant Contact account. (required)
+ :type add_account_email_address_request: AddAccountEmailAddressRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_account_email_address_serialize(
+ add_account_email_address_request=add_account_email_address_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "AddAccountEmailAddress201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_account_email_address_serialize(
+ self,
+ add_account_email_address_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if add_account_email_address_request is not None:
+ _body_params = add_account_email_address_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/account/emails',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def add_physical_address(
+ self,
+ get_account_details200_response_physical_address: Annotated[GetAccountDetails200ResponsePhysicalAddress, Field(description="Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetAccountDetails200ResponsePhysicalAddress:
+ """POST the Physical Address for the Account
+
+ Use this method to add the address where the account's organization physically resides. The physical address is required to send emails and displays on the footer of every email that is sent from the account. The country (country_code
) where the account organization resides determines whether you use the state_code
to specify United States (US
) and Canada (CA
) addresses, or use the state_name
to specify all other countries.
+
+ :param get_account_details200_response_physical_address: Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address. (required)
+ :type get_account_details200_response_physical_address: GetAccountDetails200ResponsePhysicalAddress
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_physical_address_serialize(
+ get_account_details200_response_physical_address=get_account_details200_response_physical_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GetAccountDetails200ResponsePhysicalAddress",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def add_physical_address_with_http_info(
+ self,
+ get_account_details200_response_physical_address: Annotated[GetAccountDetails200ResponsePhysicalAddress, Field(description="Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetAccountDetails200ResponsePhysicalAddress]:
+ """POST the Physical Address for the Account
+
+ Use this method to add the address where the account's organization physically resides. The physical address is required to send emails and displays on the footer of every email that is sent from the account. The country (country_code
) where the account organization resides determines whether you use the state_code
to specify United States (US
) and Canada (CA
) addresses, or use the state_name
to specify all other countries.
+
+ :param get_account_details200_response_physical_address: Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address. (required)
+ :type get_account_details200_response_physical_address: GetAccountDetails200ResponsePhysicalAddress
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_physical_address_serialize(
+ get_account_details200_response_physical_address=get_account_details200_response_physical_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GetAccountDetails200ResponsePhysicalAddress",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def add_physical_address_without_preload_content(
+ self,
+ get_account_details200_response_physical_address: Annotated[GetAccountDetails200ResponsePhysicalAddress, Field(description="Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """POST the Physical Address for the Account
+
+ Use this method to add the address where the account's organization physically resides. The physical address is required to send emails and displays on the footer of every email that is sent from the account. The country (country_code
) where the account organization resides determines whether you use the state_code
to specify United States (US
) and Canada (CA
) addresses, or use the state_name
to specify all other countries.
+
+ :param get_account_details200_response_physical_address: Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address. (required)
+ :type get_account_details200_response_physical_address: GetAccountDetails200ResponsePhysicalAddress
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._add_physical_address_serialize(
+ get_account_details200_response_physical_address=get_account_details200_response_physical_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "GetAccountDetails200ResponsePhysicalAddress",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_physical_address_serialize(
+ self,
+ get_account_details200_response_physical_address,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if get_account_details200_response_physical_address is not None:
+ _body_params = get_account_details200_response_physical_address
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/account/summary/physical_address',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_account_details(
+ self,
+ extra_fields: Annotated[Optional[StrictStr], Field(description="Use the `extra_fields` query parameter to include the `physical_address` and/or `company_logo` details in the response body. Use a comma separated list to include both (physical_address, company logo).")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetAccountDetails200Response:
+ """GET a Summary of Account Details
+
+ Get account related details for a Constant Contact user account. Use the `extra_fields` query parameter to include the `company_logo` and/or `physical_address` details in the response body. For more details, see [Get Account Summary Details](/api_guide/account_details_get.html).
+
+ :param extra_fields: Use the `extra_fields` query parameter to include the `physical_address` and/or `company_logo` details in the response body. Use a comma separated list to include both (physical_address, company logo).
+ :type extra_fields: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_details_serialize(
+ extra_fields=extra_fields,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAccountDetails200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_account_details_with_http_info(
+ self,
+ extra_fields: Annotated[Optional[StrictStr], Field(description="Use the `extra_fields` query parameter to include the `physical_address` and/or `company_logo` details in the response body. Use a comma separated list to include both (physical_address, company logo).")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetAccountDetails200Response]:
+ """GET a Summary of Account Details
+
+ Get account related details for a Constant Contact user account. Use the `extra_fields` query parameter to include the `company_logo` and/or `physical_address` details in the response body. For more details, see [Get Account Summary Details](/api_guide/account_details_get.html).
+
+ :param extra_fields: Use the `extra_fields` query parameter to include the `physical_address` and/or `company_logo` details in the response body. Use a comma separated list to include both (physical_address, company logo).
+ :type extra_fields: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_details_serialize(
+ extra_fields=extra_fields,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAccountDetails200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_account_details_without_preload_content(
+ self,
+ extra_fields: Annotated[Optional[StrictStr], Field(description="Use the `extra_fields` query parameter to include the `physical_address` and/or `company_logo` details in the response body. Use a comma separated list to include both (physical_address, company logo).")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET a Summary of Account Details
+
+ Get account related details for a Constant Contact user account. Use the `extra_fields` query parameter to include the `company_logo` and/or `physical_address` details in the response body. For more details, see [Get Account Summary Details](/api_guide/account_details_get.html).
+
+ :param extra_fields: Use the `extra_fields` query parameter to include the `physical_address` and/or `company_logo` details in the response body. Use a comma separated list to include both (physical_address, company logo).
+ :type extra_fields: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_details_serialize(
+ extra_fields=extra_fields,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAccountDetails200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_account_details_serialize(
+ self,
+ extra_fields,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if extra_fields is not None:
+
+ _query_params.append(('extra_fields', extra_fields))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/account/summary',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_account_physical_address(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetAccountDetails200ResponsePhysicalAddress:
+ """GET the Physical Address for the Account
+
+ Use this method to get the address where the account's organization physically resides. The physical address is required to send emails and displays on the footer of every email that is sent from the account.
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_physical_address_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAccountDetails200ResponsePhysicalAddress",
+ '400': None,
+ '401': None,
+ '403': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_account_physical_address_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetAccountDetails200ResponsePhysicalAddress]:
+ """GET the Physical Address for the Account
+
+ Use this method to get the address where the account's organization physically resides. The physical address is required to send emails and displays on the footer of every email that is sent from the account.
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_physical_address_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAccountDetails200ResponsePhysicalAddress",
+ '400': None,
+ '401': None,
+ '403': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_account_physical_address_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET the Physical Address for the Account
+
+ Use this method to get the address where the account's organization physically resides. The physical address is required to send emails and displays on the footer of every email that is sent from the account.
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_account_physical_address_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAccountDetails200ResponsePhysicalAddress",
+ '400': None,
+ '401': None,
+ '403': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_account_physical_address_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/account/summary/physical_address',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_all_account_email_addresses(
+ self,
+ confirm_status: Annotated[Optional[StrictStr], Field(description="Use the `confirm_status` query parameter to search for account emails using the email status. Possible values are `CONFIRMED` or `UNCONFIRMED`. You can also abbreviate the values of this query parameter and use `C` or `U`. ")] = None,
+ role_code: Annotated[Optional[StrictStr], Field(description="Use the `role_code` query parameter to search for account emails that have a specific role. Each each email address in an account can have multiple roles or no role. Possible values are `CONTACT`, `BILLING`, `REPLY_TO`, `JOURNALING`, or `OTHER`. You can also abbreviate the value of this query parameter and use `C`,`B`,`R`,`J`, or `O`.")] = None,
+ email_address: Annotated[Optional[StrictStr], Field(description="Use the `email_address` query parameter to search for a specific account email address.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GetAllAccountEmailAddresses200ResponseInner]:
+ """GET a Collection of Account Email Addresses
+
+ Use this method to return a collection of email addresses for the account associated with your access token. When you Create an Email Campaign, you must use an account email address with a `CONFIRMED` status in the email campaign `from_email` and `reply_to_email` headers. Use the query parameters to filter results. You can filter using `confirm_status`, `role_code`, or `email_address`. For example, searching with `confirm_status=CONFIRMED` returns all confirmed email addresses in the account. This method only supports one query parameter at a time.
+
+ :param confirm_status: Use the `confirm_status` query parameter to search for account emails using the email status. Possible values are `CONFIRMED` or `UNCONFIRMED`. You can also abbreviate the values of this query parameter and use `C` or `U`.
+ :type confirm_status: str
+ :param role_code: Use the `role_code` query parameter to search for account emails that have a specific role. Each each email address in an account can have multiple roles or no role. Possible values are `CONTACT`, `BILLING`, `REPLY_TO`, `JOURNALING`, or `OTHER`. You can also abbreviate the value of this query parameter and use `C`,`B`,`R`,`J`, or `O`.
+ :type role_code: str
+ :param email_address: Use the `email_address` query parameter to search for a specific account email address.
+ :type email_address: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_all_account_email_addresses_serialize(
+ confirm_status=confirm_status,
+ role_code=role_code,
+ email_address=email_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetAllAccountEmailAddresses200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_all_account_email_addresses_with_http_info(
+ self,
+ confirm_status: Annotated[Optional[StrictStr], Field(description="Use the `confirm_status` query parameter to search for account emails using the email status. Possible values are `CONFIRMED` or `UNCONFIRMED`. You can also abbreviate the values of this query parameter and use `C` or `U`. ")] = None,
+ role_code: Annotated[Optional[StrictStr], Field(description="Use the `role_code` query parameter to search for account emails that have a specific role. Each each email address in an account can have multiple roles or no role. Possible values are `CONTACT`, `BILLING`, `REPLY_TO`, `JOURNALING`, or `OTHER`. You can also abbreviate the value of this query parameter and use `C`,`B`,`R`,`J`, or `O`.")] = None,
+ email_address: Annotated[Optional[StrictStr], Field(description="Use the `email_address` query parameter to search for a specific account email address.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GetAllAccountEmailAddresses200ResponseInner]]:
+ """GET a Collection of Account Email Addresses
+
+ Use this method to return a collection of email addresses for the account associated with your access token. When you Create an Email Campaign, you must use an account email address with a `CONFIRMED` status in the email campaign `from_email` and `reply_to_email` headers. Use the query parameters to filter results. You can filter using `confirm_status`, `role_code`, or `email_address`. For example, searching with `confirm_status=CONFIRMED` returns all confirmed email addresses in the account. This method only supports one query parameter at a time.
+
+ :param confirm_status: Use the `confirm_status` query parameter to search for account emails using the email status. Possible values are `CONFIRMED` or `UNCONFIRMED`. You can also abbreviate the values of this query parameter and use `C` or `U`.
+ :type confirm_status: str
+ :param role_code: Use the `role_code` query parameter to search for account emails that have a specific role. Each each email address in an account can have multiple roles or no role. Possible values are `CONTACT`, `BILLING`, `REPLY_TO`, `JOURNALING`, or `OTHER`. You can also abbreviate the value of this query parameter and use `C`,`B`,`R`,`J`, or `O`.
+ :type role_code: str
+ :param email_address: Use the `email_address` query parameter to search for a specific account email address.
+ :type email_address: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_all_account_email_addresses_serialize(
+ confirm_status=confirm_status,
+ role_code=role_code,
+ email_address=email_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetAllAccountEmailAddresses200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_all_account_email_addresses_without_preload_content(
+ self,
+ confirm_status: Annotated[Optional[StrictStr], Field(description="Use the `confirm_status` query parameter to search for account emails using the email status. Possible values are `CONFIRMED` or `UNCONFIRMED`. You can also abbreviate the values of this query parameter and use `C` or `U`. ")] = None,
+ role_code: Annotated[Optional[StrictStr], Field(description="Use the `role_code` query parameter to search for account emails that have a specific role. Each each email address in an account can have multiple roles or no role. Possible values are `CONTACT`, `BILLING`, `REPLY_TO`, `JOURNALING`, or `OTHER`. You can also abbreviate the value of this query parameter and use `C`,`B`,`R`,`J`, or `O`.")] = None,
+ email_address: Annotated[Optional[StrictStr], Field(description="Use the `email_address` query parameter to search for a specific account email address.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET a Collection of Account Email Addresses
+
+ Use this method to return a collection of email addresses for the account associated with your access token. When you Create an Email Campaign, you must use an account email address with a `CONFIRMED` status in the email campaign `from_email` and `reply_to_email` headers. Use the query parameters to filter results. You can filter using `confirm_status`, `role_code`, or `email_address`. For example, searching with `confirm_status=CONFIRMED` returns all confirmed email addresses in the account. This method only supports one query parameter at a time.
+
+ :param confirm_status: Use the `confirm_status` query parameter to search for account emails using the email status. Possible values are `CONFIRMED` or `UNCONFIRMED`. You can also abbreviate the values of this query parameter and use `C` or `U`.
+ :type confirm_status: str
+ :param role_code: Use the `role_code` query parameter to search for account emails that have a specific role. Each each email address in an account can have multiple roles or no role. Possible values are `CONTACT`, `BILLING`, `REPLY_TO`, `JOURNALING`, or `OTHER`. You can also abbreviate the value of this query parameter and use `C`,`B`,`R`,`J`, or `O`.
+ :type role_code: str
+ :param email_address: Use the `email_address` query parameter to search for a specific account email address.
+ :type email_address: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_all_account_email_addresses_serialize(
+ confirm_status=confirm_status,
+ role_code=role_code,
+ email_address=email_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetAllAccountEmailAddresses200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_all_account_email_addresses_serialize(
+ self,
+ confirm_status,
+ role_code,
+ email_address,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if confirm_status is not None:
+
+ _query_params.append(('confirm_status', confirm_status))
+
+ if role_code is not None:
+
+ _query_params.append(('role_code', role_code))
+
+ if email_address is not None:
+
+ _query_params.append(('email_address', email_address))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/account/emails',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_user_privileges(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GetUserPrivileges200ResponseInner]:
+ """GET User Privileges
+
+ Use this method to return the user privileges associated with your access token as an array of objects. This method returns all user privileges, including privileges the V3 API does not currently use. Constant Contact requires specific user privileges to make requests using the V3 API. For more information, see the [User Privileges and Roles Overview](/api_guide/user_privileges.html).
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_user_privileges_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetUserPrivileges200ResponseInner]",
+ '401': None,
+ '403': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_user_privileges_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GetUserPrivileges200ResponseInner]]:
+ """GET User Privileges
+
+ Use this method to return the user privileges associated with your access token as an array of objects. This method returns all user privileges, including privileges the V3 API does not currently use. Constant Contact requires specific user privileges to make requests using the V3 API. For more information, see the [User Privileges and Roles Overview](/api_guide/user_privileges.html).
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_user_privileges_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetUserPrivileges200ResponseInner]",
+ '401': None,
+ '403': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_user_privileges_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET User Privileges
+
+ Use this method to return the user privileges associated with your access token as an array of objects. This method returns all user privileges, including privileges the V3 API does not currently use. Constant Contact requires specific user privileges to make requests using the V3 API. For more information, see the [User Privileges and Roles Overview](/api_guide/user_privileges.html).
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_user_privileges_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetUserPrivileges200ResponseInner]",
+ '401': None,
+ '403': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_user_privileges_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/account/user/privileges',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_account(
+ self,
+ update_account_request: Annotated[UpdateAccountRequest, Field(description="In the request body, specify changes to account details by including and modifying all or select `CustomerPut` properties. Changes to read-only fields (`encoded_account_id`) are ignored.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> UpdateAccountRequest:
+ """PUT (update) Account Details
+
+ Use this method to update account details for a Constant Contact account, such as the email address or phone number. This PUT method provides a partial update where only valid properties that you include in the request body are updated and excluded properties are not overwritten. For more details, see [Put (update) Account Summary Details](/api_guide/account_details_put.html).
+
+ :param update_account_request: In the request body, specify changes to account details by including and modifying all or select `CustomerPut` properties. Changes to read-only fields (`encoded_account_id`) are ignored. (required)
+ :type update_account_request: UpdateAccountRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_account_serialize(
+ update_account_request=update_account_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateAccountRequest",
+ '400': None,
+ '401': None,
+ '403': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_account_with_http_info(
+ self,
+ update_account_request: Annotated[UpdateAccountRequest, Field(description="In the request body, specify changes to account details by including and modifying all or select `CustomerPut` properties. Changes to read-only fields (`encoded_account_id`) are ignored.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[UpdateAccountRequest]:
+ """PUT (update) Account Details
+
+ Use this method to update account details for a Constant Contact account, such as the email address or phone number. This PUT method provides a partial update where only valid properties that you include in the request body are updated and excluded properties are not overwritten. For more details, see [Put (update) Account Summary Details](/api_guide/account_details_put.html).
+
+ :param update_account_request: In the request body, specify changes to account details by including and modifying all or select `CustomerPut` properties. Changes to read-only fields (`encoded_account_id`) are ignored. (required)
+ :type update_account_request: UpdateAccountRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_account_serialize(
+ update_account_request=update_account_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateAccountRequest",
+ '400': None,
+ '401': None,
+ '403': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_account_without_preload_content(
+ self,
+ update_account_request: Annotated[UpdateAccountRequest, Field(description="In the request body, specify changes to account details by including and modifying all or select `CustomerPut` properties. Changes to read-only fields (`encoded_account_id`) are ignored.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """PUT (update) Account Details
+
+ Use this method to update account details for a Constant Contact account, such as the email address or phone number. This PUT method provides a partial update where only valid properties that you include in the request body are updated and excluded properties are not overwritten. For more details, see [Put (update) Account Summary Details](/api_guide/account_details_put.html).
+
+ :param update_account_request: In the request body, specify changes to account details by including and modifying all or select `CustomerPut` properties. Changes to read-only fields (`encoded_account_id`) are ignored. (required)
+ :type update_account_request: UpdateAccountRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_account_serialize(
+ update_account_request=update_account_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateAccountRequest",
+ '400': None,
+ '401': None,
+ '403': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_account_serialize(
+ self,
+ update_account_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_account_request is not None:
+ _body_params = update_account_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/account/summary',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_account_physical_address(
+ self,
+ get_account_details200_response_physical_address: Annotated[GetAccountDetails200ResponsePhysicalAddress, Field(description="Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetAccountDetails200ResponsePhysicalAddress:
+ """PUT (update) the Physical Address for an Account
+
+ Use this method to update the organization's physical address for the Constant Contact user account. The physical address is required to send emails and displays on the footer of every email that is sent from the account. To get the current physical address, make a GET call to `/account/summary/physical_address`. The country (country_code
) where the account organization resides determines whether you use the state_code
to specify United States (US
) and Canada (CA
) addresses, or use the state_name
to specify all other countries. For more details, see [Put (update) the Physical Address for the Account](/api_guide/account_address_put.html). You must have the role of Account Owner assigned to update account level details.
+
+ :param get_account_details200_response_physical_address: Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address. (required)
+ :type get_account_details200_response_physical_address: GetAccountDetails200ResponsePhysicalAddress
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_account_physical_address_serialize(
+ get_account_details200_response_physical_address=get_account_details200_response_physical_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAccountDetails200ResponsePhysicalAddress",
+ '400': None,
+ '401': None,
+ '403': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_account_physical_address_with_http_info(
+ self,
+ get_account_details200_response_physical_address: Annotated[GetAccountDetails200ResponsePhysicalAddress, Field(description="Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetAccountDetails200ResponsePhysicalAddress]:
+ """PUT (update) the Physical Address for an Account
+
+ Use this method to update the organization's physical address for the Constant Contact user account. The physical address is required to send emails and displays on the footer of every email that is sent from the account. To get the current physical address, make a GET call to `/account/summary/physical_address`. The country (country_code
) where the account organization resides determines whether you use the state_code
to specify United States (US
) and Canada (CA
) addresses, or use the state_name
to specify all other countries. For more details, see [Put (update) the Physical Address for the Account](/api_guide/account_address_put.html). You must have the role of Account Owner assigned to update account level details.
+
+ :param get_account_details200_response_physical_address: Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address. (required)
+ :type get_account_details200_response_physical_address: GetAccountDetails200ResponsePhysicalAddress
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_account_physical_address_serialize(
+ get_account_details200_response_physical_address=get_account_details200_response_physical_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAccountDetails200ResponsePhysicalAddress",
+ '400': None,
+ '401': None,
+ '403': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_account_physical_address_without_preload_content(
+ self,
+ get_account_details200_response_physical_address: Annotated[GetAccountDetails200ResponsePhysicalAddress, Field(description="Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """PUT (update) the Physical Address for an Account
+
+ Use this method to update the organization's physical address for the Constant Contact user account. The physical address is required to send emails and displays on the footer of every email that is sent from the account. To get the current physical address, make a GET call to `/account/summary/physical_address`. The country (country_code
) where the account organization resides determines whether you use the state_code
to specify United States (US
) and Canada (CA
) addresses, or use the state_name
to specify all other countries. For more details, see [Put (update) the Physical Address for the Account](/api_guide/account_address_put.html). You must have the role of Account Owner assigned to update account level details.
+
+ :param get_account_details200_response_physical_address: Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address. (required)
+ :type get_account_details200_response_physical_address: GetAccountDetails200ResponsePhysicalAddress
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_account_physical_address_serialize(
+ get_account_details200_response_physical_address=get_account_details200_response_physical_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAccountDetails200ResponsePhysicalAddress",
+ '400': None,
+ '401': None,
+ '403': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_account_physical_address_serialize(
+ self,
+ get_account_details200_response_physical_address,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if get_account_details200_response_physical_address is not None:
+ _body_params = get_account_details200_response_physical_address
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/account/summary/physical_address',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/constant_contact_api_client/api/bulk_activities_api.py b/constant_contact_api_client/api/bulk_activities_api.py
new file mode 100644
index 0000000..23e5aab
--- /dev/null
+++ b/constant_contact_api_client/api/bulk_activities_api.py
@@ -0,0 +1,4147 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
+
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictBytes, StrictStr, field_validator
+
+from typing import List, Optional, Union
+
+from constant_contact_api_client.models.create_csv_import_activity201_response import CreateCSVImportActivity201Response
+from constant_contact_api_client.models.create_delete_activity201_response import CreateDeleteActivity201Response
+from constant_contact_api_client.models.create_delete_activity_request import CreateDeleteActivityRequest
+from constant_contact_api_client.models.create_export_activity201_response import CreateExportActivity201Response
+from constant_contact_api_client.models.create_export_activity_request import CreateExportActivityRequest
+from constant_contact_api_client.models.create_import_json_activity_request import CreateImportJSONActivityRequest
+from constant_contact_api_client.models.create_list_add_activity_request import CreateListAddActivityRequest
+from constant_contact_api_client.models.create_list_delete_activity201_response import CreateListDeleteActivity201Response
+from constant_contact_api_client.models.create_list_delete_activity_request import CreateListDeleteActivityRequest
+from constant_contact_api_client.models.create_list_remove_activity201_response import CreateListRemoveActivity201Response
+from constant_contact_api_client.models.create_list_remove_activity_request import CreateListRemoveActivityRequest
+from constant_contact_api_client.models.create_tag_delete_activity_request import CreateTagDeleteActivityRequest
+from constant_contact_api_client.models.create_tag_remove_activity201_response import CreateTagRemoveActivity201Response
+from constant_contact_api_client.models.create_tag_remove_activity_request import CreateTagRemoveActivityRequest
+from constant_contact_api_client.models.get_activity_by_id200_response import GetActivityById200Response
+from constant_contact_api_client.models.get_all_activities200_response import GetAllActivities200Response
+from constant_contact_api_client.models.post_custom_field_delete201_response import PostCustomFieldDelete201Response
+from constant_contact_api_client.models.post_custom_field_delete_request import PostCustomFieldDeleteRequest
+
+from constant_contact_api_client.api_client import ApiClient
+from constant_contact_api_client.api_response import ApiResponse
+from constant_contact_api_client.rest import RESTResponseType
+
+
+class BulkActivitiesApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def create_csv_import_activity(
+ self,
+ file: Annotated[Union[StrictBytes, StrictStr], Field(description="The CSV file you are importing. The column headings that you can use in the file are: `first_name`, `last_name`, `email`, `phone`, `job_title`, `anniversary`, `birthday_day`, `birthday_month`, `company_name`, `street`, `street2`, `city`, `state`, `zip`, and `country`. The only required column heading is `email`. You can also use custom fields as column headings. Enter the custom field name prefixed with `cf:` as the column heading. For example, use `cf:first_name` as the header name if you have a custom field named \\\"first_name\\\". The custom field must already exist in the Constant Contact account you are using. Depending on the custom field data type, you can enter dates or strings as the value of the custom field. Each contact can contain up to 25 different custom fields.")],
+ list_ids: Annotated[List[StrictStr], Field(max_length=50, description="Specify which contact lists you are adding all imported contacts to as an array of up to 50 contact `list_id` values.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateCSVImportActivity201Response:
+ """Import Contacts using a CSV File
+
+ This multipart method creates an asynchronous background job that adds or updates contacts by importing a CSV file containing contact information. Do not use a Content-Type header value with this method. Importing a new contact automatically sets the contact's `permission_to_send` property as `implicit` and the `opt_in_source` property as `Account`. Importing an existing contact only updates the contact properties you include in the request. The CSV file has a maximum of 40,000 lines including the header row (39,999 contacts) and a maximum file size of 4 megabytes (MB). Lines above the 40,000 line maximum are not processed. If the request body exceeds 4 MB, only the contacts contained in the first 4 MB are imported and the remaining data is dropped.
+
+ :param file: The CSV file you are importing. The column headings that you can use in the file are: `first_name`, `last_name`, `email`, `phone`, `job_title`, `anniversary`, `birthday_day`, `birthday_month`, `company_name`, `street`, `street2`, `city`, `state`, `zip`, and `country`. The only required column heading is `email`. You can also use custom fields as column headings. Enter the custom field name prefixed with `cf:` as the column heading. For example, use `cf:first_name` as the header name if you have a custom field named \\\"first_name\\\". The custom field must already exist in the Constant Contact account you are using. Depending on the custom field data type, you can enter dates or strings as the value of the custom field. Each contact can contain up to 25 different custom fields. (required)
+ :type file: bytearray
+ :param list_ids: Specify which contact lists you are adding all imported contacts to as an array of up to 50 contact `list_id` values. (required)
+ :type list_ids: List[str]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_csv_import_activity_serialize(
+ file=file,
+ list_ids=list_ids,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateCSVImportActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_csv_import_activity_with_http_info(
+ self,
+ file: Annotated[Union[StrictBytes, StrictStr], Field(description="The CSV file you are importing. The column headings that you can use in the file are: `first_name`, `last_name`, `email`, `phone`, `job_title`, `anniversary`, `birthday_day`, `birthday_month`, `company_name`, `street`, `street2`, `city`, `state`, `zip`, and `country`. The only required column heading is `email`. You can also use custom fields as column headings. Enter the custom field name prefixed with `cf:` as the column heading. For example, use `cf:first_name` as the header name if you have a custom field named \\\"first_name\\\". The custom field must already exist in the Constant Contact account you are using. Depending on the custom field data type, you can enter dates or strings as the value of the custom field. Each contact can contain up to 25 different custom fields.")],
+ list_ids: Annotated[List[StrictStr], Field(max_length=50, description="Specify which contact lists you are adding all imported contacts to as an array of up to 50 contact `list_id` values.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateCSVImportActivity201Response]:
+ """Import Contacts using a CSV File
+
+ This multipart method creates an asynchronous background job that adds or updates contacts by importing a CSV file containing contact information. Do not use a Content-Type header value with this method. Importing a new contact automatically sets the contact's `permission_to_send` property as `implicit` and the `opt_in_source` property as `Account`. Importing an existing contact only updates the contact properties you include in the request. The CSV file has a maximum of 40,000 lines including the header row (39,999 contacts) and a maximum file size of 4 megabytes (MB). Lines above the 40,000 line maximum are not processed. If the request body exceeds 4 MB, only the contacts contained in the first 4 MB are imported and the remaining data is dropped.
+
+ :param file: The CSV file you are importing. The column headings that you can use in the file are: `first_name`, `last_name`, `email`, `phone`, `job_title`, `anniversary`, `birthday_day`, `birthday_month`, `company_name`, `street`, `street2`, `city`, `state`, `zip`, and `country`. The only required column heading is `email`. You can also use custom fields as column headings. Enter the custom field name prefixed with `cf:` as the column heading. For example, use `cf:first_name` as the header name if you have a custom field named \\\"first_name\\\". The custom field must already exist in the Constant Contact account you are using. Depending on the custom field data type, you can enter dates or strings as the value of the custom field. Each contact can contain up to 25 different custom fields. (required)
+ :type file: bytearray
+ :param list_ids: Specify which contact lists you are adding all imported contacts to as an array of up to 50 contact `list_id` values. (required)
+ :type list_ids: List[str]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_csv_import_activity_serialize(
+ file=file,
+ list_ids=list_ids,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateCSVImportActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_csv_import_activity_without_preload_content(
+ self,
+ file: Annotated[Union[StrictBytes, StrictStr], Field(description="The CSV file you are importing. The column headings that you can use in the file are: `first_name`, `last_name`, `email`, `phone`, `job_title`, `anniversary`, `birthday_day`, `birthday_month`, `company_name`, `street`, `street2`, `city`, `state`, `zip`, and `country`. The only required column heading is `email`. You can also use custom fields as column headings. Enter the custom field name prefixed with `cf:` as the column heading. For example, use `cf:first_name` as the header name if you have a custom field named \\\"first_name\\\". The custom field must already exist in the Constant Contact account you are using. Depending on the custom field data type, you can enter dates or strings as the value of the custom field. Each contact can contain up to 25 different custom fields.")],
+ list_ids: Annotated[List[StrictStr], Field(max_length=50, description="Specify which contact lists you are adding all imported contacts to as an array of up to 50 contact `list_id` values.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Import Contacts using a CSV File
+
+ This multipart method creates an asynchronous background job that adds or updates contacts by importing a CSV file containing contact information. Do not use a Content-Type header value with this method. Importing a new contact automatically sets the contact's `permission_to_send` property as `implicit` and the `opt_in_source` property as `Account`. Importing an existing contact only updates the contact properties you include in the request. The CSV file has a maximum of 40,000 lines including the header row (39,999 contacts) and a maximum file size of 4 megabytes (MB). Lines above the 40,000 line maximum are not processed. If the request body exceeds 4 MB, only the contacts contained in the first 4 MB are imported and the remaining data is dropped.
+
+ :param file: The CSV file you are importing. The column headings that you can use in the file are: `first_name`, `last_name`, `email`, `phone`, `job_title`, `anniversary`, `birthday_day`, `birthday_month`, `company_name`, `street`, `street2`, `city`, `state`, `zip`, and `country`. The only required column heading is `email`. You can also use custom fields as column headings. Enter the custom field name prefixed with `cf:` as the column heading. For example, use `cf:first_name` as the header name if you have a custom field named \\\"first_name\\\". The custom field must already exist in the Constant Contact account you are using. Depending on the custom field data type, you can enter dates or strings as the value of the custom field. Each contact can contain up to 25 different custom fields. (required)
+ :type file: bytearray
+ :param list_ids: Specify which contact lists you are adding all imported contacts to as an array of up to 50 contact `list_id` values. (required)
+ :type list_ids: List[str]
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_csv_import_activity_serialize(
+ file=file,
+ list_ids=list_ids,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateCSVImportActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_csv_import_activity_serialize(
+ self,
+ file,
+ list_ids,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'list_ids': 'csv',
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ if file is not None:
+ _files['file'] = file
+ if list_ids is not None:
+ _form_params.append(('list_ids', list_ids))
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/activities/contacts_file_import',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_delete_activity(
+ self,
+ create_delete_activity_request: Annotated[CreateDeleteActivityRequest, Field(description="The request body contains an array of contact_ids or list_ids. All contact_ids provided are deleted, or all members of each specified list_id are deleted.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateDeleteActivity201Response:
+ """Delete Contacts in Bulk
+
+ Use this endpoint to bulk delete contacts in an account. Contacts to delete are specified by contact_id (up to 500), or by list_id (up to 50 lists); all contacts that are members of the list_ids are deleted. Deleted contacts won’t receive email from you, and they don’t count as active contacts. Unlike unsubscribed contacts, deleted contacts can be added back to an account. [Learn how to revive deleted contacts](/api_guide/contacts_delete.html#revive).
+
+ :param create_delete_activity_request: The request body contains an array of contact_ids or list_ids. All contact_ids provided are deleted, or all members of each specified list_id are deleted. (required)
+ :type create_delete_activity_request: CreateDeleteActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_delete_activity_serialize(
+ create_delete_activity_request=create_delete_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateDeleteActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_delete_activity_with_http_info(
+ self,
+ create_delete_activity_request: Annotated[CreateDeleteActivityRequest, Field(description="The request body contains an array of contact_ids or list_ids. All contact_ids provided are deleted, or all members of each specified list_id are deleted.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateDeleteActivity201Response]:
+ """Delete Contacts in Bulk
+
+ Use this endpoint to bulk delete contacts in an account. Contacts to delete are specified by contact_id (up to 500), or by list_id (up to 50 lists); all contacts that are members of the list_ids are deleted. Deleted contacts won’t receive email from you, and they don’t count as active contacts. Unlike unsubscribed contacts, deleted contacts can be added back to an account. [Learn how to revive deleted contacts](/api_guide/contacts_delete.html#revive).
+
+ :param create_delete_activity_request: The request body contains an array of contact_ids or list_ids. All contact_ids provided are deleted, or all members of each specified list_id are deleted. (required)
+ :type create_delete_activity_request: CreateDeleteActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_delete_activity_serialize(
+ create_delete_activity_request=create_delete_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateDeleteActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_delete_activity_without_preload_content(
+ self,
+ create_delete_activity_request: Annotated[CreateDeleteActivityRequest, Field(description="The request body contains an array of contact_ids or list_ids. All contact_ids provided are deleted, or all members of each specified list_id are deleted.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Contacts in Bulk
+
+ Use this endpoint to bulk delete contacts in an account. Contacts to delete are specified by contact_id (up to 500), or by list_id (up to 50 lists); all contacts that are members of the list_ids are deleted. Deleted contacts won’t receive email from you, and they don’t count as active contacts. Unlike unsubscribed contacts, deleted contacts can be added back to an account. [Learn how to revive deleted contacts](/api_guide/contacts_delete.html#revive).
+
+ :param create_delete_activity_request: The request body contains an array of contact_ids or list_ids. All contact_ids provided are deleted, or all members of each specified list_id are deleted. (required)
+ :type create_delete_activity_request: CreateDeleteActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_delete_activity_serialize(
+ create_delete_activity_request=create_delete_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateDeleteActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_delete_activity_serialize(
+ self,
+ create_delete_activity_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_delete_activity_request is not None:
+ _body_params = create_delete_activity_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/activities/contact_delete',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_export_activity(
+ self,
+ create_export_activity_request: Annotated[CreateExportActivityRequest, Field(description="A JSON payload that specifies the contacts (rows in the CSV file) and contact properties (columns in the CSV file) you want to export.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateExportActivity201Response:
+ """Export Contacts to a File
+
+ Use this method to create an activity that exports contacts and contact details to a CSV file. By default, all contacts are exported. To filter contacts to export, specify the source to use, `contact_id`, `list_id`, or `segment_id` (all mutually exclusive). By default, all contact related fields are exported. Use the fields array to only export specific contact fields. You must export `email_address` to successfully export `email_optin_source`, `email_optin_date`, `email_optout_source`, `email_optout_date`, or `email_optout_reason`. After Constant Contact finishes processing the activity, use the `results` link in the response body to retrieve the CSV file.
+
+ :param create_export_activity_request: A JSON payload that specifies the contacts (rows in the CSV file) and contact properties (columns in the CSV file) you want to export. (required)
+ :type create_export_activity_request: CreateExportActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_export_activity_serialize(
+ create_export_activity_request=create_export_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateExportActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_export_activity_with_http_info(
+ self,
+ create_export_activity_request: Annotated[CreateExportActivityRequest, Field(description="A JSON payload that specifies the contacts (rows in the CSV file) and contact properties (columns in the CSV file) you want to export.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateExportActivity201Response]:
+ """Export Contacts to a File
+
+ Use this method to create an activity that exports contacts and contact details to a CSV file. By default, all contacts are exported. To filter contacts to export, specify the source to use, `contact_id`, `list_id`, or `segment_id` (all mutually exclusive). By default, all contact related fields are exported. Use the fields array to only export specific contact fields. You must export `email_address` to successfully export `email_optin_source`, `email_optin_date`, `email_optout_source`, `email_optout_date`, or `email_optout_reason`. After Constant Contact finishes processing the activity, use the `results` link in the response body to retrieve the CSV file.
+
+ :param create_export_activity_request: A JSON payload that specifies the contacts (rows in the CSV file) and contact properties (columns in the CSV file) you want to export. (required)
+ :type create_export_activity_request: CreateExportActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_export_activity_serialize(
+ create_export_activity_request=create_export_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateExportActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_export_activity_without_preload_content(
+ self,
+ create_export_activity_request: Annotated[CreateExportActivityRequest, Field(description="A JSON payload that specifies the contacts (rows in the CSV file) and contact properties (columns in the CSV file) you want to export.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Export Contacts to a File
+
+ Use this method to create an activity that exports contacts and contact details to a CSV file. By default, all contacts are exported. To filter contacts to export, specify the source to use, `contact_id`, `list_id`, or `segment_id` (all mutually exclusive). By default, all contact related fields are exported. Use the fields array to only export specific contact fields. You must export `email_address` to successfully export `email_optin_source`, `email_optin_date`, `email_optout_source`, `email_optout_date`, or `email_optout_reason`. After Constant Contact finishes processing the activity, use the `results` link in the response body to retrieve the CSV file.
+
+ :param create_export_activity_request: A JSON payload that specifies the contacts (rows in the CSV file) and contact properties (columns in the CSV file) you want to export. (required)
+ :type create_export_activity_request: CreateExportActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_export_activity_serialize(
+ create_export_activity_request=create_export_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateExportActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_export_activity_serialize(
+ self,
+ create_export_activity_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_export_activity_request is not None:
+ _body_params = create_export_activity_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/activities/contact_exports',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_import_json_activity(
+ self,
+ create_import_json_activity_request: Annotated[CreateImportJSONActivityRequest, Field(description="The JSON request payload that contains the contact data and contact lists for the import.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateCSVImportActivity201Response:
+ """Import Contacts using a JSON Payload
+
+ Use this method to create an asynchronous background job that adds new contacts or updates existing contacts by importing a JSON payload. This method requires a request body that contains the contact data you are importing and the contact lists to which you want to add the imported contacts. Importing a new contact automatically sets the contact's `permission_to_send` property as `implicit` and the `opt_in_source` property as `Account`. Importing an existing contact only updates the contact properties you include in the request. For each contact, you can import up to three addresses and three phone numbers. International phone numbers are currently not supported. To import custom fields, prefix the custom field name with `cf:` and add it as a contact property. For example, use the property name `cf:first_name` if you have a custom field named first_name. The custom field must already exist in the Constant Contact account you are using. Each contact can contain up to 25 custom fields. The request body payload has a maximum size of 4 megabytes (MB). If the request body exceeds 4 MB, this method only imports the first 4 MB and drops the remaining data. Use the activity URL to check the status of the import activity request.
+
+ :param create_import_json_activity_request: The JSON request payload that contains the contact data and contact lists for the import. (required)
+ :type create_import_json_activity_request: CreateImportJSONActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_import_json_activity_serialize(
+ create_import_json_activity_request=create_import_json_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateCSVImportActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_import_json_activity_with_http_info(
+ self,
+ create_import_json_activity_request: Annotated[CreateImportJSONActivityRequest, Field(description="The JSON request payload that contains the contact data and contact lists for the import.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateCSVImportActivity201Response]:
+ """Import Contacts using a JSON Payload
+
+ Use this method to create an asynchronous background job that adds new contacts or updates existing contacts by importing a JSON payload. This method requires a request body that contains the contact data you are importing and the contact lists to which you want to add the imported contacts. Importing a new contact automatically sets the contact's `permission_to_send` property as `implicit` and the `opt_in_source` property as `Account`. Importing an existing contact only updates the contact properties you include in the request. For each contact, you can import up to three addresses and three phone numbers. International phone numbers are currently not supported. To import custom fields, prefix the custom field name with `cf:` and add it as a contact property. For example, use the property name `cf:first_name` if you have a custom field named first_name. The custom field must already exist in the Constant Contact account you are using. Each contact can contain up to 25 custom fields. The request body payload has a maximum size of 4 megabytes (MB). If the request body exceeds 4 MB, this method only imports the first 4 MB and drops the remaining data. Use the activity URL to check the status of the import activity request.
+
+ :param create_import_json_activity_request: The JSON request payload that contains the contact data and contact lists for the import. (required)
+ :type create_import_json_activity_request: CreateImportJSONActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_import_json_activity_serialize(
+ create_import_json_activity_request=create_import_json_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateCSVImportActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_import_json_activity_without_preload_content(
+ self,
+ create_import_json_activity_request: Annotated[CreateImportJSONActivityRequest, Field(description="The JSON request payload that contains the contact data and contact lists for the import.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Import Contacts using a JSON Payload
+
+ Use this method to create an asynchronous background job that adds new contacts or updates existing contacts by importing a JSON payload. This method requires a request body that contains the contact data you are importing and the contact lists to which you want to add the imported contacts. Importing a new contact automatically sets the contact's `permission_to_send` property as `implicit` and the `opt_in_source` property as `Account`. Importing an existing contact only updates the contact properties you include in the request. For each contact, you can import up to three addresses and three phone numbers. International phone numbers are currently not supported. To import custom fields, prefix the custom field name with `cf:` and add it as a contact property. For example, use the property name `cf:first_name` if you have a custom field named first_name. The custom field must already exist in the Constant Contact account you are using. Each contact can contain up to 25 custom fields. The request body payload has a maximum size of 4 megabytes (MB). If the request body exceeds 4 MB, this method only imports the first 4 MB and drops the remaining data. Use the activity URL to check the status of the import activity request.
+
+ :param create_import_json_activity_request: The JSON request payload that contains the contact data and contact lists for the import. (required)
+ :type create_import_json_activity_request: CreateImportJSONActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_import_json_activity_serialize(
+ create_import_json_activity_request=create_import_json_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateCSVImportActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_import_json_activity_serialize(
+ self,
+ create_import_json_activity_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_import_json_activity_request is not None:
+ _body_params = create_import_json_activity_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/activities/contacts_json_import',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_list_add_activity(
+ self,
+ create_list_add_activity_request: Annotated[CreateListAddActivityRequest, Field(description="The JSON payload used to create the 'add contacts to lists' activity")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateListRemoveActivity201Response:
+ """Add Contacts to Lists
+
+ Use this method to create an activity that adds contacts to one or more lists. Each contact can be a member of up to 50 lists. Use the properties in the `source` object to specify the contacts you want to add to lists. Use the `list_ids` array to specify which lists you want to add your source contacts to.
+
+ :param create_list_add_activity_request: The JSON payload used to create the 'add contacts to lists' activity (required)
+ :type create_list_add_activity_request: CreateListAddActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_add_activity_serialize(
+ create_list_add_activity_request=create_list_add_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateListRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_list_add_activity_with_http_info(
+ self,
+ create_list_add_activity_request: Annotated[CreateListAddActivityRequest, Field(description="The JSON payload used to create the 'add contacts to lists' activity")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateListRemoveActivity201Response]:
+ """Add Contacts to Lists
+
+ Use this method to create an activity that adds contacts to one or more lists. Each contact can be a member of up to 50 lists. Use the properties in the `source` object to specify the contacts you want to add to lists. Use the `list_ids` array to specify which lists you want to add your source contacts to.
+
+ :param create_list_add_activity_request: The JSON payload used to create the 'add contacts to lists' activity (required)
+ :type create_list_add_activity_request: CreateListAddActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_add_activity_serialize(
+ create_list_add_activity_request=create_list_add_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateListRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_list_add_activity_without_preload_content(
+ self,
+ create_list_add_activity_request: Annotated[CreateListAddActivityRequest, Field(description="The JSON payload used to create the 'add contacts to lists' activity")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Add Contacts to Lists
+
+ Use this method to create an activity that adds contacts to one or more lists. Each contact can be a member of up to 50 lists. Use the properties in the `source` object to specify the contacts you want to add to lists. Use the `list_ids` array to specify which lists you want to add your source contacts to.
+
+ :param create_list_add_activity_request: The JSON payload used to create the 'add contacts to lists' activity (required)
+ :type create_list_add_activity_request: CreateListAddActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_add_activity_serialize(
+ create_list_add_activity_request=create_list_add_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateListRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_list_add_activity_serialize(
+ self,
+ create_list_add_activity_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_list_add_activity_request is not None:
+ _body_params = create_list_add_activity_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/activities/add_list_memberships',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_list_delete_activity(
+ self,
+ create_list_delete_activity_request: Annotated[CreateListDeleteActivityRequest, Field(description="An array of `list_id`'s to delete.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateListDeleteActivity201Response:
+ """Delete Contact Lists
+
+ Use this endpoint to delete up to 100 contact lists in an account.
+
+ :param create_list_delete_activity_request: An array of `list_id`'s to delete. (required)
+ :type create_list_delete_activity_request: CreateListDeleteActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_delete_activity_serialize(
+ create_list_delete_activity_request=create_list_delete_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateListDeleteActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_list_delete_activity_with_http_info(
+ self,
+ create_list_delete_activity_request: Annotated[CreateListDeleteActivityRequest, Field(description="An array of `list_id`'s to delete.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateListDeleteActivity201Response]:
+ """Delete Contact Lists
+
+ Use this endpoint to delete up to 100 contact lists in an account.
+
+ :param create_list_delete_activity_request: An array of `list_id`'s to delete. (required)
+ :type create_list_delete_activity_request: CreateListDeleteActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_delete_activity_serialize(
+ create_list_delete_activity_request=create_list_delete_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateListDeleteActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_list_delete_activity_without_preload_content(
+ self,
+ create_list_delete_activity_request: Annotated[CreateListDeleteActivityRequest, Field(description="An array of `list_id`'s to delete.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Contact Lists
+
+ Use this endpoint to delete up to 100 contact lists in an account.
+
+ :param create_list_delete_activity_request: An array of `list_id`'s to delete. (required)
+ :type create_list_delete_activity_request: CreateListDeleteActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_delete_activity_serialize(
+ create_list_delete_activity_request=create_list_delete_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateListDeleteActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_list_delete_activity_serialize(
+ self,
+ create_list_delete_activity_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_list_delete_activity_request is not None:
+ _body_params = create_list_delete_activity_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/activities/list_delete',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_list_remove_activity(
+ self,
+ create_list_remove_activity_request: Annotated[CreateListRemoveActivityRequest, Field(description="The JSON payload used to create the Remove Contacts from Lists' activity")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateListRemoveActivity201Response:
+ """Remove Contacts from Lists
+
+ Use this method to create an activity that removes contacts from one or more contact lists. Use the properties in the `source` object to remove specific contacts from your lists. Use the `list_ids` array to specify the target lists from which contacts are removed. Optionally, if the source is `all_active_contacts` (billable) or `list_ids`, use the `exclude` object to exclude specific contacts from being removed from the destination lists.
+
+ :param create_list_remove_activity_request: The JSON payload used to create the Remove Contacts from Lists' activity (required)
+ :type create_list_remove_activity_request: CreateListRemoveActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_remove_activity_serialize(
+ create_list_remove_activity_request=create_list_remove_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateListRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_list_remove_activity_with_http_info(
+ self,
+ create_list_remove_activity_request: Annotated[CreateListRemoveActivityRequest, Field(description="The JSON payload used to create the Remove Contacts from Lists' activity")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateListRemoveActivity201Response]:
+ """Remove Contacts from Lists
+
+ Use this method to create an activity that removes contacts from one or more contact lists. Use the properties in the `source` object to remove specific contacts from your lists. Use the `list_ids` array to specify the target lists from which contacts are removed. Optionally, if the source is `all_active_contacts` (billable) or `list_ids`, use the `exclude` object to exclude specific contacts from being removed from the destination lists.
+
+ :param create_list_remove_activity_request: The JSON payload used to create the Remove Contacts from Lists' activity (required)
+ :type create_list_remove_activity_request: CreateListRemoveActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_remove_activity_serialize(
+ create_list_remove_activity_request=create_list_remove_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateListRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_list_remove_activity_without_preload_content(
+ self,
+ create_list_remove_activity_request: Annotated[CreateListRemoveActivityRequest, Field(description="The JSON payload used to create the Remove Contacts from Lists' activity")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Remove Contacts from Lists
+
+ Use this method to create an activity that removes contacts from one or more contact lists. Use the properties in the `source` object to remove specific contacts from your lists. Use the `list_ids` array to specify the target lists from which contacts are removed. Optionally, if the source is `all_active_contacts` (billable) or `list_ids`, use the `exclude` object to exclude specific contacts from being removed from the destination lists.
+
+ :param create_list_remove_activity_request: The JSON payload used to create the Remove Contacts from Lists' activity (required)
+ :type create_list_remove_activity_request: CreateListRemoveActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_remove_activity_serialize(
+ create_list_remove_activity_request=create_list_remove_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateListRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_list_remove_activity_serialize(
+ self,
+ create_list_remove_activity_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_list_remove_activity_request is not None:
+ _body_params = create_list_remove_activity_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/activities/remove_list_memberships',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_tag_add_contact_activity(
+ self,
+ create_tag_remove_activity_request: Annotated[CreateTagRemoveActivityRequest, Field(description="The JSON payload used to create an asynchronous activity that adds tags to contacts that meet your specified contact filtering criteria.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateTagRemoveActivity201Response:
+ """Add Tags to Contacts
+
+ Use this method to create an asynchronous activity that adds one or more tags to all contacts meeting your contact filtering criteria. Use the `source` type to identify contacts from which the specified tags (`tag_id`) are added. Source criteria are mutually exclusive. If the source is `all_active_contacts` or `list_ids`, you can optionally choose to `exclude` contacts by `contact_id`. Use the activity link in the results to check the status of your request. For more use case information, see \"[Add Tags to Contacts](/api_guide/add_tagging_activity.html)
+
+ :param create_tag_remove_activity_request: The JSON payload used to create an asynchronous activity that adds tags to contacts that meet your specified contact filtering criteria. (required)
+ :type create_tag_remove_activity_request: CreateTagRemoveActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_tag_add_contact_activity_serialize(
+ create_tag_remove_activity_request=create_tag_remove_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateTagRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_tag_add_contact_activity_with_http_info(
+ self,
+ create_tag_remove_activity_request: Annotated[CreateTagRemoveActivityRequest, Field(description="The JSON payload used to create an asynchronous activity that adds tags to contacts that meet your specified contact filtering criteria.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateTagRemoveActivity201Response]:
+ """Add Tags to Contacts
+
+ Use this method to create an asynchronous activity that adds one or more tags to all contacts meeting your contact filtering criteria. Use the `source` type to identify contacts from which the specified tags (`tag_id`) are added. Source criteria are mutually exclusive. If the source is `all_active_contacts` or `list_ids`, you can optionally choose to `exclude` contacts by `contact_id`. Use the activity link in the results to check the status of your request. For more use case information, see \"[Add Tags to Contacts](/api_guide/add_tagging_activity.html)
+
+ :param create_tag_remove_activity_request: The JSON payload used to create an asynchronous activity that adds tags to contacts that meet your specified contact filtering criteria. (required)
+ :type create_tag_remove_activity_request: CreateTagRemoveActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_tag_add_contact_activity_serialize(
+ create_tag_remove_activity_request=create_tag_remove_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateTagRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_tag_add_contact_activity_without_preload_content(
+ self,
+ create_tag_remove_activity_request: Annotated[CreateTagRemoveActivityRequest, Field(description="The JSON payload used to create an asynchronous activity that adds tags to contacts that meet your specified contact filtering criteria.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Add Tags to Contacts
+
+ Use this method to create an asynchronous activity that adds one or more tags to all contacts meeting your contact filtering criteria. Use the `source` type to identify contacts from which the specified tags (`tag_id`) are added. Source criteria are mutually exclusive. If the source is `all_active_contacts` or `list_ids`, you can optionally choose to `exclude` contacts by `contact_id`. Use the activity link in the results to check the status of your request. For more use case information, see \"[Add Tags to Contacts](/api_guide/add_tagging_activity.html)
+
+ :param create_tag_remove_activity_request: The JSON payload used to create an asynchronous activity that adds tags to contacts that meet your specified contact filtering criteria. (required)
+ :type create_tag_remove_activity_request: CreateTagRemoveActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_tag_add_contact_activity_serialize(
+ create_tag_remove_activity_request=create_tag_remove_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateTagRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_tag_add_contact_activity_serialize(
+ self,
+ create_tag_remove_activity_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_tag_remove_activity_request is not None:
+ _body_params = create_tag_remove_activity_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/activities/contacts_taggings_add',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_tag_delete_activity(
+ self,
+ create_tag_delete_activity_request: Annotated[CreateTagDeleteActivityRequest, Field(description="An array of string values (`tag_id`s) to delete.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateTagRemoveActivity201Response:
+ """Delete Tags
+
+ Use this method to create an asynchronous activity that deletes up to 500 tags. Deleted tags are automatically removed from tagged contacts. Use the `tag_ids` array of string values in the request body to specify which tags to delete.
+
+ :param create_tag_delete_activity_request: An array of string values (`tag_id`s) to delete. (required)
+ :type create_tag_delete_activity_request: CreateTagDeleteActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_tag_delete_activity_serialize(
+ create_tag_delete_activity_request=create_tag_delete_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateTagRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_tag_delete_activity_with_http_info(
+ self,
+ create_tag_delete_activity_request: Annotated[CreateTagDeleteActivityRequest, Field(description="An array of string values (`tag_id`s) to delete.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateTagRemoveActivity201Response]:
+ """Delete Tags
+
+ Use this method to create an asynchronous activity that deletes up to 500 tags. Deleted tags are automatically removed from tagged contacts. Use the `tag_ids` array of string values in the request body to specify which tags to delete.
+
+ :param create_tag_delete_activity_request: An array of string values (`tag_id`s) to delete. (required)
+ :type create_tag_delete_activity_request: CreateTagDeleteActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_tag_delete_activity_serialize(
+ create_tag_delete_activity_request=create_tag_delete_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateTagRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_tag_delete_activity_without_preload_content(
+ self,
+ create_tag_delete_activity_request: Annotated[CreateTagDeleteActivityRequest, Field(description="An array of string values (`tag_id`s) to delete.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Tags
+
+ Use this method to create an asynchronous activity that deletes up to 500 tags. Deleted tags are automatically removed from tagged contacts. Use the `tag_ids` array of string values in the request body to specify which tags to delete.
+
+ :param create_tag_delete_activity_request: An array of string values (`tag_id`s) to delete. (required)
+ :type create_tag_delete_activity_request: CreateTagDeleteActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_tag_delete_activity_serialize(
+ create_tag_delete_activity_request=create_tag_delete_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateTagRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_tag_delete_activity_serialize(
+ self,
+ create_tag_delete_activity_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_tag_delete_activity_request is not None:
+ _body_params = create_tag_delete_activity_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/activities/contacts_tags_delete',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def create_tag_remove_activity(
+ self,
+ create_tag_remove_activity_request: Annotated[CreateTagRemoveActivityRequest, Field(description="The JSON payload used to create an asynchronous activity that removes tags from contacts meeting your specified contact filtering criteria.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateTagRemoveActivity201Response:
+ """Remove Tags from Contacts
+
+ Use this method to create an asynchronous activity that removes one or more tags from all contacts meeting your contact filtering criteria. Filtering criteria must include the `source` type used to identify contacts from which the specified tags (`tag_id`) are removed. Source types are mutually exclusive. If the specified source is either `all_active_contacts` or `list_ids`, you can optionally choose to `exclude` specified contacts by `contact_id`. Use the activity link in the results to check the status of your request.\" For more use case information, see \"[Remove Tags from Contacts](/api_guide/remove_tagging_activity.html)
+
+ :param create_tag_remove_activity_request: The JSON payload used to create an asynchronous activity that removes tags from contacts meeting your specified contact filtering criteria. (required)
+ :type create_tag_remove_activity_request: CreateTagRemoveActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_tag_remove_activity_serialize(
+ create_tag_remove_activity_request=create_tag_remove_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateTagRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_tag_remove_activity_with_http_info(
+ self,
+ create_tag_remove_activity_request: Annotated[CreateTagRemoveActivityRequest, Field(description="The JSON payload used to create an asynchronous activity that removes tags from contacts meeting your specified contact filtering criteria.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateTagRemoveActivity201Response]:
+ """Remove Tags from Contacts
+
+ Use this method to create an asynchronous activity that removes one or more tags from all contacts meeting your contact filtering criteria. Filtering criteria must include the `source` type used to identify contacts from which the specified tags (`tag_id`) are removed. Source types are mutually exclusive. If the specified source is either `all_active_contacts` or `list_ids`, you can optionally choose to `exclude` specified contacts by `contact_id`. Use the activity link in the results to check the status of your request.\" For more use case information, see \"[Remove Tags from Contacts](/api_guide/remove_tagging_activity.html)
+
+ :param create_tag_remove_activity_request: The JSON payload used to create an asynchronous activity that removes tags from contacts meeting your specified contact filtering criteria. (required)
+ :type create_tag_remove_activity_request: CreateTagRemoveActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_tag_remove_activity_serialize(
+ create_tag_remove_activity_request=create_tag_remove_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateTagRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_tag_remove_activity_without_preload_content(
+ self,
+ create_tag_remove_activity_request: Annotated[CreateTagRemoveActivityRequest, Field(description="The JSON payload used to create an asynchronous activity that removes tags from contacts meeting your specified contact filtering criteria.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Remove Tags from Contacts
+
+ Use this method to create an asynchronous activity that removes one or more tags from all contacts meeting your contact filtering criteria. Filtering criteria must include the `source` type used to identify contacts from which the specified tags (`tag_id`) are removed. Source types are mutually exclusive. If the specified source is either `all_active_contacts` or `list_ids`, you can optionally choose to `exclude` specified contacts by `contact_id`. Use the activity link in the results to check the status of your request.\" For more use case information, see \"[Remove Tags from Contacts](/api_guide/remove_tagging_activity.html)
+
+ :param create_tag_remove_activity_request: The JSON payload used to create an asynchronous activity that removes tags from contacts meeting your specified contact filtering criteria. (required)
+ :type create_tag_remove_activity_request: CreateTagRemoveActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_tag_remove_activity_serialize(
+ create_tag_remove_activity_request=create_tag_remove_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateTagRemoveActivity201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_tag_remove_activity_serialize(
+ self,
+ create_tag_remove_activity_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_tag_remove_activity_request is not None:
+ _body_params = create_tag_remove_activity_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/activities/contacts_taggings_remove',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_activity_by_id(
+ self,
+ activity_id: Annotated[StrictStr, Field(description="The unique ID of the activity to GET")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetActivityById200Response:
+ """GET an Activity Status
+
+ This endpoint returns an activity status report.
+
+ :param activity_id: The unique ID of the activity to GET (required)
+ :type activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_activity_by_id_serialize(
+ activity_id=activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetActivityById200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_activity_by_id_with_http_info(
+ self,
+ activity_id: Annotated[StrictStr, Field(description="The unique ID of the activity to GET")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetActivityById200Response]:
+ """GET an Activity Status
+
+ This endpoint returns an activity status report.
+
+ :param activity_id: The unique ID of the activity to GET (required)
+ :type activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_activity_by_id_serialize(
+ activity_id=activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetActivityById200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_activity_by_id_without_preload_content(
+ self,
+ activity_id: Annotated[StrictStr, Field(description="The unique ID of the activity to GET")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Activity Status
+
+ This endpoint returns an activity status report.
+
+ :param activity_id: The unique ID of the activity to GET (required)
+ :type activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_activity_by_id_serialize(
+ activity_id=activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetActivityById200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_activity_by_id_serialize(
+ self,
+ activity_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if activity_id is not None:
+ _path_params['activity_id'] = activity_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/activities/{activity_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_all_activities(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Specifies the number of results displayed per page of output, from 1 - 500, default = 50.")] = None,
+ state: Annotated[Optional[StrictStr], Field(description="Use this parameter to filter the response to include only activities in one of the following states: cancelled, completed, failed, processing, or timed_out.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetAllActivities200Response:
+ """GET Activity Status Collection
+
+ This endpoint returns a collection of activities. Use the state query parameter to include only activities with a specific status (processing, completed, cancelled, failed, or time_out). Use the limit query parameter to define the number of activities returned per page. Learn [more](/api_guide/activity_status.html).
+
+ :param limit: Specifies the number of results displayed per page of output, from 1 - 500, default = 50.
+ :type limit: int
+ :param state: Use this parameter to filter the response to include only activities in one of the following states: cancelled, completed, failed, processing, or timed_out.
+ :type state: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_all_activities_serialize(
+ limit=limit,
+ state=state,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAllActivities200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_all_activities_with_http_info(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Specifies the number of results displayed per page of output, from 1 - 500, default = 50.")] = None,
+ state: Annotated[Optional[StrictStr], Field(description="Use this parameter to filter the response to include only activities in one of the following states: cancelled, completed, failed, processing, or timed_out.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetAllActivities200Response]:
+ """GET Activity Status Collection
+
+ This endpoint returns a collection of activities. Use the state query parameter to include only activities with a specific status (processing, completed, cancelled, failed, or time_out). Use the limit query parameter to define the number of activities returned per page. Learn [more](/api_guide/activity_status.html).
+
+ :param limit: Specifies the number of results displayed per page of output, from 1 - 500, default = 50.
+ :type limit: int
+ :param state: Use this parameter to filter the response to include only activities in one of the following states: cancelled, completed, failed, processing, or timed_out.
+ :type state: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_all_activities_serialize(
+ limit=limit,
+ state=state,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAllActivities200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_all_activities_without_preload_content(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Specifies the number of results displayed per page of output, from 1 - 500, default = 50.")] = None,
+ state: Annotated[Optional[StrictStr], Field(description="Use this parameter to filter the response to include only activities in one of the following states: cancelled, completed, failed, processing, or timed_out.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET Activity Status Collection
+
+ This endpoint returns a collection of activities. Use the state query parameter to include only activities with a specific status (processing, completed, cancelled, failed, or time_out). Use the limit query parameter to define the number of activities returned per page. Learn [more](/api_guide/activity_status.html).
+
+ :param limit: Specifies the number of results displayed per page of output, from 1 - 500, default = 50.
+ :type limit: int
+ :param state: Use this parameter to filter the response to include only activities in one of the following states: cancelled, completed, failed, processing, or timed_out.
+ :type state: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_all_activities_serialize(
+ limit=limit,
+ state=state,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAllActivities200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_all_activities_serialize(
+ self,
+ limit,
+ state,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if state is not None:
+
+ _query_params.append(('state', state))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/activities',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_csv_export_file(
+ self,
+ file_export_id: Annotated[StrictStr, Field(description="The unique ID of the exported file provided in the results: section of the export contacts activity response.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> str:
+ """Retrieve Exported Contacts File
+
+ Use this endpoint to retrieve (GET) a CSV file containing exported contacts by providing the `activity_id` of a completed CSV export activity.
+
+ :param file_export_id: The unique ID of the exported file provided in the results: section of the export contacts activity response. (required)
+ :type file_export_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_csv_export_file_serialize(
+ file_export_id=file_export_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_csv_export_file_with_http_info(
+ self,
+ file_export_id: Annotated[StrictStr, Field(description="The unique ID of the exported file provided in the results: section of the export contacts activity response.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[str]:
+ """Retrieve Exported Contacts File
+
+ Use this endpoint to retrieve (GET) a CSV file containing exported contacts by providing the `activity_id` of a completed CSV export activity.
+
+ :param file_export_id: The unique ID of the exported file provided in the results: section of the export contacts activity response. (required)
+ :type file_export_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_csv_export_file_serialize(
+ file_export_id=file_export_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_csv_export_file_without_preload_content(
+ self,
+ file_export_id: Annotated[StrictStr, Field(description="The unique ID of the exported file provided in the results: section of the export contacts activity response.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Retrieve Exported Contacts File
+
+ Use this endpoint to retrieve (GET) a CSV file containing exported contacts by providing the `activity_id` of a completed CSV export activity.
+
+ :param file_export_id: The unique ID of the exported file provided in the results: section of the export contacts activity response. (required)
+ :type file_export_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_csv_export_file_serialize(
+ file_export_id=file_export_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "str",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_csv_export_file_serialize(
+ self,
+ file_export_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if file_export_id is not None:
+ _path_params['file_export_id'] = file_export_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/csv'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/contact_exports/{file_export_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def post_custom_field_delete(
+ self,
+ post_custom_field_delete_request: Annotated[PostCustomFieldDeleteRequest, Field(description="An array of `custom_field_id`'s to delete.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PostCustomFieldDelete201Response:
+ """Delete Custom Fields
+
+ Use this endpoint to delete up to 100 custom fields for an account.
+
+ :param post_custom_field_delete_request: An array of `custom_field_id`'s to delete. (required)
+ :type post_custom_field_delete_request: PostCustomFieldDeleteRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._post_custom_field_delete_serialize(
+ post_custom_field_delete_request=post_custom_field_delete_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "PostCustomFieldDelete201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def post_custom_field_delete_with_http_info(
+ self,
+ post_custom_field_delete_request: Annotated[PostCustomFieldDeleteRequest, Field(description="An array of `custom_field_id`'s to delete.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PostCustomFieldDelete201Response]:
+ """Delete Custom Fields
+
+ Use this endpoint to delete up to 100 custom fields for an account.
+
+ :param post_custom_field_delete_request: An array of `custom_field_id`'s to delete. (required)
+ :type post_custom_field_delete_request: PostCustomFieldDeleteRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._post_custom_field_delete_serialize(
+ post_custom_field_delete_request=post_custom_field_delete_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "PostCustomFieldDelete201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def post_custom_field_delete_without_preload_content(
+ self,
+ post_custom_field_delete_request: Annotated[PostCustomFieldDeleteRequest, Field(description="An array of `custom_field_id`'s to delete.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Delete Custom Fields
+
+ Use this endpoint to delete up to 100 custom fields for an account.
+
+ :param post_custom_field_delete_request: An array of `custom_field_id`'s to delete. (required)
+ :type post_custom_field_delete_request: PostCustomFieldDeleteRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._post_custom_field_delete_serialize(
+ post_custom_field_delete_request=post_custom_field_delete_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "PostCustomFieldDelete201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _post_custom_field_delete_serialize(
+ self,
+ post_custom_field_delete_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if post_custom_field_delete_request is not None:
+ _body_params = post_custom_field_delete_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/activities/custom_fields_delete',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/constant_contact_api_client/api/contact_lists_api.py b/constant_contact_api_client/api/contact_lists_api.py
new file mode 100644
index 0000000..941bb28
--- /dev/null
+++ b/constant_contact_api_client/api/contact_lists_api.py
@@ -0,0 +1,1841 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
+
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictBool, StrictStr, field_validator
+
+from typing import Optional
+
+from constant_contact_api_client.models.delete_list202_response import DeleteList202Response
+from constant_contact_api_client.models.get_all_lists200_response import GetAllLists200Response
+from constant_contact_api_client.models.get_list200_response import GetList200Response
+from constant_contact_api_client.models.get_list_id_xrefs200_response import GetListIdXrefs200Response
+from constant_contact_api_client.models.update_list200_response import UpdateList200Response
+from constant_contact_api_client.models.update_list_request import UpdateListRequest
+
+from constant_contact_api_client.api_client import ApiClient
+from constant_contact_api_client.api_response import ApiResponse
+from constant_contact_api_client.rest import RESTResponseType
+
+
+class ContactListsApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def create_list(
+ self,
+ update_list_request: Annotated[UpdateListRequest, Field(description="JSON payload defining the new contact list")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> UpdateList200Response:
+ """POST (create) a List
+
+ Create a new contact list resource
+
+ :param update_list_request: JSON payload defining the new contact list (required)
+ :type update_list_request: UpdateListRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_serialize(
+ update_list_request=update_list_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "UpdateList200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '409': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_list_with_http_info(
+ self,
+ update_list_request: Annotated[UpdateListRequest, Field(description="JSON payload defining the new contact list")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[UpdateList200Response]:
+ """POST (create) a List
+
+ Create a new contact list resource
+
+ :param update_list_request: JSON payload defining the new contact list (required)
+ :type update_list_request: UpdateListRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_serialize(
+ update_list_request=update_list_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "UpdateList200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '409': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_list_without_preload_content(
+ self,
+ update_list_request: Annotated[UpdateListRequest, Field(description="JSON payload defining the new contact list")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """POST (create) a List
+
+ Create a new contact list resource
+
+ :param update_list_request: JSON payload defining the new contact list (required)
+ :type update_list_request: UpdateListRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_list_serialize(
+ update_list_request=update_list_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "UpdateList200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '409': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_list_serialize(
+ self,
+ update_list_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_list_request is not None:
+ _body_params = update_list_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/contact_lists',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def delete_list(
+ self,
+ list_id: Annotated[StrictStr, Field(description="Unique ID of the list to delete")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> DeleteList202Response:
+ """DELETE a List
+
+ Deletes the specified contact list and its membership. DELETE List requests are processed asynchronously, and you can track the status of the request by making a GET call to the URI shown in the `_links` property in the response.
+
+ :param list_id: Unique ID of the list to delete (required)
+ :type list_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_list_serialize(
+ list_id=list_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '202': "DeleteList202Response",
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def delete_list_with_http_info(
+ self,
+ list_id: Annotated[StrictStr, Field(description="Unique ID of the list to delete")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[DeleteList202Response]:
+ """DELETE a List
+
+ Deletes the specified contact list and its membership. DELETE List requests are processed asynchronously, and you can track the status of the request by making a GET call to the URI shown in the `_links` property in the response.
+
+ :param list_id: Unique ID of the list to delete (required)
+ :type list_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_list_serialize(
+ list_id=list_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '202': "DeleteList202Response",
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_list_without_preload_content(
+ self,
+ list_id: Annotated[StrictStr, Field(description="Unique ID of the list to delete")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """DELETE a List
+
+ Deletes the specified contact list and its membership. DELETE List requests are processed asynchronously, and you can track the status of the request by making a GET call to the URI shown in the `_links` property in the response.
+
+ :param list_id: Unique ID of the list to delete (required)
+ :type list_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_list_serialize(
+ list_id=list_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '202': "DeleteList202Response",
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ '503': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_list_serialize(
+ self,
+ list_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if list_id is not None:
+ _path_params['list_id'] = list_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/contact_lists/{list_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_all_lists(
+ self,
+ limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Use to specify the number of results displayed per page of output, from 1 - 500, default = 50.")] = None,
+ include_count: Annotated[Optional[StrictBool], Field(description="Set `include_count` to `true` to return the total number of contact lists that meet your selection criteria.")] = None,
+ include_membership_count: Annotated[Optional[StrictStr], Field(description="Use to include the total number of contacts per list. Set to `active`, to count only active (mailable) contacts, or `all` to count all contacts.")] = None,
+ name: Annotated[Optional[StrictStr], Field(description="Use to get details for a single list by entering the full name of the list.")] = None,
+ status: Annotated[Optional[StrictStr], Field(description="Use to get lists by status. Accepts comma-separated status values.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetAllLists200Response:
+ """GET Lists Collection
+
+ Use this method to return details about all contact lists for the account.
This method does not currently support filtering results using the contact list update date.
This method does not currently support filtering results using the contact list update date.
This method does not currently support filtering results using the contact list update date.
Use this endpoint to migrate your locally stored V2 contact list data to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.
Use this endpoint to migrate your locally stored V2 contact list data to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.
Use this endpoint to migrate your locally stored V2 contact list data to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.
include_count
query parameter to include the total number of contacts assigned each tag. Use the limit
query parameter to limit the number of tag results returned per page. To get the next page of results, copy the cursor={the cursor ID}
from the resulting href link and add it (&
) to the URL. For example: /v3/contact_tags?limit=1&cursor=
bGltaXQ9MSZuZXh0PTJjZDgwMjdhLTc4YzAtMTFlOS1iZmQwLWZhMTYzZTZiMDFjMQ=
include_count
query parameter to include the total number of contacts assigned each tag. Use the limit
query parameter to limit the number of tag results returned per page. To get the next page of results, copy the cursor={the cursor ID}
from the resulting href link and add it (&
) to the URL. For example: /v3/contact_tags?limit=1&cursor=
bGltaXQ9MSZuZXh0PTJjZDgwMjdhLTc4YzAtMTFlOS1iZmQwLWZhMTYzZTZiMDFjMQ=
include_count
query parameter to include the total number of contacts assigned each tag. Use the limit
query parameter to limit the number of tag results returned per page. To get the next page of results, copy the cursor={the cursor ID}
from the resulting href link and add it (&
) to the URL. For example: /v3/contact_tags?limit=1&cursor=
bGltaXQ9MSZuZXh0PTJjZDgwMjdhLTc4YzAtMTFlOS1iZmQwLWZhMTYzZTZiMDFjMQ=
Only use this method when a contact gives you their explicit permission to send them emails. It is a violation of US and Canadian anti-spam laws, as well as a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API to opt a contact back in without his or her own action and consent.
Only use this method when a contact gives you their explicit permission to send them emails. It is a violation of US and Canadian anti-spam laws, as well as a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API to opt a contact back in without his or her own action and consent.
Only use this method when a contact gives you their explicit permission to send them emails. It is a violation of US and Canadian anti-spam laws, as well as a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API to opt a contact back in without his or her own action and consent.
Use this endpoint to migrate your locally stored V2 contact ids to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.
Use this endpoint to migrate your locally stored V2 contact ids to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.
Use this endpoint to migrate your locally stored V2 contact ids to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.
This method does not currently support filtering results using the custom field update date.
This method does not currently support filtering results using the custom field update date.
This method does not currently support filtering results using the custom field update date.
Gets the average open and click rate for a given account and contact.
Looks at all tracking activities for bulk emails from a given contact over the given date range. Range cannot exceed 5 years.
Returns the rates and the number of campaign activities that were included in the calculation.
If no activities fall into the given date range, all rates will return 0 and the number of included activities will be 0.
+ + :param contact_id: The contact id which is requesting tracking activity data (e.g. aa9ff7b0-478d-11e6-8059-00163e3c8e19) (required) + :type contact_id: str + :param start: The starting date, in ISO 8601 format, to use to get campaigns. For example: 2019-01-01T00:00:00-0500. (required) + :type start: str + :param end: The ending date, in ISO 8601 format, to use to get campaigns. For example: 2019-12-01T00:00:00-0500. (required) + :type end: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_contact_open_click_rate_report_serialize( + contact_id=contact_id, + start=start, + end=end, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetContactOpenClickRateReport200Response", + '400': None, + '401': None, + '403': None, + '404': None, + '415': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_contact_open_click_rate_report_with_http_info( + self, + contact_id: Annotated[StrictStr, Field(description="The contact id which is requesting tracking activity data (e.g. aa9ff7b0-478d-11e6-8059-00163e3c8e19)")], + start: Annotated[StrictStr, Field(description="The starting date, in ISO 8601 format, to use to get campaigns. For example: 2019-01-01T00:00:00-0500.")], + end: Annotated[StrictStr, Field(description="The ending date, in ISO 8601 format, to use to get campaigns. For example: 2019-12-01T00:00:00-0500.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetContactOpenClickRateReport200Response]: + """GET Average Open and Click Rates + +Gets the average open and click rate for a given account and contact.
Looks at all tracking activities for bulk emails from a given contact over the given date range. Range cannot exceed 5 years.
Returns the rates and the number of campaign activities that were included in the calculation.
If no activities fall into the given date range, all rates will return 0 and the number of included activities will be 0.
+ + :param contact_id: The contact id which is requesting tracking activity data (e.g. aa9ff7b0-478d-11e6-8059-00163e3c8e19) (required) + :type contact_id: str + :param start: The starting date, in ISO 8601 format, to use to get campaigns. For example: 2019-01-01T00:00:00-0500. (required) + :type start: str + :param end: The ending date, in ISO 8601 format, to use to get campaigns. For example: 2019-12-01T00:00:00-0500. (required) + :type end: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_contact_open_click_rate_report_serialize( + contact_id=contact_id, + start=start, + end=end, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetContactOpenClickRateReport200Response", + '400': None, + '401': None, + '403': None, + '404': None, + '415': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_contact_open_click_rate_report_without_preload_content( + self, + contact_id: Annotated[StrictStr, Field(description="The contact id which is requesting tracking activity data (e.g. aa9ff7b0-478d-11e6-8059-00163e3c8e19)")], + start: Annotated[StrictStr, Field(description="The starting date, in ISO 8601 format, to use to get campaigns. For example: 2019-01-01T00:00:00-0500.")], + end: Annotated[StrictStr, Field(description="The ending date, in ISO 8601 format, to use to get campaigns. For example: 2019-12-01T00:00:00-0500.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """GET Average Open and Click Rates + +Gets the average open and click rate for a given account and contact.
Looks at all tracking activities for bulk emails from a given contact over the given date range. Range cannot exceed 5 years.
Returns the rates and the number of campaign activities that were included in the calculation.
If no activities fall into the given date range, all rates will return 0 and the number of included activities will be 0.
+ + :param contact_id: The contact id which is requesting tracking activity data (e.g. aa9ff7b0-478d-11e6-8059-00163e3c8e19) (required) + :type contact_id: str + :param start: The starting date, in ISO 8601 format, to use to get campaigns. For example: 2019-01-01T00:00:00-0500. (required) + :type start: str + :param end: The ending date, in ISO 8601 format, to use to get campaigns. For example: 2019-12-01T00:00:00-0500. (required) + :type end: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_contact_open_click_rate_report_serialize( + contact_id=contact_id, + start=start, + end=end, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetContactOpenClickRateReport200Response", + '400': None, + '401': None, + '403': None, + '404': None, + '415': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_contact_open_click_rate_report_serialize( + self, + contact_id, + start, + end, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if contact_id is not None: + _path_params['contact_id'] = contact_id + # process the query parameters + if start is not None: + + _query_params.append(('start', start)) + + if end is not None: + + _query_params.append(('end', end)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'oauth2_access_code', + 'oauth2_implicit' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/reports/contact_reports/{contact_id}/open_and_click_rates', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_contact_tracking_count_report( + self, + contact_id: Annotated[StrictStr, Field(description="The contact id which is requesting tracking activity data (e.g. aa9ff7b0-478d-11e6-8059-00163e3c8e19)")], + start: Annotated[StrictStr, Field(description="The starting date, in ISO 8601 format, to use to get campaigns. For example: 2019-01-01T00:00:00-0500.")], + end: Annotated[StrictStr, Field(description="The ending date, in ISO 8601 format, to use to get campaigns. For example: 2019-12-01T00:00:00-0500.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetContactTrackingCountReport200Response: + """GET Contact Action Summary + + Get a list of the recent emails (aka, campaign activities) sent to a specific contact and a summary of the actions the contact took on that email for the most recent 200 campaigns. + + :param contact_id: The contact id which is requesting tracking activity data (e.g. aa9ff7b0-478d-11e6-8059-00163e3c8e19) (required) + :type contact_id: str + :param start: The starting date, in ISO 8601 format, to use to get campaigns. For example: 2019-01-01T00:00:00-0500. (required) + :type start: str + :param end: The ending date, in ISO 8601 format, to use to get campaigns. For example: 2019-12-01T00:00:00-0500. (required) + :type end: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_contact_tracking_count_report_serialize( + contact_id=contact_id, + start=start, + end=end, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetContactTrackingCountReport200Response", + '400': None, + '401': None, + '403': None, + '404': None, + '415': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_contact_tracking_count_report_with_http_info( + self, + contact_id: Annotated[StrictStr, Field(description="The contact id which is requesting tracking activity data (e.g. aa9ff7b0-478d-11e6-8059-00163e3c8e19)")], + start: Annotated[StrictStr, Field(description="The starting date, in ISO 8601 format, to use to get campaigns. For example: 2019-01-01T00:00:00-0500.")], + end: Annotated[StrictStr, Field(description="The ending date, in ISO 8601 format, to use to get campaigns. For example: 2019-12-01T00:00:00-0500.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetContactTrackingCountReport200Response]: + """GET Contact Action Summary + + Get a list of the recent emails (aka, campaign activities) sent to a specific contact and a summary of the actions the contact took on that email for the most recent 200 campaigns. + + :param contact_id: The contact id which is requesting tracking activity data (e.g. aa9ff7b0-478d-11e6-8059-00163e3c8e19) (required) + :type contact_id: str + :param start: The starting date, in ISO 8601 format, to use to get campaigns. For example: 2019-01-01T00:00:00-0500. (required) + :type start: str + :param end: The ending date, in ISO 8601 format, to use to get campaigns. For example: 2019-12-01T00:00:00-0500. (required) + :type end: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_contact_tracking_count_report_serialize( + contact_id=contact_id, + start=start, + end=end, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetContactTrackingCountReport200Response", + '400': None, + '401': None, + '403': None, + '404': None, + '415': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_contact_tracking_count_report_without_preload_content( + self, + contact_id: Annotated[StrictStr, Field(description="The contact id which is requesting tracking activity data (e.g. aa9ff7b0-478d-11e6-8059-00163e3c8e19)")], + start: Annotated[StrictStr, Field(description="The starting date, in ISO 8601 format, to use to get campaigns. For example: 2019-01-01T00:00:00-0500.")], + end: Annotated[StrictStr, Field(description="The ending date, in ISO 8601 format, to use to get campaigns. For example: 2019-12-01T00:00:00-0500.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """GET Contact Action Summary + + Get a list of the recent emails (aka, campaign activities) sent to a specific contact and a summary of the actions the contact took on that email for the most recent 200 campaigns. + + :param contact_id: The contact id which is requesting tracking activity data (e.g. aa9ff7b0-478d-11e6-8059-00163e3c8e19) (required) + :type contact_id: str + :param start: The starting date, in ISO 8601 format, to use to get campaigns. For example: 2019-01-01T00:00:00-0500. (required) + :type start: str + :param end: The ending date, in ISO 8601 format, to use to get campaigns. For example: 2019-12-01T00:00:00-0500. (required) + :type end: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_contact_tracking_count_report_serialize( + contact_id=contact_id, + start=start, + end=end, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetContactTrackingCountReport200Response", + '400': None, + '401': None, + '403': None, + '404': None, + '415': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_contact_tracking_count_report_serialize( + self, + contact_id, + start, + end, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if contact_id is not None: + _path_params['contact_id'] = contact_id + # process the query parameters + if start is not None: + + _query_params.append(('start', start)) + + if end is not None: + + _query_params.append(('end', end)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'oauth2_access_code', + 'oauth2_implicit' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/reports/contact_reports/{contact_id}/activity_summary', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_contact_tracking_report( + self, + contact_id: Annotated[StrictStr, Field(description="The contact's ID for which tracking activity data is requested.")], + tracking_activities_list: Annotated[Optional[List[StrictStr]], Field(description="Specify one or more tracking activity types to include as a comma-delimited string. The `tracking_activities_list` and `tracking_activities_type` query parameters are mutually exclusive.")] = None, + tracking_activity_type: Annotated[Optional[List[StrictStr]], Field(description="Specify one or more tracking activity types to include as an array. The `tracking_activities_list` and `tracking_activities_type` query parameters are mutually exclusive.")] = None, + include_campaign_activity_names: Annotated[Optional[StrictBool], Field(description="Default (`true`) returns campaign activity names in the results. Not including campaign activity names in the results (`false`), is more efficient.")] = None, + limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return in a single page. Valid values are 1 to 100. Default is 100.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetContactTrackingReport200Response: + """GET Contact Activity Details + +Gets the tracking activity data for a single contact, sorted in descending activity date order.
You must chose either the `tracking_activities_list` query parameter and or the `tracking_activity_type` query parameter to specify one or more tracking activity types In the request. The `tracking_activities_list` and `tracking_activities_type` query parameters are mutually exclusive.
Valid tracking activity types | |
em_sends | Send activities |
em_opens | Email open tracking activities |
em_clicks | Link click-through tracking activities |
em_bounces | Bounce tracking activities |
em_optouts | Opt-out tracking activities |
em_forwards | Forward to a friend tracking activities |
p_contact_open | Landing page opens |
p_contact_click | Landing page clicks |
p_contact_add | Landing page adds |
p_contact_update | Landing page updates |
Gets the tracking activity data for a single contact, sorted in descending activity date order.
You must chose either the `tracking_activities_list` query parameter and or the `tracking_activity_type` query parameter to specify one or more tracking activity types In the request. The `tracking_activities_list` and `tracking_activities_type` query parameters are mutually exclusive.
Valid tracking activity types | |
em_sends | Send activities |
em_opens | Email open tracking activities |
em_clicks | Link click-through tracking activities |
em_bounces | Bounce tracking activities |
em_optouts | Opt-out tracking activities |
em_forwards | Forward to a friend tracking activities |
p_contact_open | Landing page opens |
p_contact_click | Landing page clicks |
p_contact_add | Landing page adds |
p_contact_update | Landing page updates |
Gets the tracking activity data for a single contact, sorted in descending activity date order.
You must chose either the `tracking_activities_list` query parameter and or the `tracking_activity_type` query parameter to specify one or more tracking activity types In the request. The `tracking_activities_list` and `tracking_activities_type` query parameters are mutually exclusive.
Valid tracking activity types | |
em_sends | Send activities |
em_opens | Email open tracking activities |
em_clicks | Link click-through tracking activities |
em_bounces | Bounce tracking activities |
em_optouts | Opt-out tracking activities |
em_forwards | Forward to a friend tracking activities |
p_contact_open | Landing page opens |
p_contact_click | Landing page clicks |
p_contact_add | Landing page adds |
p_contact_update | Landing page updates |
This method does not currently support filtering results using the email campaign creation date.
This method does not currently support filtering results using the email campaign creation date.
This method does not currently support filtering results using the email campaign creation date.
Use this endpoint to migrate your locally stored V2 email campaign data to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.
Use this endpoint to migrate your locally stored V2 email campaign data to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.
Use this endpoint to migrate your locally stored V2 email campaign data to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.
bounce_code
query parameter to limit the type of bounce data to return. For more use case information, see [Get a Bounces Report for an Email Campaign Activity](/api_guide/email_summary_bounces_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param bounce_code: To return results for a specific bounce code, select the `bounce_code` from the drop-down list. To return results for multiple codes, repeat the bounce code parameter for each. For example, to return results for bounce codes `B` and `D` use `bounce_code=B&bounce_code=D`.
+ :type bounce_code: List[str]
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_bounces_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ bounce_code=bounce_code,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetBouncesReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_bounces_report_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ bounce_code: Annotated[Optional[List[StrictStr]], Field(description="To return results for a specific bounce code, select the `bounce_code` from the drop-down list. To return results for multiple codes, repeat the bounce code parameter for each. For example, to return results for bounce codes `B` and `D` use `bounce_code=B&bounce_code=D`.")] = None,
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetBouncesReport200Response]:
+ """GET an Email Bounces Report
+
+ Use this method to get a report listing contact bounce data for the specified email campaign activity. This report lists the most recent bounce data first and includes contact information, such as the contact's email address, unique ID, and the email bounce date and time. Use the bounce_code
query parameter to limit the type of bounce data to return. For more use case information, see [Get a Bounces Report for an Email Campaign Activity](/api_guide/email_summary_bounces_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param bounce_code: To return results for a specific bounce code, select the `bounce_code` from the drop-down list. To return results for multiple codes, repeat the bounce code parameter for each. For example, to return results for bounce codes `B` and `D` use `bounce_code=B&bounce_code=D`.
+ :type bounce_code: List[str]
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_bounces_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ bounce_code=bounce_code,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetBouncesReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_bounces_report_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ bounce_code: Annotated[Optional[List[StrictStr]], Field(description="To return results for a specific bounce code, select the `bounce_code` from the drop-down list. To return results for multiple codes, repeat the bounce code parameter for each. For example, to return results for bounce codes `B` and `D` use `bounce_code=B&bounce_code=D`.")] = None,
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Bounces Report
+
+ Use this method to get a report listing contact bounce data for the specified email campaign activity. This report lists the most recent bounce data first and includes contact information, such as the contact's email address, unique ID, and the email bounce date and time. Use the bounce_code
query parameter to limit the type of bounce data to return. For more use case information, see [Get a Bounces Report for an Email Campaign Activity](/api_guide/email_summary_bounces_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param bounce_code: To return results for a specific bounce code, select the `bounce_code` from the drop-down list. To return results for multiple codes, repeat the bounce code parameter for each. For example, to return results for bounce codes `B` and `D` use `bounce_code=B&bounce_code=D`.
+ :type bounce_code: List[str]
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_bounces_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ bounce_code=bounce_code,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetBouncesReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_bounces_report_serialize(
+ self,
+ campaign_activity_id,
+ bounce_code,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'bounce_code': 'multi',
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if bounce_code is not None:
+
+ _query_params.append(('bounce_code', bounce_code))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/email_reports/{campaign_activity_id}/tracking/bounces',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_campaign_activity_link_report(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ no_clicks: Annotated[Optional[StrictBool], Field(description="Set this query parameter to `true` to return details for links that were not clicked in the response results.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetCampaignActivityLinkReport200Response:
+ """GET an Email Links Report
+
+ Use this method to return link details, including the number of unique contacts that clicked each link in an email campaign activity, and the type of action associated with clicking each link. To include link details for links that were not clicked, set the `no_clicks` query parameter to `true`. You can return reporting data for `primary_email` and `resend` role email campaign activities. For more use case information, see [Get an Email Links Report](/api_guide/email_links_report.html) in the API guide.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param no_clicks: Set this query parameter to `true` to return details for links that were not clicked in the response results.
+ :type no_clicks: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_campaign_activity_link_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ no_clicks=no_clicks,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetCampaignActivityLinkReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_campaign_activity_link_report_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ no_clicks: Annotated[Optional[StrictBool], Field(description="Set this query parameter to `true` to return details for links that were not clicked in the response results.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetCampaignActivityLinkReport200Response]:
+ """GET an Email Links Report
+
+ Use this method to return link details, including the number of unique contacts that clicked each link in an email campaign activity, and the type of action associated with clicking each link. To include link details for links that were not clicked, set the `no_clicks` query parameter to `true`. You can return reporting data for `primary_email` and `resend` role email campaign activities. For more use case information, see [Get an Email Links Report](/api_guide/email_links_report.html) in the API guide.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param no_clicks: Set this query parameter to `true` to return details for links that were not clicked in the response results.
+ :type no_clicks: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_campaign_activity_link_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ no_clicks=no_clicks,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetCampaignActivityLinkReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_campaign_activity_link_report_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ no_clicks: Annotated[Optional[StrictBool], Field(description="Set this query parameter to `true` to return details for links that were not clicked in the response results.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Links Report
+
+ Use this method to return link details, including the number of unique contacts that clicked each link in an email campaign activity, and the type of action associated with clicking each link. To include link details for links that were not clicked, set the `no_clicks` query parameter to `true`. You can return reporting data for `primary_email` and `resend` role email campaign activities. For more use case information, see [Get an Email Links Report](/api_guide/email_links_report.html) in the API guide.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param no_clicks: Set this query parameter to `true` to return details for links that were not clicked in the response results.
+ :type no_clicks: bool
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_campaign_activity_link_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ no_clicks=no_clicks,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetCampaignActivityLinkReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_campaign_activity_link_report_serialize(
+ self,
+ campaign_activity_id,
+ no_clicks,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if no_clicks is not None:
+
+ _query_params.append(('no_clicks', no_clicks))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/email_reports/{campaign_activity_id}/links',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_clicks_report(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ url_id: Annotated[Optional[StrictInt], Field(description="The ID that uniquely identifies a single link URL for which you want to get a clicks report.")] = None,
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetClicksReport200Response:
+ """GET an Email Clicks Report
+
+ Use this method to get each time a contact clicked a link, the click date and time, and the device type they used. Use the `url_id` query parameter to get a clicks report for a specific link URL. Clicks report data is sorted with most recent activity listed first.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param url_id: The ID that uniquely identifies a single link URL for which you want to get a clicks report.
+ :type url_id: int
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_clicks_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ url_id=url_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetClicksReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_clicks_report_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ url_id: Annotated[Optional[StrictInt], Field(description="The ID that uniquely identifies a single link URL for which you want to get a clicks report.")] = None,
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetClicksReport200Response]:
+ """GET an Email Clicks Report
+
+ Use this method to get each time a contact clicked a link, the click date and time, and the device type they used. Use the `url_id` query parameter to get a clicks report for a specific link URL. Clicks report data is sorted with most recent activity listed first.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param url_id: The ID that uniquely identifies a single link URL for which you want to get a clicks report.
+ :type url_id: int
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_clicks_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ url_id=url_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetClicksReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_clicks_report_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ url_id: Annotated[Optional[StrictInt], Field(description="The ID that uniquely identifies a single link URL for which you want to get a clicks report.")] = None,
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Clicks Report
+
+ Use this method to get each time a contact clicked a link, the click date and time, and the device type they used. Use the `url_id` query parameter to get a clicks report for a specific link URL. Clicks report data is sorted with most recent activity listed first.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param url_id: The ID that uniquely identifies a single link URL for which you want to get a clicks report.
+ :type url_id: int
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_clicks_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ url_id=url_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetClicksReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_clicks_report_serialize(
+ self,
+ campaign_activity_id,
+ url_id,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if url_id is not None:
+
+ _query_params.append(('url_id', url_id))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/email_reports/{campaign_activity_id}/tracking/clicks',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_did_not_opens_report(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetDidNotOpensReport200Response:
+ """GET an Email Did Not Opens Report
+
+ Use this method to get a report listing each contact that was sent, but did not open the specified email campaign activity. This report lists contact information such as the contact's email address and unique ID, and the date and time that the email campaign activity was sent. This report lists the most recent activity first. For more use case information, see [Get a Did Not Opens Report for an Email Campaign Activity](/api_guide/email_summary_non_opens_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_did_not_opens_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetDidNotOpensReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_did_not_opens_report_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetDidNotOpensReport200Response]:
+ """GET an Email Did Not Opens Report
+
+ Use this method to get a report listing each contact that was sent, but did not open the specified email campaign activity. This report lists contact information such as the contact's email address and unique ID, and the date and time that the email campaign activity was sent. This report lists the most recent activity first. For more use case information, see [Get a Did Not Opens Report for an Email Campaign Activity](/api_guide/email_summary_non_opens_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_did_not_opens_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetDidNotOpensReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_did_not_opens_report_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Did Not Opens Report
+
+ Use this method to get a report listing each contact that was sent, but did not open the specified email campaign activity. This report lists contact information such as the contact's email address and unique ID, and the date and time that the email campaign activity was sent. This report lists the most recent activity first. For more use case information, see [Get a Did Not Opens Report for an Email Campaign Activity](/api_guide/email_summary_non_opens_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_did_not_opens_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetDidNotOpensReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_did_not_opens_report_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/email_reports/{campaign_activity_id}/tracking/didnotopens',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_email_campaign_activity_report(
+ self,
+ campaign_activity_ids: Annotated[str, Field(strict=True, description="A comma-separated list of `campaign_activity_id`s (UUID's).")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetEmailCampaignActivityReport200Response:
+ """GET an Email Campaign Activity Stats Report
+
+ Use this method to get performance tracking statistics for up to ten email campaign activities. Statistics include the total number of times contacts interacted with your campaigns and how. For each `campaign_activity_id`, this method returns the `campaign_id`, the total counts (`stats`) for each type of tracked email activity, and the date and time that Constant Contact last refreshed (`last_refresh_time`) the `stats`. When requesting statistics for multiple email campaign activities, if one or more of the `campaign_activity_ids` do not exist, were deleted, or do not have any stats associated with it, the `campaign_activity_ids` and error details display under `errors`. If any single specified `campaign_activity_id` is invalid (malformed), a 404 error response is returned for all campaign activities.
+
+ :param campaign_activity_ids: A comma-separated list of `campaign_activity_id`s (UUID's). (required)
+ :type campaign_activity_ids: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_report_serialize(
+ campaign_activity_ids=campaign_activity_ids,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailCampaignActivityReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_email_campaign_activity_report_with_http_info(
+ self,
+ campaign_activity_ids: Annotated[str, Field(strict=True, description="A comma-separated list of `campaign_activity_id`s (UUID's).")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetEmailCampaignActivityReport200Response]:
+ """GET an Email Campaign Activity Stats Report
+
+ Use this method to get performance tracking statistics for up to ten email campaign activities. Statistics include the total number of times contacts interacted with your campaigns and how. For each `campaign_activity_id`, this method returns the `campaign_id`, the total counts (`stats`) for each type of tracked email activity, and the date and time that Constant Contact last refreshed (`last_refresh_time`) the `stats`. When requesting statistics for multiple email campaign activities, if one or more of the `campaign_activity_ids` do not exist, were deleted, or do not have any stats associated with it, the `campaign_activity_ids` and error details display under `errors`. If any single specified `campaign_activity_id` is invalid (malformed), a 404 error response is returned for all campaign activities.
+
+ :param campaign_activity_ids: A comma-separated list of `campaign_activity_id`s (UUID's). (required)
+ :type campaign_activity_ids: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_report_serialize(
+ campaign_activity_ids=campaign_activity_ids,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailCampaignActivityReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_email_campaign_activity_report_without_preload_content(
+ self,
+ campaign_activity_ids: Annotated[str, Field(strict=True, description="A comma-separated list of `campaign_activity_id`s (UUID's).")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Campaign Activity Stats Report
+
+ Use this method to get performance tracking statistics for up to ten email campaign activities. Statistics include the total number of times contacts interacted with your campaigns and how. For each `campaign_activity_id`, this method returns the `campaign_id`, the total counts (`stats`) for each type of tracked email activity, and the date and time that Constant Contact last refreshed (`last_refresh_time`) the `stats`. When requesting statistics for multiple email campaign activities, if one or more of the `campaign_activity_ids` do not exist, were deleted, or do not have any stats associated with it, the `campaign_activity_ids` and error details display under `errors`. If any single specified `campaign_activity_id` is invalid (malformed), a 404 error response is returned for all campaign activities.
+
+ :param campaign_activity_ids: A comma-separated list of `campaign_activity_id`s (UUID's). (required)
+ :type campaign_activity_ids: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_report_serialize(
+ campaign_activity_ids=campaign_activity_ids,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailCampaignActivityReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_email_campaign_activity_report_serialize(
+ self,
+ campaign_activity_ids,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_ids is not None:
+ _path_params['campaign_activity_ids'] = campaign_activity_ids
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/stats/email_campaign_activities/{campaign_activity_ids}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_email_campaign_report(
+ self,
+ limit: Annotated[Optional[StrictStr], Field(description="Use the `limit` query parameter to limit the number of email campaign summaries to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetEmailCampaignReport200Response:
+ """GET an Email Campaigns Summary Report
+
+ Use this method to get aggregate email campaign statistics for up to five hundred email campaigns. The response results include the total number of times that each contact uniquely interacted with each tracked campaign activity. Results are sorted in descending order by the date that the email was last sent (last_sent_date
). Use the limit
query parameter to limit the number of email campaign summary reports listed on each page. For more use case information, see \"[Get an Email Campaign Summary Report](/api_guide/email_bulk_campaign_summary_report.html)\"
+
+ :param limit: Use the `limit` query parameter to limit the number of email campaign summaries to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_report_serialize(
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailCampaignReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_email_campaign_report_with_http_info(
+ self,
+ limit: Annotated[Optional[StrictStr], Field(description="Use the `limit` query parameter to limit the number of email campaign summaries to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetEmailCampaignReport200Response]:
+ """GET an Email Campaigns Summary Report
+
+ Use this method to get aggregate email campaign statistics for up to five hundred email campaigns. The response results include the total number of times that each contact uniquely interacted with each tracked campaign activity. Results are sorted in descending order by the date that the email was last sent (last_sent_date
). Use the limit
query parameter to limit the number of email campaign summary reports listed on each page. For more use case information, see \"[Get an Email Campaign Summary Report](/api_guide/email_bulk_campaign_summary_report.html)\"
+
+ :param limit: Use the `limit` query parameter to limit the number of email campaign summaries to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_report_serialize(
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailCampaignReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_email_campaign_report_without_preload_content(
+ self,
+ limit: Annotated[Optional[StrictStr], Field(description="Use the `limit` query parameter to limit the number of email campaign summaries to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Campaigns Summary Report
+
+ Use this method to get aggregate email campaign statistics for up to five hundred email campaigns. The response results include the total number of times that each contact uniquely interacted with each tracked campaign activity. Results are sorted in descending order by the date that the email was last sent (last_sent_date
). Use the limit
query parameter to limit the number of email campaign summary reports listed on each page. For more use case information, see \"[Get an Email Campaign Summary Report](/api_guide/email_bulk_campaign_summary_report.html)\"
+
+ :param limit: Use the `limit` query parameter to limit the number of email campaign summaries to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_report_serialize(
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailCampaignReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_email_campaign_report_serialize(
+ self,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/summary_reports/email_campaign_summaries',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_email_opens_report(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetEmailOpensReport200Response:
+ """GET an Email Opens Report
+
+ Use this method to get each time a contact opened a specific email campaign activity. This report includes general contact information such as the contact's email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Opens report for an Email Campaign Activity](/api_guide/email_summary_opens_report.html) in the API guide.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_opens_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailOpensReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_email_opens_report_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetEmailOpensReport200Response]:
+ """GET an Email Opens Report
+
+ Use this method to get each time a contact opened a specific email campaign activity. This report includes general contact information such as the contact's email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Opens report for an Email Campaign Activity](/api_guide/email_summary_opens_report.html) in the API guide.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_opens_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailOpensReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_email_opens_report_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Opens Report
+
+ Use this method to get each time a contact opened a specific email campaign activity. This report includes general contact information such as the contact's email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Opens report for an Email Campaign Activity](/api_guide/email_summary_opens_report.html) in the API guide.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_opens_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailOpensReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_email_opens_report_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/email_reports/{campaign_activity_id}/tracking/opens',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_email_sends_report(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetEmailSendsReport200Response:
+ """GET an Email Sends Report
+
+ Use this method to get each contact that was sent a specific email campaign activity. This sends report includes general contact data such as the date and time that the email campaign activity was sent to a contact's email address, the contact's first and last name, and unique ID. This report lists the most recent activity first. For more use case information, see [Get an Sends report for an Email Campaign Activity](/api_guide/email_summary_sends_report.html) in the API guide.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_sends_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailSendsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_email_sends_report_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetEmailSendsReport200Response]:
+ """GET an Email Sends Report
+
+ Use this method to get each contact that was sent a specific email campaign activity. This sends report includes general contact data such as the date and time that the email campaign activity was sent to a contact's email address, the contact's first and last name, and unique ID. This report lists the most recent activity first. For more use case information, see [Get an Sends report for an Email Campaign Activity](/api_guide/email_summary_sends_report.html) in the API guide.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_sends_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailSendsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_email_sends_report_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Sends Report
+
+ Use this method to get each contact that was sent a specific email campaign activity. This sends report includes general contact data such as the date and time that the email campaign activity was sent to a contact's email address, the contact's first and last name, and unique ID. This report lists the most recent activity first. For more use case information, see [Get an Sends report for an Email Campaign Activity](/api_guide/email_summary_sends_report.html) in the API guide.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_sends_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailSendsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_email_sends_report_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/email_reports/{campaign_activity_id}/tracking/sends',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_email_stats_report(
+ self,
+ campaign_ids: Annotated[str, Field(strict=True, description="A comma-separated list of `campaign_id`s (UUID's).")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetEmailStatsReport200Response:
+ """GET an Email Campaign Stats Report
+
+ Use this method to get email campaign performance tracking statistics for one or more campaigns, including the total number of times contacts interacted with your campaigns and how. For each `campaign_id`, this method returns lists that include total counts (`stats`) for each type of tracked email and relevant campaign-related percentages (`percents`). It also returns the date and time at which the campaign stats were last refreshed. If any specified `campaign_id` is invalid, a 404 error response is returned for all campaigns.
+
+ :param campaign_ids: A comma-separated list of `campaign_id`s (UUID's). (required)
+ :type campaign_ids: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_stats_report_serialize(
+ campaign_ids=campaign_ids,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailStatsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_email_stats_report_with_http_info(
+ self,
+ campaign_ids: Annotated[str, Field(strict=True, description="A comma-separated list of `campaign_id`s (UUID's).")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetEmailStatsReport200Response]:
+ """GET an Email Campaign Stats Report
+
+ Use this method to get email campaign performance tracking statistics for one or more campaigns, including the total number of times contacts interacted with your campaigns and how. For each `campaign_id`, this method returns lists that include total counts (`stats`) for each type of tracked email and relevant campaign-related percentages (`percents`). It also returns the date and time at which the campaign stats were last refreshed. If any specified `campaign_id` is invalid, a 404 error response is returned for all campaigns.
+
+ :param campaign_ids: A comma-separated list of `campaign_id`s (UUID's). (required)
+ :type campaign_ids: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_stats_report_serialize(
+ campaign_ids=campaign_ids,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailStatsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_email_stats_report_without_preload_content(
+ self,
+ campaign_ids: Annotated[str, Field(strict=True, description="A comma-separated list of `campaign_id`s (UUID's).")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Campaign Stats Report
+
+ Use this method to get email campaign performance tracking statistics for one or more campaigns, including the total number of times contacts interacted with your campaigns and how. For each `campaign_id`, this method returns lists that include total counts (`stats`) for each type of tracked email and relevant campaign-related percentages (`percents`). It also returns the date and time at which the campaign stats were last refreshed. If any specified `campaign_id` is invalid, a 404 error response is returned for all campaigns.
+
+ :param campaign_ids: A comma-separated list of `campaign_id`s (UUID's). (required)
+ :type campaign_ids: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_stats_report_serialize(
+ campaign_ids=campaign_ids,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailStatsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_email_stats_report_serialize(
+ self,
+ campaign_ids,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_ids is not None:
+ _path_params['campaign_ids'] = campaign_ids
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/stats/email_campaigns/{campaign_ids}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_forwards_report(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetForwardsReport200Response:
+ """GET an Email Forwards Report
+
+ Use this method to get a report listing each time a contact forwarded the email campaign activity using the forwarding link in the email footer. The report includes general contact information, such as the contact's email address and unique ID, and the date and time that the email campaign activity was forwarded. Forwards report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Forwards Report](/api_guide/email_summary_forwards_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_forwards_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetForwardsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_forwards_report_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetForwardsReport200Response]:
+ """GET an Email Forwards Report
+
+ Use this method to get a report listing each time a contact forwarded the email campaign activity using the forwarding link in the email footer. The report includes general contact information, such as the contact's email address and unique ID, and the date and time that the email campaign activity was forwarded. Forwards report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Forwards Report](/api_guide/email_summary_forwards_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_forwards_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetForwardsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_forwards_report_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Forwards Report
+
+ Use this method to get a report listing each time a contact forwarded the email campaign activity using the forwarding link in the email footer. The report includes general contact information, such as the contact's email address and unique ID, and the date and time that the email campaign activity was forwarded. Forwards report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Forwards Report](/api_guide/email_summary_forwards_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_forwards_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetForwardsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_forwards_report_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/email_reports/{campaign_activity_id}/tracking/forwards',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_optouts_report(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetOptoutsReport200Response:
+ """GET an Email Opt-outs Report
+
+ Use this method to get a report listing each contact that clicked the unsubscribe link in the email campaign activity to opt-out from receiving emails sent from your Constant Contact account. This report includes contact information, such as the contact's email address, unique ID, and the opt-out date and time. Opt-out report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Opt-outs Report](/api_guide/email_summary_optouts_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_optouts_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetOptoutsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_optouts_report_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetOptoutsReport200Response]:
+ """GET an Email Opt-outs Report
+
+ Use this method to get a report listing each contact that clicked the unsubscribe link in the email campaign activity to opt-out from receiving emails sent from your Constant Contact account. This report includes contact information, such as the contact's email address, unique ID, and the opt-out date and time. Opt-out report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Opt-outs Report](/api_guide/email_summary_optouts_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_optouts_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetOptoutsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_optouts_report_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Opt-outs Report
+
+ Use this method to get a report listing each contact that clicked the unsubscribe link in the email campaign activity to opt-out from receiving emails sent from your Constant Contact account. This report includes contact information, such as the contact's email address, unique ID, and the opt-out date and time. Opt-out report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Opt-outs Report](/api_guide/email_summary_optouts_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_optouts_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetOptoutsReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_optouts_report_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/email_reports/{campaign_activity_id}/tracking/optouts',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_unique_opens_report(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetEmailOpensReport200Response:
+ """GET an Email Unique Opens Report
+
+ Use this method to get a unique opens report that provides details about the last time that each contact opened the specified email campaign activity. This report includes general contact information such as the contact's email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Unique Opens Report for an Email Campaign Activity](/api_guide/email_summary_unique_opens_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_opens_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailOpensReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_unique_opens_report_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetEmailOpensReport200Response]:
+ """GET an Email Unique Opens Report
+
+ Use this method to get a unique opens report that provides details about the last time that each contact opened the specified email campaign activity. This report includes general contact information such as the contact's email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Unique Opens Report for an Email Campaign Activity](/api_guide/email_summary_unique_opens_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_opens_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailOpensReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_unique_opens_report_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The ID that uniquely identifies the email campaign activity to use for this report.")],
+ limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of tracking activities to return on a page.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Unique Opens Report
+
+ Use this method to get a unique opens report that provides details about the last time that each contact opened the specified email campaign activity. This report includes general contact information such as the contact's email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Unique Opens Report for an Email Campaign Activity](/api_guide/email_summary_unique_opens_report.html) in the API guide.
+
+ :param campaign_activity_id: The ID that uniquely identifies the email campaign activity to use for this report. (required)
+ :type campaign_activity_id: str
+ :param limit: The number of tracking activities to return on a page.
+ :type limit: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_opens_report_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailOpensReport200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_unique_opens_report_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/email_reports/{campaign_activity_id}/tracking/unique_opens',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/constant_contact_api_client/api/email_scheduling_api.py b/constant_contact_api_client/api/email_scheduling_api.py
new file mode 100644
index 0000000..820d346
--- /dev/null
+++ b/constant_contact_api_client/api/email_scheduling_api.py
@@ -0,0 +1,1760 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
+
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictStr
+
+from typing import List
+
+from constant_contact_api_client.models.get_email_campaign_activity_preview200_response import GetEmailCampaignActivityPreview200Response
+from constant_contact_api_client.models.get_email_campaign_activity_schedule200_response_inner import GetEmailCampaignActivitySchedule200ResponseInner
+from constant_contact_api_client.models.get_email_campaign_activity_send_history200_response_inner import GetEmailCampaignActivitySendHistory200ResponseInner
+from constant_contact_api_client.models.schedule_email_campaign_activity_request import ScheduleEmailCampaignActivityRequest
+from constant_contact_api_client.models.test_send_email_campaign_activity_request import TestSendEmailCampaignActivityRequest
+
+from constant_contact_api_client.api_client import ApiClient
+from constant_contact_api_client.api_response import ApiResponse
+from constant_contact_api_client.rest import RESTResponseType
+
+
+class EmailSchedulingApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def get_email_campaign_activity_preview(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetEmailCampaignActivityPreview200Response:
+ """GET the HTML Preview of an Email Campaign Activity
+
+ Use this method to get the HTML preview of an email campaign activity. The HTML preview allows you to verify how the email campaign activity will look before you send it to contacts. Custom code emails (`format_type` 5) use the Constant Contact account owner's contact information to process contact, custom field, and account variables in the preview. This method returns the HTML preview encoded as a JSON string. You will need to decode the string before you can use it as valid HTML.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_preview_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailCampaignActivityPreview200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_email_campaign_activity_preview_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetEmailCampaignActivityPreview200Response]:
+ """GET the HTML Preview of an Email Campaign Activity
+
+ Use this method to get the HTML preview of an email campaign activity. The HTML preview allows you to verify how the email campaign activity will look before you send it to contacts. Custom code emails (`format_type` 5) use the Constant Contact account owner's contact information to process contact, custom field, and account variables in the preview. This method returns the HTML preview encoded as a JSON string. You will need to decode the string before you can use it as valid HTML.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_preview_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailCampaignActivityPreview200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_email_campaign_activity_preview_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET the HTML Preview of an Email Campaign Activity
+
+ Use this method to get the HTML preview of an email campaign activity. The HTML preview allows you to verify how the email campaign activity will look before you send it to contacts. Custom code emails (`format_type` 5) use the Constant Contact account owner's contact information to process contact, custom field, and account variables in the preview. This method returns the HTML preview encoded as a JSON string. You will need to decode the string before you can use it as valid HTML.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_preview_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetEmailCampaignActivityPreview200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_email_campaign_activity_preview_serialize(
+ self,
+ campaign_activity_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/emails/activities/{campaign_activity_id}/previews',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_email_campaign_activity_schedule(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GetEmailCampaignActivitySchedule200ResponseInner]:
+ """GET an Email Campaign Activity Schedule
+
+ Use this method to return the current schedule for an email campaign activity. This schedule contains the date that Constant Contact will send the email campaign activity to contacts. If the email campaign activity is not in `SCHEDULED` status, this method returns an empty array and a 200 response code.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_schedule_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetEmailCampaignActivitySchedule200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_email_campaign_activity_schedule_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GetEmailCampaignActivitySchedule200ResponseInner]]:
+ """GET an Email Campaign Activity Schedule
+
+ Use this method to return the current schedule for an email campaign activity. This schedule contains the date that Constant Contact will send the email campaign activity to contacts. If the email campaign activity is not in `SCHEDULED` status, this method returns an empty array and a 200 response code.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_schedule_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetEmailCampaignActivitySchedule200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_email_campaign_activity_schedule_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET an Email Campaign Activity Schedule
+
+ Use this method to return the current schedule for an email campaign activity. This schedule contains the date that Constant Contact will send the email campaign activity to contacts. If the email campaign activity is not in `SCHEDULED` status, this method returns an empty array and a 200 response code.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_schedule_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetEmailCampaignActivitySchedule200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_email_campaign_activity_schedule_serialize(
+ self,
+ campaign_activity_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/emails/activities/{campaign_activity_id}/schedules',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_email_campaign_activity_send_history(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity. You can return the send history for `primary_email` and `resend` role email campaign activities.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GetEmailCampaignActivitySendHistory200ResponseInner]:
+ """GET the Send History of an Email Campaign Activity
+
+ Use this method to return the send history of an email campaign activity. This method returns the send history as an array containing an object for each time you sent a specific email campaign activity to contacts. Each send history object contains the email campaign activity send date, the number of contacts it was sent to, and the contact lists or segments used to send it. Each send history object also includes if the send attempt completed or encountered an error, and the reason why each error occurred. This method returns results in ascending order starting with the first send attempt. If the email campaign activity has not been sent to contacts, this method returns a 200 response and an empty array.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. You can return the send history for `primary_email` and `resend` role email campaign activities. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_send_history_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetEmailCampaignActivitySendHistory200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_email_campaign_activity_send_history_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity. You can return the send history for `primary_email` and `resend` role email campaign activities.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GetEmailCampaignActivitySendHistory200ResponseInner]]:
+ """GET the Send History of an Email Campaign Activity
+
+ Use this method to return the send history of an email campaign activity. This method returns the send history as an array containing an object for each time you sent a specific email campaign activity to contacts. Each send history object contains the email campaign activity send date, the number of contacts it was sent to, and the contact lists or segments used to send it. Each send history object also includes if the send attempt completed or encountered an error, and the reason why each error occurred. This method returns results in ascending order starting with the first send attempt. If the email campaign activity has not been sent to contacts, this method returns a 200 response and an empty array.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. You can return the send history for `primary_email` and `resend` role email campaign activities. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_send_history_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetEmailCampaignActivitySendHistory200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_email_campaign_activity_send_history_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity. You can return the send history for `primary_email` and `resend` role email campaign activities.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET the Send History of an Email Campaign Activity
+
+ Use this method to return the send history of an email campaign activity. This method returns the send history as an array containing an object for each time you sent a specific email campaign activity to contacts. Each send history object contains the email campaign activity send date, the number of contacts it was sent to, and the contact lists or segments used to send it. Each send history object also includes if the send attempt completed or encountered an error, and the reason why each error occurred. This method returns results in ascending order starting with the first send attempt. If the email campaign activity has not been sent to contacts, this method returns a 200 response and an empty array.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. You can return the send history for `primary_email` and `resend` role email campaign activities. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_email_campaign_activity_send_history_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[GetEmailCampaignActivitySendHistory200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_email_campaign_activity_send_history_serialize(
+ self,
+ campaign_activity_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/emails/activities/{campaign_activity_id}/send_history',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def schedule_email_campaign_activity(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity. You can only schedule email campaign activities that have the `primary_email` role.")],
+ schedule_email_campaign_activity_request: Annotated[ScheduleEmailCampaignActivityRequest, Field(description="A request body payload that contains the date that you want Constant Contact to send your email campaign activity on. Use `\"0\"` as the date to have Constant Contact immediately send the email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[GetEmailCampaignActivitySchedule200ResponseInner]:
+ """POST (Create) an Email Campaign Activity Schedule
+
+ Use this method to schedule when Constant Contact will send an email campaign activity to contacts. Use the `scheduled_date` request body property to enter the ISO-8601 format date that you want Constant Contact to send the email campaign activity on. Before you schedule an email campaign activity, you must update the email campaign activity and specify which contacts you want Constant Contact to send the email to. When you make a PUT call to update an email campaign activity, use the `contact_list_ids` or `segment_ids` array to add contacts. You can only schedule email campaign activities that have the `primary_email` role and are in `DRAFT`, `DONE`, or `ERROR` status. When you schedule an email campaign activity in `DONE` status, Constant Contact does not send the email campaign activity to contacts that already received it. Constant Contact only sends the email campaign activity to any new contacts in the contact lists or segment you use.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. You can only schedule email campaign activities that have the `primary_email` role. (required)
+ :type campaign_activity_id: str
+ :param schedule_email_campaign_activity_request: A request body payload that contains the date that you want Constant Contact to send your email campaign activity on. Use `\"0\"` as the date to have Constant Contact immediately send the email campaign activity. (required)
+ :type schedule_email_campaign_activity_request: ScheduleEmailCampaignActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._schedule_email_campaign_activity_serialize(
+ campaign_activity_id=campaign_activity_id,
+ schedule_email_campaign_activity_request=schedule_email_campaign_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "List[GetEmailCampaignActivitySchedule200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def schedule_email_campaign_activity_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity. You can only schedule email campaign activities that have the `primary_email` role.")],
+ schedule_email_campaign_activity_request: Annotated[ScheduleEmailCampaignActivityRequest, Field(description="A request body payload that contains the date that you want Constant Contact to send your email campaign activity on. Use `\"0\"` as the date to have Constant Contact immediately send the email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[GetEmailCampaignActivitySchedule200ResponseInner]]:
+ """POST (Create) an Email Campaign Activity Schedule
+
+ Use this method to schedule when Constant Contact will send an email campaign activity to contacts. Use the `scheduled_date` request body property to enter the ISO-8601 format date that you want Constant Contact to send the email campaign activity on. Before you schedule an email campaign activity, you must update the email campaign activity and specify which contacts you want Constant Contact to send the email to. When you make a PUT call to update an email campaign activity, use the `contact_list_ids` or `segment_ids` array to add contacts. You can only schedule email campaign activities that have the `primary_email` role and are in `DRAFT`, `DONE`, or `ERROR` status. When you schedule an email campaign activity in `DONE` status, Constant Contact does not send the email campaign activity to contacts that already received it. Constant Contact only sends the email campaign activity to any new contacts in the contact lists or segment you use.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. You can only schedule email campaign activities that have the `primary_email` role. (required)
+ :type campaign_activity_id: str
+ :param schedule_email_campaign_activity_request: A request body payload that contains the date that you want Constant Contact to send your email campaign activity on. Use `\"0\"` as the date to have Constant Contact immediately send the email campaign activity. (required)
+ :type schedule_email_campaign_activity_request: ScheduleEmailCampaignActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._schedule_email_campaign_activity_serialize(
+ campaign_activity_id=campaign_activity_id,
+ schedule_email_campaign_activity_request=schedule_email_campaign_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "List[GetEmailCampaignActivitySchedule200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def schedule_email_campaign_activity_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity. You can only schedule email campaign activities that have the `primary_email` role.")],
+ schedule_email_campaign_activity_request: Annotated[ScheduleEmailCampaignActivityRequest, Field(description="A request body payload that contains the date that you want Constant Contact to send your email campaign activity on. Use `\"0\"` as the date to have Constant Contact immediately send the email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """POST (Create) an Email Campaign Activity Schedule
+
+ Use this method to schedule when Constant Contact will send an email campaign activity to contacts. Use the `scheduled_date` request body property to enter the ISO-8601 format date that you want Constant Contact to send the email campaign activity on. Before you schedule an email campaign activity, you must update the email campaign activity and specify which contacts you want Constant Contact to send the email to. When you make a PUT call to update an email campaign activity, use the `contact_list_ids` or `segment_ids` array to add contacts. You can only schedule email campaign activities that have the `primary_email` role and are in `DRAFT`, `DONE`, or `ERROR` status. When you schedule an email campaign activity in `DONE` status, Constant Contact does not send the email campaign activity to contacts that already received it. Constant Contact only sends the email campaign activity to any new contacts in the contact lists or segment you use.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. You can only schedule email campaign activities that have the `primary_email` role. (required)
+ :type campaign_activity_id: str
+ :param schedule_email_campaign_activity_request: A request body payload that contains the date that you want Constant Contact to send your email campaign activity on. Use `\"0\"` as the date to have Constant Contact immediately send the email campaign activity. (required)
+ :type schedule_email_campaign_activity_request: ScheduleEmailCampaignActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._schedule_email_campaign_activity_serialize(
+ campaign_activity_id=campaign_activity_id,
+ schedule_email_campaign_activity_request=schedule_email_campaign_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "List[GetEmailCampaignActivitySchedule200ResponseInner]",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _schedule_email_campaign_activity_serialize(
+ self,
+ campaign_activity_id,
+ schedule_email_campaign_activity_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if schedule_email_campaign_activity_request is not None:
+ _body_params = schedule_email_campaign_activity_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/emails/activities/{campaign_activity_id}/schedules',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def test_send_email_campaign_activity(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity. You can only test send email campaign activities that have the `primary_email` role.")],
+ test_send_email_campaign_activity_request: Annotated[TestSendEmailCampaignActivityRequest, Field(description="A JSON request body that contains the recipients of the test email and an optional personal message.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """POST Test Send an Email Campaign Activity
+
+ Use this method to send a test email to specific email addresses. Test emails allow you to verify how the email campaign activity will look before you send it to contacts. This method uses the `email_addresses` array in the request body to determine the recipients of the test email. The test email does not process any dynamic content in the email campaign activity. Dynamic content includes contact and custom field variables. You can send up to 50 test emails each day. Each recipient you add to the `email_addresses` array in the request body counts towards this limit. Successfully sending a test email returns a 204 response code without a response body.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. You can only test send email campaign activities that have the `primary_email` role. (required)
+ :type campaign_activity_id: str
+ :param test_send_email_campaign_activity_request: A JSON request body that contains the recipients of the test email and an optional personal message. (required)
+ :type test_send_email_campaign_activity_request: TestSendEmailCampaignActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._test_send_email_campaign_activity_serialize(
+ campaign_activity_id=campaign_activity_id,
+ test_send_email_campaign_activity_request=test_send_email_campaign_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def test_send_email_campaign_activity_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity. You can only test send email campaign activities that have the `primary_email` role.")],
+ test_send_email_campaign_activity_request: Annotated[TestSendEmailCampaignActivityRequest, Field(description="A JSON request body that contains the recipients of the test email and an optional personal message.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """POST Test Send an Email Campaign Activity
+
+ Use this method to send a test email to specific email addresses. Test emails allow you to verify how the email campaign activity will look before you send it to contacts. This method uses the `email_addresses` array in the request body to determine the recipients of the test email. The test email does not process any dynamic content in the email campaign activity. Dynamic content includes contact and custom field variables. You can send up to 50 test emails each day. Each recipient you add to the `email_addresses` array in the request body counts towards this limit. Successfully sending a test email returns a 204 response code without a response body.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. You can only test send email campaign activities that have the `primary_email` role. (required)
+ :type campaign_activity_id: str
+ :param test_send_email_campaign_activity_request: A JSON request body that contains the recipients of the test email and an optional personal message. (required)
+ :type test_send_email_campaign_activity_request: TestSendEmailCampaignActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._test_send_email_campaign_activity_serialize(
+ campaign_activity_id=campaign_activity_id,
+ test_send_email_campaign_activity_request=test_send_email_campaign_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def test_send_email_campaign_activity_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity. You can only test send email campaign activities that have the `primary_email` role.")],
+ test_send_email_campaign_activity_request: Annotated[TestSendEmailCampaignActivityRequest, Field(description="A JSON request body that contains the recipients of the test email and an optional personal message.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """POST Test Send an Email Campaign Activity
+
+ Use this method to send a test email to specific email addresses. Test emails allow you to verify how the email campaign activity will look before you send it to contacts. This method uses the `email_addresses` array in the request body to determine the recipients of the test email. The test email does not process any dynamic content in the email campaign activity. Dynamic content includes contact and custom field variables. You can send up to 50 test emails each day. Each recipient you add to the `email_addresses` array in the request body counts towards this limit. Successfully sending a test email returns a 204 response code without a response body.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. You can only test send email campaign activities that have the `primary_email` role. (required)
+ :type campaign_activity_id: str
+ :param test_send_email_campaign_activity_request: A JSON request body that contains the recipients of the test email and an optional personal message. (required)
+ :type test_send_email_campaign_activity_request: TestSendEmailCampaignActivityRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._test_send_email_campaign_activity_serialize(
+ campaign_activity_id=campaign_activity_id,
+ test_send_email_campaign_activity_request=test_send_email_campaign_activity_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _test_send_email_campaign_activity_serialize(
+ self,
+ campaign_activity_id,
+ test_send_email_campaign_activity_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if test_send_email_campaign_activity_request is not None:
+ _body_params = test_send_email_campaign_activity_request
+
+
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/emails/activities/{campaign_activity_id}/tests',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def unschedule_email_campaign_activity(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """DELETE an Email Campaign Activity Schedule
+
+ Use this method to unschedule an email campaign activity by deleting the schedule. You can only unschedule email campaign activities that are in `SCHEDULED` status. Unscheduling reverts the email campaign activity to the status prior to `SCHEDULED`.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unschedule_email_campaign_activity_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def unschedule_email_campaign_activity_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """DELETE an Email Campaign Activity Schedule
+
+ Use this method to unschedule an email campaign activity by deleting the schedule. You can only unschedule email campaign activities that are in `SCHEDULED` status. Unscheduling reverts the email campaign activity to the status prior to `SCHEDULED`.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unschedule_email_campaign_activity_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def unschedule_email_campaign_activity_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The unique ID for an email campaign activity.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """DELETE an Email Campaign Activity Schedule
+
+ Use this method to unschedule an email campaign activity by deleting the schedule. You can only unschedule email campaign activities that are in `SCHEDULED` status. Unscheduling reverts the email campaign activity to the status prior to `SCHEDULED`.
+
+ :param campaign_activity_id: The unique ID for an email campaign activity. (required)
+ :type campaign_activity_id: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._unschedule_email_campaign_activity_serialize(
+ campaign_activity_id=campaign_activity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _unschedule_email_campaign_activity_serialize(
+ self,
+ campaign_activity_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/emails/activities/{campaign_activity_id}/schedules',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/constant_contact_api_client/api/landing_pages_reporting_api.py b/constant_contact_api_client/api/landing_pages_reporting_api.py
new file mode 100644
index 0000000..c117bae
--- /dev/null
+++ b/constant_contact_api_client/api/landing_pages_reporting_api.py
@@ -0,0 +1,1920 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
+
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictStr
+
+from typing import Optional
+
+from constant_contact_api_client.models.get_contact_adds200_response import GetContactAdds200Response
+from constant_contact_api_client.models.get_unique_contact_clicks200_response import GetUniqueContactClicks200Response
+from constant_contact_api_client.models.get_unique_contact_opens200_response import GetUniqueContactOpens200Response
+from constant_contact_api_client.models.get_unique_contact_sms_opt_ins200_response import GetUniqueContactSMSOptIns200Response
+from constant_contact_api_client.models.get_unique_contact_updates200_response import GetUniqueContactUpdates200Response
+
+from constant_contact_api_client.api_client import ApiClient
+from constant_contact_api_client.api_response import ApiResponse
+from constant_contact_api_client.rest import RESTResponseType
+
+
+class LandingPagesReportingApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def get_contact_adds(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetContactAdds200Response:
+ """GET a Unique Contacts Adds Landing Page Report
+
+ Use this method to get details about each contact added to the account from a specified landing page. Contacts are identified by `contact_id`. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_contact_adds_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetContactAdds200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_contact_adds_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetContactAdds200Response]:
+ """GET a Unique Contacts Adds Landing Page Report
+
+ Use this method to get details about each contact added to the account from a specified landing page. Contacts are identified by `contact_id`. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_contact_adds_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetContactAdds200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_contact_adds_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET a Unique Contacts Adds Landing Page Report
+
+ Use this method to get details about each contact added to the account from a specified landing page. Contacts are identified by `contact_id`. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_contact_adds_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetContactAdds200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_contact_adds_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ contacts_filter,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if contacts_filter is not None:
+
+ _query_params.append(('contacts_filter', contacts_filter))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_adds',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_contact_opens(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetUniqueContactOpens200Response:
+ """GET a Contacts Opens Landing Page Report
+
+ Use this method get contact details for each time a contact opens a link on a landing page. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_contact_opens_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactOpens200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_contact_opens_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetUniqueContactOpens200Response]:
+ """GET a Contacts Opens Landing Page Report
+
+ Use this method get contact details for each time a contact opens a link on a landing page. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_contact_opens_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactOpens200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_contact_opens_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET a Contacts Opens Landing Page Report
+
+ Use this method get contact details for each time a contact opens a link on a landing page. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_contact_opens_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactOpens200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_contact_opens_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ contacts_filter,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if contacts_filter is not None:
+
+ _query_params.append(('contacts_filter', contacts_filter))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/landing_pages/campaign_details/{campaign_activity_id}/p_contact_opens',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_unique_contact_clicks(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetUniqueContactClicks200Response:
+ """GET a Unique Contacts Clicks Landing Page Report
+
+ Use this method get details about each contact that clicked a link on a landing page campaign activity. Unique contact clicks are identified by both the `contact_id` and `url_id`. The same contact may appear more than once in the results, if they clicked more than one link on the landing page. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_clicks_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactClicks200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_unique_contact_clicks_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetUniqueContactClicks200Response]:
+ """GET a Unique Contacts Clicks Landing Page Report
+
+ Use this method get details about each contact that clicked a link on a landing page campaign activity. Unique contact clicks are identified by both the `contact_id` and `url_id`. The same contact may appear more than once in the results, if they clicked more than one link on the landing page. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_clicks_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactClicks200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_unique_contact_clicks_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET a Unique Contacts Clicks Landing Page Report
+
+ Use this method get details about each contact that clicked a link on a landing page campaign activity. Unique contact clicks are identified by both the `contact_id` and `url_id`. The same contact may appear more than once in the results, if they clicked more than one link on the landing page. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_clicks_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactClicks200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_unique_contact_clicks_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ contacts_filter,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if contacts_filter is not None:
+
+ _query_params.append(('contacts_filter', contacts_filter))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_clicks',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_unique_contact_opens(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetUniqueContactOpens200Response:
+ """GET a Unique Contacts Opens Landing Page Report
+
+ Use this method get details about each contact that opens a link on a landing page. Contacts are uniquely identified by `contact_id`. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_opens_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactOpens200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_unique_contact_opens_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetUniqueContactOpens200Response]:
+ """GET a Unique Contacts Opens Landing Page Report
+
+ Use this method get details about each contact that opens a link on a landing page. Contacts are uniquely identified by `contact_id`. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_opens_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactOpens200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_unique_contact_opens_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET a Unique Contacts Opens Landing Page Report
+
+ Use this method get details about each contact that opens a link on a landing page. Contacts are uniquely identified by `contact_id`. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_opens_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactOpens200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_unique_contact_opens_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ contacts_filter,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if contacts_filter is not None:
+
+ _query_params.append(('contacts_filter', contacts_filter))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_opens',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_unique_contact_sms_opt_ins(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetUniqueContactSMSOptIns200Response:
+ """GET a Unique Contacts SMS Opt-In Landing Page Report
+
+ Use this method get details about unique contacts that click a link on a landing page to opt in to receiving SMS text messages. Contacts are uniquely identified by `contact_id``. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_sms_opt_ins_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactSMSOptIns200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_unique_contact_sms_opt_ins_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetUniqueContactSMSOptIns200Response]:
+ """GET a Unique Contacts SMS Opt-In Landing Page Report
+
+ Use this method get details about unique contacts that click a link on a landing page to opt in to receiving SMS text messages. Contacts are uniquely identified by `contact_id``. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_sms_opt_ins_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactSMSOptIns200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_unique_contact_sms_opt_ins_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET a Unique Contacts SMS Opt-In Landing Page Report
+
+ Use this method get details about unique contacts that click a link on a landing page to opt in to receiving SMS text messages. Contacts are uniquely identified by `contact_id``. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact click results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to return only contacts that match a contacts full or partial first or last name, or email. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_sms_opt_ins_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactSMSOptIns200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_unique_contact_sms_opt_ins_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ contacts_filter,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if contacts_filter is not None:
+
+ _query_params.append(('contacts_filter', contacts_filter))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_sms_optins',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_unique_contact_updates(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetUniqueContactUpdates200Response:
+ """GET a Unique Contacts Updates Landing Page Report
+
+ Use this method to get contact details for each contact that updated their contact data from a landing page. Contacts are uniquely identified by `contact_id`. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_updates_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactUpdates200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_unique_contact_updates_with_http_info(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetUniqueContactUpdates200Response]:
+ """GET a Unique Contacts Updates Landing Page Report
+
+ Use this method to get contact details for each contact that updated their contact data from a landing page. Contacts are uniquely identified by `contact_id`. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_updates_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactUpdates200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_unique_contact_updates_without_preload_content(
+ self,
+ campaign_activity_id: Annotated[StrictStr, Field(description="The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results.")],
+ limit: Annotated[Optional[StrictStr], Field(description="Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.")] = None,
+ contacts_filter: Annotated[Optional[StrictStr], Field(description="Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET a Unique Contacts Updates Landing Page Report
+
+ Use this method to get contact details for each contact that updated their contact data from a landing page. Contacts are uniquely identified by `contact_id`. The resulting contact data is listed with most recent activity first.
+
+ :param campaign_activity_id: The landing page `campaign_activity_id` (UUID's) to use to get unique contact open results. (required)
+ :type campaign_activity_id: str
+ :param limit: Use to limit the number of contact tracking activities to return on a single page. The default is `50` and the maximum is `500` per page.
+ :type limit: str
+ :param contacts_filter: Use to filter the results to only include contacts that contain a certain value. This parameter does full and partial matches and applies to the contact first name, last name, and email fields. For example: Josie or Jo.
+ :type contacts_filter: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_unique_contact_updates_serialize(
+ campaign_activity_id=campaign_activity_id,
+ limit=limit,
+ contacts_filter=contacts_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetUniqueContactUpdates200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_unique_contact_updates_serialize(
+ self,
+ campaign_activity_id,
+ limit,
+ contacts_filter,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_activity_id is not None:
+ _path_params['campaign_activity_id'] = campaign_activity_id
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if contacts_filter is not None:
+
+ _query_params.append(('contacts_filter', contacts_filter))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_updates',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/constant_contact_api_client/api/segments_api.py b/constant_contact_api_client/api/segments_api.py
new file mode 100644
index 0000000..038f290
--- /dev/null
+++ b/constant_contact_api_client/api/segments_api.py
@@ -0,0 +1,1803 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
+
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictInt, StrictStr
+
+from typing import Optional
+
+from constant_contact_api_client.models.create_segment201_response import CreateSegment201Response
+from constant_contact_api_client.models.create_segment_request import CreateSegmentRequest
+from constant_contact_api_client.models.get_all_segments200_response import GetAllSegments200Response
+from constant_contact_api_client.models.update_segment_name_request import UpdateSegmentNameRequest
+
+from constant_contact_api_client.api_client import ApiClient
+from constant_contact_api_client.api_response import ApiResponse
+from constant_contact_api_client.rest import RESTResponseType
+
+
+class SegmentsApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def create_segment(
+ self,
+ create_segment_request: Annotated[CreateSegmentRequest, Field(description="The segment `name` and `segment_criteria` (requires single-string escaped JSON).")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateSegment201Response:
+ """POST (create) a Segment
+
+ Use this method to create a new segment. You create segments to target a subset of your contacts that meet your specific criteria for a marketing campaign. The segment `name` must be unique. The `segment_criteria` requires single-string escaped JSON. Constant Contact uses the contact data that you specify in the `segment_criteria` to evaluate and identify the contacts you want to target. Contact data can be grouped from different data sources, including: - **`tracking`**: Supports **or** and **and** groups. - **`contact`**: Supports **or** and **and** groups. - **`list_membership`**: Supports **or** groups. - **`tags`**: Supports **or** groups. If you do not specify `list_membership` as criteria, Constant Contact evaluates all contacts in your account. To avoid returning a 400 error response, when specifying the `segment_criteria` do not request more than 500 email campaigns or a date range greater than 1825 days (5 years) be evaluated. For more use case information, see the [Segments Overview](/api_guide/segments_overview.html) in the API guide.
+
+ :param create_segment_request: The segment `name` and `segment_criteria` (requires single-string escaped JSON). (required)
+ :type create_segment_request: CreateSegmentRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_segment_serialize(
+ create_segment_request=create_segment_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_segment_with_http_info(
+ self,
+ create_segment_request: Annotated[CreateSegmentRequest, Field(description="The segment `name` and `segment_criteria` (requires single-string escaped JSON).")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateSegment201Response]:
+ """POST (create) a Segment
+
+ Use this method to create a new segment. You create segments to target a subset of your contacts that meet your specific criteria for a marketing campaign. The segment `name` must be unique. The `segment_criteria` requires single-string escaped JSON. Constant Contact uses the contact data that you specify in the `segment_criteria` to evaluate and identify the contacts you want to target. Contact data can be grouped from different data sources, including: - **`tracking`**: Supports **or** and **and** groups. - **`contact`**: Supports **or** and **and** groups. - **`list_membership`**: Supports **or** groups. - **`tags`**: Supports **or** groups. If you do not specify `list_membership` as criteria, Constant Contact evaluates all contacts in your account. To avoid returning a 400 error response, when specifying the `segment_criteria` do not request more than 500 email campaigns or a date range greater than 1825 days (5 years) be evaluated. For more use case information, see the [Segments Overview](/api_guide/segments_overview.html) in the API guide.
+
+ :param create_segment_request: The segment `name` and `segment_criteria` (requires single-string escaped JSON). (required)
+ :type create_segment_request: CreateSegmentRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_segment_serialize(
+ create_segment_request=create_segment_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_segment_without_preload_content(
+ self,
+ create_segment_request: Annotated[CreateSegmentRequest, Field(description="The segment `name` and `segment_criteria` (requires single-string escaped JSON).")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """POST (create) a Segment
+
+ Use this method to create a new segment. You create segments to target a subset of your contacts that meet your specific criteria for a marketing campaign. The segment `name` must be unique. The `segment_criteria` requires single-string escaped JSON. Constant Contact uses the contact data that you specify in the `segment_criteria` to evaluate and identify the contacts you want to target. Contact data can be grouped from different data sources, including: - **`tracking`**: Supports **or** and **and** groups. - **`contact`**: Supports **or** and **and** groups. - **`list_membership`**: Supports **or** groups. - **`tags`**: Supports **or** groups. If you do not specify `list_membership` as criteria, Constant Contact evaluates all contacts in your account. To avoid returning a 400 error response, when specifying the `segment_criteria` do not request more than 500 email campaigns or a date range greater than 1825 days (5 years) be evaluated. For more use case information, see the [Segments Overview](/api_guide/segments_overview.html) in the API guide.
+
+ :param create_segment_request: The segment `name` and `segment_criteria` (requires single-string escaped JSON). (required)
+ :type create_segment_request: CreateSegmentRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_segment_serialize(
+ create_segment_request=create_segment_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '201': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_segment_serialize(
+ self,
+ create_segment_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_segment_request is not None:
+ _body_params = create_segment_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/segments',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def delete_segment(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system generated ID that uniquely identifies the segment.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> None:
+ """DELETE a Segment
+
+ Use this method to delete a segment from your account. Before deleting a segment, verify that the segment is not associated with a scheduled campaign. Deleted segments do not display in the results when using the `GET /segments` endpoint. If you know the `segment_id`, you can use the `GET /segments/{segment_id}` endpoint to view the deleted segment's details. A segment's details are preserved for external reference purposes, such as displaying the segment name in a campaign's history. For more use case information, see [Delete a Segment](/api_guide/segment_delete.html) in the API guide.
+
+ :param segment_id: The system generated ID that uniquely identifies the segment. (required)
+ :type segment_id: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_segment_serialize(
+ segment_id=segment_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def delete_segment_with_http_info(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system generated ID that uniquely identifies the segment.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[None]:
+ """DELETE a Segment
+
+ Use this method to delete a segment from your account. Before deleting a segment, verify that the segment is not associated with a scheduled campaign. Deleted segments do not display in the results when using the `GET /segments` endpoint. If you know the `segment_id`, you can use the `GET /segments/{segment_id}` endpoint to view the deleted segment's details. A segment's details are preserved for external reference purposes, such as displaying the segment name in a campaign's history. For more use case information, see [Delete a Segment](/api_guide/segment_delete.html) in the API guide.
+
+ :param segment_id: The system generated ID that uniquely identifies the segment. (required)
+ :type segment_id: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_segment_serialize(
+ segment_id=segment_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def delete_segment_without_preload_content(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system generated ID that uniquely identifies the segment.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """DELETE a Segment
+
+ Use this method to delete a segment from your account. Before deleting a segment, verify that the segment is not associated with a scheduled campaign. Deleted segments do not display in the results when using the `GET /segments` endpoint. If you know the `segment_id`, you can use the `GET /segments/{segment_id}` endpoint to view the deleted segment's details. A segment's details are preserved for external reference purposes, such as displaying the segment name in a campaign's history. For more use case information, see [Delete a Segment](/api_guide/segment_delete.html) in the API guide.
+
+ :param segment_id: The system generated ID that uniquely identifies the segment. (required)
+ :type segment_id: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._delete_segment_serialize(
+ segment_id=segment_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _delete_segment_serialize(
+ self,
+ segment_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if segment_id is not None:
+ _path_params['segment_id'] = segment_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/segments/{segment_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_all_segments(
+ self,
+ limit: Annotated[Optional[StrictStr], Field(description="The number of segments to return on a page.")] = None,
+ sort_by: Annotated[Optional[StrictStr], Field(description="Specify the segment sort order to use. Sort by name (`sort_by=name`) in ascending order, or sort by date (`sort_by=date`) in descending order with the most recently updated segments listed first.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GetAllSegments200Response:
+ """GET all Segments
+
+ Use this method to get a list of all segments associated with the account. You can sort segment results and limit the number of segments that display per page. Deleted segments are excluded from the results. For more use case information, see [Get All Segments](/api_guide/segment_get_all.html) in the API guide.
+
+ :param limit: The number of segments to return on a page.
+ :type limit: str
+ :param sort_by: Specify the segment sort order to use. Sort by name (`sort_by=name`) in ascending order, or sort by date (`sort_by=date`) in descending order with the most recently updated segments listed first.
+ :type sort_by: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_all_segments_serialize(
+ limit=limit,
+ sort_by=sort_by,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAllSegments200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_all_segments_with_http_info(
+ self,
+ limit: Annotated[Optional[StrictStr], Field(description="The number of segments to return on a page.")] = None,
+ sort_by: Annotated[Optional[StrictStr], Field(description="Specify the segment sort order to use. Sort by name (`sort_by=name`) in ascending order, or sort by date (`sort_by=date`) in descending order with the most recently updated segments listed first.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GetAllSegments200Response]:
+ """GET all Segments
+
+ Use this method to get a list of all segments associated with the account. You can sort segment results and limit the number of segments that display per page. Deleted segments are excluded from the results. For more use case information, see [Get All Segments](/api_guide/segment_get_all.html) in the API guide.
+
+ :param limit: The number of segments to return on a page.
+ :type limit: str
+ :param sort_by: Specify the segment sort order to use. Sort by name (`sort_by=name`) in ascending order, or sort by date (`sort_by=date`) in descending order with the most recently updated segments listed first.
+ :type sort_by: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_all_segments_serialize(
+ limit=limit,
+ sort_by=sort_by,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAllSegments200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_all_segments_without_preload_content(
+ self,
+ limit: Annotated[Optional[StrictStr], Field(description="The number of segments to return on a page.")] = None,
+ sort_by: Annotated[Optional[StrictStr], Field(description="Specify the segment sort order to use. Sort by name (`sort_by=name`) in ascending order, or sort by date (`sort_by=date`) in descending order with the most recently updated segments listed first.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET all Segments
+
+ Use this method to get a list of all segments associated with the account. You can sort segment results and limit the number of segments that display per page. Deleted segments are excluded from the results. For more use case information, see [Get All Segments](/api_guide/segment_get_all.html) in the API guide.
+
+ :param limit: The number of segments to return on a page.
+ :type limit: str
+ :param sort_by: Specify the segment sort order to use. Sort by name (`sort_by=name`) in ascending order, or sort by date (`sort_by=date`) in descending order with the most recently updated segments listed first.
+ :type sort_by: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_all_segments_serialize(
+ limit=limit,
+ sort_by=sort_by,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GetAllSegments200Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '415': None,
+ '429': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_all_segments_serialize(
+ self,
+ limit,
+ sort_by,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if sort_by is not None:
+
+ _query_params.append(('sort_by', sort_by))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/segments',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_segment_by_id(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system-generated unique ID that identifies a segment.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateSegment201Response:
+ """GET a Segment's Details
+
+ Use this method to get details about a segment, including the segment criteria. If you know the `segment_id` You can also use this method to get details about a deleted segment. For more use case information, see [Get a Segment's Details](/api_guide/segment_get.html) in the API guide.
+
+ :param segment_id: The system-generated unique ID that identifies a segment. (required)
+ :type segment_id: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_segment_by_id_serialize(
+ segment_id=segment_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_segment_by_id_with_http_info(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system-generated unique ID that identifies a segment.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateSegment201Response]:
+ """GET a Segment's Details
+
+ Use this method to get details about a segment, including the segment criteria. If you know the `segment_id` You can also use this method to get details about a deleted segment. For more use case information, see [Get a Segment's Details](/api_guide/segment_get.html) in the API guide.
+
+ :param segment_id: The system-generated unique ID that identifies a segment. (required)
+ :type segment_id: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_segment_by_id_serialize(
+ segment_id=segment_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_segment_by_id_without_preload_content(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system-generated unique ID that identifies a segment.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """GET a Segment's Details
+
+ Use this method to get details about a segment, including the segment criteria. If you know the `segment_id` You can also use this method to get details about a deleted segment. For more use case information, see [Get a Segment's Details](/api_guide/segment_get.html) in the API guide.
+
+ :param segment_id: The system-generated unique ID that identifies a segment. (required)
+ :type segment_id: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_segment_by_id_serialize(
+ segment_id=segment_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '404': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_segment_by_id_serialize(
+ self,
+ segment_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if segment_id is not None:
+ _path_params['segment_id'] = segment_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/segments/{segment_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_segment(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system generated ID that uniquely identifies the segment that you want to modify.")],
+ create_segment_request: Annotated[CreateSegmentRequest, Field(description="Include both the `name` and `segment_criteria` (single-string escaped JSON) in the body request, then make updates to either or both.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateSegment201Response:
+ """PUT (update) a Segment
+
+ Use this method to update an existing segment's name (`name`) and/or contact selection criteria (`segment_criteria`). You must specify both the `name` and the `segment_criteria` in the request body, even if you don't plan to update both. The segment's name must be unique and the JSON must be valid (requires single-string escaped JSON). To avoid returning a 400 error response, when specifying the `segment_criteria` do not request more than 500 email campaigns or a date range greater than 1825 days (5 years) be evaluated. For more use case information, see [Update Segment Details](/api_guide/segment_update.html) in the API guide.
+
+ :param segment_id: The system generated ID that uniquely identifies the segment that you want to modify. (required)
+ :type segment_id: int
+ :param create_segment_request: Include both the `name` and `segment_criteria` (single-string escaped JSON) in the body request, then make updates to either or both. (required)
+ :type create_segment_request: CreateSegmentRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_segment_serialize(
+ segment_id=segment_id,
+ create_segment_request=create_segment_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_segment_with_http_info(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system generated ID that uniquely identifies the segment that you want to modify.")],
+ create_segment_request: Annotated[CreateSegmentRequest, Field(description="Include both the `name` and `segment_criteria` (single-string escaped JSON) in the body request, then make updates to either or both.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateSegment201Response]:
+ """PUT (update) a Segment
+
+ Use this method to update an existing segment's name (`name`) and/or contact selection criteria (`segment_criteria`). You must specify both the `name` and the `segment_criteria` in the request body, even if you don't plan to update both. The segment's name must be unique and the JSON must be valid (requires single-string escaped JSON). To avoid returning a 400 error response, when specifying the `segment_criteria` do not request more than 500 email campaigns or a date range greater than 1825 days (5 years) be evaluated. For more use case information, see [Update Segment Details](/api_guide/segment_update.html) in the API guide.
+
+ :param segment_id: The system generated ID that uniquely identifies the segment that you want to modify. (required)
+ :type segment_id: int
+ :param create_segment_request: Include both the `name` and `segment_criteria` (single-string escaped JSON) in the body request, then make updates to either or both. (required)
+ :type create_segment_request: CreateSegmentRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_segment_serialize(
+ segment_id=segment_id,
+ create_segment_request=create_segment_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_segment_without_preload_content(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system generated ID that uniquely identifies the segment that you want to modify.")],
+ create_segment_request: Annotated[CreateSegmentRequest, Field(description="Include both the `name` and `segment_criteria` (single-string escaped JSON) in the body request, then make updates to either or both.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """PUT (update) a Segment
+
+ Use this method to update an existing segment's name (`name`) and/or contact selection criteria (`segment_criteria`). You must specify both the `name` and the `segment_criteria` in the request body, even if you don't plan to update both. The segment's name must be unique and the JSON must be valid (requires single-string escaped JSON). To avoid returning a 400 error response, when specifying the `segment_criteria` do not request more than 500 email campaigns or a date range greater than 1825 days (5 years) be evaluated. For more use case information, see [Update Segment Details](/api_guide/segment_update.html) in the API guide.
+
+ :param segment_id: The system generated ID that uniquely identifies the segment that you want to modify. (required)
+ :type segment_id: int
+ :param create_segment_request: Include both the `name` and `segment_criteria` (single-string escaped JSON) in the body request, then make updates to either or both. (required)
+ :type create_segment_request: CreateSegmentRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_segment_serialize(
+ segment_id=segment_id,
+ create_segment_request=create_segment_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_segment_serialize(
+ self,
+ segment_id,
+ create_segment_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if segment_id is not None:
+ _path_params['segment_id'] = segment_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_segment_request is not None:
+ _body_params = create_segment_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/segments/{segment_id}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def update_segment_name(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system generated ID that uniquely identifies the segment that you want to modify.")],
+ update_segment_name_request: Annotated[UpdateSegmentNameRequest, Field(description="Include the existing segment `name` in the body request, then rename the segment using a unique new name.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreateSegment201Response:
+ """PATCH (rename) a Segment
+
+ Use this method to update an existing segment `name` with a new unique name in the request body. For more use case information, see [Rename a Segment](/api_guide/segment_rename.html) in the API guide.
+
+ :param segment_id: The system generated ID that uniquely identifies the segment that you want to modify. (required)
+ :type segment_id: int
+ :param update_segment_name_request: Include the existing segment `name` in the body request, then rename the segment using a unique new name. (required)
+ :type update_segment_name_request: UpdateSegmentNameRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_segment_name_serialize(
+ segment_id=segment_id,
+ update_segment_name_request=update_segment_name_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def update_segment_name_with_http_info(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system generated ID that uniquely identifies the segment that you want to modify.")],
+ update_segment_name_request: Annotated[UpdateSegmentNameRequest, Field(description="Include the existing segment `name` in the body request, then rename the segment using a unique new name.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreateSegment201Response]:
+ """PATCH (rename) a Segment
+
+ Use this method to update an existing segment `name` with a new unique name in the request body. For more use case information, see [Rename a Segment](/api_guide/segment_rename.html) in the API guide.
+
+ :param segment_id: The system generated ID that uniquely identifies the segment that you want to modify. (required)
+ :type segment_id: int
+ :param update_segment_name_request: Include the existing segment `name` in the body request, then rename the segment using a unique new name. (required)
+ :type update_segment_name_request: UpdateSegmentNameRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_segment_name_serialize(
+ segment_id=segment_id,
+ update_segment_name_request=update_segment_name_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def update_segment_name_without_preload_content(
+ self,
+ segment_id: Annotated[StrictInt, Field(description="The system generated ID that uniquely identifies the segment that you want to modify.")],
+ update_segment_name_request: Annotated[UpdateSegmentNameRequest, Field(description="Include the existing segment `name` in the body request, then rename the segment using a unique new name.")],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """PATCH (rename) a Segment
+
+ Use this method to update an existing segment `name` with a new unique name in the request body. For more use case information, see [Rename a Segment](/api_guide/segment_rename.html) in the API guide.
+
+ :param segment_id: The system generated ID that uniquely identifies the segment that you want to modify. (required)
+ :type segment_id: int
+ :param update_segment_name_request: Include the existing segment `name` in the body request, then rename the segment using a unique new name. (required)
+ :type update_segment_name_request: UpdateSegmentNameRequest
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._update_segment_name_serialize(
+ segment_id=segment_id,
+ update_segment_name_request=update_segment_name_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreateSegment201Response",
+ '400': None,
+ '401': None,
+ '403': None,
+ '404': None,
+ '409': None,
+ '415': None,
+ '500': None,
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_segment_name_serialize(
+ self,
+ segment_id,
+ update_segment_name_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if segment_id is not None:
+ _path_params['segment_id'] = segment_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if update_segment_name_request is not None:
+ _body_params = update_segment_name_request
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'oauth2_access_code',
+ 'oauth2_implicit'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/segments/{segment_id}/name',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/constant_contact_api_client/api_client.py b/constant_contact_api_client/api_client.py
new file mode 100644
index 0000000..b87b772
--- /dev/null
+++ b/constant_contact_api_client/api_client.py
@@ -0,0 +1,732 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import atexit
+import datetime
+from dateutil.parser import parse
+import json
+import mimetypes
+import os
+import re
+import tempfile
+
+from urllib.parse import quote
+from typing import Tuple, Optional, List
+
+from constant_contact_api_client.configuration import Configuration
+from constant_contact_api_client.api_response import ApiResponse
+import constant_contact_api_client.models
+from constant_contact_api_client import rest
+from constant_contact_api_client.exceptions import (
+ ApiValueError,
+ ApiException,
+ BadRequestException,
+ UnauthorizedException,
+ ForbiddenException,
+ NotFoundException,
+ ServiceException
+)
+
+
+class ApiClient:
+ """Generic API client for OpenAPI client library builds.
+
+ OpenAPI generic API client. This client handles the client-
+ server communication, and is invariant across implementations. Specifics of
+ the methods and models for each application are generated from the OpenAPI
+ templates.
+
+ :param configuration: .Configuration object for this client
+ :param header_name: a header to pass when making calls to the API.
+ :param header_value: a header value to pass when making calls to
+ the API.
+ :param cookie: a cookie to include in the header when making calls
+ to the API
+ """
+
+ PRIMITIVE_TYPES = (float, bool, bytes, str, int)
+ NATIVE_TYPES_MAPPING = {
+ 'int': int,
+ 'long': int, # TODO remove as only py3 is supported?
+ 'float': float,
+ 'str': str,
+ 'bool': bool,
+ 'date': datetime.date,
+ 'datetime': datetime.datetime,
+ 'object': object,
+ }
+ _pool = None
+
+ def __init__(
+ self,
+ configuration=None,
+ header_name=None,
+ header_value=None,
+ cookie=None
+ ) -> None:
+ # use default configuration if none is provided
+ if configuration is None:
+ configuration = Configuration.get_default()
+ self.configuration = configuration
+
+ self.rest_client = rest.RESTClientObject(configuration)
+ self.default_headers = {}
+ if header_name is not None:
+ self.default_headers[header_name] = header_value
+ self.cookie = cookie
+ # Set default User-Agent.
+ self.user_agent = 'ConstantContactApiPython/1.0.0'
+ self.client_side_validation = configuration.client_side_validation
+
+ def __enter__(self):
+ return self
+
+ def __exit__(self, exc_type, exc_value, traceback):
+ pass
+
+ @property
+ def user_agent(self):
+ """User agent for this API client"""
+ return self.default_headers['User-Agent']
+
+ @user_agent.setter
+ def user_agent(self, value):
+ self.default_headers['User-Agent'] = value
+
+ def set_default_header(self, header_name, header_value):
+ self.default_headers[header_name] = header_value
+
+
+ _default = None
+
+ @classmethod
+ def get_default(cls):
+ """Return new instance of ApiClient.
+
+ This method returns newly created, based on default constructor,
+ object of ApiClient class or returns a copy of default
+ ApiClient.
+
+ :return: The ApiClient object.
+ """
+ if cls._default is None:
+ cls._default = ApiClient()
+ return cls._default
+
+ @classmethod
+ def set_default(cls, default):
+ """Set default instance of ApiClient.
+
+ It stores default ApiClient.
+
+ :param default: object of ApiClient.
+ """
+ cls._default = default
+
+ def param_serialize(
+ self,
+ method,
+ resource_path,
+ path_params=None,
+ query_params=None,
+ header_params=None,
+ body=None,
+ post_params=None,
+ files=None, auth_settings=None,
+ collection_formats=None,
+ _host=None,
+ _request_auth=None
+ ) -> Tuple:
+
+ """Builds the HTTP request params needed by the request.
+ :param method: Method to call.
+ :param resource_path: Path to method endpoint.
+ :param path_params: Path parameters in the url.
+ :param query_params: Query parameters in the url.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param auth_settings list: Auth Settings names for the request.
+ :param files dict: key -> filename, value -> filepath,
+ for `multipart/form-data`.
+ :param collection_formats: dict of collection formats for path, query,
+ header, and post parameters.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :return: tuple of form (path, http_method, query_params, header_params,
+ body, post_params, files)
+ """
+
+ config = self.configuration
+
+ # header parameters
+ header_params = header_params or {}
+ header_params.update(self.default_headers)
+ if self.cookie:
+ header_params['Cookie'] = self.cookie
+ if header_params:
+ header_params = self.sanitize_for_serialization(header_params)
+ header_params = dict(
+ self.parameters_to_tuples(header_params,collection_formats)
+ )
+
+ # path parameters
+ if path_params:
+ path_params = self.sanitize_for_serialization(path_params)
+ path_params = self.parameters_to_tuples(
+ path_params,
+ collection_formats
+ )
+ for k, v in path_params:
+ # specified safe chars, encode everything
+ resource_path = resource_path.replace(
+ '{%s}' % k,
+ quote(str(v), safe=config.safe_chars_for_path_param)
+ )
+
+ # post parameters
+ if post_params or files:
+ post_params = post_params if post_params else []
+ post_params = self.sanitize_for_serialization(post_params)
+ post_params = self.parameters_to_tuples(
+ post_params,
+ collection_formats
+ )
+ post_params.extend(self.files_parameters(files))
+
+ # auth setting
+ self.update_params_for_auth(
+ header_params,
+ query_params,
+ auth_settings,
+ resource_path,
+ method,
+ body,
+ request_auth=_request_auth
+ )
+
+ # body
+ if body:
+ body = self.sanitize_for_serialization(body)
+
+ # request url
+ if _host is None:
+ url = self.configuration.host + resource_path
+ else:
+ # use server/host defined in path or operation instead
+ url = _host + resource_path
+
+ # query parameters
+ if query_params:
+ query_params = self.sanitize_for_serialization(query_params)
+ url_query = self.parameters_to_url_query(
+ query_params,
+ collection_formats
+ )
+ url += "?" + url_query
+
+ return method, url, header_params, body, post_params
+
+
+ def call_api(
+ self,
+ method,
+ url,
+ header_params=None,
+ body=None,
+ post_params=None,
+ _request_timeout=None
+ ) -> rest.RESTResponse:
+ """Makes the HTTP request (synchronous)
+ :param method: Method to call.
+ :param url: Path to method endpoint.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param _request_timeout: timeout setting for this request.
+ :return: RESTResponse
+ """
+
+ try:
+ # perform request and return response
+ response_data = self.rest_client.request(
+ method, url,
+ headers=header_params,
+ body=body, post_params=post_params,
+ _request_timeout=_request_timeout
+ )
+
+ except ApiException as e:
+ if e.body:
+ e.body = e.body.decode('utf-8')
+ raise e
+
+ return response_data
+
+ def response_deserialize(
+ self,
+ response_data: rest.RESTResponse = None,
+ response_types_map=None
+ ) -> ApiResponse:
+ """Deserializes response into an object.
+ :param response_data: RESTResponse object to be deserialized.
+ :param response_types_map: dict of response types.
+ :return: ApiResponse
+ """
+
+
+ response_type = response_types_map.get(str(response_data.status), None)
+ if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599:
+ # if not found, look for '1XX', '2XX', etc.
+ response_type = response_types_map.get(str(response_data.status)[0] + "XX", None)
+
+ # deserialize response data
+ response_text = None
+ return_data = None
+ try:
+ if response_type == "bytearray":
+ return_data = response_data.data
+ elif response_type == "file":
+ return_data = self.__deserialize_file(response_data)
+ elif response_type is not None:
+ match = None
+ content_type = response_data.getheader('content-type')
+ if content_type is not None:
+ match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
+ encoding = match.group(1) if match else "utf-8"
+ response_text = response_data.data.decode(encoding)
+ return_data = self.deserialize(response_text, response_type)
+ finally:
+ if not 200 <= response_data.status <= 299:
+ raise ApiException.from_response(
+ http_resp=response_data,
+ body=response_text,
+ data=return_data,
+ )
+
+ return ApiResponse(
+ status_code = response_data.status,
+ data = return_data,
+ headers = response_data.getheaders(),
+ raw_data = response_data.data
+ )
+
+ def sanitize_for_serialization(self, obj):
+ """Builds a JSON POST object.
+
+ If obj is None, return None.
+ If obj is str, int, long, float, bool, return directly.
+ If obj is datetime.datetime, datetime.date
+ convert to string in iso8601 format.
+ If obj is list, sanitize each element in the list.
+ If obj is dict, return the dict.
+ If obj is OpenAPI model, return the properties dict.
+
+ :param obj: The data to serialize.
+ :return: The serialized form of data.
+ """
+ if obj is None:
+ return None
+ elif isinstance(obj, self.PRIMITIVE_TYPES):
+ return obj
+ elif isinstance(obj, list):
+ return [
+ self.sanitize_for_serialization(sub_obj) for sub_obj in obj
+ ]
+ elif isinstance(obj, tuple):
+ return tuple(
+ self.sanitize_for_serialization(sub_obj) for sub_obj in obj
+ )
+ elif isinstance(obj, (datetime.datetime, datetime.date)):
+ return obj.isoformat()
+
+ elif isinstance(obj, dict):
+ obj_dict = obj
+ else:
+ # Convert model obj to dict except
+ # attributes `openapi_types`, `attribute_map`
+ # and attributes which value is not None.
+ # Convert attribute name to json key in
+ # model definition for request.
+ obj_dict = obj.to_dict()
+
+ return {
+ key: self.sanitize_for_serialization(val)
+ for key, val in obj_dict.items()
+ }
+
+ def deserialize(self, response_text, response_type):
+ """Deserializes response into an object.
+
+ :param response: RESTResponse object to be deserialized.
+ :param response_type: class literal for
+ deserialized object, or string of class name.
+
+ :return: deserialized object.
+ """
+
+ # fetch data from response object
+ try:
+ data = json.loads(response_text)
+ except ValueError:
+ data = response_text
+
+ return self.__deserialize(data, response_type)
+
+ def __deserialize(self, data, klass):
+ """Deserializes dict, list, str into an object.
+
+ :param data: dict, list or str.
+ :param klass: class literal, or string of class name.
+
+ :return: object.
+ """
+ if data is None:
+ return None
+
+ if isinstance(klass, str):
+ if klass.startswith('List['):
+ sub_kls = re.match(r'List\[(.*)]', klass).group(1)
+ return [self.__deserialize(sub_data, sub_kls)
+ for sub_data in data]
+
+ if klass.startswith('Dict['):
+ sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2)
+ return {k: self.__deserialize(v, sub_kls)
+ for k, v in data.items()}
+
+ # convert str to class
+ if klass in self.NATIVE_TYPES_MAPPING:
+ klass = self.NATIVE_TYPES_MAPPING[klass]
+ else:
+ klass = getattr(constant_contact_api_client.models, klass)
+
+ if klass in self.PRIMITIVE_TYPES:
+ return self.__deserialize_primitive(data, klass)
+ elif klass == object:
+ return self.__deserialize_object(data)
+ elif klass == datetime.date:
+ return self.__deserialize_date(data)
+ elif klass == datetime.datetime:
+ return self.__deserialize_datetime(data)
+ else:
+ return self.__deserialize_model(data, klass)
+
+ def parameters_to_tuples(self, params, collection_formats):
+ """Get parameters as list of tuples, formatting collections.
+
+ :param params: Parameters as dict or list of two-tuples
+ :param dict collection_formats: Parameter collection formats
+ :return: Parameters as list of tuples, collections formatted
+ """
+ new_params = []
+ if collection_formats is None:
+ collection_formats = {}
+ for k, v in params.items() if isinstance(params, dict) else params:
+ if k in collection_formats:
+ collection_format = collection_formats[k]
+ if collection_format == 'multi':
+ new_params.extend((k, value) for value in v)
+ else:
+ if collection_format == 'ssv':
+ delimiter = ' '
+ elif collection_format == 'tsv':
+ delimiter = '\t'
+ elif collection_format == 'pipes':
+ delimiter = '|'
+ else: # csv is the default
+ delimiter = ','
+ new_params.append(
+ (k, delimiter.join(str(value) for value in v)))
+ else:
+ new_params.append((k, v))
+ return new_params
+
+ def parameters_to_url_query(self, params, collection_formats):
+ """Get parameters as list of tuples, formatting collections.
+
+ :param params: Parameters as dict or list of two-tuples
+ :param dict collection_formats: Parameter collection formats
+ :return: URL query string (e.g. a=Hello%20World&b=123)
+ """
+ new_params = []
+ if collection_formats is None:
+ collection_formats = {}
+ for k, v in params.items() if isinstance(params, dict) else params:
+ if isinstance(v, bool):
+ v = str(v).lower()
+ if isinstance(v, (int, float)):
+ v = str(v)
+ if isinstance(v, dict):
+ v = json.dumps(v)
+
+ if k in collection_formats:
+ collection_format = collection_formats[k]
+ if collection_format == 'multi':
+ new_params.extend((k, value) for value in v)
+ else:
+ if collection_format == 'ssv':
+ delimiter = ' '
+ elif collection_format == 'tsv':
+ delimiter = '\t'
+ elif collection_format == 'pipes':
+ delimiter = '|'
+ else: # csv is the default
+ delimiter = ','
+ new_params.append(
+ (k, delimiter.join(quote(str(value)) for value in v))
+ )
+ else:
+ new_params.append((k, quote(str(v))))
+
+ return "&".join(["=".join(item) for item in new_params])
+
+ def files_parameters(self, files=None):
+ """Builds form parameters.
+
+ :param files: File parameters.
+ :return: Form parameters with files.
+ """
+ params = []
+
+ if files:
+ for k, v in files.items():
+ if not v:
+ continue
+ file_names = v if type(v) is list else [v]
+ for n in file_names:
+ with open(n, 'rb') as f:
+ filename = os.path.basename(f.name)
+ filedata = f.read()
+ mimetype = (
+ mimetypes.guess_type(filename)[0]
+ or 'application/octet-stream'
+ )
+ params.append(
+ tuple([k, tuple([filename, filedata, mimetype])])
+ )
+
+ return params
+
+ def select_header_accept(self, accepts: List[str]) -> Optional[str]:
+ """Returns `Accept` based on an array of accepts provided.
+
+ :param accepts: List of headers.
+ :return: Accept (e.g. application/json).
+ """
+ if not accepts:
+ return None
+
+ for accept in accepts:
+ if re.search('json', accept, re.IGNORECASE):
+ return accept
+
+ return accepts[0]
+
+ def select_header_content_type(self, content_types):
+ """Returns `Content-Type` based on an array of content_types provided.
+
+ :param content_types: List of content-types.
+ :return: Content-Type (e.g. application/json).
+ """
+ if not content_types:
+ return None
+
+ for content_type in content_types:
+ if re.search('json', content_type, re.IGNORECASE):
+ return content_type
+
+ return content_types[0]
+
+ def update_params_for_auth(
+ self,
+ headers,
+ queries,
+ auth_settings,
+ resource_path,
+ method,
+ body,
+ request_auth=None
+ ) -> None:
+ """Updates header and query params based on authentication setting.
+
+ :param headers: Header parameters dict to be updated.
+ :param queries: Query parameters tuple list to be updated.
+ :param auth_settings: Authentication setting identifiers list.
+ :resource_path: A string representation of the HTTP request resource path.
+ :method: A string representation of the HTTP request method.
+ :body: A object representing the body of the HTTP request.
+ The object type is the return value of sanitize_for_serialization().
+ :param request_auth: if set, the provided settings will
+ override the token in the configuration.
+ """
+ if not auth_settings:
+ return
+
+ if request_auth:
+ self._apply_auth_params(
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ request_auth
+ )
+ else:
+ for auth in auth_settings:
+ auth_setting = self.configuration.auth_settings().get(auth)
+ if auth_setting:
+ self._apply_auth_params(
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ auth_setting
+ )
+
+ def _apply_auth_params(
+ self,
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ auth_setting
+ ) -> None:
+ """Updates the request parameters based on a single auth_setting
+
+ :param headers: Header parameters dict to be updated.
+ :param queries: Query parameters tuple list to be updated.
+ :resource_path: A string representation of the HTTP request resource path.
+ :method: A string representation of the HTTP request method.
+ :body: A object representing the body of the HTTP request.
+ The object type is the return value of sanitize_for_serialization().
+ :param auth_setting: auth settings for the endpoint
+ """
+ if auth_setting['in'] == 'cookie':
+ headers['Cookie'] = auth_setting['value']
+ elif auth_setting['in'] == 'header':
+ if auth_setting['type'] != 'http-signature':
+ headers[auth_setting['key']] = auth_setting['value']
+ elif auth_setting['in'] == 'query':
+ queries.append((auth_setting['key'], auth_setting['value']))
+ else:
+ raise ApiValueError(
+ 'Authentication token must be in `query` or `header`'
+ )
+
+ def __deserialize_file(self, response):
+ """Deserializes body to file
+
+ Saves response body into a file in a temporary folder,
+ using the filename from the `Content-Disposition` header if provided.
+
+ handle file downloading
+ save response body into a tmp file and return the instance
+
+ :param response: RESTResponse.
+ :return: file path.
+ """
+ fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
+ os.close(fd)
+ os.remove(path)
+
+ content_disposition = response.getheader("Content-Disposition")
+ if content_disposition:
+ filename = re.search(
+ r'filename=[\'"]?([^\'"\s]+)[\'"]?',
+ content_disposition
+ ).group(1)
+ path = os.path.join(os.path.dirname(path), filename)
+
+ with open(path, "wb") as f:
+ f.write(response.data)
+
+ return path
+
+ def __deserialize_primitive(self, data, klass):
+ """Deserializes string to primitive type.
+
+ :param data: str.
+ :param klass: class literal.
+
+ :return: int, long, float, str, bool.
+ """
+ try:
+ return klass(data)
+ except UnicodeEncodeError:
+ return str(data)
+ except TypeError:
+ return data
+
+ def __deserialize_object(self, value):
+ """Return an original value.
+
+ :return: object.
+ """
+ return value
+
+ def __deserialize_date(self, string):
+ """Deserializes string to date.
+
+ :param string: str.
+ :return: date.
+ """
+ try:
+ return parse(string).date()
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason="Failed to parse `{0}` as date object".format(string)
+ )
+
+ def __deserialize_datetime(self, string):
+ """Deserializes string to datetime.
+
+ The string should be in iso8601 datetime format.
+
+ :param string: str.
+ :return: datetime.
+ """
+ try:
+ return parse(string)
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason=(
+ "Failed to parse `{0}` as datetime object"
+ .format(string)
+ )
+ )
+
+ def __deserialize_model(self, data, klass):
+ """Deserializes list or dict to model.
+
+ :param data: dict, list.
+ :param klass: class literal.
+ :return: model object.
+ """
+
+ return klass.from_dict(data)
diff --git a/constant_contact_api_client/api_response.py b/constant_contact_api_client/api_response.py
new file mode 100644
index 0000000..2ac1ada
--- /dev/null
+++ b/constant_contact_api_client/api_response.py
@@ -0,0 +1,21 @@
+"""API response object."""
+
+from __future__ import annotations
+from typing import Any, Dict, Optional, Generic, TypeVar
+from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel
+
+T = TypeVar("T")
+
+class ApiResponse(BaseModel, Generic[T]):
+ """
+ API response object
+ """
+
+ status_code: StrictInt = Field(description="HTTP status code")
+ headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers")
+ data: T = Field(description="Deserialized data given the data type")
+ raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
+
+ model_config = {
+ "arbitrary_types_allowed": True
+ }
diff --git a/constant_contact_api_client/configuration.py b/constant_contact_api_client/configuration.py
new file mode 100644
index 0000000..065d4b4
--- /dev/null
+++ b/constant_contact_api_client/configuration.py
@@ -0,0 +1,450 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import copy
+import logging
+import multiprocessing
+import sys
+import urllib3
+
+import http.client as httplib
+
+JSON_SCHEMA_VALIDATION_KEYWORDS = {
+ 'multipleOf', 'maximum', 'exclusiveMaximum',
+ 'minimum', 'exclusiveMinimum', 'maxLength',
+ 'minLength', 'pattern', 'maxItems', 'minItems'
+}
+
+class Configuration:
+ """This class contains various settings of the API client.
+
+ :param host: Base url.
+ :param api_key: Dict to store API key(s).
+ Each entry in the dict specifies an API key.
+ The dict key is the name of the security scheme in the OAS specification.
+ The dict value is the API key secret.
+ :param api_key_prefix: Dict to store API prefix (e.g. Bearer).
+ The dict key is the name of the security scheme in the OAS specification.
+ The dict value is an API key prefix when generating the auth data.
+ :param username: Username for HTTP basic authentication.
+ :param password: Password for HTTP basic authentication.
+ :param access_token: Access token.
+ :param server_index: Index to servers configuration.
+ :param server_variables: Mapping with string values to replace variables in
+ templated server configuration. The validation of enums is performed for
+ variables with defined enum values before.
+ :param server_operation_index: Mapping from operation ID to an index to server
+ configuration.
+ :param server_operation_variables: Mapping from operation ID to a mapping with
+ string values to replace variables in templated server configuration.
+ The validation of enums is performed for variables with defined enum
+ values before.
+ :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
+ in PEM format.
+
+ :Example:
+ """
+
+ _default = None
+
+ def __init__(self, host=None,
+ api_key=None, api_key_prefix=None,
+ username=None, password=None,
+ access_token=None,
+ server_index=None, server_variables=None,
+ server_operation_index=None, server_operation_variables=None,
+ ssl_ca_cert=None,
+ ) -> None:
+ """Constructor
+ """
+ self._base_path = "https://api.cc.email/v3" if host is None else host
+ """Default Base url
+ """
+ self.server_index = 0 if server_index is None and host is None else server_index
+ self.server_operation_index = server_operation_index or {}
+ """Default server index
+ """
+ self.server_variables = server_variables or {}
+ self.server_operation_variables = server_operation_variables or {}
+ """Default server variables
+ """
+ self.temp_folder_path = None
+ """Temp file folder for downloading files
+ """
+ # Authentication Settings
+ self.api_key = {}
+ if api_key:
+ self.api_key = api_key
+ """dict to store API key(s)
+ """
+ self.api_key_prefix = {}
+ if api_key_prefix:
+ self.api_key_prefix = api_key_prefix
+ """dict to store API prefix (e.g. Bearer)
+ """
+ self.refresh_api_key_hook = None
+ """function hook to refresh API key if expired
+ """
+ self.username = username
+ """Username for HTTP basic authentication
+ """
+ self.password = password
+ """Password for HTTP basic authentication
+ """
+ self.access_token = access_token
+ """Access token
+ """
+ self.logger = {}
+ """Logging Settings
+ """
+ self.logger["package_logger"] = logging.getLogger("constant_contact_api_client")
+ self.logger["urllib3_logger"] = logging.getLogger("urllib3")
+ self.logger_format = '%(asctime)s %(levelname)s %(message)s'
+ """Log format
+ """
+ self.logger_stream_handler = None
+ """Log stream handler
+ """
+ self.logger_file_handler = None
+ """Log file handler
+ """
+ self.logger_file = None
+ """Debug file location
+ """
+ self.debug = False
+ """Debug switch
+ """
+
+ self.verify_ssl = True
+ """SSL/TLS verification
+ Set this to false to skip verifying SSL certificate when calling API
+ from https server.
+ """
+ self.ssl_ca_cert = ssl_ca_cert
+ """Set this to customize the certificate file to verify the peer.
+ """
+ self.cert_file = None
+ """client certificate file
+ """
+ self.key_file = None
+ """client key file
+ """
+ self.assert_hostname = None
+ """Set this to True/False to enable/disable SSL hostname verification.
+ """
+ self.tls_server_name = None
+ """SSL/TLS Server Name Indication (SNI)
+ Set this to the SNI value expected by the server.
+ """
+
+ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
+ """urllib3 connection pool's maximum number of connections saved
+ per pool. urllib3 uses 1 connection as default value, but this is
+ not the best value when you are making a lot of possibly parallel
+ requests to the same host, which is often the case here.
+ cpu_count * 5 is used as default value to increase performance.
+ """
+
+ self.proxy = None
+ """Proxy URL
+ """
+ self.proxy_headers = None
+ """Proxy headers
+ """
+ self.safe_chars_for_path_param = ''
+ """Safe chars for path_param
+ """
+ self.retries = None
+ """Adding retries to override urllib3 default value 3
+ """
+ # Enable client side validation
+ self.client_side_validation = True
+
+ self.socket_options = None
+ """Options to pass down to the underlying urllib3 socket
+ """
+
+ self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z"
+ """datetime format
+ """
+
+ self.date_format = "%Y-%m-%d"
+ """date format
+ """
+
+ def __deepcopy__(self, memo):
+ cls = self.__class__
+ result = cls.__new__(cls)
+ memo[id(self)] = result
+ for k, v in self.__dict__.items():
+ if k not in ('logger', 'logger_file_handler'):
+ setattr(result, k, copy.deepcopy(v, memo))
+ # shallow copy of loggers
+ result.logger = copy.copy(self.logger)
+ # use setters to configure loggers
+ result.logger_file = self.logger_file
+ result.debug = self.debug
+ return result
+
+ def __setattr__(self, name, value):
+ object.__setattr__(self, name, value)
+
+ @classmethod
+ def set_default(cls, default):
+ """Set default instance of configuration.
+
+ It stores default configuration, which can be
+ returned by get_default_copy method.
+
+ :param default: object of Configuration
+ """
+ cls._default = default
+
+ @classmethod
+ def get_default_copy(cls):
+ """Deprecated. Please use `get_default` instead.
+
+ Deprecated. Please use `get_default` instead.
+
+ :return: The configuration object.
+ """
+ return cls.get_default()
+
+ @classmethod
+ def get_default(cls):
+ """Return the default configuration.
+
+ This method returns newly created, based on default constructor,
+ object of Configuration class or returns a copy of default
+ configuration.
+
+ :return: The configuration object.
+ """
+ if cls._default is None:
+ cls._default = Configuration()
+ return cls._default
+
+ @property
+ def logger_file(self):
+ """The logger file.
+
+ If the logger_file is None, then add stream handler and remove file
+ handler. Otherwise, add file handler and remove stream handler.
+
+ :param value: The logger_file path.
+ :type: str
+ """
+ return self.__logger_file
+
+ @logger_file.setter
+ def logger_file(self, value):
+ """The logger file.
+
+ If the logger_file is None, then add stream handler and remove file
+ handler. Otherwise, add file handler and remove stream handler.
+
+ :param value: The logger_file path.
+ :type: str
+ """
+ self.__logger_file = value
+ if self.__logger_file:
+ # If set logging file,
+ # then add file handler and remove stream handler.
+ self.logger_file_handler = logging.FileHandler(self.__logger_file)
+ self.logger_file_handler.setFormatter(self.logger_formatter)
+ for _, logger in self.logger.items():
+ logger.addHandler(self.logger_file_handler)
+
+ @property
+ def debug(self):
+ """Debug status
+
+ :param value: The debug status, True or False.
+ :type: bool
+ """
+ return self.__debug
+
+ @debug.setter
+ def debug(self, value):
+ """Debug status
+
+ :param value: The debug status, True or False.
+ :type: bool
+ """
+ self.__debug = value
+ if self.__debug:
+ # if debug status is True, turn on debug logging
+ for _, logger in self.logger.items():
+ logger.setLevel(logging.DEBUG)
+ # turn on httplib debug
+ httplib.HTTPConnection.debuglevel = 1
+ else:
+ # if debug status is False, turn off debug logging,
+ # setting log level to default `logging.WARNING`
+ for _, logger in self.logger.items():
+ logger.setLevel(logging.WARNING)
+ # turn off httplib debug
+ httplib.HTTPConnection.debuglevel = 0
+
+ @property
+ def logger_format(self):
+ """The logger format.
+
+ The logger_formatter will be updated when sets logger_format.
+
+ :param value: The format string.
+ :type: str
+ """
+ return self.__logger_format
+
+ @logger_format.setter
+ def logger_format(self, value):
+ """The logger format.
+
+ The logger_formatter will be updated when sets logger_format.
+
+ :param value: The format string.
+ :type: str
+ """
+ self.__logger_format = value
+ self.logger_formatter = logging.Formatter(self.__logger_format)
+
+ def get_api_key_with_prefix(self, identifier, alias=None):
+ """Gets API key (with prefix if set).
+
+ :param identifier: The identifier of apiKey.
+ :param alias: The alternative identifier of apiKey.
+ :return: The token for api key authentication.
+ """
+ if self.refresh_api_key_hook is not None:
+ self.refresh_api_key_hook(self)
+ key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
+ if key:
+ prefix = self.api_key_prefix.get(identifier)
+ if prefix:
+ return "%s %s" % (prefix, key)
+ else:
+ return key
+
+ def get_basic_auth_token(self):
+ """Gets HTTP basic authentication header (string).
+
+ :return: The token for basic HTTP authentication.
+ """
+ username = ""
+ if self.username is not None:
+ username = self.username
+ password = ""
+ if self.password is not None:
+ password = self.password
+ return urllib3.util.make_headers(
+ basic_auth=username + ':' + password
+ ).get('authorization')
+
+ def auth_settings(self):
+ """Gets Auth Settings dict for api client.
+
+ :return: The Auth Settings information dict.
+ """
+ auth = {}
+ if self.access_token is not None:
+ auth['oauth2_implicit'] = {
+ 'type': 'oauth2',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': 'Bearer ' + self.access_token
+ }
+ if self.access_token is not None:
+ auth['oauth2_access_code'] = {
+ 'type': 'oauth2',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': 'Bearer ' + self.access_token
+ }
+ return auth
+
+ def to_debug_report(self):
+ """Gets the essential information for debugging.
+
+ :return: The report for debugging.
+ """
+ return "Python SDK Debug Report:\n"\
+ "OS: {env}\n"\
+ "Python Version: {pyversion}\n"\
+ "Version of the API: 1.0.97\n"\
+ "SDK Package Version: 1.0.0".\
+ format(env=sys.platform, pyversion=sys.version)
+
+ def get_host_settings(self):
+ """Gets an array of host settings
+
+ :return: An array of host settings
+ """
+ return [
+ {
+ 'url': "https://api.cc.email/v3",
+ 'description': "No description provided",
+ }
+ ]
+
+ def get_host_from_settings(self, index, variables=None, servers=None):
+ """Gets host URL based on the index and variables
+ :param index: array index of the host settings
+ :param variables: hash of variable and the corresponding value
+ :param servers: an array of host settings or None
+ :return: URL based on host settings
+ """
+ if index is None:
+ return self._base_path
+
+ variables = {} if variables is None else variables
+ servers = self.get_host_settings() if servers is None else servers
+
+ try:
+ server = servers[index]
+ except IndexError:
+ raise ValueError(
+ "Invalid index {0} when selecting the host settings. "
+ "Must be less than {1}".format(index, len(servers)))
+
+ url = server['url']
+
+ # go through variables and replace placeholders
+ for variable_name, variable in server.get('variables', {}).items():
+ used_value = variables.get(
+ variable_name, variable['default_value'])
+
+ if 'enum_values' in variable \
+ and used_value not in variable['enum_values']:
+ raise ValueError(
+ "The variable `{0}` in the host URL has invalid value "
+ "{1}. Must be {2}.".format(
+ variable_name, variables[variable_name],
+ variable['enum_values']))
+
+ url = url.replace("{" + variable_name + "}", used_value)
+
+ return url
+
+ @property
+ def host(self):
+ """Return generated host."""
+ return self.get_host_from_settings(self.server_index, variables=self.server_variables)
+
+ @host.setter
+ def host(self, value):
+ """Fix base path."""
+ self._base_path = value
+ self.server_index = None
diff --git a/constant_contact_api_client/exceptions.py b/constant_contact_api_client/exceptions.py
new file mode 100644
index 0000000..9f166f8
--- /dev/null
+++ b/constant_contact_api_client/exceptions.py
@@ -0,0 +1,201 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from typing import Any, Optional
+
+from typing_extensions import Self
+
+class OpenApiException(Exception):
+ """The base exception class for all OpenAPIExceptions"""
+
+
+class ApiTypeError(OpenApiException, TypeError):
+ def __init__(self, msg, path_to_item=None, valid_classes=None,
+ key_type=None) -> None:
+ """ Raises an exception for TypeErrors
+
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (list): a list of keys an indices to get to the
+ current_item
+ None if unset
+ valid_classes (tuple): the primitive classes that current item
+ should be an instance of
+ None if unset
+ key_type (bool): False if our value is a value in a dict
+ True if it is a key in a dict
+ False if our item is an item in a list
+ None if unset
+ """
+ self.path_to_item = path_to_item
+ self.valid_classes = valid_classes
+ self.key_type = key_type
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiTypeError, self).__init__(full_msg)
+
+
+class ApiValueError(OpenApiException, ValueError):
+ def __init__(self, msg, path_to_item=None) -> None:
+ """
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (list) the path to the exception in the
+ received_data dict. None if unset
+ """
+
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiValueError, self).__init__(full_msg)
+
+
+class ApiAttributeError(OpenApiException, AttributeError):
+ def __init__(self, msg, path_to_item=None) -> None:
+ """
+ Raised when an attribute reference or assignment fails.
+
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (None/list) the path to the exception in the
+ received_data dict
+ """
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiAttributeError, self).__init__(full_msg)
+
+
+class ApiKeyError(OpenApiException, KeyError):
+ def __init__(self, msg, path_to_item=None) -> None:
+ """
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (None/list) the path to the exception in the
+ received_data dict
+ """
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiKeyError, self).__init__(full_msg)
+
+
+class ApiException(OpenApiException):
+
+ def __init__(
+ self,
+ status=None,
+ reason=None,
+ http_resp=None,
+ *,
+ body: Optional[str] = None,
+ data: Optional[Any] = None,
+ ) -> None:
+ self.status = status
+ self.reason = reason
+ self.body = body
+ self.data = data
+ self.headers = None
+
+ if http_resp:
+ if self.status is None:
+ self.status = http_resp.status
+ if self.reason is None:
+ self.reason = http_resp.reason
+ if self.body is None:
+ try:
+ self.body = http_resp.data.decode('utf-8')
+ except Exception:
+ pass
+ self.headers = http_resp.getheaders()
+
+ @classmethod
+ def from_response(
+ cls,
+ *,
+ http_resp,
+ body: Optional[str],
+ data: Optional[Any],
+ ) -> Self:
+ if http_resp.status == 400:
+ raise BadRequestException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 401:
+ raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 403:
+ raise ForbiddenException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 404:
+ raise NotFoundException(http_resp=http_resp, body=body, data=data)
+
+ if 500 <= http_resp.status <= 599:
+ raise ServiceException(http_resp=http_resp, body=body, data=data)
+ raise ApiException(http_resp=http_resp, body=body, data=data)
+
+ def __str__(self):
+ """Custom error messages for exception"""
+ error_message = "({0})\n"\
+ "Reason: {1}\n".format(self.status, self.reason)
+ if self.headers:
+ error_message += "HTTP response headers: {0}\n".format(
+ self.headers)
+
+ if self.data or self.body:
+ error_message += "HTTP response body: {0}\n".format(self.data or self.body)
+
+ return error_message
+
+
+class BadRequestException(ApiException):
+ pass
+
+
+class NotFoundException(ApiException):
+ pass
+
+
+class UnauthorizedException(ApiException):
+ pass
+
+
+class ForbiddenException(ApiException):
+ pass
+
+
+class ServiceException(ApiException):
+ pass
+
+
+def render_path(path_to_item):
+ """Returns a string representation of a path"""
+ result = ""
+ for pth in path_to_item:
+ if isinstance(pth, int):
+ result += "[{0}]".format(pth)
+ else:
+ result += "['{0}']".format(pth)
+ return result
diff --git a/constant_contact_api_client/models/__init__.py b/constant_contact_api_client/models/__init__.py
new file mode 100644
index 0000000..0a72f65
--- /dev/null
+++ b/constant_contact_api_client/models/__init__.py
@@ -0,0 +1,382 @@
+# coding: utf-8
+
+# flake8: noqa
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+# import models into model package
+from constant_contact_api_client.models.ab_test_data import ABTestData
+from constant_contact_api_client.models.api_error_schema_inner import APIErrorSchemaInner
+from constant_contact_api_client.models.access_token_response import AccessTokenResponse
+from constant_contact_api_client.models.account_cancellation import AccountCancellation
+from constant_contact_api_client.models.account_email_create_response import AccountEmailCreateResponse
+from constant_contact_api_client.models.account_email_input import AccountEmailInput
+from constant_contact_api_client.models.account_physical_address import AccountPhysicalAddress
+from constant_contact_api_client.models.account_suspension import AccountSuspension
+from constant_contact_api_client.models.activities import Activities
+from constant_contact_api_client.models.activity import Activity
+from constant_contact_api_client.models.activity_delete_custom_fields import ActivityDeleteCustomFields
+from constant_contact_api_client.models.activity_delete_list_response import ActivityDeleteListResponse
+from constant_contact_api_client.models.activity_delete_lists_response import ActivityDeleteListsResponse
+from constant_contact_api_client.models.activity_delete_status import ActivityDeleteStatus
+from constant_contact_api_client.models.activity_errors import ActivityErrors
+from constant_contact_api_client.models.activity_export_status import ActivityExportStatus
+from constant_contact_api_client.models.activity_generic import ActivityGeneric
+from constant_contact_api_client.models.activity_generic_status import ActivityGenericStatus
+from constant_contact_api_client.models.activity_import import ActivityImport
+from constant_contact_api_client.models.activity_links import ActivityLinks
+from constant_contact_api_client.models.activity_lists_membership import ActivityListsMembership
+from constant_contact_api_client.models.activity_reference import ActivityReference
+from constant_contact_api_client.models.activity_status import ActivityStatus
+from constant_contact_api_client.models.activity_status_export_link import ActivityStatusExportLink
+from constant_contact_api_client.models.activity_status_link import ActivityStatusLink
+from constant_contact_api_client.models.activity_tagging import ActivityTagging
+from constant_contact_api_client.models.activity_tagging_status import ActivityTaggingStatus
+from constant_contact_api_client.models.add_account_email_address201_response import AddAccountEmailAddress201Response
+from constant_contact_api_client.models.add_account_email_address_request import AddAccountEmailAddressRequest
+from constant_contact_api_client.models.authorization_error_schema import AuthorizationErrorSchema
+from constant_contact_api_client.models.bounces_tracking_activities_page import BouncesTrackingActivitiesPage
+from constant_contact_api_client.models.bounces_tracking_activity import BouncesTrackingActivity
+from constant_contact_api_client.models.bulk_email_campaign_summaries_page import BulkEmailCampaignSummariesPage
+from constant_contact_api_client.models.bulk_email_campaign_summaries_percents import BulkEmailCampaignSummariesPercents
+from constant_contact_api_client.models.bulk_email_campaign_summary import BulkEmailCampaignSummary
+from constant_contact_api_client.models.campaign_activity_stats_query_result_email import CampaignActivityStatsQueryResultEmail
+from constant_contact_api_client.models.campaign_activity_stats_result_generic_stats_email_activity import CampaignActivityStatsResultGenericStatsEmailActivity
+from constant_contact_api_client.models.campaign_activity_summary import CampaignActivitySummary
+from constant_contact_api_client.models.campaign_stats_query_result_email import CampaignStatsQueryResultEmail
+from constant_contact_api_client.models.campaign_stats_result_generic_stats_email_percents_email import CampaignStatsResultGenericStatsEmailPercentsEmail
+from constant_contact_api_client.models.clicks_tracking_activities_page import ClicksTrackingActivitiesPage
+from constant_contact_api_client.models.clicks_tracking_activity import ClicksTrackingActivity
+from constant_contact_api_client.models.company_logo import CompanyLogo
+from constant_contact_api_client.models.contact_campaign_activities_summary import ContactCampaignActivitiesSummary
+from constant_contact_api_client.models.contact_create_or_update_input import ContactCreateOrUpdateInput
+from constant_contact_api_client.models.contact_create_or_update_response import ContactCreateOrUpdateResponse
+from constant_contact_api_client.models.contact_custom_field import ContactCustomField
+from constant_contact_api_client.models.contact_delete import ContactDelete
+from constant_contact_api_client.models.contact_list import ContactList
+from constant_contact_api_client.models.contact_list_array import ContactListArray
+from constant_contact_api_client.models.contact_list_put_post import ContactListPutPost
+from constant_contact_api_client.models.contact_open_and_click_rates import ContactOpenAndClickRates
+from constant_contact_api_client.models.contact_post_request import ContactPostRequest
+from constant_contact_api_client.models.contact_put_request import ContactPutRequest
+from constant_contact_api_client.models.contact_resource import ContactResource
+from constant_contact_api_client.models.contact_tracking_activities_page import ContactTrackingActivitiesPage
+from constant_contact_api_client.models.contact_tracking_activity import ContactTrackingActivity
+from constant_contact_api_client.models.contact_xref import ContactXref
+from constant_contact_api_client.models.contact_xrefs import ContactXrefs
+from constant_contact_api_client.models.contacts import Contacts
+from constant_contact_api_client.models.contacts_counts import ContactsCounts
+from constant_contact_api_client.models.contacts_export import ContactsExport
+from constant_contact_api_client.models.contacts_json_import import ContactsJsonImport
+from constant_contact_api_client.models.create_csv_import_activity201_response import CreateCSVImportActivity201Response
+from constant_contact_api_client.models.create_csv_import_activity201_response_links import CreateCSVImportActivity201ResponseLinks
+from constant_contact_api_client.models.create_csv_import_activity201_response_status import CreateCSVImportActivity201ResponseStatus
+from constant_contact_api_client.models.create_contact_request import CreateContactRequest
+from constant_contact_api_client.models.create_contact_request_email_address import CreateContactRequestEmailAddress
+from constant_contact_api_client.models.create_delete_activity201_response import CreateDeleteActivity201Response
+from constant_contact_api_client.models.create_delete_activity201_response_links import CreateDeleteActivity201ResponseLinks
+from constant_contact_api_client.models.create_delete_activity201_response_links_self import CreateDeleteActivity201ResponseLinksSelf
+from constant_contact_api_client.models.create_delete_activity201_response_status import CreateDeleteActivity201ResponseStatus
+from constant_contact_api_client.models.create_delete_activity_request import CreateDeleteActivityRequest
+from constant_contact_api_client.models.create_email_campaign200_response import CreateEmailCampaign200Response
+from constant_contact_api_client.models.create_email_campaign200_response_campaign_activities_inner import CreateEmailCampaign200ResponseCampaignActivitiesInner
+from constant_contact_api_client.models.create_email_campaign_request import CreateEmailCampaignRequest
+from constant_contact_api_client.models.create_email_campaign_request_email_campaign_activities_inner import CreateEmailCampaignRequestEmailCampaignActivitiesInner
+from constant_contact_api_client.models.create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer import CreateEmailCampaignRequestEmailCampaignActivitiesInnerPhysicalAddressInFooter
+from constant_contact_api_client.models.create_export_activity201_response import CreateExportActivity201Response
+from constant_contact_api_client.models.create_export_activity201_response_status import CreateExportActivity201ResponseStatus
+from constant_contact_api_client.models.create_export_activity_request import CreateExportActivityRequest
+from constant_contact_api_client.models.create_import_json_activity_request import CreateImportJSONActivityRequest
+from constant_contact_api_client.models.create_import_json_activity_request_import_data_inner import CreateImportJSONActivityRequestImportDataInner
+from constant_contact_api_client.models.create_list_add_activity_request import CreateListAddActivityRequest
+from constant_contact_api_client.models.create_list_add_activity_request_exclude import CreateListAddActivityRequestExclude
+from constant_contact_api_client.models.create_list_add_activity_request_source import CreateListAddActivityRequestSource
+from constant_contact_api_client.models.create_list_delete_activity201_response import CreateListDeleteActivity201Response
+from constant_contact_api_client.models.create_list_delete_activity201_response_links import CreateListDeleteActivity201ResponseLinks
+from constant_contact_api_client.models.create_list_delete_activity201_response_links_self import CreateListDeleteActivity201ResponseLinksSelf
+from constant_contact_api_client.models.create_list_delete_activity201_response_status import CreateListDeleteActivity201ResponseStatus
+from constant_contact_api_client.models.create_list_delete_activity_request import CreateListDeleteActivityRequest
+from constant_contact_api_client.models.create_list_remove_activity201_response import CreateListRemoveActivity201Response
+from constant_contact_api_client.models.create_list_remove_activity201_response_status import CreateListRemoveActivity201ResponseStatus
+from constant_contact_api_client.models.create_list_remove_activity_request import CreateListRemoveActivityRequest
+from constant_contact_api_client.models.create_list_remove_activity_request_exclude import CreateListRemoveActivityRequestExclude
+from constant_contact_api_client.models.create_list_remove_activity_request_source import CreateListRemoveActivityRequestSource
+from constant_contact_api_client.models.create_or_update_contact200_response import CreateOrUpdateContact200Response
+from constant_contact_api_client.models.create_or_update_contact_custom_field import CreateOrUpdateContactCustomField
+from constant_contact_api_client.models.create_or_update_contact_request import CreateOrUpdateContactRequest
+from constant_contact_api_client.models.create_or_update_contact_request_custom_fields_inner import CreateOrUpdateContactRequestCustomFieldsInner
+from constant_contact_api_client.models.create_or_update_contact_request_street_address import CreateOrUpdateContactRequestStreetAddress
+from constant_contact_api_client.models.create_resend_email_campaign201_response import CreateResendEmailCampaign201Response
+from constant_contact_api_client.models.create_resend_email_campaign_request import CreateResendEmailCampaignRequest
+from constant_contact_api_client.models.create_segment201_response import CreateSegment201Response
+from constant_contact_api_client.models.create_segment_request import CreateSegmentRequest
+from constant_contact_api_client.models.create_tag_delete_activity_request import CreateTagDeleteActivityRequest
+from constant_contact_api_client.models.create_tag_remove_activity201_response import CreateTagRemoveActivity201Response
+from constant_contact_api_client.models.create_tag_remove_activity201_response_links import CreateTagRemoveActivity201ResponseLinks
+from constant_contact_api_client.models.create_tag_remove_activity201_response_links_results import CreateTagRemoveActivity201ResponseLinksResults
+from constant_contact_api_client.models.create_tag_remove_activity201_response_links_self import CreateTagRemoveActivity201ResponseLinksSelf
+from constant_contact_api_client.models.create_tag_remove_activity201_response_status import CreateTagRemoveActivity201ResponseStatus
+from constant_contact_api_client.models.create_tag_remove_activity_request import CreateTagRemoveActivityRequest
+from constant_contact_api_client.models.create_tag_remove_activity_request_exclude import CreateTagRemoveActivityRequestExclude
+from constant_contact_api_client.models.create_tag_remove_activity_request_source import CreateTagRemoveActivityRequestSource
+from constant_contact_api_client.models.cross_reference import CrossReference
+from constant_contact_api_client.models.cross_reference_response import CrossReferenceResponse
+from constant_contact_api_client.models.custom_field_id100 import CustomFieldId100
+from constant_contact_api_client.models.custom_field_input import CustomFieldInput
+from constant_contact_api_client.models.custom_field_resource import CustomFieldResource
+from constant_contact_api_client.models.custom_fields import CustomFields
+from constant_contact_api_client.models.customer import Customer
+from constant_contact_api_client.models.customer_put import CustomerPut
+from constant_contact_api_client.models.delete_list202_response import DeleteList202Response
+from constant_contact_api_client.models.delete_tag202_response import DeleteTag202Response
+from constant_contact_api_client.models.delete_tag202_response_activity_errors_inner import DeleteTag202ResponseActivityErrorsInner
+from constant_contact_api_client.models.delete_tag202_response_links import DeleteTag202ResponseLinks
+from constant_contact_api_client.models.delete_tag202_response_links_self import DeleteTag202ResponseLinksSelf
+from constant_contact_api_client.models.delete_tag202_response_status import DeleteTag202ResponseStatus
+from constant_contact_api_client.models.device_flow_response import DeviceFlowResponse
+from constant_contact_api_client.models.did_not_opens_tracking_activities_page import DidNotOpensTrackingActivitiesPage
+from constant_contact_api_client.models.did_not_opens_tracking_activity import DidNotOpensTrackingActivity
+from constant_contact_api_client.models.email_address import EmailAddress
+from constant_contact_api_client.models.email_address_post import EmailAddressPost
+from constant_contact_api_client.models.email_address_put import EmailAddressPut
+from constant_contact_api_client.models.email_campaign import EmailCampaign
+from constant_contact_api_client.models.email_campaign_activity import EmailCampaignActivity
+from constant_contact_api_client.models.email_campaign_activity_input import EmailCampaignActivityInput
+from constant_contact_api_client.models.email_campaign_activity_preview import EmailCampaignActivityPreview
+from constant_contact_api_client.models.email_campaign_complete import EmailCampaignComplete
+from constant_contact_api_client.models.email_campaign_name import EmailCampaignName
+from constant_contact_api_client.models.email_campaigns import EmailCampaigns
+from constant_contact_api_client.models.email_link_click_count import EmailLinkClickCount
+from constant_contact_api_client.models.email_links import EmailLinks
+from constant_contact_api_client.models.email_physical_address import EmailPhysicalAddress
+from constant_contact_api_client.models.email_schedule_input import EmailScheduleInput
+from constant_contact_api_client.models.email_test_send_input import EmailTestSendInput
+from constant_contact_api_client.models.emails_link import EmailsLink
+from constant_contact_api_client.models.emails_paging_links import EmailsPagingLinks
+from constant_contact_api_client.models.file_object import FileObject
+from constant_contact_api_client.models.file_status_array_inner import FileStatusArrayInner
+from constant_contact_api_client.models.forwards_tracking_activities_page import ForwardsTrackingActivitiesPage
+from constant_contact_api_client.models.forwards_tracking_activity import ForwardsTrackingActivity
+from constant_contact_api_client.models.get_ab_test_email_campaign200_response import GetABTestEmailCampaign200Response
+from constant_contact_api_client.models.get_account_details200_response import GetAccountDetails200Response
+from constant_contact_api_client.models.get_account_details200_response_company_logo import GetAccountDetails200ResponseCompanyLogo
+from constant_contact_api_client.models.get_account_details200_response_physical_address import GetAccountDetails200ResponsePhysicalAddress
+from constant_contact_api_client.models.get_activity_by_id200_response import GetActivityById200Response
+from constant_contact_api_client.models.get_all_account_email_addresses200_response_inner import GetAllAccountEmailAddresses200ResponseInner
+from constant_contact_api_client.models.get_all_activities200_response import GetAllActivities200Response
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner import GetAllActivities200ResponseActivitiesInner
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links import GetAllActivities200ResponseActivitiesInnerLinks
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links_results import GetAllActivities200ResponseActivitiesInnerLinksResults
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links_self import GetAllActivities200ResponseActivitiesInnerLinksSelf
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_status import GetAllActivities200ResponseActivitiesInnerStatus
+from constant_contact_api_client.models.get_all_activities200_response_links import GetAllActivities200ResponseLinks
+from constant_contact_api_client.models.get_all_activities200_response_links_next import GetAllActivities200ResponseLinksNext
+from constant_contact_api_client.models.get_all_contacts200_response import GetAllContacts200Response
+from constant_contact_api_client.models.get_all_custom_fields200_response import GetAllCustomFields200Response
+from constant_contact_api_client.models.get_all_email_campaigns200_response import GetAllEmailCampaigns200Response
+from constant_contact_api_client.models.get_all_email_campaigns200_response_campaigns_inner import GetAllEmailCampaigns200ResponseCampaignsInner
+from constant_contact_api_client.models.get_all_email_campaigns200_response_links import GetAllEmailCampaigns200ResponseLinks
+from constant_contact_api_client.models.get_all_lists200_response import GetAllLists200Response
+from constant_contact_api_client.models.get_all_segments200_response import GetAllSegments200Response
+from constant_contact_api_client.models.get_all_segments200_response_links import GetAllSegments200ResponseLinks
+from constant_contact_api_client.models.get_all_segments200_response_links_next import GetAllSegments200ResponseLinksNext
+from constant_contact_api_client.models.get_all_segments200_response_segments_inner import GetAllSegments200ResponseSegmentsInner
+from constant_contact_api_client.models.get_all_tags200_response import GetAllTags200Response
+from constant_contact_api_client.models.get_all_tags200_response_links import GetAllTags200ResponseLinks
+from constant_contact_api_client.models.get_all_tags200_response_links_next import GetAllTags200ResponseLinksNext
+from constant_contact_api_client.models.get_all_tags200_response_links_next_next import GetAllTags200ResponseLinksNextNext
+from constant_contact_api_client.models.get_bounces_report200_response import GetBouncesReport200Response
+from constant_contact_api_client.models.get_bounces_report200_response_links import GetBouncesReport200ResponseLinks
+from constant_contact_api_client.models.get_bounces_report200_response_tracking_activities_inner import GetBouncesReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_campaign_activity_link_report200_response import GetCampaignActivityLinkReport200Response
+from constant_contact_api_client.models.get_campaign_activity_link_report200_response_link_click_counts_inner import GetCampaignActivityLinkReport200ResponseLinkClickCountsInner
+from constant_contact_api_client.models.get_clicks_report200_response import GetClicksReport200Response
+from constant_contact_api_client.models.get_clicks_report200_response_links import GetClicksReport200ResponseLinks
+from constant_contact_api_client.models.get_clicks_report200_response_tracking_activities_inner import GetClicksReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_contact_adds200_response import GetContactAdds200Response
+from constant_contact_api_client.models.get_contact_adds200_response_tracking_activities_inner import GetContactAdds200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_contact_by_id200_response import GetContactById200Response
+from constant_contact_api_client.models.get_contact_by_id200_response_custom_fields_inner import GetContactById200ResponseCustomFieldsInner
+from constant_contact_api_client.models.get_contact_by_id200_response_email_address import GetContactById200ResponseEmailAddress
+from constant_contact_api_client.models.get_contact_by_id200_response_notes_inner import GetContactById200ResponseNotesInner
+from constant_contact_api_client.models.get_contact_by_id200_response_phone_numbers_inner import GetContactById200ResponsePhoneNumbersInner
+from constant_contact_api_client.models.get_contact_by_id200_response_sms_channel import GetContactById200ResponseSmsChannel
+from constant_contact_api_client.models.get_contact_by_id200_response_sms_channel_sms_channel_consents_inner import GetContactById200ResponseSmsChannelSmsChannelConsentsInner
+from constant_contact_api_client.models.get_contact_by_id200_response_street_addresses_inner import GetContactById200ResponseStreetAddressesInner
+from constant_contact_api_client.models.get_contact_counts200_response import GetContactCounts200Response
+from constant_contact_api_client.models.get_contact_id_xrefs200_response import GetContactIdXrefs200Response
+from constant_contact_api_client.models.get_contact_id_xrefs200_response_xrefs_inner import GetContactIdXrefs200ResponseXrefsInner
+from constant_contact_api_client.models.get_contact_open_click_rate_report200_response import GetContactOpenClickRateReport200Response
+from constant_contact_api_client.models.get_contact_tracking_count_report200_response import GetContactTrackingCountReport200Response
+from constant_contact_api_client.models.get_contact_tracking_count_report200_response_campaign_activities_inner import GetContactTrackingCountReport200ResponseCampaignActivitiesInner
+from constant_contact_api_client.models.get_contact_tracking_count_report200_response_links import GetContactTrackingCountReport200ResponseLinks
+from constant_contact_api_client.models.get_contact_tracking_report200_response import GetContactTrackingReport200Response
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links import GetContactTrackingReport200ResponseLinks
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links_next import GetContactTrackingReport200ResponseLinksNext
+from constant_contact_api_client.models.get_contact_tracking_report200_response_tracking_activities_inner import GetContactTrackingReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_custom_field200_response import GetCustomField200Response
+from constant_contact_api_client.models.get_did_not_opens_report200_response import GetDidNotOpensReport200Response
+from constant_contact_api_client.models.get_did_not_opens_report200_response_tracking_activities_inner import GetDidNotOpensReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_email_campaign_activity200_response import GetEmailCampaignActivity200Response
+from constant_contact_api_client.models.get_email_campaign_activity200_response_document_properties import GetEmailCampaignActivity200ResponseDocumentProperties
+from constant_contact_api_client.models.get_email_campaign_activity200_response_physical_address_in_footer import GetEmailCampaignActivity200ResponsePhysicalAddressInFooter
+from constant_contact_api_client.models.get_email_campaign_activity_preview200_response import GetEmailCampaignActivityPreview200Response
+from constant_contact_api_client.models.get_email_campaign_activity_report200_response import GetEmailCampaignActivityReport200Response
+from constant_contact_api_client.models.get_email_campaign_activity_report200_response_results_inner import GetEmailCampaignActivityReport200ResponseResultsInner
+from constant_contact_api_client.models.get_email_campaign_activity_report200_response_results_inner_stats import GetEmailCampaignActivityReport200ResponseResultsInnerStats
+from constant_contact_api_client.models.get_email_campaign_activity_schedule200_response_inner import GetEmailCampaignActivitySchedule200ResponseInner
+from constant_contact_api_client.models.get_email_campaign_activity_send_history200_response_inner import GetEmailCampaignActivitySendHistory200ResponseInner
+from constant_contact_api_client.models.get_email_campaign_report200_response import GetEmailCampaignReport200Response
+from constant_contact_api_client.models.get_email_campaign_report200_response_aggregate_percents import GetEmailCampaignReport200ResponseAggregatePercents
+from constant_contact_api_client.models.get_email_campaign_report200_response_bulk_email_campaign_summaries_inner import GetEmailCampaignReport200ResponseBulkEmailCampaignSummariesInner
+from constant_contact_api_client.models.get_email_campaign_report200_response_bulk_email_campaign_summaries_inner_unique_counts import GetEmailCampaignReport200ResponseBulkEmailCampaignSummariesInnerUniqueCounts
+from constant_contact_api_client.models.get_email_campaign_xrefs200_response import GetEmailCampaignXrefs200Response
+from constant_contact_api_client.models.get_email_campaign_xrefs200_response_xrefs_inner import GetEmailCampaignXrefs200ResponseXrefsInner
+from constant_contact_api_client.models.get_email_opens_report200_response import GetEmailOpensReport200Response
+from constant_contact_api_client.models.get_email_opens_report200_response_tracking_activities_inner import GetEmailOpensReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_email_sends_report200_response import GetEmailSendsReport200Response
+from constant_contact_api_client.models.get_email_sends_report200_response_links import GetEmailSendsReport200ResponseLinks
+from constant_contact_api_client.models.get_email_sends_report200_response_tracking_activities_inner import GetEmailSendsReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_email_stats_report200_response import GetEmailStatsReport200Response
+from constant_contact_api_client.models.get_email_stats_report200_response_errors_inner import GetEmailStatsReport200ResponseErrorsInner
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner import GetEmailStatsReport200ResponseResultsInner
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner_percents import GetEmailStatsReport200ResponseResultsInnerPercents
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner_stats import GetEmailStatsReport200ResponseResultsInnerStats
+from constant_contact_api_client.models.get_forwards_report200_response import GetForwardsReport200Response
+from constant_contact_api_client.models.get_forwards_report200_response_tracking_activities_inner import GetForwardsReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_list200_response import GetList200Response
+from constant_contact_api_client.models.get_list_id_xrefs200_response import GetListIdXrefs200Response
+from constant_contact_api_client.models.get_list_id_xrefs200_response_xrefs_inner import GetListIdXrefs200ResponseXrefsInner
+from constant_contact_api_client.models.get_optouts_report200_response import GetOptoutsReport200Response
+from constant_contact_api_client.models.get_optouts_report200_response_tracking_activities_inner import GetOptoutsReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_resend_email_campaign200_response_inner import GetResendEmailCampaign200ResponseInner
+from constant_contact_api_client.models.get_sms_engagement_history200_response_inner import GetSmsEngagementHistory200ResponseInner
+from constant_contact_api_client.models.get_sms_engagement_history200_response_inner_history_details import GetSmsEngagementHistory200ResponseInnerHistoryDetails
+from constant_contact_api_client.models.get_tag200_response import GetTag200Response
+from constant_contact_api_client.models.get_unique_contact_clicks200_response import GetUniqueContactClicks200Response
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links_next import GetUniqueContactClicks200ResponseLinksNext
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner import GetUniqueContactClicks200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+from constant_contact_api_client.models.get_unique_contact_opens200_response import GetUniqueContactOpens200Response
+from constant_contact_api_client.models.get_unique_contact_opens200_response_tracking_activities_inner import GetUniqueContactOpens200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_unique_contact_sms_opt_ins200_response import GetUniqueContactSMSOptIns200Response
+from constant_contact_api_client.models.get_unique_contact_sms_opt_ins200_response_tracking_activities_inner import GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_unique_contact_updates200_response import GetUniqueContactUpdates200Response
+from constant_contact_api_client.models.get_unique_contact_updates200_response_tracking_activities_inner import GetUniqueContactUpdates200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_user_privileges200_response_inner import GetUserPrivileges200ResponseInner
+from constant_contact_api_client.models.headers_object import HeadersObject
+from constant_contact_api_client.models.history_details import HistoryDetails
+from constant_contact_api_client.models.json_import_contact import JsonImportContact
+from constant_contact_api_client.models.link import Link
+from constant_contact_api_client.models.links import Links
+from constant_contact_api_client.models.list_activity_add_contacts import ListActivityAddContacts
+from constant_contact_api_client.models.list_activity_remove_contacts import ListActivityRemoveContacts
+from constant_contact_api_client.models.list_id_list100 import ListIdList100
+from constant_contact_api_client.models.list_input import ListInput
+from constant_contact_api_client.models.list_xref import ListXref
+from constant_contact_api_client.models.list_xrefs import ListXrefs
+from constant_contact_api_client.models.lpreporting_links import LpreportingLinks
+from constant_contact_api_client.models.lpreporting_next import LpreportingNext
+from constant_contact_api_client.models.my_library_file_collection_inner import MyLibraryFileCollectionInner
+from constant_contact_api_client.models.my_library_file_collection_inner_thumbnail import MyLibraryFileCollectionInnerThumbnail
+from constant_contact_api_client.models.next import Next
+from constant_contact_api_client.models.note import Note
+from constant_contact_api_client.models.o_auth_error import OAuthError
+from constant_contact_api_client.models.opens_tracking_activities_page import OpensTrackingActivitiesPage
+from constant_contact_api_client.models.opens_tracking_activity import OpensTrackingActivity
+from constant_contact_api_client.models.optouts_tracking_activities_page import OptoutsTrackingActivitiesPage
+from constant_contact_api_client.models.optouts_tracking_activity import OptoutsTrackingActivity
+from constant_contact_api_client.models.p_contact_add_tracking_activities_page import PContactAddTrackingActivitiesPage
+from constant_contact_api_client.models.p_contact_add_tracking_activity import PContactAddTrackingActivity
+from constant_contact_api_client.models.p_contact_click_tracking_activities_page import PContactClickTrackingActivitiesPage
+from constant_contact_api_client.models.p_contact_click_tracking_activity import PContactClickTrackingActivity
+from constant_contact_api_client.models.p_contact_open_tracking_activity import PContactOpenTrackingActivity
+from constant_contact_api_client.models.p_contact_opens_tracking_activities_page import PContactOpensTrackingActivitiesPage
+from constant_contact_api_client.models.p_contact_sms_opt_in_tracking_activities_page import PContactSMSOptInTrackingActivitiesPage
+from constant_contact_api_client.models.p_contact_sms_opt_in_tracking_activity import PContactSMSOptInTrackingActivity
+from constant_contact_api_client.models.p_contact_update_tracking_activities_page import PContactUpdateTrackingActivitiesPage
+from constant_contact_api_client.models.p_contact_update_tracking_activity import PContactUpdateTrackingActivity
+from constant_contact_api_client.models.paged_email_campaign_response import PagedEmailCampaignResponse
+from constant_contact_api_client.models.pagination_links import PaginationLinks
+from constant_contact_api_client.models.pagination_links_next import PaginationLinksNext
+from constant_contact_api_client.models.paging_links import PagingLinks
+from constant_contact_api_client.models.partner_account import PartnerAccount
+from constant_contact_api_client.models.partner_account_links import PartnerAccountLinks
+from constant_contact_api_client.models.partner_account_operations_request import PartnerAccountOperationsRequest
+from constant_contact_api_client.models.partner_account_operations_request_account_operation_headers_inner import PartnerAccountOperationsRequestAccountOperationHeadersInner
+from constant_contact_api_client.models.partner_account_operations_request_account_operation_path_parameters_inner import PartnerAccountOperationsRequestAccountOperationPathParametersInner
+from constant_contact_api_client.models.partner_account_operations_request_account_operation_query_parameters_inner import PartnerAccountOperationsRequestAccountOperationQueryParametersInner
+from constant_contact_api_client.models.partner_account_site_owner_list_inner import PartnerAccountSiteOwnerListInner
+from constant_contact_api_client.models.partners_link import PartnersLink
+from constant_contact_api_client.models.patch_email_campaign_name_request import PatchEmailCampaignNameRequest
+from constant_contact_api_client.models.path_param_object import PathParamObject
+from constant_contact_api_client.models.percents_email import PercentsEmail
+from constant_contact_api_client.models.phone_number import PhoneNumber
+from constant_contact_api_client.models.phone_number_put import PhoneNumberPut
+from constant_contact_api_client.models.plan_info import PlanInfo
+from constant_contact_api_client.models.plan_tiers_object import PlanTiersObject
+from constant_contact_api_client.models.plan_tiers_object_current_tiers_inner import PlanTiersObjectCurrentTiersInner
+from constant_contact_api_client.models.post_custom_field_delete201_response import PostCustomFieldDelete201Response
+from constant_contact_api_client.models.post_custom_field_delete_request import PostCustomFieldDeleteRequest
+from constant_contact_api_client.models.post_tag_request import PostTagRequest
+from constant_contact_api_client.models.provision import Provision
+from constant_contact_api_client.models.provision_response import ProvisionResponse
+from constant_contact_api_client.models.put_tag_request import PutTagRequest
+from constant_contact_api_client.models.query_param_object import QueryParamObject
+from constant_contact_api_client.models.reporting_links import ReportingLinks
+from constant_contact_api_client.models.reporting_next import ReportingNext
+from constant_contact_api_client.models.resend_to_non_openers_input import ResendToNonOpenersInput
+from constant_contact_api_client.models.resend_to_non_openers_object import ResendToNonOpenersObject
+from constant_contact_api_client.models.sso_user import SSOUser
+from constant_contact_api_client.models.schedule_email_campaign_activity_request import ScheduleEmailCampaignActivityRequest
+from constant_contact_api_client.models.segment_data import SegmentData
+from constant_contact_api_client.models.segment_detail import SegmentDetail
+from constant_contact_api_client.models.segment_master import SegmentMaster
+from constant_contact_api_client.models.segment_name import SegmentName
+from constant_contact_api_client.models.segments_dto import SegmentsDTO
+from constant_contact_api_client.models.sends_tracking_activities_page import SendsTrackingActivitiesPage
+from constant_contact_api_client.models.sends_tracking_activity import SendsTrackingActivity
+from constant_contact_api_client.models.sms_channel_consent_details import SmsChannelConsentDetails
+from constant_contact_api_client.models.stats_email import StatsEmail
+from constant_contact_api_client.models.stats_email_activity import StatsEmailActivity
+from constant_contact_api_client.models.stats_error import StatsError
+from constant_contact_api_client.models.street_address import StreetAddress
+from constant_contact_api_client.models.street_address_put import StreetAddressPut
+from constant_contact_api_client.models.tag import Tag
+from constant_contact_api_client.models.tag_add_remove_contacts import TagAddRemoveContacts
+from constant_contact_api_client.models.tag_id_list500_limit import TagIdList500Limit
+from constant_contact_api_client.models.tag_post import TagPost
+from constant_contact_api_client.models.tag_put import TagPut
+from constant_contact_api_client.models.tags import Tags
+from constant_contact_api_client.models.tags_activity_links import TagsActivityLinks
+from constant_contact_api_client.models.tags_links import TagsLinks
+from constant_contact_api_client.models.tags_paging_links import TagsPagingLinks
+from constant_contact_api_client.models.test_send_email_campaign_activity_request import TestSendEmailCampaignActivityRequest
+from constant_contact_api_client.models.tier_object import TierObject
+from constant_contact_api_client.models.tracking_activity_sms_channel_dto import TrackingActivitySmsChannelDTO
+from constant_contact_api_client.models.unique_email_counts import UniqueEmailCounts
+from constant_contact_api_client.models.update_account_request import UpdateAccountRequest
+from constant_contact_api_client.models.update_contact_request import UpdateContactRequest
+from constant_contact_api_client.models.update_contact_request_email_address import UpdateContactRequestEmailAddress
+from constant_contact_api_client.models.update_contact_request_phone_numbers_inner import UpdateContactRequestPhoneNumbersInner
+from constant_contact_api_client.models.update_contact_request_street_addresses_inner import UpdateContactRequestStreetAddressesInner
+from constant_contact_api_client.models.update_custom_field_request import UpdateCustomFieldRequest
+from constant_contact_api_client.models.update_list200_response import UpdateList200Response
+from constant_contact_api_client.models.update_list_request import UpdateListRequest
+from constant_contact_api_client.models.update_segment_name_request import UpdateSegmentNameRequest
+from constant_contact_api_client.models.webhooks_subscription_body import WebhooksSubscriptionBody
+from constant_contact_api_client.models.webhooks_subscription_collection_inner import WebhooksSubscriptionCollectionInner
+from constant_contact_api_client.models.webhooks_subscription_put_resp import WebhooksSubscriptionPutResp
+from constant_contact_api_client.models.webhooks_subscription_response import WebhooksSubscriptionResponse
+from constant_contact_api_client.models.webhooks_test_send import WebhooksTestSend
diff --git a/constant_contact_api_client/models/ab_test_data.py b/constant_contact_api_client/models/ab_test_data.py
new file mode 100644
index 0000000..0584c08
--- /dev/null
+++ b/constant_contact_api_client/models/ab_test_data.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ABTestData(BaseModel):
+ """
+ ABTestData
+ """ # noqa: E501
+ alternative_subject: StrictStr = Field(description="The alternate email subject line to use for A/B testing.")
+ test_size: StrictInt = Field(description="The percentage of contact recipients to participate in the A/B Test. For example, if the value is 30, then 30% of contacts will receive the email campaign with subject line A, and 30% of contacts will receive the email campaign with subject line B. Valid values include 5
to 50
percent. Currently, A/B tests support subject line only.")
+ winner_wait_duration: StrictInt = Field(description="The number of hours Constant Contact waits after the A/B test is sent before determining the winning subject line. The winner is the subject line with the highest number of contact opens. Valid values include 6
, 12
, 24
, and 48
. After the winner is determined, Constant Contact automatically sends the email campaign with the winning subject line to all the remaining contacts, which did not participate in the A/B test.")
+ __properties: ClassVar[List[str]] = ["alternative_subject", "test_size", "winner_wait_duration"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ABTestData from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ABTestData from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "alternative_subject": obj.get("alternative_subject"),
+ "test_size": obj.get("test_size"),
+ "winner_wait_duration": obj.get("winner_wait_duration")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/access_token_response.py b/constant_contact_api_client/models/access_token_response.py
new file mode 100644
index 0000000..96b4d25
--- /dev/null
+++ b/constant_contact_api_client/models/access_token_response.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class AccessTokenResponse(BaseModel):
+ """
+ AccessTokenResponse
+ """ # noqa: E501
+ access_token: Optional[StrictStr] = Field(default=None, description="A JWT bearer access token that can be used to access the public API.")
+ token_type: Optional[StrictStr] = Field(default=None, description="The type of token.")
+ expires_in: Optional[StrictInt] = Field(default=None, description="Timestamp that the token will expire in seconds after the UNIX epoch.")
+ scope: Optional[StrictStr] = Field(default=None, description="Space delimited list of scopes granted to the access token.")
+ refresh_token: Optional[StrictStr] = Field(default=None, description="Contains a token you can use to refresh the bearer access token.")
+ id_token: Optional[StrictStr] = Field(default=None, description="A JWT token that contains information about user authentication.")
+ __properties: ClassVar[List[str]] = ["access_token", "token_type", "expires_in", "scope", "refresh_token", "id_token"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of AccessTokenResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of AccessTokenResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "access_token": obj.get("access_token"),
+ "token_type": obj.get("token_type"),
+ "expires_in": obj.get("expires_in"),
+ "scope": obj.get("scope"),
+ "refresh_token": obj.get("refresh_token"),
+ "id_token": obj.get("id_token")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/account_cancellation.py b/constant_contact_api_client/models/account_cancellation.py
new file mode 100644
index 0000000..e63dee2
--- /dev/null
+++ b/constant_contact_api_client/models/account_cancellation.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class AccountCancellation(BaseModel):
+ """
+ Specifies the date and time a client requests to cancel their Constant Contact account and changes the account `billing_status` to `Canceled`. By default, this is the current date and time in ISO format. In the request body, you can optionally specify a future cancellation date (in ISO format) and a reason (`reason_code`) that the client wants to cancel their account.
+ """ # noqa: E501
+ reason_id: Optional[StrictInt] = Field(default=None, description="Specifies the reason that the client is canceling their Constant Contact account as follows: 1
Cost Too High2
Using A Competitive Service3
Not Doing Email Marketing11
Something Missing Or Not Working 12
Doing It In-House14
Poor Results21
Too Difficult To Use27
Canceled Online by Customer30
Dissatisfied With Billing PoliciesCONFIRMED
status to create an email campaign. ")
+ __properties: ClassVar[List[str]] = ["email_address", "email_id", "confirm_status"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of AccountEmailCreateResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of AccountEmailCreateResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_address": obj.get("email_address"),
+ "email_id": obj.get("email_id"),
+ "confirm_status": obj.get("confirm_status")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/account_email_input.py b/constant_contact_api_client/models/account_email_input.py
new file mode 100644
index 0000000..4b2ba70
--- /dev/null
+++ b/constant_contact_api_client/models/account_email_input.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class AccountEmailInput(BaseModel):
+ """
+ AccountEmailInput
+ """ # noqa: E501
+ email_address: Optional[Annotated[str, Field(strict=True, max_length=80)]] = Field(default=None, description="The new email address you want to add to a Constant Contact account.")
+ __properties: ClassVar[List[str]] = ["email_address"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of AccountEmailInput from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of AccountEmailInput from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_address": obj.get("email_address")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/account_physical_address.py b/constant_contact_api_client/models/account_physical_address.py
new file mode 100644
index 0000000..36ba977
--- /dev/null
+++ b/constant_contact_api_client/models/account_physical_address.py
@@ -0,0 +1,105 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class AccountPhysicalAddress(BaseModel):
+ """
+ AccountPhysicalAddress
+ """ # noqa: E501
+ address_line1: Annotated[str, Field(min_length=1, strict=True, max_length=80)] = Field(description="Line 1 of the organization's street address.")
+ address_line2: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=80)]] = Field(default=None, description="Line 2 of the organization's street address.")
+ address_line3: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=80)]] = Field(default=None, description="Line 3 of the organization's street address.")
+ city: StrictStr = Field(description="The city where the organization is located.")
+ state_code: Optional[Annotated[str, Field(strict=True, max_length=2)]] = Field(default=None, description="The two letter ISO 3166-1 code for the organization's state and only used if the country_code
is US
or CA
. If not, exclude this property from the request body.")
+ state_name: Optional[StrictStr] = Field(default=None, description="Use if the state where the organization is physically located is not in the United States or Canada. If country_code
is US
or CA
, exclude this property from the request body.")
+ postal_code: Optional[StrictStr] = Field(default=None, description="The postal code address (ZIP code) of the organization. This property is required if the state_code
is US
or CA
, otherwise exclude this property from the request body.")
+ country_code: StrictStr = Field(description="The two letter ISO 3166-1 code for the organization's country.")
+ __properties: ClassVar[List[str]] = ["address_line1", "address_line2", "address_line3", "city", "state_code", "state_name", "postal_code", "country_code"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of AccountPhysicalAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of AccountPhysicalAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "address_line1": obj.get("address_line1"),
+ "address_line2": obj.get("address_line2"),
+ "address_line3": obj.get("address_line3"),
+ "city": obj.get("city"),
+ "state_code": obj.get("state_code"),
+ "state_name": obj.get("state_name"),
+ "postal_code": obj.get("postal_code"),
+ "country_code": obj.get("country_code")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/account_suspension.py b/constant_contact_api_client/models/account_suspension.py
new file mode 100644
index 0000000..723adca
--- /dev/null
+++ b/constant_contact_api_client/models/account_suspension.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class AccountSuspension(BaseModel):
+ """
+ AccountSuspension
+ """ # noqa: E501
+ suspend_plan_id: StrictInt = Field(description="Suspended plan group id.")
+ suspend_plan_group_id: StrictInt = Field(description="The suspended plan group id.")
+ suspend_date: Optional[datetime] = Field(default=None, description="The date when the customer will start being suspended. If omitted defaults to the current date and time and suspends the account at the next billing cycle.")
+ suspend_reason_id: Optional[StrictInt] = Field(default=None, description="The reason the customer is suspended.")
+ suspend_subreason_id: Optional[StrictInt] = Field(default=None, description="The subreason why the customer is suspended.")
+ suspend_comment: Optional[StrictStr] = Field(default=None, description="Comment field for user suspension.")
+ suspend_estimated_reactivation_date: Optional[datetime] = Field(default=None, description="Estimated date when the customer will be reactivated.")
+ __properties: ClassVar[List[str]] = ["suspend_plan_id", "suspend_plan_group_id", "suspend_date", "suspend_reason_id", "suspend_subreason_id", "suspend_comment", "suspend_estimated_reactivation_date"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of AccountSuspension from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of AccountSuspension from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "suspend_plan_id": obj.get("suspend_plan_id"),
+ "suspend_plan_group_id": obj.get("suspend_plan_group_id"),
+ "suspend_date": obj.get("suspend_date"),
+ "suspend_reason_id": obj.get("suspend_reason_id"),
+ "suspend_subreason_id": obj.get("suspend_subreason_id"),
+ "suspend_comment": obj.get("suspend_comment"),
+ "suspend_estimated_reactivation_date": obj.get("suspend_estimated_reactivation_date")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/activities.py b/constant_contact_api_client/models/activities.py
new file mode 100644
index 0000000..c11dab3
--- /dev/null
+++ b/constant_contact_api_client/models/activities.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner import GetAllActivities200ResponseActivitiesInner
+from constant_contact_api_client.models.get_all_activities200_response_links import GetAllActivities200ResponseLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Activities(BaseModel):
+ """
+ Activities
+ """ # noqa: E501
+ activities: Optional[List[GetAllActivities200ResponseActivitiesInner]] = Field(default=None, description="A list of bulk activity jobs and status submitted by the account over the past 10 days.")
+ links: Optional[GetAllActivities200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Activities from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in activities (list)
+ _items = []
+ if self.activities:
+ for _item in self.activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Activities from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "activities": [GetAllActivities200ResponseActivitiesInner.from_dict(_item) for _item in obj.get("activities")] if obj.get("activities") is not None else None,
+ "_links": GetAllActivities200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/activity.py b/constant_contact_api_client/models/activity.py
new file mode 100644
index 0000000..e3696f0
--- /dev/null
+++ b/constant_contact_api_client/models/activity.py
@@ -0,0 +1,132 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links import GetAllActivities200ResponseActivitiesInnerLinks
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_status import GetAllActivities200ResponseActivitiesInnerStatus
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Activity(BaseModel):
+ """
+ Generic bulk activity status response object
+ """ # noqa: E501
+ activity_id: Optional[StrictStr] = Field(default=None, description="Unique ID for the activity.")
+ state: Optional[StrictStr] = Field(default=None, description="The state of the request: The state of the request:
primary_email
contains the complete email content.primary_email
content without any personalized email information. For example, permalinks do not contain any of the contact details that you add to the primary_email
email content. primary_email
and a permalink
role campaign activity when you create an email campaign. ")
+ __properties: ClassVar[List[str]] = ["campaign_activity_id", "role"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ActivityReference from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ActivityReference from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "role": obj.get("role")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/activity_status.py b/constant_contact_api_client/models/activity_status.py
new file mode 100644
index 0000000..5249ae3
--- /dev/null
+++ b/constant_contact_api_client/models/activity_status.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ActivityStatus(BaseModel):
+ """
+ ActivityStatus
+ """ # noqa: E501
+ items_total_count: Optional[StrictInt] = Field(default=None, description="The total number of items to be processed.")
+ items_completed_count: Optional[StrictInt] = Field(default=None, description="The number of items processed in the activity request.")
+ person_count: Optional[StrictInt] = Field(default=None, description="The total number of contacts in an import contacts request.")
+ error_count: Optional[StrictInt] = Field(default=None, description="The number of non-correctable errors encountered during an import contacts request.")
+ correctable_count: Optional[StrictInt] = Field(default=None, description="The number of correctable errors. Correctable errors include invalid email address format, birthday or anniversary format error, or does not have minimal contact information (no name or email address). Correctable errors are available in the product UI to correct.")
+ cannot_add_to_list_count: Optional[StrictInt] = Field(default=None, description="The number of contacts that cannot be added to a list because they were previously unsubscribed, valid for contacts_file_ or json_import requests.")
+ list_count: Optional[StrictInt] = Field(default=None, description="The number of lists processed in an add or remove list membership activity request.")
+ __properties: ClassVar[List[str]] = ["items_total_count", "items_completed_count", "person_count", "error_count", "correctable_count", "cannot_add_to_list_count", "list_count"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ActivityStatus from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "items_total_count",
+ "items_completed_count",
+ "person_count",
+ "error_count",
+ "list_count",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ActivityStatus from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items_total_count": obj.get("items_total_count"),
+ "items_completed_count": obj.get("items_completed_count"),
+ "person_count": obj.get("person_count"),
+ "error_count": obj.get("error_count"),
+ "correctable_count": obj.get("correctable_count"),
+ "cannot_add_to_list_count": obj.get("cannot_add_to_list_count"),
+ "list_count": obj.get("list_count")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/activity_status_export_link.py b/constant_contact_api_client/models/activity_status_export_link.py
new file mode 100644
index 0000000..d3d1bb0
--- /dev/null
+++ b/constant_contact_api_client/models/activity_status_export_link.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links_results import GetAllActivities200ResponseActivitiesInnerLinksResults
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links_self import GetAllActivities200ResponseActivitiesInnerLinksSelf
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ActivityStatusExportLink(BaseModel):
+ """
+ ActivityStatusExportLink
+ """ # noqa: E501
+ var_self: Optional[GetAllActivities200ResponseActivitiesInnerLinksSelf] = Field(default=None, alias="self")
+ results: Optional[GetAllActivities200ResponseActivitiesInnerLinksResults] = None
+ __properties: ClassVar[List[str]] = ["self", "results"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ActivityStatusExportLink from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of var_self
+ if self.var_self:
+ _dict['self'] = self.var_self.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of results
+ if self.results:
+ _dict['results'] = self.results.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ActivityStatusExportLink from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "self": GetAllActivities200ResponseActivitiesInnerLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None,
+ "results": GetAllActivities200ResponseActivitiesInnerLinksResults.from_dict(obj.get("results")) if obj.get("results") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/activity_status_link.py b/constant_contact_api_client/models/activity_status_link.py
new file mode 100644
index 0000000..4cf9c15
--- /dev/null
+++ b/constant_contact_api_client/models/activity_status_link.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links_self import GetAllActivities200ResponseActivitiesInnerLinksSelf
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ActivityStatusLink(BaseModel):
+ """
+ ActivityStatusLink
+ """ # noqa: E501
+ var_self: Optional[GetAllActivities200ResponseActivitiesInnerLinksSelf] = Field(default=None, alias="self")
+ __properties: ClassVar[List[str]] = ["self"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ActivityStatusLink from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of var_self
+ if self.var_self:
+ _dict['self'] = self.var_self.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ActivityStatusLink from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "self": GetAllActivities200ResponseActivitiesInnerLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/activity_tagging.py b/constant_contact_api_client/models/activity_tagging.py
new file mode 100644
index 0000000..6d8ee9e
--- /dev/null
+++ b/constant_contact_api_client/models/activity_tagging.py
@@ -0,0 +1,132 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.create_tag_remove_activity201_response_links import CreateTagRemoveActivity201ResponseLinks
+from constant_contact_api_client.models.create_tag_remove_activity201_response_status import CreateTagRemoveActivity201ResponseStatus
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ActivityTagging(BaseModel):
+ """
+ ActivityTagging
+ """ # noqa: E501
+ activity_id: StrictStr = Field(description="The system assigned UUID that uniquely identifies an activity.")
+ state: StrictStr = Field(description="The activity processing state.")
+ started_at: Optional[datetime] = Field(default=None, description="Timestamp showing when processing started for the activity, in ISO-8601 format.")
+ completed_at: Optional[datetime] = Field(default=None, description="Timestamp showing when processing completed for the activity, in ISO-8601 format.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp showing when the activity was first requested, in ISO-8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp showing when the activity was last updated, in ISO-8601 format.")
+ percent_done: Optional[StrictInt] = Field(default=None, description="The processing percent complete for the activity.")
+ activity_errors: Optional[List[StrictStr]] = Field(default=None, description="An array of error message strings describing the errors that occurred.")
+ status: Optional[CreateTagRemoveActivity201ResponseStatus] = None
+ links: Optional[CreateTagRemoveActivity201ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["activity_id", "state", "started_at", "completed_at", "created_at", "updated_at", "percent_done", "activity_errors", "status", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ActivityTagging from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "activity_id",
+ "state",
+ "started_at",
+ "completed_at",
+ "created_at",
+ "updated_at",
+ "percent_done",
+ "activity_errors",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of status
+ if self.status:
+ _dict['status'] = self.status.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ActivityTagging from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "activity_id": obj.get("activity_id"),
+ "state": obj.get("state"),
+ "started_at": obj.get("started_at"),
+ "completed_at": obj.get("completed_at"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "percent_done": obj.get("percent_done"),
+ "activity_errors": obj.get("activity_errors"),
+ "status": CreateTagRemoveActivity201ResponseStatus.from_dict(obj.get("status")) if obj.get("status") is not None else None,
+ "_links": CreateTagRemoveActivity201ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/activity_tagging_status.py b/constant_contact_api_client/models/activity_tagging_status.py
new file mode 100644
index 0000000..c352b48
--- /dev/null
+++ b/constant_contact_api_client/models/activity_tagging_status.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ActivityTaggingStatus(BaseModel):
+ """
+ Provides the status for the requested activity.
+ """ # noqa: E501
+ items_total_count: Optional[StrictInt] = Field(default=None, description="The total number of items processed for the requested activity.")
+ items_completed_count: Optional[StrictInt] = Field(default=None, description="The total number of items for which processing completed for the requested activity.")
+ __properties: ClassVar[List[str]] = ["items_total_count", "items_completed_count"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ActivityTaggingStatus from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ActivityTaggingStatus from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items_total_count": obj.get("items_total_count"),
+ "items_completed_count": obj.get("items_completed_count")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/add_account_email_address201_response.py b/constant_contact_api_client/models/add_account_email_address201_response.py
new file mode 100644
index 0000000..f7a4005
--- /dev/null
+++ b/constant_contact_api_client/models/add_account_email_address201_response.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class AddAccountEmailAddress201Response(BaseModel):
+ """
+ AddAccountEmailAddress201Response
+ """ # noqa: E501
+ email_address: Optional[Annotated[str, Field(strict=True, max_length=80)]] = Field(default=None, description="An email address associated with a Constant Contact account owner.")
+ email_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="The unique ID for an email address in a Constant Contact account.")
+ confirm_status: Optional[StrictStr] = Field(default=None, description="The confirmation status of the account email address. When you add a new email address to an account, Constant Contact automatically sends an email to that address with a link to confirm it. You can use any account email address with a CONFIRMED
status to create an email campaign. ")
+ __properties: ClassVar[List[str]] = ["email_address", "email_id", "confirm_status"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of AddAccountEmailAddress201Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of AddAccountEmailAddress201Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_address": obj.get("email_address"),
+ "email_id": obj.get("email_id"),
+ "confirm_status": obj.get("confirm_status")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/add_account_email_address_request.py b/constant_contact_api_client/models/add_account_email_address_request.py
new file mode 100644
index 0000000..38a42a7
--- /dev/null
+++ b/constant_contact_api_client/models/add_account_email_address_request.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class AddAccountEmailAddressRequest(BaseModel):
+ """
+ AddAccountEmailAddressRequest
+ """ # noqa: E501
+ email_address: Optional[Annotated[str, Field(strict=True, max_length=80)]] = Field(default=None, description="The new email address you want to add to a Constant Contact account.")
+ __properties: ClassVar[List[str]] = ["email_address"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of AddAccountEmailAddressRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of AddAccountEmailAddressRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_address": obj.get("email_address")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/api_error_schema_inner.py b/constant_contact_api_client/models/api_error_schema_inner.py
new file mode 100644
index 0000000..6ce16ae
--- /dev/null
+++ b/constant_contact_api_client/models/api_error_schema_inner.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class APIErrorSchemaInner(BaseModel):
+ """
+ APIErrorSchemaInner
+ """ # noqa: E501
+ error_key: Optional[StrictStr] = Field(default=None, description="Identifies the type of error.")
+ error_message: Optional[StrictStr] = Field(default=None, description="Description of the error.")
+ __properties: ClassVar[List[str]] = ["error_key", "error_message"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of APIErrorSchemaInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of APIErrorSchemaInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "error_key": obj.get("error_key"),
+ "error_message": obj.get("error_message")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/authorization_error_schema.py b/constant_contact_api_client/models/authorization_error_schema.py
new file mode 100644
index 0000000..fe2166d
--- /dev/null
+++ b/constant_contact_api_client/models/authorization_error_schema.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class AuthorizationErrorSchema(BaseModel):
+ """
+ AuthorizationErrorSchema
+ """ # noqa: E501
+ error_key: Optional[StrictStr] = Field(default=None, description="Identifies the type of error.")
+ error_message: Optional[StrictStr] = Field(default=None, description="Description of the error.")
+ __properties: ClassVar[List[str]] = ["error_key", "error_message"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of AuthorizationErrorSchema from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of AuthorizationErrorSchema from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "error_key": obj.get("error_key"),
+ "error_message": obj.get("error_message")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/bounces_tracking_activities_page.py b/constant_contact_api_client/models/bounces_tracking_activities_page.py
new file mode 100644
index 0000000..d86cd01
--- /dev/null
+++ b/constant_contact_api_client/models/bounces_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_bounces_report200_response_links import GetBouncesReport200ResponseLinks
+from constant_contact_api_client.models.get_bounces_report200_response_tracking_activities_inner import GetBouncesReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class BouncesTrackingActivitiesPage(BaseModel):
+ """
+ BouncesTrackingActivitiesPage
+ """ # noqa: E501
+ tracking_activities: List[GetBouncesReport200ResponseTrackingActivitiesInner] = Field(description="The list of email bounce tracking activities associated with a given `campaign_activity_id'.")
+ links: GetBouncesReport200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of BouncesTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of BouncesTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetBouncesReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetBouncesReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/bounces_tracking_activity.py b/constant_contact_api_client/models/bounces_tracking_activity.py
new file mode 100644
index 0000000..63b5fc1
--- /dev/null
+++ b/constant_contact_api_client/models/bounces_tracking_activity.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class BouncesTrackingActivity(BaseModel):
+ """
+ BouncesTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies the email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of email tracking activity, em_bounces
, that this report includes.")
+ email_address: StrictStr = Field(description="The contact's email address that was used when the email campaign activity bounced.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ bounce_code: StrictStr = Field(description="The one-character string used to specify the reason for the email bounce. Valid codes include: B
- Non-existent address; the contact's Internet Service Provider (ISP) indicates that the email address doesn't exist.D
- Undeliverable; after repeated delivery attempts, no response was received from the contact's ISP.F
- Full; the contact's mailbox is full.S
- Suspended; the contact's address was reported as non-existent by the ISP and is suspended from delivery.V
- Vacation/autoreply; the contact set an autoreply, but the message was delivered.X
- Other; the contact's ISP specified another reason that the message cannot be delivered.Z
- Blocked; the recipient's ISP chose not to deliver the email. For example, the ISP may have flagged the email as spam.email_address
was updated after the email bounce activity occurred, current_ email_address
displays the updated address. If updates were not made to email_address
, the email_address
and current_email_address
are the same.")
+ created_time: datetime = Field(description="The date and time that the email bounce tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, the date when the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "bounce_code", "current_email_address", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of BouncesTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of BouncesTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "bounce_code": obj.get("bounce_code"),
+ "current_email_address": obj.get("current_email_address"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/bulk_email_campaign_summaries_page.py b/constant_contact_api_client/models/bulk_email_campaign_summaries_page.py
new file mode 100644
index 0000000..1f6eb03
--- /dev/null
+++ b/constant_contact_api_client/models/bulk_email_campaign_summaries_page.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_bounces_report200_response_links import GetBouncesReport200ResponseLinks
+from constant_contact_api_client.models.get_email_campaign_report200_response_aggregate_percents import GetEmailCampaignReport200ResponseAggregatePercents
+from constant_contact_api_client.models.get_email_campaign_report200_response_bulk_email_campaign_summaries_inner import GetEmailCampaignReport200ResponseBulkEmailCampaignSummariesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class BulkEmailCampaignSummariesPage(BaseModel):
+ """
+ BulkEmailCampaignSummariesPage
+ """ # noqa: E501
+ bulk_email_campaign_summaries: List[GetEmailCampaignReport200ResponseBulkEmailCampaignSummariesInner] = Field(description="Lists and provides details about each bulk email campaign activity including total unique counts for tracked activities.")
+ aggregate_percents: Optional[GetEmailCampaignReport200ResponseAggregatePercents] = None
+ links: GetBouncesReport200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["bulk_email_campaign_summaries", "aggregate_percents", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of BulkEmailCampaignSummariesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in bulk_email_campaign_summaries (list)
+ _items = []
+ if self.bulk_email_campaign_summaries:
+ for _item in self.bulk_email_campaign_summaries:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['bulk_email_campaign_summaries'] = _items
+ # override the default output from pydantic by calling `to_dict()` of aggregate_percents
+ if self.aggregate_percents:
+ _dict['aggregate_percents'] = self.aggregate_percents.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of BulkEmailCampaignSummariesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "bulk_email_campaign_summaries": [GetEmailCampaignReport200ResponseBulkEmailCampaignSummariesInner.from_dict(_item) for _item in obj.get("bulk_email_campaign_summaries")] if obj.get("bulk_email_campaign_summaries") is not None else None,
+ "aggregate_percents": GetEmailCampaignReport200ResponseAggregatePercents.from_dict(obj.get("aggregate_percents")) if obj.get("aggregate_percents") is not None else None,
+ "_links": GetBouncesReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/bulk_email_campaign_summaries_percents.py b/constant_contact_api_client/models/bulk_email_campaign_summaries_percents.py
new file mode 100644
index 0000000..5d4481c
--- /dev/null
+++ b/constant_contact_api_client/models/bulk_email_campaign_summaries_percents.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class BulkEmailCampaignSummariesPercents(BaseModel):
+ """
+ BulkEmailCampaignSummariesPercents
+ """ # noqa: E501
+ click: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Aggregated click rate for campaigns on the current page.")
+ open: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Aggregated open rate for campaigns on the current page.")
+ did_not_open: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Aggregated did-not-open rate for campaigns on the current page.")
+ bounce: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Aggregated bounce rate for campaigns on the current page.")
+ unsubscribe: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Aggregated unsubscribe (optout) rate for campaigns on the current page.")
+ __properties: ClassVar[List[str]] = ["click", "open", "did_not_open", "bounce", "unsubscribe"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of BulkEmailCampaignSummariesPercents from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of BulkEmailCampaignSummariesPercents from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "click": obj.get("click"),
+ "open": obj.get("open"),
+ "did_not_open": obj.get("did_not_open"),
+ "bounce": obj.get("bounce"),
+ "unsubscribe": obj.get("unsubscribe")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/bulk_email_campaign_summary.py b/constant_contact_api_client/models/bulk_email_campaign_summary.py
new file mode 100644
index 0000000..96b257d
--- /dev/null
+++ b/constant_contact_api_client/models/bulk_email_campaign_summary.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_email_campaign_report200_response_bulk_email_campaign_summaries_inner_unique_counts import GetEmailCampaignReport200ResponseBulkEmailCampaignSummariesInnerUniqueCounts
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class BulkEmailCampaignSummary(BaseModel):
+ """
+ BulkEmailCampaignSummary
+ """ # noqa: E501
+ campaign_id: StrictStr = Field(description="The ID that uniquely identifies an email campaign.")
+ campaign_type: StrictStr = Field(description="Identifies the email campaign type.")
+ last_sent_date: datetime = Field(description="The date and time that the email campaign was last sent.")
+ unique_counts: GetEmailCampaignReport200ResponseBulkEmailCampaignSummariesInnerUniqueCounts
+ __properties: ClassVar[List[str]] = ["campaign_id", "campaign_type", "last_sent_date", "unique_counts"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of BulkEmailCampaignSummary from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of unique_counts
+ if self.unique_counts:
+ _dict['unique_counts'] = self.unique_counts.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of BulkEmailCampaignSummary from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_id": obj.get("campaign_id"),
+ "campaign_type": obj.get("campaign_type"),
+ "last_sent_date": obj.get("last_sent_date"),
+ "unique_counts": GetEmailCampaignReport200ResponseBulkEmailCampaignSummariesInnerUniqueCounts.from_dict(obj.get("unique_counts")) if obj.get("unique_counts") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/campaign_activity_stats_query_result_email.py b/constant_contact_api_client/models/campaign_activity_stats_query_result_email.py
new file mode 100644
index 0000000..a94b31d
--- /dev/null
+++ b/constant_contact_api_client/models/campaign_activity_stats_query_result_email.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_campaign_activity_report200_response_results_inner import GetEmailCampaignActivityReport200ResponseResultsInner
+from constant_contact_api_client.models.get_email_stats_report200_response_errors_inner import GetEmailStatsReport200ResponseErrorsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CampaignActivityStatsQueryResultEmail(BaseModel):
+ """
+ CampaignActivityStatsQueryResultEmail
+ """ # noqa: E501
+ errors: Optional[List[GetEmailStatsReport200ResponseErrorsInner]] = Field(default=None, description="Array of errors indicating any partial failures in the query")
+ results: Optional[List[GetEmailCampaignActivityReport200ResponseResultsInner]] = Field(default=None, description="An array of results containing statistics for each requested campaign activity")
+ __properties: ClassVar[List[str]] = ["errors", "results"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CampaignActivityStatsQueryResultEmail from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
+ _items = []
+ if self.errors:
+ for _item in self.errors:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['errors'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in results (list)
+ _items = []
+ if self.results:
+ for _item in self.results:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['results'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CampaignActivityStatsQueryResultEmail from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "errors": [GetEmailStatsReport200ResponseErrorsInner.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None,
+ "results": [GetEmailCampaignActivityReport200ResponseResultsInner.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/campaign_activity_stats_result_generic_stats_email_activity.py b/constant_contact_api_client/models/campaign_activity_stats_result_generic_stats_email_activity.py
new file mode 100644
index 0000000..2f48cfe
--- /dev/null
+++ b/constant_contact_api_client/models/campaign_activity_stats_result_generic_stats_email_activity.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_email_campaign_activity_report200_response_results_inner_stats import GetEmailCampaignActivityReport200ResponseResultsInnerStats
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CampaignActivityStatsResultGenericStatsEmailActivity(BaseModel):
+ """
+ CampaignActivityStatsResultGenericStatsEmailActivity
+ """ # noqa: E501
+ campaign_id: Optional[StrictStr] = Field(default=None, description="The unique ID used to identify the campaign (UUID).")
+ campaign_activity_id: Optional[StrictStr] = Field(default=None, description="The unique ID used to identify the campaign activity (UUID).")
+ stats: Optional[GetEmailCampaignActivityReport200ResponseResultsInnerStats] = None
+ last_refresh_time: Optional[StrictStr] = Field(default=None, description="The time at which the campaign activity stats were last refreshed in ISO 8601 format (e.g. '2015-08-25T22:00:09.908Z').")
+ __properties: ClassVar[List[str]] = ["campaign_id", "campaign_activity_id", "stats", "last_refresh_time"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CampaignActivityStatsResultGenericStatsEmailActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of stats
+ if self.stats:
+ _dict['stats'] = self.stats.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CampaignActivityStatsResultGenericStatsEmailActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_id": obj.get("campaign_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "stats": GetEmailCampaignActivityReport200ResponseResultsInnerStats.from_dict(obj.get("stats")) if obj.get("stats") is not None else None,
+ "last_refresh_time": obj.get("last_refresh_time")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/campaign_activity_summary.py b/constant_contact_api_client/models/campaign_activity_summary.py
new file mode 100644
index 0000000..97cc9da
--- /dev/null
+++ b/constant_contact_api_client/models/campaign_activity_summary.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CampaignActivitySummary(BaseModel):
+ """
+ CampaignActivitySummary
+ """ # noqa: E501
+ campaign_activity_id: StrictStr = Field(description="The unique id of the activity for an e-mail campaign.")
+ start_on: datetime = Field(description="The last date at which the email was sent to this contact.")
+ em_bounces: StrictInt = Field(description="The number of times the email has bounced for this contact.")
+ em_clicks: StrictInt = Field(description="The number of times this contact has clicked a link in this email.")
+ em_forwards: StrictInt = Field(description="The number of times this contact has forwarded this email.")
+ em_opens: StrictInt = Field(description="The number of times this contact has opened this email.")
+ em_sends: StrictInt = Field(description="The number of times the email was sent to this contact.")
+ em_unsubscribes: StrictInt = Field(description="The number of times this contact has opted out.")
+ __properties: ClassVar[List[str]] = ["campaign_activity_id", "start_on", "em_bounces", "em_clicks", "em_forwards", "em_opens", "em_sends", "em_unsubscribes"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CampaignActivitySummary from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CampaignActivitySummary from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "start_on": obj.get("start_on"),
+ "em_bounces": obj.get("em_bounces"),
+ "em_clicks": obj.get("em_clicks"),
+ "em_forwards": obj.get("em_forwards"),
+ "em_opens": obj.get("em_opens"),
+ "em_sends": obj.get("em_sends"),
+ "em_unsubscribes": obj.get("em_unsubscribes")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/campaign_stats_query_result_email.py b/constant_contact_api_client/models/campaign_stats_query_result_email.py
new file mode 100644
index 0000000..79d455c
--- /dev/null
+++ b/constant_contact_api_client/models/campaign_stats_query_result_email.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_stats_report200_response_errors_inner import GetEmailStatsReport200ResponseErrorsInner
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner import GetEmailStatsReport200ResponseResultsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CampaignStatsQueryResultEmail(BaseModel):
+ """
+ CampaignStatsQueryResultEmail
+ """ # noqa: E501
+ errors: Optional[List[GetEmailStatsReport200ResponseErrorsInner]] = Field(default=None, description="An array of errors indicating any partial failures in the query.")
+ results: Optional[List[GetEmailStatsReport200ResponseResultsInner]] = Field(default=None, description="An array of results listing statistics for each requested campaign_id
.")
+ __properties: ClassVar[List[str]] = ["errors", "results"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CampaignStatsQueryResultEmail from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
+ _items = []
+ if self.errors:
+ for _item in self.errors:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['errors'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in results (list)
+ _items = []
+ if self.results:
+ for _item in self.results:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['results'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CampaignStatsQueryResultEmail from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "errors": [GetEmailStatsReport200ResponseErrorsInner.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None,
+ "results": [GetEmailStatsReport200ResponseResultsInner.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/campaign_stats_result_generic_stats_email_percents_email.py b/constant_contact_api_client/models/campaign_stats_result_generic_stats_email_percents_email.py
new file mode 100644
index 0000000..3fe696e
--- /dev/null
+++ b/constant_contact_api_client/models/campaign_stats_result_generic_stats_email_percents_email.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner_percents import GetEmailStatsReport200ResponseResultsInnerPercents
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner_stats import GetEmailStatsReport200ResponseResultsInnerStats
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CampaignStatsResultGenericStatsEmailPercentsEmail(BaseModel):
+ """
+ CampaignStatsResultGenericStatsEmailPercentsEmail
+ """ # noqa: E501
+ campaign_id: Optional[StrictStr] = Field(default=None, description="The ID that uniquely identifies the campaign (UUID).")
+ stats: Optional[GetEmailStatsReport200ResponseResultsInnerStats] = None
+ percents: Optional[GetEmailStatsReport200ResponseResultsInnerPercents] = None
+ last_refresh_time: Optional[datetime] = Field(default=None, description="The date and time that the campaign stats were last refreshed.")
+ __properties: ClassVar[List[str]] = ["campaign_id", "stats", "percents", "last_refresh_time"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CampaignStatsResultGenericStatsEmailPercentsEmail from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of stats
+ if self.stats:
+ _dict['stats'] = self.stats.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of percents
+ if self.percents:
+ _dict['percents'] = self.percents.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CampaignStatsResultGenericStatsEmailPercentsEmail from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_id": obj.get("campaign_id"),
+ "stats": GetEmailStatsReport200ResponseResultsInnerStats.from_dict(obj.get("stats")) if obj.get("stats") is not None else None,
+ "percents": GetEmailStatsReport200ResponseResultsInnerPercents.from_dict(obj.get("percents")) if obj.get("percents") is not None else None,
+ "last_refresh_time": obj.get("last_refresh_time")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/clicks_tracking_activities_page.py b/constant_contact_api_client/models/clicks_tracking_activities_page.py
new file mode 100644
index 0000000..419dd53
--- /dev/null
+++ b/constant_contact_api_client/models/clicks_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_clicks_report200_response_links import GetClicksReport200ResponseLinks
+from constant_contact_api_client.models.get_clicks_report200_response_tracking_activities_inner import GetClicksReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ClicksTrackingActivitiesPage(BaseModel):
+ """
+ ClicksTrackingActivitiesPage
+ """ # noqa: E501
+ tracking_activities: List[GetClicksReport200ResponseTrackingActivitiesInner] = Field(description="The list of click tracking activities")
+ links: Optional[GetClicksReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ClicksTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ClicksTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetClicksReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetClicksReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/clicks_tracking_activity.py b/constant_contact_api_client/models/clicks_tracking_activity.py
new file mode 100644
index 0000000..a135c65
--- /dev/null
+++ b/constant_contact_api_client/models/clicks_tracking_activity.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ClicksTrackingActivity(BaseModel):
+ """
+ ClicksTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies the email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of report tracking activity that is associated with the specified campaign_activity_id
.")
+ email_address: StrictStr = Field(description="The email address used to send the email campaign activity to a contact.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ device_type: Optional[StrictStr] = Field(default=None, description="The type of device that the contact was using when they clicked the URL link for the email campaign activity.")
+ url_id: StrictStr = Field(description="The ID used to uniquely identify the URL link.")
+ link_url: StrictStr = Field(description="The text used for the URL link.")
+ created_time: datetime = Field(description="The date and time that the contact clicked the specified URL link for the email campaign activity.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "device_type", "url_id", "link_url", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ClicksTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ClicksTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "device_type": obj.get("device_type"),
+ "url_id": obj.get("url_id"),
+ "link_url": obj.get("link_url"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/company_logo.py b/constant_contact_api_client/models/company_logo.py
new file mode 100644
index 0000000..5c72f4e
--- /dev/null
+++ b/constant_contact_api_client/models/company_logo.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CompanyLogo(BaseModel):
+ """
+ CompanyLogo
+ """ # noqa: E501
+ url: Optional[StrictStr] = Field(default=None, description="The internal URL used to get the company logo image file hosted locally in your account's MyLibrary.")
+ external_url: Optional[StrictStr] = Field(default=None, description="The external URL used to get the company logo image file that is hosted on an external website.")
+ internal_id: Optional[StrictStr] = Field(default=None, description="The internal ID used to identify the image hosted in your account's MyLibrary.")
+ __properties: ClassVar[List[str]] = ["url", "external_url", "internal_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CompanyLogo from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CompanyLogo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "url": obj.get("url"),
+ "external_url": obj.get("external_url"),
+ "internal_id": obj.get("internal_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_campaign_activities_summary.py b/constant_contact_api_client/models/contact_campaign_activities_summary.py
new file mode 100644
index 0000000..1258b27
--- /dev/null
+++ b/constant_contact_api_client/models/contact_campaign_activities_summary.py
@@ -0,0 +1,106 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_contact_tracking_count_report200_response_campaign_activities_inner import GetContactTrackingCountReport200ResponseCampaignActivitiesInner
+from constant_contact_api_client.models.get_contact_tracking_count_report200_response_links import GetContactTrackingCountReport200ResponseLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactCampaignActivitiesSummary(BaseModel):
+ """
+ ContactCampaignActivitiesSummary
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="Unique id of the contact that will have their activity summarized.")
+ campaign_activities: List[GetContactTrackingCountReport200ResponseCampaignActivitiesInner] = Field(description="A summary of all the actions for a contact.")
+ links: Optional[GetContactTrackingCountReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactCampaignActivitiesSummary from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in campaign_activities (list)
+ _items = []
+ if self.campaign_activities:
+ for _item in self.campaign_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['campaign_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactCampaignActivitiesSummary from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activities": [GetContactTrackingCountReport200ResponseCampaignActivitiesInner.from_dict(_item) for _item in obj.get("campaign_activities")] if obj.get("campaign_activities") is not None else None,
+ "_links": GetContactTrackingCountReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_create_or_update_input.py b/constant_contact_api_client/models/contact_create_or_update_input.py
new file mode 100644
index 0000000..d69439b
--- /dev/null
+++ b/constant_contact_api_client/models/contact_create_or_update_input.py
@@ -0,0 +1,125 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_or_update_contact_request_custom_fields_inner import CreateOrUpdateContactRequestCustomFieldsInner
+from constant_contact_api_client.models.create_or_update_contact_request_street_address import CreateOrUpdateContactRequestStreetAddress
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactCreateOrUpdateInput(BaseModel):
+ """
+ ContactCreateOrUpdateInput
+ """ # noqa: E501
+ email_address: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The email address for the contact. This method identifies each unique contact using their email address. If the email address exists in the account, this method updates the contact. If the email address is new, this method creates a new contact.")
+ first_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The last name of the contact.")
+ job_title: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The job title of the contact.")
+ company_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the company where the contact works.")
+ phone_number: Optional[Annotated[str, Field(strict=True, max_length=25)]] = Field(default=None, description="The phone number for the contact.")
+ list_memberships: Annotated[List[StrictStr], Field(min_length=1, max_length=50)] = Field(description="The contact lists you want to add the contact to as an array of up to 50 contact list_id
values. You must include at least one list_id
.")
+ custom_fields: Optional[Annotated[List[CreateOrUpdateContactRequestCustomFieldsInner], Field(max_length=50)]] = Field(default=None, description="The custom fields you want to add to the contact as an array of up to 50 custom field objects.")
+ anniversary: Optional[StrictStr] = Field(default=None, description="The anniversary date for the contact. For example, this value could be the date when the contact first became a customer of an organization in Constant Contact. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY. ")
+ birthday_month: Optional[StrictInt] = Field(default=None, description="The month value for the contact's birthday. Valid values are from 1 through 12. The birthday_month
property is required if you use birthday_day
.")
+ birthday_day: Optional[StrictInt] = Field(default=None, description="The day value for the contact's birthday. Valid values are from 1 through 31. The birthday_day
property is required if you use birthday_month
.")
+ street_address: Optional[CreateOrUpdateContactRequestStreetAddress] = None
+ __properties: ClassVar[List[str]] = ["email_address", "first_name", "last_name", "job_title", "company_name", "phone_number", "list_memberships", "custom_fields", "anniversary", "birthday_month", "birthday_day", "street_address"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactCreateOrUpdateInput from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list)
+ _items = []
+ if self.custom_fields:
+ for _item in self.custom_fields:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['custom_fields'] = _items
+ # override the default output from pydantic by calling `to_dict()` of street_address
+ if self.street_address:
+ _dict['street_address'] = self.street_address.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactCreateOrUpdateInput from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "job_title": obj.get("job_title"),
+ "company_name": obj.get("company_name"),
+ "phone_number": obj.get("phone_number"),
+ "list_memberships": obj.get("list_memberships"),
+ "custom_fields": [CreateOrUpdateContactRequestCustomFieldsInner.from_dict(_item) for _item in obj.get("custom_fields")] if obj.get("custom_fields") is not None else None,
+ "anniversary": obj.get("anniversary"),
+ "birthday_month": obj.get("birthday_month"),
+ "birthday_day": obj.get("birthday_day"),
+ "street_address": CreateOrUpdateContactRequestStreetAddress.from_dict(obj.get("street_address")) if obj.get("street_address") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_create_or_update_response.py b/constant_contact_api_client/models/contact_create_or_update_response.py
new file mode 100644
index 0000000..ec060d8
--- /dev/null
+++ b/constant_contact_api_client/models/contact_create_or_update_response.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactCreateOrUpdateResponse(BaseModel):
+ """
+ ContactCreateOrUpdateResponse
+ """ # noqa: E501
+ contact_id: Optional[StrictStr] = Field(default=None, description="The unique identifier for the contact that the V3 API created or updated.")
+ action: Optional[StrictStr] = Field(default=None, description="Identifies if the V3 API created a new contact or updated an existing contact.")
+ __properties: ClassVar[List[str]] = ["contact_id", "action"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactCreateOrUpdateResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactCreateOrUpdateResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "action": obj.get("action")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_custom_field.py b/constant_contact_api_client/models/contact_custom_field.py
new file mode 100644
index 0000000..5156572
--- /dev/null
+++ b/constant_contact_api_client/models/contact_custom_field.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactCustomField(BaseModel):
+ """
+ Custom fields allow Constant Contact users to add custom content to a contact that can be used to personalize emails in addition to the standard set of variables available for email personalization.
+ """ # noqa: E501
+ custom_field_id: StrictStr = Field(description="The custom_field's unique ID")
+ value: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The custom_field value.")
+ __properties: ClassVar[List[str]] = ["custom_field_id", "value"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactCustomField from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactCustomField from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "custom_field_id": obj.get("custom_field_id"),
+ "value": obj.get("value")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_delete.py b/constant_contact_api_client/models/contact_delete.py
new file mode 100644
index 0000000..69b80be
--- /dev/null
+++ b/constant_contact_api_client/models/contact_delete.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactDelete(BaseModel):
+ """
+ ContactDelete
+ """ # noqa: E501
+ contact_ids: Optional[Annotated[List[StrictStr], Field(max_length=500)]] = Field(default=None, description="Specify up to 500 contacts by contact_id
to delete; mutually exclusive with list_ids
.")
+ list_ids: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="The contacts on the lists (up to 50) specified will be deleted; mutually exclusive with contact_ids
.")
+ __properties: ClassVar[List[str]] = ["contact_ids", "list_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactDelete from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactDelete from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_ids": obj.get("contact_ids"),
+ "list_ids": obj.get("list_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_list.py b/constant_contact_api_client/models/contact_list.py
new file mode 100644
index 0000000..369b708
--- /dev/null
+++ b/constant_contact_api_client/models/contact_list.py
@@ -0,0 +1,114 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactList(BaseModel):
+ """
+ ContactList
+ """ # noqa: E501
+ list_id: StrictStr = Field(description="Unique ID for the contact list")
+ name: StrictStr = Field(description="The name given to the contact list")
+ description: Optional[StrictStr] = Field(default=None, description="Text describing the list.")
+ favorite: Optional[StrictBool] = Field(default=False, description="Identifies whether or not the account has favorited the contact list.")
+ created_at: Optional[datetime] = Field(default=None, description="System generated date and time that the resource was created, in ISO-8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the list was last updated, in ISO-8601 format. System generated.")
+ deleted_at: Optional[datetime] = Field(default=None, description="If the list was deleted, this property shows the date and time it was deleted, in ISO-8601 format. System generated.")
+ membership_count: Optional[StrictInt] = Field(default=None, description="The total number of contacts that are members in a list. Does not apply to segment type lists.")
+ __properties: ClassVar[List[str]] = ["list_id", "name", "description", "favorite", "created_at", "updated_at", "deleted_at", "membership_count"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactList from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "list_id",
+ "created_at",
+ "updated_at",
+ "deleted_at",
+ "membership_count",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "list_id": obj.get("list_id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "favorite": obj.get("favorite") if obj.get("favorite") is not None else False,
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "deleted_at": obj.get("deleted_at"),
+ "membership_count": obj.get("membership_count")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_list_array.py b/constant_contact_api_client/models/contact_list_array.py
new file mode 100644
index 0000000..af5cefc
--- /dev/null
+++ b/constant_contact_api_client/models/contact_list_array.py
@@ -0,0 +1,106 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from constant_contact_api_client.models.get_all_activities200_response_links import GetAllActivities200ResponseLinks
+from constant_contact_api_client.models.get_list200_response import GetList200Response
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactListArray(BaseModel):
+ """
+ ContactListArray
+ """ # noqa: E501
+ lists: Optional[List[GetList200Response]] = None
+ lists_count: Optional[StrictInt] = Field(default=None, description="The total number of contact lists.")
+ links: Optional[GetAllActivities200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["lists", "lists_count", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactListArray from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in lists (list)
+ _items = []
+ if self.lists:
+ for _item in self.lists:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['lists'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactListArray from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "lists": [GetList200Response.from_dict(_item) for _item in obj.get("lists")] if obj.get("lists") is not None else None,
+ "lists_count": obj.get("lists_count"),
+ "_links": GetAllActivities200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_list_put_post.py b/constant_contact_api_client/models/contact_list_put_post.py
new file mode 100644
index 0000000..f20b14f
--- /dev/null
+++ b/constant_contact_api_client/models/contact_list_put_post.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactListPutPost(BaseModel):
+ """
+ ContactListPutPost
+ """ # noqa: E501
+ list_id: StrictStr = Field(description="Unique ID for the contact list")
+ name: StrictStr = Field(description="The name given to the contact list")
+ description: Optional[StrictStr] = Field(default=None, description="Text describing the list.")
+ favorite: Optional[StrictBool] = Field(default=False, description="Identifies whether or not the account has favorited the contact list.")
+ created_at: Optional[datetime] = Field(default=None, description="System generated date and time that the resource was created, in ISO-8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the list was last updated, in ISO-8601 format. System generated.")
+ deleted_at: Optional[datetime] = Field(default=None, description="If the list was deleted, this property shows the date and time it was deleted, in ISO-8601 format. System generated.")
+ __properties: ClassVar[List[str]] = ["list_id", "name", "description", "favorite", "created_at", "updated_at", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactListPutPost from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "list_id",
+ "created_at",
+ "updated_at",
+ "deleted_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactListPutPost from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "list_id": obj.get("list_id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "favorite": obj.get("favorite") if obj.get("favorite") is not None else False,
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_open_and_click_rates.py b/constant_contact_api_client/models/contact_open_and_click_rates.py
new file mode 100644
index 0000000..08a69bf
--- /dev/null
+++ b/constant_contact_api_client/models/contact_open_and_click_rates.py
@@ -0,0 +1,96 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactOpenAndClickRates(BaseModel):
+ """
+ The average click and open rates for a provided contact. The basic information provided is contact id, open rate, click rate, and emails included in the calculation.
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID of the contact for which the report is being generated.")
+ included_activities_count: StrictInt = Field(description="The number of activities included in the calculation.")
+ average_open_rate: Union[StrictFloat, StrictInt] = Field(description="The average rate the contact opened emails sent to them.")
+ average_click_rate: Union[StrictFloat, StrictInt] = Field(description="The average rate the contact clicked on links in emails sent to them.")
+ __properties: ClassVar[List[str]] = ["contact_id", "included_activities_count", "average_open_rate", "average_click_rate"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactOpenAndClickRates from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactOpenAndClickRates from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "included_activities_count": obj.get("included_activities_count"),
+ "average_open_rate": obj.get("average_open_rate"),
+ "average_click_rate": obj.get("average_click_rate")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_post_request.py b/constant_contact_api_client/models/contact_post_request.py
new file mode 100644
index 0000000..160b186
--- /dev/null
+++ b/constant_contact_api_client/models/contact_post_request.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_contact_request_email_address import CreateContactRequestEmailAddress
+from constant_contact_api_client.models.get_contact_by_id200_response_custom_fields_inner import GetContactById200ResponseCustomFieldsInner
+from constant_contact_api_client.models.get_contact_by_id200_response_notes_inner import GetContactById200ResponseNotesInner
+from constant_contact_api_client.models.update_contact_request_phone_numbers_inner import UpdateContactRequestPhoneNumbersInner
+from constant_contact_api_client.models.update_contact_request_street_addresses_inner import UpdateContactRequestStreetAddressesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactPostRequest(BaseModel):
+ """
+ ContactPostRequest
+ """ # noqa: E501
+ email_address: Optional[CreateContactRequestEmailAddress] = None
+ first_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The last name of the contact.")
+ job_title: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The job title of the contact.")
+ company_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the company where the contact works.")
+ create_source: Optional[StrictStr] = Field(default=None, description="Describes who added the contact; valid values are Contact
or Account
. Your integration must accurately identify create_source
for compliance reasons; value is set on POST, and is read-only going forward.")
+ birthday_month: Optional[StrictInt] = Field(default=None, description="The month value for the contact's birthday. Valid values are from 1 through 12. The birthday_month
property is required if you use birthday_day
.")
+ birthday_day: Optional[StrictInt] = Field(default=None, description="The day value for the contact's birthday. Valid values are from 1 through 31. The birthday_day
property is required if you use birthday_month
.")
+ anniversary: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, description="The anniversary date for the contact. For example, this value could be the date when the contact first became a customer of an organization in Constant Contact. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY.")
+ custom_fields: Optional[Annotated[List[GetContactById200ResponseCustomFieldsInner], Field(max_length=25)]] = Field(default=None, description="Array of up to 25 custom_field
key value pairs.")
+ phone_numbers: Optional[Annotated[List[UpdateContactRequestPhoneNumbersInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 phone numbers subresources.")
+ street_addresses: Optional[Annotated[List[UpdateContactRequestStreetAddressesInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 street address subresources.")
+ list_memberships: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of list_id
s to which the contact is being subscribed, up to a maximum of 50.")
+ taggings: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of tags (tag_id
) assigned to the contact, up to a maximum of 50.")
+ notes: Optional[Annotated[List[GetContactById200ResponseNotesInner], Field(max_length=150)]] = Field(default=None, description="An array of notes about the contact.")
+ __properties: ClassVar[List[str]] = ["email_address", "first_name", "last_name", "job_title", "company_name", "create_source", "birthday_month", "birthday_day", "anniversary", "custom_fields", "phone_numbers", "street_addresses", "list_memberships", "taggings", "notes"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactPostRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of email_address
+ if self.email_address:
+ _dict['email_address'] = self.email_address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list)
+ _items = []
+ if self.custom_fields:
+ for _item in self.custom_fields:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['custom_fields'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in phone_numbers (list)
+ _items = []
+ if self.phone_numbers:
+ for _item in self.phone_numbers:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['phone_numbers'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in street_addresses (list)
+ _items = []
+ if self.street_addresses:
+ for _item in self.street_addresses:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['street_addresses'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in notes (list)
+ _items = []
+ if self.notes:
+ for _item in self.notes:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['notes'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactPostRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_address": CreateContactRequestEmailAddress.from_dict(obj.get("email_address")) if obj.get("email_address") is not None else None,
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "job_title": obj.get("job_title"),
+ "company_name": obj.get("company_name"),
+ "create_source": obj.get("create_source"),
+ "birthday_month": obj.get("birthday_month"),
+ "birthday_day": obj.get("birthday_day"),
+ "anniversary": obj.get("anniversary"),
+ "custom_fields": [GetContactById200ResponseCustomFieldsInner.from_dict(_item) for _item in obj.get("custom_fields")] if obj.get("custom_fields") is not None else None,
+ "phone_numbers": [UpdateContactRequestPhoneNumbersInner.from_dict(_item) for _item in obj.get("phone_numbers")] if obj.get("phone_numbers") is not None else None,
+ "street_addresses": [UpdateContactRequestStreetAddressesInner.from_dict(_item) for _item in obj.get("street_addresses")] if obj.get("street_addresses") is not None else None,
+ "list_memberships": obj.get("list_memberships"),
+ "taggings": obj.get("taggings"),
+ "notes": [GetContactById200ResponseNotesInner.from_dict(_item) for _item in obj.get("notes")] if obj.get("notes") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_put_request.py b/constant_contact_api_client/models/contact_put_request.py
new file mode 100644
index 0000000..eba3140
--- /dev/null
+++ b/constant_contact_api_client/models/contact_put_request.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_contact_by_id200_response_custom_fields_inner import GetContactById200ResponseCustomFieldsInner
+from constant_contact_api_client.models.get_contact_by_id200_response_notes_inner import GetContactById200ResponseNotesInner
+from constant_contact_api_client.models.update_contact_request_email_address import UpdateContactRequestEmailAddress
+from constant_contact_api_client.models.update_contact_request_phone_numbers_inner import UpdateContactRequestPhoneNumbersInner
+from constant_contact_api_client.models.update_contact_request_street_addresses_inner import UpdateContactRequestStreetAddressesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactPutRequest(BaseModel):
+ """
+ ContactPutRequest
+ """ # noqa: E501
+ email_address: Optional[UpdateContactRequestEmailAddress] = None
+ first_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The contact's first name")
+ last_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The contact's last name")
+ job_title: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The contact's job title")
+ company_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="Name of the company the contact works for.")
+ birthday_month: Optional[StrictInt] = Field(default=None, description="Accepts values from 1-12; must be used with birthday_day
")
+ birthday_day: Optional[StrictInt] = Field(default=None, description="Accepts values from 1-31; must be used with birthday_month
")
+ anniversary: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, description="The anniversary date; Accepted formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D, MM-DD-YYYY, M-D-YYYY")
+ update_source: StrictStr = Field(description="Identifies who last updated the contact; valid values are Contact
or Account
.")
+ custom_fields: Optional[Annotated[List[GetContactById200ResponseCustomFieldsInner], Field(max_length=25)]] = Field(default=None, description="Array of up to 25 custom_field
subresources.")
+ phone_numbers: Optional[Annotated[List[UpdateContactRequestPhoneNumbersInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 phone_numbers
subresources.")
+ street_addresses: Optional[Annotated[List[UpdateContactRequestStreetAddressesInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 street_addresses
subresources.")
+ list_memberships: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of up to 50 list_ids
to which the contact is subscribed.")
+ taggings: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of tags (tag_id
) assigned to the contact, up to a maximum of 50.")
+ notes: Optional[Annotated[List[GetContactById200ResponseNotesInner], Field(max_length=150)]] = Field(default=None, description="An array of notes about the contact listed by most recent note first.")
+ __properties: ClassVar[List[str]] = ["email_address", "first_name", "last_name", "job_title", "company_name", "birthday_month", "birthday_day", "anniversary", "update_source", "custom_fields", "phone_numbers", "street_addresses", "list_memberships", "taggings", "notes"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactPutRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of email_address
+ if self.email_address:
+ _dict['email_address'] = self.email_address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list)
+ _items = []
+ if self.custom_fields:
+ for _item in self.custom_fields:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['custom_fields'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in phone_numbers (list)
+ _items = []
+ if self.phone_numbers:
+ for _item in self.phone_numbers:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['phone_numbers'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in street_addresses (list)
+ _items = []
+ if self.street_addresses:
+ for _item in self.street_addresses:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['street_addresses'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in notes (list)
+ _items = []
+ if self.notes:
+ for _item in self.notes:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['notes'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactPutRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_address": UpdateContactRequestEmailAddress.from_dict(obj.get("email_address")) if obj.get("email_address") is not None else None,
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "job_title": obj.get("job_title"),
+ "company_name": obj.get("company_name"),
+ "birthday_month": obj.get("birthday_month"),
+ "birthday_day": obj.get("birthday_day"),
+ "anniversary": obj.get("anniversary"),
+ "update_source": obj.get("update_source"),
+ "custom_fields": [GetContactById200ResponseCustomFieldsInner.from_dict(_item) for _item in obj.get("custom_fields")] if obj.get("custom_fields") is not None else None,
+ "phone_numbers": [UpdateContactRequestPhoneNumbersInner.from_dict(_item) for _item in obj.get("phone_numbers")] if obj.get("phone_numbers") is not None else None,
+ "street_addresses": [UpdateContactRequestStreetAddressesInner.from_dict(_item) for _item in obj.get("street_addresses")] if obj.get("street_addresses") is not None else None,
+ "list_memberships": obj.get("list_memberships"),
+ "taggings": obj.get("taggings"),
+ "notes": [GetContactById200ResponseNotesInner.from_dict(_item) for _item in obj.get("notes")] if obj.get("notes") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_resource.py b/constant_contact_api_client/models/contact_resource.py
new file mode 100644
index 0000000..54d189d
--- /dev/null
+++ b/constant_contact_api_client/models/contact_resource.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_contact_by_id200_response_custom_fields_inner import GetContactById200ResponseCustomFieldsInner
+from constant_contact_api_client.models.get_contact_by_id200_response_email_address import GetContactById200ResponseEmailAddress
+from constant_contact_api_client.models.get_contact_by_id200_response_notes_inner import GetContactById200ResponseNotesInner
+from constant_contact_api_client.models.get_contact_by_id200_response_phone_numbers_inner import GetContactById200ResponsePhoneNumbersInner
+from constant_contact_api_client.models.get_contact_by_id200_response_sms_channel import GetContactById200ResponseSmsChannel
+from constant_contact_api_client.models.get_contact_by_id200_response_street_addresses_inner import GetContactById200ResponseStreetAddressesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactResource(BaseModel):
+ """
+ Use this endpoint to retrieve (GET), update (PUT), or DELETE an existing contact resource specified using the contact_id
path parameter.
+ """ # noqa: E501
+ contact_id: Optional[StrictStr] = Field(default=None, description="Unique ID for each contact resource")
+ email_address: Optional[GetContactById200ResponseEmailAddress] = None
+ first_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The last name of the contact.")
+ job_title: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The job title of the contact.")
+ company_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the company where the contact works.")
+ birthday_month: Optional[StrictInt] = Field(default=None, description="The month value for the contact's birthday. Valid values are from 1 through 12. You must use this property with birthday_month
.")
+ birthday_day: Optional[StrictInt] = Field(default=None, description="The day value for the contact's birthday. Valid values are from 1 through 12. You must use this property with birthday_day
.")
+ anniversary: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, description="The anniversary date for the contact. For example, this value could be the date when the contact first became a customer of an organization in Constant Contact. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY.")
+ update_source: Optional[StrictStr] = Field(default=None, description="Identifies who last updated the contact; valid values are Contact
or Account
.")
+ create_source: Optional[StrictStr] = Field(default=None, description="Describes who added the contact; valid values are Contact
or Account
. Your integration must accurately identify create_source
for compliance reasons; value is set when contact is created.")
+ created_at: Optional[datetime] = Field(default=None, description="System generated date and time that the resource was created, in ISO-8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="System generated date and time that the contact was last updated, in ISO-8601 format.")
+ deleted_at: Optional[date] = Field(default=None, description="For deleted contacts (email_address
contains opt_out_source
and opt_out_date
), shows the date of deletion.")
+ custom_fields: Optional[Annotated[List[GetContactById200ResponseCustomFieldsInner], Field(max_length=25)]] = Field(default=None, description="Array of up to 25 custom_field
subresources.")
+ phone_numbers: Optional[Annotated[List[GetContactById200ResponsePhoneNumbersInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 phone_numbers
subresources.")
+ street_addresses: Optional[Annotated[List[GetContactById200ResponseStreetAddressesInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 street_addresses
subresources.")
+ list_memberships: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of up to 50 list_ids
to which the contact is subscribed.")
+ taggings: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of tags (tag_id
) assigned to the contact, up to a maximum of 50.")
+ notes: Optional[Annotated[List[GetContactById200ResponseNotesInner], Field(max_length=150)]] = Field(default=None, description="An array of notes about the contact listed by most recent note first.")
+ sms_channel: Optional[GetContactById200ResponseSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "email_address", "first_name", "last_name", "job_title", "company_name", "birthday_month", "birthday_day", "anniversary", "update_source", "create_source", "created_at", "updated_at", "deleted_at", "custom_fields", "phone_numbers", "street_addresses", "list_memberships", "taggings", "notes", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactResource from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "contact_id",
+ "created_at",
+ "updated_at",
+ "deleted_at",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of email_address
+ if self.email_address:
+ _dict['email_address'] = self.email_address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list)
+ _items = []
+ if self.custom_fields:
+ for _item in self.custom_fields:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['custom_fields'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in phone_numbers (list)
+ _items = []
+ if self.phone_numbers:
+ for _item in self.phone_numbers:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['phone_numbers'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in street_addresses (list)
+ _items = []
+ if self.street_addresses:
+ for _item in self.street_addresses:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['street_addresses'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in notes (list)
+ _items = []
+ if self.notes:
+ for _item in self.notes:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['notes'] = _items
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactResource from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "email_address": GetContactById200ResponseEmailAddress.from_dict(obj.get("email_address")) if obj.get("email_address") is not None else None,
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "job_title": obj.get("job_title"),
+ "company_name": obj.get("company_name"),
+ "birthday_month": obj.get("birthday_month"),
+ "birthday_day": obj.get("birthday_day"),
+ "anniversary": obj.get("anniversary"),
+ "update_source": obj.get("update_source"),
+ "create_source": obj.get("create_source"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "deleted_at": obj.get("deleted_at"),
+ "custom_fields": [GetContactById200ResponseCustomFieldsInner.from_dict(_item) for _item in obj.get("custom_fields")] if obj.get("custom_fields") is not None else None,
+ "phone_numbers": [GetContactById200ResponsePhoneNumbersInner.from_dict(_item) for _item in obj.get("phone_numbers")] if obj.get("phone_numbers") is not None else None,
+ "street_addresses": [GetContactById200ResponseStreetAddressesInner.from_dict(_item) for _item in obj.get("street_addresses")] if obj.get("street_addresses") is not None else None,
+ "list_memberships": obj.get("list_memberships"),
+ "taggings": obj.get("taggings"),
+ "notes": [GetContactById200ResponseNotesInner.from_dict(_item) for _item in obj.get("notes")] if obj.get("notes") is not None else None,
+ "sms_channel": GetContactById200ResponseSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_tracking_activities_page.py b/constant_contact_api_client/models/contact_tracking_activities_page.py
new file mode 100644
index 0000000..cbc4646
--- /dev/null
+++ b/constant_contact_api_client/models/contact_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links import GetContactTrackingReport200ResponseLinks
+from constant_contact_api_client.models.get_contact_tracking_report200_response_tracking_activities_inner import GetContactTrackingReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactTrackingActivitiesPage(BaseModel):
+ """
+ A page of tracking activities for a contact that can include sends, opens, clicks, bounces, opt-outs and forwards to a friend. If it exists, a link to the next page of tracking activities is provided.
+ """ # noqa: E501
+ tracking_activities: Optional[List[GetContactTrackingReport200ResponseTrackingActivitiesInner]] = Field(default=None, description="The list of contact tracking activities in descending date order.")
+ links: Optional[GetContactTrackingReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetContactTrackingReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetContactTrackingReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_tracking_activity.py b/constant_contact_api_client/models/contact_tracking_activity.py
new file mode 100644
index 0000000..192c73a
--- /dev/null
+++ b/constant_contact_api_client/models/contact_tracking_activity.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactTrackingActivity(BaseModel):
+ """
+ The base contact tracking activity representing sends, opt-outs and forwards to a friend. The basic information provided includes the campaign activity ID, tracking activity type, and time the tracking activity occurred.
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The contact ID.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID of the activity for an e-mail campaign.")
+ created_time: Optional[datetime] = Field(default=None, description="The time the tracking activity occurred")
+ tracking_activity_type: Optional[StrictStr] = Field(default=None, description="The types of the tracking activities included in the request. For example, sends, opens, clicks, bounces, opt-outs, or forwards.")
+ campaign_activity_name: Optional[StrictStr] = Field(default=None, description="The campaign activity name.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "created_time", "tracking_activity_type", "campaign_activity_name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "created_time": obj.get("created_time"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "campaign_activity_name": obj.get("campaign_activity_name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_xref.py b/constant_contact_api_client/models/contact_xref.py
new file mode 100644
index 0000000..40343f3
--- /dev/null
+++ b/constant_contact_api_client/models/contact_xref.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactXref(BaseModel):
+ """
+ The cross-referenced pair of V3 API list_id
and V2 API sequence_id
for a list. Response is sorted ascending by sequence_id
.
+ """ # noqa: E501
+ sequence_id: Optional[StrictStr] = Field(default=None, description="The V2 API contact unique identifier")
+ contact_id: Optional[StrictStr] = Field(default=None, description="The V3 API contact unique identifier")
+ __properties: ClassVar[List[str]] = ["sequence_id", "contact_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactXref from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactXref from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "sequence_id": obj.get("sequence_id"),
+ "contact_id": obj.get("contact_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contact_xrefs.py b/constant_contact_api_client/models/contact_xrefs.py
new file mode 100644
index 0000000..b137127
--- /dev/null
+++ b/constant_contact_api_client/models/contact_xrefs.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_contact_id_xrefs200_response_xrefs_inner import GetContactIdXrefs200ResponseXrefsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactXrefs(BaseModel):
+ """
+ ContactXrefs
+ """ # noqa: E501
+ xrefs: Optional[Annotated[List[GetContactIdXrefs200ResponseXrefsInner], Field(max_length=500)]] = Field(default=None, description="An array of cross-referenced V3 API contact_id
and V2 API sequence_id
values. Response is sorted ascending by sequence_id
.")
+ __properties: ClassVar[List[str]] = ["xrefs"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactXrefs from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in xrefs (list)
+ _items = []
+ if self.xrefs:
+ for _item in self.xrefs:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['xrefs'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactXrefs from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "xrefs": [GetContactIdXrefs200ResponseXrefsInner.from_dict(_item) for _item in obj.get("xrefs")] if obj.get("xrefs") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contacts.py b/constant_contact_api_client/models/contacts.py
new file mode 100644
index 0000000..3650963
--- /dev/null
+++ b/constant_contact_api_client/models/contacts.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_all_activities200_response_links import GetAllActivities200ResponseLinks
+from constant_contact_api_client.models.get_contact_by_id200_response import GetContactById200Response
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Contacts(BaseModel):
+ """
+ Use this endpoint to retrieve (GET) a collection of existing contacts, or to create (POST) a new contact.
+ """ # noqa: E501
+ contacts: Optional[List[GetContactById200Response]] = None
+ contacts_count: Optional[StrictInt] = Field(default=None, description="Total number of contacts in the response.")
+ links: Optional[GetAllActivities200ResponseLinks] = Field(default=None, alias="_links")
+ status: Optional[StrictStr] = Field(default=None, description="If you use the segment_id
query parameter to filter results based on a segment, this property indicates that the V3 API accepted your request and is still processing it.")
+ __properties: ClassVar[List[str]] = ["contacts", "contacts_count", "_links", "status"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Contacts from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in contacts (list)
+ _items = []
+ if self.contacts:
+ for _item in self.contacts:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['contacts'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Contacts from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contacts": [GetContactById200Response.from_dict(_item) for _item in obj.get("contacts")] if obj.get("contacts") is not None else None,
+ "contacts_count": obj.get("contacts_count"),
+ "_links": GetAllActivities200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None,
+ "status": obj.get("status")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contacts_counts.py b/constant_contact_api_client/models/contacts_counts.py
new file mode 100644
index 0000000..a7e11bf
--- /dev/null
+++ b/constant_contact_api_client/models/contacts_counts.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactsCounts(BaseModel):
+ """
+ ContactsCounts
+ """ # noqa: E501
+ total: Optional[StrictInt] = Field(default=None, description="Total number of contacts for the account.")
+ explicit: Optional[StrictInt] = Field(default=None, description="Total number of contacts explicitly confirmed. Consent is obtained when you explicitly ask your potential contacts for permission to send the email (for example, using a sign-up form) and they agree. After you obtain express consent, it is good forever or until the contact opts out.")
+ implicit: Optional[StrictInt] = Field(default=None, description="Total number of contacts implicitly confirmed. Consent is inferred based on actions, such as having an existing business relationship (making a purchase or donation, for example). In order to maintain implied consent to comply with CASL a contact must take a business action with you at least once every two years. Under CAN-Spam there is no need to maintain implied consent, it is assumed until the receiver indicates they no longer wish to receive messages.")
+ pending: Optional[StrictInt] = Field(default=None, description="Total number of contacts pending confirmation. Consent is requested and pending confirmation from the contact.")
+ unsubscribed: Optional[StrictInt] = Field(default=None, description="Total number of unsubscribed contacts. Consent is revoked when a contact has unsubscribed.")
+ new_subscriber: Optional[StrictInt] = Field(default=None, description="Total number of newly subscribed contacts.")
+ __properties: ClassVar[List[str]] = ["total", "explicit", "implicit", "pending", "unsubscribed", "new_subscriber"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactsCounts from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactsCounts from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "total": obj.get("total"),
+ "explicit": obj.get("explicit"),
+ "implicit": obj.get("implicit"),
+ "pending": obj.get("pending"),
+ "unsubscribed": obj.get("unsubscribed"),
+ "new_subscriber": obj.get("new_subscriber")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contacts_export.py b/constant_contact_api_client/models/contacts_export.py
new file mode 100644
index 0000000..aebe4ac
--- /dev/null
+++ b/constant_contact_api_client/models/contacts_export.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactsExport(BaseModel):
+ """
+ You can export contact objects to a CSV file. By default, all contacts in the user's account are exported if none of the following properties are included: list_ids
.")
+ list_ids: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Exports all of the contacts inside of up to 50 contact lists. This property is mutually exclusive with contact_ids
.")
+ segment_id: Optional[StrictInt] = Field(default=None, description="Specify the segment_id
from which you want to export all contacts that meet the specified segment_criteria
. This property is mutually exclusive with contact_ids
and list_ids
. You can only specify one segment_id
.")
+ fields: Optional[List[StrictStr]] = Field(default=None, description="Use this array to export specific contact fields. You must export email_address
to successfully export email_optin_source
, email_optin_date
, email_optout_source
, email_optout_date
, or email_optout_reason
.")
+ status: Optional[StrictStr] = Field(default=None, description="Allows you to export only contacts that have a specific status value. Possible values are active
(billable), unsubscribed
, or removed
. Applicable with either `contact_ids` or `list_ids` as the source.")
+ __properties: ClassVar[List[str]] = ["contact_ids", "list_ids", "segment_id", "fields", "status"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactsExport from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactsExport from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_ids": obj.get("contact_ids"),
+ "list_ids": obj.get("list_ids"),
+ "segment_id": obj.get("segment_id"),
+ "fields": obj.get("fields"),
+ "status": obj.get("status")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/contacts_json_import.py b/constant_contact_api_client/models/contacts_json_import.py
new file mode 100644
index 0000000..8e7f684
--- /dev/null
+++ b/constant_contact_api_client/models/contacts_json_import.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_import_json_activity_request_import_data_inner import CreateImportJSONActivityRequestImportDataInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ContactsJsonImport(BaseModel):
+ """
+ ContactsJsonImport
+ """ # noqa: E501
+ import_data: List[CreateImportJSONActivityRequestImportDataInner] = Field(description="An array containing the contacts to import.")
+ list_ids: Annotated[List[StrictStr], Field(min_length=1, max_length=50)] = Field(description="Specify which contact lists you are adding all imported contacts to as an array of up to 50 contact list_id
string values.")
+ sms_permission_to_send: Optional[StrictStr] = Field(default=None, description="Specifies if the contact gave explicit
SMS permission or if the SMS permission was not set (not_set
). If `explicit, the sms_consent_date
must be provided.")
+ __properties: ClassVar[List[str]] = ["import_data", "list_ids", "sms_permission_to_send"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ContactsJsonImport from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in import_data (list)
+ _items = []
+ if self.import_data:
+ for _item in self.import_data:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['import_data'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ContactsJsonImport from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "import_data": [CreateImportJSONActivityRequestImportDataInner.from_dict(_item) for _item in obj.get("import_data")] if obj.get("import_data") is not None else None,
+ "list_ids": obj.get("list_ids"),
+ "sms_permission_to_send": obj.get("sms_permission_to_send")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_contact_request.py b/constant_contact_api_client/models/create_contact_request.py
new file mode 100644
index 0000000..1a8a118
--- /dev/null
+++ b/constant_contact_api_client/models/create_contact_request.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_contact_request_email_address import CreateContactRequestEmailAddress
+from constant_contact_api_client.models.get_contact_by_id200_response_custom_fields_inner import GetContactById200ResponseCustomFieldsInner
+from constant_contact_api_client.models.get_contact_by_id200_response_notes_inner import GetContactById200ResponseNotesInner
+from constant_contact_api_client.models.update_contact_request_phone_numbers_inner import UpdateContactRequestPhoneNumbersInner
+from constant_contact_api_client.models.update_contact_request_street_addresses_inner import UpdateContactRequestStreetAddressesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateContactRequest(BaseModel):
+ """
+ CreateContactRequest
+ """ # noqa: E501
+ email_address: Optional[CreateContactRequestEmailAddress] = None
+ first_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The last name of the contact.")
+ job_title: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The job title of the contact.")
+ company_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the company where the contact works.")
+ create_source: Optional[StrictStr] = Field(default=None, description="Describes who added the contact; valid values are Contact
or Account
. Your integration must accurately identify create_source
for compliance reasons; value is set on POST, and is read-only going forward.")
+ birthday_month: Optional[StrictInt] = Field(default=None, description="The month value for the contact's birthday. Valid values are from 1 through 12. The birthday_month
property is required if you use birthday_day
.")
+ birthday_day: Optional[StrictInt] = Field(default=None, description="The day value for the contact's birthday. Valid values are from 1 through 31. The birthday_day
property is required if you use birthday_month
.")
+ anniversary: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, description="The anniversary date for the contact. For example, this value could be the date when the contact first became a customer of an organization in Constant Contact. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY.")
+ custom_fields: Optional[Annotated[List[GetContactById200ResponseCustomFieldsInner], Field(max_length=25)]] = Field(default=None, description="Array of up to 25 custom_field
key value pairs.")
+ phone_numbers: Optional[Annotated[List[UpdateContactRequestPhoneNumbersInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 phone numbers subresources.")
+ street_addresses: Optional[Annotated[List[UpdateContactRequestStreetAddressesInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 street address subresources.")
+ list_memberships: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of list_id
s to which the contact is being subscribed, up to a maximum of 50.")
+ taggings: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of tags (tag_id
) assigned to the contact, up to a maximum of 50.")
+ notes: Optional[Annotated[List[GetContactById200ResponseNotesInner], Field(max_length=150)]] = Field(default=None, description="An array of notes about the contact.")
+ __properties: ClassVar[List[str]] = ["email_address", "first_name", "last_name", "job_title", "company_name", "create_source", "birthday_month", "birthday_day", "anniversary", "custom_fields", "phone_numbers", "street_addresses", "list_memberships", "taggings", "notes"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateContactRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of email_address
+ if self.email_address:
+ _dict['email_address'] = self.email_address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list)
+ _items = []
+ if self.custom_fields:
+ for _item in self.custom_fields:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['custom_fields'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in phone_numbers (list)
+ _items = []
+ if self.phone_numbers:
+ for _item in self.phone_numbers:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['phone_numbers'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in street_addresses (list)
+ _items = []
+ if self.street_addresses:
+ for _item in self.street_addresses:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['street_addresses'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in notes (list)
+ _items = []
+ if self.notes:
+ for _item in self.notes:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['notes'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateContactRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_address": CreateContactRequestEmailAddress.from_dict(obj.get("email_address")) if obj.get("email_address") is not None else None,
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "job_title": obj.get("job_title"),
+ "company_name": obj.get("company_name"),
+ "create_source": obj.get("create_source"),
+ "birthday_month": obj.get("birthday_month"),
+ "birthday_day": obj.get("birthday_day"),
+ "anniversary": obj.get("anniversary"),
+ "custom_fields": [GetContactById200ResponseCustomFieldsInner.from_dict(_item) for _item in obj.get("custom_fields")] if obj.get("custom_fields") is not None else None,
+ "phone_numbers": [UpdateContactRequestPhoneNumbersInner.from_dict(_item) for _item in obj.get("phone_numbers")] if obj.get("phone_numbers") is not None else None,
+ "street_addresses": [UpdateContactRequestStreetAddressesInner.from_dict(_item) for _item in obj.get("street_addresses")] if obj.get("street_addresses") is not None else None,
+ "list_memberships": obj.get("list_memberships"),
+ "taggings": obj.get("taggings"),
+ "notes": [GetContactById200ResponseNotesInner.from_dict(_item) for _item in obj.get("notes")] if obj.get("notes") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_contact_request_email_address.py b/constant_contact_api_client/models/create_contact_request_email_address.py
new file mode 100644
index 0000000..a1aaa03
--- /dev/null
+++ b/constant_contact_api_client/models/create_contact_request_email_address.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateContactRequestEmailAddress(BaseModel):
+ """
+ The contact's email address and related properties.
+ """ # noqa: E501
+ address: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The contact's email address.")
+ permission_to_send: Optional[StrictStr] = Field(default=None, description="Identifies the type of permission that the Constant Contact account has been granted to send email to the contact. Types of permission: explicit, implicit, not_set, pending_confirmation, temp_hold, unsubscribed.")
+ __properties: ClassVar[List[str]] = ["address", "permission_to_send"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateContactRequestEmailAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateContactRequestEmailAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "address": obj.get("address"),
+ "permission_to_send": obj.get("permission_to_send")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_csv_import_activity201_response.py b/constant_contact_api_client/models/create_csv_import_activity201_response.py
new file mode 100644
index 0000000..836bc64
--- /dev/null
+++ b/constant_contact_api_client/models/create_csv_import_activity201_response.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.create_csv_import_activity201_response_links import CreateCSVImportActivity201ResponseLinks
+from constant_contact_api_client.models.create_csv_import_activity201_response_status import CreateCSVImportActivity201ResponseStatus
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateCSVImportActivity201Response(BaseModel):
+ """
+ Activity status for contacts_json_import and contacts_file_import activities
+ """ # noqa: E501
+ activity_id: Optional[StrictStr] = Field(default=None, description="Unique ID for the activity.")
+ state: Optional[StrictStr] = Field(default=None, description="The state of the request: contact_id
to delete; mutually exclusive with list_ids
.")
+ list_ids: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="The contacts on the lists (up to 50) specified will be deleted; mutually exclusive with contact_ids
.")
+ __properties: ClassVar[List[str]] = ["contact_ids", "list_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateDeleteActivityRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateDeleteActivityRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_ids": obj.get("contact_ids"),
+ "list_ids": obj.get("list_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_email_campaign200_response.py b/constant_contact_api_client/models/create_email_campaign200_response.py
new file mode 100644
index 0000000..e6435f2
--- /dev/null
+++ b/constant_contact_api_client/models/create_email_campaign200_response.py
@@ -0,0 +1,117 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_email_campaign200_response_campaign_activities_inner import CreateEmailCampaign200ResponseCampaignActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateEmailCampaign200Response(BaseModel):
+ """
+ CreateEmailCampaign200Response
+ """ # noqa: E501
+ campaign_activities: Optional[List[CreateEmailCampaign200ResponseCampaignActivitiesInner]] = Field(default=None, description="Lists the role and unique activity ID of each campaign activity that is associated with an Email Campaign.")
+ campaign_id: Optional[StrictStr] = Field(default=None, description="The unique ID used to identify the email campaign (UUID format).")
+ created_at: Optional[datetime] = Field(default=None, description="The system generated date and time that this email campaign was created. This string is readonly and is in ISO-8601 format.")
+ current_status: Optional[StrictStr] = Field(default=None, description="The current status of the email campaign. Valid values are: primary_email
contains the complete email content.primary_email
content without any personalized email information. For example, permalinks do not contain any of the contact details that you add to the primary_email
email content. primary_email
and a permalink
role campaign activity when you create an email campaign. ")
+ __properties: ClassVar[List[str]] = ["campaign_activity_id", "role"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateEmailCampaign200ResponseCampaignActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateEmailCampaign200ResponseCampaignActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "role": obj.get("role")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_email_campaign_request.py b/constant_contact_api_client/models/create_email_campaign_request.py
new file mode 100644
index 0000000..44cdc39
--- /dev/null
+++ b/constant_contact_api_client/models/create_email_campaign_request.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_email_campaign_request_email_campaign_activities_inner import CreateEmailCampaignRequestEmailCampaignActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateEmailCampaignRequest(BaseModel):
+ """
+ CreateEmailCampaignRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The unique and descriptive name that you specify for the email campaign.")
+ email_campaign_activities: List[CreateEmailCampaignRequestEmailCampaignActivitiesInner] = Field(description="The content of the email campaign as an array that contains a single email campaign activity object.")
+ __properties: ClassVar[List[str]] = ["name", "email_campaign_activities"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateEmailCampaignRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in email_campaign_activities (list)
+ _items = []
+ if self.email_campaign_activities:
+ for _item in self.email_campaign_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['email_campaign_activities'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateEmailCampaignRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "email_campaign_activities": [CreateEmailCampaignRequestEmailCampaignActivitiesInner.from_dict(_item) for _item in obj.get("email_campaign_activities")] if obj.get("email_campaign_activities") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_email_campaign_request_email_campaign_activities_inner.py b/constant_contact_api_client/models/create_email_campaign_request_email_campaign_activities_inner.py
new file mode 100644
index 0000000..8c6d4e2
--- /dev/null
+++ b/constant_contact_api_client/models/create_email_campaign_request_email_campaign_activities_inner.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer import CreateEmailCampaignRequestEmailCampaignActivitiesInnerPhysicalAddressInFooter
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateEmailCampaignRequestEmailCampaignActivitiesInner(BaseModel):
+ """
+ CreateEmailCampaignRequestEmailCampaignActivitiesInner
+ """ # noqa: E501
+ format_type: StrictInt = Field(description="The email format you are using to create the email campaign activity. The V3 API supports creating emails using format_type
5 (custom code emails). ")
+ from_name: Annotated[str, Field(strict=True, max_length=100)] = Field(description="The email sender's name to display for the email campaign activity.")
+ from_email: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The sender's email address to use for the email campaign activity. You must use a confirmed Constant Contact account email address. Make a GET call to /account/emails
to return a collection of account emails and their confirmation status.")
+ reply_to_email: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The sender's email address to use if the contact replies to the email campaign activity. You must use a confirmed Constant Contact account email address. Make a GET call to /account/emails
to return a collection of account emails and their confirmation status.")
+ subject: StrictStr = Field(description="The text to display in the subject line that describes the email campaign activity.")
+ preheader: Optional[StrictStr] = Field(default=None, description="The email preheader for the email campaign activity. Contacts will view your preheader as a short summary that follows the subject line in their email client. Only format_type
3, 4, and 5 email campaign activities use the preheader property.")
+ html_content: Annotated[str, Field(strict=True, max_length=150000)] = Field(description="The HTML content for the email campaign activity. Only format_type
5 (custom code emails) can contain html_content
. When creating a format_type
5 custom code email, make sure that you include [[trackingImage]]
in the <body>
element of your HTML. ")
+ physical_address_in_footer: Optional[CreateEmailCampaignRequestEmailCampaignActivitiesInnerPhysicalAddressInFooter] = None
+ __properties: ClassVar[List[str]] = ["format_type", "from_name", "from_email", "reply_to_email", "subject", "preheader", "html_content", "physical_address_in_footer"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateEmailCampaignRequestEmailCampaignActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of physical_address_in_footer
+ if self.physical_address_in_footer:
+ _dict['physical_address_in_footer'] = self.physical_address_in_footer.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateEmailCampaignRequestEmailCampaignActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "format_type": obj.get("format_type"),
+ "from_name": obj.get("from_name"),
+ "from_email": obj.get("from_email"),
+ "reply_to_email": obj.get("reply_to_email"),
+ "subject": obj.get("subject"),
+ "preheader": obj.get("preheader"),
+ "html_content": obj.get("html_content"),
+ "physical_address_in_footer": CreateEmailCampaignRequestEmailCampaignActivitiesInnerPhysicalAddressInFooter.from_dict(obj.get("physical_address_in_footer")) if obj.get("physical_address_in_footer") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer.py b/constant_contact_api_client/models/create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer.py
new file mode 100644
index 0000000..ea68e3c
--- /dev/null
+++ b/constant_contact_api_client/models/create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateEmailCampaignRequestEmailCampaignActivitiesInnerPhysicalAddressInFooter(BaseModel):
+ """
+ The physical address for the organization that is sending the email campaign. Constant Contact displays this information to contacts in the email message footer. If you do not include a physical address in the email campaign activity, Constant Contact will use the physical address information saved for the Constant Contact user account.
+ """ # noqa: E501
+ address_line1: StrictStr = Field(description="Line 1 of the organization's street address.")
+ address_line2: Optional[StrictStr] = Field(default=None, description="Line 2 of the organization's street address.")
+ address_line3: Optional[StrictStr] = Field(default=None, description="Line 3 of the organization's street address.")
+ address_optional: Optional[StrictStr] = Field(default=None, description="An optional address field for the organization. Only format_type
3, 4, and 5 can use this property.")
+ city: Optional[StrictStr] = Field(default=None, description="The city where the organization sending the email campaign is located.")
+ country_code: StrictStr = Field(description="The uppercase two letter ISO 3166-1 code for the organization's country.")
+ country_name: Optional[StrictStr] = Field(default=None, description="The full name of the country where the organization sending the email is located. Automatically generated using the country_code
.")
+ organization_name: StrictStr = Field(description="The name of the organization that is sending the email campaign.")
+ postal_code: Optional[StrictStr] = Field(default=None, description="The postal code address (ZIP code) of the organization.")
+ state_code: Optional[StrictStr] = Field(default=None, description="The uppercase two letter ISO 3166-1 code for the organization's state. This property is required if the country_code
is US (United States).")
+ state_name: Optional[StrictStr] = Field(default=None, description="The full state name for a state_code
that is inside the United States. Automatically generated using the state_code
.")
+ state_non_us_name: Optional[StrictStr] = Field(default=None, description="The full state name for a state_code
that is outside the United States. This property is not read only.")
+ __properties: ClassVar[List[str]] = ["address_line1", "address_line2", "address_line3", "address_optional", "city", "country_code", "country_name", "organization_name", "postal_code", "state_code", "state_name", "state_non_us_name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateEmailCampaignRequestEmailCampaignActivitiesInnerPhysicalAddressInFooter from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "country_name",
+ "state_name",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateEmailCampaignRequestEmailCampaignActivitiesInnerPhysicalAddressInFooter from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "address_line1": obj.get("address_line1"),
+ "address_line2": obj.get("address_line2"),
+ "address_line3": obj.get("address_line3"),
+ "address_optional": obj.get("address_optional"),
+ "city": obj.get("city"),
+ "country_code": obj.get("country_code"),
+ "country_name": obj.get("country_name"),
+ "organization_name": obj.get("organization_name"),
+ "postal_code": obj.get("postal_code"),
+ "state_code": obj.get("state_code"),
+ "state_name": obj.get("state_name"),
+ "state_non_us_name": obj.get("state_non_us_name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_export_activity201_response.py b/constant_contact_api_client/models/create_export_activity201_response.py
new file mode 100644
index 0000000..830cefd
--- /dev/null
+++ b/constant_contact_api_client/models/create_export_activity201_response.py
@@ -0,0 +1,128 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.create_export_activity201_response_status import CreateExportActivity201ResponseStatus
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links import GetAllActivities200ResponseActivitiesInnerLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateExportActivity201Response(BaseModel):
+ """
+ Activity status for contact_exports activity
+ """ # noqa: E501
+ activity_id: Optional[StrictStr] = Field(default=None, description="Unique ID for the activity.")
+ state: Optional[StrictStr] = Field(default=None, description="The state of the request:
list_ids
.")
+ list_ids: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Exports all of the contacts inside of up to 50 contact lists. This property is mutually exclusive with contact_ids
.")
+ segment_id: Optional[StrictInt] = Field(default=None, description="Specify the segment_id
from which you want to export all contacts that meet the specified segment_criteria
. This property is mutually exclusive with contact_ids
and list_ids
. You can only specify one segment_id
.")
+ fields: Optional[List[StrictStr]] = Field(default=None, description="Use this array to export specific contact fields. You must export email_address
to successfully export email_optin_source
, email_optin_date
, email_optout_source
, email_optout_date
, or email_optout_reason
.")
+ status: Optional[StrictStr] = Field(default=None, description="Allows you to export only contacts that have a specific status value. Possible values are active
(billable), unsubscribed
, or removed
. Applicable with either `contact_ids` or `list_ids` as the source.")
+ __properties: ClassVar[List[str]] = ["contact_ids", "list_ids", "segment_id", "fields", "status"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateExportActivityRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateExportActivityRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_ids": obj.get("contact_ids"),
+ "list_ids": obj.get("list_ids"),
+ "segment_id": obj.get("segment_id"),
+ "fields": obj.get("fields"),
+ "status": obj.get("status")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_import_json_activity_request.py b/constant_contact_api_client/models/create_import_json_activity_request.py
new file mode 100644
index 0000000..e7015f0
--- /dev/null
+++ b/constant_contact_api_client/models/create_import_json_activity_request.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_import_json_activity_request_import_data_inner import CreateImportJSONActivityRequestImportDataInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateImportJSONActivityRequest(BaseModel):
+ """
+ CreateImportJSONActivityRequest
+ """ # noqa: E501
+ import_data: List[CreateImportJSONActivityRequestImportDataInner] = Field(description="An array containing the contacts to import.")
+ list_ids: Annotated[List[StrictStr], Field(min_length=1, max_length=50)] = Field(description="Specify which contact lists you are adding all imported contacts to as an array of up to 50 contact list_id
string values.")
+ sms_permission_to_send: Optional[StrictStr] = Field(default=None, description="Specifies if the contact gave explicit
SMS permission or if the SMS permission was not set (not_set
). If `explicit, the sms_consent_date
must be provided.")
+ __properties: ClassVar[List[str]] = ["import_data", "list_ids", "sms_permission_to_send"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateImportJSONActivityRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in import_data (list)
+ _items = []
+ if self.import_data:
+ for _item in self.import_data:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['import_data'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateImportJSONActivityRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "import_data": [CreateImportJSONActivityRequestImportDataInner.from_dict(_item) for _item in obj.get("import_data")] if obj.get("import_data") is not None else None,
+ "list_ids": obj.get("list_ids"),
+ "sms_permission_to_send": obj.get("sms_permission_to_send")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_import_json_activity_request_import_data_inner.py b/constant_contact_api_client/models/create_import_json_activity_request_import_data_inner.py
new file mode 100644
index 0000000..e5303cc
--- /dev/null
+++ b/constant_contact_api_client/models/create_import_json_activity_request_import_data_inner.py
@@ -0,0 +1,169 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateImportJSONActivityRequestImportDataInner(BaseModel):
+ """
+ CreateImportJSONActivityRequestImportDataInner
+ """ # noqa: E501
+ email: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The email address of the contact. This method identifies each unique contact using their email address.")
+ first_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The last name of the contact.")
+ job_title: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The job title of the contact.")
+ company_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the company where the contact works.")
+ birthday_month: Optional[StrictInt] = Field(default=None, description="The month value for the contact's birthday. Valid values are from 1 through 12. The birthday_month
property is required if you use birthday_day
.")
+ birthday_day: Optional[StrictInt] = Field(default=None, description="The day value for the contact's birthday. Valid values are from 1 through 31. The birthday_day
property is required if you use birthday_month
.")
+ anniversary: Optional[StrictStr] = Field(default=None, description="The anniversary date for the contact. For example, this value could be the date when the contact first became a customer of an organization in Constant Contact. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY.")
+ phone: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The primary phone number for the contact. Use this field to add the default kind of phone number to the imported contact's phone number. Default kind
is other
.")
+ home_phone: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The home phone number for the contact.")
+ work_phone: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The work phone number for the contact.")
+ mobile_phone: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The mobile phone number for the contact.")
+ other_phone: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="A phone number for the contact.")
+ street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line one of the primary street address for the contact. Use this field to add the default kind of street to the imported contact's street address. The default kind
is home
. which maps to the street_addresses
array` in the response.")
+ street2: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line two of the primary street address for the contact. This value is automatically appended to the street
value. Use this field to add the default kind for line two of the street address to the imported contact's address. The default kind
is other
.")
+ city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the primary city for the contact. Use this field to add the default kind of city to the imported contact's home address. The default kind
is home
.")
+ state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the primary state or province for the contact. Use this field to add the default kind of state to the imported contact's home address. The default kind
is home
.")
+ zip: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code associated with the contact's primary address. Use this field to add the default kind of zip to the imported contact's street address. The default kind
is home
.")
+ country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the primary country where the contact is located. Use this field to add the default kind of country to the imported contact's street address. The default kind
is home
.")
+ home_street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line one of the home street address for the contact.")
+ home_street2: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line two of the home street address for the contact. This value is automatically appended to the home_street
value.")
+ home_city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the city where the contact lives.")
+ home_state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the home state or province where the contact lives.")
+ home_zip: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code associated with the contact's home address.")
+ home_country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the country where the contact lives.", alias="home country")
+ work_street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line one of the work street address for the contact.")
+ work_street2: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line two of the work street address for the contact. This value is automatically appended to the work_street
value.")
+ work_city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the city where the contact works.")
+ work_state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the state or province where the contact works.")
+ work_zip: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code associated with the contact's work address.")
+ work_country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the country where the contact works.")
+ other_street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line one of the other street address for the contact.")
+ other_street2: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line two of the other street address for the contact. This value is automatically appended to the other_street
value.")
+ other_city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of another city where the contact is located.")
+ other_state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of another state or province where the contact is located.")
+ other_zip: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code associated with the contact's other address.")
+ other_country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of another country where the contact is located.")
+ cfcustom_field_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The name of this property is dynamic based on the custom fields you want to import. Use a key-value pair where the key is an existing custom field name prefixed with cf:
, and the value is a custom field string value. For example, if you have a custom field named first_name
you can use \"cf:first_name\":\"Joe\"
. Each contact can contain up to 25 different custom fields.", alias="cf:custom_field_name")
+ sms_number: Optional[Annotated[str, Field(strict=True, max_length=16)]] = Field(default=None, description="The US phone number to associate with the contact's SMS-enabled phone. The country code must be valid. Valid formats are 1231231234
or 123-123-1234
.")
+ sms_consent_date: Optional[Annotated[str, Field(strict=True, max_length=16)]] = Field(default=None, description="Required if the SMS permission is set to `explict`. The date that the contact consented to receiving SMS messages. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY .")
+ __properties: ClassVar[List[str]] = ["email", "first_name", "last_name", "job_title", "company_name", "birthday_month", "birthday_day", "anniversary", "phone", "home_phone", "work_phone", "mobile_phone", "other_phone", "street", "street2", "city", "state", "zip", "country", "home_street", "home_street2", "home_city", "home_state", "home_zip", "home country", "work_street", "work_street2", "work_city", "work_state", "work_zip", "work_country", "other_street", "other_street2", "other_city", "other_state", "other_zip", "other_country", "cf:custom_field_name", "sms_number", "sms_consent_date"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateImportJSONActivityRequestImportDataInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateImportJSONActivityRequestImportDataInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "job_title": obj.get("job_title"),
+ "company_name": obj.get("company_name"),
+ "birthday_month": obj.get("birthday_month"),
+ "birthday_day": obj.get("birthday_day"),
+ "anniversary": obj.get("anniversary"),
+ "phone": obj.get("phone"),
+ "home_phone": obj.get("home_phone"),
+ "work_phone": obj.get("work_phone"),
+ "mobile_phone": obj.get("mobile_phone"),
+ "other_phone": obj.get("other_phone"),
+ "street": obj.get("street"),
+ "street2": obj.get("street2"),
+ "city": obj.get("city"),
+ "state": obj.get("state"),
+ "zip": obj.get("zip"),
+ "country": obj.get("country"),
+ "home_street": obj.get("home_street"),
+ "home_street2": obj.get("home_street2"),
+ "home_city": obj.get("home_city"),
+ "home_state": obj.get("home_state"),
+ "home_zip": obj.get("home_zip"),
+ "home country": obj.get("home country"),
+ "work_street": obj.get("work_street"),
+ "work_street2": obj.get("work_street2"),
+ "work_city": obj.get("work_city"),
+ "work_state": obj.get("work_state"),
+ "work_zip": obj.get("work_zip"),
+ "work_country": obj.get("work_country"),
+ "other_street": obj.get("other_street"),
+ "other_street2": obj.get("other_street2"),
+ "other_city": obj.get("other_city"),
+ "other_state": obj.get("other_state"),
+ "other_zip": obj.get("other_zip"),
+ "other_country": obj.get("other_country"),
+ "cf:custom_field_name": obj.get("cf:custom_field_name"),
+ "sms_number": obj.get("sms_number"),
+ "sms_consent_date": obj.get("sms_consent_date")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_list_add_activity_request.py b/constant_contact_api_client/models/create_list_add_activity_request.py
new file mode 100644
index 0000000..882e78f
--- /dev/null
+++ b/constant_contact_api_client/models/create_list_add_activity_request.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_list_add_activity_request_exclude import CreateListAddActivityRequestExclude
+from constant_contact_api_client.models.create_list_add_activity_request_source import CreateListAddActivityRequestSource
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateListAddActivityRequest(BaseModel):
+ """
+ CreateListAddActivityRequest
+ """ # noqa: E501
+ source: CreateListAddActivityRequestSource
+ exclude: Optional[CreateListAddActivityRequestExclude] = None
+ list_ids: Annotated[List[StrictStr], Field(max_length=50)] = Field(description="Specifies which lists (up to 50) you are adding your source contacts to.")
+ __properties: ClassVar[List[str]] = ["source", "exclude", "list_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateListAddActivityRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of source
+ if self.source:
+ _dict['source'] = self.source.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of exclude
+ if self.exclude:
+ _dict['exclude'] = self.exclude.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateListAddActivityRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "source": CreateListAddActivityRequestSource.from_dict(obj.get("source")) if obj.get("source") is not None else None,
+ "exclude": CreateListAddActivityRequestExclude.from_dict(obj.get("exclude")) if obj.get("exclude") is not None else None,
+ "list_ids": obj.get("list_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_list_add_activity_request_exclude.py b/constant_contact_api_client/models/create_list_add_activity_request_exclude.py
new file mode 100644
index 0000000..5740819
--- /dev/null
+++ b/constant_contact_api_client/models/create_list_add_activity_request_exclude.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateListAddActivityRequestExclude(BaseModel):
+ """
+ CreateListAddActivityRequestExclude
+ """ # noqa: E501
+ contact_ids: Optional[List[StrictStr]] = Field(default=None, description="Excludes specified contacts (contact_id
) from being added to the target list. Applicable if using either the all_active_contacts
(billable) or list_ids
as the source.")
+ __properties: ClassVar[List[str]] = ["contact_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateListAddActivityRequestExclude from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateListAddActivityRequestExclude from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_ids": obj.get("contact_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_list_add_activity_request_source.py b/constant_contact_api_client/models/create_list_add_activity_request_source.py
new file mode 100644
index 0000000..36c66a2
--- /dev/null
+++ b/constant_contact_api_client/models/create_list_add_activity_request_source.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateListAddActivityRequestSource(BaseModel):
+ """
+ The source
object specifies which contacts you are adding to your targeted lists using one of four mutually exclusive properties.
+ """ # noqa: E501
+ list_ids: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Specifies which contacts you are adding to lists as an array of up to 50 contact list_id
values. This property is mutually exclusive with contact_ids
, all_active_contacts
(billable), and segment_id
.")
+ all_active_contacts: Optional[StrictBool] = Field(default=False, description="Adds all active (billable) contacts to your targeted lists. This property is mutually exclusive with contact_ids
, list_ids
, and segment_id
.")
+ contact_ids: Optional[Annotated[List[StrictStr], Field(max_length=500)]] = Field(default=None, description="Specifies which contacts (up to 500) you are adding to lists as an array of contact_id
values. This property is mutually exclusive with list_ids
, all_active_contacts
(billable), and segment_id
.")
+ tag_ids: Optional[Annotated[List[StrictStr], Field(max_length=0)]] = Field(default=None, description="Adds all contacts assigned with the specified tag_id
s to your target lists. This property is mutually exclusive with all other source
properties.")
+ engagement_level: Optional[StrictStr] = Field(default=None, description="Adds all contacts that meet the selected engagement_level
to your target lists. This property is mutually exclusive with all other source
properties.")
+ segment_id: Optional[StrictInt] = Field(default=None, description="Specifies which contacts you are adding to lists as a single segment_id
value. This property is mutually exclusive with list_ids
, all_active_contacts
(billable), and contact_ids
.")
+ __properties: ClassVar[List[str]] = ["list_ids", "all_active_contacts", "contact_ids", "tag_ids", "engagement_level", "segment_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateListAddActivityRequestSource from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateListAddActivityRequestSource from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "list_ids": obj.get("list_ids"),
+ "all_active_contacts": obj.get("all_active_contacts") if obj.get("all_active_contacts") is not None else False,
+ "contact_ids": obj.get("contact_ids"),
+ "tag_ids": obj.get("tag_ids"),
+ "engagement_level": obj.get("engagement_level"),
+ "segment_id": obj.get("segment_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_list_delete_activity201_response.py b/constant_contact_api_client/models/create_list_delete_activity201_response.py
new file mode 100644
index 0000000..94e257d
--- /dev/null
+++ b/constant_contact_api_client/models/create_list_delete_activity201_response.py
@@ -0,0 +1,132 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.create_list_delete_activity201_response_links import CreateListDeleteActivity201ResponseLinks
+from constant_contact_api_client.models.create_list_delete_activity201_response_status import CreateListDeleteActivity201ResponseStatus
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateListDeleteActivity201Response(BaseModel):
+ """
+ CreateListDeleteActivity201Response
+ """ # noqa: E501
+ activity_id: Optional[StrictStr] = Field(default=None, description="The system assigned UUID that uniquely identifies an activity.")
+ state: Optional[StrictStr] = Field(default=None, description="The activity processing state.")
+ started_at: Optional[datetime] = Field(default=None, description="Timestamp showing when processing started for the activity, in ISO-8601 format.")
+ completed_at: Optional[datetime] = Field(default=None, description="Timestamp showing when processing completed for the activity, in ISO-8601 format.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp showing when the activity was first requested, in ISO-8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp showing when the activity was last updated, in ISO-8601 format.")
+ percent_done: Optional[StrictInt] = Field(default=None, description="The processing percent complete for the activity.")
+ activity_errors: Optional[List[StrictStr]] = Field(default=None, description="An array of error message strings describing the errors that occurred.")
+ status: Optional[CreateListDeleteActivity201ResponseStatus] = None
+ links: Optional[CreateListDeleteActivity201ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["activity_id", "state", "started_at", "completed_at", "created_at", "updated_at", "percent_done", "activity_errors", "status", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateListDeleteActivity201Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "activity_id",
+ "state",
+ "started_at",
+ "completed_at",
+ "created_at",
+ "updated_at",
+ "percent_done",
+ "activity_errors",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of status
+ if self.status:
+ _dict['status'] = self.status.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateListDeleteActivity201Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "activity_id": obj.get("activity_id"),
+ "state": obj.get("state"),
+ "started_at": obj.get("started_at"),
+ "completed_at": obj.get("completed_at"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "percent_done": obj.get("percent_done"),
+ "activity_errors": obj.get("activity_errors"),
+ "status": CreateListDeleteActivity201ResponseStatus.from_dict(obj.get("status")) if obj.get("status") is not None else None,
+ "_links": CreateListDeleteActivity201ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_list_delete_activity201_response_links.py b/constant_contact_api_client/models/create_list_delete_activity201_response_links.py
new file mode 100644
index 0000000..93c723d
--- /dev/null
+++ b/constant_contact_api_client/models/create_list_delete_activity201_response_links.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.create_list_delete_activity201_response_links_self import CreateListDeleteActivity201ResponseLinksSelf
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateListDeleteActivity201ResponseLinks(BaseModel):
+ """
+ CreateListDeleteActivity201ResponseLinks
+ """ # noqa: E501
+ var_self: Optional[CreateListDeleteActivity201ResponseLinksSelf] = Field(default=None, alias="self")
+ __properties: ClassVar[List[str]] = ["self"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateListDeleteActivity201ResponseLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of var_self
+ if self.var_self:
+ _dict['self'] = self.var_self.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateListDeleteActivity201ResponseLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "self": CreateListDeleteActivity201ResponseLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_list_delete_activity201_response_links_self.py b/constant_contact_api_client/models/create_list_delete_activity201_response_links_self.py
new file mode 100644
index 0000000..f97ebed
--- /dev/null
+++ b/constant_contact_api_client/models/create_list_delete_activity201_response_links_self.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateListDeleteActivity201ResponseLinksSelf(BaseModel):
+ """
+ Link to the activity status to use in tracking the request status.
+ """ # noqa: E501
+ href: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateListDeleteActivity201ResponseLinksSelf from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateListDeleteActivity201ResponseLinksSelf from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_list_delete_activity201_response_status.py b/constant_contact_api_client/models/create_list_delete_activity201_response_status.py
new file mode 100644
index 0000000..09d17b7
--- /dev/null
+++ b/constant_contact_api_client/models/create_list_delete_activity201_response_status.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateListDeleteActivity201ResponseStatus(BaseModel):
+ """
+ CreateListDeleteActivity201ResponseStatus
+ """ # noqa: E501
+ list_count: Optional[StrictInt] = Field(default=None, description="The number of lists deleted.")
+ __properties: ClassVar[List[str]] = ["list_count"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateListDeleteActivity201ResponseStatus from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateListDeleteActivity201ResponseStatus from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "list_count": obj.get("list_count")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_list_delete_activity_request.py b/constant_contact_api_client/models/create_list_delete_activity_request.py
new file mode 100644
index 0000000..51cb98c
--- /dev/null
+++ b/constant_contact_api_client/models/create_list_delete_activity_request.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateListDeleteActivityRequest(BaseModel):
+ """
+ CreateListDeleteActivityRequest
+ """ # noqa: E501
+ list_ids: Annotated[List[StrictStr], Field(max_length=100)] = Field(description="The array of contact lists list_id
to delete.")
+ __properties: ClassVar[List[str]] = ["list_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateListDeleteActivityRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateListDeleteActivityRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "list_ids": obj.get("list_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_list_remove_activity201_response.py b/constant_contact_api_client/models/create_list_remove_activity201_response.py
new file mode 100644
index 0000000..f09d39b
--- /dev/null
+++ b/constant_contact_api_client/models/create_list_remove_activity201_response.py
@@ -0,0 +1,128 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.create_csv_import_activity201_response_links import CreateCSVImportActivity201ResponseLinks
+from constant_contact_api_client.models.create_list_remove_activity201_response_status import CreateListRemoveActivity201ResponseStatus
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateListRemoveActivity201Response(BaseModel):
+ """
+ CreateListRemoveActivity201Response
+ """ # noqa: E501
+ activity_id: Optional[StrictStr] = Field(default=None, description="Unique ID for the activity.")
+ state: Optional[StrictStr] = Field(default=None, description="The state of the request: list_id
s from which to remove contacts.")
+ __properties: ClassVar[List[str]] = ["source", "exclude", "list_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateListRemoveActivityRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of source
+ if self.source:
+ _dict['source'] = self.source.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of exclude
+ if self.exclude:
+ _dict['exclude'] = self.exclude.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateListRemoveActivityRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "source": CreateListRemoveActivityRequestSource.from_dict(obj.get("source")) if obj.get("source") is not None else None,
+ "exclude": CreateListRemoveActivityRequestExclude.from_dict(obj.get("exclude")) if obj.get("exclude") is not None else None,
+ "list_ids": obj.get("list_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_list_remove_activity_request_exclude.py b/constant_contact_api_client/models/create_list_remove_activity_request_exclude.py
new file mode 100644
index 0000000..c53a8ff
--- /dev/null
+++ b/constant_contact_api_client/models/create_list_remove_activity_request_exclude.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateListRemoveActivityRequestExclude(BaseModel):
+ """
+ CreateListRemoveActivityRequestExclude
+ """ # noqa: E501
+ contact_ids: Optional[List[StrictStr]] = Field(default=None, description="Excludes specified contacts (contact_id
) from being deleted from the target list and only applicable if using either the all_active_contacts
(billable) or list_ids
as the source.")
+ __properties: ClassVar[List[str]] = ["contact_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateListRemoveActivityRequestExclude from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateListRemoveActivityRequestExclude from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_ids": obj.get("contact_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_list_remove_activity_request_source.py b/constant_contact_api_client/models/create_list_remove_activity_request_source.py
new file mode 100644
index 0000000..cf004c6
--- /dev/null
+++ b/constant_contact_api_client/models/create_list_remove_activity_request_source.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateListRemoveActivityRequestSource(BaseModel):
+ """
+ Specifies the contacts to remove from your target list(s) using one of several mutually exclusive properties.
+ """ # noqa: E501
+ list_ids: Optional[Annotated[List[StrictStr], Field(max_length=0)]] = Field(default=None, description="Include up to 50 list_id
values to remove all contact list members from your target list(s). This property is mutually exclusive with all other source
properties.")
+ contact_ids: Optional[Annotated[List[StrictStr], Field(max_length=0)]] = Field(default=None, description="Include up to 500 contact_id
values to remove the contacts from your target lists. This property is mutually exclusive with all other source
properties.")
+ all_active_contacts: Optional[StrictBool] = Field(default=False, description="Removes all active (billable) contacts from your targeted lists. This property is mutually exclusive with all other source
properties.")
+ engagement_level: Optional[StrictStr] = Field(default=None, description="Removes all contacts that meet the selected engagement_level
to your target lists. This property is mutually exclusive with all other source
properties.")
+ tag_ids: Optional[Annotated[List[StrictStr], Field(max_length=0)]] = Field(default=None, description="Removes all contacts assigned with the specified tag_id
s from your target lists. This property is mutually exclusive with all other source
properties.")
+ __properties: ClassVar[List[str]] = ["list_ids", "contact_ids", "all_active_contacts", "engagement_level", "tag_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateListRemoveActivityRequestSource from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateListRemoveActivityRequestSource from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "list_ids": obj.get("list_ids"),
+ "contact_ids": obj.get("contact_ids"),
+ "all_active_contacts": obj.get("all_active_contacts") if obj.get("all_active_contacts") is not None else False,
+ "engagement_level": obj.get("engagement_level"),
+ "tag_ids": obj.get("tag_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_or_update_contact200_response.py b/constant_contact_api_client/models/create_or_update_contact200_response.py
new file mode 100644
index 0000000..0fe474b
--- /dev/null
+++ b/constant_contact_api_client/models/create_or_update_contact200_response.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateOrUpdateContact200Response(BaseModel):
+ """
+ CreateOrUpdateContact200Response
+ """ # noqa: E501
+ contact_id: Optional[StrictStr] = Field(default=None, description="The unique identifier for the contact that the V3 API created or updated.")
+ action: Optional[StrictStr] = Field(default=None, description="Identifies if the V3 API created a new contact or updated an existing contact.")
+ __properties: ClassVar[List[str]] = ["contact_id", "action"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateOrUpdateContact200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateOrUpdateContact200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "action": obj.get("action")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_or_update_contact_custom_field.py b/constant_contact_api_client/models/create_or_update_contact_custom_field.py
new file mode 100644
index 0000000..7feb337
--- /dev/null
+++ b/constant_contact_api_client/models/create_or_update_contact_custom_field.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateOrUpdateContactCustomField(BaseModel):
+ """
+ CreateOrUpdateContactCustomField
+ """ # noqa: E501
+ custom_field_id: Optional[StrictStr] = Field(default=None, description="The unique ID for the custom_field
.")
+ value: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The value of the custom_field
.")
+ __properties: ClassVar[List[str]] = ["custom_field_id", "value"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateOrUpdateContactCustomField from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateOrUpdateContactCustomField from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "custom_field_id": obj.get("custom_field_id"),
+ "value": obj.get("value")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_or_update_contact_request.py b/constant_contact_api_client/models/create_or_update_contact_request.py
new file mode 100644
index 0000000..7bf6dde
--- /dev/null
+++ b/constant_contact_api_client/models/create_or_update_contact_request.py
@@ -0,0 +1,125 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_or_update_contact_request_custom_fields_inner import CreateOrUpdateContactRequestCustomFieldsInner
+from constant_contact_api_client.models.create_or_update_contact_request_street_address import CreateOrUpdateContactRequestStreetAddress
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateOrUpdateContactRequest(BaseModel):
+ """
+ CreateOrUpdateContactRequest
+ """ # noqa: E501
+ email_address: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The email address for the contact. This method identifies each unique contact using their email address. If the email address exists in the account, this method updates the contact. If the email address is new, this method creates a new contact.")
+ first_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The last name of the contact.")
+ job_title: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The job title of the contact.")
+ company_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the company where the contact works.")
+ phone_number: Optional[Annotated[str, Field(strict=True, max_length=25)]] = Field(default=None, description="The phone number for the contact.")
+ list_memberships: Annotated[List[StrictStr], Field(min_length=1, max_length=50)] = Field(description="The contact lists you want to add the contact to as an array of up to 50 contact list_id
values. You must include at least one list_id
.")
+ custom_fields: Optional[Annotated[List[CreateOrUpdateContactRequestCustomFieldsInner], Field(max_length=50)]] = Field(default=None, description="The custom fields you want to add to the contact as an array of up to 50 custom field objects.")
+ anniversary: Optional[StrictStr] = Field(default=None, description="The anniversary date for the contact. For example, this value could be the date when the contact first became a customer of an organization in Constant Contact. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY. ")
+ birthday_month: Optional[StrictInt] = Field(default=None, description="The month value for the contact's birthday. Valid values are from 1 through 12. The birthday_month
property is required if you use birthday_day
.")
+ birthday_day: Optional[StrictInt] = Field(default=None, description="The day value for the contact's birthday. Valid values are from 1 through 31. The birthday_day
property is required if you use birthday_month
.")
+ street_address: Optional[CreateOrUpdateContactRequestStreetAddress] = None
+ __properties: ClassVar[List[str]] = ["email_address", "first_name", "last_name", "job_title", "company_name", "phone_number", "list_memberships", "custom_fields", "anniversary", "birthday_month", "birthday_day", "street_address"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateOrUpdateContactRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list)
+ _items = []
+ if self.custom_fields:
+ for _item in self.custom_fields:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['custom_fields'] = _items
+ # override the default output from pydantic by calling `to_dict()` of street_address
+ if self.street_address:
+ _dict['street_address'] = self.street_address.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateOrUpdateContactRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "job_title": obj.get("job_title"),
+ "company_name": obj.get("company_name"),
+ "phone_number": obj.get("phone_number"),
+ "list_memberships": obj.get("list_memberships"),
+ "custom_fields": [CreateOrUpdateContactRequestCustomFieldsInner.from_dict(_item) for _item in obj.get("custom_fields")] if obj.get("custom_fields") is not None else None,
+ "anniversary": obj.get("anniversary"),
+ "birthday_month": obj.get("birthday_month"),
+ "birthday_day": obj.get("birthday_day"),
+ "street_address": CreateOrUpdateContactRequestStreetAddress.from_dict(obj.get("street_address")) if obj.get("street_address") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_or_update_contact_request_custom_fields_inner.py b/constant_contact_api_client/models/create_or_update_contact_request_custom_fields_inner.py
new file mode 100644
index 0000000..9712f27
--- /dev/null
+++ b/constant_contact_api_client/models/create_or_update_contact_request_custom_fields_inner.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateOrUpdateContactRequestCustomFieldsInner(BaseModel):
+ """
+ CreateOrUpdateContactRequestCustomFieldsInner
+ """ # noqa: E501
+ custom_field_id: Optional[StrictStr] = Field(default=None, description="The unique ID for the custom_field
.")
+ value: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The value of the custom_field
.")
+ __properties: ClassVar[List[str]] = ["custom_field_id", "value"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateOrUpdateContactRequestCustomFieldsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateOrUpdateContactRequestCustomFieldsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "custom_field_id": obj.get("custom_field_id"),
+ "value": obj.get("value")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_or_update_contact_request_street_address.py b/constant_contact_api_client/models/create_or_update_contact_request_street_address.py
new file mode 100644
index 0000000..afd25b3
--- /dev/null
+++ b/constant_contact_api_client/models/create_or_update_contact_request_street_address.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateOrUpdateContactRequestStreetAddress(BaseModel):
+ """
+ CreateOrUpdateContactRequestStreetAddress
+ """ # noqa: E501
+ kind: StrictStr = Field(description="The type of street address for the contact. Valid values are home
, work
, or other
.")
+ street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The number and street of the contact's address.")
+ city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the city for the contact's address.")
+ state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the state or province for the contact's address.")
+ postal_code: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code for the contact's address.")
+ country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the country for the contact's address.")
+ __properties: ClassVar[List[str]] = ["kind", "street", "city", "state", "postal_code", "country"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateOrUpdateContactRequestStreetAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateOrUpdateContactRequestStreetAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "kind": obj.get("kind"),
+ "street": obj.get("street"),
+ "city": obj.get("city"),
+ "state": obj.get("state"),
+ "postal_code": obj.get("postal_code"),
+ "country": obj.get("country")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_resend_email_campaign201_response.py b/constant_contact_api_client/models/create_resend_email_campaign201_response.py
new file mode 100644
index 0000000..86ed85c
--- /dev/null
+++ b/constant_contact_api_client/models/create_resend_email_campaign201_response.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateResendEmailCampaign201Response(BaseModel):
+ """
+ CreateResendEmailCampaign201Response
+ """ # noqa: E501
+ resend_subject: Optional[StrictStr] = Field(default=None, description="The subject line for the resend email.")
+ delay_days: Optional[StrictInt] = Field(default=None, description="The number of days to wait before Constant Contact resends the email. Valid values include 1
to 10
days. This property is mutually exclusive with delay_minutes
. This value is only returned in the response results if the resend activity was created with delay_days
or the delay_minutes
equal to an exact day value.")
+ delay_minutes: Optional[StrictInt] = Field(default=None, description="The number of minutes to wait before Constant Contact resends the email. There are 1,440 minutes in a day. Valid values includes a minimum of 720
(12 hours) and a maximum of 14,400
minutes (10 days). This property is mutually exclusive with delay_days
.")
+ resend_date: Optional[datetime] = Field(default=None, description="The system generated ISO-8601 format date and time that Constant Contact resent the email to non-openers.")
+ resend_request_id: Optional[StrictStr] = Field(default=None, description="For scheduled or sent resend to non-opener emails, this property is a unique identifier for the resend. For draft email campaign resend activities, the value of this property is DRAFT
.")
+ __properties: ClassVar[List[str]] = ["resend_subject", "delay_days", "delay_minutes", "resend_date", "resend_request_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateResendEmailCampaign201Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "resend_date",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateResendEmailCampaign201Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "resend_subject": obj.get("resend_subject"),
+ "delay_days": obj.get("delay_days"),
+ "delay_minutes": obj.get("delay_minutes"),
+ "resend_date": obj.get("resend_date"),
+ "resend_request_id": obj.get("resend_request_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_resend_email_campaign_request.py b/constant_contact_api_client/models/create_resend_email_campaign_request.py
new file mode 100644
index 0000000..ec62645
--- /dev/null
+++ b/constant_contact_api_client/models/create_resend_email_campaign_request.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateResendEmailCampaignRequest(BaseModel):
+ """
+ CreateResendEmailCampaignRequest
+ """ # noqa: E501
+ resend_subject: StrictStr = Field(description="The subject line used when resending the email campaign activity.")
+ delay_days: Optional[StrictInt] = Field(default=None, description="The number of days to wait before Constant Contact resends the email. Valid values include 1
to 10
days. This property is mutually exclusive with delay_minutes
. This value is only returned in the response results if the resend activity was created with delay_days
or the delay_minutes
equal to an exact day value.")
+ delay_minutes: Optional[StrictInt] = Field(default=None, description="The number of minutes to wait before Constant Contact resends the email campaign activity. There are 1,440 minutes in a day. Valid values includes a minimum of 720
(12 hours) and a maximum of 14,400
minutes (10 days). This property is mutually exclusive with delay_days
")
+ __properties: ClassVar[List[str]] = ["resend_subject", "delay_days", "delay_minutes"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateResendEmailCampaignRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateResendEmailCampaignRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "resend_subject": obj.get("resend_subject"),
+ "delay_days": obj.get("delay_days"),
+ "delay_minutes": obj.get("delay_minutes")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_segment201_response.py b/constant_contact_api_client/models/create_segment201_response.py
new file mode 100644
index 0000000..2f28d66
--- /dev/null
+++ b/constant_contact_api_client/models/create_segment201_response.py
@@ -0,0 +1,105 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateSegment201Response(BaseModel):
+ """
+ CreateSegment201Response
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="The segment's unique descriptive name.")
+ segment_criteria: Optional[Annotated[str, Field(strict=True, max_length=20000)]] = Field(default=None, description="The segment's contact selection criteria formatted as single-string escaped JSON.")
+ segment_id: Optional[StrictInt] = Field(default=None, description="The system generated number that uniquely identifies the segment.")
+ created_at: Optional[datetime] = Field(default=None, description="The system generated date and time (ISO-8601) that the segment was created.")
+ edited_at: Optional[datetime] = Field(default=None, description="The system generated date and time (ISO-8601) that the segment's name
or segment_criteria
was last updated.")
+ __properties: ClassVar[List[str]] = ["name", "segment_criteria", "segment_id", "created_at", "edited_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateSegment201Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "segment_id",
+ "created_at",
+ "edited_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateSegment201Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "segment_criteria": obj.get("segment_criteria"),
+ "segment_id": obj.get("segment_id"),
+ "created_at": obj.get("created_at"),
+ "edited_at": obj.get("edited_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_segment_request.py b/constant_contact_api_client/models/create_segment_request.py
new file mode 100644
index 0000000..938081c
--- /dev/null
+++ b/constant_contact_api_client/models/create_segment_request.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateSegmentRequest(BaseModel):
+ """
+ CreateSegmentRequest
+ """ # noqa: E501
+ name: StrictStr = Field(description="The segment's unique descriptive name.")
+ segment_criteria: Annotated[str, Field(strict=True, max_length=20000)] = Field(description="The segment_criteria
specifies the contact data that Constant Contact uses to evaluate and identify contacts that meet your criteria. The segment_criteria
must be formatted as single-string escaped JSON. The top-level group
type
must be add
.")
+ __properties: ClassVar[List[str]] = ["name", "segment_criteria"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateSegmentRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateSegmentRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "segment_criteria": obj.get("segment_criteria")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_tag_delete_activity_request.py b/constant_contact_api_client/models/create_tag_delete_activity_request.py
new file mode 100644
index 0000000..6a5a4c4
--- /dev/null
+++ b/constant_contact_api_client/models/create_tag_delete_activity_request.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateTagDeleteActivityRequest(BaseModel):
+ """
+ CreateTagDeleteActivityRequest
+ """ # noqa: E501
+ tag_ids: Annotated[List[StrictStr], Field(max_length=500)] = Field(description="The tag IDs (tag_ids
) to delete.")
+ __properties: ClassVar[List[str]] = ["tag_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateTagDeleteActivityRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateTagDeleteActivityRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tag_ids": obj.get("tag_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_tag_remove_activity201_response.py b/constant_contact_api_client/models/create_tag_remove_activity201_response.py
new file mode 100644
index 0000000..cd33cdd
--- /dev/null
+++ b/constant_contact_api_client/models/create_tag_remove_activity201_response.py
@@ -0,0 +1,132 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.create_tag_remove_activity201_response_links import CreateTagRemoveActivity201ResponseLinks
+from constant_contact_api_client.models.create_tag_remove_activity201_response_status import CreateTagRemoveActivity201ResponseStatus
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateTagRemoveActivity201Response(BaseModel):
+ """
+ CreateTagRemoveActivity201Response
+ """ # noqa: E501
+ activity_id: StrictStr = Field(description="The system assigned UUID that uniquely identifies an activity.")
+ state: StrictStr = Field(description="The activity processing state.")
+ started_at: Optional[datetime] = Field(default=None, description="Timestamp showing when processing started for the activity, in ISO-8601 format.")
+ completed_at: Optional[datetime] = Field(default=None, description="Timestamp showing when processing completed for the activity, in ISO-8601 format.")
+ created_at: Optional[datetime] = Field(default=None, description="Timestamp showing when the activity was first requested, in ISO-8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Timestamp showing when the activity was last updated, in ISO-8601 format.")
+ percent_done: Optional[StrictInt] = Field(default=None, description="The processing percent complete for the activity.")
+ activity_errors: Optional[List[StrictStr]] = Field(default=None, description="An array of error message strings describing the errors that occurred.")
+ status: Optional[CreateTagRemoveActivity201ResponseStatus] = None
+ links: Optional[CreateTagRemoveActivity201ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["activity_id", "state", "started_at", "completed_at", "created_at", "updated_at", "percent_done", "activity_errors", "status", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateTagRemoveActivity201Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "activity_id",
+ "state",
+ "started_at",
+ "completed_at",
+ "created_at",
+ "updated_at",
+ "percent_done",
+ "activity_errors",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of status
+ if self.status:
+ _dict['status'] = self.status.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateTagRemoveActivity201Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "activity_id": obj.get("activity_id"),
+ "state": obj.get("state"),
+ "started_at": obj.get("started_at"),
+ "completed_at": obj.get("completed_at"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "percent_done": obj.get("percent_done"),
+ "activity_errors": obj.get("activity_errors"),
+ "status": CreateTagRemoveActivity201ResponseStatus.from_dict(obj.get("status")) if obj.get("status") is not None else None,
+ "_links": CreateTagRemoveActivity201ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_tag_remove_activity201_response_links.py b/constant_contact_api_client/models/create_tag_remove_activity201_response_links.py
new file mode 100644
index 0000000..0398333
--- /dev/null
+++ b/constant_contact_api_client/models/create_tag_remove_activity201_response_links.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.create_tag_remove_activity201_response_links_results import CreateTagRemoveActivity201ResponseLinksResults
+from constant_contact_api_client.models.create_tag_remove_activity201_response_links_self import CreateTagRemoveActivity201ResponseLinksSelf
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateTagRemoveActivity201ResponseLinks(BaseModel):
+ """
+ CreateTagRemoveActivity201ResponseLinks
+ """ # noqa: E501
+ var_self: Optional[CreateTagRemoveActivity201ResponseLinksSelf] = Field(default=None, alias="self")
+ results: Optional[CreateTagRemoveActivity201ResponseLinksResults] = None
+ __properties: ClassVar[List[str]] = ["self", "results"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateTagRemoveActivity201ResponseLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of var_self
+ if self.var_self:
+ _dict['self'] = self.var_self.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of results
+ if self.results:
+ _dict['results'] = self.results.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateTagRemoveActivity201ResponseLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "self": CreateTagRemoveActivity201ResponseLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None,
+ "results": CreateTagRemoveActivity201ResponseLinksResults.from_dict(obj.get("results")) if obj.get("results") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_tag_remove_activity201_response_links_results.py b/constant_contact_api_client/models/create_tag_remove_activity201_response_links_results.py
new file mode 100644
index 0000000..1066aef
--- /dev/null
+++ b/constant_contact_api_client/models/create_tag_remove_activity201_response_links_results.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateTagRemoveActivity201ResponseLinksResults(BaseModel):
+ """
+ CreateTagRemoveActivity201ResponseLinksResults
+ """ # noqa: E501
+ href: Optional[StrictStr] = Field(default=None, description="Use this link to view activity results.")
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateTagRemoveActivity201ResponseLinksResults from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateTagRemoveActivity201ResponseLinksResults from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_tag_remove_activity201_response_links_self.py b/constant_contact_api_client/models/create_tag_remove_activity201_response_links_self.py
new file mode 100644
index 0000000..83d0051
--- /dev/null
+++ b/constant_contact_api_client/models/create_tag_remove_activity201_response_links_self.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateTagRemoveActivity201ResponseLinksSelf(BaseModel):
+ """
+ CreateTagRemoveActivity201ResponseLinksSelf
+ """ # noqa: E501
+ href: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateTagRemoveActivity201ResponseLinksSelf from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateTagRemoveActivity201ResponseLinksSelf from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_tag_remove_activity201_response_status.py b/constant_contact_api_client/models/create_tag_remove_activity201_response_status.py
new file mode 100644
index 0000000..e9333c7
--- /dev/null
+++ b/constant_contact_api_client/models/create_tag_remove_activity201_response_status.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateTagRemoveActivity201ResponseStatus(BaseModel):
+ """
+ Provides the status for the requested activity.
+ """ # noqa: E501
+ items_total_count: Optional[StrictInt] = Field(default=None, description="The total number of items processed for the requested activity.")
+ items_completed_count: Optional[StrictInt] = Field(default=None, description="The total number of items for which processing completed for the requested activity.")
+ __properties: ClassVar[List[str]] = ["items_total_count", "items_completed_count"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateTagRemoveActivity201ResponseStatus from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateTagRemoveActivity201ResponseStatus from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items_total_count": obj.get("items_total_count"),
+ "items_completed_count": obj.get("items_completed_count")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_tag_remove_activity_request.py b/constant_contact_api_client/models/create_tag_remove_activity_request.py
new file mode 100644
index 0000000..c7dc90c
--- /dev/null
+++ b/constant_contact_api_client/models/create_tag_remove_activity_request.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_tag_remove_activity_request_exclude import CreateTagRemoveActivityRequestExclude
+from constant_contact_api_client.models.create_tag_remove_activity_request_source import CreateTagRemoveActivityRequestSource
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateTagRemoveActivityRequest(BaseModel):
+ """
+ CreateTagRemoveActivityRequest
+ """ # noqa: E501
+ source: CreateTagRemoveActivityRequestSource
+ exclude: Optional[CreateTagRemoveActivityRequestExclude] = None
+ tag_ids: Annotated[List[StrictStr], Field(max_length=50)] = Field(description="An array of tags (tag_id
) to add to all contacts meeting the specified source criteria.")
+ __properties: ClassVar[List[str]] = ["source", "exclude", "tag_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateTagRemoveActivityRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of source
+ if self.source:
+ _dict['source'] = self.source.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of exclude
+ if self.exclude:
+ _dict['exclude'] = self.exclude.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateTagRemoveActivityRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "source": CreateTagRemoveActivityRequestSource.from_dict(obj.get("source")) if obj.get("source") is not None else None,
+ "exclude": CreateTagRemoveActivityRequestExclude.from_dict(obj.get("exclude")) if obj.get("exclude") is not None else None,
+ "tag_ids": obj.get("tag_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_tag_remove_activity_request_exclude.py b/constant_contact_api_client/models/create_tag_remove_activity_request_exclude.py
new file mode 100644
index 0000000..f645da2
--- /dev/null
+++ b/constant_contact_api_client/models/create_tag_remove_activity_request_exclude.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateTagRemoveActivityRequestExclude(BaseModel):
+ """
+ Use to exclude specified contacts from being added or removed from a tag. Only applicable if the specified source is either all_active_contacts
(billable) or list_ids
.
+ """ # noqa: E501
+ contact_ids: Optional[List[StrictStr]] = Field(default=None, description="Identifies the contacts, by contact_id
, to exclude from the add or remove tags activity.")
+ __properties: ClassVar[List[str]] = ["contact_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateTagRemoveActivityRequestExclude from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateTagRemoveActivityRequestExclude from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_ids": obj.get("contact_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/create_tag_remove_activity_request_source.py b/constant_contact_api_client/models/create_tag_remove_activity_request_source.py
new file mode 100644
index 0000000..b253140
--- /dev/null
+++ b/constant_contact_api_client/models/create_tag_remove_activity_request_source.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CreateTagRemoveActivityRequestSource(BaseModel):
+ """
+ Select the source used to identify contacts to which a tag is added or removed. Source types are mutually exclusive.
+ """ # noqa: E501
+ contact_ids: Optional[Annotated[List[StrictStr], Field(max_length=500)]] = Field(default=None, description="An array of contacts IDs.")
+ list_ids: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="An array of list IDs ( list_id
).")
+ tag_ids: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="An array of tags ( tag_id
).")
+ all_active_contacts: Optional[StrictBool] = Field(default=None, description="Use to identify contacts with an active (billable) status.")
+ new_subscriber: Optional[StrictBool] = Field(default=None, description="Use to identify newly subscribed contacts.")
+ __properties: ClassVar[List[str]] = ["contact_ids", "list_ids", "tag_ids", "all_active_contacts", "new_subscriber"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CreateTagRemoveActivityRequestSource from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CreateTagRemoveActivityRequestSource from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_ids": obj.get("contact_ids"),
+ "list_ids": obj.get("list_ids"),
+ "tag_ids": obj.get("tag_ids"),
+ "all_active_contacts": obj.get("all_active_contacts"),
+ "new_subscriber": obj.get("new_subscriber")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/cross_reference.py b/constant_contact_api_client/models/cross_reference.py
new file mode 100644
index 0000000..a99aa0a
--- /dev/null
+++ b/constant_contact_api_client/models/cross_reference.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CrossReference(BaseModel):
+ """
+ CrossReference
+ """ # noqa: E501
+ v2_email_campaign_id: Optional[StrictStr] = Field(default=None, description="Identifies an email campaign in the V2 API.")
+ campaign_id: Optional[StrictStr] = Field(default=None, description="Identifies a campaign in the V3 API. In the V3 API, each campaign contains one or more activities. For more information, see V3 Email Campaign Resource Changes.
") + campaign_activity_id: Optional[StrictStr] = Field(default=None, description="
Identifies a campaign activity in the V3 API. In the V3 API, each campaign contains one or more activities. Email type activities represent the detailed information in an email and contain properties like from_email
and from_name
. For more information, see V3 Campaign Resource Changes.
")
+ __properties: ClassVar[List[str]] = ["v2_email_campaign_id", "campaign_id", "campaign_activity_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CrossReference from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CrossReference from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "v2_email_campaign_id": obj.get("v2_email_campaign_id"),
+ "campaign_id": obj.get("campaign_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/cross_reference_response.py b/constant_contact_api_client/models/cross_reference_response.py
new file mode 100644
index 0000000..9bd5af0
--- /dev/null
+++ b/constant_contact_api_client/models/cross_reference_response.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_campaign_xrefs200_response_xrefs_inner import GetEmailCampaignXrefs200ResponseXrefsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CrossReferenceResponse(BaseModel):
+ """
+ CrossReferenceResponse
+ """ # noqa: E501
+ xrefs: Optional[List[GetEmailCampaignXrefs200ResponseXrefsInner]] = Field(default=None, description="An array of objects that contain a v2_email_campaign_id
cross-referenced with a V3 campaign_id
and a V3 campaign_activity_id
value.")
+ __properties: ClassVar[List[str]] = ["xrefs"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CrossReferenceResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in xrefs (list)
+ _items = []
+ if self.xrefs:
+ for _item in self.xrefs:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['xrefs'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CrossReferenceResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "xrefs": [GetEmailCampaignXrefs200ResponseXrefsInner.from_dict(_item) for _item in obj.get("xrefs")] if obj.get("xrefs") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/custom_field_id100.py b/constant_contact_api_client/models/custom_field_id100.py
new file mode 100644
index 0000000..5af4964
--- /dev/null
+++ b/constant_contact_api_client/models/custom_field_id100.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CustomFieldId100(BaseModel):
+ """
+ CustomFieldId100
+ """ # noqa: E501
+ custom_field_ids: Annotated[List[StrictStr], Field(max_length=0)] = Field(description="The array of custom field IDs to delete.")
+ __properties: ClassVar[List[str]] = ["custom_field_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CustomFieldId100 from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CustomFieldId100 from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "custom_field_ids": obj.get("custom_field_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/custom_field_input.py b/constant_contact_api_client/models/custom_field_input.py
new file mode 100644
index 0000000..9d2bc69
--- /dev/null
+++ b/constant_contact_api_client/models/custom_field_input.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CustomFieldInput(BaseModel):
+ """
+ CustomFieldInput
+ """ # noqa: E501
+ label: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The display name for the custom_field shown in the UI as free-form text")
+ type: StrictStr = Field(description="Specifies the type of value the custom_field field accepts: string or date.")
+ __properties: ClassVar[List[str]] = ["label", "type"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CustomFieldInput from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CustomFieldInput from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "label": obj.get("label"),
+ "type": obj.get("type")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/custom_field_resource.py b/constant_contact_api_client/models/custom_field_resource.py
new file mode 100644
index 0000000..77a2067
--- /dev/null
+++ b/constant_contact_api_client/models/custom_field_resource.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CustomFieldResource(BaseModel):
+ """
+ Custom fields allow Constant Contact users to add custom content to a contact that can be used to personalize emails in addition to the standard set of variables available for email personalization.
+ """ # noqa: E501
+ custom_field_id: Optional[StrictStr] = Field(default=None, description="The custom_field's unique ID")
+ label: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The display name for the custom_field shown in the UI as free-form text")
+ name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="Unique name for the custom_field constructed from the label by replacing blanks with underscores.")
+ type: StrictStr = Field(description="Specifies the type of value the custom_field field accepts: string or date.")
+ updated_at: Optional[datetime] = Field(default=None, description="System generated date and time that the resource was updated, in ISO-8601 format.")
+ created_at: Optional[datetime] = Field(default=None, description="Date and time that the resource was created, in ISO-8601 format. System generated.")
+ __properties: ClassVar[List[str]] = ["custom_field_id", "label", "name", "type", "updated_at", "created_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CustomFieldResource from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "custom_field_id",
+ "name",
+ "updated_at",
+ "created_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CustomFieldResource from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "custom_field_id": obj.get("custom_field_id"),
+ "label": obj.get("label"),
+ "name": obj.get("name"),
+ "type": obj.get("type"),
+ "updated_at": obj.get("updated_at"),
+ "created_at": obj.get("created_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/custom_fields.py b/constant_contact_api_client/models/custom_fields.py
new file mode 100644
index 0000000..863337c
--- /dev/null
+++ b/constant_contact_api_client/models/custom_fields.py
@@ -0,0 +1,105 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_all_activities200_response_links import GetAllActivities200ResponseLinks
+from constant_contact_api_client.models.get_custom_field200_response import GetCustomField200Response
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CustomFields(BaseModel):
+ """
+ Use this endpoint to retrieve (GET) all custom_fields in the user's account, or to create (POST) a new custom_field.
+ """ # noqa: E501
+ custom_fields: Optional[Annotated[List[GetCustomField200Response], Field(max_length=100)]] = None
+ links: Optional[GetAllActivities200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["custom_fields", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CustomFields from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list)
+ _items = []
+ if self.custom_fields:
+ for _item in self.custom_fields:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['custom_fields'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CustomFields from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "custom_fields": [GetCustomField200Response.from_dict(_item) for _item in obj.get("custom_fields")] if obj.get("custom_fields") is not None else None,
+ "_links": GetAllActivities200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/customer.py b/constant_contact_api_client/models/customer.py
new file mode 100644
index 0000000..74b645a
--- /dev/null
+++ b/constant_contact_api_client/models/customer.py
@@ -0,0 +1,125 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_account_details200_response_company_logo import GetAccountDetails200ResponseCompanyLogo
+from constant_contact_api_client.models.get_account_details200_response_physical_address import GetAccountDetails200ResponsePhysicalAddress
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Customer(BaseModel):
+ """
+ Customer
+ """ # noqa: E501
+ contact_email: Optional[StrictStr] = Field(default=None, description="Email addresses that are associated with the Constant Contact account owner.")
+ contact_phone: Optional[Annotated[str, Field(strict=True, max_length=25)]] = Field(default=None, description="The account owner's contact phone number (up to 25 characters in length).")
+ country_code: Optional[StrictStr] = Field(default=None, description="The uppercase two-letter ISO 3166-1 code representing the organization's country.")
+ encoded_account_id: Optional[StrictStr] = Field(default=None, description="The readOnly encoded account ID that uniquely identifies the account.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The account owner's first name.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The account owner's last name.")
+ organization_name: Optional[StrictStr] = Field(default=None, description="The name of the organization that is associated with this account.")
+ organization_phone: Optional[StrictStr] = Field(default=None, description="The phone number of the organization that is associated with this account.")
+ state_code: Optional[StrictStr] = Field(default=None, description="The uppercase two letter ISO 3166-1 code for the organization's state. This property is required if the country_code
is US (United States).")
+ time_zone_id: Optional[StrictStr] = Field(default=None, description="The time zone that is automatically set based on the state_code
setting; as defined in the IANA time-zone database (see http://www.iana.org/time-zones).")
+ website: Optional[StrictStr] = Field(default=None, description="The organization's website URL.")
+ physical_address: Optional[GetAccountDetails200ResponsePhysicalAddress] = None
+ company_logo: Optional[GetAccountDetails200ResponseCompanyLogo] = None
+ __properties: ClassVar[List[str]] = ["contact_email", "contact_phone", "country_code", "encoded_account_id", "first_name", "last_name", "organization_name", "organization_phone", "state_code", "time_zone_id", "website", "physical_address", "company_logo"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Customer from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "encoded_account_id",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of physical_address
+ if self.physical_address:
+ _dict['physical_address'] = self.physical_address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of company_logo
+ if self.company_logo:
+ _dict['company_logo'] = self.company_logo.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Customer from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_email": obj.get("contact_email"),
+ "contact_phone": obj.get("contact_phone"),
+ "country_code": obj.get("country_code"),
+ "encoded_account_id": obj.get("encoded_account_id"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "organization_name": obj.get("organization_name"),
+ "organization_phone": obj.get("organization_phone"),
+ "state_code": obj.get("state_code"),
+ "time_zone_id": obj.get("time_zone_id"),
+ "website": obj.get("website"),
+ "physical_address": GetAccountDetails200ResponsePhysicalAddress.from_dict(obj.get("physical_address")) if obj.get("physical_address") is not None else None,
+ "company_logo": GetAccountDetails200ResponseCompanyLogo.from_dict(obj.get("company_logo")) if obj.get("company_logo") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/customer_put.py b/constant_contact_api_client/models/customer_put.py
new file mode 100644
index 0000000..7b22967
--- /dev/null
+++ b/constant_contact_api_client/models/customer_put.py
@@ -0,0 +1,113 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CustomerPut(BaseModel):
+ """
+ CustomerPut
+ """ # noqa: E501
+ contact_email: Optional[StrictStr] = Field(default=None, description="The confirmed email address that is associated with the account owner.")
+ contact_phone: Optional[Annotated[str, Field(strict=True, max_length=25)]] = Field(default=None, description="The account owner's contact phone number (up to 25 characters in length).")
+ country_code: Optional[StrictStr] = Field(default=None, description="The two-letter ISO 3166-1 code representing the organization's country.")
+ encoded_account_id: Optional[StrictStr] = Field(default=None, description="The read only encoded account ID that uniquely identifies the account.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The account owner's first name.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The account owner's last name.")
+ organization_name: Optional[StrictStr] = Field(default=None, description="The name of the organization that is associated with this account.")
+ organization_phone: Optional[StrictStr] = Field(default=None, description="The phone number of the organization that is associated with this account.")
+ state_code: Optional[StrictStr] = Field(default=None, description="The two letter ISO 3166-1 code used to specify the state to associate with the account. This property is required if the country_code
is US (United States).")
+ time_zone_id: Optional[StrictStr] = Field(default=None, description="The time zone to use for the account; as defined in the IANA time-zone database (see http://www.iana.org/time-zones).")
+ website: Optional[StrictStr] = Field(default=None, description="The organization's website URL.")
+ __properties: ClassVar[List[str]] = ["contact_email", "contact_phone", "country_code", "encoded_account_id", "first_name", "last_name", "organization_name", "organization_phone", "state_code", "time_zone_id", "website"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CustomerPut from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "encoded_account_id",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CustomerPut from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_email": obj.get("contact_email"),
+ "contact_phone": obj.get("contact_phone"),
+ "country_code": obj.get("country_code"),
+ "encoded_account_id": obj.get("encoded_account_id"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "organization_name": obj.get("organization_name"),
+ "organization_phone": obj.get("organization_phone"),
+ "state_code": obj.get("state_code"),
+ "time_zone_id": obj.get("time_zone_id"),
+ "website": obj.get("website")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/delete_list202_response.py b/constant_contact_api_client/models/delete_list202_response.py
new file mode 100644
index 0000000..59d7d1e
--- /dev/null
+++ b/constant_contact_api_client/models/delete_list202_response.py
@@ -0,0 +1,106 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.create_list_delete_activity201_response_links import CreateListDeleteActivity201ResponseLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class DeleteList202Response(BaseModel):
+ """
+ DeleteList202Response
+ """ # noqa: E501
+ activity_id: Optional[StrictStr] = Field(default=None, description="Unique ID for the delete list batch job.")
+ state: Optional[StrictStr] = Field(default=None, description="The state of the request:
campaign_activity_id
.")
+ links: Optional[GetEmailSendsReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of DidNotOpensTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of DidNotOpensTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetDidNotOpensReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetEmailSendsReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/did_not_opens_tracking_activity.py b/constant_contact_api_client/models/did_not_opens_tracking_activity.py
new file mode 100644
index 0000000..fa55f86
--- /dev/null
+++ b/constant_contact_api_client/models/did_not_opens_tracking_activity.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class DidNotOpensTrackingActivity(BaseModel):
+ """
+ DidNotOpensTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies an email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of tracking activity that is associated with this campaign_activity_id
and used for reporting purposes.")
+ email_address: StrictStr = Field(description="The email address used to send the email campaign activity to a contact.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The date and time that the contact was sent the email campaign activity.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of DidNotOpensTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of DidNotOpensTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_address.py b/constant_contact_api_client/models/email_address.py
new file mode 100644
index 0000000..a5d1ced
--- /dev/null
+++ b/constant_contact_api_client/models/email_address.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailAddress(BaseModel):
+ """
+ A contact subresource describing the contact's email address.
+ """ # noqa: E501
+ address: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The email address of the contact. The email address must be unique for each contact.")
+ permission_to_send: Optional[StrictStr] = Field(default=None, description="Identifies the type of permission that the Constant Contact account has to send email to the contact. Types of permission: explicit, implicit, not_set, pending_confirmation, temp_hold, unsubscribed.")
+ created_at: Optional[datetime] = Field(default=None, description="Date and time that the email_address was created, in ISO-8601 format. System generated.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the email_address was last updated, in ISO-8601 format. System generated.")
+ opt_in_source: Optional[StrictStr] = Field(default=None, description="Describes who opted-in the email_address; valid values are Contact or Account. Your integration must accurately identify opt_in_source
for compliance reasons; value is set on POST, and is read-only going forward.")
+ opt_in_date: Optional[datetime] = Field(default=None, description="Date and time that the email_address was opted-in to receive email from the account, in ISO-8601 format. System generated.")
+ opt_out_source: Optional[StrictStr] = Field(default=None, description="Describes the source of the unsubscribed/opt-out action: either Account or Contact. If the Contact opted-out, then the account cannot send any campaigns to this contact until the contact opts back in. If the Account, then the account can add the contact back to any lists and send to them. Displayed only if contact has been unsubscribed/opt-out.")
+ opt_out_date: Optional[datetime] = Field(default=None, description="Date and time that the contact unsubscribed/opted-out of receiving email from the account, in ISO-8601 format. Displayed only if contact has been unsubscribed/opt-out. System generated.")
+ opt_out_reason: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The reason, as provided by the contact, that they unsubscribed/opted-out of receiving email campaigns.")
+ confirm_status: Optional[StrictStr] = Field(default=None, description="Indicates if the contact confirmed their email address after they subscribed to receive emails. Possible values: pending, confirmed, off.")
+ __properties: ClassVar[List[str]] = ["address", "permission_to_send", "created_at", "updated_at", "opt_in_source", "opt_in_date", "opt_out_source", "opt_out_date", "opt_out_reason", "confirm_status"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "created_at",
+ "updated_at",
+ "opt_in_date",
+ "opt_out_source",
+ "opt_out_date",
+ "confirm_status",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "address": obj.get("address"),
+ "permission_to_send": obj.get("permission_to_send"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "opt_in_source": obj.get("opt_in_source"),
+ "opt_in_date": obj.get("opt_in_date"),
+ "opt_out_source": obj.get("opt_out_source"),
+ "opt_out_date": obj.get("opt_out_date"),
+ "opt_out_reason": obj.get("opt_out_reason"),
+ "confirm_status": obj.get("confirm_status")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_address_post.py b/constant_contact_api_client/models/email_address_post.py
new file mode 100644
index 0000000..4117bf0
--- /dev/null
+++ b/constant_contact_api_client/models/email_address_post.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailAddressPost(BaseModel):
+ """
+ The contact's email address and related properties.
+ """ # noqa: E501
+ address: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The contact's email address.")
+ permission_to_send: Optional[StrictStr] = Field(default=None, description="Identifies the type of permission that the Constant Contact account has been granted to send email to the contact. Types of permission: explicit, implicit, not_set, pending_confirmation, temp_hold, unsubscribed.")
+ __properties: ClassVar[List[str]] = ["address", "permission_to_send"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailAddressPost from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailAddressPost from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "address": obj.get("address"),
+ "permission_to_send": obj.get("permission_to_send")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_address_put.py b/constant_contact_api_client/models/email_address_put.py
new file mode 100644
index 0000000..8d4f10c
--- /dev/null
+++ b/constant_contact_api_client/models/email_address_put.py
@@ -0,0 +1,119 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailAddressPut(BaseModel):
+ """
+ The contact's email address and related properties.
+ """ # noqa: E501
+ address: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The email address of the contact. The email address must be unique for each contact.")
+ permission_to_send: Optional[StrictStr] = Field(default=None, description="Identifies the type of permission that the Constant Contact account has to send email to the contact. Types of permission: explicit, implicit, not_set, pending_confirmation, temp_hold, unsubscribed.")
+ created_at: Optional[datetime] = Field(default=None, description="Date and time that the email_address was created, in ISO-8601 format. System generated.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the email_address was last updated, in ISO-8601 format. System generated.")
+ opt_in_date: Optional[datetime] = Field(default=None, description="Date and time that the email_address was opted-in to receive email from the account, in ISO-8601 format. System generated.")
+ opt_out_source: Optional[StrictStr] = Field(default=None, description="Describes the source of the unsubscribed/opt-out action: either Account or Contact. If the Contact opted-out, then the account cannot send any campaigns to this contact until the contact opts back in. If the Account, then the account can add the contact back to any lists and send to them. Displayed only if contact has been unsubscribed/opt-out.")
+ opt_out_date: Optional[datetime] = Field(default=None, description="Date and time that the contact unsubscribed/opted-out of receiving email from the account, in ISO-8601 format. Displayed only if contact has been unsubscribed/opt-out. System generated.")
+ opt_out_reason: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The reason, as provided by the contact, that they unsubscribed/opted-out of receiving email campaigns.")
+ confirm_status: Optional[StrictStr] = Field(default=None, description="Indicates if the contact confirmed their email address after they subscribed to receive emails. Possible values: pending, confirmed, off.")
+ __properties: ClassVar[List[str]] = ["address", "permission_to_send", "created_at", "updated_at", "opt_in_date", "opt_out_source", "opt_out_date", "opt_out_reason", "confirm_status"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailAddressPut from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "created_at",
+ "updated_at",
+ "opt_in_date",
+ "opt_out_source",
+ "opt_out_date",
+ "confirm_status",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailAddressPut from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "address": obj.get("address"),
+ "permission_to_send": obj.get("permission_to_send"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "opt_in_date": obj.get("opt_in_date"),
+ "opt_out_source": obj.get("opt_out_source"),
+ "opt_out_date": obj.get("opt_out_date"),
+ "opt_out_reason": obj.get("opt_out_reason"),
+ "confirm_status": obj.get("confirm_status")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_campaign.py b/constant_contact_api_client/models/email_campaign.py
new file mode 100644
index 0000000..797d15c
--- /dev/null
+++ b/constant_contact_api_client/models/email_campaign.py
@@ -0,0 +1,117 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_email_campaign200_response_campaign_activities_inner import CreateEmailCampaign200ResponseCampaignActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailCampaign(BaseModel):
+ """
+ EmailCampaign
+ """ # noqa: E501
+ campaign_activities: Optional[List[CreateEmailCampaign200ResponseCampaignActivitiesInner]] = Field(default=None, description="Lists the role and unique activity ID of each campaign activity that is associated with an Email Campaign.")
+ campaign_id: Optional[StrictStr] = Field(default=None, description="The unique ID used to identify the email campaign (UUID format).")
+ created_at: Optional[datetime] = Field(default=None, description="The system generated date and time that this email campaign was created. This string is readonly and is in ISO-8601 format.")
+ current_status: Optional[StrictStr] = Field(default=None, description="The current status of the email campaign. Valid values are: primary_email
contains the complete email content.primary_email
content without any personalized email information. For example, permalinks do not contain any of the contact details that you add to the primary_email
email content. primary_email
and a permalink
role campaign activity when you create an email campaign. ")
+ contact_list_ids: Optional[List[StrictStr]] = Field(default=None, description="The contacts that Constant Contact sends the email campaign activity to as an array of contact list_id
values. You cannot use contact lists and segments at the same time in an email campaign activity.")
+ segment_ids: Optional[List[StrictInt]] = Field(default=None, description="The contacts that Constant Contact sends the email campaign activity to as an array containing a single segment_id
value. Only format_type
3, 4, and 5 email campaign activities support segments. You cannot use contact lists and segments at the same time in an email campaign activity.")
+ current_status: Optional[StrictStr] = Field(default=None, description="The current status of the email campaign activity. Valid values are: /account/emails
to return a collection of account emails and their confirmation status.")
+ from_name: StrictStr = Field(description="The email \"From Name\" field for the email campaign activity.")
+ reply_to_email: StrictStr = Field(description="The email \"Reply To Email\" field for the email campaign activity. You must use a confirmed Constant Contact account email address. Make a GET call to /account/emails
to return a collection of account emails and their confirmation status.")
+ subject: StrictStr = Field(description="The email \"Subject\" field for the email campaign activity.")
+ html_content: Optional[StrictStr] = Field(default=None, description="The HTML or XHTML content for the email campaign activity. Only format_type
1 and 5 (legacy custom code emails or modern custom code emails) can contain html_content
.")
+ template_id: Optional[StrictStr] = Field(default=None, description="Identifies the email layout and design template that the email campaign activity is using as a base.")
+ permalink_url: Optional[StrictStr] = Field(default=None, description="The permanent link to a web accessible version of the email campaign content without any personalized email information. The permalink URL becomes accessible after you send an email campaign to contacts.")
+ preheader: Optional[StrictStr] = Field(default=None, description="The email preheader for the email campaign activity. Only format_type
3, 4, and 5 email campaign activities use the preheader property.")
+ physical_address_in_footer: Optional[GetEmailCampaignActivity200ResponsePhysicalAddressInFooter] = None
+ document_properties: Optional[GetEmailCampaignActivity200ResponseDocumentProperties] = None
+ __properties: ClassVar[List[str]] = ["campaign_activity_id", "campaign_id", "role", "contact_list_ids", "segment_ids", "current_status", "format_type", "from_email", "from_name", "reply_to_email", "subject", "html_content", "template_id", "permalink_url", "preheader", "physical_address_in_footer", "document_properties"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailCampaignActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "campaign_activity_id",
+ "campaign_id",
+ "role",
+ "current_status",
+ "format_type",
+ "template_id",
+ "permalink_url",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of physical_address_in_footer
+ if self.physical_address_in_footer:
+ _dict['physical_address_in_footer'] = self.physical_address_in_footer.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of document_properties
+ if self.document_properties:
+ _dict['document_properties'] = self.document_properties.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailCampaignActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "campaign_id": obj.get("campaign_id"),
+ "role": obj.get("role"),
+ "contact_list_ids": obj.get("contact_list_ids"),
+ "segment_ids": obj.get("segment_ids"),
+ "current_status": obj.get("current_status"),
+ "format_type": obj.get("format_type"),
+ "from_email": obj.get("from_email"),
+ "from_name": obj.get("from_name"),
+ "reply_to_email": obj.get("reply_to_email"),
+ "subject": obj.get("subject"),
+ "html_content": obj.get("html_content"),
+ "template_id": obj.get("template_id"),
+ "permalink_url": obj.get("permalink_url"),
+ "preheader": obj.get("preheader"),
+ "physical_address_in_footer": GetEmailCampaignActivity200ResponsePhysicalAddressInFooter.from_dict(obj.get("physical_address_in_footer")) if obj.get("physical_address_in_footer") is not None else None,
+ "document_properties": GetEmailCampaignActivity200ResponseDocumentProperties.from_dict(obj.get("document_properties")) if obj.get("document_properties") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_campaign_activity_input.py b/constant_contact_api_client/models/email_campaign_activity_input.py
new file mode 100644
index 0000000..9dff8e0
--- /dev/null
+++ b/constant_contact_api_client/models/email_campaign_activity_input.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer import CreateEmailCampaignRequestEmailCampaignActivitiesInnerPhysicalAddressInFooter
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailCampaignActivityInput(BaseModel):
+ """
+ EmailCampaignActivityInput
+ """ # noqa: E501
+ format_type: StrictInt = Field(description="The email format you are using to create the email campaign activity. The V3 API supports creating emails using format_type
5 (custom code emails). ")
+ from_name: Annotated[str, Field(strict=True, max_length=100)] = Field(description="The email sender's name to display for the email campaign activity.")
+ from_email: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The sender's email address to use for the email campaign activity. You must use a confirmed Constant Contact account email address. Make a GET call to /account/emails
to return a collection of account emails and their confirmation status.")
+ reply_to_email: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The sender's email address to use if the contact replies to the email campaign activity. You must use a confirmed Constant Contact account email address. Make a GET call to /account/emails
to return a collection of account emails and their confirmation status.")
+ subject: StrictStr = Field(description="The text to display in the subject line that describes the email campaign activity.")
+ preheader: Optional[StrictStr] = Field(default=None, description="The email preheader for the email campaign activity. Contacts will view your preheader as a short summary that follows the subject line in their email client. Only format_type
3, 4, and 5 email campaign activities use the preheader property.")
+ html_content: Annotated[str, Field(strict=True, max_length=150000)] = Field(description="The HTML content for the email campaign activity. Only format_type
5 (custom code emails) can contain html_content
. When creating a format_type
5 custom code email, make sure that you include [[trackingImage]]
in the <body>
element of your HTML. ")
+ physical_address_in_footer: Optional[CreateEmailCampaignRequestEmailCampaignActivitiesInnerPhysicalAddressInFooter] = None
+ __properties: ClassVar[List[str]] = ["format_type", "from_name", "from_email", "reply_to_email", "subject", "preheader", "html_content", "physical_address_in_footer"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailCampaignActivityInput from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of physical_address_in_footer
+ if self.physical_address_in_footer:
+ _dict['physical_address_in_footer'] = self.physical_address_in_footer.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailCampaignActivityInput from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "format_type": obj.get("format_type"),
+ "from_name": obj.get("from_name"),
+ "from_email": obj.get("from_email"),
+ "reply_to_email": obj.get("reply_to_email"),
+ "subject": obj.get("subject"),
+ "preheader": obj.get("preheader"),
+ "html_content": obj.get("html_content"),
+ "physical_address_in_footer": CreateEmailCampaignRequestEmailCampaignActivitiesInnerPhysicalAddressInFooter.from_dict(obj.get("physical_address_in_footer")) if obj.get("physical_address_in_footer") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_campaign_activity_preview.py b/constant_contact_api_client/models/email_campaign_activity_preview.py
new file mode 100644
index 0000000..4811a21
--- /dev/null
+++ b/constant_contact_api_client/models/email_campaign_activity_preview.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailCampaignActivityPreview(BaseModel):
+ """
+ EmailCampaignActivityPreview
+ """ # noqa: E501
+ campaign_activity_id: Optional[StrictStr] = Field(default=None, description="The unique ID for an email campaign activity.")
+ from_email: Optional[StrictStr] = Field(default=None, description="The \"from email\" email header for the email campaign activity.")
+ from_name: Optional[StrictStr] = Field(default=None, description="The \"from name\" email header for the email campaign activity.")
+ preheader: Optional[StrictStr] = Field(default=None, description="The email preheader for the email campaign activity. Only format_type
3, 4, and 5 email campaign activities use the preheader property.")
+ preview_html_content: Optional[StrictStr] = Field(default=None, description="An HTML preview of the email campaign activity.")
+ preview_text_content: Optional[StrictStr] = Field(default=None, description="A plain text preview of the email campaign activity.")
+ reply_to_email: Optional[StrictStr] = Field(default=None, description="The email \"Reply To Email\" field for the email campaign activity.")
+ subject: Optional[StrictStr] = Field(default=None, description="The email \"Subject\" field for the email campaign activity.")
+ __properties: ClassVar[List[str]] = ["campaign_activity_id", "from_email", "from_name", "preheader", "preview_html_content", "preview_text_content", "reply_to_email", "subject"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailCampaignActivityPreview from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailCampaignActivityPreview from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "from_email": obj.get("from_email"),
+ "from_name": obj.get("from_name"),
+ "preheader": obj.get("preheader"),
+ "preview_html_content": obj.get("preview_html_content"),
+ "preview_text_content": obj.get("preview_text_content"),
+ "reply_to_email": obj.get("reply_to_email"),
+ "subject": obj.get("subject")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_campaign_complete.py b/constant_contact_api_client/models/email_campaign_complete.py
new file mode 100644
index 0000000..6bd80a4
--- /dev/null
+++ b/constant_contact_api_client/models/email_campaign_complete.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_email_campaign_request_email_campaign_activities_inner import CreateEmailCampaignRequestEmailCampaignActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailCampaignComplete(BaseModel):
+ """
+ EmailCampaignComplete
+ """ # noqa: E501
+ name: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The unique and descriptive name that you specify for the email campaign.")
+ email_campaign_activities: List[CreateEmailCampaignRequestEmailCampaignActivitiesInner] = Field(description="The content of the email campaign as an array that contains a single email campaign activity object.")
+ __properties: ClassVar[List[str]] = ["name", "email_campaign_activities"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailCampaignComplete from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in email_campaign_activities (list)
+ _items = []
+ if self.email_campaign_activities:
+ for _item in self.email_campaign_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['email_campaign_activities'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailCampaignComplete from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "email_campaign_activities": [CreateEmailCampaignRequestEmailCampaignActivitiesInner.from_dict(_item) for _item in obj.get("email_campaign_activities")] if obj.get("email_campaign_activities") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_campaign_name.py b/constant_contact_api_client/models/email_campaign_name.py
new file mode 100644
index 0000000..3db49ac
--- /dev/null
+++ b/constant_contact_api_client/models/email_campaign_name.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailCampaignName(BaseModel):
+ """
+ EmailCampaignName
+ """ # noqa: E501
+ name: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The updated email campaign name. The email campaign name must be unique.")
+ __properties: ClassVar[List[str]] = ["name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailCampaignName from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailCampaignName from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_campaigns.py b/constant_contact_api_client/models/email_campaigns.py
new file mode 100644
index 0000000..8944cf8
--- /dev/null
+++ b/constant_contact_api_client/models/email_campaigns.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailCampaigns(BaseModel):
+ """
+ EmailCampaigns
+ """ # noqa: E501
+ campaign_id: Optional[StrictStr] = Field(default=None, description="The unique ID used to identify the email campaign (UUID format).")
+ created_at: Optional[datetime] = Field(default=None, description="The system generated date and time that this email campaign was created. This string is readonly and is in ISO-8601 format.")
+ current_status: Optional[StrictStr] = Field(default=None, description="The current status of the email campaign. Valid values are: add
, which adds contacts that click the link to a contact list.")
+ list_id: Optional[StrictStr] = Field(default=None, description="If the link uses the click segmentation feature, this property contains the contact list linked with the list_action
property.")
+ link_tag: Optional[StrictStr] = Field(default=None, description="Link tags are not currently available in email campaigns. By default, this method combines results for duplicate link URLs. Link tags will allow users to get a separate link click report for each unique link_tag
value they use, even if URLs are not unique.")
+ __properties: ClassVar[List[str]] = ["link_url", "url_id", "unique_clicks", "list_action", "list_id", "link_tag"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailLinkClickCount from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailLinkClickCount from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "link_url": obj.get("link_url"),
+ "url_id": obj.get("url_id"),
+ "unique_clicks": obj.get("unique_clicks"),
+ "list_action": obj.get("list_action"),
+ "list_id": obj.get("list_id"),
+ "link_tag": obj.get("link_tag")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_links.py b/constant_contact_api_client/models/email_links.py
new file mode 100644
index 0000000..0d7377d
--- /dev/null
+++ b/constant_contact_api_client/models/email_links.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_campaign_activity_link_report200_response_link_click_counts_inner import GetCampaignActivityLinkReport200ResponseLinkClickCountsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailLinks(BaseModel):
+ """
+ EmailLinks
+ """ # noqa: E501
+ campaign_activity_id: Optional[StrictStr] = Field(default=None, description="The unique ID for an email campaign activity.")
+ link_click_counts: Optional[List[GetCampaignActivityLinkReport200ResponseLinkClickCountsInner]] = Field(default=None, description="An array of objects that contain the contact click count and link metadata for each unique link URL in an email campaign activity. By default, this method combines results for duplicate link URLs.")
+ __properties: ClassVar[List[str]] = ["campaign_activity_id", "link_click_counts"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in link_click_counts (list)
+ _items = []
+ if self.link_click_counts:
+ for _item in self.link_click_counts:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['link_click_counts'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "link_click_counts": [GetCampaignActivityLinkReport200ResponseLinkClickCountsInner.from_dict(_item) for _item in obj.get("link_click_counts")] if obj.get("link_click_counts") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_physical_address.py b/constant_contact_api_client/models/email_physical_address.py
new file mode 100644
index 0000000..27e7d13
--- /dev/null
+++ b/constant_contact_api_client/models/email_physical_address.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailPhysicalAddress(BaseModel):
+ """
+ EmailPhysicalAddress
+ """ # noqa: E501
+ address_line1: StrictStr = Field(description="Line 1 of the organization's street address.")
+ address_line2: Optional[StrictStr] = Field(default=None, description="Line 2 of the organization's street address.")
+ address_line3: Optional[StrictStr] = Field(default=None, description="Line 3 of the organization's street address.")
+ address_optional: Optional[StrictStr] = Field(default=None, description="An optional address field for the organization. Only format_type
3, 4, and 5 can use this property.")
+ city: Optional[StrictStr] = Field(default=None, description="The city where the organization sending the email campaign is located.")
+ country_code: StrictStr = Field(description="The uppercase two letter ISO 3166-1 code for the organization's country.")
+ country_name: Optional[StrictStr] = Field(default=None, description="The full name of the country where the organization sending the email is located. Automatically generated using the country_code
.")
+ organization_name: StrictStr = Field(description="The name of the organization that is sending the email campaign.")
+ postal_code: Optional[StrictStr] = Field(default=None, description="The postal code address (ZIP code) of the organization.")
+ state_code: Optional[StrictStr] = Field(default=None, description="The uppercase two letter ISO 3166-1 code for the organization's state. This property is required if the country_code
is US (United States).")
+ state_name: Optional[StrictStr] = Field(default=None, description="The full state name for a state_code
that is inside the United States. Automatically generated using the state_code
.")
+ state_non_us_name: Optional[StrictStr] = Field(default=None, description="The full state name for a state_code
that is outside the United States. This property is not read only.")
+ __properties: ClassVar[List[str]] = ["address_line1", "address_line2", "address_line3", "address_optional", "city", "country_code", "country_name", "organization_name", "postal_code", "state_code", "state_name", "state_non_us_name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailPhysicalAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "country_name",
+ "state_name",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailPhysicalAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "address_line1": obj.get("address_line1"),
+ "address_line2": obj.get("address_line2"),
+ "address_line3": obj.get("address_line3"),
+ "address_optional": obj.get("address_optional"),
+ "city": obj.get("city"),
+ "country_code": obj.get("country_code"),
+ "country_name": obj.get("country_name"),
+ "organization_name": obj.get("organization_name"),
+ "postal_code": obj.get("postal_code"),
+ "state_code": obj.get("state_code"),
+ "state_name": obj.get("state_name"),
+ "state_non_us_name": obj.get("state_non_us_name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_schedule_input.py b/constant_contact_api_client/models/email_schedule_input.py
new file mode 100644
index 0000000..7ebae24
--- /dev/null
+++ b/constant_contact_api_client/models/email_schedule_input.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailScheduleInput(BaseModel):
+ """
+ EmailScheduleInput
+ """ # noqa: E501
+ scheduled_date: datetime = Field(description="The date when Constant Contact will send the email campaign activity to contacts in ISO-8601 format. For example, 2022-05-17
and 2022-05-17T16:37:59.091Z
are valid dates. Use \"0\"
as the date to have Constant Contact immediately send the email campaign activity to contacts.")
+ __properties: ClassVar[List[str]] = ["scheduled_date"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailScheduleInput from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailScheduleInput from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "scheduled_date": obj.get("scheduled_date")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/email_test_send_input.py b/constant_contact_api_client/models/email_test_send_input.py
new file mode 100644
index 0000000..f5d3948
--- /dev/null
+++ b/constant_contact_api_client/models/email_test_send_input.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailTestSendInput(BaseModel):
+ """
+ EmailTestSendInput
+ """ # noqa: E501
+ email_addresses: Annotated[List[StrictStr], Field(max_length=5)] = Field(description="The recipients of the test email as an array of email address strings. You can send a test email to up to 5 different email addresses at a time.")
+ personal_message: Optional[StrictStr] = Field(default=None, description="A personal message for the recipients of the test email. Constant Contact displays this message before the email campaign activity content.")
+ __properties: ClassVar[List[str]] = ["email_addresses", "personal_message"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailTestSendInput from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailTestSendInput from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_addresses": obj.get("email_addresses"),
+ "personal_message": obj.get("personal_message")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/emails_link.py b/constant_contact_api_client/models/emails_link.py
new file mode 100644
index 0000000..f214989
--- /dev/null
+++ b/constant_contact_api_client/models/emails_link.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailsLink(BaseModel):
+ """
+ EmailsLink
+ """ # noqa: E501
+ href: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailsLink from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailsLink from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/emails_paging_links.py b/constant_contact_api_client/models/emails_paging_links.py
new file mode 100644
index 0000000..2498e74
--- /dev/null
+++ b/constant_contact_api_client/models/emails_paging_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from constant_contact_api_client.models.create_tag_remove_activity201_response_links_self import CreateTagRemoveActivity201ResponseLinksSelf
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EmailsPagingLinks(BaseModel):
+ """
+ EmailsPagingLinks
+ """ # noqa: E501
+ next: Optional[CreateTagRemoveActivity201ResponseLinksSelf] = None
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailsPagingLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EmailsPagingLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": CreateTagRemoveActivity201ResponseLinksSelf.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/file_object.py b/constant_contact_api_client/models/file_object.py
new file mode 100644
index 0000000..6ee84b4
--- /dev/null
+++ b/constant_contact_api_client/models/file_object.py
@@ -0,0 +1,128 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.my_library_file_collection_inner_thumbnail import MyLibraryFileCollectionInnerThumbnail
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class FileObject(BaseModel):
+ """
+ FileObject
+ """ # noqa: E501
+ id: Optional[StrictInt] = Field(default=None, description="Identifies the MyLibrary file.")
+ name: Optional[StrictStr] = Field(default=None, description="The file name.")
+ height: Optional[StrictInt] = Field(default=None, description="The image height.")
+ width: Optional[StrictInt] = Field(default=None, description="The image width.")
+ size: Optional[StrictInt] = Field(default=None, description="The image size.")
+ url: Optional[StrictStr] = Field(default=None, description="The image URL.")
+ description: Optional[StrictStr] = Field(default=None, description="The image description.")
+ folder: Optional[StrictStr] = Field(default=None, description="The image folder")
+ source: Optional[StrictStr] = Field(default=None, description="The application that uploaded this image.")
+ type: Optional[StrictStr] = Field(default=None, description="The image format.")
+ status: Optional[StrictStr] = Field(default=None, description="THe image status.")
+ thumbnail: Optional[MyLibraryFileCollectionInnerThumbnail] = None
+ image: Optional[StrictBool] = Field(default=None, description="Boolean indicating if this file is an image.")
+ folder_id: Optional[StrictInt] = Field(default=None, description="Identifies a folder in MyLibrary.")
+ external_url: Optional[StrictStr] = Field(default=None, description="The external url for the file.")
+ modified_date: Optional[StrictStr] = Field(default=None, description="Identifies the time a user last modified the file.")
+ added_date: Optional[StrictStr] = Field(default=None, description="Identifies the time a user originally added the file to MyLibrary.")
+ external_file_id: Optional[StrictStr] = Field(default=None, description="External identifier for the file.")
+ __properties: ClassVar[List[str]] = ["id", "name", "height", "width", "size", "url", "description", "folder", "source", "type", "status", "thumbnail", "image", "folder_id", "external_url", "modified_date", "added_date", "external_file_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of FileObject from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of thumbnail
+ if self.thumbnail:
+ _dict['thumbnail'] = self.thumbnail.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of FileObject from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "height": obj.get("height"),
+ "width": obj.get("width"),
+ "size": obj.get("size"),
+ "url": obj.get("url"),
+ "description": obj.get("description"),
+ "folder": obj.get("folder"),
+ "source": obj.get("source"),
+ "type": obj.get("type"),
+ "status": obj.get("status"),
+ "thumbnail": MyLibraryFileCollectionInnerThumbnail.from_dict(obj.get("thumbnail")) if obj.get("thumbnail") is not None else None,
+ "image": obj.get("image"),
+ "folder_id": obj.get("folder_id"),
+ "external_url": obj.get("external_url"),
+ "modified_date": obj.get("modified_date"),
+ "added_date": obj.get("added_date"),
+ "external_file_id": obj.get("external_file_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/file_status_array_inner.py b/constant_contact_api_client/models/file_status_array_inner.py
new file mode 100644
index 0000000..c6bd9ae
--- /dev/null
+++ b/constant_contact_api_client/models/file_status_array_inner.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class FileStatusArrayInner(BaseModel):
+ """
+ FileStatusArrayInner
+ """ # noqa: E501
+ status: Optional[StrictStr] = Field(default=None, description="The upload status.")
+ description: Optional[StrictStr] = Field(default=None, description="File description.")
+ file_id: Optional[StrictInt] = Field(default=None, description="Identifies the file in MyLibrary.")
+ __properties: ClassVar[List[str]] = ["status", "description", "file_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of FileStatusArrayInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of FileStatusArrayInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "status": obj.get("status"),
+ "description": obj.get("description"),
+ "file_id": obj.get("file_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/forwards_tracking_activities_page.py b/constant_contact_api_client/models/forwards_tracking_activities_page.py
new file mode 100644
index 0000000..3b7ee08
--- /dev/null
+++ b/constant_contact_api_client/models/forwards_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_sends_report200_response_links import GetEmailSendsReport200ResponseLinks
+from constant_contact_api_client.models.get_forwards_report200_response_tracking_activities_inner import GetForwardsReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ForwardsTrackingActivitiesPage(BaseModel):
+ """
+ ForwardsTrackingActivitiesPage
+ """ # noqa: E501
+ tracking_activities: List[GetForwardsReport200ResponseTrackingActivitiesInner] = Field(description="The list of contacts that forwarded the specified email campaign activity. ")
+ links: Optional[GetEmailSendsReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ForwardsTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ForwardsTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetForwardsReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetEmailSendsReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/forwards_tracking_activity.py b/constant_contact_api_client/models/forwards_tracking_activity.py
new file mode 100644
index 0000000..3211547
--- /dev/null
+++ b/constant_contact_api_client/models/forwards_tracking_activity.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ForwardsTrackingActivity(BaseModel):
+ """
+ ForwardsTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies the email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of report tracking activity that is associated with the specified campaign_activity_id
.")
+ email_address: StrictStr = Field(description="The contact's email address.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The time that the contact forwarded the email campaign activity.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ForwardsTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ForwardsTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_ab_test_email_campaign200_response.py b/constant_contact_api_client/models/get_ab_test_email_campaign200_response.py
new file mode 100644
index 0000000..0792c66
--- /dev/null
+++ b/constant_contact_api_client/models/get_ab_test_email_campaign200_response.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetABTestEmailCampaign200Response(BaseModel):
+ """
+ GetABTestEmailCampaign200Response
+ """ # noqa: E501
+ alternative_subject: StrictStr = Field(description="The alternate email subject line to use for A/B testing.")
+ test_size: StrictInt = Field(description="The percentage of contact recipients to participate in the A/B Test. For example, if the value is 30, then 30% of contacts will receive the email campaign with subject line A, and 30% of contacts will receive the email campaign with subject line B. Valid values include 5
to 50
percent. Currently, A/B tests support subject line only.")
+ winner_wait_duration: StrictInt = Field(description="The number of hours Constant Contact waits after the A/B test is sent before determining the winning subject line. The winner is the subject line with the highest number of contact opens. Valid values include 6
, 12
, 24
, and 48
. After the winner is determined, Constant Contact automatically sends the email campaign with the winning subject line to all the remaining contacts, which did not participate in the A/B test.")
+ __properties: ClassVar[List[str]] = ["alternative_subject", "test_size", "winner_wait_duration"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetABTestEmailCampaign200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetABTestEmailCampaign200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "alternative_subject": obj.get("alternative_subject"),
+ "test_size": obj.get("test_size"),
+ "winner_wait_duration": obj.get("winner_wait_duration")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_account_details200_response.py b/constant_contact_api_client/models/get_account_details200_response.py
new file mode 100644
index 0000000..1be5e00
--- /dev/null
+++ b/constant_contact_api_client/models/get_account_details200_response.py
@@ -0,0 +1,125 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_account_details200_response_company_logo import GetAccountDetails200ResponseCompanyLogo
+from constant_contact_api_client.models.get_account_details200_response_physical_address import GetAccountDetails200ResponsePhysicalAddress
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetAccountDetails200Response(BaseModel):
+ """
+ GetAccountDetails200Response
+ """ # noqa: E501
+ contact_email: Optional[StrictStr] = Field(default=None, description="Email addresses that are associated with the Constant Contact account owner.")
+ contact_phone: Optional[Annotated[str, Field(strict=True, max_length=25)]] = Field(default=None, description="The account owner's contact phone number (up to 25 characters in length).")
+ country_code: Optional[StrictStr] = Field(default=None, description="The uppercase two-letter ISO 3166-1 code representing the organization's country.")
+ encoded_account_id: Optional[StrictStr] = Field(default=None, description="The readOnly encoded account ID that uniquely identifies the account.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The account owner's first name.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The account owner's last name.")
+ organization_name: Optional[StrictStr] = Field(default=None, description="The name of the organization that is associated with this account.")
+ organization_phone: Optional[StrictStr] = Field(default=None, description="The phone number of the organization that is associated with this account.")
+ state_code: Optional[StrictStr] = Field(default=None, description="The uppercase two letter ISO 3166-1 code for the organization's state. This property is required if the country_code
is US (United States).")
+ time_zone_id: Optional[StrictStr] = Field(default=None, description="The time zone that is automatically set based on the state_code
setting; as defined in the IANA time-zone database (see http://www.iana.org/time-zones).")
+ website: Optional[StrictStr] = Field(default=None, description="The organization's website URL.")
+ physical_address: Optional[GetAccountDetails200ResponsePhysicalAddress] = None
+ company_logo: Optional[GetAccountDetails200ResponseCompanyLogo] = None
+ __properties: ClassVar[List[str]] = ["contact_email", "contact_phone", "country_code", "encoded_account_id", "first_name", "last_name", "organization_name", "organization_phone", "state_code", "time_zone_id", "website", "physical_address", "company_logo"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetAccountDetails200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "encoded_account_id",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of physical_address
+ if self.physical_address:
+ _dict['physical_address'] = self.physical_address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of company_logo
+ if self.company_logo:
+ _dict['company_logo'] = self.company_logo.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetAccountDetails200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_email": obj.get("contact_email"),
+ "contact_phone": obj.get("contact_phone"),
+ "country_code": obj.get("country_code"),
+ "encoded_account_id": obj.get("encoded_account_id"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "organization_name": obj.get("organization_name"),
+ "organization_phone": obj.get("organization_phone"),
+ "state_code": obj.get("state_code"),
+ "time_zone_id": obj.get("time_zone_id"),
+ "website": obj.get("website"),
+ "physical_address": GetAccountDetails200ResponsePhysicalAddress.from_dict(obj.get("physical_address")) if obj.get("physical_address") is not None else None,
+ "company_logo": GetAccountDetails200ResponseCompanyLogo.from_dict(obj.get("company_logo")) if obj.get("company_logo") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_account_details200_response_company_logo.py b/constant_contact_api_client/models/get_account_details200_response_company_logo.py
new file mode 100644
index 0000000..84799d7
--- /dev/null
+++ b/constant_contact_api_client/models/get_account_details200_response_company_logo.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetAccountDetails200ResponseCompanyLogo(BaseModel):
+ """
+ Used to include an existing company logo in the response body. If a company logo does not exist, nothing is returned in the response body. This property is optional.
+ """ # noqa: E501
+ url: Optional[StrictStr] = Field(default=None, description="The internal URL used to get the company logo image file hosted locally in your account's MyLibrary.")
+ external_url: Optional[StrictStr] = Field(default=None, description="The external URL used to get the company logo image file that is hosted on an external website.")
+ internal_id: Optional[StrictStr] = Field(default=None, description="The internal ID used to identify the image hosted in your account's MyLibrary.")
+ __properties: ClassVar[List[str]] = ["url", "external_url", "internal_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetAccountDetails200ResponseCompanyLogo from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetAccountDetails200ResponseCompanyLogo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "url": obj.get("url"),
+ "external_url": obj.get("external_url"),
+ "internal_id": obj.get("internal_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_account_details200_response_physical_address.py b/constant_contact_api_client/models/get_account_details200_response_physical_address.py
new file mode 100644
index 0000000..7cd4907
--- /dev/null
+++ b/constant_contact_api_client/models/get_account_details200_response_physical_address.py
@@ -0,0 +1,105 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetAccountDetails200ResponsePhysicalAddress(BaseModel):
+ """
+ GetAccountDetails200ResponsePhysicalAddress
+ """ # noqa: E501
+ address_line1: Annotated[str, Field(min_length=1, strict=True, max_length=80)] = Field(description="Line 1 of the organization's street address.")
+ address_line2: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=80)]] = Field(default=None, description="Line 2 of the organization's street address.")
+ address_line3: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=80)]] = Field(default=None, description="Line 3 of the organization's street address.")
+ city: StrictStr = Field(description="The city where the organization is located.")
+ state_code: Optional[Annotated[str, Field(strict=True, max_length=2)]] = Field(default=None, description="The two letter ISO 3166-1 code for the organization's state and only used if the country_code
is US
or CA
. If not, exclude this property from the request body.")
+ state_name: Optional[StrictStr] = Field(default=None, description="Use if the state where the organization is physically located is not in the United States or Canada. If country_code
is US
or CA
, exclude this property from the request body.")
+ postal_code: Optional[StrictStr] = Field(default=None, description="The postal code address (ZIP code) of the organization. This property is required if the state_code
is US
or CA
, otherwise exclude this property from the request body.")
+ country_code: StrictStr = Field(description="The two letter ISO 3166-1 code for the organization's country.")
+ __properties: ClassVar[List[str]] = ["address_line1", "address_line2", "address_line3", "city", "state_code", "state_name", "postal_code", "country_code"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetAccountDetails200ResponsePhysicalAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetAccountDetails200ResponsePhysicalAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "address_line1": obj.get("address_line1"),
+ "address_line2": obj.get("address_line2"),
+ "address_line3": obj.get("address_line3"),
+ "city": obj.get("city"),
+ "state_code": obj.get("state_code"),
+ "state_name": obj.get("state_name"),
+ "postal_code": obj.get("postal_code"),
+ "country_code": obj.get("country_code")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_activity_by_id200_response.py b/constant_contact_api_client/models/get_activity_by_id200_response.py
new file mode 100644
index 0000000..d72d3d2
--- /dev/null
+++ b/constant_contact_api_client/models/get_activity_by_id200_response.py
@@ -0,0 +1,132 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_links import GetAllActivities200ResponseActivitiesInnerLinks
+from constant_contact_api_client.models.get_all_activities200_response_activities_inner_status import GetAllActivities200ResponseActivitiesInnerStatus
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetActivityById200Response(BaseModel):
+ """
+ Generic bulk activity status response object
+ """ # noqa: E501
+ activity_id: Optional[StrictStr] = Field(default=None, description="Unique ID for the activity.")
+ state: Optional[StrictStr] = Field(default=None, description="The state of the request: CONFIRMED
status to create an email campaign. ")
+ confirm_time: Optional[datetime] = Field(default=None, description="The date that the email address changed to CONFIRMED
status in ISO-8601 format.")
+ confirm_source_type: Optional[StrictStr] = Field(default=None, description="Describes who confirmed the email address. Valid values are: CONTACT
role email.BILLING
role email.REPLY_TO
role email.from_email
and reply_to_email
headers. ")
+ pending_roles: Optional[List[StrictStr]] = Field(default=None, description="The planned role for an unconfirmed email address. Possible role values are: CONTACT
role email.BILLING
role email.REPLY_TO
role email. segment_id
query parameter to filter results based on a segment, this property indicates that the V3 API accepted your request and is still processing it.")
+ __properties: ClassVar[List[str]] = ["contacts", "contacts_count", "_links", "status"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetAllContacts200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in contacts (list)
+ _items = []
+ if self.contacts:
+ for _item in self.contacts:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['contacts'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetAllContacts200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contacts": [GetContactById200Response.from_dict(_item) for _item in obj.get("contacts")] if obj.get("contacts") is not None else None,
+ "contacts_count": obj.get("contacts_count"),
+ "_links": GetAllActivities200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None,
+ "status": obj.get("status")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_all_custom_fields200_response.py b/constant_contact_api_client/models/get_all_custom_fields200_response.py
new file mode 100644
index 0000000..856b30c
--- /dev/null
+++ b/constant_contact_api_client/models/get_all_custom_fields200_response.py
@@ -0,0 +1,105 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_all_activities200_response_links import GetAllActivities200ResponseLinks
+from constant_contact_api_client.models.get_custom_field200_response import GetCustomField200Response
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetAllCustomFields200Response(BaseModel):
+ """
+ Use this endpoint to retrieve (GET) all custom_fields in the user's account, or to create (POST) a new custom_field.
+ """ # noqa: E501
+ custom_fields: Optional[Annotated[List[GetCustomField200Response], Field(max_length=100)]] = None
+ links: Optional[GetAllActivities200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["custom_fields", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetAllCustomFields200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list)
+ _items = []
+ if self.custom_fields:
+ for _item in self.custom_fields:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['custom_fields'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetAllCustomFields200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "custom_fields": [GetCustomField200Response.from_dict(_item) for _item in obj.get("custom_fields")] if obj.get("custom_fields") is not None else None,
+ "_links": GetAllActivities200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_all_email_campaigns200_response.py b/constant_contact_api_client/models/get_all_email_campaigns200_response.py
new file mode 100644
index 0000000..bb0ed2b
--- /dev/null
+++ b/constant_contact_api_client/models/get_all_email_campaigns200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_all_email_campaigns200_response_campaigns_inner import GetAllEmailCampaigns200ResponseCampaignsInner
+from constant_contact_api_client.models.get_all_email_campaigns200_response_links import GetAllEmailCampaigns200ResponseLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetAllEmailCampaigns200Response(BaseModel):
+ """
+ GetAllEmailCampaigns200Response
+ """ # noqa: E501
+ links: Optional[GetAllEmailCampaigns200ResponseLinks] = Field(default=None, alias="_links")
+ campaigns: Optional[List[GetAllEmailCampaigns200ResponseCampaignsInner]] = None
+ __properties: ClassVar[List[str]] = ["_links", "campaigns"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetAllEmailCampaigns200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in campaigns (list)
+ _items = []
+ if self.campaigns:
+ for _item in self.campaigns:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['campaigns'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetAllEmailCampaigns200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "_links": GetAllEmailCampaigns200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None,
+ "campaigns": [GetAllEmailCampaigns200ResponseCampaignsInner.from_dict(_item) for _item in obj.get("campaigns")] if obj.get("campaigns") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_all_email_campaigns200_response_campaigns_inner.py b/constant_contact_api_client/models/get_all_email_campaigns200_response_campaigns_inner.py
new file mode 100644
index 0000000..4470607
--- /dev/null
+++ b/constant_contact_api_client/models/get_all_email_campaigns200_response_campaigns_inner.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetAllEmailCampaigns200ResponseCampaignsInner(BaseModel):
+ """
+ GetAllEmailCampaigns200ResponseCampaignsInner
+ """ # noqa: E501
+ campaign_id: Optional[StrictStr] = Field(default=None, description="The unique ID used to identify the email campaign (UUID format).")
+ created_at: Optional[datetime] = Field(default=None, description="The system generated date and time that this email campaign was created. This string is readonly and is in ISO-8601 format.")
+ current_status: Optional[StrictStr] = Field(default=None, description="The current status of the email campaign. Valid values are: name
or segment_criteria
was last updated (ISO-8601 format).")
+ __properties: ClassVar[List[str]] = ["name", "segment_id", "created_at", "edited_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetAllSegments200ResponseSegmentsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "segment_id",
+ "created_at",
+ "edited_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetAllSegments200ResponseSegmentsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "segment_id": obj.get("segment_id"),
+ "created_at": obj.get("created_at"),
+ "edited_at": obj.get("edited_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_all_tags200_response.py b/constant_contact_api_client/models/get_all_tags200_response.py
new file mode 100644
index 0000000..9c30a7f
--- /dev/null
+++ b/constant_contact_api_client/models/get_all_tags200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_all_tags200_response_links import GetAllTags200ResponseLinks
+from constant_contact_api_client.models.get_tag200_response import GetTag200Response
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetAllTags200Response(BaseModel):
+ """
+ GetAllTags200Response
+ """ # noqa: E501
+ tags: Optional[List[GetTag200Response]] = Field(default=None, description="Lists all tags and provides tag details.")
+ links: Optional[GetAllTags200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tags", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetAllTags200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tags (list)
+ _items = []
+ if self.tags:
+ for _item in self.tags:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tags'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetAllTags200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tags": [GetTag200Response.from_dict(_item) for _item in obj.get("tags")] if obj.get("tags") is not None else None,
+ "_links": GetAllTags200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_all_tags200_response_links.py b/constant_contact_api_client/models/get_all_tags200_response_links.py
new file mode 100644
index 0000000..6f0ffa8
--- /dev/null
+++ b/constant_contact_api_client/models/get_all_tags200_response_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_all_tags200_response_links_next import GetAllTags200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetAllTags200ResponseLinks(BaseModel):
+ """
+ HAL property that contains next link if applicable.
+ """ # noqa: E501
+ next: Optional[GetAllTags200ResponseLinksNext] = None
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetAllTags200ResponseLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetAllTags200ResponseLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetAllTags200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_all_tags200_response_links_next.py b/constant_contact_api_client/models/get_all_tags200_response_links_next.py
new file mode 100644
index 0000000..53d5314
--- /dev/null
+++ b/constant_contact_api_client/models/get_all_tags200_response_links_next.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from constant_contact_api_client.models.get_all_tags200_response_links_next_next import GetAllTags200ResponseLinksNextNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetAllTags200ResponseLinksNext(BaseModel):
+ """
+ The link to the next page of results.
+ """ # noqa: E501
+ href: Optional[StrictStr] = None
+ next: Optional[GetAllTags200ResponseLinksNextNext] = None
+ __properties: ClassVar[List[str]] = ["href", "next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetAllTags200ResponseLinksNext from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetAllTags200ResponseLinksNext from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href"),
+ "next": GetAllTags200ResponseLinksNextNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_all_tags200_response_links_next_next.py b/constant_contact_api_client/models/get_all_tags200_response_links_next_next.py
new file mode 100644
index 0000000..a68c421
--- /dev/null
+++ b/constant_contact_api_client/models/get_all_tags200_response_links_next_next.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetAllTags200ResponseLinksNextNext(BaseModel):
+ """
+ Contains the next page link, if applicable.
+ """ # noqa: E501
+ href: StrictStr = Field(description="The next link in the page or null if there are no additional pages.")
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetAllTags200ResponseLinksNextNext from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetAllTags200ResponseLinksNextNext from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_bounces_report200_response.py b/constant_contact_api_client/models/get_bounces_report200_response.py
new file mode 100644
index 0000000..659f7ee
--- /dev/null
+++ b/constant_contact_api_client/models/get_bounces_report200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_bounces_report200_response_links import GetBouncesReport200ResponseLinks
+from constant_contact_api_client.models.get_bounces_report200_response_tracking_activities_inner import GetBouncesReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetBouncesReport200Response(BaseModel):
+ """
+ GetBouncesReport200Response
+ """ # noqa: E501
+ tracking_activities: List[GetBouncesReport200ResponseTrackingActivitiesInner] = Field(description="The list of email bounce tracking activities associated with a given `campaign_activity_id'.")
+ links: GetBouncesReport200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetBouncesReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetBouncesReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetBouncesReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetBouncesReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_bounces_report200_response_links.py b/constant_contact_api_client/models/get_bounces_report200_response_links.py
new file mode 100644
index 0000000..db361cd
--- /dev/null
+++ b/constant_contact_api_client/models/get_bounces_report200_response_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links_next import GetContactTrackingReport200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetBouncesReport200ResponseLinks(BaseModel):
+ """
+ HAL property that contains next link if applicable
+ """ # noqa: E501
+ next: GetContactTrackingReport200ResponseLinksNext
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetBouncesReport200ResponseLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetBouncesReport200ResponseLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetContactTrackingReport200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_bounces_report200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_bounces_report200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..0bef9d8
--- /dev/null
+++ b/constant_contact_api_client/models/get_bounces_report200_response_tracking_activities_inner.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetBouncesReport200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetBouncesReport200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies the email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of email tracking activity, em_bounces
, that this report includes.")
+ email_address: StrictStr = Field(description="The contact's email address that was used when the email campaign activity bounced.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ bounce_code: StrictStr = Field(description="The one-character string used to specify the reason for the email bounce. Valid codes include: B
- Non-existent address; the contact's Internet Service Provider (ISP) indicates that the email address doesn't exist.D
- Undeliverable; after repeated delivery attempts, no response was received from the contact's ISP.F
- Full; the contact's mailbox is full.S
- Suspended; the contact's address was reported as non-existent by the ISP and is suspended from delivery.V
- Vacation/autoreply; the contact set an autoreply, but the message was delivered.X
- Other; the contact's ISP specified another reason that the message cannot be delivered.Z
- Blocked; the recipient's ISP chose not to deliver the email. For example, the ISP may have flagged the email as spam.email_address
was updated after the email bounce activity occurred, current_ email_address
displays the updated address. If updates were not made to email_address
, the email_address
and current_email_address
are the same.")
+ created_time: datetime = Field(description="The date and time that the email bounce tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, the date when the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "bounce_code", "current_email_address", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetBouncesReport200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetBouncesReport200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "bounce_code": obj.get("bounce_code"),
+ "current_email_address": obj.get("current_email_address"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_campaign_activity_link_report200_response.py b/constant_contact_api_client/models/get_campaign_activity_link_report200_response.py
new file mode 100644
index 0000000..2f1770d
--- /dev/null
+++ b/constant_contact_api_client/models/get_campaign_activity_link_report200_response.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_campaign_activity_link_report200_response_link_click_counts_inner import GetCampaignActivityLinkReport200ResponseLinkClickCountsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetCampaignActivityLinkReport200Response(BaseModel):
+ """
+ GetCampaignActivityLinkReport200Response
+ """ # noqa: E501
+ campaign_activity_id: Optional[StrictStr] = Field(default=None, description="The unique ID for an email campaign activity.")
+ link_click_counts: Optional[List[GetCampaignActivityLinkReport200ResponseLinkClickCountsInner]] = Field(default=None, description="An array of objects that contain the contact click count and link metadata for each unique link URL in an email campaign activity. By default, this method combines results for duplicate link URLs.")
+ __properties: ClassVar[List[str]] = ["campaign_activity_id", "link_click_counts"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetCampaignActivityLinkReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in link_click_counts (list)
+ _items = []
+ if self.link_click_counts:
+ for _item in self.link_click_counts:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['link_click_counts'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetCampaignActivityLinkReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "link_click_counts": [GetCampaignActivityLinkReport200ResponseLinkClickCountsInner.from_dict(_item) for _item in obj.get("link_click_counts")] if obj.get("link_click_counts") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_campaign_activity_link_report200_response_link_click_counts_inner.py b/constant_contact_api_client/models/get_campaign_activity_link_report200_response_link_click_counts_inner.py
new file mode 100644
index 0000000..fe1749d
--- /dev/null
+++ b/constant_contact_api_client/models/get_campaign_activity_link_report200_response_link_click_counts_inner.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetCampaignActivityLinkReport200ResponseLinkClickCountsInner(BaseModel):
+ """
+ GetCampaignActivityLinkReport200ResponseLinkClickCountsInner
+ """ # noqa: E501
+ link_url: Optional[StrictStr] = Field(default=None, description="The URL of a link in an email campaign activity. This URL is not normalized and appears the same as the URL in the email campaign activity.")
+ url_id: Optional[StrictStr] = Field(default=None, description="The ID for a unique link URL in an email campaign activity.")
+ unique_clicks: Optional[StrictInt] = Field(default=None, description="The number of unique contacts that clicked the link.")
+ list_action: Optional[StrictStr] = Field(default=None, description="If the link uses the click segmentation feature, this property contains the action that contacts trigger when they click the link. Currently the only available action is add
, which adds contacts that click the link to a contact list.")
+ list_id: Optional[StrictStr] = Field(default=None, description="If the link uses the click segmentation feature, this property contains the contact list linked with the list_action
property.")
+ link_tag: Optional[StrictStr] = Field(default=None, description="Link tags are not currently available in email campaigns. By default, this method combines results for duplicate link URLs. Link tags will allow users to get a separate link click report for each unique link_tag
value they use, even if URLs are not unique.")
+ __properties: ClassVar[List[str]] = ["link_url", "url_id", "unique_clicks", "list_action", "list_id", "link_tag"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetCampaignActivityLinkReport200ResponseLinkClickCountsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetCampaignActivityLinkReport200ResponseLinkClickCountsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "link_url": obj.get("link_url"),
+ "url_id": obj.get("url_id"),
+ "unique_clicks": obj.get("unique_clicks"),
+ "list_action": obj.get("list_action"),
+ "list_id": obj.get("list_id"),
+ "link_tag": obj.get("link_tag")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_clicks_report200_response.py b/constant_contact_api_client/models/get_clicks_report200_response.py
new file mode 100644
index 0000000..f113d8f
--- /dev/null
+++ b/constant_contact_api_client/models/get_clicks_report200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_clicks_report200_response_links import GetClicksReport200ResponseLinks
+from constant_contact_api_client.models.get_clicks_report200_response_tracking_activities_inner import GetClicksReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetClicksReport200Response(BaseModel):
+ """
+ GetClicksReport200Response
+ """ # noqa: E501
+ tracking_activities: List[GetClicksReport200ResponseTrackingActivitiesInner] = Field(description="The list of click tracking activities")
+ links: Optional[GetClicksReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetClicksReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetClicksReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetClicksReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetClicksReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_clicks_report200_response_links.py b/constant_contact_api_client/models/get_clicks_report200_response_links.py
new file mode 100644
index 0000000..2856cf2
--- /dev/null
+++ b/constant_contact_api_client/models/get_clicks_report200_response_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links_next import GetContactTrackingReport200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetClicksReport200ResponseLinks(BaseModel):
+ """
+ HAL property that contains next link if applicable.
+ """ # noqa: E501
+ next: GetContactTrackingReport200ResponseLinksNext
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetClicksReport200ResponseLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetClicksReport200ResponseLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetContactTrackingReport200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_clicks_report200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_clicks_report200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..962057c
--- /dev/null
+++ b/constant_contact_api_client/models/get_clicks_report200_response_tracking_activities_inner.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetClicksReport200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetClicksReport200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies the email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of report tracking activity that is associated with the specified campaign_activity_id
.")
+ email_address: StrictStr = Field(description="The email address used to send the email campaign activity to a contact.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ device_type: Optional[StrictStr] = Field(default=None, description="The type of device that the contact was using when they clicked the URL link for the email campaign activity.")
+ url_id: StrictStr = Field(description="The ID used to uniquely identify the URL link.")
+ link_url: StrictStr = Field(description="The text used for the URL link.")
+ created_time: datetime = Field(description="The date and time that the contact clicked the specified URL link for the email campaign activity.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "device_type", "url_id", "link_url", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetClicksReport200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetClicksReport200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "device_type": obj.get("device_type"),
+ "url_id": obj.get("url_id"),
+ "link_url": obj.get("link_url"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_adds200_response.py b/constant_contact_api_client/models/get_contact_adds200_response.py
new file mode 100644
index 0000000..2be5301
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_adds200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_contact_adds200_response_tracking_activities_inner import GetContactAdds200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactAdds200Response(BaseModel):
+ """
+ GetContactAdds200Response
+ """ # noqa: E501
+ tracking_activities: List[GetContactAdds200ResponseTrackingActivitiesInner] = Field(description="The list of landing page contact adds tracking activities.")
+ links: GetUniqueContactClicks200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactAdds200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactAdds200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetContactAdds200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetUniqueContactClicks200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_adds200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_contact_adds200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..20975d8
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_adds200_response_tracking_activities_inner.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactAdds200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetContactAdds200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID that identifies the contact.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID that identifies of the campaign activity to use.")
+ tracking_activity_type: StrictStr = Field(description="The tracked activity event type.")
+ email_address: StrictStr = Field(description="The email address for the contact and tracking activity.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The time the tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="The time the Contact was deleted")
+ sms_channel: Optional[GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactAdds200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactAdds200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at"),
+ "sms_channel": GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_by_id200_response.py b/constant_contact_api_client/models/get_contact_by_id200_response.py
new file mode 100644
index 0000000..3dbff6b
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_by_id200_response.py
@@ -0,0 +1,179 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_contact_by_id200_response_custom_fields_inner import GetContactById200ResponseCustomFieldsInner
+from constant_contact_api_client.models.get_contact_by_id200_response_email_address import GetContactById200ResponseEmailAddress
+from constant_contact_api_client.models.get_contact_by_id200_response_notes_inner import GetContactById200ResponseNotesInner
+from constant_contact_api_client.models.get_contact_by_id200_response_phone_numbers_inner import GetContactById200ResponsePhoneNumbersInner
+from constant_contact_api_client.models.get_contact_by_id200_response_sms_channel import GetContactById200ResponseSmsChannel
+from constant_contact_api_client.models.get_contact_by_id200_response_street_addresses_inner import GetContactById200ResponseStreetAddressesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactById200Response(BaseModel):
+ """
+ Use this endpoint to retrieve (GET), update (PUT), or DELETE an existing contact resource specified using the contact_id
path parameter.
+ """ # noqa: E501
+ contact_id: Optional[StrictStr] = Field(default=None, description="Unique ID for each contact resource")
+ email_address: Optional[GetContactById200ResponseEmailAddress] = None
+ first_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The last name of the contact.")
+ job_title: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The job title of the contact.")
+ company_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the company where the contact works.")
+ birthday_month: Optional[StrictInt] = Field(default=None, description="The month value for the contact's birthday. Valid values are from 1 through 12. You must use this property with birthday_month
.")
+ birthday_day: Optional[StrictInt] = Field(default=None, description="The day value for the contact's birthday. Valid values are from 1 through 12. You must use this property with birthday_day
.")
+ anniversary: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, description="The anniversary date for the contact. For example, this value could be the date when the contact first became a customer of an organization in Constant Contact. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY.")
+ update_source: Optional[StrictStr] = Field(default=None, description="Identifies who last updated the contact; valid values are Contact
or Account
.")
+ create_source: Optional[StrictStr] = Field(default=None, description="Describes who added the contact; valid values are Contact
or Account
. Your integration must accurately identify create_source
for compliance reasons; value is set when contact is created.")
+ created_at: Optional[datetime] = Field(default=None, description="System generated date and time that the resource was created, in ISO-8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="System generated date and time that the contact was last updated, in ISO-8601 format.")
+ deleted_at: Optional[date] = Field(default=None, description="For deleted contacts (email_address
contains opt_out_source
and opt_out_date
), shows the date of deletion.")
+ custom_fields: Optional[Annotated[List[GetContactById200ResponseCustomFieldsInner], Field(max_length=25)]] = Field(default=None, description="Array of up to 25 custom_field
subresources.")
+ phone_numbers: Optional[Annotated[List[GetContactById200ResponsePhoneNumbersInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 phone_numbers
subresources.")
+ street_addresses: Optional[Annotated[List[GetContactById200ResponseStreetAddressesInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 street_addresses
subresources.")
+ list_memberships: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of up to 50 list_ids
to which the contact is subscribed.")
+ taggings: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of tags (tag_id
) assigned to the contact, up to a maximum of 50.")
+ notes: Optional[Annotated[List[GetContactById200ResponseNotesInner], Field(max_length=150)]] = Field(default=None, description="An array of notes about the contact listed by most recent note first.")
+ sms_channel: Optional[GetContactById200ResponseSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "email_address", "first_name", "last_name", "job_title", "company_name", "birthday_month", "birthday_day", "anniversary", "update_source", "create_source", "created_at", "updated_at", "deleted_at", "custom_fields", "phone_numbers", "street_addresses", "list_memberships", "taggings", "notes", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactById200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "contact_id",
+ "created_at",
+ "updated_at",
+ "deleted_at",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of email_address
+ if self.email_address:
+ _dict['email_address'] = self.email_address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list)
+ _items = []
+ if self.custom_fields:
+ for _item in self.custom_fields:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['custom_fields'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in phone_numbers (list)
+ _items = []
+ if self.phone_numbers:
+ for _item in self.phone_numbers:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['phone_numbers'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in street_addresses (list)
+ _items = []
+ if self.street_addresses:
+ for _item in self.street_addresses:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['street_addresses'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in notes (list)
+ _items = []
+ if self.notes:
+ for _item in self.notes:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['notes'] = _items
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactById200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "email_address": GetContactById200ResponseEmailAddress.from_dict(obj.get("email_address")) if obj.get("email_address") is not None else None,
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "job_title": obj.get("job_title"),
+ "company_name": obj.get("company_name"),
+ "birthday_month": obj.get("birthday_month"),
+ "birthday_day": obj.get("birthday_day"),
+ "anniversary": obj.get("anniversary"),
+ "update_source": obj.get("update_source"),
+ "create_source": obj.get("create_source"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "deleted_at": obj.get("deleted_at"),
+ "custom_fields": [GetContactById200ResponseCustomFieldsInner.from_dict(_item) for _item in obj.get("custom_fields")] if obj.get("custom_fields") is not None else None,
+ "phone_numbers": [GetContactById200ResponsePhoneNumbersInner.from_dict(_item) for _item in obj.get("phone_numbers")] if obj.get("phone_numbers") is not None else None,
+ "street_addresses": [GetContactById200ResponseStreetAddressesInner.from_dict(_item) for _item in obj.get("street_addresses")] if obj.get("street_addresses") is not None else None,
+ "list_memberships": obj.get("list_memberships"),
+ "taggings": obj.get("taggings"),
+ "notes": [GetContactById200ResponseNotesInner.from_dict(_item) for _item in obj.get("notes")] if obj.get("notes") is not None else None,
+ "sms_channel": GetContactById200ResponseSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_by_id200_response_custom_fields_inner.py b/constant_contact_api_client/models/get_contact_by_id200_response_custom_fields_inner.py
new file mode 100644
index 0000000..fd3c097
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_by_id200_response_custom_fields_inner.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactById200ResponseCustomFieldsInner(BaseModel):
+ """
+ Custom fields allow Constant Contact users to add custom content to a contact that can be used to personalize emails in addition to the standard set of variables available for email personalization.
+ """ # noqa: E501
+ custom_field_id: StrictStr = Field(description="The custom_field's unique ID")
+ value: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The custom_field value.")
+ __properties: ClassVar[List[str]] = ["custom_field_id", "value"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactById200ResponseCustomFieldsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactById200ResponseCustomFieldsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "custom_field_id": obj.get("custom_field_id"),
+ "value": obj.get("value")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_by_id200_response_email_address.py b/constant_contact_api_client/models/get_contact_by_id200_response_email_address.py
new file mode 100644
index 0000000..726b15f
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_by_id200_response_email_address.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactById200ResponseEmailAddress(BaseModel):
+ """
+ A contact subresource describing the contact's email address.
+ """ # noqa: E501
+ address: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The email address of the contact. The email address must be unique for each contact.")
+ permission_to_send: Optional[StrictStr] = Field(default=None, description="Identifies the type of permission that the Constant Contact account has to send email to the contact. Types of permission: explicit, implicit, not_set, pending_confirmation, temp_hold, unsubscribed.")
+ created_at: Optional[datetime] = Field(default=None, description="Date and time that the email_address was created, in ISO-8601 format. System generated.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the email_address was last updated, in ISO-8601 format. System generated.")
+ opt_in_source: Optional[StrictStr] = Field(default=None, description="Describes who opted-in the email_address; valid values are Contact or Account. Your integration must accurately identify opt_in_source
for compliance reasons; value is set on POST, and is read-only going forward.")
+ opt_in_date: Optional[datetime] = Field(default=None, description="Date and time that the email_address was opted-in to receive email from the account, in ISO-8601 format. System generated.")
+ opt_out_source: Optional[StrictStr] = Field(default=None, description="Describes the source of the unsubscribed/opt-out action: either Account or Contact. If the Contact opted-out, then the account cannot send any campaigns to this contact until the contact opts back in. If the Account, then the account can add the contact back to any lists and send to them. Displayed only if contact has been unsubscribed/opt-out.")
+ opt_out_date: Optional[datetime] = Field(default=None, description="Date and time that the contact unsubscribed/opted-out of receiving email from the account, in ISO-8601 format. Displayed only if contact has been unsubscribed/opt-out. System generated.")
+ opt_out_reason: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The reason, as provided by the contact, that they unsubscribed/opted-out of receiving email campaigns.")
+ confirm_status: Optional[StrictStr] = Field(default=None, description="Indicates if the contact confirmed their email address after they subscribed to receive emails. Possible values: pending, confirmed, off.")
+ __properties: ClassVar[List[str]] = ["address", "permission_to_send", "created_at", "updated_at", "opt_in_source", "opt_in_date", "opt_out_source", "opt_out_date", "opt_out_reason", "confirm_status"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactById200ResponseEmailAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "created_at",
+ "updated_at",
+ "opt_in_date",
+ "opt_out_source",
+ "opt_out_date",
+ "confirm_status",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactById200ResponseEmailAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "address": obj.get("address"),
+ "permission_to_send": obj.get("permission_to_send"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "opt_in_source": obj.get("opt_in_source"),
+ "opt_in_date": obj.get("opt_in_date"),
+ "opt_out_source": obj.get("opt_out_source"),
+ "opt_out_date": obj.get("opt_out_date"),
+ "opt_out_reason": obj.get("opt_out_reason"),
+ "confirm_status": obj.get("confirm_status")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_by_id200_response_notes_inner.py b/constant_contact_api_client/models/get_contact_by_id200_response_notes_inner.py
new file mode 100644
index 0000000..dc8cfcc
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_by_id200_response_notes_inner.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactById200ResponseNotesInner(BaseModel):
+ """
+ A note about the contact.
+ """ # noqa: E501
+ note_id: Optional[StrictStr] = Field(default=None, description="The ID that uniquely identifies the note (UUID format).")
+ created_at: Optional[datetime] = Field(default=None, description="The date that the note was created.")
+ content: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = Field(default=None, description="The content for the note.")
+ __properties: ClassVar[List[str]] = ["note_id", "created_at", "content"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactById200ResponseNotesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactById200ResponseNotesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "note_id": obj.get("note_id"),
+ "created_at": obj.get("created_at"),
+ "content": obj.get("content")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_by_id200_response_phone_numbers_inner.py b/constant_contact_api_client/models/get_contact_by_id200_response_phone_numbers_inner.py
new file mode 100644
index 0000000..85231fb
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_by_id200_response_phone_numbers_inner.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactById200ResponsePhoneNumbersInner(BaseModel):
+ """
+ GetContactById200ResponsePhoneNumbersInner
+ """ # noqa: E501
+ phone_number_id: Optional[StrictStr] = Field(default=None, description="Unique ID for the phone number")
+ phone_number: Optional[Annotated[str, Field(strict=True, max_length=25)]] = Field(default=None, description="The contact's phone number.")
+ kind: Optional[StrictStr] = Field(default=None, description="Identifies the type of phone number; valid values are home, work, mobile, or other.")
+ created_at: Optional[datetime] = Field(default=None, description="Date and time that the street address was created, in ISO-8601 format. System generated.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the phone number was last updated, in ISO-8601 format. System generated.")
+ update_source: Optional[StrictStr] = Field(default=None, description="Identifies who last updated the phone number; valid values are Contact or Account")
+ create_source: Optional[StrictStr] = Field(default=None, description="Identifies who added the phone number; valid values are Contact or Account.")
+ __properties: ClassVar[List[str]] = ["phone_number_id", "phone_number", "kind", "created_at", "updated_at", "update_source", "create_source"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactById200ResponsePhoneNumbersInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "phone_number_id",
+ "created_at",
+ "updated_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactById200ResponsePhoneNumbersInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "phone_number_id": obj.get("phone_number_id"),
+ "phone_number": obj.get("phone_number"),
+ "kind": obj.get("kind"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "update_source": obj.get("update_source"),
+ "create_source": obj.get("create_source")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_by_id200_response_sms_channel.py b/constant_contact_api_client/models/get_contact_by_id200_response_sms_channel.py
new file mode 100644
index 0000000..dc2c61a
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_by_id200_response_sms_channel.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_contact_by_id200_response_sms_channel_sms_channel_consents_inner import GetContactById200ResponseSmsChannelSmsChannelConsentsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactById200ResponseSmsChannel(BaseModel):
+ """
+ Includes SMS channel and consent details.
+ """ # noqa: E501
+ sms_channel_id: Optional[StrictStr] = Field(default=None, description="The unique ID that identifies an SMS channel.")
+ sms_address: Optional[StrictStr] = Field(default=None, description="The phone number of the SMS-capable phone, which does not include the country code.")
+ dial_code: Optional[StrictStr] = Field(default=None, description="The dial code used for the SMS-capable phone. For example, the dial code for the United States is 1
.")
+ country_code: Optional[StrictStr] = Field(default=None, description="The two character ISO country code used for the SMS-capable phone. For example, the country code for the United States is US
.")
+ update_source: Optional[StrictStr] = Field(default=None, description="Identifies who last updated SMS details for the contact. Valid values are Contact or Account")
+ create_source: Optional[StrictStr] = Field(default=None, description="Identifies who added SMS details for the contact. The value is set when you create SMS details for the contact. Valid values are Contact
or Account
. ")
+ sms_channel_consents: Optional[List[GetContactById200ResponseSmsChannelSmsChannelConsentsInner]] = Field(default=None, description="Identifies SMS channel consent details such as the current permission status for the SMS channel and opt-in date.")
+ __properties: ClassVar[List[str]] = ["sms_channel_id", "sms_address", "dial_code", "country_code", "update_source", "create_source", "sms_channel_consents"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactById200ResponseSmsChannel from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in sms_channel_consents (list)
+ _items = []
+ if self.sms_channel_consents:
+ for _item in self.sms_channel_consents:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['sms_channel_consents'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactById200ResponseSmsChannel from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "sms_channel_id": obj.get("sms_channel_id"),
+ "sms_address": obj.get("sms_address"),
+ "dial_code": obj.get("dial_code"),
+ "country_code": obj.get("country_code"),
+ "update_source": obj.get("update_source"),
+ "create_source": obj.get("create_source"),
+ "sms_channel_consents": [GetContactById200ResponseSmsChannelSmsChannelConsentsInner.from_dict(_item) for _item in obj.get("sms_channel_consents")] if obj.get("sms_channel_consents") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_by_id200_response_sms_channel_sms_channel_consents_inner.py b/constant_contact_api_client/models/get_contact_by_id200_response_sms_channel_sms_channel_consents_inner.py
new file mode 100644
index 0000000..ad2649d
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_by_id200_response_sms_channel_sms_channel_consents_inner.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactById200ResponseSmsChannelSmsChannelConsentsInner(BaseModel):
+ """
+ Provides SMS consent details.
+ """ # noqa: E501
+ sms_consent_permission: Optional[StrictStr] = Field(default=None, description="Identifies the current permission status for the SMS channel.")
+ consent_type: Optional[StrictStr] = None
+ opt_in_date: Optional[datetime] = Field(default=None, description="Date and time, in ISO-8601 format, that the contact subscribed/opted-in to receiving SMS from the account. Displays only if the contact subscribes/opts-in. System generated.")
+ opt_out_date: Optional[datetime] = Field(default=None, description="Date and time, in ISO-8601 format, that the contact unsubscribed/opted-out of receiving SMS from the account. Displays only if the contact unsubscribed/opted-out. System generated.")
+ advertised_frequency: Optional[StrictStr] = Field(default=None, description="The numeric used to set how often to send SMS advertisements during a specified time interval (advertised_interval
). For example, if the advertised_frequency
is set to 2
and the advertised_interval
is set to monthly
, the contact can receive up to two advertisements per month.")
+ advertised_interval: Optional[StrictStr] = Field(default=None, description="Identifies the unit of time used by Constant Contact to send SMS advertisements as a string enum. For example, if the advertised_frequency
is set to 2
and the advertised_interval
is set to monthly
, the contact can receive up to two advertisements per month.")
+ created_at: Optional[datetime] = Field(default=None, description="Date and time that the SMS stats were created, in ISO-8601 format. System generated.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the SMS stats were updated, in ISO-8601 format. System generated.")
+ __properties: ClassVar[List[str]] = ["sms_consent_permission", "consent_type", "opt_in_date", "opt_out_date", "advertised_frequency", "advertised_interval", "created_at", "updated_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactById200ResponseSmsChannelSmsChannelConsentsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "opt_in_date",
+ "opt_out_date",
+ "created_at",
+ "updated_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactById200ResponseSmsChannelSmsChannelConsentsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "sms_consent_permission": obj.get("sms_consent_permission"),
+ "consent_type": obj.get("consent_type"),
+ "opt_in_date": obj.get("opt_in_date"),
+ "opt_out_date": obj.get("opt_out_date"),
+ "advertised_frequency": obj.get("advertised_frequency"),
+ "advertised_interval": obj.get("advertised_interval"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_by_id200_response_street_addresses_inner.py b/constant_contact_api_client/models/get_contact_by_id200_response_street_addresses_inner.py
new file mode 100644
index 0000000..beea5e3
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_by_id200_response_street_addresses_inner.py
@@ -0,0 +1,113 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactById200ResponseStreetAddressesInner(BaseModel):
+ """
+ GetContactById200ResponseStreetAddressesInner
+ """ # noqa: E501
+ street_address_id: Optional[StrictStr] = Field(default=None, description="Unique ID for the street address")
+ kind: StrictStr = Field(description="Describes the type of address; valid values are home, work, or other.")
+ street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Number and street of the address.")
+ city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the city where the contact lives.")
+ state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the state or province where the contact lives.")
+ postal_code: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code of the contact.")
+ country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the country where the contact lives.")
+ created_at: Optional[datetime] = Field(default=None, description="Date and time that the street address was created, in ISO-8601 format. System generated.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the street address was last updated, in ISO-8601 format. System generated.")
+ __properties: ClassVar[List[str]] = ["street_address_id", "kind", "street", "city", "state", "postal_code", "country", "created_at", "updated_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactById200ResponseStreetAddressesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "street_address_id",
+ "created_at",
+ "updated_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactById200ResponseStreetAddressesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "street_address_id": obj.get("street_address_id"),
+ "kind": obj.get("kind"),
+ "street": obj.get("street"),
+ "city": obj.get("city"),
+ "state": obj.get("state"),
+ "postal_code": obj.get("postal_code"),
+ "country": obj.get("country"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_counts200_response.py b/constant_contact_api_client/models/get_contact_counts200_response.py
new file mode 100644
index 0000000..c7bd1f9
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_counts200_response.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactCounts200Response(BaseModel):
+ """
+ GetContactCounts200Response
+ """ # noqa: E501
+ total: Optional[StrictInt] = Field(default=None, description="Total number of contacts for the account.")
+ explicit: Optional[StrictInt] = Field(default=None, description="Total number of contacts explicitly confirmed. Consent is obtained when you explicitly ask your potential contacts for permission to send the email (for example, using a sign-up form) and they agree. After you obtain express consent, it is good forever or until the contact opts out.")
+ implicit: Optional[StrictInt] = Field(default=None, description="Total number of contacts implicitly confirmed. Consent is inferred based on actions, such as having an existing business relationship (making a purchase or donation, for example). In order to maintain implied consent to comply with CASL a contact must take a business action with you at least once every two years. Under CAN-Spam there is no need to maintain implied consent, it is assumed until the receiver indicates they no longer wish to receive messages.")
+ pending: Optional[StrictInt] = Field(default=None, description="Total number of contacts pending confirmation. Consent is requested and pending confirmation from the contact.")
+ unsubscribed: Optional[StrictInt] = Field(default=None, description="Total number of unsubscribed contacts. Consent is revoked when a contact has unsubscribed.")
+ new_subscriber: Optional[StrictInt] = Field(default=None, description="Total number of newly subscribed contacts.")
+ __properties: ClassVar[List[str]] = ["total", "explicit", "implicit", "pending", "unsubscribed", "new_subscriber"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactCounts200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactCounts200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "total": obj.get("total"),
+ "explicit": obj.get("explicit"),
+ "implicit": obj.get("implicit"),
+ "pending": obj.get("pending"),
+ "unsubscribed": obj.get("unsubscribed"),
+ "new_subscriber": obj.get("new_subscriber")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_id_xrefs200_response.py b/constant_contact_api_client/models/get_contact_id_xrefs200_response.py
new file mode 100644
index 0000000..fc4a0b0
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_id_xrefs200_response.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_contact_id_xrefs200_response_xrefs_inner import GetContactIdXrefs200ResponseXrefsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactIdXrefs200Response(BaseModel):
+ """
+ GetContactIdXrefs200Response
+ """ # noqa: E501
+ xrefs: Optional[Annotated[List[GetContactIdXrefs200ResponseXrefsInner], Field(max_length=500)]] = Field(default=None, description="An array of cross-referenced V3 API contact_id
and V2 API sequence_id
values. Response is sorted ascending by sequence_id
.")
+ __properties: ClassVar[List[str]] = ["xrefs"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactIdXrefs200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in xrefs (list)
+ _items = []
+ if self.xrefs:
+ for _item in self.xrefs:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['xrefs'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactIdXrefs200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "xrefs": [GetContactIdXrefs200ResponseXrefsInner.from_dict(_item) for _item in obj.get("xrefs")] if obj.get("xrefs") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_id_xrefs200_response_xrefs_inner.py b/constant_contact_api_client/models/get_contact_id_xrefs200_response_xrefs_inner.py
new file mode 100644
index 0000000..bc4b136
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_id_xrefs200_response_xrefs_inner.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactIdXrefs200ResponseXrefsInner(BaseModel):
+ """
+ The cross-referenced pair of V3 API list_id
and V2 API sequence_id
for a list. Response is sorted ascending by sequence_id
.
+ """ # noqa: E501
+ sequence_id: Optional[StrictStr] = Field(default=None, description="The V2 API contact unique identifier")
+ contact_id: Optional[StrictStr] = Field(default=None, description="The V3 API contact unique identifier")
+ __properties: ClassVar[List[str]] = ["sequence_id", "contact_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactIdXrefs200ResponseXrefsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactIdXrefs200ResponseXrefsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "sequence_id": obj.get("sequence_id"),
+ "contact_id": obj.get("contact_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_open_click_rate_report200_response.py b/constant_contact_api_client/models/get_contact_open_click_rate_report200_response.py
new file mode 100644
index 0000000..8425c3b
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_open_click_rate_report200_response.py
@@ -0,0 +1,96 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactOpenClickRateReport200Response(BaseModel):
+ """
+ The average click and open rates for a provided contact. The basic information provided is contact id, open rate, click rate, and emails included in the calculation.
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID of the contact for which the report is being generated.")
+ included_activities_count: StrictInt = Field(description="The number of activities included in the calculation.")
+ average_open_rate: Union[StrictFloat, StrictInt] = Field(description="The average rate the contact opened emails sent to them.")
+ average_click_rate: Union[StrictFloat, StrictInt] = Field(description="The average rate the contact clicked on links in emails sent to them.")
+ __properties: ClassVar[List[str]] = ["contact_id", "included_activities_count", "average_open_rate", "average_click_rate"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactOpenClickRateReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactOpenClickRateReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "included_activities_count": obj.get("included_activities_count"),
+ "average_open_rate": obj.get("average_open_rate"),
+ "average_click_rate": obj.get("average_click_rate")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_tracking_count_report200_response.py b/constant_contact_api_client/models/get_contact_tracking_count_report200_response.py
new file mode 100644
index 0000000..40010b5
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_tracking_count_report200_response.py
@@ -0,0 +1,106 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_contact_tracking_count_report200_response_campaign_activities_inner import GetContactTrackingCountReport200ResponseCampaignActivitiesInner
+from constant_contact_api_client.models.get_contact_tracking_count_report200_response_links import GetContactTrackingCountReport200ResponseLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactTrackingCountReport200Response(BaseModel):
+ """
+ GetContactTrackingCountReport200Response
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="Unique id of the contact that will have their activity summarized.")
+ campaign_activities: List[GetContactTrackingCountReport200ResponseCampaignActivitiesInner] = Field(description="A summary of all the actions for a contact.")
+ links: Optional[GetContactTrackingCountReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactTrackingCountReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in campaign_activities (list)
+ _items = []
+ if self.campaign_activities:
+ for _item in self.campaign_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['campaign_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactTrackingCountReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activities": [GetContactTrackingCountReport200ResponseCampaignActivitiesInner.from_dict(_item) for _item in obj.get("campaign_activities")] if obj.get("campaign_activities") is not None else None,
+ "_links": GetContactTrackingCountReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_tracking_count_report200_response_campaign_activities_inner.py b/constant_contact_api_client/models/get_contact_tracking_count_report200_response_campaign_activities_inner.py
new file mode 100644
index 0000000..d59aa6e
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_tracking_count_report200_response_campaign_activities_inner.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactTrackingCountReport200ResponseCampaignActivitiesInner(BaseModel):
+ """
+ GetContactTrackingCountReport200ResponseCampaignActivitiesInner
+ """ # noqa: E501
+ campaign_activity_id: StrictStr = Field(description="The unique id of the activity for an e-mail campaign.")
+ start_on: datetime = Field(description="The last date at which the email was sent to this contact.")
+ em_bounces: StrictInt = Field(description="The number of times the email has bounced for this contact.")
+ em_clicks: StrictInt = Field(description="The number of times this contact has clicked a link in this email.")
+ em_forwards: StrictInt = Field(description="The number of times this contact has forwarded this email.")
+ em_opens: StrictInt = Field(description="The number of times this contact has opened this email.")
+ em_sends: StrictInt = Field(description="The number of times the email was sent to this contact.")
+ em_unsubscribes: StrictInt = Field(description="The number of times this contact has opted out.")
+ __properties: ClassVar[List[str]] = ["campaign_activity_id", "start_on", "em_bounces", "em_clicks", "em_forwards", "em_opens", "em_sends", "em_unsubscribes"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactTrackingCountReport200ResponseCampaignActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactTrackingCountReport200ResponseCampaignActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "start_on": obj.get("start_on"),
+ "em_bounces": obj.get("em_bounces"),
+ "em_clicks": obj.get("em_clicks"),
+ "em_forwards": obj.get("em_forwards"),
+ "em_opens": obj.get("em_opens"),
+ "em_sends": obj.get("em_sends"),
+ "em_unsubscribes": obj.get("em_unsubscribes")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_tracking_count_report200_response_links.py b/constant_contact_api_client/models/get_contact_tracking_count_report200_response_links.py
new file mode 100644
index 0000000..a9dd6f6
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_tracking_count_report200_response_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links_next import GetContactTrackingReport200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactTrackingCountReport200ResponseLinks(BaseModel):
+ """
+ The next link if more summaries of activities are available.
+ """ # noqa: E501
+ next: GetContactTrackingReport200ResponseLinksNext
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactTrackingCountReport200ResponseLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactTrackingCountReport200ResponseLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetContactTrackingReport200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_tracking_report200_response.py b/constant_contact_api_client/models/get_contact_tracking_report200_response.py
new file mode 100644
index 0000000..a491233
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_tracking_report200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links import GetContactTrackingReport200ResponseLinks
+from constant_contact_api_client.models.get_contact_tracking_report200_response_tracking_activities_inner import GetContactTrackingReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactTrackingReport200Response(BaseModel):
+ """
+ A page of tracking activities for a contact that can include sends, opens, clicks, bounces, opt-outs and forwards to a friend. If it exists, a link to the next page of tracking activities is provided.
+ """ # noqa: E501
+ tracking_activities: Optional[List[GetContactTrackingReport200ResponseTrackingActivitiesInner]] = Field(default=None, description="The list of contact tracking activities in descending date order.")
+ links: Optional[GetContactTrackingReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactTrackingReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactTrackingReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetContactTrackingReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetContactTrackingReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_tracking_report200_response_links.py b/constant_contact_api_client/models/get_contact_tracking_report200_response_links.py
new file mode 100644
index 0000000..4bee44c
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_tracking_report200_response_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links_next import GetContactTrackingReport200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactTrackingReport200ResponseLinks(BaseModel):
+ """
+ The next link if more contact tracking activities are available.
+ """ # noqa: E501
+ next: GetContactTrackingReport200ResponseLinksNext
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactTrackingReport200ResponseLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactTrackingReport200ResponseLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetContactTrackingReport200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_tracking_report200_response_links_next.py b/constant_contact_api_client/models/get_contact_tracking_report200_response_links_next.py
new file mode 100644
index 0000000..e0eb464
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_tracking_report200_response_links_next.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactTrackingReport200ResponseLinksNext(BaseModel):
+ """
+ Contains the next page link if it is available.
+ """ # noqa: E501
+ href: StrictStr = Field(description="The next link in the page or null if there are no additional pages.")
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactTrackingReport200ResponseLinksNext from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactTrackingReport200ResponseLinksNext from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_contact_tracking_report200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_contact_tracking_report200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..0019ed6
--- /dev/null
+++ b/constant_contact_api_client/models/get_contact_tracking_report200_response_tracking_activities_inner.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetContactTrackingReport200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ The base contact tracking activity representing sends, opt-outs and forwards to a friend. The basic information provided includes the campaign activity ID, tracking activity type, and time the tracking activity occurred.
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The contact ID.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID of the activity for an e-mail campaign.")
+ created_time: Optional[datetime] = Field(default=None, description="The time the tracking activity occurred")
+ tracking_activity_type: Optional[StrictStr] = Field(default=None, description="The types of the tracking activities included in the request. For example, sends, opens, clicks, bounces, opt-outs, or forwards.")
+ campaign_activity_name: Optional[StrictStr] = Field(default=None, description="The campaign activity name.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "created_time", "tracking_activity_type", "campaign_activity_name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetContactTrackingReport200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetContactTrackingReport200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "created_time": obj.get("created_time"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "campaign_activity_name": obj.get("campaign_activity_name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_custom_field200_response.py b/constant_contact_api_client/models/get_custom_field200_response.py
new file mode 100644
index 0000000..21391c6
--- /dev/null
+++ b/constant_contact_api_client/models/get_custom_field200_response.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetCustomField200Response(BaseModel):
+ """
+ Custom fields allow Constant Contact users to add custom content to a contact that can be used to personalize emails in addition to the standard set of variables available for email personalization.
+ """ # noqa: E501
+ custom_field_id: Optional[StrictStr] = Field(default=None, description="The custom_field's unique ID")
+ label: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The display name for the custom_field shown in the UI as free-form text")
+ name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="Unique name for the custom_field constructed from the label by replacing blanks with underscores.")
+ type: StrictStr = Field(description="Specifies the type of value the custom_field field accepts: string or date.")
+ updated_at: Optional[datetime] = Field(default=None, description="System generated date and time that the resource was updated, in ISO-8601 format.")
+ created_at: Optional[datetime] = Field(default=None, description="Date and time that the resource was created, in ISO-8601 format. System generated.")
+ __properties: ClassVar[List[str]] = ["custom_field_id", "label", "name", "type", "updated_at", "created_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetCustomField200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "custom_field_id",
+ "name",
+ "updated_at",
+ "created_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetCustomField200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "custom_field_id": obj.get("custom_field_id"),
+ "label": obj.get("label"),
+ "name": obj.get("name"),
+ "type": obj.get("type"),
+ "updated_at": obj.get("updated_at"),
+ "created_at": obj.get("created_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_did_not_opens_report200_response.py b/constant_contact_api_client/models/get_did_not_opens_report200_response.py
new file mode 100644
index 0000000..a9db897
--- /dev/null
+++ b/constant_contact_api_client/models/get_did_not_opens_report200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_did_not_opens_report200_response_tracking_activities_inner import GetDidNotOpensReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_email_sends_report200_response_links import GetEmailSendsReport200ResponseLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetDidNotOpensReport200Response(BaseModel):
+ """
+ GetDidNotOpensReport200Response
+ """ # noqa: E501
+ tracking_activities: List[GetDidNotOpensReport200ResponseTrackingActivitiesInner] = Field(description="Lists contacts that did not open the specified campaign_activity_id
.")
+ links: Optional[GetEmailSendsReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetDidNotOpensReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetDidNotOpensReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetDidNotOpensReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetEmailSendsReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_did_not_opens_report200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_did_not_opens_report200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..67dc46e
--- /dev/null
+++ b/constant_contact_api_client/models/get_did_not_opens_report200_response_tracking_activities_inner.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetDidNotOpensReport200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetDidNotOpensReport200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies an email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of tracking activity that is associated with this campaign_activity_id
and used for reporting purposes.")
+ email_address: StrictStr = Field(description="The email address used to send the email campaign activity to a contact.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The date and time that the contact was sent the email campaign activity.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetDidNotOpensReport200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetDidNotOpensReport200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_campaign_activity200_response.py b/constant_contact_api_client/models/get_email_campaign_activity200_response.py
new file mode 100644
index 0000000..02135e7
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_campaign_activity200_response.py
@@ -0,0 +1,144 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_email_campaign_activity200_response_document_properties import GetEmailCampaignActivity200ResponseDocumentProperties
+from constant_contact_api_client.models.get_email_campaign_activity200_response_physical_address_in_footer import GetEmailCampaignActivity200ResponsePhysicalAddressInFooter
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailCampaignActivity200Response(BaseModel):
+ """
+ GetEmailCampaignActivity200Response
+ """ # noqa: E501
+ campaign_activity_id: Optional[StrictStr] = Field(default=None, description="Identifies a campaign activity in the V3 API.")
+ campaign_id: Optional[StrictStr] = Field(default=None, description="Identifies a campaign in the V3 API.")
+ role: Optional[StrictStr] = Field(default=None, description="The purpose of the individual campaign activity in the larger email campaign effort. Valid values are: primary_email
contains the complete email content.primary_email
content without any personalized email information. For example, permalinks do not contain any of the contact details that you add to the primary_email
email content. primary_email
and a permalink
role campaign activity when you create an email campaign. ")
+ contact_list_ids: Optional[List[StrictStr]] = Field(default=None, description="The contacts that Constant Contact sends the email campaign activity to as an array of contact list_id
values. You cannot use contact lists and segments at the same time in an email campaign activity.")
+ segment_ids: Optional[List[StrictInt]] = Field(default=None, description="The contacts that Constant Contact sends the email campaign activity to as an array containing a single segment_id
value. Only format_type
3, 4, and 5 email campaign activities support segments. You cannot use contact lists and segments at the same time in an email campaign activity.")
+ current_status: Optional[StrictStr] = Field(default=None, description="The current status of the email campaign activity. Valid values are: /account/emails
to return a collection of account emails and their confirmation status.")
+ from_name: StrictStr = Field(description="The email \"From Name\" field for the email campaign activity.")
+ reply_to_email: StrictStr = Field(description="The email \"Reply To Email\" field for the email campaign activity. You must use a confirmed Constant Contact account email address. Make a GET call to /account/emails
to return a collection of account emails and their confirmation status.")
+ subject: StrictStr = Field(description="The email \"Subject\" field for the email campaign activity.")
+ html_content: Optional[StrictStr] = Field(default=None, description="The HTML or XHTML content for the email campaign activity. Only format_type
1 and 5 (legacy custom code emails or modern custom code emails) can contain html_content
.")
+ template_id: Optional[StrictStr] = Field(default=None, description="Identifies the email layout and design template that the email campaign activity is using as a base.")
+ permalink_url: Optional[StrictStr] = Field(default=None, description="The permanent link to a web accessible version of the email campaign content without any personalized email information. The permalink URL becomes accessible after you send an email campaign to contacts.")
+ preheader: Optional[StrictStr] = Field(default=None, description="The email preheader for the email campaign activity. Only format_type
3, 4, and 5 email campaign activities use the preheader property.")
+ physical_address_in_footer: Optional[GetEmailCampaignActivity200ResponsePhysicalAddressInFooter] = None
+ document_properties: Optional[GetEmailCampaignActivity200ResponseDocumentProperties] = None
+ __properties: ClassVar[List[str]] = ["campaign_activity_id", "campaign_id", "role", "contact_list_ids", "segment_ids", "current_status", "format_type", "from_email", "from_name", "reply_to_email", "subject", "html_content", "template_id", "permalink_url", "preheader", "physical_address_in_footer", "document_properties"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailCampaignActivity200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "campaign_activity_id",
+ "campaign_id",
+ "role",
+ "current_status",
+ "format_type",
+ "template_id",
+ "permalink_url",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of physical_address_in_footer
+ if self.physical_address_in_footer:
+ _dict['physical_address_in_footer'] = self.physical_address_in_footer.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of document_properties
+ if self.document_properties:
+ _dict['document_properties'] = self.document_properties.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailCampaignActivity200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "campaign_id": obj.get("campaign_id"),
+ "role": obj.get("role"),
+ "contact_list_ids": obj.get("contact_list_ids"),
+ "segment_ids": obj.get("segment_ids"),
+ "current_status": obj.get("current_status"),
+ "format_type": obj.get("format_type"),
+ "from_email": obj.get("from_email"),
+ "from_name": obj.get("from_name"),
+ "reply_to_email": obj.get("reply_to_email"),
+ "subject": obj.get("subject"),
+ "html_content": obj.get("html_content"),
+ "template_id": obj.get("template_id"),
+ "permalink_url": obj.get("permalink_url"),
+ "preheader": obj.get("preheader"),
+ "physical_address_in_footer": GetEmailCampaignActivity200ResponsePhysicalAddressInFooter.from_dict(obj.get("physical_address_in_footer")) if obj.get("physical_address_in_footer") is not None else None,
+ "document_properties": GetEmailCampaignActivity200ResponseDocumentProperties.from_dict(obj.get("document_properties")) if obj.get("document_properties") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_campaign_activity200_response_document_properties.py b/constant_contact_api_client/models/get_email_campaign_activity200_response_document_properties.py
new file mode 100644
index 0000000..fb3933f
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_campaign_activity200_response_document_properties.py
@@ -0,0 +1,121 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailCampaignActivity200ResponseDocumentProperties(BaseModel):
+ """
+ An object that contains optional properties for legacy format type emails (format_type
1 and 2). If you attempt to add a property that does apply to the email format_type
, the API will ignore the property.
+ """ # noqa: E501
+ style_content: Optional[Annotated[str, Field(strict=True, max_length=150000)]] = Field(default=None, description="Contains style sheet elements for XHTML letter format emails. This property applies only to format_type
1.")
+ letter_format: Optional[StrictStr] = Field(default='HTML', description="Email message format. Valid values are HTML
and XHTML
. By default, the value is HTML
. For more information, see the Advanced Editor User's Guide. This property applies only to format_type
1. You cannot change this property after you create an email. ")
+ greeting_salutation: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The greeting used in the email message. This property applies only to format_type
1.")
+ greeting_name_type: Optional[StrictStr] = Field(default='N', description="The type of name the campaign uses to greet the contact. Valid values are F
(First Name), L
(Last Name), B
(First and Last Name), or N
(No greeting). By default, the value is N
. This property applies only to format_type
1.")
+ greeting_secondary: Optional[Annotated[str, Field(strict=True, max_length=1500)]] = Field(default=None, description="A fallback text string the campaign uses to greet the contact when the greeting_name_type
is not available or set to N
. This property applies only to format_type
1.")
+ subscribe_link_enabled: Optional[StrictStr] = Field(default='false', description="If true
, the email footer includes a link for subscribing to the list. If false
, the message footer does not include a link for subscribing to the list. By default, the value is false
. This property applies only to format_type
1. ")
+ subscribe_link_name: Optional[Annotated[str, Field(strict=True, max_length=80)]] = Field(default=None, description="The text displayed as the name for the subscribe link in the email footer. This property applies only to format_type
1.")
+ text_content: Optional[Annotated[str, Field(strict=True, max_length=150000)]] = Field(default=None, description="Contains the text content that Constant Contact displays to contacts when their email client cannot display HTML email. If you do not specify text content, Constant Contact displays \"Greetings!\" as the text content. This property applies only to format_type
1. ")
+ permission_reminder_enabled: Optional[StrictStr] = Field(default='false', description="If true
, Constant Contact displays your permission_reminder
message to contacts at top of the email. If false
, Constant Contact does not display the message. By default, the value is false
. This property applies to format_type
1 and 2. ")
+ permission_reminder: Optional[Annotated[str, Field(strict=True, max_length=1500)]] = Field(default=None, description="The message text Constant Contact displays at the top of the email message to remind users that they are subscribed to an email list. This property applies to format_type
1 and 2.")
+ view_as_webpage_enabled: Optional[StrictStr] = Field(default='false', description="If true
, Constant Contact displays the view as web page email message. If false
Constant Contact does not display the message. By default, the value is false
. This property applies to format_type
1 and 2. ")
+ view_as_webpage_text: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The text Constant Contact displays before the view as web page link at the top of the email. This property applies to format_type
1 and 2.")
+ view_as_webpage_link_name: Optional[StrictStr] = Field(default=None, description="The name of the link that users can click to view the email as a web page. This property applies to format_type
1 and 2.")
+ forward_email_link_enabled: Optional[StrictStr] = Field(default='false', description="If true
, when the user forwards an email message the footer includes a link for subscribing to the list. If false
, when a user forwards an email message the footer does not include a link for subscribing to the list. By default, the value is false
. This property applies to format_type
1 and 2. ")
+ forward_email_link_name: Optional[Annotated[str, Field(strict=True, max_length=80)]] = Field(default=None, description="The text displayed as the name for the forward email link in the footer when a user forwards an email. This property applies to format_type
1 and 2.")
+ __properties: ClassVar[List[str]] = ["style_content", "letter_format", "greeting_salutation", "greeting_name_type", "greeting_secondary", "subscribe_link_enabled", "subscribe_link_name", "text_content", "permission_reminder_enabled", "permission_reminder", "view_as_webpage_enabled", "view_as_webpage_text", "view_as_webpage_link_name", "forward_email_link_enabled", "forward_email_link_name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailCampaignActivity200ResponseDocumentProperties from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "letter_format",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailCampaignActivity200ResponseDocumentProperties from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "style_content": obj.get("style_content"),
+ "letter_format": obj.get("letter_format") if obj.get("letter_format") is not None else 'HTML',
+ "greeting_salutation": obj.get("greeting_salutation"),
+ "greeting_name_type": obj.get("greeting_name_type") if obj.get("greeting_name_type") is not None else 'N',
+ "greeting_secondary": obj.get("greeting_secondary"),
+ "subscribe_link_enabled": obj.get("subscribe_link_enabled") if obj.get("subscribe_link_enabled") is not None else 'false',
+ "subscribe_link_name": obj.get("subscribe_link_name"),
+ "text_content": obj.get("text_content"),
+ "permission_reminder_enabled": obj.get("permission_reminder_enabled") if obj.get("permission_reminder_enabled") is not None else 'false',
+ "permission_reminder": obj.get("permission_reminder"),
+ "view_as_webpage_enabled": obj.get("view_as_webpage_enabled") if obj.get("view_as_webpage_enabled") is not None else 'false',
+ "view_as_webpage_text": obj.get("view_as_webpage_text"),
+ "view_as_webpage_link_name": obj.get("view_as_webpage_link_name"),
+ "forward_email_link_enabled": obj.get("forward_email_link_enabled") if obj.get("forward_email_link_enabled") is not None else 'false',
+ "forward_email_link_name": obj.get("forward_email_link_name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_campaign_activity200_response_physical_address_in_footer.py b/constant_contact_api_client/models/get_email_campaign_activity200_response_physical_address_in_footer.py
new file mode 100644
index 0000000..ff4f5f8
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_campaign_activity200_response_physical_address_in_footer.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailCampaignActivity200ResponsePhysicalAddressInFooter(BaseModel):
+ """
+ The physical address of the organization that is sending the email campaign. Constant Contact displays this information to contacts in the email message footer.
+ """ # noqa: E501
+ address_line1: StrictStr = Field(description="Line 1 of the organization's street address.")
+ address_line2: Optional[StrictStr] = Field(default=None, description="Line 2 of the organization's street address.")
+ address_line3: Optional[StrictStr] = Field(default=None, description="Line 3 of the organization's street address.")
+ address_optional: Optional[StrictStr] = Field(default=None, description="An optional address field for the organization. Only format_type
3, 4, and 5 can use this property.")
+ city: Optional[StrictStr] = Field(default=None, description="The city where the organization sending the email campaign is located.")
+ country_code: StrictStr = Field(description="The uppercase two letter ISO 3166-1 code for the organization's country.")
+ country_name: Optional[StrictStr] = Field(default=None, description="The full name of the country where the organization sending the email is located. Automatically generated using the country_code
.")
+ organization_name: StrictStr = Field(description="The name of the organization that is sending the email campaign.")
+ postal_code: Optional[StrictStr] = Field(default=None, description="The postal code address (ZIP code) of the organization.")
+ state_code: Optional[StrictStr] = Field(default=None, description="The uppercase two letter ISO 3166-1 code for the organization's state. This property is required if the country_code
is US (United States).")
+ state_name: Optional[StrictStr] = Field(default=None, description="The full state name for a state_code
that is inside the United States. Automatically generated using the state_code
.")
+ state_non_us_name: Optional[StrictStr] = Field(default=None, description="The full state name for a state_code
that is outside the United States. This property is not read only.")
+ __properties: ClassVar[List[str]] = ["address_line1", "address_line2", "address_line3", "address_optional", "city", "country_code", "country_name", "organization_name", "postal_code", "state_code", "state_name", "state_non_us_name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailCampaignActivity200ResponsePhysicalAddressInFooter from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "country_name",
+ "state_name",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailCampaignActivity200ResponsePhysicalAddressInFooter from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "address_line1": obj.get("address_line1"),
+ "address_line2": obj.get("address_line2"),
+ "address_line3": obj.get("address_line3"),
+ "address_optional": obj.get("address_optional"),
+ "city": obj.get("city"),
+ "country_code": obj.get("country_code"),
+ "country_name": obj.get("country_name"),
+ "organization_name": obj.get("organization_name"),
+ "postal_code": obj.get("postal_code"),
+ "state_code": obj.get("state_code"),
+ "state_name": obj.get("state_name"),
+ "state_non_us_name": obj.get("state_non_us_name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_campaign_activity_preview200_response.py b/constant_contact_api_client/models/get_email_campaign_activity_preview200_response.py
new file mode 100644
index 0000000..d731da0
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_campaign_activity_preview200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailCampaignActivityPreview200Response(BaseModel):
+ """
+ GetEmailCampaignActivityPreview200Response
+ """ # noqa: E501
+ campaign_activity_id: Optional[StrictStr] = Field(default=None, description="The unique ID for an email campaign activity.")
+ from_email: Optional[StrictStr] = Field(default=None, description="The \"from email\" email header for the email campaign activity.")
+ from_name: Optional[StrictStr] = Field(default=None, description="The \"from name\" email header for the email campaign activity.")
+ preheader: Optional[StrictStr] = Field(default=None, description="The email preheader for the email campaign activity. Only format_type
3, 4, and 5 email campaign activities use the preheader property.")
+ preview_html_content: Optional[StrictStr] = Field(default=None, description="An HTML preview of the email campaign activity.")
+ preview_text_content: Optional[StrictStr] = Field(default=None, description="A plain text preview of the email campaign activity.")
+ reply_to_email: Optional[StrictStr] = Field(default=None, description="The email \"Reply To Email\" field for the email campaign activity.")
+ subject: Optional[StrictStr] = Field(default=None, description="The email \"Subject\" field for the email campaign activity.")
+ __properties: ClassVar[List[str]] = ["campaign_activity_id", "from_email", "from_name", "preheader", "preview_html_content", "preview_text_content", "reply_to_email", "subject"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailCampaignActivityPreview200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailCampaignActivityPreview200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "from_email": obj.get("from_email"),
+ "from_name": obj.get("from_name"),
+ "preheader": obj.get("preheader"),
+ "preview_html_content": obj.get("preview_html_content"),
+ "preview_text_content": obj.get("preview_text_content"),
+ "reply_to_email": obj.get("reply_to_email"),
+ "subject": obj.get("subject")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_campaign_activity_report200_response.py b/constant_contact_api_client/models/get_email_campaign_activity_report200_response.py
new file mode 100644
index 0000000..7f4f557
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_campaign_activity_report200_response.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_campaign_activity_report200_response_results_inner import GetEmailCampaignActivityReport200ResponseResultsInner
+from constant_contact_api_client.models.get_email_stats_report200_response_errors_inner import GetEmailStatsReport200ResponseErrorsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailCampaignActivityReport200Response(BaseModel):
+ """
+ GetEmailCampaignActivityReport200Response
+ """ # noqa: E501
+ errors: Optional[List[GetEmailStatsReport200ResponseErrorsInner]] = Field(default=None, description="Array of errors indicating any partial failures in the query")
+ results: Optional[List[GetEmailCampaignActivityReport200ResponseResultsInner]] = Field(default=None, description="An array of results containing statistics for each requested campaign activity")
+ __properties: ClassVar[List[str]] = ["errors", "results"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailCampaignActivityReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
+ _items = []
+ if self.errors:
+ for _item in self.errors:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['errors'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in results (list)
+ _items = []
+ if self.results:
+ for _item in self.results:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['results'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailCampaignActivityReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "errors": [GetEmailStatsReport200ResponseErrorsInner.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None,
+ "results": [GetEmailCampaignActivityReport200ResponseResultsInner.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_campaign_activity_report200_response_results_inner.py b/constant_contact_api_client/models/get_email_campaign_activity_report200_response_results_inner.py
new file mode 100644
index 0000000..72f6b6c
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_campaign_activity_report200_response_results_inner.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_email_campaign_activity_report200_response_results_inner_stats import GetEmailCampaignActivityReport200ResponseResultsInnerStats
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailCampaignActivityReport200ResponseResultsInner(BaseModel):
+ """
+ GetEmailCampaignActivityReport200ResponseResultsInner
+ """ # noqa: E501
+ campaign_id: Optional[StrictStr] = Field(default=None, description="The unique ID used to identify the campaign (UUID).")
+ campaign_activity_id: Optional[StrictStr] = Field(default=None, description="The unique ID used to identify the campaign activity (UUID).")
+ stats: Optional[GetEmailCampaignActivityReport200ResponseResultsInnerStats] = None
+ last_refresh_time: Optional[StrictStr] = Field(default=None, description="The time at which the campaign activity stats were last refreshed in ISO 8601 format (e.g. '2015-08-25T22:00:09.908Z').")
+ __properties: ClassVar[List[str]] = ["campaign_id", "campaign_activity_id", "stats", "last_refresh_time"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailCampaignActivityReport200ResponseResultsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of stats
+ if self.stats:
+ _dict['stats'] = self.stats.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailCampaignActivityReport200ResponseResultsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_id": obj.get("campaign_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "stats": GetEmailCampaignActivityReport200ResponseResultsInnerStats.from_dict(obj.get("stats")) if obj.get("stats") is not None else None,
+ "last_refresh_time": obj.get("last_refresh_time")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_campaign_activity_report200_response_results_inner_stats.py b/constant_contact_api_client/models/get_email_campaign_activity_report200_response_results_inner_stats.py
new file mode 100644
index 0000000..eea4621
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_campaign_activity_report200_response_results_inner_stats.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailCampaignActivityReport200ResponseResultsInnerStats(BaseModel):
+ """
+ Key-value pairs of campaign activity statistics.
+ """ # noqa: E501
+ em_bounces: Optional[StrictInt] = Field(default=None, description="Number of unique email bounces.")
+ em_clicks: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who clicked any link in the email.")
+ em_clicks_all: Optional[StrictInt] = Field(default=None, description="Total number of non-unique email clicks.")
+ em_clicks_all_computer: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a standard desktop or laptop computer.")
+ em_clicks_all_mobile: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a mobile phone or similar small mobile device (e.g. iPhone).")
+ em_clicks_all_tablet: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a small tablet type computer (e.g. iPad).")
+ em_clicks_all_other: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on an unknown device (e.g. Game Console or Wearable).")
+ em_clicks_all_none: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks for which the device type was not captured. This will account for any clicks prior to when device type was collected and stored.")
+ em_forwards: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who forwarded the email using the forward to a friend feature (not available for all types of emails).")
+ em_not_opened: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who did not open the email. This is calculated as follows: em_not_opened
is equal to em_sends - em_opens - em_bounces
. This value is reported as zero if the calculation results in a negative value.")
+ em_opens: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who opened the email.")
+ em_opens_all: Optional[StrictInt] = Field(default=None, description="Total number of non-unique email opens.")
+ em_opens_all_computer: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a standard desktop or laptop computer.")
+ em_opens_all_mobile: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a mobile phone or similar small mobile device (e.g. iPhone).")
+ em_opens_all_tablet: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a small tablet type computer (e.g. iPad).")
+ em_opens_all_other: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on an unknown device (e.g. Game Console or Wearable).")
+ em_opens_all_none: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens for which the device type was not captured. This will account for any opens prior to when device type was collected and stored.")
+ em_optouts: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who unsubscribed due to this email.")
+ em_sends: Optional[StrictInt] = Field(default=None, description="Number of unique email sends.")
+ em_abuse: Optional[StrictInt] = Field(default=None, description="Number of abuse (spam) complaints received.")
+ em_bounces_blocked: Optional[StrictInt] = Field(default=None, description="Unique number bounced because as blocked by the receiving system.")
+ em_bounces_mailbox_full: Optional[StrictInt] = Field(default=None, description="Unique number that bounced back with a mailbox full message.")
+ em_bounces_nonexistent_address: Optional[StrictInt] = Field(default=None, description="Unique number that bounced as a non-existent address.")
+ em_bounces_other: Optional[StrictInt] = Field(default=None, description="Unique number that bounced without an identifiable cause.")
+ em_bounces_suspended: Optional[StrictInt] = Field(default=None, description="Unique number that bounced as suspended. Email address bounces as suspended when multiple non-existent bounces have been received for the same address.")
+ em_bounces_undeliverable: Optional[StrictInt] = Field(default=None, description="Unique number that bounced as undeliverable.")
+ em_bounces_vacation: Optional[StrictInt] = Field(default=None, description="Unique number that bounced back with a vacation or out of office autoreply.")
+ __properties: ClassVar[List[str]] = ["em_bounces", "em_clicks", "em_clicks_all", "em_clicks_all_computer", "em_clicks_all_mobile", "em_clicks_all_tablet", "em_clicks_all_other", "em_clicks_all_none", "em_forwards", "em_not_opened", "em_opens", "em_opens_all", "em_opens_all_computer", "em_opens_all_mobile", "em_opens_all_tablet", "em_opens_all_other", "em_opens_all_none", "em_optouts", "em_sends", "em_abuse", "em_bounces_blocked", "em_bounces_mailbox_full", "em_bounces_nonexistent_address", "em_bounces_other", "em_bounces_suspended", "em_bounces_undeliverable", "em_bounces_vacation"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailCampaignActivityReport200ResponseResultsInnerStats from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailCampaignActivityReport200ResponseResultsInnerStats from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "em_bounces": obj.get("em_bounces"),
+ "em_clicks": obj.get("em_clicks"),
+ "em_clicks_all": obj.get("em_clicks_all"),
+ "em_clicks_all_computer": obj.get("em_clicks_all_computer"),
+ "em_clicks_all_mobile": obj.get("em_clicks_all_mobile"),
+ "em_clicks_all_tablet": obj.get("em_clicks_all_tablet"),
+ "em_clicks_all_other": obj.get("em_clicks_all_other"),
+ "em_clicks_all_none": obj.get("em_clicks_all_none"),
+ "em_forwards": obj.get("em_forwards"),
+ "em_not_opened": obj.get("em_not_opened"),
+ "em_opens": obj.get("em_opens"),
+ "em_opens_all": obj.get("em_opens_all"),
+ "em_opens_all_computer": obj.get("em_opens_all_computer"),
+ "em_opens_all_mobile": obj.get("em_opens_all_mobile"),
+ "em_opens_all_tablet": obj.get("em_opens_all_tablet"),
+ "em_opens_all_other": obj.get("em_opens_all_other"),
+ "em_opens_all_none": obj.get("em_opens_all_none"),
+ "em_optouts": obj.get("em_optouts"),
+ "em_sends": obj.get("em_sends"),
+ "em_abuse": obj.get("em_abuse"),
+ "em_bounces_blocked": obj.get("em_bounces_blocked"),
+ "em_bounces_mailbox_full": obj.get("em_bounces_mailbox_full"),
+ "em_bounces_nonexistent_address": obj.get("em_bounces_nonexistent_address"),
+ "em_bounces_other": obj.get("em_bounces_other"),
+ "em_bounces_suspended": obj.get("em_bounces_suspended"),
+ "em_bounces_undeliverable": obj.get("em_bounces_undeliverable"),
+ "em_bounces_vacation": obj.get("em_bounces_vacation")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_campaign_activity_schedule200_response_inner.py b/constant_contact_api_client/models/get_email_campaign_activity_schedule200_response_inner.py
new file mode 100644
index 0000000..a9376c9
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_campaign_activity_schedule200_response_inner.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailCampaignActivitySchedule200ResponseInner(BaseModel):
+ """
+ GetEmailCampaignActivitySchedule200ResponseInner
+ """ # noqa: E501
+ scheduled_date: Optional[datetime] = Field(default=None, description="The date when Constant Contact will send the email campaign activity to contacts in ISO-8601 format. For example, 2022-05-17
and 2022-05-17T16:37:59.091Z
are valid dates.")
+ __properties: ClassVar[List[str]] = ["scheduled_date"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailCampaignActivitySchedule200ResponseInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailCampaignActivitySchedule200ResponseInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "scheduled_date": obj.get("scheduled_date")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_campaign_activity_send_history200_response_inner.py b/constant_contact_api_client/models/get_email_campaign_activity_send_history200_response_inner.py
new file mode 100644
index 0000000..19b4eea
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_campaign_activity_send_history200_response_inner.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailCampaignActivitySendHistory200ResponseInner(BaseModel):
+ """
+ GetEmailCampaignActivitySendHistory200ResponseInner
+ """ # noqa: E501
+ send_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Uniquely identifies each send history object using the number of times that you sent the email campaign activity as a sequence starting at 1
. For example, when you send a specific email campaign activity twice this method returns an object with a send_id
of 1 for the first send and an object with a send_id
of 2 for the second send. ")
+ contact_list_ids: Optional[List[StrictStr]] = Field(default=None, description="The contacts lists that Constant Contact sent email campaign activity to as an array of contact list_id
strings.")
+ segment_ids: Optional[List[StrictInt]] = Field(default=None, description="The contact segments that Constant Contact sent the email campaign activity to as an array of segment_id
integers.")
+ count: Optional[StrictInt] = Field(default=None, description="The number of contacts that Constant Contact sent this email campaign activity to. This property is specific to each send history object. When you resend an email campaign activity, Constant Contact only sends it to new contacts in the contact lists or segments you are using.")
+ run_date: Optional[datetime] = Field(default=None, description="The system generated date and time that Constant Contact sent the email campaign activity to contacts in ISO-8601 format.")
+ send_status: Optional[StrictStr] = Field(default=None, description="The send status for the email campaign activity. Valid values are: COMPLETED
: Constant Contact successfully sent the email campaign activity.ERRORED
: Constant Contact encountered an error when sending the email campaign activity.0
if Constant Contact successfully sent the email campaign activity to contacts. Possible reason_code
values are: reason_code
12 as a send attempt with a send_status
of COMPLETED and a count
of 0.v2_email_campaign_id
cross-referenced with a V3 campaign_id
and a V3 campaign_activity_id
value.")
+ __properties: ClassVar[List[str]] = ["xrefs"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailCampaignXrefs200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in xrefs (list)
+ _items = []
+ if self.xrefs:
+ for _item in self.xrefs:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['xrefs'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailCampaignXrefs200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "xrefs": [GetEmailCampaignXrefs200ResponseXrefsInner.from_dict(_item) for _item in obj.get("xrefs")] if obj.get("xrefs") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_campaign_xrefs200_response_xrefs_inner.py b/constant_contact_api_client/models/get_email_campaign_xrefs200_response_xrefs_inner.py
new file mode 100644
index 0000000..7806a41
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_campaign_xrefs200_response_xrefs_inner.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailCampaignXrefs200ResponseXrefsInner(BaseModel):
+ """
+ GetEmailCampaignXrefs200ResponseXrefsInner
+ """ # noqa: E501
+ v2_email_campaign_id: Optional[StrictStr] = Field(default=None, description="Identifies an email campaign in the V2 API.")
+ campaign_id: Optional[StrictStr] = Field(default=None, description="Identifies a campaign in the V3 API. In the V3 API, each campaign contains one or more activities. For more information, see V3 Email Campaign Resource Changes.
") + campaign_activity_id: Optional[StrictStr] = Field(default=None, description="
Identifies a campaign activity in the V3 API. In the V3 API, each campaign contains one or more activities. Email type activities represent the detailed information in an email and contain properties like from_email
and from_name
. For more information, see V3 Campaign Resource Changes.
")
+ __properties: ClassVar[List[str]] = ["v2_email_campaign_id", "campaign_id", "campaign_activity_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailCampaignXrefs200ResponseXrefsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailCampaignXrefs200ResponseXrefsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "v2_email_campaign_id": obj.get("v2_email_campaign_id"),
+ "campaign_id": obj.get("campaign_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_opens_report200_response.py b/constant_contact_api_client/models/get_email_opens_report200_response.py
new file mode 100644
index 0000000..4d7b4cc
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_opens_report200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_opens_report200_response_tracking_activities_inner import GetEmailOpensReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_email_sends_report200_response_links import GetEmailSendsReport200ResponseLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailOpensReport200Response(BaseModel):
+ """
+ GetEmailOpensReport200Response
+ """ # noqa: E501
+ tracking_activities: List[GetEmailOpensReport200ResponseTrackingActivitiesInner] = Field(description="Lists contacts that opened the specified campaign_activity_id
.")
+ links: Optional[GetEmailSendsReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailOpensReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailOpensReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetEmailOpensReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetEmailSendsReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_opens_report200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_email_opens_report200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..2eb6ea9
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_opens_report200_response_tracking_activities_inner.py
@@ -0,0 +1,106 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailOpensReport200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetEmailOpensReport200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies an email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of tracking activity that is associated with this campaign_activity_id
and used for reporting purposes.")
+ email_address: StrictStr = Field(description="The email address used to send the email campaign activity to a contact.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ device_type: Optional[StrictStr] = Field(default=None, description="The type of device that the contact used to open the email campaign activity.")
+ created_time: datetime = Field(description="The date and time that the contact opened the email campaign activity.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "device_type", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailOpensReport200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailOpensReport200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "device_type": obj.get("device_type"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_sends_report200_response.py b/constant_contact_api_client/models/get_email_sends_report200_response.py
new file mode 100644
index 0000000..c1a8d0d
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_sends_report200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_sends_report200_response_links import GetEmailSendsReport200ResponseLinks
+from constant_contact_api_client.models.get_email_sends_report200_response_tracking_activities_inner import GetEmailSendsReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailSendsReport200Response(BaseModel):
+ """
+ GetEmailSendsReport200Response
+ """ # noqa: E501
+ tracking_activities: List[GetEmailSendsReport200ResponseTrackingActivitiesInner] = Field(description="Lists the contacts to which the email campaign activity (campaign_activity_id
) was sent.")
+ links: Optional[GetEmailSendsReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailSendsReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailSendsReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetEmailSendsReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetEmailSendsReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_sends_report200_response_links.py b/constant_contact_api_client/models/get_email_sends_report200_response_links.py
new file mode 100644
index 0000000..be3518a
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_sends_report200_response_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links_next import GetContactTrackingReport200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailSendsReport200ResponseLinks(BaseModel):
+ """
+ HAL property that contains the next link, if applicable.
+ """ # noqa: E501
+ next: GetContactTrackingReport200ResponseLinksNext
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailSendsReport200ResponseLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailSendsReport200ResponseLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetContactTrackingReport200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_sends_report200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_email_sends_report200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..28176b1
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_sends_report200_response_tracking_activities_inner.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailSendsReport200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetEmailSendsReport200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies an email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of tracking activity that is associated with this campaign_activity_id
and used for reporting purposes.")
+ email_address: StrictStr = Field(description="The email address used to send the email campaign activity to a contact.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The date and time that you sent the email campaign to the contact.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailSendsReport200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailSendsReport200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_stats_report200_response.py b/constant_contact_api_client/models/get_email_stats_report200_response.py
new file mode 100644
index 0000000..7c2592d
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_stats_report200_response.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_stats_report200_response_errors_inner import GetEmailStatsReport200ResponseErrorsInner
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner import GetEmailStatsReport200ResponseResultsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailStatsReport200Response(BaseModel):
+ """
+ GetEmailStatsReport200Response
+ """ # noqa: E501
+ errors: Optional[List[GetEmailStatsReport200ResponseErrorsInner]] = Field(default=None, description="An array of errors indicating any partial failures in the query.")
+ results: Optional[List[GetEmailStatsReport200ResponseResultsInner]] = Field(default=None, description="An array of results listing statistics for each requested campaign_id
.")
+ __properties: ClassVar[List[str]] = ["errors", "results"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailStatsReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
+ _items = []
+ if self.errors:
+ for _item in self.errors:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['errors'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in results (list)
+ _items = []
+ if self.results:
+ for _item in self.results:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['results'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailStatsReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "errors": [GetEmailStatsReport200ResponseErrorsInner.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None,
+ "results": [GetEmailStatsReport200ResponseResultsInner.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_stats_report200_response_errors_inner.py b/constant_contact_api_client/models/get_email_stats_report200_response_errors_inner.py
new file mode 100644
index 0000000..201b5e2
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_stats_report200_response_errors_inner.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailStatsReport200ResponseErrorsInner(BaseModel):
+ """
+ GetEmailStatsReport200ResponseErrorsInner
+ """ # noqa: E501
+ error_key: Optional[StrictStr] = Field(default=None, description="The unique error key.")
+ error_message: Optional[StrictStr] = Field(default=None, description="A error description.")
+ __properties: ClassVar[List[str]] = ["error_key", "error_message"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailStatsReport200ResponseErrorsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailStatsReport200ResponseErrorsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "error_key": obj.get("error_key"),
+ "error_message": obj.get("error_message")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_stats_report200_response_results_inner.py b/constant_contact_api_client/models/get_email_stats_report200_response_results_inner.py
new file mode 100644
index 0000000..bb92ea4
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_stats_report200_response_results_inner.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner_percents import GetEmailStatsReport200ResponseResultsInnerPercents
+from constant_contact_api_client.models.get_email_stats_report200_response_results_inner_stats import GetEmailStatsReport200ResponseResultsInnerStats
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailStatsReport200ResponseResultsInner(BaseModel):
+ """
+ GetEmailStatsReport200ResponseResultsInner
+ """ # noqa: E501
+ campaign_id: Optional[StrictStr] = Field(default=None, description="The ID that uniquely identifies the campaign (UUID).")
+ stats: Optional[GetEmailStatsReport200ResponseResultsInnerStats] = None
+ percents: Optional[GetEmailStatsReport200ResponseResultsInnerPercents] = None
+ last_refresh_time: Optional[datetime] = Field(default=None, description="The date and time that the campaign stats were last refreshed.")
+ __properties: ClassVar[List[str]] = ["campaign_id", "stats", "percents", "last_refresh_time"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailStatsReport200ResponseResultsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of stats
+ if self.stats:
+ _dict['stats'] = self.stats.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of percents
+ if self.percents:
+ _dict['percents'] = self.percents.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailStatsReport200ResponseResultsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "campaign_id": obj.get("campaign_id"),
+ "stats": GetEmailStatsReport200ResponseResultsInnerStats.from_dict(obj.get("stats")) if obj.get("stats") is not None else None,
+ "percents": GetEmailStatsReport200ResponseResultsInnerPercents.from_dict(obj.get("percents")) if obj.get("percents") is not None else None,
+ "last_refresh_time": obj.get("last_refresh_time")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_stats_report200_response_results_inner_percents.py b/constant_contact_api_client/models/get_email_stats_report200_response_results_inner_percents.py
new file mode 100644
index 0000000..897d9e4
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_stats_report200_response_results_inner_percents.py
@@ -0,0 +1,106 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailStatsReport200ResponseResultsInnerPercents(BaseModel):
+ """
+ Key-value pairs of campaign related percentages.
+ """ # noqa: E501
+ bounce: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of emails sent to unique recipients that bounced.")
+ click: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of recipients who opened the email who also clicked one or more links in it.")
+ desktop_click: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of clicks that came from a standard desktop or laptop computer.")
+ desktop_open: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of opens that came from a standard desktop or laptop computer.")
+ did_not_open: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of recipients that received the email (did not bounce) but did not open it.")
+ mobile_click: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of clicks that came from a mobile phone, tablet computer, or similar small mobile device (e.g. iPhone or iPad).")
+ mobile_open: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of opens that came from a mobile phone, tablet computer, or similar small mobile device (e.g. iPhone or iPad).")
+ open: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of recipients that received the email (did not bounce) and opened it.")
+ unsubscribe: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of recipients that received the email (did not bounce) and chose to unsubscribe.")
+ __properties: ClassVar[List[str]] = ["bounce", "click", "desktop_click", "desktop_open", "did_not_open", "mobile_click", "mobile_open", "open", "unsubscribe"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailStatsReport200ResponseResultsInnerPercents from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailStatsReport200ResponseResultsInnerPercents from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "bounce": obj.get("bounce"),
+ "click": obj.get("click"),
+ "desktop_click": obj.get("desktop_click"),
+ "desktop_open": obj.get("desktop_open"),
+ "did_not_open": obj.get("did_not_open"),
+ "mobile_click": obj.get("mobile_click"),
+ "mobile_open": obj.get("mobile_open"),
+ "open": obj.get("open"),
+ "unsubscribe": obj.get("unsubscribe")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_email_stats_report200_response_results_inner_stats.py b/constant_contact_api_client/models/get_email_stats_report200_response_results_inner_stats.py
new file mode 100644
index 0000000..6aa8a49
--- /dev/null
+++ b/constant_contact_api_client/models/get_email_stats_report200_response_results_inner_stats.py
@@ -0,0 +1,126 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetEmailStatsReport200ResponseResultsInnerStats(BaseModel):
+ """
+ Key-value pairs of campaign related statistics.
+ """ # noqa: E501
+ em_bounces: Optional[StrictInt] = Field(default=None, description="Number of unique email bounces.")
+ em_clicks: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who clicked any link in the email.")
+ em_clicks_all: Optional[StrictInt] = Field(default=None, description="Total number of non-unique email clicks.")
+ em_clicks_all_computer: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a standard desktop or laptop computer.")
+ em_clicks_all_mobile: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a mobile phone or similar small mobile device (e.g. iPhone).")
+ em_clicks_all_tablet: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a small tablet type computer (e.g. iPad).")
+ em_clicks_all_other: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on an unknown device (e.g. Game Console or Wearable).")
+ em_clicks_all_none: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks for which the device type was not captured. This will account for any clicks prior to when device type was collected and stored.")
+ em_forwards: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who forwarded the email using the forward to a friend feature (not available for all types of emails).")
+ em_not_opened: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who did not open the email. This is calculated as follows: em_not_opened
is equal to em_sends - em_opens - em_bounces
. This value is reported as zero if the calculation results in a negative value.")
+ em_opens: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who opened the email.")
+ em_opens_all: Optional[StrictInt] = Field(default=None, description="Total number of non-unique email opens.")
+ em_opens_all_computer: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a standard desktop or laptop computer.")
+ em_opens_all_mobile: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a mobile phone or similar small mobile device (e.g. iPhone).")
+ em_opens_all_tablet: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a small tablet type computer (e.g. iPad).")
+ em_opens_all_other: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on an unknown device (e.g. Game Console or Wearable).")
+ em_opens_all_none: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens for which the device type was not captured. This will account for any opens prior to when device type was collected and stored.")
+ em_optouts: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who unsubscribed due to this email.")
+ em_sends: Optional[StrictInt] = Field(default=None, description="Number of unique email sends.")
+ __properties: ClassVar[List[str]] = ["em_bounces", "em_clicks", "em_clicks_all", "em_clicks_all_computer", "em_clicks_all_mobile", "em_clicks_all_tablet", "em_clicks_all_other", "em_clicks_all_none", "em_forwards", "em_not_opened", "em_opens", "em_opens_all", "em_opens_all_computer", "em_opens_all_mobile", "em_opens_all_tablet", "em_opens_all_other", "em_opens_all_none", "em_optouts", "em_sends"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetEmailStatsReport200ResponseResultsInnerStats from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetEmailStatsReport200ResponseResultsInnerStats from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "em_bounces": obj.get("em_bounces"),
+ "em_clicks": obj.get("em_clicks"),
+ "em_clicks_all": obj.get("em_clicks_all"),
+ "em_clicks_all_computer": obj.get("em_clicks_all_computer"),
+ "em_clicks_all_mobile": obj.get("em_clicks_all_mobile"),
+ "em_clicks_all_tablet": obj.get("em_clicks_all_tablet"),
+ "em_clicks_all_other": obj.get("em_clicks_all_other"),
+ "em_clicks_all_none": obj.get("em_clicks_all_none"),
+ "em_forwards": obj.get("em_forwards"),
+ "em_not_opened": obj.get("em_not_opened"),
+ "em_opens": obj.get("em_opens"),
+ "em_opens_all": obj.get("em_opens_all"),
+ "em_opens_all_computer": obj.get("em_opens_all_computer"),
+ "em_opens_all_mobile": obj.get("em_opens_all_mobile"),
+ "em_opens_all_tablet": obj.get("em_opens_all_tablet"),
+ "em_opens_all_other": obj.get("em_opens_all_other"),
+ "em_opens_all_none": obj.get("em_opens_all_none"),
+ "em_optouts": obj.get("em_optouts"),
+ "em_sends": obj.get("em_sends")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_forwards_report200_response.py b/constant_contact_api_client/models/get_forwards_report200_response.py
new file mode 100644
index 0000000..ea94817
--- /dev/null
+++ b/constant_contact_api_client/models/get_forwards_report200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_sends_report200_response_links import GetEmailSendsReport200ResponseLinks
+from constant_contact_api_client.models.get_forwards_report200_response_tracking_activities_inner import GetForwardsReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetForwardsReport200Response(BaseModel):
+ """
+ GetForwardsReport200Response
+ """ # noqa: E501
+ tracking_activities: List[GetForwardsReport200ResponseTrackingActivitiesInner] = Field(description="The list of contacts that forwarded the specified email campaign activity. ")
+ links: Optional[GetEmailSendsReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetForwardsReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetForwardsReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetForwardsReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetEmailSendsReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_forwards_report200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_forwards_report200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..2d32987
--- /dev/null
+++ b/constant_contact_api_client/models/get_forwards_report200_response_tracking_activities_inner.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetForwardsReport200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetForwardsReport200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies the email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of report tracking activity that is associated with the specified campaign_activity_id
.")
+ email_address: StrictStr = Field(description="The contact's email address.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The time that the contact forwarded the email campaign activity.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetForwardsReport200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetForwardsReport200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_list200_response.py b/constant_contact_api_client/models/get_list200_response.py
new file mode 100644
index 0000000..c03dd73
--- /dev/null
+++ b/constant_contact_api_client/models/get_list200_response.py
@@ -0,0 +1,114 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetList200Response(BaseModel):
+ """
+ GetList200Response
+ """ # noqa: E501
+ list_id: StrictStr = Field(description="Unique ID for the contact list")
+ name: StrictStr = Field(description="The name given to the contact list")
+ description: Optional[StrictStr] = Field(default=None, description="Text describing the list.")
+ favorite: Optional[StrictBool] = Field(default=False, description="Identifies whether or not the account has favorited the contact list.")
+ created_at: Optional[datetime] = Field(default=None, description="System generated date and time that the resource was created, in ISO-8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the list was last updated, in ISO-8601 format. System generated.")
+ deleted_at: Optional[datetime] = Field(default=None, description="If the list was deleted, this property shows the date and time it was deleted, in ISO-8601 format. System generated.")
+ membership_count: Optional[StrictInt] = Field(default=None, description="The total number of contacts that are members in a list. Does not apply to segment type lists.")
+ __properties: ClassVar[List[str]] = ["list_id", "name", "description", "favorite", "created_at", "updated_at", "deleted_at", "membership_count"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetList200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "list_id",
+ "created_at",
+ "updated_at",
+ "deleted_at",
+ "membership_count",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetList200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "list_id": obj.get("list_id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "favorite": obj.get("favorite") if obj.get("favorite") is not None else False,
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "deleted_at": obj.get("deleted_at"),
+ "membership_count": obj.get("membership_count")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_list_id_xrefs200_response.py b/constant_contact_api_client/models/get_list_id_xrefs200_response.py
new file mode 100644
index 0000000..352fafb
--- /dev/null
+++ b/constant_contact_api_client/models/get_list_id_xrefs200_response.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_list_id_xrefs200_response_xrefs_inner import GetListIdXrefs200ResponseXrefsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetListIdXrefs200Response(BaseModel):
+ """
+ GetListIdXrefs200Response
+ """ # noqa: E501
+ xrefs: Optional[Annotated[List[GetListIdXrefs200ResponseXrefsInner], Field(max_length=500)]] = Field(default=None, description="An array of cross-referenced V3 API list_id
and V2 API sequence_id
properties. Response is sorted ascending by sequence_id
.")
+ __properties: ClassVar[List[str]] = ["xrefs"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetListIdXrefs200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in xrefs (list)
+ _items = []
+ if self.xrefs:
+ for _item in self.xrefs:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['xrefs'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetListIdXrefs200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "xrefs": [GetListIdXrefs200ResponseXrefsInner.from_dict(_item) for _item in obj.get("xrefs")] if obj.get("xrefs") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_list_id_xrefs200_response_xrefs_inner.py b/constant_contact_api_client/models/get_list_id_xrefs200_response_xrefs_inner.py
new file mode 100644
index 0000000..9b354fc
--- /dev/null
+++ b/constant_contact_api_client/models/get_list_id_xrefs200_response_xrefs_inner.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetListIdXrefs200ResponseXrefsInner(BaseModel):
+ """
+ The cross-referenced pair of V3 API list_id
and V2 API sequence_id
for a list. Response is sorted ascending by sequence_id
.
+ """ # noqa: E501
+ sequence_id: Optional[StrictStr] = Field(default=None, description="The V2 API list unique identifier")
+ list_id: Optional[StrictStr] = Field(default=None, description="The V3 API list unique identifier")
+ __properties: ClassVar[List[str]] = ["sequence_id", "list_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetListIdXrefs200ResponseXrefsInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetListIdXrefs200ResponseXrefsInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "sequence_id": obj.get("sequence_id"),
+ "list_id": obj.get("list_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_optouts_report200_response.py b/constant_contact_api_client/models/get_optouts_report200_response.py
new file mode 100644
index 0000000..9fc77ef
--- /dev/null
+++ b/constant_contact_api_client/models/get_optouts_report200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_sends_report200_response_links import GetEmailSendsReport200ResponseLinks
+from constant_contact_api_client.models.get_optouts_report200_response_tracking_activities_inner import GetOptoutsReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetOptoutsReport200Response(BaseModel):
+ """
+ GetOptoutsReport200Response
+ """ # noqa: E501
+ tracking_activities: List[GetOptoutsReport200ResponseTrackingActivitiesInner] = Field(description="The list of opt-out tracking activities")
+ links: GetEmailSendsReport200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetOptoutsReport200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetOptoutsReport200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetOptoutsReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetEmailSendsReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_optouts_report200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_optouts_report200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..6c6b4d6
--- /dev/null
+++ b/constant_contact_api_client/models/get_optouts_report200_response_tracking_activities_inner.py
@@ -0,0 +1,106 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetOptoutsReport200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetOptoutsReport200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies the email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of report tracking activity that is associated with the specified campaign_activity_id
.")
+ email_address: StrictStr = Field(description="The contact's email address.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ opt_out_reason: Optional[StrictStr] = Field(default=None, description="The opt-out reason, if the contact entered a reason.")
+ created_time: datetime = Field(description="The time that the contact chose to opt-out from receiving future email campaign activities.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "opt_out_reason", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetOptoutsReport200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetOptoutsReport200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "opt_out_reason": obj.get("opt_out_reason"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_resend_email_campaign200_response_inner.py b/constant_contact_api_client/models/get_resend_email_campaign200_response_inner.py
new file mode 100644
index 0000000..8f7b642
--- /dev/null
+++ b/constant_contact_api_client/models/get_resend_email_campaign200_response_inner.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetResendEmailCampaign200ResponseInner(BaseModel):
+ """
+ GetResendEmailCampaign200ResponseInner
+ """ # noqa: E501
+ resend_subject: Optional[StrictStr] = Field(default=None, description="The subject line used when resending the email campaign activity.")
+ delay_days: Optional[StrictInt] = Field(default=None, description="The number of days to wait before Constant Contact resends the email. Valid values include 1
to 10
days. This value is only returned in the response results if the resend activity was created with delay_days
or the delay_minutes
equal to an exact day value. ")
+ delay_minutes: Optional[StrictInt] = Field(default=None, description="The number of minutes to wait before Constant Contact resends the email. There are 1,440 minutes in a day. Valid values includes a minimum of 720
(12 hours) and a maximum of 14,400
minutes (10 days). This property is mutually exclusive with delay_days
.")
+ resend_date: Optional[datetime] = Field(default=None, description="The system generated date and time (in ISO-8601 format) that the email campaign activity was resent to non-openers (only included in the response results for sent resend activities).")
+ resend_request_id: Optional[StrictStr] = Field(default=None, description="For scheduled or sent resend to non-opener emails, the system generates an ID that identifies the resend to non-openers activity. For draft email campaign resend activities, the system returns DRAFT
.")
+ resend_status: Optional[StrictStr] = Field(default=None, description="The status of the resend to non-openers campaign activity. The resend_status
is only returned in the response results if the campaign activity is either scheduled to be sent or was already sent. ")
+ __properties: ClassVar[List[str]] = ["resend_subject", "delay_days", "delay_minutes", "resend_date", "resend_request_id", "resend_status"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetResendEmailCampaign200ResponseInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "resend_date",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetResendEmailCampaign200ResponseInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "resend_subject": obj.get("resend_subject"),
+ "delay_days": obj.get("delay_days"),
+ "delay_minutes": obj.get("delay_minutes"),
+ "resend_date": obj.get("resend_date"),
+ "resend_request_id": obj.get("resend_request_id"),
+ "resend_status": obj.get("resend_status")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_sms_engagement_history200_response_inner.py b/constant_contact_api_client/models/get_sms_engagement_history200_response_inner.py
new file mode 100644
index 0000000..326fd44
--- /dev/null
+++ b/constant_contact_api_client/models/get_sms_engagement_history200_response_inner.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_sms_engagement_history200_response_inner_history_details import GetSmsEngagementHistory200ResponseInnerHistoryDetails
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetSmsEngagementHistory200ResponseInner(BaseModel):
+ """
+ Provides a contact's SMS engagement history details. The properties returned depend on the type of SMS consent granted by the contact.
+ """ # noqa: E501
+ contact_id: Optional[StrictStr] = Field(default=None, description="The unique contact UUID.")
+ sms_channel_id: Optional[StrictStr] = Field(default=None, description="The unique SMS channel UUID.")
+ sms_channel_history_id: Optional[StrictStr] = Field(default=None, description="The unique SMS channel history UUID.")
+ insert_time: Optional[datetime] = Field(default=None, description="The date and time that the history record was created, in ISO-8601 format. System generated.")
+ history_details: Optional[GetSmsEngagementHistory200ResponseInnerHistoryDetails] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "sms_channel_id", "sms_channel_history_id", "insert_time", "history_details"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetSmsEngagementHistory200ResponseInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of history_details
+ if self.history_details:
+ _dict['history_details'] = self.history_details.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetSmsEngagementHistory200ResponseInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "sms_channel_id": obj.get("sms_channel_id"),
+ "sms_channel_history_id": obj.get("sms_channel_history_id"),
+ "insert_time": obj.get("insert_time"),
+ "history_details": GetSmsEngagementHistory200ResponseInnerHistoryDetails.from_dict(obj.get("history_details")) if obj.get("history_details") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_sms_engagement_history200_response_inner_history_details.py b/constant_contact_api_client/models/get_sms_engagement_history200_response_inner_history_details.py
new file mode 100644
index 0000000..67bd30b
--- /dev/null
+++ b/constant_contact_api_client/models/get_sms_engagement_history200_response_inner_history_details.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetSmsEngagementHistory200ResponseInnerHistoryDetails(BaseModel):
+ """
+ Additional details about the SMS consent actions (opt-in, opt-out) in JSON format. The consent_action_type
and the method used to add or update a contacts SMS details determines which properties are returned in the results.
+ """ # noqa: E501
+ state: Optional[StrictStr] = Field(default=None, description="The code representing the consent state, including E
for optin and O
for Optin.")
+ source: Optional[StrictStr] = Field(default=None, description="The code representing the consent source type, including A
for Account, C
for Contact, and S
' for System.")
+ consent_type: Optional[StrictStr] = Field(default=None, description="The type of SMS consent used.")
+ consent_action_time: Optional[datetime] = Field(default=None, description="The date and time that SMS engagement data was last updated, in ISO-8601 format. System generated.")
+ consent_action_type: Optional[StrictStr] = Field(default=None, description="The type of consent action provided.")
+ consent_medium_type: Optional[StrictStr] = Field(default=None, description="The code representing the medium used to provide consent. Medium types include mobile device (MD
). lead generation form(LF
), deactivation by carrier(CD
), import_file:(FI
), and system (SY
).")
+ source_consent_timestamp: Optional[StrictStr] = Field(default=None, description="The time that SMS consent was last updated.")
+ source_ip: Optional[StrictStr] = Field(default=None, description="If applicable, the IP address from which the consent came.")
+ source_sms_number: Optional[StrictStr] = Field(default=None, description="If applicable, the SMS consent number associated with the source.")
+ advertised_frequency: Optional[StrictInt] = Field(default=None, description="If applicable, the advertising numeric component used to advertise to the contact.. For example, if advertised_frequency
is set to 2
, and advertised_interval
is set to M
, the contact receives advertisements twice a month.")
+ advertised_interval: Optional[StrictStr] = Field(default=None, description="If applicable, the interval component used to advertise to the contact. For example, if advertised_frequency
is set to 2
, and advertised_interval
is set to M
, the contact receives advertisements twice a month.")
+ __properties: ClassVar[List[str]] = ["state", "source", "consent_type", "consent_action_time", "consent_action_type", "consent_medium_type", "source_consent_timestamp", "source_ip", "source_sms_number", "advertised_frequency", "advertised_interval"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetSmsEngagementHistory200ResponseInnerHistoryDetails from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetSmsEngagementHistory200ResponseInnerHistoryDetails from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "state": obj.get("state"),
+ "source": obj.get("source"),
+ "consent_type": obj.get("consent_type"),
+ "consent_action_time": obj.get("consent_action_time"),
+ "consent_action_type": obj.get("consent_action_type"),
+ "consent_medium_type": obj.get("consent_medium_type"),
+ "source_consent_timestamp": obj.get("source_consent_timestamp"),
+ "source_ip": obj.get("source_ip"),
+ "source_sms_number": obj.get("source_sms_number"),
+ "advertised_frequency": obj.get("advertised_frequency"),
+ "advertised_interval": obj.get("advertised_interval")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_tag200_response.py b/constant_contact_api_client/models/get_tag200_response.py
new file mode 100644
index 0000000..8c12d86
--- /dev/null
+++ b/constant_contact_api_client/models/get_tag200_response.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetTag200Response(BaseModel):
+ """
+ GetTag200Response
+ """ # noqa: E501
+ tag_id: Optional[StrictStr] = Field(default=None, description="The ID that uniquely identifies a tag (UUID format)")
+ name: Optional[StrictStr] = Field(default=None, description="The unique tag name.")
+ contacts_count: Optional[StrictInt] = Field(default=None, description="The total number of contacts who are assigned this tag.")
+ created_at: Optional[datetime] = Field(default=None, description="The system generated date and time when the tag was created (ISO-8601 format).")
+ updated_at: Optional[datetime] = Field(default=None, description="The system generated date and time when the tag was last updated (ISO-8601 format).")
+ tag_source: Optional[StrictStr] = Field(default=None, description="The source used to tag contacts.")
+ __properties: ClassVar[List[str]] = ["tag_id", "name", "contacts_count", "created_at", "updated_at", "tag_source"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetTag200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "contacts_count",
+ "created_at",
+ "updated_at",
+ "tag_source",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetTag200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tag_id": obj.get("tag_id"),
+ "name": obj.get("name"),
+ "contacts_count": obj.get("contacts_count"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "tag_source": obj.get("tag_source")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_unique_contact_clicks200_response.py b/constant_contact_api_client/models/get_unique_contact_clicks200_response.py
new file mode 100644
index 0000000..57d087c
--- /dev/null
+++ b/constant_contact_api_client/models/get_unique_contact_clicks200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner import GetUniqueContactClicks200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUniqueContactClicks200Response(BaseModel):
+ """
+ GetUniqueContactClicks200Response
+ """ # noqa: E501
+ tracking_activities: List[GetUniqueContactClicks200ResponseTrackingActivitiesInner] = Field(description="The list of landing page contact click tracking activities.")
+ links: GetUniqueContactClicks200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUniqueContactClicks200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUniqueContactClicks200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetUniqueContactClicks200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetUniqueContactClicks200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_unique_contact_clicks200_response_links.py b/constant_contact_api_client/models/get_unique_contact_clicks200_response_links.py
new file mode 100644
index 0000000..53b8d07
--- /dev/null
+++ b/constant_contact_api_client/models/get_unique_contact_clicks200_response_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links_next import GetUniqueContactClicks200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUniqueContactClicks200ResponseLinks(BaseModel):
+ """
+ HAL property that contains next link if applicable
+ """ # noqa: E501
+ next: GetUniqueContactClicks200ResponseLinksNext
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUniqueContactClicks200ResponseLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUniqueContactClicks200ResponseLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetUniqueContactClicks200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_unique_contact_clicks200_response_links_next.py b/constant_contact_api_client/models/get_unique_contact_clicks200_response_links_next.py
new file mode 100644
index 0000000..09f1fa2
--- /dev/null
+++ b/constant_contact_api_client/models/get_unique_contact_clicks200_response_links_next.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUniqueContactClicks200ResponseLinksNext(BaseModel):
+ """
+ Contains the next link if it is available.
+ """ # noqa: E501
+ href: StrictStr = Field(description="The next link in the page or null if there are no additional pages")
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUniqueContactClicks200ResponseLinksNext from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUniqueContactClicks200ResponseLinksNext from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_unique_contact_clicks200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_unique_contact_clicks200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..0bab95a
--- /dev/null
+++ b/constant_contact_api_client/models/get_unique_contact_clicks200_response_tracking_activities_inner.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUniqueContactClicks200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetUniqueContactClicks200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID that identifies the contact.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID that identifies of the campaign activity to use.")
+ tracking_activity_type: StrictStr = Field(description="The tracked activity event type.")
+ email_address: StrictStr = Field(description="The email address for the contact and tracking activity.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ device_type: Optional[StrictStr] = Field(default=None, description="The type of device that was used to click the link.")
+ url_id: Optional[StrictStr] = Field(default=None, description="The ID used to uniquely identify the link.")
+ link_url: StrictStr = Field(description="The URL link text.")
+ created_time: datetime = Field(description="The time the tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="The time the Contact was deleted")
+ sms_channel: Optional[GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "device_type", "url_id", "link_url", "created_time", "deleted_at", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUniqueContactClicks200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUniqueContactClicks200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "device_type": obj.get("device_type"),
+ "url_id": obj.get("url_id"),
+ "link_url": obj.get("link_url"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at"),
+ "sms_channel": GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel.py b/constant_contact_api_client/models/get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel.py
new file mode 100644
index 0000000..f8b2211
--- /dev/null
+++ b/constant_contact_api_client/models/get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel.py
@@ -0,0 +1,96 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel(BaseModel):
+ """
+ Sms channel info for this contact
+ """ # noqa: E501
+ country_code: Optional[StrictStr] = Field(default=None, description="The ISO country code that is associated with SMS address.")
+ state: Optional[StrictStr] = Field(default=None, description="The SMS channel status:
N
: not_setT
: temp_holdP
: pending_confirmationI
: implicitE
: explicitO
: unsubscribedD
:deprecatedcountry_code
does not match the contacts country_code
. ")
+ formatted_national: Optional[StrictStr] = Field(default=None, description="The formatted SMS number returned if the SMS country_code
matches the contacts country_code
. ")
+ __properties: ClassVar[List[str]] = ["country_code", "state", "formatted_international", "formatted_national"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "country_code": obj.get("country_code"),
+ "state": obj.get("state"),
+ "formatted_international": obj.get("formatted_international"),
+ "formatted_national": obj.get("formatted_national")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_unique_contact_opens200_response.py b/constant_contact_api_client/models/get_unique_contact_opens200_response.py
new file mode 100644
index 0000000..fe1814a
--- /dev/null
+++ b/constant_contact_api_client/models/get_unique_contact_opens200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+from constant_contact_api_client.models.get_unique_contact_opens200_response_tracking_activities_inner import GetUniqueContactOpens200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUniqueContactOpens200Response(BaseModel):
+ """
+ GetUniqueContactOpens200Response
+ """ # noqa: E501
+ tracking_activities: List[GetUniqueContactOpens200ResponseTrackingActivitiesInner] = Field(description="The list of landing page contact opens tracking activities.")
+ links: GetUniqueContactClicks200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUniqueContactOpens200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUniqueContactOpens200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetUniqueContactOpens200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetUniqueContactClicks200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_unique_contact_opens200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_unique_contact_opens200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..2bdef23
--- /dev/null
+++ b/constant_contact_api_client/models/get_unique_contact_opens200_response_tracking_activities_inner.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUniqueContactOpens200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetUniqueContactOpens200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID that identifies the contact.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID that identifies of the campaign activity to use.")
+ tracking_activity_type: StrictStr = Field(description="The tracked activity event type.")
+ email_address: StrictStr = Field(description="The email address for the contact and tracking activity.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ device_type: Optional[StrictStr] = Field(default=None, description="The type of device that was used to open the link.")
+ created_time: datetime = Field(description="The time the tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="The time the Contact was deleted")
+ sms_channel: Optional[GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "device_type", "created_time", "deleted_at", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUniqueContactOpens200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUniqueContactOpens200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "device_type": obj.get("device_type"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at"),
+ "sms_channel": GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_unique_contact_sms_opt_ins200_response.py b/constant_contact_api_client/models/get_unique_contact_sms_opt_ins200_response.py
new file mode 100644
index 0000000..eaaf73a
--- /dev/null
+++ b/constant_contact_api_client/models/get_unique_contact_sms_opt_ins200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+from constant_contact_api_client.models.get_unique_contact_sms_opt_ins200_response_tracking_activities_inner import GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUniqueContactSMSOptIns200Response(BaseModel):
+ """
+ GetUniqueContactSMSOptIns200Response
+ """ # noqa: E501
+ tracking_activities: List[GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner] = Field(description="The list of landing page contact opt in tracking activities.")
+ links: GetUniqueContactClicks200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUniqueContactSMSOptIns200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUniqueContactSMSOptIns200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetUniqueContactClicks200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_unique_contact_sms_opt_ins200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_unique_contact_sms_opt_ins200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..f3780b3
--- /dev/null
+++ b/constant_contact_api_client/models/get_unique_contact_sms_opt_ins200_response_tracking_activities_inner.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID that identifies the contact.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID that identifies of the campaign activity to use.")
+ tracking_activity_type: StrictStr = Field(description="The tracked activity event type.")
+ email_address: StrictStr = Field(description="The email address for the contact and tracking activity.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The time the tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="The time the Contact was deleted")
+ sms_channel: Optional[GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at"),
+ "sms_channel": GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_unique_contact_updates200_response.py b/constant_contact_api_client/models/get_unique_contact_updates200_response.py
new file mode 100644
index 0000000..26c8a5a
--- /dev/null
+++ b/constant_contact_api_client/models/get_unique_contact_updates200_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+from constant_contact_api_client.models.get_unique_contact_updates200_response_tracking_activities_inner import GetUniqueContactUpdates200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUniqueContactUpdates200Response(BaseModel):
+ """
+ GetUniqueContactUpdates200Response
+ """ # noqa: E501
+ tracking_activities: List[GetUniqueContactUpdates200ResponseTrackingActivitiesInner] = Field(description="The list of landing page contact update tracking activities.")
+ links: GetUniqueContactClicks200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUniqueContactUpdates200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUniqueContactUpdates200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetUniqueContactUpdates200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetUniqueContactClicks200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_unique_contact_updates200_response_tracking_activities_inner.py b/constant_contact_api_client/models/get_unique_contact_updates200_response_tracking_activities_inner.py
new file mode 100644
index 0000000..999f4b7
--- /dev/null
+++ b/constant_contact_api_client/models/get_unique_contact_updates200_response_tracking_activities_inner.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUniqueContactUpdates200ResponseTrackingActivitiesInner(BaseModel):
+ """
+ GetUniqueContactUpdates200ResponseTrackingActivitiesInner
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID that identifies the contact.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID that identifies of the campaign activity to use.")
+ tracking_activity_type: StrictStr = Field(description="The tracked activity event type.")
+ email_address: StrictStr = Field(description="The email address for the contact and tracking activity.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The time the tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="The time the Contact was deleted")
+ sms_channel: Optional[GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUniqueContactUpdates200ResponseTrackingActivitiesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUniqueContactUpdates200ResponseTrackingActivitiesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at"),
+ "sms_channel": GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/get_user_privileges200_response_inner.py b/constant_contact_api_client/models/get_user_privileges200_response_inner.py
new file mode 100644
index 0000000..f0bf8f4
--- /dev/null
+++ b/constant_contact_api_client/models/get_user_privileges200_response_inner.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GetUserPrivileges200ResponseInner(BaseModel):
+ """
+ GetUserPrivileges200ResponseInner
+ """ # noqa: E501
+ privilege_id: Optional[StrictInt] = Field(default=None, description="Identifies a user privilege in Constant Contact.")
+ privilege_name: Optional[StrictStr] = Field(default=None, description="The name of the Constant Contact user privilege.")
+ __properties: ClassVar[List[str]] = ["privilege_id", "privilege_name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GetUserPrivileges200ResponseInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GetUserPrivileges200ResponseInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "privilege_id": obj.get("privilege_id"),
+ "privilege_name": obj.get("privilege_name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/headers_object.py b/constant_contact_api_client/models/headers_object.py
new file mode 100644
index 0000000..f792a43
--- /dev/null
+++ b/constant_contact_api_client/models/headers_object.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class HeadersObject(BaseModel):
+ """
+ HeadersObject
+ """ # noqa: E501
+ header_key: Optional[StrictStr] = Field(default=None, description="The name of the header.")
+ header_value: Optional[StrictStr] = Field(default=None, description="The value of the header.")
+ __properties: ClassVar[List[str]] = ["header_key", "header_value"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of HeadersObject from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of HeadersObject from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "header_key": obj.get("header_key"),
+ "header_value": obj.get("header_value")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/history_details.py b/constant_contact_api_client/models/history_details.py
new file mode 100644
index 0000000..fdb9b7a
--- /dev/null
+++ b/constant_contact_api_client/models/history_details.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class HistoryDetails(BaseModel):
+ """
+ Additional details about the SMS consent actions (opt-in, opt-out) in JSON format. The consent_action_type
and the method used to add or update a contacts SMS details determines which properties are returned in the results.
+ """ # noqa: E501
+ state: Optional[StrictStr] = Field(default=None, description="The code representing the consent state, including E
for optin and O
for Optin.")
+ source: Optional[StrictStr] = Field(default=None, description="The code representing the consent source type, including A
for Account, C
for Contact, and S
' for System.")
+ consent_type: Optional[StrictStr] = Field(default=None, description="The type of SMS consent used.")
+ consent_action_time: Optional[datetime] = Field(default=None, description="The date and time that SMS engagement data was last updated, in ISO-8601 format. System generated.")
+ consent_action_type: Optional[StrictStr] = Field(default=None, description="The type of consent action provided.")
+ consent_medium_type: Optional[StrictStr] = Field(default=None, description="The code representing the medium used to provide consent. Medium types include mobile device (MD
). lead generation form(LF
), deactivation by carrier(CD
), import_file:(FI
), and system (SY
).")
+ source_consent_timestamp: Optional[StrictStr] = Field(default=None, description="The time that SMS consent was last updated.")
+ source_ip: Optional[StrictStr] = Field(default=None, description="If applicable, the IP address from which the consent came.")
+ source_sms_number: Optional[StrictStr] = Field(default=None, description="If applicable, the SMS consent number associated with the source.")
+ advertised_frequency: Optional[StrictInt] = Field(default=None, description="If applicable, the advertising numeric component used to advertise to the contact.. For example, if advertised_frequency
is set to 2
, and advertised_interval
is set to M
, the contact receives advertisements twice a month.")
+ advertised_interval: Optional[StrictStr] = Field(default=None, description="If applicable, the interval component used to advertise to the contact. For example, if advertised_frequency
is set to 2
, and advertised_interval
is set to M
, the contact receives advertisements twice a month.")
+ __properties: ClassVar[List[str]] = ["state", "source", "consent_type", "consent_action_time", "consent_action_type", "consent_medium_type", "source_consent_timestamp", "source_ip", "source_sms_number", "advertised_frequency", "advertised_interval"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of HistoryDetails from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of HistoryDetails from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "state": obj.get("state"),
+ "source": obj.get("source"),
+ "consent_type": obj.get("consent_type"),
+ "consent_action_time": obj.get("consent_action_time"),
+ "consent_action_type": obj.get("consent_action_type"),
+ "consent_medium_type": obj.get("consent_medium_type"),
+ "source_consent_timestamp": obj.get("source_consent_timestamp"),
+ "source_ip": obj.get("source_ip"),
+ "source_sms_number": obj.get("source_sms_number"),
+ "advertised_frequency": obj.get("advertised_frequency"),
+ "advertised_interval": obj.get("advertised_interval")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/json_import_contact.py b/constant_contact_api_client/models/json_import_contact.py
new file mode 100644
index 0000000..feee0da
--- /dev/null
+++ b/constant_contact_api_client/models/json_import_contact.py
@@ -0,0 +1,169 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class JsonImportContact(BaseModel):
+ """
+ JsonImportContact
+ """ # noqa: E501
+ email: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The email address of the contact. This method identifies each unique contact using their email address.")
+ first_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The last name of the contact.")
+ job_title: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The job title of the contact.")
+ company_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the company where the contact works.")
+ birthday_month: Optional[StrictInt] = Field(default=None, description="The month value for the contact's birthday. Valid values are from 1 through 12. The birthday_month
property is required if you use birthday_day
.")
+ birthday_day: Optional[StrictInt] = Field(default=None, description="The day value for the contact's birthday. Valid values are from 1 through 31. The birthday_day
property is required if you use birthday_month
.")
+ anniversary: Optional[StrictStr] = Field(default=None, description="The anniversary date for the contact. For example, this value could be the date when the contact first became a customer of an organization in Constant Contact. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY.")
+ phone: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The primary phone number for the contact. Use this field to add the default kind of phone number to the imported contact's phone number. Default kind
is other
.")
+ home_phone: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The home phone number for the contact.")
+ work_phone: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The work phone number for the contact.")
+ mobile_phone: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The mobile phone number for the contact.")
+ other_phone: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="A phone number for the contact.")
+ street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line one of the primary street address for the contact. Use this field to add the default kind of street to the imported contact's street address. The default kind
is home
. which maps to the street_addresses
array` in the response.")
+ street2: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line two of the primary street address for the contact. This value is automatically appended to the street
value. Use this field to add the default kind for line two of the street address to the imported contact's address. The default kind
is other
.")
+ city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the primary city for the contact. Use this field to add the default kind of city to the imported contact's home address. The default kind
is home
.")
+ state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the primary state or province for the contact. Use this field to add the default kind of state to the imported contact's home address. The default kind
is home
.")
+ zip: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code associated with the contact's primary address. Use this field to add the default kind of zip to the imported contact's street address. The default kind
is home
.")
+ country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the primary country where the contact is located. Use this field to add the default kind of country to the imported contact's street address. The default kind
is home
.")
+ home_street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line one of the home street address for the contact.")
+ home_street2: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line two of the home street address for the contact. This value is automatically appended to the home_street
value.")
+ home_city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the city where the contact lives.")
+ home_state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the home state or province where the contact lives.")
+ home_zip: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code associated with the contact's home address.")
+ home_country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the country where the contact lives.", alias="home country")
+ work_street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line one of the work street address for the contact.")
+ work_street2: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line two of the work street address for the contact. This value is automatically appended to the work_street
value.")
+ work_city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the city where the contact works.")
+ work_state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the state or province where the contact works.")
+ work_zip: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code associated with the contact's work address.")
+ work_country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the country where the contact works.")
+ other_street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line one of the other street address for the contact.")
+ other_street2: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Line two of the other street address for the contact. This value is automatically appended to the other_street
value.")
+ other_city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of another city where the contact is located.")
+ other_state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of another state or province where the contact is located.")
+ other_zip: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code associated with the contact's other address.")
+ other_country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of another country where the contact is located.")
+ cfcustom_field_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The name of this property is dynamic based on the custom fields you want to import. Use a key-value pair where the key is an existing custom field name prefixed with cf:
, and the value is a custom field string value. For example, if you have a custom field named first_name
you can use \"cf:first_name\":\"Joe\"
. Each contact can contain up to 25 different custom fields.", alias="cf:custom_field_name")
+ sms_number: Optional[Annotated[str, Field(strict=True, max_length=16)]] = Field(default=None, description="The US phone number to associate with the contact's SMS-enabled phone. The country code must be valid. Valid formats are 1231231234
or 123-123-1234
.")
+ sms_consent_date: Optional[Annotated[str, Field(strict=True, max_length=16)]] = Field(default=None, description="Required if the SMS permission is set to `explict`. The date that the contact consented to receiving SMS messages. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY .")
+ __properties: ClassVar[List[str]] = ["email", "first_name", "last_name", "job_title", "company_name", "birthday_month", "birthday_day", "anniversary", "phone", "home_phone", "work_phone", "mobile_phone", "other_phone", "street", "street2", "city", "state", "zip", "country", "home_street", "home_street2", "home_city", "home_state", "home_zip", "home country", "work_street", "work_street2", "work_city", "work_state", "work_zip", "work_country", "other_street", "other_street2", "other_city", "other_state", "other_zip", "other_country", "cf:custom_field_name", "sms_number", "sms_consent_date"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of JsonImportContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of JsonImportContact from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email": obj.get("email"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "job_title": obj.get("job_title"),
+ "company_name": obj.get("company_name"),
+ "birthday_month": obj.get("birthday_month"),
+ "birthday_day": obj.get("birthday_day"),
+ "anniversary": obj.get("anniversary"),
+ "phone": obj.get("phone"),
+ "home_phone": obj.get("home_phone"),
+ "work_phone": obj.get("work_phone"),
+ "mobile_phone": obj.get("mobile_phone"),
+ "other_phone": obj.get("other_phone"),
+ "street": obj.get("street"),
+ "street2": obj.get("street2"),
+ "city": obj.get("city"),
+ "state": obj.get("state"),
+ "zip": obj.get("zip"),
+ "country": obj.get("country"),
+ "home_street": obj.get("home_street"),
+ "home_street2": obj.get("home_street2"),
+ "home_city": obj.get("home_city"),
+ "home_state": obj.get("home_state"),
+ "home_zip": obj.get("home_zip"),
+ "home country": obj.get("home country"),
+ "work_street": obj.get("work_street"),
+ "work_street2": obj.get("work_street2"),
+ "work_city": obj.get("work_city"),
+ "work_state": obj.get("work_state"),
+ "work_zip": obj.get("work_zip"),
+ "work_country": obj.get("work_country"),
+ "other_street": obj.get("other_street"),
+ "other_street2": obj.get("other_street2"),
+ "other_city": obj.get("other_city"),
+ "other_state": obj.get("other_state"),
+ "other_zip": obj.get("other_zip"),
+ "other_country": obj.get("other_country"),
+ "cf:custom_field_name": obj.get("cf:custom_field_name"),
+ "sms_number": obj.get("sms_number"),
+ "sms_consent_date": obj.get("sms_consent_date")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/link.py b/constant_contact_api_client/models/link.py
new file mode 100644
index 0000000..be257d0
--- /dev/null
+++ b/constant_contact_api_client/models/link.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Link(BaseModel):
+ """
+ Link
+ """ # noqa: E501
+ href: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Link from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Link from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/links.py b/constant_contact_api_client/models/links.py
new file mode 100644
index 0000000..520e053
--- /dev/null
+++ b/constant_contact_api_client/models/links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_all_segments200_response_links_next import GetAllSegments200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Links(BaseModel):
+ """
+ Links
+ """ # noqa: E501
+ next: GetAllSegments200ResponseLinksNext
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Links from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Links from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetAllSegments200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/list_activity_add_contacts.py b/constant_contact_api_client/models/list_activity_add_contacts.py
new file mode 100644
index 0000000..68e9a92
--- /dev/null
+++ b/constant_contact_api_client/models/list_activity_add_contacts.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_list_add_activity_request_exclude import CreateListAddActivityRequestExclude
+from constant_contact_api_client.models.create_list_add_activity_request_source import CreateListAddActivityRequestSource
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ListActivityAddContacts(BaseModel):
+ """
+ ListActivityAddContacts
+ """ # noqa: E501
+ source: CreateListAddActivityRequestSource
+ exclude: Optional[CreateListAddActivityRequestExclude] = None
+ list_ids: Annotated[List[StrictStr], Field(max_length=50)] = Field(description="Specifies which lists (up to 50) you are adding your source contacts to.")
+ __properties: ClassVar[List[str]] = ["source", "exclude", "list_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ListActivityAddContacts from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of source
+ if self.source:
+ _dict['source'] = self.source.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of exclude
+ if self.exclude:
+ _dict['exclude'] = self.exclude.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ListActivityAddContacts from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "source": CreateListAddActivityRequestSource.from_dict(obj.get("source")) if obj.get("source") is not None else None,
+ "exclude": CreateListAddActivityRequestExclude.from_dict(obj.get("exclude")) if obj.get("exclude") is not None else None,
+ "list_ids": obj.get("list_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/list_activity_remove_contacts.py b/constant_contact_api_client/models/list_activity_remove_contacts.py
new file mode 100644
index 0000000..d8345c4
--- /dev/null
+++ b/constant_contact_api_client/models/list_activity_remove_contacts.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_list_remove_activity_request_exclude import CreateListRemoveActivityRequestExclude
+from constant_contact_api_client.models.create_list_remove_activity_request_source import CreateListRemoveActivityRequestSource
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ListActivityRemoveContacts(BaseModel):
+ """
+ ListActivityRemoveContacts
+ """ # noqa: E501
+ source: CreateListRemoveActivityRequestSource
+ exclude: Optional[CreateListRemoveActivityRequestExclude] = None
+ list_ids: Annotated[List[StrictStr], Field(max_length=0)] = Field(description="Specify up to 50 target list_id
s from which to remove contacts.")
+ __properties: ClassVar[List[str]] = ["source", "exclude", "list_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ListActivityRemoveContacts from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of source
+ if self.source:
+ _dict['source'] = self.source.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of exclude
+ if self.exclude:
+ _dict['exclude'] = self.exclude.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ListActivityRemoveContacts from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "source": CreateListRemoveActivityRequestSource.from_dict(obj.get("source")) if obj.get("source") is not None else None,
+ "exclude": CreateListRemoveActivityRequestExclude.from_dict(obj.get("exclude")) if obj.get("exclude") is not None else None,
+ "list_ids": obj.get("list_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/list_id_list100.py b/constant_contact_api_client/models/list_id_list100.py
new file mode 100644
index 0000000..00892d6
--- /dev/null
+++ b/constant_contact_api_client/models/list_id_list100.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ListIdList100(BaseModel):
+ """
+ ListIdList100
+ """ # noqa: E501
+ list_ids: Annotated[List[StrictStr], Field(max_length=100)] = Field(description="The array of contact lists list_id
to delete.")
+ __properties: ClassVar[List[str]] = ["list_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ListIdList100 from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ListIdList100 from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "list_ids": obj.get("list_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/list_input.py b/constant_contact_api_client/models/list_input.py
new file mode 100644
index 0000000..afd42b1
--- /dev/null
+++ b/constant_contact_api_client/models/list_input.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ListInput(BaseModel):
+ """
+ ListInput
+ """ # noqa: E501
+ name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The name given to the contact list")
+ favorite: Optional[StrictBool] = Field(default=False, description="Identifies whether or not the account has favorited the contact list.")
+ description: Optional[StrictStr] = Field(default=None, description="Text describing the list.")
+ __properties: ClassVar[List[str]] = ["name", "favorite", "description"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ListInput from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ListInput from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "favorite": obj.get("favorite") if obj.get("favorite") is not None else False,
+ "description": obj.get("description")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/list_xref.py b/constant_contact_api_client/models/list_xref.py
new file mode 100644
index 0000000..528067e
--- /dev/null
+++ b/constant_contact_api_client/models/list_xref.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ListXref(BaseModel):
+ """
+ The cross-referenced pair of V3 API list_id
and V2 API sequence_id
for a list. Response is sorted ascending by sequence_id
.
+ """ # noqa: E501
+ sequence_id: Optional[StrictStr] = Field(default=None, description="The V2 API list unique identifier")
+ list_id: Optional[StrictStr] = Field(default=None, description="The V3 API list unique identifier")
+ __properties: ClassVar[List[str]] = ["sequence_id", "list_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ListXref from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ListXref from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "sequence_id": obj.get("sequence_id"),
+ "list_id": obj.get("list_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/list_xrefs.py b/constant_contact_api_client/models/list_xrefs.py
new file mode 100644
index 0000000..93f3a40
--- /dev/null
+++ b/constant_contact_api_client/models/list_xrefs.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_list_id_xrefs200_response_xrefs_inner import GetListIdXrefs200ResponseXrefsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ListXrefs(BaseModel):
+ """
+ ListXrefs
+ """ # noqa: E501
+ xrefs: Optional[Annotated[List[GetListIdXrefs200ResponseXrefsInner], Field(max_length=500)]] = Field(default=None, description="An array of cross-referenced V3 API list_id
and V2 API sequence_id
properties. Response is sorted ascending by sequence_id
.")
+ __properties: ClassVar[List[str]] = ["xrefs"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ListXrefs from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in xrefs (list)
+ _items = []
+ if self.xrefs:
+ for _item in self.xrefs:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['xrefs'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ListXrefs from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "xrefs": [GetListIdXrefs200ResponseXrefsInner.from_dict(_item) for _item in obj.get("xrefs")] if obj.get("xrefs") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/lpreporting_links.py b/constant_contact_api_client/models/lpreporting_links.py
new file mode 100644
index 0000000..50cb333
--- /dev/null
+++ b/constant_contact_api_client/models/lpreporting_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links_next import GetUniqueContactClicks200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class LpreportingLinks(BaseModel):
+ """
+ LpreportingLinks
+ """ # noqa: E501
+ next: GetUniqueContactClicks200ResponseLinksNext
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of LpreportingLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of LpreportingLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetUniqueContactClicks200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/lpreporting_next.py b/constant_contact_api_client/models/lpreporting_next.py
new file mode 100644
index 0000000..1368dbb
--- /dev/null
+++ b/constant_contact_api_client/models/lpreporting_next.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class LpreportingNext(BaseModel):
+ """
+ LpreportingNext
+ """ # noqa: E501
+ href: StrictStr = Field(description="The next link in the page or null if there are no additional pages")
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of LpreportingNext from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of LpreportingNext from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/my_library_file_collection_inner.py b/constant_contact_api_client/models/my_library_file_collection_inner.py
new file mode 100644
index 0000000..8f362ab
--- /dev/null
+++ b/constant_contact_api_client/models/my_library_file_collection_inner.py
@@ -0,0 +1,128 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.my_library_file_collection_inner_thumbnail import MyLibraryFileCollectionInnerThumbnail
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class MyLibraryFileCollectionInner(BaseModel):
+ """
+ MyLibraryFileCollectionInner
+ """ # noqa: E501
+ id: Optional[StrictInt] = Field(default=None, description="Identifies the MyLibrary file.")
+ name: Optional[StrictStr] = Field(default=None, description="The file name.")
+ height: Optional[StrictInt] = Field(default=None, description="The image height.")
+ width: Optional[StrictInt] = Field(default=None, description="The image width.")
+ size: Optional[StrictInt] = Field(default=None, description="The image size.")
+ url: Optional[StrictStr] = Field(default=None, description="The image URL.")
+ description: Optional[StrictStr] = Field(default=None, description="The image description.")
+ folder: Optional[StrictStr] = Field(default=None, description="The image folder")
+ source: Optional[StrictStr] = Field(default=None, description="The application that uploaded this image.")
+ type: Optional[StrictStr] = Field(default=None, description="The image format.")
+ status: Optional[StrictStr] = Field(default=None, description="The image status.")
+ thumbnail: Optional[MyLibraryFileCollectionInnerThumbnail] = None
+ image: Optional[StrictBool] = Field(default=None, description="Boolean indicating if this file is an image.")
+ folder_id: Optional[StrictInt] = Field(default=None, description="Identifies a folder in MyLibrary.")
+ external_url: Optional[StrictStr] = Field(default=None, description="The external url for the file.")
+ modified_date: Optional[StrictStr] = Field(default=None, description="Identifies the time a user last modified the file.")
+ added_date: Optional[StrictStr] = Field(default=None, description="Identifies the time a user originally added the file to MyLibrary.")
+ external_file_id: Optional[StrictStr] = Field(default=None, description="External identifier for the file.")
+ __properties: ClassVar[List[str]] = ["id", "name", "height", "width", "size", "url", "description", "folder", "source", "type", "status", "thumbnail", "image", "folder_id", "external_url", "modified_date", "added_date", "external_file_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of MyLibraryFileCollectionInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of thumbnail
+ if self.thumbnail:
+ _dict['thumbnail'] = self.thumbnail.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of MyLibraryFileCollectionInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "height": obj.get("height"),
+ "width": obj.get("width"),
+ "size": obj.get("size"),
+ "url": obj.get("url"),
+ "description": obj.get("description"),
+ "folder": obj.get("folder"),
+ "source": obj.get("source"),
+ "type": obj.get("type"),
+ "status": obj.get("status"),
+ "thumbnail": MyLibraryFileCollectionInnerThumbnail.from_dict(obj.get("thumbnail")) if obj.get("thumbnail") is not None else None,
+ "image": obj.get("image"),
+ "folder_id": obj.get("folder_id"),
+ "external_url": obj.get("external_url"),
+ "modified_date": obj.get("modified_date"),
+ "added_date": obj.get("added_date"),
+ "external_file_id": obj.get("external_file_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/my_library_file_collection_inner_thumbnail.py b/constant_contact_api_client/models/my_library_file_collection_inner_thumbnail.py
new file mode 100644
index 0000000..f84c23e
--- /dev/null
+++ b/constant_contact_api_client/models/my_library_file_collection_inner_thumbnail.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class MyLibraryFileCollectionInnerThumbnail(BaseModel):
+ """
+ MyLibraryFileCollectionInnerThumbnail
+ """ # noqa: E501
+ width: Optional[StrictInt] = Field(default=None, description="Thumbnail width.")
+ height: Optional[StrictInt] = Field(default=None, description="Thumbnail height.")
+ url: Optional[StrictStr] = Field(default=None, description="Thumbnail url.")
+ __properties: ClassVar[List[str]] = ["width", "height", "url"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of MyLibraryFileCollectionInnerThumbnail from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of MyLibraryFileCollectionInnerThumbnail from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "width": obj.get("width"),
+ "height": obj.get("height"),
+ "url": obj.get("url")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/next.py b/constant_contact_api_client/models/next.py
new file mode 100644
index 0000000..39792db
--- /dev/null
+++ b/constant_contact_api_client/models/next.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Next(BaseModel):
+ """
+ Next
+ """ # noqa: E501
+ href: StrictStr = Field(description="The next link in the page, or null if there are no additional pages.")
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Next from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Next from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/note.py b/constant_contact_api_client/models/note.py
new file mode 100644
index 0000000..a7fc7f9
--- /dev/null
+++ b/constant_contact_api_client/models/note.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Note(BaseModel):
+ """
+ A note about the contact.
+ """ # noqa: E501
+ note_id: Optional[StrictStr] = Field(default=None, description="The ID that uniquely identifies the note (UUID format).")
+ created_at: Optional[datetime] = Field(default=None, description="The date that the note was created.")
+ content: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = Field(default=None, description="The content for the note.")
+ __properties: ClassVar[List[str]] = ["note_id", "created_at", "content"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Note from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Note from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "note_id": obj.get("note_id"),
+ "created_at": obj.get("created_at"),
+ "content": obj.get("content")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/o_auth_error.py b/constant_contact_api_client/models/o_auth_error.py
new file mode 100644
index 0000000..f1b6dba
--- /dev/null
+++ b/constant_contact_api_client/models/o_auth_error.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class OAuthError(BaseModel):
+ """
+ OAuthError
+ """ # noqa: E501
+ error: Optional[StrictStr] = None
+ error_description: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["error", "error_description"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of OAuthError from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of OAuthError from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "error": obj.get("error"),
+ "error_description": obj.get("error_description")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/opens_tracking_activities_page.py b/constant_contact_api_client/models/opens_tracking_activities_page.py
new file mode 100644
index 0000000..261e87d
--- /dev/null
+++ b/constant_contact_api_client/models/opens_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_opens_report200_response_tracking_activities_inner import GetEmailOpensReport200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_email_sends_report200_response_links import GetEmailSendsReport200ResponseLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class OpensTrackingActivitiesPage(BaseModel):
+ """
+ OpensTrackingActivitiesPage
+ """ # noqa: E501
+ tracking_activities: List[GetEmailOpensReport200ResponseTrackingActivitiesInner] = Field(description="Lists contacts that opened the specified campaign_activity_id
.")
+ links: Optional[GetEmailSendsReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of OpensTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of OpensTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetEmailOpensReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetEmailSendsReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/opens_tracking_activity.py b/constant_contact_api_client/models/opens_tracking_activity.py
new file mode 100644
index 0000000..9a9ad81
--- /dev/null
+++ b/constant_contact_api_client/models/opens_tracking_activity.py
@@ -0,0 +1,106 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class OpensTrackingActivity(BaseModel):
+ """
+ OpensTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies an email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of tracking activity that is associated with this campaign_activity_id
and used for reporting purposes.")
+ email_address: StrictStr = Field(description="The email address used to send the email campaign activity to a contact.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ device_type: Optional[StrictStr] = Field(default=None, description="The type of device that the contact used to open the email campaign activity.")
+ created_time: datetime = Field(description="The date and time that the contact opened the email campaign activity.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "device_type", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of OpensTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of OpensTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "device_type": obj.get("device_type"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/optouts_tracking_activities_page.py b/constant_contact_api_client/models/optouts_tracking_activities_page.py
new file mode 100644
index 0000000..36982c2
--- /dev/null
+++ b/constant_contact_api_client/models/optouts_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_sends_report200_response_links import GetEmailSendsReport200ResponseLinks
+from constant_contact_api_client.models.get_optouts_report200_response_tracking_activities_inner import GetOptoutsReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class OptoutsTrackingActivitiesPage(BaseModel):
+ """
+ OptoutsTrackingActivitiesPage
+ """ # noqa: E501
+ tracking_activities: List[GetOptoutsReport200ResponseTrackingActivitiesInner] = Field(description="The list of opt-out tracking activities")
+ links: GetEmailSendsReport200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of OptoutsTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of OptoutsTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetOptoutsReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetEmailSendsReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/optouts_tracking_activity.py b/constant_contact_api_client/models/optouts_tracking_activity.py
new file mode 100644
index 0000000..cf6bb46
--- /dev/null
+++ b/constant_contact_api_client/models/optouts_tracking_activity.py
@@ -0,0 +1,106 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class OptoutsTrackingActivity(BaseModel):
+ """
+ OptoutsTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies the email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of report tracking activity that is associated with the specified campaign_activity_id
.")
+ email_address: StrictStr = Field(description="The contact's email address.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ opt_out_reason: Optional[StrictStr] = Field(default=None, description="The opt-out reason, if the contact entered a reason.")
+ created_time: datetime = Field(description="The time that the contact chose to opt-out from receiving future email campaign activities.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "opt_out_reason", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of OptoutsTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of OptoutsTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "opt_out_reason": obj.get("opt_out_reason"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/p_contact_add_tracking_activities_page.py b/constant_contact_api_client/models/p_contact_add_tracking_activities_page.py
new file mode 100644
index 0000000..0a795ed
--- /dev/null
+++ b/constant_contact_api_client/models/p_contact_add_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_contact_adds200_response_tracking_activities_inner import GetContactAdds200ResponseTrackingActivitiesInner
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PContactAddTrackingActivitiesPage(BaseModel):
+ """
+ PContactAddTrackingActivitiesPage
+ """ # noqa: E501
+ tracking_activities: List[GetContactAdds200ResponseTrackingActivitiesInner] = Field(description="The list of landing page contact adds tracking activities.")
+ links: GetUniqueContactClicks200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PContactAddTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PContactAddTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetContactAdds200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetUniqueContactClicks200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/p_contact_add_tracking_activity.py b/constant_contact_api_client/models/p_contact_add_tracking_activity.py
new file mode 100644
index 0000000..9e37ff5
--- /dev/null
+++ b/constant_contact_api_client/models/p_contact_add_tracking_activity.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PContactAddTrackingActivity(BaseModel):
+ """
+ PContactAddTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID that identifies the contact.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID that identifies of the campaign activity to use.")
+ tracking_activity_type: StrictStr = Field(description="The tracked activity event type.")
+ email_address: StrictStr = Field(description="The email address for the contact and tracking activity.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The time the tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="The time the Contact was deleted")
+ sms_channel: Optional[GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PContactAddTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PContactAddTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at"),
+ "sms_channel": GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/p_contact_click_tracking_activities_page.py b/constant_contact_api_client/models/p_contact_click_tracking_activities_page.py
new file mode 100644
index 0000000..0b91bb7
--- /dev/null
+++ b/constant_contact_api_client/models/p_contact_click_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner import GetUniqueContactClicks200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PContactClickTrackingActivitiesPage(BaseModel):
+ """
+ PContactClickTrackingActivitiesPage
+ """ # noqa: E501
+ tracking_activities: List[GetUniqueContactClicks200ResponseTrackingActivitiesInner] = Field(description="The list of landing page contact click tracking activities.")
+ links: GetUniqueContactClicks200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PContactClickTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PContactClickTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetUniqueContactClicks200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetUniqueContactClicks200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/p_contact_click_tracking_activity.py b/constant_contact_api_client/models/p_contact_click_tracking_activity.py
new file mode 100644
index 0000000..43cfe28
--- /dev/null
+++ b/constant_contact_api_client/models/p_contact_click_tracking_activity.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PContactClickTrackingActivity(BaseModel):
+ """
+ PContactClickTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID that identifies the contact.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID that identifies of the campaign activity to use.")
+ tracking_activity_type: StrictStr = Field(description="The tracked activity event type.")
+ email_address: StrictStr = Field(description="The email address for the contact and tracking activity.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ device_type: Optional[StrictStr] = Field(default=None, description="The type of device that was used to click the link.")
+ url_id: Optional[StrictStr] = Field(default=None, description="The ID used to uniquely identify the link.")
+ link_url: StrictStr = Field(description="The URL link text.")
+ created_time: datetime = Field(description="The time the tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="The time the Contact was deleted")
+ sms_channel: Optional[GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "device_type", "url_id", "link_url", "created_time", "deleted_at", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PContactClickTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PContactClickTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "device_type": obj.get("device_type"),
+ "url_id": obj.get("url_id"),
+ "link_url": obj.get("link_url"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at"),
+ "sms_channel": GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/p_contact_open_tracking_activity.py b/constant_contact_api_client/models/p_contact_open_tracking_activity.py
new file mode 100644
index 0000000..fbec738
--- /dev/null
+++ b/constant_contact_api_client/models/p_contact_open_tracking_activity.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PContactOpenTrackingActivity(BaseModel):
+ """
+ PContactOpenTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID that identifies the contact.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID that identifies of the campaign activity to use.")
+ tracking_activity_type: StrictStr = Field(description="The tracked activity event type.")
+ email_address: StrictStr = Field(description="The email address for the contact and tracking activity.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ device_type: Optional[StrictStr] = Field(default=None, description="The type of device that was used to open the link.")
+ created_time: datetime = Field(description="The time the tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="The time the Contact was deleted")
+ sms_channel: Optional[GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "device_type", "created_time", "deleted_at", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PContactOpenTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PContactOpenTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "device_type": obj.get("device_type"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at"),
+ "sms_channel": GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/p_contact_opens_tracking_activities_page.py b/constant_contact_api_client/models/p_contact_opens_tracking_activities_page.py
new file mode 100644
index 0000000..1ec86c1
--- /dev/null
+++ b/constant_contact_api_client/models/p_contact_opens_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+from constant_contact_api_client.models.get_unique_contact_opens200_response_tracking_activities_inner import GetUniqueContactOpens200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PContactOpensTrackingActivitiesPage(BaseModel):
+ """
+ PContactOpensTrackingActivitiesPage
+ """ # noqa: E501
+ tracking_activities: List[GetUniqueContactOpens200ResponseTrackingActivitiesInner] = Field(description="The list of landing page contact opens tracking activities.")
+ links: GetUniqueContactClicks200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PContactOpensTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PContactOpensTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetUniqueContactOpens200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetUniqueContactClicks200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/p_contact_sms_opt_in_tracking_activities_page.py b/constant_contact_api_client/models/p_contact_sms_opt_in_tracking_activities_page.py
new file mode 100644
index 0000000..4ab0273
--- /dev/null
+++ b/constant_contact_api_client/models/p_contact_sms_opt_in_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+from constant_contact_api_client.models.get_unique_contact_sms_opt_ins200_response_tracking_activities_inner import GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PContactSMSOptInTrackingActivitiesPage(BaseModel):
+ """
+ PContactSMSOptInTrackingActivitiesPage
+ """ # noqa: E501
+ tracking_activities: List[GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner] = Field(description="The list of landing page contact opt in tracking activities.")
+ links: GetUniqueContactClicks200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PContactSMSOptInTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PContactSMSOptInTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetUniqueContactSMSOptIns200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetUniqueContactClicks200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/p_contact_sms_opt_in_tracking_activity.py b/constant_contact_api_client/models/p_contact_sms_opt_in_tracking_activity.py
new file mode 100644
index 0000000..6013dfe
--- /dev/null
+++ b/constant_contact_api_client/models/p_contact_sms_opt_in_tracking_activity.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PContactSMSOptInTrackingActivity(BaseModel):
+ """
+ PContactSMSOptInTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID that identifies the contact.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID that identifies of the campaign activity to use.")
+ tracking_activity_type: StrictStr = Field(description="The tracked activity event type.")
+ email_address: StrictStr = Field(description="The email address for the contact and tracking activity.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The time the tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="The time the Contact was deleted")
+ sms_channel: Optional[GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PContactSMSOptInTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PContactSMSOptInTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at"),
+ "sms_channel": GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/p_contact_update_tracking_activities_page.py b/constant_contact_api_client/models/p_contact_update_tracking_activities_page.py
new file mode 100644
index 0000000..b63138d
--- /dev/null
+++ b/constant_contact_api_client/models/p_contact_update_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_links import GetUniqueContactClicks200ResponseLinks
+from constant_contact_api_client.models.get_unique_contact_updates200_response_tracking_activities_inner import GetUniqueContactUpdates200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PContactUpdateTrackingActivitiesPage(BaseModel):
+ """
+ PContactUpdateTrackingActivitiesPage
+ """ # noqa: E501
+ tracking_activities: List[GetUniqueContactUpdates200ResponseTrackingActivitiesInner] = Field(description="The list of landing page contact update tracking activities.")
+ links: GetUniqueContactClicks200ResponseLinks = Field(alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PContactUpdateTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PContactUpdateTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetUniqueContactUpdates200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetUniqueContactClicks200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/p_contact_update_tracking_activity.py b/constant_contact_api_client/models/p_contact_update_tracking_activity.py
new file mode 100644
index 0000000..79ff666
--- /dev/null
+++ b/constant_contact_api_client/models/p_contact_update_tracking_activity.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel import GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PContactUpdateTrackingActivity(BaseModel):
+ """
+ PContactUpdateTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The unique ID that identifies the contact.")
+ campaign_activity_id: StrictStr = Field(description="The unique ID that identifies of the campaign activity to use.")
+ tracking_activity_type: StrictStr = Field(description="The tracked activity event type.")
+ email_address: StrictStr = Field(description="The email address for the contact and tracking activity.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The time the tracking activity occurred.")
+ deleted_at: Optional[date] = Field(default=None, description="The time the Contact was deleted")
+ sms_channel: Optional[GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel] = None
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at", "sms_channel"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PContactUpdateTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of sms_channel
+ if self.sms_channel:
+ _dict['sms_channel'] = self.sms_channel.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PContactUpdateTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at"),
+ "sms_channel": GetUniqueContactClicks200ResponseTrackingActivitiesInnerSmsChannel.from_dict(obj.get("sms_channel")) if obj.get("sms_channel") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/paged_email_campaign_response.py b/constant_contact_api_client/models/paged_email_campaign_response.py
new file mode 100644
index 0000000..1151d5d
--- /dev/null
+++ b/constant_contact_api_client/models/paged_email_campaign_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_all_email_campaigns200_response_campaigns_inner import GetAllEmailCampaigns200ResponseCampaignsInner
+from constant_contact_api_client.models.get_all_email_campaigns200_response_links import GetAllEmailCampaigns200ResponseLinks
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagedEmailCampaignResponse(BaseModel):
+ """
+ PagedEmailCampaignResponse
+ """ # noqa: E501
+ links: Optional[GetAllEmailCampaigns200ResponseLinks] = Field(default=None, alias="_links")
+ campaigns: Optional[List[GetAllEmailCampaigns200ResponseCampaignsInner]] = None
+ __properties: ClassVar[List[str]] = ["_links", "campaigns"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagedEmailCampaignResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in campaigns (list)
+ _items = []
+ if self.campaigns:
+ for _item in self.campaigns:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['campaigns'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagedEmailCampaignResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "_links": GetAllEmailCampaigns200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None,
+ "campaigns": [GetAllEmailCampaigns200ResponseCampaignsInner.from_dict(_item) for _item in obj.get("campaigns")] if obj.get("campaigns") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/pagination_links.py b/constant_contact_api_client/models/pagination_links.py
new file mode 100644
index 0000000..6b3691a
--- /dev/null
+++ b/constant_contact_api_client/models/pagination_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from constant_contact_api_client.models.pagination_links_next import PaginationLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PaginationLinks(BaseModel):
+ """
+ PaginationLinks
+ """ # noqa: E501
+ next: Optional[PaginationLinksNext] = None
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PaginationLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PaginationLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": PaginationLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/pagination_links_next.py b/constant_contact_api_client/models/pagination_links_next.py
new file mode 100644
index 0000000..2a43986
--- /dev/null
+++ b/constant_contact_api_client/models/pagination_links_next.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PaginationLinksNext(BaseModel):
+ """
+ Contains the next page link, if applicable.
+ """ # noqa: E501
+ href: Optional[StrictStr] = None
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PaginationLinksNext from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PaginationLinksNext from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/paging_links.py b/constant_contact_api_client/models/paging_links.py
new file mode 100644
index 0000000..4f5ec00
--- /dev/null
+++ b/constant_contact_api_client/models/paging_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_all_activities200_response_links_next import GetAllActivities200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagingLinks(BaseModel):
+ """
+ PagingLinks
+ """ # noqa: E501
+ next: Optional[GetAllActivities200ResponseLinksNext] = None
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagingLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagingLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetAllActivities200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/partner_account.py b/constant_contact_api_client/models/partner_account.py
new file mode 100644
index 0000000..ce99227
--- /dev/null
+++ b/constant_contact_api_client/models/partner_account.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.partner_account_links import PartnerAccountLinks
+from constant_contact_api_client.models.partner_account_site_owner_list_inner import PartnerAccountSiteOwnerListInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PartnerAccount(BaseModel):
+ """
+ PartnerAccount
+ """ # noqa: E501
+ site_owner_list: List[PartnerAccountSiteOwnerListInner] = Field(description="Lists all Constant Contact client accounts that are managed under a partner account.")
+ links: Optional[PartnerAccountLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["site_owner_list", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PartnerAccount from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in site_owner_list (list)
+ _items = []
+ if self.site_owner_list:
+ for _item in self.site_owner_list:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['site_owner_list'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PartnerAccount from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "site_owner_list": [PartnerAccountSiteOwnerListInner.from_dict(_item) for _item in obj.get("site_owner_list")] if obj.get("site_owner_list") is not None else None,
+ "_links": PartnerAccountLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/partner_account_links.py b/constant_contact_api_client/models/partner_account_links.py
new file mode 100644
index 0000000..61dd422
--- /dev/null
+++ b/constant_contact_api_client/models/partner_account_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from constant_contact_api_client.models.pagination_links_next import PaginationLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PartnerAccountLinks(BaseModel):
+ """
+ HAL property that contains the next link, if applicable.
+ """ # noqa: E501
+ next: Optional[PaginationLinksNext] = None
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PartnerAccountLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PartnerAccountLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": PaginationLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/partner_account_operations_request.py b/constant_contact_api_client/models/partner_account_operations_request.py
new file mode 100644
index 0000000..4e3a135
--- /dev/null
+++ b/constant_contact_api_client/models/partner_account_operations_request.py
@@ -0,0 +1,124 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.partner_account_operations_request_account_operation_headers_inner import PartnerAccountOperationsRequestAccountOperationHeadersInner
+from constant_contact_api_client.models.partner_account_operations_request_account_operation_path_parameters_inner import PartnerAccountOperationsRequestAccountOperationPathParametersInner
+from constant_contact_api_client.models.partner_account_operations_request_account_operation_query_parameters_inner import PartnerAccountOperationsRequestAccountOperationQueryParametersInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PartnerAccountOperationsRequest(BaseModel):
+ """
+ JSON object that contains the fields Constant Contact uses to construct the HTTP request you are sending on behalf of a managed account.
+ """ # noqa: E501
+ account_operation_url: StrictStr = Field(description="The API method path for the request you are sending on behalf of a managed child account. This value should be a V3 API URL without the https://api.cc.email/v3 base url and with any path parameter names included. For example: /emails/activities/{campaign_activity_id}
.")
+ account_operation_method: StrictStr = Field(description="The http method for the request you are sending on behalf of a managed child account.")
+ account_operation_payload: Optional[StrictStr] = Field(default=None, description="The request payload for the request you are sending on behalf of a managed child account. If you provide a JSON payload using this parameter, make sure that the JSON is string escaped.")
+ account_operation_query_parameters: Optional[List[PartnerAccountOperationsRequestAccountOperationQueryParametersInner]] = Field(default=None, description="An array containing the query parameters for the request you are sending on behalf of a managed child account.")
+ account_operation_path_parameters: Optional[List[PartnerAccountOperationsRequestAccountOperationPathParametersInner]] = Field(default=None, description="An array containing the path parameters for the request you are sending on behalf of a managed child account.")
+ account_operation_headers: Optional[List[PartnerAccountOperationsRequestAccountOperationHeadersInner]] = Field(default=None, description="An array containing the headers for the request you are sending on behalf of a managed child account.")
+ __properties: ClassVar[List[str]] = ["account_operation_url", "account_operation_method", "account_operation_payload", "account_operation_query_parameters", "account_operation_path_parameters", "account_operation_headers"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PartnerAccountOperationsRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in account_operation_query_parameters (list)
+ _items = []
+ if self.account_operation_query_parameters:
+ for _item in self.account_operation_query_parameters:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['account_operation_query_parameters'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in account_operation_path_parameters (list)
+ _items = []
+ if self.account_operation_path_parameters:
+ for _item in self.account_operation_path_parameters:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['account_operation_path_parameters'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in account_operation_headers (list)
+ _items = []
+ if self.account_operation_headers:
+ for _item in self.account_operation_headers:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['account_operation_headers'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PartnerAccountOperationsRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "account_operation_url": obj.get("account_operation_url"),
+ "account_operation_method": obj.get("account_operation_method"),
+ "account_operation_payload": obj.get("account_operation_payload"),
+ "account_operation_query_parameters": [PartnerAccountOperationsRequestAccountOperationQueryParametersInner.from_dict(_item) for _item in obj.get("account_operation_query_parameters")] if obj.get("account_operation_query_parameters") is not None else None,
+ "account_operation_path_parameters": [PartnerAccountOperationsRequestAccountOperationPathParametersInner.from_dict(_item) for _item in obj.get("account_operation_path_parameters")] if obj.get("account_operation_path_parameters") is not None else None,
+ "account_operation_headers": [PartnerAccountOperationsRequestAccountOperationHeadersInner.from_dict(_item) for _item in obj.get("account_operation_headers")] if obj.get("account_operation_headers") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/partner_account_operations_request_account_operation_headers_inner.py b/constant_contact_api_client/models/partner_account_operations_request_account_operation_headers_inner.py
new file mode 100644
index 0000000..22cd386
--- /dev/null
+++ b/constant_contact_api_client/models/partner_account_operations_request_account_operation_headers_inner.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PartnerAccountOperationsRequestAccountOperationHeadersInner(BaseModel):
+ """
+ PartnerAccountOperationsRequestAccountOperationHeadersInner
+ """ # noqa: E501
+ header_key: Optional[StrictStr] = Field(default=None, description="The name of the header.")
+ header_value: Optional[StrictStr] = Field(default=None, description="The value of the header.")
+ __properties: ClassVar[List[str]] = ["header_key", "header_value"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PartnerAccountOperationsRequestAccountOperationHeadersInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PartnerAccountOperationsRequestAccountOperationHeadersInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "header_key": obj.get("header_key"),
+ "header_value": obj.get("header_value")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/partner_account_operations_request_account_operation_path_parameters_inner.py b/constant_contact_api_client/models/partner_account_operations_request_account_operation_path_parameters_inner.py
new file mode 100644
index 0000000..0bf1c1c
--- /dev/null
+++ b/constant_contact_api_client/models/partner_account_operations_request_account_operation_path_parameters_inner.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PartnerAccountOperationsRequestAccountOperationPathParametersInner(BaseModel):
+ """
+ PartnerAccountOperationsRequestAccountOperationPathParametersInner
+ """ # noqa: E501
+ path_param_key: Optional[StrictStr] = Field(default=None, description="The name of the path parameter.")
+ path_param_value: Optional[StrictStr] = Field(default=None, description="The value of the path parameter.")
+ __properties: ClassVar[List[str]] = ["path_param_key", "path_param_value"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PartnerAccountOperationsRequestAccountOperationPathParametersInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PartnerAccountOperationsRequestAccountOperationPathParametersInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "path_param_key": obj.get("path_param_key"),
+ "path_param_value": obj.get("path_param_value")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/partner_account_operations_request_account_operation_query_parameters_inner.py b/constant_contact_api_client/models/partner_account_operations_request_account_operation_query_parameters_inner.py
new file mode 100644
index 0000000..9412d41
--- /dev/null
+++ b/constant_contact_api_client/models/partner_account_operations_request_account_operation_query_parameters_inner.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PartnerAccountOperationsRequestAccountOperationQueryParametersInner(BaseModel):
+ """
+ PartnerAccountOperationsRequestAccountOperationQueryParametersInner
+ """ # noqa: E501
+ query_param_key: Optional[StrictStr] = Field(default=None, description="The name of the query parameter.")
+ query_param_value: Optional[StrictStr] = Field(default=None, description="The value of the query parameter.")
+ __properties: ClassVar[List[str]] = ["query_param_key", "query_param_value"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PartnerAccountOperationsRequestAccountOperationQueryParametersInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PartnerAccountOperationsRequestAccountOperationQueryParametersInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "query_param_key": obj.get("query_param_key"),
+ "query_param_value": obj.get("query_param_value")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/partner_account_site_owner_list_inner.py b/constant_contact_api_client/models/partner_account_site_owner_list_inner.py
new file mode 100644
index 0000000..74f42f1
--- /dev/null
+++ b/constant_contact_api_client/models/partner_account_site_owner_list_inner.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PartnerAccountSiteOwnerListInner(BaseModel):
+ """
+ PartnerAccountSiteOwnerListInner
+ """ # noqa: E501
+ encoded_account_id: Optional[StrictStr] = Field(default=None, description="The obfuscated ID used to uniquely identify a client account.")
+ subscriber_count: Optional[StrictInt] = Field(default=None, description="The total number of subscriber contacts that are associated with a client account.")
+ organization_name: Optional[StrictStr] = Field(default=None, description="The name of the organization associated with this client account.")
+ site_owner_name: Optional[StrictStr] = Field(default=None, description="The user name that identifies a client account.")
+ billing_status: Optional[StrictStr] = Field(default=None, description="The client's account billing status. When you first create a client account the `billing status` defaults to `Trial`. Billing status values include: Trial
- A non-paying trial client account (default value).Open
- An active and paying client account.Canceled
- A canceled client account.Trial End
- The trial period has ended for this client account.plan_type
from TRIAL
to any other billing plan type, you cannot change it back to TRIAL
. TRIAL
: A non-billable account with an expiration date that allows clients to try Constant Contact product features.GOLD
: A billable client account plan.SILVER
: A billable client account plan.BRONZE
: A billable client account plan.plan_type
value changes from a TRIAL
plan to a different plan_type
. For trial accounts, the value defaults to null. You can only change the billing_day_of_month
when changing the plan_type
value from TRIAL
to a different plan_type
, otherwise the value you enter is ignored.")
+ __properties: ClassVar[List[str]] = ["plan_type", "plan_group_id", "billing_day_of_month"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PlanInfo from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PlanInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "plan_type": obj.get("plan_type"),
+ "plan_group_id": obj.get("plan_group_id"),
+ "billing_day_of_month": obj.get("billing_day_of_month")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/plan_tiers_object.py b/constant_contact_api_client/models/plan_tiers_object.py
new file mode 100644
index 0000000..b025b9d
--- /dev/null
+++ b/constant_contact_api_client/models/plan_tiers_object.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from constant_contact_api_client.models.plan_tiers_object_current_tiers_inner import PlanTiersObjectCurrentTiersInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PlanTiersObject(BaseModel):
+ """
+ Specifies client billing plan details including the type of plan, the plan tiers used, the current billing status, and the day of the month that the client is billed. When a client account is first provisioned, the `plan_type` defaults to a `Trial` account. After you change an account `billing_status` from `Trial` to any other `billing_status`, you cannot change it back to a `Trial` account.
+ """ # noqa: E501
+ plan_type: Optional[StrictStr] = Field(default=None, description="The billing plan that is associated with a client's Constant Contact account. The billing plan determines which Constant Contact product features that the client account can access. If you are not on the latest billing plan, contact the Constant Contact Partner Team. However, older billing plans and plan_type
enum values will continue to be supported. TRIAL
: Provides limited product features for a non-billed account and the account has an expiration date.BRONZE
: Billable plan that provides basic email and marketing tools.SILVER
: Billable plan that provides all features available in the BRONZE
plan, and adds some additional email campaign to features, such as contact segmentation and social media ads integration.GOLD
: Billable plan that provides all available product features.billing_status
defaults to Trial
. Billing status values include: Trial
- A non-paying trial client account (default value).Open
- An active and paying client account.Canceled
- A canceled client account.Trial End
- The trial period has ended for this client account.null
. The value can only be changed when changing the plan_type
from a trial account to a different type of plan, otherwise the value you enter is ignored. You can choose to enter a specific day of month or except the default value, which is the day that the plan_type
value changes from a trial account plan to a different plan. Valid billing_day_of_month
values include 1
through and including 31
.")
+ __properties: ClassVar[List[str]] = ["plan_type", "current_tiers", "billing_status", "billing_day_of_month"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PlanTiersObject from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in current_tiers (list)
+ _items = []
+ if self.current_tiers:
+ for _item in self.current_tiers:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['current_tiers'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PlanTiersObject from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "plan_type": obj.get("plan_type"),
+ "current_tiers": [PlanTiersObjectCurrentTiersInner.from_dict(_item) for _item in obj.get("current_tiers")] if obj.get("current_tiers") is not None else None,
+ "billing_status": obj.get("billing_status"),
+ "billing_day_of_month": obj.get("billing_day_of_month")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/plan_tiers_object_current_tiers_inner.py b/constant_contact_api_client/models/plan_tiers_object_current_tiers_inner.py
new file mode 100644
index 0000000..4c5a91b
--- /dev/null
+++ b/constant_contact_api_client/models/plan_tiers_object_current_tiers_inner.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PlanTiersObjectCurrentTiersInner(BaseModel):
+ """
+ The usage tier that is associated with a client's Constant Contact account and is used to calculate the monthly billing price.
+ """ # noqa: E501
+ usage_type: Optional[StrictStr] = Field(default='CONTACTS', description="Identifies the tier usage type that is associated with the billing plan.")
+ current_usage: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of active contacts (default) used within the current tier.")
+ tier: Optional[StrictInt] = Field(default=None, description="The billing tier level that is associated with a client account. By default, the system determines the tier level to use based on the number of active contacts currently in the client account at the time of billing. Billing tiers may differ. The following shows an example billing tier: 1
= 0 - 500 contacts2
= 501 - 1000 contacts3
= 1001 - ...country_code
is US
) or Canadian province (country_code
is CA
) where the client's organization is physically located. Leave the state_code
blank for non-US states and Canadian provinces.")
+ time_zone_id: Optional[StrictStr] = Field(default=None, description="The offical time zone to use to represent the physical location associated with the client account.")
+ website: Optional[StrictStr] = Field(default=None, description="The client's website URL. Specifying the website URL eliminates the need for clients to provide that information. Requires a valid URL starting with http:// or https://.")
+ login_name: Annotated[str, Field(min_length=6, strict=True, max_length=50)] = Field(description="A unique login name to associate with the client account. The name must only contain alphanumeric characters and '-', '_', '@','.','+'. ")
+ password: Optional[Annotated[str, Field(min_length=8, strict=True, max_length=80)]] = Field(default=None, description="Required if not using Single Sign On (SSO) or external authenticator. The password to associate with the client account. Passwords must be at least 8 characters and no more than 80 characters in length. Passwords can contain alphabetical letters (A-Z) and (a-z), numbers (0-9), special characters (! @ # $ etc.) and spaces. Passwords should not contain any part of your username and cannot be the same as your last password, or be listed on an industry database; we check for easily guessed or compromised passwords. Your new password is not returned in the response payload for security reasons. If using SSO authentication, use idp_provider
and idp_provider_id
instead of password
.")
+ first_name: Optional[Annotated[str, Field(min_length=2, strict=True, max_length=80)]] = Field(default=None, description="The client account owner's first name.")
+ last_name: Optional[Annotated[str, Field(min_length=2, strict=True, max_length=80)]] = Field(default=None, description="The client account owner's last name.")
+ partner_account_id: Optional[Annotated[str, Field(strict=True, max_length=80)]] = Field(default=None, description="The unique client account identifier that partners define and use for billing and reporting purposes.")
+ billing_locale: Optional[StrictStr] = Field(default=None, description="The currency to use when billing the client account. Valid values are: en_US
(default, US Dollars) or en_GB
(British Pounds).")
+ managed_site_owner: Optional[StrictBool] = Field(default=None, description="By default, if the client account is setup as a managed account managed_site_owner
is automatically set to true
and attempting to override the setting with false
is ignored. This helps to avoid getting an account into an unknown state.")
+ enable_single_billing: Optional[StrictBool] = Field(default=None, description="If a partner account is setup to allow for single billing and the managed_site_owner
property is set to true
, use this property to enable the single billing feature for the client account. See your account manager for more information.")
+ gdpr_opt_out: Optional[StrictBool] = Field(default=None, description="When creating accounts for users who have opted-out of any marketing communications, set the gdpr_opt_out
to true
so that Constant Contact does not send any marketing communications to the account.")
+ external_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The ID used to uniquely identify the client account for the external authenticator. Do not use the password
property when using an external authenticator.")
+ external_provider: Optional[Annotated[str, Field(strict=True, max_length=80)]] = Field(default=None, description="The name of the provider who externally authenticates this customer. For example, PayPal or Yahoo. Do not use the password
property when using an external authenticator.")
+ __properties: ClassVar[List[str]] = ["contact_email", "contact_phone", "country_code", "organization_name", "organization_phone", "state_code", "time_zone_id", "website", "login_name", "password", "first_name", "last_name", "partner_account_id", "billing_locale", "managed_site_owner", "enable_single_billing", "gdpr_opt_out", "external_id", "external_provider"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Provision from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Provision from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_email": obj.get("contact_email"),
+ "contact_phone": obj.get("contact_phone"),
+ "country_code": obj.get("country_code"),
+ "organization_name": obj.get("organization_name"),
+ "organization_phone": obj.get("organization_phone"),
+ "state_code": obj.get("state_code"),
+ "time_zone_id": obj.get("time_zone_id"),
+ "website": obj.get("website"),
+ "login_name": obj.get("login_name"),
+ "password": obj.get("password"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "partner_account_id": obj.get("partner_account_id"),
+ "billing_locale": obj.get("billing_locale"),
+ "managed_site_owner": obj.get("managed_site_owner"),
+ "enable_single_billing": obj.get("enable_single_billing"),
+ "gdpr_opt_out": obj.get("gdpr_opt_out"),
+ "external_id": obj.get("external_id"),
+ "external_provider": obj.get("external_provider")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/provision_response.py b/constant_contact_api_client/models/provision_response.py
new file mode 100644
index 0000000..1f8fd1c
--- /dev/null
+++ b/constant_contact_api_client/models/provision_response.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ProvisionResponse(BaseModel):
+ """
+ ProvisionResponse
+ """ # noqa: E501
+ encoded_account_id: Optional[StrictStr] = Field(default=None, description="The system generated ID used to uniquely identify a client account.")
+ provision_uuid: Optional[StrictStr] = Field(default=None, description="The system generated ID used to uniquely identify the provisioning of a client account.")
+ __properties: ClassVar[List[str]] = ["encoded_account_id", "provision_uuid"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ProvisionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ProvisionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "encoded_account_id": obj.get("encoded_account_id"),
+ "provision_uuid": obj.get("provision_uuid")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/put_tag_request.py b/constant_contact_api_client/models/put_tag_request.py
new file mode 100644
index 0000000..29a8d31
--- /dev/null
+++ b/constant_contact_api_client/models/put_tag_request.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PutTagRequest(BaseModel):
+ """
+ PutTagRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="The new tag name to use. The tag name must be unique.")
+ __properties: ClassVar[List[str]] = ["name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PutTagRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PutTagRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/query_param_object.py b/constant_contact_api_client/models/query_param_object.py
new file mode 100644
index 0000000..bf2e359
--- /dev/null
+++ b/constant_contact_api_client/models/query_param_object.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class QueryParamObject(BaseModel):
+ """
+ QueryParamObject
+ """ # noqa: E501
+ query_param_key: Optional[StrictStr] = Field(default=None, description="The name of the query parameter.")
+ query_param_value: Optional[StrictStr] = Field(default=None, description="The value of the query parameter.")
+ __properties: ClassVar[List[str]] = ["query_param_key", "query_param_value"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of QueryParamObject from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of QueryParamObject from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "query_param_key": obj.get("query_param_key"),
+ "query_param_value": obj.get("query_param_value")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/reporting_links.py b/constant_contact_api_client/models/reporting_links.py
new file mode 100644
index 0000000..e95db91
--- /dev/null
+++ b/constant_contact_api_client/models/reporting_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_contact_tracking_report200_response_links_next import GetContactTrackingReport200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ReportingLinks(BaseModel):
+ """
+ ReportingLinks
+ """ # noqa: E501
+ next: GetContactTrackingReport200ResponseLinksNext
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ReportingLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ReportingLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetContactTrackingReport200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/reporting_next.py b/constant_contact_api_client/models/reporting_next.py
new file mode 100644
index 0000000..327aff1
--- /dev/null
+++ b/constant_contact_api_client/models/reporting_next.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ReportingNext(BaseModel):
+ """
+ ReportingNext
+ """ # noqa: E501
+ href: StrictStr = Field(description="The next link in the page or null if there are no additional pages.")
+ __properties: ClassVar[List[str]] = ["href"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ReportingNext from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ReportingNext from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/resend_to_non_openers_input.py b/constant_contact_api_client/models/resend_to_non_openers_input.py
new file mode 100644
index 0000000..212d743
--- /dev/null
+++ b/constant_contact_api_client/models/resend_to_non_openers_input.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ResendToNonOpenersInput(BaseModel):
+ """
+ ResendToNonOpenersInput
+ """ # noqa: E501
+ resend_subject: StrictStr = Field(description="The subject line used when resending the email campaign activity.")
+ delay_days: Optional[StrictInt] = Field(default=None, description="The number of days to wait before Constant Contact resends the email. Valid values include 1
to 10
days. This property is mutually exclusive with delay_minutes
. This value is only returned in the response results if the resend activity was created with delay_days
or the delay_minutes
equal to an exact day value.")
+ delay_minutes: Optional[StrictInt] = Field(default=None, description="The number of minutes to wait before Constant Contact resends the email campaign activity. There are 1,440 minutes in a day. Valid values includes a minimum of 720
(12 hours) and a maximum of 14,400
minutes (10 days). This property is mutually exclusive with delay_days
")
+ __properties: ClassVar[List[str]] = ["resend_subject", "delay_days", "delay_minutes"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ResendToNonOpenersInput from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ResendToNonOpenersInput from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "resend_subject": obj.get("resend_subject"),
+ "delay_days": obj.get("delay_days"),
+ "delay_minutes": obj.get("delay_minutes")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/resend_to_non_openers_object.py b/constant_contact_api_client/models/resend_to_non_openers_object.py
new file mode 100644
index 0000000..35a2d50
--- /dev/null
+++ b/constant_contact_api_client/models/resend_to_non_openers_object.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ResendToNonOpenersObject(BaseModel):
+ """
+ ResendToNonOpenersObject
+ """ # noqa: E501
+ resend_subject: Optional[StrictStr] = Field(default=None, description="The subject line for the resend email.")
+ delay_days: Optional[StrictInt] = Field(default=None, description="The number of days to wait before Constant Contact resends the email. Valid values include 1
to 10
days. This property is mutually exclusive with delay_minutes
. This value is only returned in the response results if the resend activity was created with delay_days
or the delay_minutes
equal to an exact day value.")
+ delay_minutes: Optional[StrictInt] = Field(default=None, description="The number of minutes to wait before Constant Contact resends the email. There are 1,440 minutes in a day. Valid values includes a minimum of 720
(12 hours) and a maximum of 14,400
minutes (10 days). This property is mutually exclusive with delay_days
.")
+ resend_date: Optional[datetime] = Field(default=None, description="The system generated ISO-8601 format date and time that Constant Contact resent the email to non-openers.")
+ resend_request_id: Optional[StrictStr] = Field(default=None, description="For scheduled or sent resend to non-opener emails, this property is a unique identifier for the resend. For draft email campaign resend activities, the value of this property is DRAFT
.")
+ __properties: ClassVar[List[str]] = ["resend_subject", "delay_days", "delay_minutes", "resend_date", "resend_request_id"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ResendToNonOpenersObject from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "resend_date",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ResendToNonOpenersObject from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "resend_subject": obj.get("resend_subject"),
+ "delay_days": obj.get("delay_days"),
+ "delay_minutes": obj.get("delay_minutes"),
+ "resend_date": obj.get("resend_date"),
+ "resend_request_id": obj.get("resend_request_id")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/schedule_email_campaign_activity_request.py b/constant_contact_api_client/models/schedule_email_campaign_activity_request.py
new file mode 100644
index 0000000..d7f8db0
--- /dev/null
+++ b/constant_contact_api_client/models/schedule_email_campaign_activity_request.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ScheduleEmailCampaignActivityRequest(BaseModel):
+ """
+ ScheduleEmailCampaignActivityRequest
+ """ # noqa: E501
+ scheduled_date: datetime = Field(description="The date when Constant Contact will send the email campaign activity to contacts in ISO-8601 format. For example, 2022-05-17
and 2022-05-17T16:37:59.091Z
are valid dates. Use \"0\"
as the date to have Constant Contact immediately send the email campaign activity to contacts.")
+ __properties: ClassVar[List[str]] = ["scheduled_date"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ScheduleEmailCampaignActivityRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ScheduleEmailCampaignActivityRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "scheduled_date": obj.get("scheduled_date")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/segment_data.py b/constant_contact_api_client/models/segment_data.py
new file mode 100644
index 0000000..bb38fe2
--- /dev/null
+++ b/constant_contact_api_client/models/segment_data.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class SegmentData(BaseModel):
+ """
+ SegmentData
+ """ # noqa: E501
+ name: StrictStr = Field(description="The segment's unique descriptive name.")
+ segment_criteria: Annotated[str, Field(strict=True, max_length=20000)] = Field(description="The segment_criteria
specifies the contact data that Constant Contact uses to evaluate and identify contacts that meet your criteria. The segment_criteria
must be formatted as single-string escaped JSON. The top-level group
type
must be add
.")
+ __properties: ClassVar[List[str]] = ["name", "segment_criteria"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SegmentData from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of SegmentData from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "segment_criteria": obj.get("segment_criteria")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/segment_detail.py b/constant_contact_api_client/models/segment_detail.py
new file mode 100644
index 0000000..d6125c6
--- /dev/null
+++ b/constant_contact_api_client/models/segment_detail.py
@@ -0,0 +1,105 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class SegmentDetail(BaseModel):
+ """
+ SegmentDetail
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="The segment's unique descriptive name.")
+ segment_criteria: Optional[Annotated[str, Field(strict=True, max_length=20000)]] = Field(default=None, description="The segment's contact selection criteria formatted as single-string escaped JSON.")
+ segment_id: Optional[StrictInt] = Field(default=None, description="The system generated number that uniquely identifies the segment.")
+ created_at: Optional[datetime] = Field(default=None, description="The system generated date and time (ISO-8601) that the segment was created.")
+ edited_at: Optional[datetime] = Field(default=None, description="The system generated date and time (ISO-8601) that the segment's name
or segment_criteria
was last updated.")
+ __properties: ClassVar[List[str]] = ["name", "segment_criteria", "segment_id", "created_at", "edited_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SegmentDetail from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "segment_id",
+ "created_at",
+ "edited_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of SegmentDetail from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "segment_criteria": obj.get("segment_criteria"),
+ "segment_id": obj.get("segment_id"),
+ "created_at": obj.get("created_at"),
+ "edited_at": obj.get("edited_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/segment_master.py b/constant_contact_api_client/models/segment_master.py
new file mode 100644
index 0000000..0d22ca1
--- /dev/null
+++ b/constant_contact_api_client/models/segment_master.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class SegmentMaster(BaseModel):
+ """
+ SegmentMaster
+ """ # noqa: E501
+ name: Optional[StrictStr] = Field(default=None, description="The segment's unique descriptive name.")
+ segment_id: Optional[StrictInt] = Field(default=None, description="The system generated number that uniquely identifies the segment.")
+ created_at: Optional[datetime] = Field(default=None, description="The system generated date and time that the segment was created (ISO-8601 format).")
+ edited_at: Optional[datetime] = Field(default=None, description="The system generated date and time that the segment's name
or segment_criteria
was last updated (ISO-8601 format).")
+ __properties: ClassVar[List[str]] = ["name", "segment_id", "created_at", "edited_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SegmentMaster from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "segment_id",
+ "created_at",
+ "edited_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of SegmentMaster from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "segment_id": obj.get("segment_id"),
+ "created_at": obj.get("created_at"),
+ "edited_at": obj.get("edited_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/segment_name.py b/constant_contact_api_client/models/segment_name.py
new file mode 100644
index 0000000..455111c
--- /dev/null
+++ b/constant_contact_api_client/models/segment_name.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class SegmentName(BaseModel):
+ """
+ SegmentName
+ """ # noqa: E501
+ name: StrictStr = Field(description="The segment's unique descriptive name.")
+ __properties: ClassVar[List[str]] = ["name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SegmentName from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of SegmentName from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/segments_dto.py b/constant_contact_api_client/models/segments_dto.py
new file mode 100644
index 0000000..4bd0ccd
--- /dev/null
+++ b/constant_contact_api_client/models/segments_dto.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_all_segments200_response_links import GetAllSegments200ResponseLinks
+from constant_contact_api_client.models.get_all_segments200_response_segments_inner import GetAllSegments200ResponseSegmentsInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class SegmentsDTO(BaseModel):
+ """
+ SegmentsDTO
+ """ # noqa: E501
+ segments: List[GetAllSegments200ResponseSegmentsInner] = Field(description="Lists all segments for the account.")
+ links: Optional[GetAllSegments200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["segments", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SegmentsDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in segments (list)
+ _items = []
+ if self.segments:
+ for _item in self.segments:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['segments'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of SegmentsDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "segments": [GetAllSegments200ResponseSegmentsInner.from_dict(_item) for _item in obj.get("segments")] if obj.get("segments") is not None else None,
+ "_links": GetAllSegments200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/sends_tracking_activities_page.py b/constant_contact_api_client/models/sends_tracking_activities_page.py
new file mode 100644
index 0000000..625b1ee
--- /dev/null
+++ b/constant_contact_api_client/models/sends_tracking_activities_page.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_email_sends_report200_response_links import GetEmailSendsReport200ResponseLinks
+from constant_contact_api_client.models.get_email_sends_report200_response_tracking_activities_inner import GetEmailSendsReport200ResponseTrackingActivitiesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class SendsTrackingActivitiesPage(BaseModel):
+ """
+ SendsTrackingActivitiesPage
+ """ # noqa: E501
+ tracking_activities: List[GetEmailSendsReport200ResponseTrackingActivitiesInner] = Field(description="Lists the contacts to which the email campaign activity (campaign_activity_id
) was sent.")
+ links: Optional[GetEmailSendsReport200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tracking_activities", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SendsTrackingActivitiesPage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tracking_activities (list)
+ _items = []
+ if self.tracking_activities:
+ for _item in self.tracking_activities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tracking_activities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of SendsTrackingActivitiesPage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tracking_activities": [GetEmailSendsReport200ResponseTrackingActivitiesInner.from_dict(_item) for _item in obj.get("tracking_activities")] if obj.get("tracking_activities") is not None else None,
+ "_links": GetEmailSendsReport200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/sends_tracking_activity.py b/constant_contact_api_client/models/sends_tracking_activity.py
new file mode 100644
index 0000000..70a27d2
--- /dev/null
+++ b/constant_contact_api_client/models/sends_tracking_activity.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import date, datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class SendsTrackingActivity(BaseModel):
+ """
+ SendsTrackingActivity
+ """ # noqa: E501
+ contact_id: StrictStr = Field(description="The ID that uniquely identifies a contact.")
+ campaign_activity_id: StrictStr = Field(description="The ID that uniquely identifies an email campaign activity.")
+ tracking_activity_type: StrictStr = Field(description="The type of tracking activity that is associated with this campaign_activity_id
and used for reporting purposes.")
+ email_address: StrictStr = Field(description="The email address used to send the email campaign activity to a contact.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The first name of the contact.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The last name of the contact.")
+ created_time: datetime = Field(description="The date and time that you sent the email campaign to the contact.")
+ deleted_at: Optional[date] = Field(default=None, description="If applicable, displays the date that the contact was deleted.")
+ __properties: ClassVar[List[str]] = ["contact_id", "campaign_activity_id", "tracking_activity_type", "email_address", "first_name", "last_name", "created_time", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SendsTrackingActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of SendsTrackingActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_id": obj.get("contact_id"),
+ "campaign_activity_id": obj.get("campaign_activity_id"),
+ "tracking_activity_type": obj.get("tracking_activity_type"),
+ "email_address": obj.get("email_address"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "created_time": obj.get("created_time"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/sms_channel_consent_details.py b/constant_contact_api_client/models/sms_channel_consent_details.py
new file mode 100644
index 0000000..a852649
--- /dev/null
+++ b/constant_contact_api_client/models/sms_channel_consent_details.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class SmsChannelConsentDetails(BaseModel):
+ """
+ Provides SMS consent details.
+ """ # noqa: E501
+ sms_consent_permission: Optional[StrictStr] = Field(default=None, description="Identifies the current permission status for the SMS channel.")
+ consent_type: Optional[StrictStr] = None
+ opt_in_date: Optional[datetime] = Field(default=None, description="Date and time, in ISO-8601 format, that the contact subscribed/opted-in to receiving SMS from the account. Displays only if the contact subscribes/opts-in. System generated.")
+ opt_out_date: Optional[datetime] = Field(default=None, description="Date and time, in ISO-8601 format, that the contact unsubscribed/opted-out of receiving SMS from the account. Displays only if the contact unsubscribed/opted-out. System generated.")
+ advertised_frequency: Optional[StrictStr] = Field(default=None, description="The numeric used to set how often to send SMS advertisements during a specified time interval (advertised_interval
). For example, if the advertised_frequency
is set to 2
and the advertised_interval
is set to monthly
, the contact can receive up to two advertisements per month.")
+ advertised_interval: Optional[StrictStr] = Field(default=None, description="Identifies the unit of time used by Constant Contact to send SMS advertisements as a string enum. For example, if the advertised_frequency
is set to 2
and the advertised_interval
is set to monthly
, the contact can receive up to two advertisements per month.")
+ created_at: Optional[datetime] = Field(default=None, description="Date and time that the SMS stats were created, in ISO-8601 format. System generated.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the SMS stats were updated, in ISO-8601 format. System generated.")
+ __properties: ClassVar[List[str]] = ["sms_consent_permission", "consent_type", "opt_in_date", "opt_out_date", "advertised_frequency", "advertised_interval", "created_at", "updated_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SmsChannelConsentDetails from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "opt_in_date",
+ "opt_out_date",
+ "created_at",
+ "updated_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of SmsChannelConsentDetails from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "sms_consent_permission": obj.get("sms_consent_permission"),
+ "consent_type": obj.get("consent_type"),
+ "opt_in_date": obj.get("opt_in_date"),
+ "opt_out_date": obj.get("opt_out_date"),
+ "advertised_frequency": obj.get("advertised_frequency"),
+ "advertised_interval": obj.get("advertised_interval"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/sso_user.py b/constant_contact_api_client/models/sso_user.py
new file mode 100644
index 0000000..8ca2bf3
--- /dev/null
+++ b/constant_contact_api_client/models/sso_user.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class SSOUser(BaseModel):
+ """
+ Specify client account user's details. All fields are required.
+ """ # noqa: E501
+ first_name: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The client account user's first name.")
+ last_name: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The client account user's last name.")
+ role_name: StrictStr = Field(description="The role (account_manager
or campaign_creator
) to assign the client account user.")
+ contact_email: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The unique email address to associate with the new client account user.")
+ login_name: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The login name to associate with the new client account user.")
+ external_id: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The unique ID used to identify the client account user to the external authenticator. ")
+ external_provider: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The unique name used to identify the external provider used to authenticate the client account user. For a list of external providers, contact the Constant Contact Partner Team.")
+ __properties: ClassVar[List[str]] = ["first_name", "last_name", "role_name", "contact_email", "login_name", "external_id", "external_provider"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SSOUser from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of SSOUser from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "role_name": obj.get("role_name"),
+ "contact_email": obj.get("contact_email"),
+ "login_name": obj.get("login_name"),
+ "external_id": obj.get("external_id"),
+ "external_provider": obj.get("external_provider")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/stats_email.py b/constant_contact_api_client/models/stats_email.py
new file mode 100644
index 0000000..02af373
--- /dev/null
+++ b/constant_contact_api_client/models/stats_email.py
@@ -0,0 +1,126 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class StatsEmail(BaseModel):
+ """
+ StatsEmail
+ """ # noqa: E501
+ em_bounces: Optional[StrictInt] = Field(default=None, description="Number of unique email bounces.")
+ em_clicks: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who clicked any link in the email.")
+ em_clicks_all: Optional[StrictInt] = Field(default=None, description="Total number of non-unique email clicks.")
+ em_clicks_all_computer: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a standard desktop or laptop computer.")
+ em_clicks_all_mobile: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a mobile phone or similar small mobile device (e.g. iPhone).")
+ em_clicks_all_tablet: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a small tablet type computer (e.g. iPad).")
+ em_clicks_all_other: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on an unknown device (e.g. Game Console or Wearable).")
+ em_clicks_all_none: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks for which the device type was not captured. This will account for any clicks prior to when device type was collected and stored.")
+ em_forwards: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who forwarded the email using the forward to a friend feature (not available for all types of emails).")
+ em_not_opened: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who did not open the email. This is calculated as follows: em_not_opened
is equal to em_sends - em_opens - em_bounces
. This value is reported as zero if the calculation results in a negative value.")
+ em_opens: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who opened the email.")
+ em_opens_all: Optional[StrictInt] = Field(default=None, description="Total number of non-unique email opens.")
+ em_opens_all_computer: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a standard desktop or laptop computer.")
+ em_opens_all_mobile: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a mobile phone or similar small mobile device (e.g. iPhone).")
+ em_opens_all_tablet: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a small tablet type computer (e.g. iPad).")
+ em_opens_all_other: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on an unknown device (e.g. Game Console or Wearable).")
+ em_opens_all_none: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens for which the device type was not captured. This will account for any opens prior to when device type was collected and stored.")
+ em_optouts: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who unsubscribed due to this email.")
+ em_sends: Optional[StrictInt] = Field(default=None, description="Number of unique email sends.")
+ __properties: ClassVar[List[str]] = ["em_bounces", "em_clicks", "em_clicks_all", "em_clicks_all_computer", "em_clicks_all_mobile", "em_clicks_all_tablet", "em_clicks_all_other", "em_clicks_all_none", "em_forwards", "em_not_opened", "em_opens", "em_opens_all", "em_opens_all_computer", "em_opens_all_mobile", "em_opens_all_tablet", "em_opens_all_other", "em_opens_all_none", "em_optouts", "em_sends"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of StatsEmail from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of StatsEmail from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "em_bounces": obj.get("em_bounces"),
+ "em_clicks": obj.get("em_clicks"),
+ "em_clicks_all": obj.get("em_clicks_all"),
+ "em_clicks_all_computer": obj.get("em_clicks_all_computer"),
+ "em_clicks_all_mobile": obj.get("em_clicks_all_mobile"),
+ "em_clicks_all_tablet": obj.get("em_clicks_all_tablet"),
+ "em_clicks_all_other": obj.get("em_clicks_all_other"),
+ "em_clicks_all_none": obj.get("em_clicks_all_none"),
+ "em_forwards": obj.get("em_forwards"),
+ "em_not_opened": obj.get("em_not_opened"),
+ "em_opens": obj.get("em_opens"),
+ "em_opens_all": obj.get("em_opens_all"),
+ "em_opens_all_computer": obj.get("em_opens_all_computer"),
+ "em_opens_all_mobile": obj.get("em_opens_all_mobile"),
+ "em_opens_all_tablet": obj.get("em_opens_all_tablet"),
+ "em_opens_all_other": obj.get("em_opens_all_other"),
+ "em_opens_all_none": obj.get("em_opens_all_none"),
+ "em_optouts": obj.get("em_optouts"),
+ "em_sends": obj.get("em_sends")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/stats_email_activity.py b/constant_contact_api_client/models/stats_email_activity.py
new file mode 100644
index 0000000..ba71292
--- /dev/null
+++ b/constant_contact_api_client/models/stats_email_activity.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class StatsEmailActivity(BaseModel):
+ """
+ StatsEmailActivity
+ """ # noqa: E501
+ em_bounces: Optional[StrictInt] = Field(default=None, description="Number of unique email bounces.")
+ em_clicks: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who clicked any link in the email.")
+ em_clicks_all: Optional[StrictInt] = Field(default=None, description="Total number of non-unique email clicks.")
+ em_clicks_all_computer: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a standard desktop or laptop computer.")
+ em_clicks_all_mobile: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a mobile phone or similar small mobile device (e.g. iPhone).")
+ em_clicks_all_tablet: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on a small tablet type computer (e.g. iPad).")
+ em_clicks_all_other: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks on an unknown device (e.g. Game Console or Wearable).")
+ em_clicks_all_none: Optional[StrictInt] = Field(default=None, description="Number of non-unique email clicks for which the device type was not captured. This will account for any clicks prior to when device type was collected and stored.")
+ em_forwards: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who forwarded the email using the forward to a friend feature (not available for all types of emails).")
+ em_not_opened: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who did not open the email. This is calculated as follows: em_not_opened
is equal to em_sends - em_opens - em_bounces
. This value is reported as zero if the calculation results in a negative value.")
+ em_opens: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who opened the email.")
+ em_opens_all: Optional[StrictInt] = Field(default=None, description="Total number of non-unique email opens.")
+ em_opens_all_computer: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a standard desktop or laptop computer.")
+ em_opens_all_mobile: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a mobile phone or similar small mobile device (e.g. iPhone).")
+ em_opens_all_tablet: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on a small tablet type computer (e.g. iPad).")
+ em_opens_all_other: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens on an unknown device (e.g. Game Console or Wearable).")
+ em_opens_all_none: Optional[StrictInt] = Field(default=None, description="Number of non-unique email opens for which the device type was not captured. This will account for any opens prior to when device type was collected and stored.")
+ em_optouts: Optional[StrictInt] = Field(default=None, description="Number of unique recipients who unsubscribed due to this email.")
+ em_sends: Optional[StrictInt] = Field(default=None, description="Number of unique email sends.")
+ em_abuse: Optional[StrictInt] = Field(default=None, description="Number of abuse (spam) complaints received.")
+ em_bounces_blocked: Optional[StrictInt] = Field(default=None, description="Unique number bounced because as blocked by the receiving system.")
+ em_bounces_mailbox_full: Optional[StrictInt] = Field(default=None, description="Unique number that bounced back with a mailbox full message.")
+ em_bounces_nonexistent_address: Optional[StrictInt] = Field(default=None, description="Unique number that bounced as a non-existent address.")
+ em_bounces_other: Optional[StrictInt] = Field(default=None, description="Unique number that bounced without an identifiable cause.")
+ em_bounces_suspended: Optional[StrictInt] = Field(default=None, description="Unique number that bounced as suspended. Email address bounces as suspended when multiple non-existent bounces have been received for the same address.")
+ em_bounces_undeliverable: Optional[StrictInt] = Field(default=None, description="Unique number that bounced as undeliverable.")
+ em_bounces_vacation: Optional[StrictInt] = Field(default=None, description="Unique number that bounced back with a vacation or out of office autoreply.")
+ __properties: ClassVar[List[str]] = ["em_bounces", "em_clicks", "em_clicks_all", "em_clicks_all_computer", "em_clicks_all_mobile", "em_clicks_all_tablet", "em_clicks_all_other", "em_clicks_all_none", "em_forwards", "em_not_opened", "em_opens", "em_opens_all", "em_opens_all_computer", "em_opens_all_mobile", "em_opens_all_tablet", "em_opens_all_other", "em_opens_all_none", "em_optouts", "em_sends", "em_abuse", "em_bounces_blocked", "em_bounces_mailbox_full", "em_bounces_nonexistent_address", "em_bounces_other", "em_bounces_suspended", "em_bounces_undeliverable", "em_bounces_vacation"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of StatsEmailActivity from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of StatsEmailActivity from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "em_bounces": obj.get("em_bounces"),
+ "em_clicks": obj.get("em_clicks"),
+ "em_clicks_all": obj.get("em_clicks_all"),
+ "em_clicks_all_computer": obj.get("em_clicks_all_computer"),
+ "em_clicks_all_mobile": obj.get("em_clicks_all_mobile"),
+ "em_clicks_all_tablet": obj.get("em_clicks_all_tablet"),
+ "em_clicks_all_other": obj.get("em_clicks_all_other"),
+ "em_clicks_all_none": obj.get("em_clicks_all_none"),
+ "em_forwards": obj.get("em_forwards"),
+ "em_not_opened": obj.get("em_not_opened"),
+ "em_opens": obj.get("em_opens"),
+ "em_opens_all": obj.get("em_opens_all"),
+ "em_opens_all_computer": obj.get("em_opens_all_computer"),
+ "em_opens_all_mobile": obj.get("em_opens_all_mobile"),
+ "em_opens_all_tablet": obj.get("em_opens_all_tablet"),
+ "em_opens_all_other": obj.get("em_opens_all_other"),
+ "em_opens_all_none": obj.get("em_opens_all_none"),
+ "em_optouts": obj.get("em_optouts"),
+ "em_sends": obj.get("em_sends"),
+ "em_abuse": obj.get("em_abuse"),
+ "em_bounces_blocked": obj.get("em_bounces_blocked"),
+ "em_bounces_mailbox_full": obj.get("em_bounces_mailbox_full"),
+ "em_bounces_nonexistent_address": obj.get("em_bounces_nonexistent_address"),
+ "em_bounces_other": obj.get("em_bounces_other"),
+ "em_bounces_suspended": obj.get("em_bounces_suspended"),
+ "em_bounces_undeliverable": obj.get("em_bounces_undeliverable"),
+ "em_bounces_vacation": obj.get("em_bounces_vacation")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/stats_error.py b/constant_contact_api_client/models/stats_error.py
new file mode 100644
index 0000000..99e2ad0
--- /dev/null
+++ b/constant_contact_api_client/models/stats_error.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class StatsError(BaseModel):
+ """
+ StatsError
+ """ # noqa: E501
+ error_key: Optional[StrictStr] = Field(default=None, description="The unique error key.")
+ error_message: Optional[StrictStr] = Field(default=None, description="A error description.")
+ __properties: ClassVar[List[str]] = ["error_key", "error_message"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of StatsError from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of StatsError from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "error_key": obj.get("error_key"),
+ "error_message": obj.get("error_message")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/street_address.py b/constant_contact_api_client/models/street_address.py
new file mode 100644
index 0000000..6574320
--- /dev/null
+++ b/constant_contact_api_client/models/street_address.py
@@ -0,0 +1,113 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class StreetAddress(BaseModel):
+ """
+ StreetAddress
+ """ # noqa: E501
+ street_address_id: Optional[StrictStr] = Field(default=None, description="Unique ID for the street address")
+ kind: StrictStr = Field(description="Describes the type of address; valid values are home, work, or other.")
+ street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Number and street of the address.")
+ city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the city where the contact lives.")
+ state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the state or province where the contact lives.")
+ postal_code: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code of the contact.")
+ country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the country where the contact lives.")
+ created_at: Optional[datetime] = Field(default=None, description="Date and time that the street address was created, in ISO-8601 format. System generated.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the street address was last updated, in ISO-8601 format. System generated.")
+ __properties: ClassVar[List[str]] = ["street_address_id", "kind", "street", "city", "state", "postal_code", "country", "created_at", "updated_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of StreetAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "street_address_id",
+ "created_at",
+ "updated_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of StreetAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "street_address_id": obj.get("street_address_id"),
+ "kind": obj.get("kind"),
+ "street": obj.get("street"),
+ "city": obj.get("city"),
+ "state": obj.get("state"),
+ "postal_code": obj.get("postal_code"),
+ "country": obj.get("country"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/street_address_put.py b/constant_contact_api_client/models/street_address_put.py
new file mode 100644
index 0000000..1cf4cf4
--- /dev/null
+++ b/constant_contact_api_client/models/street_address_put.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class StreetAddressPut(BaseModel):
+ """
+ StreetAddressPut
+ """ # noqa: E501
+ kind: StrictStr = Field(description="Describes the type of address; valid values are home, work, or other.")
+ street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Number and street of the address.")
+ city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the city where the contact lives.")
+ state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the state or province where the contact lives.")
+ postal_code: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code of the contact.")
+ country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the country where the contact lives.")
+ __properties: ClassVar[List[str]] = ["kind", "street", "city", "state", "postal_code", "country"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of StreetAddressPut from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of StreetAddressPut from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "kind": obj.get("kind"),
+ "street": obj.get("street"),
+ "city": obj.get("city"),
+ "state": obj.get("state"),
+ "postal_code": obj.get("postal_code"),
+ "country": obj.get("country")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/tag.py b/constant_contact_api_client/models/tag.py
new file mode 100644
index 0000000..dd192db
--- /dev/null
+++ b/constant_contact_api_client/models/tag.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Tag(BaseModel):
+ """
+ Tag
+ """ # noqa: E501
+ tag_id: Optional[StrictStr] = Field(default=None, description="The ID that uniquely identifies a tag (UUID format)")
+ name: Optional[StrictStr] = Field(default=None, description="The unique tag name.")
+ contacts_count: Optional[StrictInt] = Field(default=None, description="The total number of contacts who are assigned this tag.")
+ created_at: Optional[datetime] = Field(default=None, description="The system generated date and time when the tag was created (ISO-8601 format).")
+ updated_at: Optional[datetime] = Field(default=None, description="The system generated date and time when the tag was last updated (ISO-8601 format).")
+ tag_source: Optional[StrictStr] = Field(default=None, description="The source used to tag contacts.")
+ __properties: ClassVar[List[str]] = ["tag_id", "name", "contacts_count", "created_at", "updated_at", "tag_source"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Tag from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "contacts_count",
+ "created_at",
+ "updated_at",
+ "tag_source",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Tag from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tag_id": obj.get("tag_id"),
+ "name": obj.get("name"),
+ "contacts_count": obj.get("contacts_count"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "tag_source": obj.get("tag_source")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/tag_add_remove_contacts.py b/constant_contact_api_client/models/tag_add_remove_contacts.py
new file mode 100644
index 0000000..54f5fcd
--- /dev/null
+++ b/constant_contact_api_client/models/tag_add_remove_contacts.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.create_tag_remove_activity_request_exclude import CreateTagRemoveActivityRequestExclude
+from constant_contact_api_client.models.create_tag_remove_activity_request_source import CreateTagRemoveActivityRequestSource
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class TagAddRemoveContacts(BaseModel):
+ """
+ TagAddRemoveContacts
+ """ # noqa: E501
+ source: CreateTagRemoveActivityRequestSource
+ exclude: Optional[CreateTagRemoveActivityRequestExclude] = None
+ tag_ids: Annotated[List[StrictStr], Field(max_length=50)] = Field(description="An array of tags (tag_id
) to add to all contacts meeting the specified source criteria.")
+ __properties: ClassVar[List[str]] = ["source", "exclude", "tag_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of TagAddRemoveContacts from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of source
+ if self.source:
+ _dict['source'] = self.source.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of exclude
+ if self.exclude:
+ _dict['exclude'] = self.exclude.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of TagAddRemoveContacts from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "source": CreateTagRemoveActivityRequestSource.from_dict(obj.get("source")) if obj.get("source") is not None else None,
+ "exclude": CreateTagRemoveActivityRequestExclude.from_dict(obj.get("exclude")) if obj.get("exclude") is not None else None,
+ "tag_ids": obj.get("tag_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/tag_id_list500_limit.py b/constant_contact_api_client/models/tag_id_list500_limit.py
new file mode 100644
index 0000000..ff026f5
--- /dev/null
+++ b/constant_contact_api_client/models/tag_id_list500_limit.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class TagIdList500Limit(BaseModel):
+ """
+ TagIdList500Limit
+ """ # noqa: E501
+ tag_ids: Annotated[List[StrictStr], Field(max_length=500)] = Field(description="The tag IDs (tag_ids
) to delete.")
+ __properties: ClassVar[List[str]] = ["tag_ids"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of TagIdList500Limit from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of TagIdList500Limit from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tag_ids": obj.get("tag_ids")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/tag_post.py b/constant_contact_api_client/models/tag_post.py
new file mode 100644
index 0000000..78488b3
--- /dev/null
+++ b/constant_contact_api_client/models/tag_post.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class TagPost(BaseModel):
+ """
+ TagPost
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Specify a unique name to use to identify the tag. Tag names must be at least one character in length and not more than 255 characters.")
+ tag_source: Optional[StrictStr] = Field(default=None, description="The source used to identify the contacts to tag.")
+ __properties: ClassVar[List[str]] = ["name", "tag_source"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of TagPost from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of TagPost from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "tag_source": obj.get("tag_source")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/tag_put.py b/constant_contact_api_client/models/tag_put.py
new file mode 100644
index 0000000..28929ce
--- /dev/null
+++ b/constant_contact_api_client/models/tag_put.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class TagPut(BaseModel):
+ """
+ TagPut
+ """ # noqa: E501
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="The new tag name to use. The tag name must be unique.")
+ __properties: ClassVar[List[str]] = ["name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of TagPut from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of TagPut from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/tags.py b/constant_contact_api_client/models/tags.py
new file mode 100644
index 0000000..8bb649e
--- /dev/null
+++ b/constant_contact_api_client/models/tags.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.get_all_tags200_response_links import GetAllTags200ResponseLinks
+from constant_contact_api_client.models.get_tag200_response import GetTag200Response
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Tags(BaseModel):
+ """
+ Tags
+ """ # noqa: E501
+ tags: Optional[List[GetTag200Response]] = Field(default=None, description="Lists all tags and provides tag details.")
+ links: Optional[GetAllTags200ResponseLinks] = Field(default=None, alias="_links")
+ __properties: ClassVar[List[str]] = ["tags", "_links"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Tags from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in tags (list)
+ _items = []
+ if self.tags:
+ for _item in self.tags:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tags'] = _items
+ # override the default output from pydantic by calling `to_dict()` of links
+ if self.links:
+ _dict['_links'] = self.links.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Tags from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tags": [GetTag200Response.from_dict(_item) for _item in obj.get("tags")] if obj.get("tags") is not None else None,
+ "_links": GetAllTags200ResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/tags_activity_links.py b/constant_contact_api_client/models/tags_activity_links.py
new file mode 100644
index 0000000..eb02cbc
--- /dev/null
+++ b/constant_contact_api_client/models/tags_activity_links.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from pydantic import Field
+from constant_contact_api_client.models.delete_tag202_response_links_self import DeleteTag202ResponseLinksSelf
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class TagsActivityLinks(BaseModel):
+ """
+ TagsActivityLinks
+ """ # noqa: E501
+ var_self: Optional[DeleteTag202ResponseLinksSelf] = Field(default=None, alias="self")
+ __properties: ClassVar[List[str]] = ["self"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of TagsActivityLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of var_self
+ if self.var_self:
+ _dict['self'] = self.var_self.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of TagsActivityLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "self": DeleteTag202ResponseLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/tags_links.py b/constant_contact_api_client/models/tags_links.py
new file mode 100644
index 0000000..a4db4c1
--- /dev/null
+++ b/constant_contact_api_client/models/tags_links.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from constant_contact_api_client.models.get_all_tags200_response_links_next_next import GetAllTags200ResponseLinksNextNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class TagsLinks(BaseModel):
+ """
+ TagsLinks
+ """ # noqa: E501
+ href: Optional[StrictStr] = None
+ next: Optional[GetAllTags200ResponseLinksNextNext] = None
+ __properties: ClassVar[List[str]] = ["href", "next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of TagsLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of TagsLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href"),
+ "next": GetAllTags200ResponseLinksNextNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/tags_paging_links.py b/constant_contact_api_client/models/tags_paging_links.py
new file mode 100644
index 0000000..6991c9c
--- /dev/null
+++ b/constant_contact_api_client/models/tags_paging_links.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel
+from constant_contact_api_client.models.get_all_tags200_response_links_next import GetAllTags200ResponseLinksNext
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class TagsPagingLinks(BaseModel):
+ """
+ TagsPagingLinks
+ """ # noqa: E501
+ next: Optional[GetAllTags200ResponseLinksNext] = None
+ __properties: ClassVar[List[str]] = ["next"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of TagsPagingLinks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of next
+ if self.next:
+ _dict['next'] = self.next.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of TagsPagingLinks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": GetAllTags200ResponseLinksNext.from_dict(obj.get("next")) if obj.get("next") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/test_send_email_campaign_activity_request.py b/constant_contact_api_client/models/test_send_email_campaign_activity_request.py
new file mode 100644
index 0000000..190f99d
--- /dev/null
+++ b/constant_contact_api_client/models/test_send_email_campaign_activity_request.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class TestSendEmailCampaignActivityRequest(BaseModel):
+ """
+ TestSendEmailCampaignActivityRequest
+ """ # noqa: E501
+ email_addresses: Annotated[List[StrictStr], Field(max_length=5)] = Field(description="The recipients of the test email as an array of email address strings. You can send a test email to up to 5 different email addresses at a time.")
+ personal_message: Optional[StrictStr] = Field(default=None, description="A personal message for the recipients of the test email. Constant Contact displays this message before the email campaign activity content.")
+ __properties: ClassVar[List[str]] = ["email_addresses", "personal_message"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of TestSendEmailCampaignActivityRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of TestSendEmailCampaignActivityRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_addresses": obj.get("email_addresses"),
+ "personal_message": obj.get("personal_message")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/tier_object.py b/constant_contact_api_client/models/tier_object.py
new file mode 100644
index 0000000..0214ad9
--- /dev/null
+++ b/constant_contact_api_client/models/tier_object.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class TierObject(BaseModel):
+ """
+ The usage tier that is associated with a client's Constant Contact account and is used to calculate the monthly billing price.
+ """ # noqa: E501
+ usage_type: Optional[StrictStr] = Field(default='CONTACTS', description="Identifies the tier usage type that is associated with the billing plan.")
+ current_usage: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of active contacts (default) used within the current tier.")
+ tier: Optional[StrictInt] = Field(default=None, description="The billing tier level that is associated with a client account. By default, the system determines the tier level to use based on the number of active contacts currently in the client account at the time of billing. Billing tiers may differ. The following shows an example billing tier: 1
= 0 - 500 contacts2
= 501 - 1000 contacts3
= 1001 - ...N
: not_setT
: temp_holdP
: pending_confirmationI
: implicitE
: explicitO
: unsubscribedD
:deprecatedcountry_code
does not match the contacts country_code
. ")
+ formatted_national: Optional[StrictStr] = Field(default=None, description="The formatted SMS number returned if the SMS country_code
matches the contacts country_code
. ")
+ __properties: ClassVar[List[str]] = ["country_code", "state", "formatted_international", "formatted_national"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of TrackingActivitySmsChannelDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of TrackingActivitySmsChannelDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "country_code": obj.get("country_code"),
+ "state": obj.get("state"),
+ "formatted_international": obj.get("formatted_international"),
+ "formatted_national": obj.get("formatted_national")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/unique_email_counts.py b/constant_contact_api_client/models/unique_email_counts.py
new file mode 100644
index 0000000..98a693c
--- /dev/null
+++ b/constant_contact_api_client/models/unique_email_counts.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UniqueEmailCounts(BaseModel):
+ """
+ UniqueEmailCounts
+ """ # noqa: E501
+ sends: StrictInt = Field(description="The total number of unique sends.")
+ opens: StrictInt = Field(description="The total number of unique opens.")
+ clicks: StrictInt = Field(description="The total number of unique clicks.")
+ forwards: StrictInt = Field(description="The total number of unique forwards.")
+ optouts: StrictInt = Field(description="The total number of unique optouts (unsubscribes).")
+ abuse: StrictInt = Field(description="The total number of unique abuse count (spam).")
+ bounces: StrictInt = Field(description="The total number of unique bounce count.")
+ not_opened: StrictInt = Field(description="The total number of unique non-opens")
+ __properties: ClassVar[List[str]] = ["sends", "opens", "clicks", "forwards", "optouts", "abuse", "bounces", "not_opened"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UniqueEmailCounts from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UniqueEmailCounts from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "sends": obj.get("sends"),
+ "opens": obj.get("opens"),
+ "clicks": obj.get("clicks"),
+ "forwards": obj.get("forwards"),
+ "optouts": obj.get("optouts"),
+ "abuse": obj.get("abuse"),
+ "bounces": obj.get("bounces"),
+ "not_opened": obj.get("not_opened")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/update_account_request.py b/constant_contact_api_client/models/update_account_request.py
new file mode 100644
index 0000000..841c2e1
--- /dev/null
+++ b/constant_contact_api_client/models/update_account_request.py
@@ -0,0 +1,113 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UpdateAccountRequest(BaseModel):
+ """
+ UpdateAccountRequest
+ """ # noqa: E501
+ contact_email: Optional[StrictStr] = Field(default=None, description="The confirmed email address that is associated with the account owner.")
+ contact_phone: Optional[Annotated[str, Field(strict=True, max_length=25)]] = Field(default=None, description="The account owner's contact phone number (up to 25 characters in length).")
+ country_code: Optional[StrictStr] = Field(default=None, description="The two-letter ISO 3166-1 code representing the organization's country.")
+ encoded_account_id: Optional[StrictStr] = Field(default=None, description="The read only encoded account ID that uniquely identifies the account.")
+ first_name: Optional[StrictStr] = Field(default=None, description="The account owner's first name.")
+ last_name: Optional[StrictStr] = Field(default=None, description="The account owner's last name.")
+ organization_name: Optional[StrictStr] = Field(default=None, description="The name of the organization that is associated with this account.")
+ organization_phone: Optional[StrictStr] = Field(default=None, description="The phone number of the organization that is associated with this account.")
+ state_code: Optional[StrictStr] = Field(default=None, description="The two letter ISO 3166-1 code used to specify the state to associate with the account. This property is required if the country_code
is US (United States).")
+ time_zone_id: Optional[StrictStr] = Field(default=None, description="The time zone to use for the account; as defined in the IANA time-zone database (see http://www.iana.org/time-zones).")
+ website: Optional[StrictStr] = Field(default=None, description="The organization's website URL.")
+ __properties: ClassVar[List[str]] = ["contact_email", "contact_phone", "country_code", "encoded_account_id", "first_name", "last_name", "organization_name", "organization_phone", "state_code", "time_zone_id", "website"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UpdateAccountRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "encoded_account_id",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UpdateAccountRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "contact_email": obj.get("contact_email"),
+ "contact_phone": obj.get("contact_phone"),
+ "country_code": obj.get("country_code"),
+ "encoded_account_id": obj.get("encoded_account_id"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "organization_name": obj.get("organization_name"),
+ "organization_phone": obj.get("organization_phone"),
+ "state_code": obj.get("state_code"),
+ "time_zone_id": obj.get("time_zone_id"),
+ "website": obj.get("website")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/update_contact_request.py b/constant_contact_api_client/models/update_contact_request.py
new file mode 100644
index 0000000..094475e
--- /dev/null
+++ b/constant_contact_api_client/models/update_contact_request.py
@@ -0,0 +1,155 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from constant_contact_api_client.models.get_contact_by_id200_response_custom_fields_inner import GetContactById200ResponseCustomFieldsInner
+from constant_contact_api_client.models.get_contact_by_id200_response_notes_inner import GetContactById200ResponseNotesInner
+from constant_contact_api_client.models.update_contact_request_email_address import UpdateContactRequestEmailAddress
+from constant_contact_api_client.models.update_contact_request_phone_numbers_inner import UpdateContactRequestPhoneNumbersInner
+from constant_contact_api_client.models.update_contact_request_street_addresses_inner import UpdateContactRequestStreetAddressesInner
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UpdateContactRequest(BaseModel):
+ """
+ UpdateContactRequest
+ """ # noqa: E501
+ email_address: Optional[UpdateContactRequestEmailAddress] = None
+ first_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The contact's first name")
+ last_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The contact's last name")
+ job_title: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The contact's job title")
+ company_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="Name of the company the contact works for.")
+ birthday_month: Optional[StrictInt] = Field(default=None, description="Accepts values from 1-12; must be used with birthday_day
")
+ birthday_day: Optional[StrictInt] = Field(default=None, description="Accepts values from 1-31; must be used with birthday_month
")
+ anniversary: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, description="The anniversary date; Accepted formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D, MM-DD-YYYY, M-D-YYYY")
+ update_source: StrictStr = Field(description="Identifies who last updated the contact; valid values are Contact
or Account
.")
+ custom_fields: Optional[Annotated[List[GetContactById200ResponseCustomFieldsInner], Field(max_length=25)]] = Field(default=None, description="Array of up to 25 custom_field
subresources.")
+ phone_numbers: Optional[Annotated[List[UpdateContactRequestPhoneNumbersInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 phone_numbers
subresources.")
+ street_addresses: Optional[Annotated[List[UpdateContactRequestStreetAddressesInner], Field(max_length=3)]] = Field(default=None, description="Array of up to 3 street_addresses
subresources.")
+ list_memberships: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of up to 50 list_ids
to which the contact is subscribed.")
+ taggings: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(default=None, description="Array of tags (tag_id
) assigned to the contact, up to a maximum of 50.")
+ notes: Optional[Annotated[List[GetContactById200ResponseNotesInner], Field(max_length=150)]] = Field(default=None, description="An array of notes about the contact listed by most recent note first.")
+ __properties: ClassVar[List[str]] = ["email_address", "first_name", "last_name", "job_title", "company_name", "birthday_month", "birthday_day", "anniversary", "update_source", "custom_fields", "phone_numbers", "street_addresses", "list_memberships", "taggings", "notes"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UpdateContactRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of email_address
+ if self.email_address:
+ _dict['email_address'] = self.email_address.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list)
+ _items = []
+ if self.custom_fields:
+ for _item in self.custom_fields:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['custom_fields'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in phone_numbers (list)
+ _items = []
+ if self.phone_numbers:
+ for _item in self.phone_numbers:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['phone_numbers'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in street_addresses (list)
+ _items = []
+ if self.street_addresses:
+ for _item in self.street_addresses:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['street_addresses'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in notes (list)
+ _items = []
+ if self.notes:
+ for _item in self.notes:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['notes'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UpdateContactRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "email_address": UpdateContactRequestEmailAddress.from_dict(obj.get("email_address")) if obj.get("email_address") is not None else None,
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "job_title": obj.get("job_title"),
+ "company_name": obj.get("company_name"),
+ "birthday_month": obj.get("birthday_month"),
+ "birthday_day": obj.get("birthday_day"),
+ "anniversary": obj.get("anniversary"),
+ "update_source": obj.get("update_source"),
+ "custom_fields": [GetContactById200ResponseCustomFieldsInner.from_dict(_item) for _item in obj.get("custom_fields")] if obj.get("custom_fields") is not None else None,
+ "phone_numbers": [UpdateContactRequestPhoneNumbersInner.from_dict(_item) for _item in obj.get("phone_numbers")] if obj.get("phone_numbers") is not None else None,
+ "street_addresses": [UpdateContactRequestStreetAddressesInner.from_dict(_item) for _item in obj.get("street_addresses")] if obj.get("street_addresses") is not None else None,
+ "list_memberships": obj.get("list_memberships"),
+ "taggings": obj.get("taggings"),
+ "notes": [GetContactById200ResponseNotesInner.from_dict(_item) for _item in obj.get("notes")] if obj.get("notes") is not None else None
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/update_contact_request_email_address.py b/constant_contact_api_client/models/update_contact_request_email_address.py
new file mode 100644
index 0000000..24de458
--- /dev/null
+++ b/constant_contact_api_client/models/update_contact_request_email_address.py
@@ -0,0 +1,119 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UpdateContactRequestEmailAddress(BaseModel):
+ """
+ The contact's email address and related properties.
+ """ # noqa: E501
+ address: Annotated[str, Field(strict=True, max_length=80)] = Field(description="The email address of the contact. The email address must be unique for each contact.")
+ permission_to_send: Optional[StrictStr] = Field(default=None, description="Identifies the type of permission that the Constant Contact account has to send email to the contact. Types of permission: explicit, implicit, not_set, pending_confirmation, temp_hold, unsubscribed.")
+ created_at: Optional[datetime] = Field(default=None, description="Date and time that the email_address was created, in ISO-8601 format. System generated.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the email_address was last updated, in ISO-8601 format. System generated.")
+ opt_in_date: Optional[datetime] = Field(default=None, description="Date and time that the email_address was opted-in to receive email from the account, in ISO-8601 format. System generated.")
+ opt_out_source: Optional[StrictStr] = Field(default=None, description="Describes the source of the unsubscribed/opt-out action: either Account or Contact. If the Contact opted-out, then the account cannot send any campaigns to this contact until the contact opts back in. If the Account, then the account can add the contact back to any lists and send to them. Displayed only if contact has been unsubscribed/opt-out.")
+ opt_out_date: Optional[datetime] = Field(default=None, description="Date and time that the contact unsubscribed/opted-out of receiving email from the account, in ISO-8601 format. Displayed only if contact has been unsubscribed/opt-out. System generated.")
+ opt_out_reason: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The reason, as provided by the contact, that they unsubscribed/opted-out of receiving email campaigns.")
+ confirm_status: Optional[StrictStr] = Field(default=None, description="Indicates if the contact confirmed their email address after they subscribed to receive emails. Possible values: pending, confirmed, off.")
+ __properties: ClassVar[List[str]] = ["address", "permission_to_send", "created_at", "updated_at", "opt_in_date", "opt_out_source", "opt_out_date", "opt_out_reason", "confirm_status"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UpdateContactRequestEmailAddress from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "created_at",
+ "updated_at",
+ "opt_in_date",
+ "opt_out_source",
+ "opt_out_date",
+ "confirm_status",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UpdateContactRequestEmailAddress from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "address": obj.get("address"),
+ "permission_to_send": obj.get("permission_to_send"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "opt_in_date": obj.get("opt_in_date"),
+ "opt_out_source": obj.get("opt_out_source"),
+ "opt_out_date": obj.get("opt_out_date"),
+ "opt_out_reason": obj.get("opt_out_reason"),
+ "confirm_status": obj.get("confirm_status")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/update_contact_request_phone_numbers_inner.py b/constant_contact_api_client/models/update_contact_request_phone_numbers_inner.py
new file mode 100644
index 0000000..c2d8acd
--- /dev/null
+++ b/constant_contact_api_client/models/update_contact_request_phone_numbers_inner.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UpdateContactRequestPhoneNumbersInner(BaseModel):
+ """
+ UpdateContactRequestPhoneNumbersInner
+ """ # noqa: E501
+ phone_number: Optional[Annotated[str, Field(strict=True, max_length=25)]] = Field(default=None, description="The contact's phone number.")
+ kind: Optional[StrictStr] = Field(default=None, description="Identifies the type of phone number; valid values are home, work, mobile, or other.")
+ __properties: ClassVar[List[str]] = ["phone_number", "kind"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UpdateContactRequestPhoneNumbersInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UpdateContactRequestPhoneNumbersInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "phone_number": obj.get("phone_number"),
+ "kind": obj.get("kind")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/update_contact_request_street_addresses_inner.py b/constant_contact_api_client/models/update_contact_request_street_addresses_inner.py
new file mode 100644
index 0000000..19db15c
--- /dev/null
+++ b/constant_contact_api_client/models/update_contact_request_street_addresses_inner.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UpdateContactRequestStreetAddressesInner(BaseModel):
+ """
+ UpdateContactRequestStreetAddressesInner
+ """ # noqa: E501
+ kind: StrictStr = Field(description="Describes the type of address; valid values are home, work, or other.")
+ street: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Number and street of the address.")
+ city: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the city where the contact lives.")
+ state: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the state or province where the contact lives.")
+ postal_code: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The zip or postal code of the contact.")
+ country: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field(default=None, description="The name of the country where the contact lives.")
+ __properties: ClassVar[List[str]] = ["kind", "street", "city", "state", "postal_code", "country"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UpdateContactRequestStreetAddressesInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UpdateContactRequestStreetAddressesInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "kind": obj.get("kind"),
+ "street": obj.get("street"),
+ "city": obj.get("city"),
+ "state": obj.get("state"),
+ "postal_code": obj.get("postal_code"),
+ "country": obj.get("country")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/update_custom_field_request.py b/constant_contact_api_client/models/update_custom_field_request.py
new file mode 100644
index 0000000..57ffe8e
--- /dev/null
+++ b/constant_contact_api_client/models/update_custom_field_request.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UpdateCustomFieldRequest(BaseModel):
+ """
+ UpdateCustomFieldRequest
+ """ # noqa: E501
+ label: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The display name for the custom_field shown in the UI as free-form text")
+ type: StrictStr = Field(description="Specifies the type of value the custom_field field accepts: string or date.")
+ __properties: ClassVar[List[str]] = ["label", "type"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UpdateCustomFieldRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UpdateCustomFieldRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "label": obj.get("label"),
+ "type": obj.get("type")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/update_list200_response.py b/constant_contact_api_client/models/update_list200_response.py
new file mode 100644
index 0000000..5b58257
--- /dev/null
+++ b/constant_contact_api_client/models/update_list200_response.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UpdateList200Response(BaseModel):
+ """
+ UpdateList200Response
+ """ # noqa: E501
+ list_id: StrictStr = Field(description="Unique ID for the contact list")
+ name: StrictStr = Field(description="The name given to the contact list")
+ description: Optional[StrictStr] = Field(default=None, description="Text describing the list.")
+ favorite: Optional[StrictBool] = Field(default=False, description="Identifies whether or not the account has favorited the contact list.")
+ created_at: Optional[datetime] = Field(default=None, description="System generated date and time that the resource was created, in ISO-8601 format.")
+ updated_at: Optional[datetime] = Field(default=None, description="Date and time that the list was last updated, in ISO-8601 format. System generated.")
+ deleted_at: Optional[datetime] = Field(default=None, description="If the list was deleted, this property shows the date and time it was deleted, in ISO-8601 format. System generated.")
+ __properties: ClassVar[List[str]] = ["list_id", "name", "description", "favorite", "created_at", "updated_at", "deleted_at"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UpdateList200Response from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ * OpenAPI `readOnly` fields are excluded.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "list_id",
+ "created_at",
+ "updated_at",
+ "deleted_at",
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UpdateList200Response from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "list_id": obj.get("list_id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "favorite": obj.get("favorite") if obj.get("favorite") is not None else False,
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "deleted_at": obj.get("deleted_at")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/update_list_request.py b/constant_contact_api_client/models/update_list_request.py
new file mode 100644
index 0000000..ced2738
--- /dev/null
+++ b/constant_contact_api_client/models/update_list_request.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UpdateListRequest(BaseModel):
+ """
+ UpdateListRequest
+ """ # noqa: E501
+ name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The name given to the contact list")
+ favorite: Optional[StrictBool] = Field(default=False, description="Identifies whether or not the account has favorited the contact list.")
+ description: Optional[StrictStr] = Field(default=None, description="Text describing the list.")
+ __properties: ClassVar[List[str]] = ["name", "favorite", "description"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UpdateListRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UpdateListRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name"),
+ "favorite": obj.get("favorite") if obj.get("favorite") is not None else False,
+ "description": obj.get("description")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/update_segment_name_request.py b/constant_contact_api_client/models/update_segment_name_request.py
new file mode 100644
index 0000000..b80425f
--- /dev/null
+++ b/constant_contact_api_client/models/update_segment_name_request.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UpdateSegmentNameRequest(BaseModel):
+ """
+ UpdateSegmentNameRequest
+ """ # noqa: E501
+ name: StrictStr = Field(description="The segment's unique descriptive name.")
+ __properties: ClassVar[List[str]] = ["name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UpdateSegmentNameRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UpdateSegmentNameRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/webhooks_subscription_body.py b/constant_contact_api_client/models/webhooks_subscription_body.py
new file mode 100644
index 0000000..bcece6f
--- /dev/null
+++ b/constant_contact_api_client/models/webhooks_subscription_body.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class WebhooksSubscriptionBody(BaseModel):
+ """
+ WebhooksSubscriptionBody
+ """ # noqa: E501
+ hook_uri: Optional[StrictStr] = Field(default=None, description="The callback URI you would like to use to receive webhook notifications. Constant Contact will automatically send POST notifications about your chosen topic to this URI.")
+ __properties: ClassVar[List[str]] = ["hook_uri"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of WebhooksSubscriptionBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of WebhooksSubscriptionBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "hook_uri": obj.get("hook_uri")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/webhooks_subscription_collection_inner.py b/constant_contact_api_client/models/webhooks_subscription_collection_inner.py
new file mode 100644
index 0000000..1fe2663
--- /dev/null
+++ b/constant_contact_api_client/models/webhooks_subscription_collection_inner.py
@@ -0,0 +1,96 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class WebhooksSubscriptionCollectionInner(BaseModel):
+ """
+ WebhooksSubscriptionCollectionInner
+ """ # noqa: E501
+ topic_id: Optional[StrictInt] = Field(default=None, description="Identifies the topic using an integer to indicate the type of topic.")
+ hook_uri: Optional[StrictStr] = Field(default=None, description="Your webhook callback URI. Constant Contact automatically sends POST requests to this URI to notify you about the topic.")
+ topic_name: Optional[StrictStr] = Field(default=None, description="The name of the topic.")
+ topic_description: Optional[StrictStr] = Field(default=None, description="A description of what the topic is and when Constant Contact notifies you concerning it.")
+ __properties: ClassVar[List[str]] = ["topic_id", "hook_uri", "topic_name", "topic_description"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of WebhooksSubscriptionCollectionInner from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of WebhooksSubscriptionCollectionInner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "topic_id": obj.get("topic_id"),
+ "hook_uri": obj.get("hook_uri"),
+ "topic_name": obj.get("topic_name"),
+ "topic_description": obj.get("topic_description")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/webhooks_subscription_put_resp.py b/constant_contact_api_client/models/webhooks_subscription_put_resp.py
new file mode 100644
index 0000000..ba354da
--- /dev/null
+++ b/constant_contact_api_client/models/webhooks_subscription_put_resp.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class WebhooksSubscriptionPutResp(BaseModel):
+ """
+ WebhooksSubscriptionPutResp
+ """ # noqa: E501
+ topic_id: Optional[StrictInt] = Field(default=None, description="Identifies the topic using an integer to indicate the type of topic.")
+ hook_uri: Optional[StrictStr] = Field(default=None, description="Your webhook callback URI. Constant Contact automatically sends POST requests to this URI to notify you about the topic.")
+ __properties: ClassVar[List[str]] = ["topic_id", "hook_uri"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of WebhooksSubscriptionPutResp from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of WebhooksSubscriptionPutResp from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "topic_id": obj.get("topic_id"),
+ "hook_uri": obj.get("hook_uri")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/webhooks_subscription_response.py b/constant_contact_api_client/models/webhooks_subscription_response.py
new file mode 100644
index 0000000..ede2e3d
--- /dev/null
+++ b/constant_contact_api_client/models/webhooks_subscription_response.py
@@ -0,0 +1,96 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class WebhooksSubscriptionResponse(BaseModel):
+ """
+ WebhooksSubscriptionResponse
+ """ # noqa: E501
+ topic_id: Optional[StrictInt] = Field(default=None, description="Identifies the topic using an integer to indicate the type of topic.")
+ hook_uri: Optional[StrictStr] = Field(default=None, description="Your webhook callback URI. Constant Contact automatically sends POST requests to this URI to notify you about the topic.")
+ topic_name: Optional[StrictStr] = Field(default=None, description="The name of the topic.")
+ topic_description: Optional[StrictStr] = Field(default=None, description="A description of what the topic is and when Constant Contact notifies you concerning it.")
+ __properties: ClassVar[List[str]] = ["topic_id", "hook_uri", "topic_name", "topic_description"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of WebhooksSubscriptionResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of WebhooksSubscriptionResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "topic_id": obj.get("topic_id"),
+ "hook_uri": obj.get("hook_uri"),
+ "topic_name": obj.get("topic_name"),
+ "topic_description": obj.get("topic_description")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/models/webhooks_test_send.py b/constant_contact_api_client/models/webhooks_test_send.py
new file mode 100644
index 0000000..6f7d1d0
--- /dev/null
+++ b/constant_contact_api_client/models/webhooks_test_send.py
@@ -0,0 +1,96 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class WebhooksTestSend(BaseModel):
+ """
+ WebhooksTestSend
+ """ # noqa: E501
+ topic_id: Optional[StrictInt] = Field(default=None, description="Identifies the topic using an integer to indicate the type of topic.")
+ hook_uri: Optional[StrictStr] = Field(default=None, description="The webhook callback URI. Constant Contact automatically sends POST requests to this URI to notify you about the topic.")
+ topic_name: Optional[StrictStr] = Field(default=None, description="The name of the topic.")
+ topic_description: Optional[StrictStr] = Field(default=None, description="A description of what the topic is and when Constant Contact notifies you concerning it. When you use the test send API method, Constant Contact will immediately send a test event to you.")
+ __properties: ClassVar[List[str]] = ["topic_id", "hook_uri", "topic_name", "topic_description"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of WebhooksTestSend from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ },
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of WebhooksTestSend from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "topic_id": obj.get("topic_id"),
+ "hook_uri": obj.get("hook_uri"),
+ "topic_name": obj.get("topic_name"),
+ "topic_description": obj.get("topic_description")
+ })
+ return _obj
+
+
diff --git a/constant_contact_api_client/py.typed b/constant_contact_api_client/py.typed
new file mode 100644
index 0000000..e69de29
diff --git a/constant_contact_api_client/rest.py b/constant_contact_api_client/rest.py
new file mode 100644
index 0000000..beffe9d
--- /dev/null
+++ b/constant_contact_api_client/rest.py
@@ -0,0 +1,268 @@
+# coding: utf-8
+
+"""
+ Constant Contact API v3
+
+ Swagger build version 3.0.2475
+
+ The version of the OpenAPI document: 1.0.97
+ Contact: webservices@constantcontact.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import json
+import re
+import ssl
+
+import urllib3
+
+from constant_contact_api_client.exceptions import ApiException, ApiValueError
+
+SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"}
+RESTResponseType = urllib3.HTTPResponse
+
+
+def is_socks_proxy_url(url):
+ if url is None:
+ return False
+ split_section = url.split("://")
+ if len(split_section) < 2:
+ return False
+ else:
+ return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES
+
+
+class RESTResponse(io.IOBase):
+
+ def __init__(self, resp) -> None:
+ self.response = resp
+ self.status = resp.status
+ self.reason = resp.reason
+ self.data = None
+
+ def read(self):
+ if self.data is None:
+ self.data = self.response.data
+ return self.data
+
+ def getheaders(self):
+ """Returns a dictionary of the response headers."""
+ return self.response.headers
+
+ def getheader(self, name, default=None):
+ """Returns a given response header."""
+ return self.response.headers.get(name, default)
+
+
+class RESTClientObject:
+
+ def __init__(self, configuration) -> None:
+ # urllib3.PoolManager will pass all kw parameters to connectionpool
+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
+ # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
+
+ # cert_reqs
+ if configuration.verify_ssl:
+ cert_reqs = ssl.CERT_REQUIRED
+ else:
+ cert_reqs = ssl.CERT_NONE
+
+ addition_pool_args = {}
+ if configuration.assert_hostname is not None:
+ addition_pool_args['assert_hostname'] = (
+ configuration.assert_hostname
+ )
+
+ if configuration.retries is not None:
+ addition_pool_args['retries'] = configuration.retries
+
+ if configuration.tls_server_name:
+ addition_pool_args['server_hostname'] = configuration.tls_server_name
+
+
+ if configuration.socket_options is not None:
+ addition_pool_args['socket_options'] = configuration.socket_options
+
+ if configuration.connection_pool_maxsize is not None:
+ addition_pool_args['maxsize'] = configuration.connection_pool_maxsize
+
+ # https pool manager
+ if configuration.proxy:
+ if is_socks_proxy_url(configuration.proxy):
+ from urllib3.contrib.socks import SOCKSProxyManager
+ self.pool_manager = SOCKSProxyManager(
+ cert_reqs=cert_reqs,
+ ca_certs=configuration.ssl_ca_cert,
+ cert_file=configuration.cert_file,
+ key_file=configuration.key_file,
+ proxy_url=configuration.proxy,
+ headers=configuration.proxy_headers,
+ **addition_pool_args
+ )
+ else:
+ self.pool_manager = urllib3.ProxyManager(
+ cert_reqs=cert_reqs,
+ ca_certs=configuration.ssl_ca_cert,
+ cert_file=configuration.cert_file,
+ key_file=configuration.key_file,
+ proxy_url=configuration.proxy,
+ proxy_headers=configuration.proxy_headers,
+ **addition_pool_args
+ )
+ else:
+ self.pool_manager = urllib3.PoolManager(
+ cert_reqs=cert_reqs,
+ ca_certs=configuration.ssl_ca_cert,
+ cert_file=configuration.cert_file,
+ key_file=configuration.key_file,
+ **addition_pool_args
+ )
+
+ def request(
+ self,
+ method,
+ url,
+ headers=None,
+ body=None,
+ post_params=None,
+ _request_timeout=None
+ ):
+ """Perform requests.
+
+ :param method: http request method
+ :param url: http request url
+ :param headers: http request headers
+ :param body: request json body, for `application/json`
+ :param post_params: request post parameters,
+ `application/x-www-form-urlencoded`
+ and `multipart/form-data`
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ """
+ method = method.upper()
+ assert method in [
+ 'GET',
+ 'HEAD',
+ 'DELETE',
+ 'POST',
+ 'PUT',
+ 'PATCH',
+ 'OPTIONS'
+ ]
+
+ if post_params and body:
+ raise ApiValueError(
+ "body parameter cannot be used with post_params parameter."
+ )
+
+ post_params = post_params or {}
+ headers = headers or {}
+
+ timeout = None
+ if _request_timeout:
+ if isinstance(_request_timeout, (int, float)):
+ timeout = urllib3.Timeout(total=_request_timeout)
+ elif (
+ isinstance(_request_timeout, tuple)
+ and len(_request_timeout) == 2
+ ):
+ timeout = urllib3.Timeout(
+ connect=_request_timeout[0],
+ read=_request_timeout[1]
+ )
+
+ try:
+ # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
+ if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
+
+ # no content type provided or payload is json
+ content_type = headers.get('Content-Type')
+ if (
+ not content_type
+ or re.search('json', content_type, re.IGNORECASE)
+ ):
+ request_body = None
+ if body is not None:
+ request_body = json.dumps(body)
+ r = self.pool_manager.request(
+ method,
+ url,
+ body=request_body,
+ timeout=timeout,
+ headers=headers,
+ preload_content=False
+ )
+ elif content_type == 'application/x-www-form-urlencoded':
+ r = self.pool_manager.request(
+ method,
+ url,
+ fields=post_params,
+ encode_multipart=False,
+ timeout=timeout,
+ headers=headers,
+ preload_content=False
+ )
+ elif content_type == 'multipart/form-data':
+ # must del headers['Content-Type'], or the correct
+ # Content-Type which generated by urllib3 will be
+ # overwritten.
+ del headers['Content-Type']
+ r = self.pool_manager.request(
+ method,
+ url,
+ fields=post_params,
+ encode_multipart=True,
+ timeout=timeout,
+ headers=headers,
+ preload_content=False
+ )
+ # Pass a `string` parameter directly in the body to support
+ # other content types than Json when `body` argument is
+ # provided in serialized form
+ elif isinstance(body, str) or isinstance(body, bytes):
+ request_body = body
+ r = self.pool_manager.request(
+ method,
+ url,
+ body=request_body,
+ timeout=timeout,
+ headers=headers,
+ preload_content=False
+ )
+ elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool):
+ request_body = "true" if body else "false"
+ r = self.pool_manager.request(
+ method,
+ url,
+ body=request_body,
+ preload_content=False,
+ timeout=timeout,
+ headers=headers)
+ else:
+ # Cannot generate the request from given parameters
+ msg = """Cannot prepare a request message for provided
+ arguments. Please check that your arguments match
+ declared content type."""
+ raise ApiException(status=0, reason=msg)
+ # For `GET`, `HEAD`
+ else:
+ r = self.pool_manager.request(
+ method,
+ url,
+ fields={},
+ timeout=timeout,
+ headers=headers,
+ preload_content=False
+ )
+ except urllib3.exceptions.SSLError as e:
+ msg = "\n".join([type(e).__name__, str(e)])
+ raise ApiException(status=0, reason=msg)
+
+ return RESTResponse(r)
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..08d91b5
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,30 @@
+[tool.poetry]
+name = "constant_contact_api_client"
+version = "1.0.0"
+description = "Constant Contact API v3"
+authors = ["Constant Contact Public API