diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7ec4d1b..a487773 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index db5d998..17ccfed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,15 +5,48 @@ All notable changes to the library will be documented in this file.
The format of the file is based on [Keep a Changelog](http://keepachangelog.com/)
and this library adheres to [Semantic Versioning](http://semver.org/) as mentioned in [README.md][readme] file.
-## [Unreleased]
+## [ [5.0.0](https://github.com/infobip/infobip-api-python-client/releases/tag/5.0.0) ] - 2024-12-23
-⚠ IMPORTANT NOTE: From this point onward Python 3.7 is no longer supported. The minimum supported version is Python 3.8 due to dependency updates.
+🎉 **NEW Major Version of `infobip-api-python-client`.**
+
+⚠️ **IMPORTANT NOTE:** This release contains compile time breaking changes.
+All changes, including breaking changes, are addressed and explained in the list bellow.
+If you find out that something was not addressed properly, please submit an issue.
+
+From this point onward Python 3.7 is no longer supported. The minimum supported version is Python 3.8 due to dependency updates.
### Added
-- `calls.md` which contains examples and explanations for the Calls API.
-- `build.yml` workflow to ensure project build and test integrity.
-- `snyk.yml` workflow, which serves the purpose of identifying and addressing dependency vulnerabilities in the project.
-- `sonar.yml` workflow to analyze the source code, enhancing code quality and maintainability.
+* Most recent feature set for:
+ * [Infobip SMS API](https://www.infobip.com/docs/api/channels/sms)
+ * Introduced `/sms/3/messages (V3)` replacing the `/sms/2/text/advanced (V2)` and `/sms/2/binary/advanced (V2)` endpoints.
+ * Introduced `/sms/3/reports (V3)` replacing `/sms/1/reports (V1)` endpoint.
+ * Introduced `/sms/3/logs (V3)` replacing `/sms/1/logs (V1)` endpoint.
+ * [Infobip 2FA](https://www.infobip.com/docs/api/platform/2fa)
+ * [Infobip Voice API](https://www.infobip.com/docs/api/channels/voice)
+* Support for:
+ * [Infobip Moments API](https://www.infobip.com/docs/api/customer-engagement/moments).
+ * [Infobip Email API](https://www.infobip.com/docs/api/channels/email)
+* `calls.md` which contains examples and explanations for the Calls API.
+* `build.yml` workflow to ensure project build and test integrity.
+* `snyk.yml` workflow, which serves the purpose of identifying and addressing dependency vulnerabilities in the project.
+* `sonar.yml` workflow to analyze the source code, enhancing code quality and maintainability.
+
+### Changed
+* **Fixes and changes**
+ * Across all voice models, the 'applicationId' field has been removed and replaced with the `platform` field, as it better reflects the state of the endpoint.
+ * Introduced the new [sms_message](infobip_api_client/models/sms_message.py) class to replace `sms_textual_message` and `sms_binary_message`, providing a unified structure for SMS messaging.
+ * Added a content field within `sms_message` to define the message content. This supports both textual and binary messages, which can be created using [sms_text_content](infobip_api_client/models/sms_text_content.py) or [sms_binary_content](infobip_api_client/models/sms_binary_content.py), respectively.
+ * Unified request classes by replacing `sms_advaned_textual_request` and `sms_advaned_binary_request` with the new [sms_request](infobip_api_client/models/sms_request.py) class.
+ * Consolidated sending functions: use `send_sms_messages` instead of the `send_sms_message` and `send_binary_sms_message` functions.
+ * Removed delivery time window configuration classes (`sms_delivery_time_window`, `call_routing_allowed_time_window`, `calls_delivery_time_window`, `calls_time_window`) in favor of a unified class: [delivery_time_window](infobip_api_client/models/delivery_time_window.py)
+ * Removed delivery time configuration classes (`sms_delivery_time_to`, `sms_delivery_time_from`, `calls_time_windows_point`, `call_routing_allowed_time_from`, `call_routing_allowed_time_to`) in favor of a unified class: [delivery_time](infobip_api_client/models/delivery_time.py)
+ * Removed URL options configuration class (`sms_url_options`) in favor of a unified class: [url_options](infobip_api_client/models/url_options.py)
+ * Removed TurkeyIys options configuration class (`sms_turkey_iys_options`) in favor of a unified class: [turkey_iys_options](infobip_api_client/models/turkey_iys_options.py)
+ * Removed delivery day enumeration classes (`sms_delivery_day`, `calls_delivery_day`, `call_routing_allowed_day`) in favor of a unified class: [delivery_day](infobip_api_client/models/delivery_day.py)
+ * Removed speed limit time unit enumeration class (`sms_speed_limit_time_unit`) in favor of a unified class: [speed_limit_time_unit](infobip_api_client/models/speed_limit_time_unit.py)
+ * Renamed class from `calls_public_conference_recording` to `calls_conference_recording`.
+ * Renamed class from `calls_pegasus_provider` to `calls_provider`.
+ * Renamed class from `calls_pegasus_provider_trunk_type` to `calls_provider_trunk_type`.
### Security
- Bumped werkzeug dependency from `2.1.2` to `3.0.3`.
diff --git a/README.md b/README.md
index 4cb364c..efb2338 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+from infobip_api_client import SmsMessageContent
+
# Infobip API Python Client
@@ -24,19 +26,17 @@ We use [OpenAPI Generator](https://openapi-generator.tech/) to generate the pack
Detailed documentation about Infobip API can be found here. The current version of this library includes this subset of Infobip products:
* [SMS](https://www.infobip.com/docs/api/channels/sms)
- * [SMS Messaging](https://www.infobip.com/docs/api/channels/sms/sms-messaging)
- * [2FA](https://www.infobip.com/docs/api/channels/sms/2fa)
+* [2FA](https://www.infobip.com/docs/api/platform/2fa)
* [Voice](https://www.infobip.com/docs/api/channels/voice)
- * [Calls](https://www.infobip.com/docs/api/channels/voice/calls)
- * [Click To Call](https://www.infobip.com/docs/api/channels/voice/click-to-call)
- * [Call Routing](https://www.infobip.com/docs/api/channels/voice/routing)
+* [Moments](https://www.infobip.com/docs/api/customer-engagement/moments).
+* [Email](https://www.infobip.com/docs/api/channels/email)
## General Info
For `infobip-api-python-client` versioning we use [Semantic Versioning][semver] scheme.
Published under [MIT License][license].
-Python 3.7 is minimum supported version by this library.
+Python 3.8 is minimum supported version by this library.
## Installation
Pull the library by using the following command:
@@ -78,23 +78,23 @@ Here's a basic example of sending the SMS message.
from infobip_api_client.models import SmsAdvancedTextualRequest, SmsTextualMessage, SmsDestination, SmsResponse
from infobip_api_client.api.sms_api import SmsApi
- sms_request = SmsAdvancedTextualRequest(
+ sms_request = SmsRequest(
messages=[
- SmsTextualMessage(
+ SmsMessage(
destinations=[
SmsDestination(
to="41793026727",
),
],
- _from="SMSInfo",
- text="This is a dummy SMS message sent using Python library",
+ sender="InfoSMS",
+ content=SmsMessageContent(actual_instance=SmsTextContent(text="This is a dummy SMS message sent using Python library"))
)
]
)
api_instance = SmsApi(api_client)
- api_response: SmsResponse = api_instance.send_sms_message(sms_advanced_textual_request=sms_request)
+ api_response: SmsResponse = api_instance.send_sms_messages(sms_request=sms_request)
print(api_response)
```
@@ -103,7 +103,7 @@ To make your code more robust send the message in try block and handle the `ApiE
from infobip_api_client.exceptions import ApiException
try:
- api_response: SmsResponse = api_instance.send_sms_message(sms_advanced_textual_request=sms_request)
+ api_response: SmsResponse = api_instance.send_sms_messages(sms_request=sms_request)
except ApiException as ex:
print("Error occurred while trying to send SMS message.")
```
@@ -111,7 +111,7 @@ To make your code more robust send the message in try block and handle the `ApiE
In case of failure you can inspect the `ApiException` for more information.
```python
try:
- api_response: SmsResponse = api_instance.send_sms_message(sms_advanced_textual_request=sms_request)
+ api_response: SmsResponse = api_instance.send_sms_messages(sms_request=sms_request)
except ApiException as ex:
print("Error occurred while trying to send SMS message.")
print("Error status: %s\n" % ex.status)
@@ -198,12 +198,14 @@ For Calls quick start guide please check [these_examples](calls.md)
## Ask for help
-Feel free to open issues on the repository for any issue or feature request. As per pull requests, for details check the `CONTRIBUTING` [file][contributing] related to it - in short, we will not merge any pull requests, this code is auto-generated.
+Feel free to open issues on the repository for any encountered problem or feature request.
+
+If you want to contribute to this library in any way, please follow the guidelines in [CONTRIBUTING][contributing] file.
-If it's something that requires our imminent attention feel free to contact us @ [support@infobip.com](mailto:support@infobip.com).
+For anything that requires our imminent attention, contact us @ [support@infobip.com](mailto:support@infobip.com).
[apidocs]: https://www.infobip.com/docs/api
-[freetrial]: https://www.infobip.com/docs/freetrial
+[freetrial]: https://www.infobip.com/docs/essentials/getting-started/free-trial
[signup]: https://www.infobip.com/signup
[semver]: https://semver.org
[license]: LICENSE
diff --git a/infobip_api_client/__init__.py b/infobip_api_client/__init__.py
index b2343f6..9d819ab 100644
--- a/infobip_api_client/__init__.py
+++ b/infobip_api_client/__init__.py
@@ -14,15 +14,19 @@
Do not edit the class manually.
""" # noqa: E501
-
-__version__ = "4.0.0"
+__version__ = "5.0.0"
# import apis into sdk package
from infobip_api_client.api.call_routing_api import CallRoutingApi
from infobip_api_client.api.calls_api import CallsApi
from infobip_api_client.api.click_to_call_api import ClickToCallApi
+from infobip_api_client.api.email_api import EmailApi
+from infobip_api_client.api.flow_api import FlowApi
+from infobip_api_client.api.forms_api import FormsApi
+from infobip_api_client.api.number_masking_api import NumberMaskingApi
from infobip_api_client.api.sms_api import SmsApi
from infobip_api_client.api.tfa_api import TfaApi
+from infobip_api_client.api.voice_api import VoiceApi
# import ApiClient
from infobip_api_client.api_response import ApiResponse
@@ -42,6 +46,7 @@
from infobip_api_client.models.api_exception import ApiException
from infobip_api_client.models.api_request_error import ApiRequestError
from infobip_api_client.models.api_request_error_details import ApiRequestErrorDetails
+from infobip_api_client.models.basic_security_config import BasicSecurityConfig
from infobip_api_client.models.call import Call
from infobip_api_client.models.call_bulk_request import CallBulkRequest
from infobip_api_client.models.call_bulk_response import CallBulkResponse
@@ -57,25 +62,23 @@
from infobip_api_client.models.call_recording_page import CallRecordingPage
from infobip_api_client.models.call_recording_request import CallRecordingRequest
from infobip_api_client.models.call_request import CallRequest
-from infobip_api_client.models.call_routing_allowed_day import CallRoutingAllowedDay
-from infobip_api_client.models.call_routing_allowed_time_from import (
- CallRoutingAllowedTimeFrom,
-)
-from infobip_api_client.models.call_routing_allowed_time_to import (
- CallRoutingAllowedTimeTo,
-)
-from infobip_api_client.models.call_routing_allowed_time_window import (
- CallRoutingAllowedTimeWindow,
-)
from infobip_api_client.models.call_routing_criteria import CallRoutingCriteria
+from infobip_api_client.models.call_routing_criteria_type import CallRoutingCriteriaType
from infobip_api_client.models.call_routing_custom_data_entry import (
CallRoutingCustomDataEntry,
)
from infobip_api_client.models.call_routing_destination import CallRoutingDestination
+from infobip_api_client.models.call_routing_destination_type import (
+ CallRoutingDestinationType,
+)
from infobip_api_client.models.call_routing_endpoint import CallRoutingEndpoint
from infobip_api_client.models.call_routing_endpoint_destination import (
CallRoutingEndpointDestination,
)
+from infobip_api_client.models.call_routing_endpoint_destination_response import (
+ CallRoutingEndpointDestinationResponse,
+)
+from infobip_api_client.models.call_routing_endpoint_type import CallRoutingEndpointType
from infobip_api_client.models.call_routing_phone_criteria import (
CallRoutingPhoneCriteria,
)
@@ -105,6 +108,15 @@
from infobip_api_client.models.call_routing_url_destination import (
CallRoutingUrlDestination,
)
+from infobip_api_client.models.call_routing_url_destination_http_request import (
+ CallRoutingUrlDestinationHttpRequest,
+)
+from infobip_api_client.models.call_routing_url_destination_response import (
+ CallRoutingUrlDestinationResponse,
+)
+from infobip_api_client.models.call_routing_viber_endpoint import (
+ CallRoutingViberEndpoint,
+)
from infobip_api_client.models.call_routing_web_rtc_criteria import (
CallRoutingWebRTCCriteria,
)
@@ -114,6 +126,7 @@
from infobip_api_client.models.call_state import CallState
from infobip_api_client.models.call_transfer import CallTransfer
from infobip_api_client.models.call_voice import CallVoice
+from infobip_api_client.models.callback_response import CallbackResponse
from infobip_api_client.models.calls_action_call_request import CallsActionCallRequest
from infobip_api_client.models.calls_action_conference_request import (
CallsActionConferenceRequest,
@@ -126,11 +139,17 @@
from infobip_api_client.models.calls_add_new_call_request import CallsAddNewCallRequest
from infobip_api_client.models.calls_advanced_body import CallsAdvancedBody
from infobip_api_client.models.calls_advanced_message import CallsAdvancedMessage
+from infobip_api_client.models.calls_announcement_callee import CallsAnnouncementCallee
+from infobip_api_client.models.calls_announcement_caller import CallsAnnouncementCaller
+from infobip_api_client.models.calls_announcements import CallsAnnouncements
from infobip_api_client.models.calls_anonymization_type import CallsAnonymizationType
from infobip_api_client.models.calls_answer_request import CallsAnswerRequest
from infobip_api_client.models.calls_application_transfer_request import (
CallsApplicationTransferRequest,
)
+from infobip_api_client.models.calls_audio_callback_response import (
+ CallsAudioCallbackResponse,
+)
from infobip_api_client.models.calls_audio_codec import CallsAudioCodec
from infobip_api_client.models.calls_audio_media_properties import (
CallsAudioMediaProperties,
@@ -147,12 +166,22 @@
from infobip_api_client.models.calls_bulk_response import CallsBulkResponse
from infobip_api_client.models.calls_bulk_status import CallsBulkStatus
from infobip_api_client.models.calls_bulk_status_response import CallsBulkStatusResponse
+from infobip_api_client.models.calls_call_api import CallsCallApi
+from infobip_api_client.models.calls_call_api_options import CallsCallApiOptions
+from infobip_api_client.models.calls_capture import CallsCapture
+from infobip_api_client.models.calls_capture_dtmf_callback_response import (
+ CallsCaptureDtmfCallbackResponse,
+)
+from infobip_api_client.models.calls_case_object import CallsCaseObject
+from infobip_api_client.models.calls_cisco_webex_provider import CallsCiscoWebexProvider
from infobip_api_client.models.calls_click_to_call_message import (
CallsClickToCallMessage,
)
from infobip_api_client.models.calls_click_to_call_message_body import (
CallsClickToCallMessageBody,
)
+from infobip_api_client.models.calls_collect import CallsCollect
+from infobip_api_client.models.calls_collect_options import CallsCollectOptions
from infobip_api_client.models.calls_conference import CallsConference
from infobip_api_client.models.calls_conference_and_call import CallsConferenceAndCall
from infobip_api_client.models.calls_conference_broadcast_webrtc_text_request import (
@@ -161,11 +190,15 @@
from infobip_api_client.models.calls_conference_composition import (
CallsConferenceComposition,
)
+from infobip_api_client.models.calls_conference_log import CallsConferenceLog
from infobip_api_client.models.calls_conference_log_page import CallsConferenceLogPage
-from infobip_api_client.models.calls_conference_log_response import (
- CallsConferenceLogResponse,
-)
from infobip_api_client.models.calls_conference_page import CallsConferencePage
+from infobip_api_client.models.calls_conference_play_request import (
+ CallsConferencePlayRequest,
+)
+from infobip_api_client.models.calls_conference_recording import (
+ CallsConferenceRecording,
+)
from infobip_api_client.models.calls_conference_recording_log import (
CallsConferenceRecordingLog,
)
@@ -194,11 +227,25 @@
CallsCreateStaticSipTrunkResponse,
)
from infobip_api_client.models.calls_creation_method import CallsCreationMethod
-from infobip_api_client.models.calls_delivery_day import CallsDeliveryDay
-from infobip_api_client.models.calls_delivery_time import CallsDeliveryTime
-from infobip_api_client.models.calls_delivery_time_window import CallsDeliveryTimeWindow
from infobip_api_client.models.calls_destination import CallsDestination
from infobip_api_client.models.calls_detection_result import CallsDetectionResult
+from infobip_api_client.models.calls_dial import CallsDial
+from infobip_api_client.models.calls_dial_callback_response import (
+ CallsDialCallbackResponse,
+)
+from infobip_api_client.models.calls_dial_options import CallsDialOptions
+from infobip_api_client.models.calls_dial_to_conversations import (
+ CallsDialToConversations,
+)
+from infobip_api_client.models.calls_dial_to_conversations_data import (
+ CallsDialToConversationsData,
+)
+from infobip_api_client.models.calls_dial_to_conversations_options import (
+ CallsDialToConversationsOptions,
+)
+from infobip_api_client.models.calls_dial_to_many import CallsDialToMany
+from infobip_api_client.models.calls_dial_to_many_options import CallsDialToManyOptions
+from infobip_api_client.models.calls_dial_to_web_rtc import CallsDialToWebRTC
from infobip_api_client.models.calls_dialog_broadcast_webrtc_text_request import (
CallsDialogBroadcastWebrtcTextRequest,
)
@@ -220,6 +267,9 @@
from infobip_api_client.models.calls_dialog_recording_request import (
CallsDialogRecordingRequest,
)
+from infobip_api_client.models.calls_dialog_recording_response import (
+ CallsDialogRecordingResponse,
+)
from infobip_api_client.models.calls_dialog_request import CallsDialogRequest
from infobip_api_client.models.calls_dialog_response import CallsDialogResponse
from infobip_api_client.models.calls_dialog_say_request import CallsDialogSayRequest
@@ -228,6 +278,7 @@
CallsDialogWithExistingCallRequest,
)
from infobip_api_client.models.calls_dtmf_capture_request import CallsDtmfCaptureRequest
+from infobip_api_client.models.calls_dtmf_options import CallsDtmfOptions
from infobip_api_client.models.calls_dtmf_send_request import CallsDtmfSendRequest
from infobip_api_client.models.calls_dtmf_termination import CallsDtmfTermination
from infobip_api_client.models.calls_dtmf_type import CallsDtmfType
@@ -241,11 +292,33 @@
from infobip_api_client.models.calls_file_format import CallsFileFormat
from infobip_api_client.models.calls_file_page import CallsFilePage
from infobip_api_client.models.calls_file_play_content import CallsFilePlayContent
+from infobip_api_client.models.calls_for_each import CallsForEach
from infobip_api_client.models.calls_freshworks_provider import CallsFreshworksProvider
from infobip_api_client.models.calls_gender import CallsGender
+from infobip_api_client.models.calls_genesys_cloud_provider import (
+ CallsGenesysCloudProvider,
+)
+from infobip_api_client.models.calls_genesys_cloud_region import CallsGenesysCloudRegion
from infobip_api_client.models.calls_get_voices_response import CallsGetVoicesResponse
+from infobip_api_client.models.calls_go_to import CallsGoTo
+from infobip_api_client.models.calls_go_to_options import CallsGoToOptions
+from infobip_api_client.models.calls_hangup import CallsHangup
from infobip_api_client.models.calls_hangup_request import CallsHangupRequest
+from infobip_api_client.models.calls_hangup_source import CallsHangupSource
+from infobip_api_client.models.calls_http_method import CallsHttpMethod
+from infobip_api_client.models.calls_if_then_else import CallsIfThenElse
+from infobip_api_client.models.calls_ip_core_general_status import (
+ CallsIpCoreGeneralStatus,
+)
+from infobip_api_client.models.calls_ivr_data import CallsIvrData
+from infobip_api_client.models.calls_ivr_message import CallsIvrMessage
from infobip_api_client.models.calls_language import CallsLanguage
+from infobip_api_client.models.calls_launch_scenario_request import (
+ CallsLaunchScenarioRequest,
+)
+from infobip_api_client.models.calls_logs_report import CallsLogsReport
+from infobip_api_client.models.calls_logs_response import CallsLogsResponse
+from infobip_api_client.models.calls_machine_detection import CallsMachineDetection
from infobip_api_client.models.calls_machine_detection_properties import (
CallsMachineDetectionProperties,
)
@@ -267,43 +340,39 @@
CallsMediaStreamConfigResponse,
)
from infobip_api_client.models.calls_multi_body import CallsMultiBody
+from infobip_api_client.models.calls_multi_channel import CallsMultiChannel
from infobip_api_client.models.calls_multi_message import CallsMultiMessage
from infobip_api_client.models.calls_number_presentation_format import (
CallsNumberPresentationFormat,
)
+from infobip_api_client.models.calls_numbers import CallsNumbers
from infobip_api_client.models.calls_on_demand_composition import (
CallsOnDemandComposition,
)
from infobip_api_client.models.calls_participant import CallsParticipant
from infobip_api_client.models.calls_participant_session import CallsParticipantSession
from infobip_api_client.models.calls_participant_state import CallsParticipantState
-from infobip_api_client.models.calls_pegasus_provider import CallsPegasusProvider
-from infobip_api_client.models.calls_pegasus_provider_trunk_type import (
- CallsPegasusProviderTrunkType,
-)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
+from infobip_api_client.models.calls_pause import CallsPause
from infobip_api_client.models.calls_phone_endpoint import CallsPhoneEndpoint
+from infobip_api_client.models.calls_play import CallsPlay
from infobip_api_client.models.calls_play_content import CallsPlayContent
+from infobip_api_client.models.calls_play_content_type import CallsPlayContentType
+from infobip_api_client.models.calls_play_from_recording import CallsPlayFromRecording
from infobip_api_client.models.calls_play_request import CallsPlayRequest
from infobip_api_client.models.calls_pre_answer_request import CallsPreAnswerRequest
+from infobip_api_client.models.calls_price import CallsPrice
+from infobip_api_client.models.calls_provider import CallsProvider
from infobip_api_client.models.calls_provider_sip_trunk_request import (
CallsProviderSipTrunkRequest,
)
-from infobip_api_client.models.calls_public_call_recording import (
- CallsPublicCallRecording,
+from infobip_api_client.models.calls_provider_sip_trunk_response import (
+ CallsProviderSipTrunkResponse,
)
-from infobip_api_client.models.calls_public_conference_recording import (
- CallsPublicConferenceRecording,
+from infobip_api_client.models.calls_provider_sip_trunk_update_request import (
+ CallsProviderSipTrunkUpdateRequest,
)
+from infobip_api_client.models.calls_provider_trunk_type import CallsProviderTrunkType
from infobip_api_client.models.calls_public_country import CallsPublicCountry
-from infobip_api_client.models.calls_public_dialog_recording import (
- CallsPublicDialogRecording,
-)
-from infobip_api_client.models.calls_public_recording_file import (
- CallsPublicRecordingFile,
-)
from infobip_api_client.models.calls_public_region import CallsPublicRegion
from infobip_api_client.models.calls_public_sip_trunk_service_address import (
CallsPublicSipTrunkServiceAddress,
@@ -311,10 +380,18 @@
from infobip_api_client.models.calls_public_sip_trunk_service_address_request import (
CallsPublicSipTrunkServiceAddressRequest,
)
+from infobip_api_client.models.calls_record import CallsRecord
+from infobip_api_client.models.calls_record_options import CallsRecordOptions
+from infobip_api_client.models.calls_recorded_audio_files_response import (
+ CallsRecordedAudioFilesResponse,
+)
+from infobip_api_client.models.calls_recorded_ivr_file import CallsRecordedIvrFile
+from infobip_api_client.models.calls_recording import CallsRecording
from infobip_api_client.models.calls_recording_file import CallsRecordingFile
from infobip_api_client.models.calls_recording_file_location import (
CallsRecordingFileLocation,
)
+from infobip_api_client.models.calls_recording_location import CallsRecordingLocation
from infobip_api_client.models.calls_recording_play_content import (
CallsRecordingPlayContent,
)
@@ -334,14 +411,27 @@
from infobip_api_client.models.calls_registered_sip_trunk_update_request import (
CallsRegisteredSipTrunkUpdateRequest,
)
+from infobip_api_client.models.calls_repeat_until import CallsRepeatUntil
+from infobip_api_client.models.calls_repeat_while import CallsRepeatWhile
+from infobip_api_client.models.calls_report import CallsReport
+from infobip_api_client.models.calls_report_response import CallsReportResponse
from infobip_api_client.models.calls_reschedule_request import CallsRescheduleRequest
from infobip_api_client.models.calls_retry import CallsRetry
from infobip_api_client.models.calls_retry_options import CallsRetryOptions
+from infobip_api_client.models.calls_say import CallsSay
+from infobip_api_client.models.calls_say_options import CallsSayOptions
from infobip_api_client.models.calls_say_request import CallsSayRequest
from infobip_api_client.models.calls_sbc_hosts import CallsSbcHosts
from infobip_api_client.models.calls_scheduling_options import CallsSchedulingOptions
+from infobip_api_client.models.calls_script_inner import CallsScriptInner
+from infobip_api_client.models.calls_search_response import CallsSearchResponse
from infobip_api_client.models.calls_selection_strategy import CallsSelectionStrategy
+from infobip_api_client.models.calls_send_sms import CallsSendSms
+from infobip_api_client.models.calls_send_sms_data import CallsSendSmsData
+from infobip_api_client.models.calls_send_to_reports import CallsSendToReports
from infobip_api_client.models.calls_sending_speed import CallsSendingSpeed
+from infobip_api_client.models.calls_set_variable import CallsSetVariable
+from infobip_api_client.models.calls_sftp_upload_status import CallsSftpUploadStatus
from infobip_api_client.models.calls_single_body import CallsSingleBody
from infobip_api_client.models.calls_single_message_status import (
CallsSingleMessageStatus,
@@ -359,6 +449,9 @@
)
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
from infobip_api_client.models.calls_sip_trunk_page import CallsSipTrunkPage
+from infobip_api_client.models.calls_sip_trunk_registration_credentials import (
+ CallsSipTrunkRegistrationCredentials,
+)
from infobip_api_client.models.calls_sip_trunk_registration_status import (
CallsSipTrunkRegistrationStatus,
)
@@ -373,15 +466,20 @@
from infobip_api_client.models.calls_sip_trunk_status_response import (
CallsSipTrunkStatusResponse,
)
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from infobip_api_client.models.calls_sip_trunk_update_request import (
CallsSipTrunkUpdateRequest,
)
from infobip_api_client.models.calls_speech_capture_request import (
CallsSpeechCaptureRequest,
)
+from infobip_api_client.models.calls_speech_options import CallsSpeechOptions
from infobip_api_client.models.calls_start_media_stream_request import (
CallsStartMediaStreamRequest,
)
+from infobip_api_client.models.calls_start_transcription_request import (
+ CallsStartTranscriptionRequest,
+)
from infobip_api_client.models.calls_static_sip_trunk_request import (
CallsStaticSipTrunkRequest,
)
@@ -393,82 +491,290 @@
)
from infobip_api_client.models.calls_status import CallsStatus
from infobip_api_client.models.calls_stop_play_request import CallsStopPlayRequest
+from infobip_api_client.models.calls_switch_case import CallsSwitchCase
+from infobip_api_client.models.calls_tag_identifier_type import CallsTagIdentifierType
from infobip_api_client.models.calls_termination import CallsTermination
from infobip_api_client.models.calls_termination_type import CallsTerminationType
from infobip_api_client.models.calls_text_play_content import CallsTextPlayContent
-from infobip_api_client.models.calls_time_window import CallsTimeWindow
-from infobip_api_client.models.calls_time_window_point import CallsTimeWindowPoint
+from infobip_api_client.models.calls_time_unit import CallsTimeUnit
+from infobip_api_client.models.calls_transcription import CallsTranscription
from infobip_api_client.models.calls_update_request import CallsUpdateRequest
+from infobip_api_client.models.calls_update_scenario_request import (
+ CallsUpdateScenarioRequest,
+)
+from infobip_api_client.models.calls_update_scenario_response import (
+ CallsUpdateScenarioResponse,
+)
from infobip_api_client.models.calls_update_status_request import (
CallsUpdateStatusRequest,
)
from infobip_api_client.models.calls_url_play_content import CallsUrlPlayContent
-from infobip_api_client.models.calls_url_security_config_type import (
- CallsUrlSecurityConfigType,
-)
from infobip_api_client.models.calls_viber_endpoint import CallsViberEndpoint
from infobip_api_client.models.calls_video_media_properties import (
CallsVideoMediaProperties,
)
from infobip_api_client.models.calls_voice import CallsVoice
+from infobip_api_client.models.calls_voice_data import CallsVoiceData
+from infobip_api_client.models.calls_voice_error import CallsVoiceError
+from infobip_api_client.models.calls_voice_options import CallsVoiceOptions
from infobip_api_client.models.calls_voice_preferences import CallsVoicePreferences
from infobip_api_client.models.calls_voice_response import CallsVoiceResponse
from infobip_api_client.models.calls_voice_response_details import (
CallsVoiceResponseDetails,
)
from infobip_api_client.models.calls_web_rtc_endpoint import CallsWebRtcEndpoint
+from infobip_api_client.models.calls_while_do import CallsWhileDo
+from infobip_api_client.models.delivery_day import DeliveryDay
+from infobip_api_client.models.delivery_time import DeliveryTime
+from infobip_api_client.models.delivery_time_window import DeliveryTimeWindow
+from infobip_api_client.models.email_add_delete_suppression_type import (
+ EmailAddDeleteSuppressionType,
+)
+from infobip_api_client.models.email_add_domain_request import EmailAddDomainRequest
+from infobip_api_client.models.email_add_suppression import EmailAddSuppression
+from infobip_api_client.models.email_add_suppression_request import (
+ EmailAddSuppressionRequest,
+)
+from infobip_api_client.models.email_all_domains_response import EmailAllDomainsResponse
+from infobip_api_client.models.email_bulk_info import EmailBulkInfo
+from infobip_api_client.models.email_bulk_reschedule_request import (
+ EmailBulkRescheduleRequest,
+)
+from infobip_api_client.models.email_bulk_reschedule_response import (
+ EmailBulkRescheduleResponse,
+)
+from infobip_api_client.models.email_bulk_schedule_response import (
+ EmailBulkScheduleResponse,
+)
+from infobip_api_client.models.email_bulk_status import EmailBulkStatus
+from infobip_api_client.models.email_bulk_status_info import EmailBulkStatusInfo
+from infobip_api_client.models.email_bulk_status_response import EmailBulkStatusResponse
+from infobip_api_client.models.email_bulk_update_status_request import (
+ EmailBulkUpdateStatusRequest,
+)
+from infobip_api_client.models.email_bulk_update_status_response import (
+ EmailBulkUpdateStatusResponse,
+)
+from infobip_api_client.models.email_delete_suppression import EmailDeleteSuppression
+from infobip_api_client.models.email_delete_suppression_request import (
+ EmailDeleteSuppressionRequest,
+)
+from infobip_api_client.models.email_dns_record_response import EmailDnsRecordResponse
+from infobip_api_client.models.email_domain_access import EmailDomainAccess
+from infobip_api_client.models.email_domain_info import EmailDomainInfo
+from infobip_api_client.models.email_domain_info_page_response import (
+ EmailDomainInfoPageResponse,
+)
+from infobip_api_client.models.email_domain_ip import EmailDomainIp
+from infobip_api_client.models.email_domain_ip_pool import EmailDomainIpPool
+from infobip_api_client.models.email_domain_ip_pool_assign_request import (
+ EmailDomainIpPoolAssignRequest,
+)
+from infobip_api_client.models.email_domain_ip_pool_update_request import (
+ EmailDomainIpPoolUpdateRequest,
+)
+from infobip_api_client.models.email_domain_ip_request import EmailDomainIpRequest
+from infobip_api_client.models.email_domain_ip_response import EmailDomainIpResponse
+from infobip_api_client.models.email_domain_response import EmailDomainResponse
+from infobip_api_client.models.email_get_suppression_type import EmailGetSuppressionType
+from infobip_api_client.models.email_ip_detail_response import EmailIpDetailResponse
+from infobip_api_client.models.email_ip_domain_response import EmailIpDomainResponse
+from infobip_api_client.models.email_ip_pool_assign_ip_request import (
+ EmailIpPoolAssignIpRequest,
+)
+from infobip_api_client.models.email_ip_pool_create_request import (
+ EmailIpPoolCreateRequest,
+)
+from infobip_api_client.models.email_ip_pool_detail_response import (
+ EmailIpPoolDetailResponse,
+)
+from infobip_api_client.models.email_ip_pool_response import EmailIpPoolResponse
+from infobip_api_client.models.email_ip_response import EmailIpResponse
+from infobip_api_client.models.email_log import EmailLog
+from infobip_api_client.models.email_logs_response import EmailLogsResponse
+from infobip_api_client.models.email_page_details import EmailPageDetails
+from infobip_api_client.models.email_paging import EmailPaging
+from infobip_api_client.models.email_report import EmailReport
+from infobip_api_client.models.email_reports_result import EmailReportsResult
+from infobip_api_client.models.email_response_details import EmailResponseDetails
+from infobip_api_client.models.email_return_path_address_request import (
+ EmailReturnPathAddressRequest,
+)
+from infobip_api_client.models.email_send_response import EmailSendResponse
+from infobip_api_client.models.email_simple_api_response import EmailSimpleApiResponse
+from infobip_api_client.models.email_suppression_info import EmailSuppressionInfo
+from infobip_api_client.models.email_suppression_info_page_response import (
+ EmailSuppressionInfoPageResponse,
+)
+from infobip_api_client.models.email_tracking_event_request import (
+ EmailTrackingEventRequest,
+)
+from infobip_api_client.models.email_tracking_response import EmailTrackingResponse
+from infobip_api_client.models.email_validation_request import EmailValidationRequest
+from infobip_api_client.models.email_validation_response import EmailValidationResponse
+from infobip_api_client.models.email_webhook_dlr_report_response import (
+ EmailWebhookDLRReportResponse,
+)
+from infobip_api_client.models.email_webhook_delivery_report import (
+ EmailWebhookDeliveryReport,
+)
+from infobip_api_client.models.email_webhook_geo_location import EmailWebhookGeoLocation
+from infobip_api_client.models.email_webhook_recipient_info import (
+ EmailWebhookRecipientInfo,
+)
+from infobip_api_client.models.email_webhook_track_report import EmailWebhookTrackReport
+from infobip_api_client.models.email_webhook_track_response import (
+ EmailWebhookTrackResponse,
+)
+from infobip_api_client.models.flow_add_flow_participant_result import (
+ FlowAddFlowParticipantResult,
+)
+from infobip_api_client.models.flow_add_flow_participant_status import (
+ FlowAddFlowParticipantStatus,
+)
+from infobip_api_client.models.flow_add_flow_participants_request import (
+ FlowAddFlowParticipantsRequest,
+)
+from infobip_api_client.models.flow_add_flow_participants_response import (
+ FlowAddFlowParticipantsResponse,
+)
+from infobip_api_client.models.flow_api_exception import FlowApiException
+from infobip_api_client.models.flow_api_request_error import FlowApiRequestError
+from infobip_api_client.models.flow_api_request_error_details import (
+ FlowApiRequestErrorDetails,
+)
+from infobip_api_client.models.flow_common_ott_contact import FlowCommonOttContact
+from infobip_api_client.models.flow_common_push_contact import FlowCommonPushContact
+from infobip_api_client.models.flow_email_contact import FlowEmailContact
+from infobip_api_client.models.flow_error_status_reason import FlowErrorStatusReason
+from infobip_api_client.models.flow_exception_response import FlowExceptionResponse
+from infobip_api_client.models.flow_gender import FlowGender
+from infobip_api_client.models.flow_integrations import FlowIntegrations
+from infobip_api_client.models.flow_origin import FlowOrigin
+from infobip_api_client.models.flow_participant import FlowParticipant
+from infobip_api_client.models.flow_participants_report_response import (
+ FlowParticipantsReportResponse,
+)
+from infobip_api_client.models.flow_person import FlowPerson
+from infobip_api_client.models.flow_person_contacts import FlowPersonContacts
+from infobip_api_client.models.flow_person_unique_field import FlowPersonUniqueField
+from infobip_api_client.models.flow_person_unique_field_type import (
+ FlowPersonUniqueFieldType,
+)
+from infobip_api_client.models.flow_phone_contact import FlowPhoneContact
+from infobip_api_client.models.flow_push_contact import FlowPushContact
+from infobip_api_client.models.flow_salesforce import FlowSalesforce
+from infobip_api_client.models.flow_type import FlowType
+from infobip_api_client.models.forms_action_after_submission import (
+ FormsActionAfterSubmission,
+)
+from infobip_api_client.models.forms_action_after_submission_type import (
+ FormsActionAfterSubmissionType,
+)
+from infobip_api_client.models.forms_component_type import FormsComponentType
+from infobip_api_client.models.forms_element import FormsElement
+from infobip_api_client.models.forms_element_option import FormsElementOption
+from infobip_api_client.models.forms_exception import FormsException
+from infobip_api_client.models.forms_request_error import FormsRequestError
+from infobip_api_client.models.forms_request_error_details import (
+ FormsRequestErrorDetails,
+)
+from infobip_api_client.models.forms_response import FormsResponse
+from infobip_api_client.models.forms_response_content import FormsResponseContent
+from infobip_api_client.models.forms_status import FormsStatus
+from infobip_api_client.models.forms_status_response import FormsStatusResponse
+from infobip_api_client.models.forms_type import FormsType
+from infobip_api_client.models.forms_validation_rules import FormsValidationRules
+from infobip_api_client.models.hmac_algorithm import HmacAlgorithm
+from infobip_api_client.models.hmac_security_config import HmacSecurityConfig
+from infobip_api_client.models.iys_recipient_type import IysRecipientType
from infobip_api_client.models.message_error import MessageError
+from infobip_api_client.models.message_general_status import MessageGeneralStatus
from infobip_api_client.models.message_price import MessagePrice
from infobip_api_client.models.message_status import MessageStatus
-from infobip_api_client.models.page_info import PageInfo
-from infobip_api_client.models.security_config import SecurityConfig
-from infobip_api_client.models.security_config_type import SecurityConfigType
-from infobip_api_client.models.sms_advanced_binary_request import (
- SmsAdvancedBinaryRequest,
+from infobip_api_client.models.number_masking_callback_request import (
+ NumberMaskingCallbackRequest,
+)
+from infobip_api_client.models.number_masking_credentials_body import (
+ NumberMaskingCredentialsBody,
)
-from infobip_api_client.models.sms_advanced_textual_request import (
- SmsAdvancedTextualRequest,
+from infobip_api_client.models.number_masking_credentials_response import (
+ NumberMaskingCredentialsResponse,
)
+from infobip_api_client.models.number_masking_recording_status import (
+ NumberMaskingRecordingStatus,
+)
+from infobip_api_client.models.number_masking_setup_body import NumberMaskingSetupBody
+from infobip_api_client.models.number_masking_setup_response import (
+ NumberMaskingSetupResponse,
+)
+from infobip_api_client.models.number_masking_status_request import (
+ NumberMaskingStatusRequest,
+)
+from infobip_api_client.models.number_masking_upload_body import NumberMaskingUploadBody
+from infobip_api_client.models.number_masking_upload_response import (
+ NumberMaskingUploadResponse,
+)
+from infobip_api_client.models.page_info import PageInfo
+from infobip_api_client.models.platform import Platform
+from infobip_api_client.models.ringback_generation import RingbackGeneration
+from infobip_api_client.models.security_config import SecurityConfig
from infobip_api_client.models.sms_binary_content import SmsBinaryContent
-from infobip_api_client.models.sms_binary_message import SmsBinaryMessage
from infobip_api_client.models.sms_bulk_request import SmsBulkRequest
from infobip_api_client.models.sms_bulk_response import SmsBulkResponse
from infobip_api_client.models.sms_bulk_status import SmsBulkStatus
from infobip_api_client.models.sms_bulk_status_response import SmsBulkStatusResponse
-from infobip_api_client.models.sms_delivery_day import SmsDeliveryDay
+from infobip_api_client.models.sms_delivery_report import SmsDeliveryReport
from infobip_api_client.models.sms_delivery_result import SmsDeliveryResult
-from infobip_api_client.models.sms_delivery_time_from import SmsDeliveryTimeFrom
-from infobip_api_client.models.sms_delivery_time_to import SmsDeliveryTimeTo
-from infobip_api_client.models.sms_delivery_time_window import SmsDeliveryTimeWindow
from infobip_api_client.models.sms_destination import SmsDestination
from infobip_api_client.models.sms_inbound_message import SmsInboundMessage
from infobip_api_client.models.sms_inbound_message_result import SmsInboundMessageResult
from infobip_api_client.models.sms_india_dlt_options import SmsIndiaDltOptions
from infobip_api_client.models.sms_language import SmsLanguage
+from infobip_api_client.models.sms_language_code import SmsLanguageCode
from infobip_api_client.models.sms_language_configuration import (
SmsLanguageConfiguration,
)
from infobip_api_client.models.sms_log import SmsLog
+from infobip_api_client.models.sms_message_content import SmsMessageContent
from infobip_api_client.models.sms_logs_response import SmsLogsResponse
+from infobip_api_client.models.sms_message import SmsMessage
+from infobip_api_client.models.sms_message_delivery_reporting import (
+ SmsMessageDeliveryReporting,
+)
+from infobip_api_client.models.sms_message_error import SmsMessageError
+from infobip_api_client.models.sms_message_error_group import SmsMessageErrorGroup
+from infobip_api_client.models.sms_message_options import SmsMessageOptions
+from infobip_api_client.models.sms_message_request_options import (
+ SmsMessageRequestOptions,
+)
+from infobip_api_client.models.sms_message_response_details import (
+ SmsMessageResponseDetails,
+)
+from infobip_api_client.models.sms_message_status import SmsMessageStatus
from infobip_api_client.models.sms_preview import SmsPreview
+from infobip_api_client.models.sms_preview_language import SmsPreviewLanguage
from infobip_api_client.models.sms_preview_request import SmsPreviewRequest
from infobip_api_client.models.sms_preview_response import SmsPreviewResponse
from infobip_api_client.models.sms_regional_options import SmsRegionalOptions
-from infobip_api_client.models.sms_report import SmsReport
+from infobip_api_client.models.sms_request import SmsRequest
+from infobip_api_client.models.sms_request_scheduling_settings import (
+ SmsRequestSchedulingSettings,
+)
from infobip_api_client.models.sms_response import SmsResponse
from infobip_api_client.models.sms_response_details import SmsResponseDetails
from infobip_api_client.models.sms_sending_speed_limit import SmsSendingSpeedLimit
from infobip_api_client.models.sms_south_korea_options import SmsSouthKoreaOptions
-from infobip_api_client.models.sms_speed_limit_time_unit import SmsSpeedLimitTimeUnit
-from infobip_api_client.models.sms_textual_message import SmsTextualMessage
+from infobip_api_client.models.sms_text_content import SmsTextContent
from infobip_api_client.models.sms_tracking import SmsTracking
-from infobip_api_client.models.sms_turkey_iys_options import SmsTurkeyIysOptions
+from infobip_api_client.models.sms_transliteration_code import SmsTransliterationCode
from infobip_api_client.models.sms_update_status_request import SmsUpdateStatusRequest
-from infobip_api_client.models.sms_url_options import SmsUrlOptions
from infobip_api_client.models.sms_webhook_inbound_report import SmsWebhookInboundReport
from infobip_api_client.models.sms_webhook_inbound_report_response import (
SmsWebhookInboundReportResponse,
)
+from infobip_api_client.models.sms_webhooks import SmsWebhooks
+from infobip_api_client.models.speed_limit_time_unit import SpeedLimitTimeUnit
from infobip_api_client.models.tfa_application_configuration import (
TfaApplicationConfiguration,
)
@@ -506,3 +812,9 @@
from infobip_api_client.models.tfa_verification_response import TfaVerificationResponse
from infobip_api_client.models.tfa_verify_pin_request import TfaVerifyPinRequest
from infobip_api_client.models.tfa_verify_pin_response import TfaVerifyPinResponse
+from infobip_api_client.models.turkey_iys_options import TurkeyIysOptions
+from infobip_api_client.models.url_options import UrlOptions
+from infobip_api_client.models.url_security_config_type import UrlSecurityConfigType
+from infobip_api_client.models.validity_period import ValidityPeriod
+from infobip_api_client.models.validity_period_time_unit import ValidityPeriodTimeUnit
+from infobip_api_client.models.webhook_message_count import WebhookMessageCount
diff --git a/infobip_api_client/api/__init__.py b/infobip_api_client/api/__init__.py
index 19db9a3..ab92dc8 100644
--- a/infobip_api_client/api/__init__.py
+++ b/infobip_api_client/api/__init__.py
@@ -4,5 +4,10 @@
from infobip_api_client.api.call_routing_api import CallRoutingApi
from infobip_api_client.api.calls_api import CallsApi
from infobip_api_client.api.click_to_call_api import ClickToCallApi
+from infobip_api_client.api.email_api import EmailApi
+from infobip_api_client.api.flow_api import FlowApi
+from infobip_api_client.api.forms_api import FormsApi
+from infobip_api_client.api.number_masking_api import NumberMaskingApi
from infobip_api_client.api.sms_api import SmsApi
from infobip_api_client.api.tfa_api import TfaApi
+from infobip_api_client.api.voice_api import VoiceApi
diff --git a/infobip_api_client/api/call_routing_api.py b/infobip_api_client/api/call_routing_api.py
index 9c6c2e5..1d4ee99 100644
--- a/infobip_api_client/api/call_routing_api.py
+++ b/infobip_api_client/api/call_routing_api.py
@@ -11,7 +11,6 @@
Do not edit the class manually.
""" # noqa: E501
-
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
@@ -101,6 +100,7 @@ def create_call_route(
"201": "CallRoutingRouteResponse",
"400": "ApiError",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -170,6 +170,7 @@ def create_call_route_with_http_info(
"201": "CallRoutingRouteResponse",
"400": "ApiError",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -239,6 +240,7 @@ def create_call_route_without_preload_content(
"201": "CallRoutingRouteResponse",
"400": "ApiError",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -364,6 +366,7 @@ def delete_call_route(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallRoutingRouteResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiError",
"429": "ApiException",
"500": "ApiException",
@@ -433,6 +436,7 @@ def delete_call_route_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallRoutingRouteResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiError",
"429": "ApiException",
"500": "ApiException",
@@ -502,6 +506,7 @@ def delete_call_route_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallRoutingRouteResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiError",
"429": "ApiException",
"500": "ApiException",
@@ -618,7 +623,7 @@ def get_call_route(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallRoutingRouteResponse",
"401": "ApiException",
- "403": "ApiError",
+ "403": "ApiException",
"404": "ApiError",
"429": "ApiException",
"500": "ApiException",
@@ -688,7 +693,7 @@ def get_call_route_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallRoutingRouteResponse",
"401": "ApiException",
- "403": "ApiError",
+ "403": "ApiException",
"404": "ApiError",
"429": "ApiException",
"500": "ApiException",
@@ -758,7 +763,7 @@ def get_call_route_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallRoutingRouteResponse",
"401": "ApiException",
- "403": "ApiError",
+ "403": "ApiException",
"404": "ApiError",
"429": "ApiException",
"500": "ApiException",
@@ -886,6 +891,7 @@ def get_call_routes(
"200": "CallRoutingRouteResponsePage",
"400": "ApiError",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -965,6 +971,7 @@ def get_call_routes_with_http_info(
"200": "CallRoutingRouteResponsePage",
"400": "ApiError",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -1044,6 +1051,7 @@ def get_call_routes_without_preload_content(
"200": "CallRoutingRouteResponsePage",
"400": "ApiError",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -1171,7 +1179,7 @@ def update_call_route(
"200": "CallRoutingRouteResponse",
"400": "ApiError",
"401": "ApiException",
- "403": "ApiError",
+ "403": "ApiException",
"404": "ApiError",
"429": "ApiException",
"500": "ApiException",
@@ -1246,7 +1254,7 @@ def update_call_route_with_http_info(
"200": "CallRoutingRouteResponse",
"400": "ApiError",
"401": "ApiException",
- "403": "ApiError",
+ "403": "ApiException",
"404": "ApiError",
"429": "ApiException",
"500": "ApiException",
@@ -1321,7 +1329,7 @@ def update_call_route_without_preload_content(
"200": "CallRoutingRouteResponse",
"400": "ApiError",
"401": "ApiException",
- "403": "ApiError",
+ "403": "ApiException",
"404": "ApiError",
"429": "ApiException",
"500": "ApiException",
diff --git a/infobip_api_client/api/calls_api.py b/infobip_api_client/api/calls_api.py
index 1dd0385..0cf1561 100644
--- a/infobip_api_client/api/calls_api.py
+++ b/infobip_api_client/api/calls_api.py
@@ -11,14 +11,13 @@
Do not edit the class manually.
""" # noqa: E501
-
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from datetime import datetime
-from pydantic import Field, StrictBool, StrictBytes, StrictStr, field_validator
+from pydantic import Field, StrictBool, StrictBytes, StrictStr
from typing import Optional, Union
from typing_extensions import Annotated
from infobip_api_client.models.call import Call
@@ -30,6 +29,7 @@
from infobip_api_client.models.call_log import CallLog
from infobip_api_client.models.call_log_page import CallLogPage
from infobip_api_client.models.call_page import CallPage
+from infobip_api_client.models.call_recording import CallRecording
from infobip_api_client.models.call_recording_page import CallRecordingPage
from infobip_api_client.models.call_request import CallRequest
from infobip_api_client.models.call_state import CallState
@@ -47,11 +47,15 @@
from infobip_api_client.models.calls_conference_broadcast_webrtc_text_request import (
CallsConferenceBroadcastWebrtcTextRequest,
)
+from infobip_api_client.models.calls_conference_log import CallsConferenceLog
from infobip_api_client.models.calls_conference_log_page import CallsConferenceLogPage
-from infobip_api_client.models.calls_conference_log_response import (
- CallsConferenceLogResponse,
-)
from infobip_api_client.models.calls_conference_page import CallsConferencePage
+from infobip_api_client.models.calls_conference_play_request import (
+ CallsConferencePlayRequest,
+)
+from infobip_api_client.models.calls_conference_recording import (
+ CallsConferenceRecording,
+)
from infobip_api_client.models.calls_conference_recording_page import (
CallsConferenceRecordingPage,
)
@@ -80,6 +84,9 @@
from infobip_api_client.models.calls_dialog_recording_request import (
CallsDialogRecordingRequest,
)
+from infobip_api_client.models.calls_dialog_recording_response import (
+ CallsDialogRecordingResponse,
+)
from infobip_api_client.models.calls_dialog_request import CallsDialogRequest
from infobip_api_client.models.calls_dialog_response import CallsDialogResponse
from infobip_api_client.models.calls_dialog_say_request import CallsDialogSayRequest
@@ -109,24 +116,14 @@
)
from infobip_api_client.models.calls_play_request import CallsPlayRequest
from infobip_api_client.models.calls_pre_answer_request import CallsPreAnswerRequest
-from infobip_api_client.models.calls_public_call_recording import (
- CallsPublicCallRecording,
-)
-from infobip_api_client.models.calls_public_conference_recording import (
- CallsPublicConferenceRecording,
-)
-from infobip_api_client.models.calls_public_dialog_recording import (
- CallsPublicDialogRecording,
-)
-from infobip_api_client.models.calls_public_recording_file import (
- CallsPublicRecordingFile,
-)
from infobip_api_client.models.calls_public_sip_trunk_service_address import (
CallsPublicSipTrunkServiceAddress,
)
from infobip_api_client.models.calls_public_sip_trunk_service_address_request import (
CallsPublicSipTrunkServiceAddressRequest,
)
+from infobip_api_client.models.calls_recording_file import CallsRecordingFile
+from infobip_api_client.models.calls_recording_location import CallsRecordingLocation
from infobip_api_client.models.calls_recording_start_request import (
CallsRecordingStartRequest,
)
@@ -134,6 +131,9 @@
from infobip_api_client.models.calls_reschedule_request import CallsRescheduleRequest
from infobip_api_client.models.calls_say_request import CallsSayRequest
from infobip_api_client.models.calls_sip_trunk_page import CallsSipTrunkPage
+from infobip_api_client.models.calls_sip_trunk_registration_credentials import (
+ CallsSipTrunkRegistrationCredentials,
+)
from infobip_api_client.models.calls_sip_trunk_request import CallsSipTrunkRequest
from infobip_api_client.models.calls_sip_trunk_response import CallsSipTrunkResponse
from infobip_api_client.models.calls_sip_trunk_service_address_page import (
@@ -154,6 +154,9 @@
from infobip_api_client.models.calls_start_media_stream_request import (
CallsStartMediaStreamRequest,
)
+from infobip_api_client.models.calls_start_transcription_request import (
+ CallsStartTranscriptionRequest,
+)
from infobip_api_client.models.calls_stop_play_request import CallsStopPlayRequest
from infobip_api_client.models.calls_update_request import CallsUpdateRequest
@@ -238,6 +241,7 @@ def add_existing_conference_call(
"200": "CallsConference",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -316,6 +320,7 @@ def add_existing_conference_call_with_http_info(
"200": "CallsConference",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -394,6 +399,7 @@ def add_existing_conference_call_without_preload_content(
"200": "CallsConference",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -531,6 +537,7 @@ def add_new_conference_call(
"200": "CallsConferenceAndCall",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -605,6 +612,7 @@ def add_new_conference_call_with_http_info(
"200": "CallsConferenceAndCall",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -679,6 +687,7 @@ def add_new_conference_call_without_preload_content(
"200": "CallsConferenceAndCall",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -813,6 +822,7 @@ def answer_call(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -887,6 +897,7 @@ def answer_call_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -961,6 +972,7 @@ def answer_call_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -1095,6 +1107,7 @@ def application_transfer(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -1169,6 +1182,7 @@ def application_transfer_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -1243,6 +1257,7 @@ def application_transfer_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -1382,6 +1397,7 @@ def application_transfer_accept(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -1461,6 +1477,7 @@ def application_transfer_accept_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -1540,6 +1557,7 @@ def application_transfer_accept_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -1669,6 +1687,7 @@ def application_transfer_reject(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -1748,6 +1767,7 @@ def application_transfer_reject_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -1827,6 +1847,7 @@ def application_transfer_reject_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -1951,6 +1972,7 @@ def call_capture_dtmf(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -2025,6 +2047,7 @@ def call_capture_dtmf_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -2099,6 +2122,7 @@ def call_capture_dtmf_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -2233,6 +2257,7 @@ def call_capture_speech(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -2307,6 +2332,7 @@ def call_capture_speech_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -2381,6 +2407,7 @@ def call_capture_speech_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -3085,6 +3112,7 @@ def call_send_dtmf(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -3159,6 +3187,7 @@ def call_send_dtmf_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -3233,6 +3262,7 @@ def call_send_dtmf_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -3593,10 +3623,10 @@ def _call_start_recording_serialize(
)
@validate_call
- def call_stop_playing_file(
+ def call_start_transcription(
self,
call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_stop_play_request: CallsStopPlayRequest,
+ calls_start_transcription_request: CallsStartTranscriptionRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -3609,14 +3639,14 @@ def call_stop_playing_file(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Stop playing file
+ """Start transcription
- Stop playing an audio file on a call.
+ Start call transcription.
:param call_id: Call ID. (required)
:type call_id: str
- :param calls_stop_play_request: (required)
- :type calls_stop_play_request: CallsStopPlayRequest
+ :param calls_start_transcription_request: (required)
+ :type calls_start_transcription_request: CallsStartTranscriptionRequest
: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
@@ -3639,9 +3669,9 @@ def call_stop_playing_file(
:return: Returns the result object.
""" # noqa: E501
- _param = self._call_stop_playing_file_serialize(
+ _param = self._call_start_transcription_serialize(
call_id=call_id,
- calls_stop_play_request=calls_stop_play_request,
+ calls_start_transcription_request=calls_start_transcription_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -3650,7 +3680,9 @@ def call_stop_playing_file(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -3666,10 +3698,10 @@ def call_stop_playing_file(
).data
@validate_call
- def call_stop_playing_file_with_http_info(
+ def call_start_transcription_with_http_info(
self,
call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_stop_play_request: CallsStopPlayRequest,
+ calls_start_transcription_request: CallsStartTranscriptionRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -3682,14 +3714,14 @@ def call_stop_playing_file_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Stop playing file
+ """Start transcription
- Stop playing an audio file on a call.
+ Start call transcription.
:param call_id: Call ID. (required)
:type call_id: str
- :param calls_stop_play_request: (required)
- :type calls_stop_play_request: CallsStopPlayRequest
+ :param calls_start_transcription_request: (required)
+ :type calls_start_transcription_request: CallsStartTranscriptionRequest
: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
@@ -3712,9 +3744,9 @@ def call_stop_playing_file_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._call_stop_playing_file_serialize(
+ _param = self._call_start_transcription_serialize(
call_id=call_id,
- calls_stop_play_request=calls_stop_play_request,
+ calls_start_transcription_request=calls_start_transcription_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -3723,7 +3755,9 @@ def call_stop_playing_file_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -3739,10 +3773,10 @@ def call_stop_playing_file_with_http_info(
)
@validate_call
- def call_stop_playing_file_without_preload_content(
+ def call_start_transcription_without_preload_content(
self,
call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_stop_play_request: CallsStopPlayRequest,
+ calls_start_transcription_request: CallsStartTranscriptionRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -3755,14 +3789,14 @@ def call_stop_playing_file_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Stop playing file
+ """Start transcription
- Stop playing an audio file on a call.
+ Start call transcription.
:param call_id: Call ID. (required)
:type call_id: str
- :param calls_stop_play_request: (required)
- :type calls_stop_play_request: CallsStopPlayRequest
+ :param calls_start_transcription_request: (required)
+ :type calls_start_transcription_request: CallsStartTranscriptionRequest
: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
@@ -3785,9 +3819,9 @@ def call_stop_playing_file_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._call_stop_playing_file_serialize(
+ _param = self._call_start_transcription_serialize(
call_id=call_id,
- calls_stop_play_request=calls_stop_play_request,
+ calls_start_transcription_request=calls_start_transcription_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -3796,7 +3830,9 @@ def call_stop_playing_file_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -3807,10 +3843,10 @@ def call_stop_playing_file_without_preload_content(
)
return response_data.response
- def _call_stop_playing_file_serialize(
+ def _call_start_transcription_serialize(
self,
call_id,
- calls_stop_play_request,
+ calls_start_transcription_request,
_request_auth,
_content_type,
_headers,
@@ -3835,8 +3871,8 @@ def _call_stop_playing_file_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_stop_play_request is not None:
- _body_params = calls_stop_play_request
+ if calls_start_transcription_request is not None:
+ _body_params = calls_start_transcription_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -3858,7 +3894,7 @@ def _call_stop_playing_file_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/calls/{callId}/stop-play",
+ resource_path="/calls/1/calls/{callId}/start-transcription",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -3872,9 +3908,10 @@ def _call_stop_playing_file_serialize(
)
@validate_call
- def call_stop_recording(
+ def call_stop_playing_file(
self,
call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_stop_play_request: CallsStopPlayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -3887,12 +3924,14 @@ def call_stop_recording(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Stop recording
+ """Stop playing file
- Stop a recording on a call.
+ Stop playing an audio file on a call.
:param call_id: Call ID. (required)
:type call_id: str
+ :param calls_stop_play_request: (required)
+ :type calls_stop_play_request: CallsStopPlayRequest
: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
@@ -3915,8 +3954,9 @@ def call_stop_recording(
:return: Returns the result object.
""" # noqa: E501
- _param = self._call_stop_recording_serialize(
+ _param = self._call_stop_playing_file_serialize(
call_id=call_id,
+ calls_stop_play_request=calls_stop_play_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -3927,6 +3967,7 @@ def call_stop_recording(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -3942,9 +3983,10 @@ def call_stop_recording(
).data
@validate_call
- def call_stop_recording_with_http_info(
+ def call_stop_playing_file_with_http_info(
self,
call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_stop_play_request: CallsStopPlayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -3957,12 +3999,14 @@ def call_stop_recording_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Stop recording
+ """Stop playing file
- Stop a recording on a call.
+ Stop playing an audio file on a call.
:param call_id: Call ID. (required)
:type call_id: str
+ :param calls_stop_play_request: (required)
+ :type calls_stop_play_request: CallsStopPlayRequest
: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
@@ -3985,8 +4029,9 @@ def call_stop_recording_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._call_stop_recording_serialize(
+ _param = self._call_stop_playing_file_serialize(
call_id=call_id,
+ calls_stop_play_request=calls_stop_play_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -3997,6 +4042,7 @@ def call_stop_recording_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -4012,9 +4058,10 @@ def call_stop_recording_with_http_info(
)
@validate_call
- def call_stop_recording_without_preload_content(
+ def call_stop_playing_file_without_preload_content(
self,
call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_stop_play_request: CallsStopPlayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4027,12 +4074,14 @@ def call_stop_recording_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Stop recording
+ """Stop playing file
- Stop a recording on a call.
+ Stop playing an audio file on a call.
:param call_id: Call ID. (required)
:type call_id: str
+ :param calls_stop_play_request: (required)
+ :type calls_stop_play_request: CallsStopPlayRequest
: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
@@ -4055,8 +4104,9 @@ def call_stop_recording_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._call_stop_recording_serialize(
+ _param = self._call_stop_playing_file_serialize(
call_id=call_id,
+ calls_stop_play_request=calls_stop_play_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4067,6 +4117,7 @@ def call_stop_recording_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -4077,9 +4128,10 @@ def call_stop_recording_without_preload_content(
)
return response_data.response
- def _call_stop_recording_serialize(
+ def _call_stop_playing_file_serialize(
self,
call_id,
+ calls_stop_play_request,
_request_auth,
_content_type,
_headers,
@@ -4104,18 +4156,30 @@ def _call_stop_recording_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
+ if calls_stop_play_request is not None:
+ _body_params = calls_stop_play_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/calls/{callId}/stop-recording",
+ resource_path="/calls/1/calls/{callId}/stop-play",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -4129,9 +4193,9 @@ def _call_stop_recording_serialize(
)
@validate_call
- def cancel_bulk(
+ def call_stop_recording(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4143,13 +4207,13 @@ def cancel_bulk(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallBulkStatus:
- """Cancel
+ ) -> CallsActionResponse:
+ """Stop recording
- Cancel a bulk. Bulk can be cancelled if it was created with scheduling options and has not finished yet.
+ Stop a recording on a call.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
+ :param call_id: Call ID. (required)
+ :type call_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
@@ -4172,8 +4236,8 @@ def cancel_bulk(
:return: Returns the result object.
""" # noqa: E501
- _param = self._cancel_bulk_serialize(
- bulk_id=bulk_id,
+ _param = self._call_stop_recording_serialize(
+ call_id=call_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4181,8 +4245,10 @@ def cancel_bulk(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -4198,9 +4264,9 @@ def cancel_bulk(
).data
@validate_call
- def cancel_bulk_with_http_info(
+ def call_stop_recording_with_http_info(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4212,13 +4278,13 @@ def cancel_bulk_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallBulkStatus]:
- """Cancel
+ ) -> ApiResponse[CallsActionResponse]:
+ """Stop recording
- Cancel a bulk. Bulk can be cancelled if it was created with scheduling options and has not finished yet.
+ Stop a recording on a call.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
+ :param call_id: Call ID. (required)
+ :type call_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
@@ -4241,8 +4307,8 @@ def cancel_bulk_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._cancel_bulk_serialize(
- bulk_id=bulk_id,
+ _param = self._call_stop_recording_serialize(
+ call_id=call_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4250,8 +4316,10 @@ def cancel_bulk_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -4267,9 +4335,9 @@ def cancel_bulk_with_http_info(
)
@validate_call
- def cancel_bulk_without_preload_content(
+ def call_stop_recording_without_preload_content(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4282,12 +4350,12 @@ def cancel_bulk_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Cancel
+ """Stop recording
- Cancel a bulk. Bulk can be cancelled if it was created with scheduling options and has not finished yet.
+ Stop a recording on a call.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
+ :param call_id: Call ID. (required)
+ :type call_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
@@ -4310,8 +4378,8 @@ def cancel_bulk_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._cancel_bulk_serialize(
- bulk_id=bulk_id,
+ _param = self._call_stop_recording_serialize(
+ call_id=call_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4319,8 +4387,10 @@ def cancel_bulk_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -4331,9 +4401,9 @@ def cancel_bulk_without_preload_content(
)
return response_data.response
- def _cancel_bulk_serialize(
+ def _call_stop_recording_serialize(
self,
- bulk_id,
+ call_id,
_request_auth,
_content_type,
_headers,
@@ -4352,8 +4422,8 @@ def _cancel_bulk_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if bulk_id is not None:
- _path_params["bulkId"] = bulk_id
+ if call_id is not None:
+ _path_params["callId"] = call_id
# process the query parameters
# process the header parameters
# process the form parameters
@@ -4369,7 +4439,7 @@ def _cancel_bulk_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/bulks/{bulkId}/cancel",
+ resource_path="/calls/1/calls/{callId}/stop-recording",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -4383,13 +4453,9 @@ def _cancel_bulk_serialize(
)
@validate_call
- def compose_conference_recording(
+ def call_stop_transcription(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_on_demand_composition: CallsOnDemandComposition,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4402,16 +4468,12 @@ def compose_conference_recording(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Compose conference recording on calls
+ """Stop transcription
- Compose conference recording on calls. All calls will be merged into a single audio or video file.
+ Stop call transcription.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param calls_on_demand_composition: (required)
- :type calls_on_demand_composition: CallsOnDemandComposition
- :param location: Recording location.
- :type location: str
+ :param call_id: Call ID. (required)
+ :type call_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
@@ -4434,10 +4496,8 @@ def compose_conference_recording(
:return: Returns the result object.
""" # noqa: E501
- _param = self._compose_conference_recording_serialize(
- conference_id=conference_id,
- calls_on_demand_composition=calls_on_demand_composition,
- location=location,
+ _param = self._call_stop_transcription_serialize(
+ call_id=call_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4447,6 +4507,7 @@ def compose_conference_recording(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -4462,13 +4523,9 @@ def compose_conference_recording(
).data
@validate_call
- def compose_conference_recording_with_http_info(
+ def call_stop_transcription_with_http_info(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_on_demand_composition: CallsOnDemandComposition,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4481,16 +4538,12 @@ def compose_conference_recording_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Compose conference recording on calls
+ """Stop transcription
- Compose conference recording on calls. All calls will be merged into a single audio or video file.
+ Stop call transcription.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param calls_on_demand_composition: (required)
- :type calls_on_demand_composition: CallsOnDemandComposition
- :param location: Recording location.
- :type location: str
+ :param call_id: Call ID. (required)
+ :type call_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
@@ -4513,10 +4566,8 @@ def compose_conference_recording_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._compose_conference_recording_serialize(
- conference_id=conference_id,
- calls_on_demand_composition=calls_on_demand_composition,
- location=location,
+ _param = self._call_stop_transcription_serialize(
+ call_id=call_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4526,6 +4577,7 @@ def compose_conference_recording_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -4541,13 +4593,9 @@ def compose_conference_recording_with_http_info(
)
@validate_call
- def compose_conference_recording_without_preload_content(
+ def call_stop_transcription_without_preload_content(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_on_demand_composition: CallsOnDemandComposition,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4560,16 +4608,12 @@ def compose_conference_recording_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Compose conference recording on calls
+ """Stop transcription
- Compose conference recording on calls. All calls will be merged into a single audio or video file.
+ Stop call transcription.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param calls_on_demand_composition: (required)
- :type calls_on_demand_composition: CallsOnDemandComposition
- :param location: Recording location.
- :type location: str
+ :param call_id: Call ID. (required)
+ :type call_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
@@ -4592,10 +4636,8 @@ def compose_conference_recording_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._compose_conference_recording_serialize(
- conference_id=conference_id,
- calls_on_demand_composition=calls_on_demand_composition,
- location=location,
+ _param = self._call_stop_transcription_serialize(
+ call_id=call_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4605,6 +4647,7 @@ def compose_conference_recording_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -4615,11 +4658,9 @@ def compose_conference_recording_without_preload_content(
)
return response_data.response
- def _compose_conference_recording_serialize(
+ def _call_stop_transcription_serialize(
self,
- conference_id,
- calls_on_demand_composition,
- location,
+ call_id,
_request_auth,
_content_type,
_headers,
@@ -4638,40 +4679,24 @@ def _compose_conference_recording_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if conference_id is not None:
- _path_params["conferenceId"] = conference_id
+ if call_id is not None:
+ _path_params["callId"] = call_id
# process the query parameters
- if location is not None:
-
- _query_params.append(("location", location))
-
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_on_demand_composition is not None:
- _body_params = calls_on_demand_composition
# 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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/recordings/conferences/{conferenceId}/compose",
+ resource_path="/calls/1/calls/{callId}/stop-transcription",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -4685,13 +4710,9 @@ def _compose_conference_recording_serialize(
)
@validate_call
- def compose_dialog_recording(
+ def cancel_bulk(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_on_demand_composition: CallsOnDemandComposition,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4703,17 +4724,13 @@ def compose_dialog_recording(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsActionResponse:
- """Compose dialog recording on calls
+ ) -> CallBulkStatus:
+ """Cancel
- Compose dialog recording on calls. Both calls will be merged into a single audio or video file.
+ Cancel a bulk. Bulk can be cancelled if it was created with scheduling options and has not finished yet.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param calls_on_demand_composition: (required)
- :type calls_on_demand_composition: CallsOnDemandComposition
- :param location: Recording location.
- :type location: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_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
@@ -4736,10 +4753,8 @@ def compose_dialog_recording(
:return: Returns the result object.
""" # noqa: E501
- _param = self._compose_dialog_recording_serialize(
- dialog_id=dialog_id,
- calls_on_demand_composition=calls_on_demand_composition,
- location=location,
+ _param = self._cancel_bulk_serialize(
+ bulk_id=bulk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4747,8 +4762,9 @@ def compose_dialog_recording(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
+ "200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -4764,13 +4780,9 @@ def compose_dialog_recording(
).data
@validate_call
- def compose_dialog_recording_with_http_info(
+ def cancel_bulk_with_http_info(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_on_demand_composition: CallsOnDemandComposition,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4782,17 +4794,13 @@ def compose_dialog_recording_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsActionResponse]:
- """Compose dialog recording on calls
+ ) -> ApiResponse[CallBulkStatus]:
+ """Cancel
- Compose dialog recording on calls. Both calls will be merged into a single audio or video file.
+ Cancel a bulk. Bulk can be cancelled if it was created with scheduling options and has not finished yet.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param calls_on_demand_composition: (required)
- :type calls_on_demand_composition: CallsOnDemandComposition
- :param location: Recording location.
- :type location: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_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
@@ -4815,10 +4823,8 @@ def compose_dialog_recording_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._compose_dialog_recording_serialize(
- dialog_id=dialog_id,
- calls_on_demand_composition=calls_on_demand_composition,
- location=location,
+ _param = self._cancel_bulk_serialize(
+ bulk_id=bulk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4826,8 +4832,9 @@ def compose_dialog_recording_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
+ "200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -4843,13 +4850,9 @@ def compose_dialog_recording_with_http_info(
)
@validate_call
- def compose_dialog_recording_without_preload_content(
+ def cancel_bulk_without_preload_content(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_on_demand_composition: CallsOnDemandComposition,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4862,16 +4865,12 @@ def compose_dialog_recording_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Compose dialog recording on calls
+ """Cancel
- Compose dialog recording on calls. Both calls will be merged into a single audio or video file.
+ Cancel a bulk. Bulk can be cancelled if it was created with scheduling options and has not finished yet.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param calls_on_demand_composition: (required)
- :type calls_on_demand_composition: CallsOnDemandComposition
- :param location: Recording location.
- :type location: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_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
@@ -4894,10 +4893,8 @@ def compose_dialog_recording_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._compose_dialog_recording_serialize(
- dialog_id=dialog_id,
- calls_on_demand_composition=calls_on_demand_composition,
- location=location,
+ _param = self._cancel_bulk_serialize(
+ bulk_id=bulk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4905,8 +4902,9 @@ def compose_dialog_recording_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
+ "200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -4917,11 +4915,9 @@ def compose_dialog_recording_without_preload_content(
)
return response_data.response
- def _compose_dialog_recording_serialize(
+ def _cancel_bulk_serialize(
self,
- dialog_id,
- calls_on_demand_composition,
- location,
+ bulk_id,
_request_auth,
_content_type,
_headers,
@@ -4940,40 +4936,24 @@ def _compose_dialog_recording_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if dialog_id is not None:
- _path_params["dialogId"] = dialog_id
+ if bulk_id is not None:
+ _path_params["bulkId"] = bulk_id
# process the query parameters
- if location is not None:
-
- _query_params.append(("location", location))
-
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_on_demand_composition is not None:
- _body_params = calls_on_demand_composition
# 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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/recordings/dialogs/{dialogId}/compose",
+ resource_path="/calls/1/bulks/{bulkId}/cancel",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -4987,10 +4967,13 @@ def _compose_dialog_recording_serialize(
)
@validate_call
- def conference_broadcast_webrtc_text(
+ def compose_conference_recording(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest,
+ calls_on_demand_composition: CallsOnDemandComposition,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5003,14 +4986,16 @@ def conference_broadcast_webrtc_text(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Broadcast text
+ """Compose conference recording on calls
- Broadcasts a text message to conference WebRTC participants with open data channel.
+ Compose conference recording on calls. All calls will be merged into a single audio or video file.
:param conference_id: Conference ID. (required)
:type conference_id: str
- :param calls_conference_broadcast_webrtc_text_request: (required)
- :type calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest
+ :param calls_on_demand_composition: (required)
+ :type calls_on_demand_composition: CallsOnDemandComposition
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -5033,9 +5018,10 @@ def conference_broadcast_webrtc_text(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_broadcast_webrtc_text_serialize(
+ _param = self._compose_conference_recording_serialize(
conference_id=conference_id,
- calls_conference_broadcast_webrtc_text_request=calls_conference_broadcast_webrtc_text_request,
+ calls_on_demand_composition=calls_on_demand_composition,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -5046,6 +5032,7 @@ def conference_broadcast_webrtc_text(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -5061,10 +5048,13 @@ def conference_broadcast_webrtc_text(
).data
@validate_call
- def conference_broadcast_webrtc_text_with_http_info(
+ def compose_conference_recording_with_http_info(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest,
+ calls_on_demand_composition: CallsOnDemandComposition,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5077,14 +5067,16 @@ def conference_broadcast_webrtc_text_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Broadcast text
+ """Compose conference recording on calls
- Broadcasts a text message to conference WebRTC participants with open data channel.
+ Compose conference recording on calls. All calls will be merged into a single audio or video file.
:param conference_id: Conference ID. (required)
:type conference_id: str
- :param calls_conference_broadcast_webrtc_text_request: (required)
- :type calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest
+ :param calls_on_demand_composition: (required)
+ :type calls_on_demand_composition: CallsOnDemandComposition
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -5107,9 +5099,10 @@ def conference_broadcast_webrtc_text_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_broadcast_webrtc_text_serialize(
+ _param = self._compose_conference_recording_serialize(
conference_id=conference_id,
- calls_conference_broadcast_webrtc_text_request=calls_conference_broadcast_webrtc_text_request,
+ calls_on_demand_composition=calls_on_demand_composition,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -5120,6 +5113,7 @@ def conference_broadcast_webrtc_text_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -5135,10 +5129,13 @@ def conference_broadcast_webrtc_text_with_http_info(
)
@validate_call
- def conference_broadcast_webrtc_text_without_preload_content(
+ def compose_conference_recording_without_preload_content(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest,
+ calls_on_demand_composition: CallsOnDemandComposition,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5151,14 +5148,16 @@ def conference_broadcast_webrtc_text_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Broadcast text
+ """Compose conference recording on calls
- Broadcasts a text message to conference WebRTC participants with open data channel.
+ Compose conference recording on calls. All calls will be merged into a single audio or video file.
:param conference_id: Conference ID. (required)
:type conference_id: str
- :param calls_conference_broadcast_webrtc_text_request: (required)
- :type calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest
+ :param calls_on_demand_composition: (required)
+ :type calls_on_demand_composition: CallsOnDemandComposition
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -5181,9 +5180,10 @@ def conference_broadcast_webrtc_text_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_broadcast_webrtc_text_serialize(
+ _param = self._compose_conference_recording_serialize(
conference_id=conference_id,
- calls_conference_broadcast_webrtc_text_request=calls_conference_broadcast_webrtc_text_request,
+ calls_on_demand_composition=calls_on_demand_composition,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -5194,6 +5194,7 @@ def conference_broadcast_webrtc_text_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -5204,10 +5205,11 @@ def conference_broadcast_webrtc_text_without_preload_content(
)
return response_data.response
- def _conference_broadcast_webrtc_text_serialize(
+ def _compose_conference_recording_serialize(
self,
conference_id,
- calls_conference_broadcast_webrtc_text_request,
+ calls_on_demand_composition,
+ location,
_request_auth,
_content_type,
_headers,
@@ -5229,11 +5231,15 @@ def _conference_broadcast_webrtc_text_serialize(
if conference_id is not None:
_path_params["conferenceId"] = conference_id
# process the query parameters
+ if location is not None:
+
+ _query_params.append(("location", location.value))
+
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_conference_broadcast_webrtc_text_request is not None:
- _body_params = calls_conference_broadcast_webrtc_text_request
+ if calls_on_demand_composition is not None:
+ _body_params = calls_on_demand_composition
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -5255,7 +5261,7 @@ def _conference_broadcast_webrtc_text_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/conferences/{conferenceId}/broadcast-webrtc-text",
+ resource_path="/calls/1/recordings/conferences/{conferenceId}/compose",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -5269,10 +5275,13 @@ def _conference_broadcast_webrtc_text_serialize(
)
@validate_call
- def conference_play_file(
+ def compose_dialog_recording(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_play_request: CallsPlayRequest,
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ calls_on_demand_composition: CallsOnDemandComposition,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5285,14 +5294,16 @@ def conference_play_file(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Play file
+ """Compose dialog recording on calls
- Play an audio file on a conference.
+ Compose dialog recording on calls. Both calls will be merged into a single audio or video file.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param calls_play_request: (required)
- :type calls_play_request: CallsPlayRequest
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_id: str
+ :param calls_on_demand_composition: (required)
+ :type calls_on_demand_composition: CallsOnDemandComposition
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -5315,9 +5326,10 @@ def conference_play_file(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_play_file_serialize(
- conference_id=conference_id,
- calls_play_request=calls_play_request,
+ _param = self._compose_dialog_recording_serialize(
+ dialog_id=dialog_id,
+ calls_on_demand_composition=calls_on_demand_composition,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -5328,6 +5340,7 @@ def conference_play_file(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -5343,10 +5356,13 @@ def conference_play_file(
).data
@validate_call
- def conference_play_file_with_http_info(
+ def compose_dialog_recording_with_http_info(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_play_request: CallsPlayRequest,
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ calls_on_demand_composition: CallsOnDemandComposition,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5359,14 +5375,16 @@ def conference_play_file_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Play file
+ """Compose dialog recording on calls
- Play an audio file on a conference.
+ Compose dialog recording on calls. Both calls will be merged into a single audio or video file.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param calls_play_request: (required)
- :type calls_play_request: CallsPlayRequest
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_id: str
+ :param calls_on_demand_composition: (required)
+ :type calls_on_demand_composition: CallsOnDemandComposition
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -5389,9 +5407,10 @@ def conference_play_file_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_play_file_serialize(
- conference_id=conference_id,
- calls_play_request=calls_play_request,
+ _param = self._compose_dialog_recording_serialize(
+ dialog_id=dialog_id,
+ calls_on_demand_composition=calls_on_demand_composition,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -5402,6 +5421,7 @@ def conference_play_file_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -5417,10 +5437,13 @@ def conference_play_file_with_http_info(
)
@validate_call
- def conference_play_file_without_preload_content(
+ def compose_dialog_recording_without_preload_content(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_play_request: CallsPlayRequest,
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ calls_on_demand_composition: CallsOnDemandComposition,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5433,14 +5456,16 @@ def conference_play_file_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Play file
+ """Compose dialog recording on calls
- Play an audio file on a conference.
+ Compose dialog recording on calls. Both calls will be merged into a single audio or video file.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param calls_play_request: (required)
- :type calls_play_request: CallsPlayRequest
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_id: str
+ :param calls_on_demand_composition: (required)
+ :type calls_on_demand_composition: CallsOnDemandComposition
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -5463,9 +5488,10 @@ def conference_play_file_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_play_file_serialize(
- conference_id=conference_id,
- calls_play_request=calls_play_request,
+ _param = self._compose_dialog_recording_serialize(
+ dialog_id=dialog_id,
+ calls_on_demand_composition=calls_on_demand_composition,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -5476,6 +5502,7 @@ def conference_play_file_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -5486,10 +5513,11 @@ def conference_play_file_without_preload_content(
)
return response_data.response
- def _conference_play_file_serialize(
+ def _compose_dialog_recording_serialize(
self,
- conference_id,
- calls_play_request,
+ dialog_id,
+ calls_on_demand_composition,
+ location,
_request_auth,
_content_type,
_headers,
@@ -5508,14 +5536,18 @@ def _conference_play_file_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if conference_id is not None:
- _path_params["conferenceId"] = conference_id
+ if dialog_id is not None:
+ _path_params["dialogId"] = dialog_id
# process the query parameters
+ if location is not None:
+
+ _query_params.append(("location", location.value))
+
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_play_request is not None:
- _body_params = calls_play_request
+ if calls_on_demand_composition is not None:
+ _body_params = calls_on_demand_composition
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -5537,7 +5569,7 @@ def _conference_play_file_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/conferences/{conferenceId}/play",
+ resource_path="/calls/1/recordings/dialogs/{dialogId}/compose",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -5551,10 +5583,10 @@ def _conference_play_file_serialize(
)
@validate_call
- def conference_say_text(
+ def conference_broadcast_webrtc_text(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_say_request: CallsSayRequest,
+ calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5567,14 +5599,14 @@ def conference_say_text(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Say text
+ """Broadcast text
- Say text on a conference.
+ Broadcasts a text message to conference WebRTC participants with open data channel.
:param conference_id: Conference ID. (required)
:type conference_id: str
- :param calls_say_request: (required)
- :type calls_say_request: CallsSayRequest
+ :param calls_conference_broadcast_webrtc_text_request: (required)
+ :type calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest
: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
@@ -5597,9 +5629,9 @@ def conference_say_text(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_say_text_serialize(
+ _param = self._conference_broadcast_webrtc_text_serialize(
conference_id=conference_id,
- calls_say_request=calls_say_request,
+ calls_conference_broadcast_webrtc_text_request=calls_conference_broadcast_webrtc_text_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -5610,6 +5642,7 @@ def conference_say_text(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -5625,10 +5658,10 @@ def conference_say_text(
).data
@validate_call
- def conference_say_text_with_http_info(
+ def conference_broadcast_webrtc_text_with_http_info(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_say_request: CallsSayRequest,
+ calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5641,14 +5674,14 @@ def conference_say_text_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Say text
+ """Broadcast text
- Say text on a conference.
+ Broadcasts a text message to conference WebRTC participants with open data channel.
:param conference_id: Conference ID. (required)
:type conference_id: str
- :param calls_say_request: (required)
- :type calls_say_request: CallsSayRequest
+ :param calls_conference_broadcast_webrtc_text_request: (required)
+ :type calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest
: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
@@ -5671,9 +5704,9 @@ def conference_say_text_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_say_text_serialize(
+ _param = self._conference_broadcast_webrtc_text_serialize(
conference_id=conference_id,
- calls_say_request=calls_say_request,
+ calls_conference_broadcast_webrtc_text_request=calls_conference_broadcast_webrtc_text_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -5684,6 +5717,7 @@ def conference_say_text_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -5699,10 +5733,10 @@ def conference_say_text_with_http_info(
)
@validate_call
- def conference_say_text_without_preload_content(
+ def conference_broadcast_webrtc_text_without_preload_content(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_say_request: CallsSayRequest,
+ calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5715,14 +5749,14 @@ def conference_say_text_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Say text
+ """Broadcast text
- Say text on a conference.
+ Broadcasts a text message to conference WebRTC participants with open data channel.
:param conference_id: Conference ID. (required)
:type conference_id: str
- :param calls_say_request: (required)
- :type calls_say_request: CallsSayRequest
+ :param calls_conference_broadcast_webrtc_text_request: (required)
+ :type calls_conference_broadcast_webrtc_text_request: CallsConferenceBroadcastWebrtcTextRequest
: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
@@ -5745,9 +5779,9 @@ def conference_say_text_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_say_text_serialize(
+ _param = self._conference_broadcast_webrtc_text_serialize(
conference_id=conference_id,
- calls_say_request=calls_say_request,
+ calls_conference_broadcast_webrtc_text_request=calls_conference_broadcast_webrtc_text_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -5758,6 +5792,7 @@ def conference_say_text_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -5768,10 +5803,10 @@ def conference_say_text_without_preload_content(
)
return response_data.response
- def _conference_say_text_serialize(
+ def _conference_broadcast_webrtc_text_serialize(
self,
conference_id,
- calls_say_request,
+ calls_conference_broadcast_webrtc_text_request,
_request_auth,
_content_type,
_headers,
@@ -5796,8 +5831,8 @@ def _conference_say_text_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_say_request is not None:
- _body_params = calls_say_request
+ if calls_conference_broadcast_webrtc_text_request is not None:
+ _body_params = calls_conference_broadcast_webrtc_text_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -5819,7 +5854,7 @@ def _conference_say_text_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/conferences/{conferenceId}/say",
+ resource_path="/calls/1/conferences/{conferenceId}/broadcast-webrtc-text",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -5833,10 +5868,10 @@ def _conference_say_text_serialize(
)
@validate_call
- def conference_start_recording(
+ def conference_play_file(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_conference_recording_request: CallsConferenceRecordingRequest,
+ calls_conference_play_request: CallsConferencePlayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5849,14 +5884,14 @@ def conference_start_recording(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Start recording
+ """Play file
- Start recording a conference.
+ Play an audio file on a conference.
:param conference_id: Conference ID. (required)
:type conference_id: str
- :param calls_conference_recording_request: (required)
- :type calls_conference_recording_request: CallsConferenceRecordingRequest
+ :param calls_conference_play_request: (required)
+ :type calls_conference_play_request: CallsConferencePlayRequest
: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
@@ -5879,9 +5914,9 @@ def conference_start_recording(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_start_recording_serialize(
+ _param = self._conference_play_file_serialize(
conference_id=conference_id,
- calls_conference_recording_request=calls_conference_recording_request,
+ calls_conference_play_request=calls_conference_play_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -5892,6 +5927,7 @@ def conference_start_recording(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -5907,10 +5943,10 @@ def conference_start_recording(
).data
@validate_call
- def conference_start_recording_with_http_info(
+ def conference_play_file_with_http_info(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_conference_recording_request: CallsConferenceRecordingRequest,
+ calls_conference_play_request: CallsConferencePlayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5923,14 +5959,14 @@ def conference_start_recording_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Start recording
+ """Play file
- Start recording a conference.
+ Play an audio file on a conference.
:param conference_id: Conference ID. (required)
:type conference_id: str
- :param calls_conference_recording_request: (required)
- :type calls_conference_recording_request: CallsConferenceRecordingRequest
+ :param calls_conference_play_request: (required)
+ :type calls_conference_play_request: CallsConferencePlayRequest
: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
@@ -5953,9 +5989,9 @@ def conference_start_recording_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_start_recording_serialize(
+ _param = self._conference_play_file_serialize(
conference_id=conference_id,
- calls_conference_recording_request=calls_conference_recording_request,
+ calls_conference_play_request=calls_conference_play_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -5966,6 +6002,7 @@ def conference_start_recording_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -5981,10 +6018,10 @@ def conference_start_recording_with_http_info(
)
@validate_call
- def conference_start_recording_without_preload_content(
+ def conference_play_file_without_preload_content(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- calls_conference_recording_request: CallsConferenceRecordingRequest,
+ calls_conference_play_request: CallsConferencePlayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -5997,14 +6034,14 @@ def conference_start_recording_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Start recording
+ """Play file
- Start recording a conference.
+ Play an audio file on a conference.
:param conference_id: Conference ID. (required)
:type conference_id: str
- :param calls_conference_recording_request: (required)
- :type calls_conference_recording_request: CallsConferenceRecordingRequest
+ :param calls_conference_play_request: (required)
+ :type calls_conference_play_request: CallsConferencePlayRequest
: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
@@ -6027,9 +6064,9 @@ def conference_start_recording_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_start_recording_serialize(
+ _param = self._conference_play_file_serialize(
conference_id=conference_id,
- calls_conference_recording_request=calls_conference_recording_request,
+ calls_conference_play_request=calls_conference_play_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -6040,6 +6077,7 @@ def conference_start_recording_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -6050,10 +6088,10 @@ def conference_start_recording_without_preload_content(
)
return response_data.response
- def _conference_start_recording_serialize(
+ def _conference_play_file_serialize(
self,
conference_id,
- calls_conference_recording_request,
+ calls_conference_play_request,
_request_auth,
_content_type,
_headers,
@@ -6078,8 +6116,8 @@ def _conference_start_recording_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_conference_recording_request is not None:
- _body_params = calls_conference_recording_request
+ if calls_conference_play_request is not None:
+ _body_params = calls_conference_play_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -6101,7 +6139,7 @@ def _conference_start_recording_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/conferences/{conferenceId}/start-recording",
+ resource_path="/calls/1/conferences/{conferenceId}/play",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -6115,9 +6153,10 @@ def _conference_start_recording_serialize(
)
@validate_call
- def conference_stop_playing_file(
+ def conference_say_text(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ calls_say_request: CallsSayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -6130,12 +6169,14 @@ def conference_stop_playing_file(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Stop playing file
+ """Say text
- Stop playing an audio file on a conference.
+ Say text on a conference.
:param conference_id: Conference ID. (required)
:type conference_id: str
+ :param calls_say_request: (required)
+ :type calls_say_request: CallsSayRequest
: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
@@ -6158,8 +6199,9 @@ def conference_stop_playing_file(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_stop_playing_file_serialize(
+ _param = self._conference_say_text_serialize(
conference_id=conference_id,
+ calls_say_request=calls_say_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -6168,7 +6210,9 @@ def conference_stop_playing_file(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -6184,9 +6228,10 @@ def conference_stop_playing_file(
).data
@validate_call
- def conference_stop_playing_file_with_http_info(
+ def conference_say_text_with_http_info(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ calls_say_request: CallsSayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -6199,12 +6244,14 @@ def conference_stop_playing_file_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Stop playing file
+ """Say text
- Stop playing an audio file on a conference.
+ Say text on a conference.
:param conference_id: Conference ID. (required)
:type conference_id: str
+ :param calls_say_request: (required)
+ :type calls_say_request: CallsSayRequest
: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
@@ -6227,8 +6274,9 @@ def conference_stop_playing_file_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_stop_playing_file_serialize(
+ _param = self._conference_say_text_serialize(
conference_id=conference_id,
+ calls_say_request=calls_say_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -6237,7 +6285,9 @@ def conference_stop_playing_file_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -6253,9 +6303,10 @@ def conference_stop_playing_file_with_http_info(
)
@validate_call
- def conference_stop_playing_file_without_preload_content(
+ def conference_say_text_without_preload_content(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ calls_say_request: CallsSayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -6268,12 +6319,14 @@ def conference_stop_playing_file_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Stop playing file
+ """Say text
- Stop playing an audio file on a conference.
+ Say text on a conference.
:param conference_id: Conference ID. (required)
:type conference_id: str
+ :param calls_say_request: (required)
+ :type calls_say_request: CallsSayRequest
: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
@@ -6296,8 +6349,9 @@ def conference_stop_playing_file_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_stop_playing_file_serialize(
+ _param = self._conference_say_text_serialize(
conference_id=conference_id,
+ calls_say_request=calls_say_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -6306,7 +6360,9 @@ def conference_stop_playing_file_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -6317,9 +6373,10 @@ def conference_stop_playing_file_without_preload_content(
)
return response_data.response
- def _conference_stop_playing_file_serialize(
+ def _conference_say_text_serialize(
self,
conference_id,
+ calls_say_request,
_request_auth,
_content_type,
_headers,
@@ -6344,18 +6401,30 @@ def _conference_stop_playing_file_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
+ if calls_say_request is not None:
+ _body_params = calls_say_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/conferences/{conferenceId}/stop-play",
+ resource_path="/calls/1/conferences/{conferenceId}/say",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -6369,9 +6438,10 @@ def _conference_stop_playing_file_serialize(
)
@validate_call
- def conference_stop_recording(
+ def conference_start_recording(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ calls_conference_recording_request: CallsConferenceRecordingRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -6384,12 +6454,14 @@ def conference_stop_recording(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Stop recording
+ """Start recording
- Stop recording a conference.
+ Start recording a conference.
:param conference_id: Conference ID. (required)
:type conference_id: str
+ :param calls_conference_recording_request: (required)
+ :type calls_conference_recording_request: CallsConferenceRecordingRequest
: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
@@ -6412,8 +6484,9 @@ def conference_stop_recording(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_stop_recording_serialize(
+ _param = self._conference_start_recording_serialize(
conference_id=conference_id,
+ calls_conference_recording_request=calls_conference_recording_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -6424,6 +6497,7 @@ def conference_stop_recording(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -6439,9 +6513,10 @@ def conference_stop_recording(
).data
@validate_call
- def conference_stop_recording_with_http_info(
+ def conference_start_recording_with_http_info(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ calls_conference_recording_request: CallsConferenceRecordingRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -6454,12 +6529,14 @@ def conference_stop_recording_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Stop recording
+ """Start recording
- Stop recording a conference.
+ Start recording a conference.
:param conference_id: Conference ID. (required)
:type conference_id: str
+ :param calls_conference_recording_request: (required)
+ :type calls_conference_recording_request: CallsConferenceRecordingRequest
: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
@@ -6482,8 +6559,9 @@ def conference_stop_recording_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_stop_recording_serialize(
+ _param = self._conference_start_recording_serialize(
conference_id=conference_id,
+ calls_conference_recording_request=calls_conference_recording_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -6494,6 +6572,7 @@ def conference_stop_recording_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -6509,9 +6588,10 @@ def conference_stop_recording_with_http_info(
)
@validate_call
- def conference_stop_recording_without_preload_content(
+ def conference_start_recording_without_preload_content(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ calls_conference_recording_request: CallsConferenceRecordingRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -6524,12 +6604,14 @@ def conference_stop_recording_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Stop recording
+ """Start recording
- Stop recording a conference.
+ Start recording a conference.
:param conference_id: Conference ID. (required)
:type conference_id: str
+ :param calls_conference_recording_request: (required)
+ :type calls_conference_recording_request: CallsConferenceRecordingRequest
: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
@@ -6552,8 +6634,9 @@ def conference_stop_recording_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._conference_stop_recording_serialize(
+ _param = self._conference_start_recording_serialize(
conference_id=conference_id,
+ calls_conference_recording_request=calls_conference_recording_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -6564,6 +6647,7 @@ def conference_stop_recording_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -6574,9 +6658,10 @@ def conference_stop_recording_without_preload_content(
)
return response_data.response
- def _conference_stop_recording_serialize(
+ def _conference_start_recording_serialize(
self,
conference_id,
+ calls_conference_recording_request,
_request_auth,
_content_type,
_headers,
@@ -6601,18 +6686,30 @@ def _conference_stop_recording_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
+ if calls_conference_recording_request is not None:
+ _body_params = calls_conference_recording_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/conferences/{conferenceId}/stop-recording",
+ resource_path="/calls/1/conferences/{conferenceId}/start-recording",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -6626,9 +6723,9 @@ def _conference_stop_recording_serialize(
)
@validate_call
- def connect_calls(
+ def conference_stop_playing_file(
self,
- calls_connect_request: CallsConnectRequest,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -6640,13 +6737,13 @@ def connect_calls(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsConference:
- """Connect calls
+ ) -> CallsActionResponse:
+ """Stop playing file
- Connect calls in a conference.
+ Stop playing an audio file on a conference.
- :param calls_connect_request: (required)
- :type calls_connect_request: CallsConnectRequest
+ :param conference_id: Conference ID. (required)
+ :type conference_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
@@ -6669,8 +6766,8 @@ def connect_calls(
:return: Returns the result object.
""" # noqa: E501
- _param = self._connect_calls_serialize(
- calls_connect_request=calls_connect_request,
+ _param = self._conference_stop_playing_file_serialize(
+ conference_id=conference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -6678,9 +6775,9 @@ def connect_calls(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConference",
- "400": "ApiException",
+ "200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -6696,9 +6793,9 @@ def connect_calls(
).data
@validate_call
- def connect_calls_with_http_info(
+ def conference_stop_playing_file_with_http_info(
self,
- calls_connect_request: CallsConnectRequest,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -6710,13 +6807,13 @@ def connect_calls_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsConference]:
- """Connect calls
+ ) -> ApiResponse[CallsActionResponse]:
+ """Stop playing file
- Connect calls in a conference.
+ Stop playing an audio file on a conference.
- :param calls_connect_request: (required)
- :type calls_connect_request: CallsConnectRequest
+ :param conference_id: Conference ID. (required)
+ :type conference_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
@@ -6739,8 +6836,8 @@ def connect_calls_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._connect_calls_serialize(
- calls_connect_request=calls_connect_request,
+ _param = self._conference_stop_playing_file_serialize(
+ conference_id=conference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -6748,9 +6845,9 @@ def connect_calls_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConference",
- "400": "ApiException",
+ "200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -6766,9 +6863,9 @@ def connect_calls_with_http_info(
)
@validate_call
- def connect_calls_without_preload_content(
+ def conference_stop_playing_file_without_preload_content(
self,
- calls_connect_request: CallsConnectRequest,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -6781,12 +6878,12 @@ def connect_calls_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Connect calls
+ """Stop playing file
- Connect calls in a conference.
+ Stop playing an audio file on a conference.
- :param calls_connect_request: (required)
- :type calls_connect_request: CallsConnectRequest
+ :param conference_id: Conference ID. (required)
+ :type conference_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
@@ -6809,8 +6906,8 @@ def connect_calls_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._connect_calls_serialize(
- calls_connect_request=calls_connect_request,
+ _param = self._conference_stop_playing_file_serialize(
+ conference_id=conference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -6818,9 +6915,9 @@ def connect_calls_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConference",
- "400": "ApiException",
+ "200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -6831,9 +6928,9 @@ def connect_calls_without_preload_content(
)
return response_data.response
- def _connect_calls_serialize(
+ def _conference_stop_playing_file_serialize(
self,
- calls_connect_request,
+ conference_id,
_request_auth,
_content_type,
_headers,
@@ -6852,34 +6949,24 @@ def _connect_calls_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
+ if conference_id is not None:
+ _path_params["conferenceId"] = conference_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_connect_request is not None:
- _body_params = calls_connect_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/connect",
+ resource_path="/calls/1/conferences/{conferenceId}/stop-play",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -6893,10 +6980,9 @@ def _connect_calls_serialize(
)
@validate_call
- def connect_with_new_call(
+ def conference_stop_recording(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_connect_with_new_call_request: CallsConnectWithNewCallRequest,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -6908,15 +6994,13 @@ def connect_with_new_call(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsConferenceAndCall:
- """Connect with new call
+ ) -> CallsActionResponse:
+ """Stop recording
- Connect an existing call with a new call in a conference.
+ Stop recording a conference.
- :param call_id: Call ID. (required)
- :type call_id: str
- :param calls_connect_with_new_call_request: (required)
- :type calls_connect_with_new_call_request: CallsConnectWithNewCallRequest
+ :param conference_id: Conference ID. (required)
+ :type conference_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
@@ -6939,9 +7023,8 @@ def connect_with_new_call(
:return: Returns the result object.
""" # noqa: E501
- _param = self._connect_with_new_call_serialize(
- call_id=call_id,
- calls_connect_with_new_call_request=calls_connect_with_new_call_request,
+ _param = self._conference_stop_recording_serialize(
+ conference_id=conference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -6949,9 +7032,10 @@ def connect_with_new_call(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceAndCall",
+ "200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -6967,10 +7051,9 @@ def connect_with_new_call(
).data
@validate_call
- def connect_with_new_call_with_http_info(
+ def conference_stop_recording_with_http_info(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_connect_with_new_call_request: CallsConnectWithNewCallRequest,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -6982,15 +7065,13 @@ def connect_with_new_call_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsConferenceAndCall]:
- """Connect with new call
+ ) -> ApiResponse[CallsActionResponse]:
+ """Stop recording
- Connect an existing call with a new call in a conference.
+ Stop recording a conference.
- :param call_id: Call ID. (required)
- :type call_id: str
- :param calls_connect_with_new_call_request: (required)
- :type calls_connect_with_new_call_request: CallsConnectWithNewCallRequest
+ :param conference_id: Conference ID. (required)
+ :type conference_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
@@ -7013,9 +7094,8 @@ def connect_with_new_call_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._connect_with_new_call_serialize(
- call_id=call_id,
- calls_connect_with_new_call_request=calls_connect_with_new_call_request,
+ _param = self._conference_stop_recording_serialize(
+ conference_id=conference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -7023,9 +7103,10 @@ def connect_with_new_call_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceAndCall",
+ "200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -7041,10 +7122,9 @@ def connect_with_new_call_with_http_info(
)
@validate_call
- def connect_with_new_call_without_preload_content(
+ def conference_stop_recording_without_preload_content(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_connect_with_new_call_request: CallsConnectWithNewCallRequest,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -7057,14 +7137,12 @@ def connect_with_new_call_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Connect with new call
+ """Stop recording
- Connect an existing call with a new call in a conference.
+ Stop recording a conference.
- :param call_id: Call ID. (required)
- :type call_id: str
- :param calls_connect_with_new_call_request: (required)
- :type calls_connect_with_new_call_request: CallsConnectWithNewCallRequest
+ :param conference_id: Conference ID. (required)
+ :type conference_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
@@ -7087,9 +7165,8 @@ def connect_with_new_call_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._connect_with_new_call_serialize(
- call_id=call_id,
- calls_connect_with_new_call_request=calls_connect_with_new_call_request,
+ _param = self._conference_stop_recording_serialize(
+ conference_id=conference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -7097,9 +7174,10 @@ def connect_with_new_call_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceAndCall",
+ "200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -7110,10 +7188,9 @@ def connect_with_new_call_without_preload_content(
)
return response_data.response
- def _connect_with_new_call_serialize(
+ def _conference_stop_recording_serialize(
self,
- call_id,
- calls_connect_with_new_call_request,
+ conference_id,
_request_auth,
_content_type,
_headers,
@@ -7132,36 +7209,24 @@ def _connect_with_new_call_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if call_id is not None:
- _path_params["callId"] = call_id
+ if conference_id is not None:
+ _path_params["conferenceId"] = conference_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_connect_with_new_call_request is not None:
- _body_params = calls_connect_with_new_call_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/calls/{callId}/connect",
+ resource_path="/calls/1/conferences/{conferenceId}/stop-recording",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -7175,9 +7240,9 @@ def _connect_with_new_call_serialize(
)
@validate_call
- def create_bulk(
+ def connect_calls(
self,
- call_bulk_request: CallBulkRequest,
+ calls_connect_request: CallsConnectRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -7189,13 +7254,13 @@ def create_bulk(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallBulkResponse:
- """Create bulk of calls
+ ) -> CallsConference:
+ """Connect calls
- Create a bulk of outbound calls. Currently, only `PHONE` endpoints are supported. When retry options are specified, bulk calls are retried if they meet internal or client retry criteria. Client retry criteria are met when call reaches the end device and fails. Internal retry criteria are met when call fails before reaching the end device.
+ Connect calls in a conference.
- :param call_bulk_request: (required)
- :type call_bulk_request: CallBulkRequest
+ :param calls_connect_request: (required)
+ :type calls_connect_request: CallsConnectRequest
: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
@@ -7218,8 +7283,8 @@ def create_bulk(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_bulk_serialize(
- call_bulk_request=call_bulk_request,
+ _param = self._connect_calls_serialize(
+ calls_connect_request=calls_connect_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -7227,9 +7292,10 @@ def create_bulk(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallBulkResponse",
+ "200": "CallsConference",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -7245,9 +7311,9 @@ def create_bulk(
).data
@validate_call
- def create_bulk_with_http_info(
+ def connect_calls_with_http_info(
self,
- call_bulk_request: CallBulkRequest,
+ calls_connect_request: CallsConnectRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -7259,13 +7325,13 @@ def create_bulk_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallBulkResponse]:
- """Create bulk of calls
+ ) -> ApiResponse[CallsConference]:
+ """Connect calls
- Create a bulk of outbound calls. Currently, only `PHONE` endpoints are supported. When retry options are specified, bulk calls are retried if they meet internal or client retry criteria. Client retry criteria are met when call reaches the end device and fails. Internal retry criteria are met when call fails before reaching the end device.
+ Connect calls in a conference.
- :param call_bulk_request: (required)
- :type call_bulk_request: CallBulkRequest
+ :param calls_connect_request: (required)
+ :type calls_connect_request: CallsConnectRequest
: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
@@ -7288,8 +7354,8 @@ def create_bulk_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_bulk_serialize(
- call_bulk_request=call_bulk_request,
+ _param = self._connect_calls_serialize(
+ calls_connect_request=calls_connect_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -7297,9 +7363,10 @@ def create_bulk_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallBulkResponse",
+ "200": "CallsConference",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -7315,9 +7382,9 @@ def create_bulk_with_http_info(
)
@validate_call
- def create_bulk_without_preload_content(
+ def connect_calls_without_preload_content(
self,
- call_bulk_request: CallBulkRequest,
+ calls_connect_request: CallsConnectRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -7330,12 +7397,12 @@ def create_bulk_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Create bulk of calls
+ """Connect calls
- Create a bulk of outbound calls. Currently, only `PHONE` endpoints are supported. When retry options are specified, bulk calls are retried if they meet internal or client retry criteria. Client retry criteria are met when call reaches the end device and fails. Internal retry criteria are met when call fails before reaching the end device.
+ Connect calls in a conference.
- :param call_bulk_request: (required)
- :type call_bulk_request: CallBulkRequest
+ :param calls_connect_request: (required)
+ :type calls_connect_request: CallsConnectRequest
: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
@@ -7358,8 +7425,8 @@ def create_bulk_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_bulk_serialize(
- call_bulk_request=call_bulk_request,
+ _param = self._connect_calls_serialize(
+ calls_connect_request=calls_connect_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -7367,9 +7434,10 @@ def create_bulk_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallBulkResponse",
+ "200": "CallsConference",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -7380,9 +7448,9 @@ def create_bulk_without_preload_content(
)
return response_data.response
- def _create_bulk_serialize(
+ def _connect_calls_serialize(
self,
- call_bulk_request,
+ calls_connect_request,
_request_auth,
_content_type,
_headers,
@@ -7405,8 +7473,8 @@ def _create_bulk_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
- if call_bulk_request is not None:
- _body_params = call_bulk_request
+ if calls_connect_request is not None:
+ _body_params = calls_connect_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -7428,7 +7496,7 @@ def _create_bulk_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/bulks",
+ resource_path="/calls/1/connect",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -7442,9 +7510,10 @@ def _create_bulk_serialize(
)
@validate_call
- def create_call(
+ def connect_with_new_call(
self,
- call_request: CallRequest,
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_connect_with_new_call_request: CallsConnectWithNewCallRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -7456,13 +7525,15 @@ def create_call(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> Call:
- """Create call
+ ) -> CallsConferenceAndCall:
+ """Connect with new call
- Create an outbound call to a given endpoint.
+ Connect an existing call with a new call in a conference.
- :param call_request: (required)
- :type call_request: CallRequest
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param calls_connect_with_new_call_request: (required)
+ :type calls_connect_with_new_call_request: CallsConnectWithNewCallRequest
: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
@@ -7485,8 +7556,9 @@ def create_call(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_call_serialize(
- call_request=call_request,
+ _param = self._connect_with_new_call_serialize(
+ call_id=call_id,
+ calls_connect_with_new_call_request=calls_connect_with_new_call_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -7494,9 +7566,10 @@ def create_call(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "Call",
+ "200": "CallsConferenceAndCall",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -7512,9 +7585,10 @@ def create_call(
).data
@validate_call
- def create_call_with_http_info(
+ def connect_with_new_call_with_http_info(
self,
- call_request: CallRequest,
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_connect_with_new_call_request: CallsConnectWithNewCallRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -7526,13 +7600,15 @@ def create_call_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[Call]:
- """Create call
+ ) -> ApiResponse[CallsConferenceAndCall]:
+ """Connect with new call
- Create an outbound call to a given endpoint.
+ Connect an existing call with a new call in a conference.
- :param call_request: (required)
- :type call_request: CallRequest
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param calls_connect_with_new_call_request: (required)
+ :type calls_connect_with_new_call_request: CallsConnectWithNewCallRequest
: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
@@ -7555,8 +7631,9 @@ def create_call_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_call_serialize(
- call_request=call_request,
+ _param = self._connect_with_new_call_serialize(
+ call_id=call_id,
+ calls_connect_with_new_call_request=calls_connect_with_new_call_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -7564,9 +7641,10 @@ def create_call_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "Call",
+ "200": "CallsConferenceAndCall",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -7582,9 +7660,10 @@ def create_call_with_http_info(
)
@validate_call
- def create_call_without_preload_content(
+ def connect_with_new_call_without_preload_content(
self,
- call_request: CallRequest,
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_connect_with_new_call_request: CallsConnectWithNewCallRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -7597,12 +7676,14 @@ def create_call_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Create call
+ """Connect with new call
- Create an outbound call to a given endpoint.
+ Connect an existing call with a new call in a conference.
- :param call_request: (required)
- :type call_request: CallRequest
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param calls_connect_with_new_call_request: (required)
+ :type calls_connect_with_new_call_request: CallsConnectWithNewCallRequest
: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
@@ -7625,8 +7706,9 @@ def create_call_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_call_serialize(
- call_request=call_request,
+ _param = self._connect_with_new_call_serialize(
+ call_id=call_id,
+ calls_connect_with_new_call_request=calls_connect_with_new_call_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -7634,9 +7716,10 @@ def create_call_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "Call",
+ "200": "CallsConferenceAndCall",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -7647,9 +7730,10 @@ def create_call_without_preload_content(
)
return response_data.response
- def _create_call_serialize(
+ def _connect_with_new_call_serialize(
self,
- call_request,
+ call_id,
+ calls_connect_with_new_call_request,
_request_auth,
_content_type,
_headers,
@@ -7668,12 +7752,14 @@ def _create_call_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
+ if call_id is not None:
+ _path_params["callId"] = call_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
- if call_request is not None:
- _body_params = call_request
+ if calls_connect_with_new_call_request is not None:
+ _body_params = calls_connect_with_new_call_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -7695,7 +7781,7 @@ def _create_call_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/calls",
+ resource_path="/calls/1/calls/{callId}/connect",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -7709,9 +7795,9 @@ def _create_call_serialize(
)
@validate_call
- def create_conference(
+ def create_bulk(
self,
- calls_conference_request: CallsConferenceRequest,
+ call_bulk_request: CallBulkRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -7723,13 +7809,13 @@ def create_conference(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsConference:
- """Create conference
+ ) -> CallBulkResponse:
+ """Create bulk of calls
- Create a conference.
+ Create a bulk of outbound calls. Currently, only `PHONE` endpoints are supported. When retry options are specified, bulk calls are retried if they meet internal or client retry criteria. Client retry criteria are met when call reaches the end device and fails. Internal retry criteria are met when call fails before reaching the end device.
- :param calls_conference_request: (required)
- :type calls_conference_request: CallsConferenceRequest
+ :param call_bulk_request: (required)
+ :type call_bulk_request: CallBulkRequest
: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
@@ -7752,8 +7838,8 @@ def create_conference(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_conference_serialize(
- calls_conference_request=calls_conference_request,
+ _param = self._create_bulk_serialize(
+ call_bulk_request=call_bulk_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -7761,9 +7847,10 @@ def create_conference(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsConference",
+ "201": "CallBulkResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -7779,9 +7866,9 @@ def create_conference(
).data
@validate_call
- def create_conference_with_http_info(
+ def create_bulk_with_http_info(
self,
- calls_conference_request: CallsConferenceRequest,
+ call_bulk_request: CallBulkRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -7793,13 +7880,13 @@ def create_conference_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsConference]:
- """Create conference
+ ) -> ApiResponse[CallBulkResponse]:
+ """Create bulk of calls
- Create a conference.
+ Create a bulk of outbound calls. Currently, only `PHONE` endpoints are supported. When retry options are specified, bulk calls are retried if they meet internal or client retry criteria. Client retry criteria are met when call reaches the end device and fails. Internal retry criteria are met when call fails before reaching the end device.
- :param calls_conference_request: (required)
- :type calls_conference_request: CallsConferenceRequest
+ :param call_bulk_request: (required)
+ :type call_bulk_request: CallBulkRequest
: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
@@ -7822,8 +7909,8 @@ def create_conference_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_conference_serialize(
- calls_conference_request=calls_conference_request,
+ _param = self._create_bulk_serialize(
+ call_bulk_request=call_bulk_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -7831,9 +7918,10 @@ def create_conference_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsConference",
+ "201": "CallBulkResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -7849,9 +7937,9 @@ def create_conference_with_http_info(
)
@validate_call
- def create_conference_without_preload_content(
+ def create_bulk_without_preload_content(
self,
- calls_conference_request: CallsConferenceRequest,
+ call_bulk_request: CallBulkRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -7864,12 +7952,12 @@ def create_conference_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Create conference
+ """Create bulk of calls
- Create a conference.
+ Create a bulk of outbound calls. Currently, only `PHONE` endpoints are supported. When retry options are specified, bulk calls are retried if they meet internal or client retry criteria. Client retry criteria are met when call reaches the end device and fails. Internal retry criteria are met when call fails before reaching the end device.
- :param calls_conference_request: (required)
- :type calls_conference_request: CallsConferenceRequest
+ :param call_bulk_request: (required)
+ :type call_bulk_request: CallBulkRequest
: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
@@ -7892,8 +7980,8 @@ def create_conference_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_conference_serialize(
- calls_conference_request=calls_conference_request,
+ _param = self._create_bulk_serialize(
+ call_bulk_request=call_bulk_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -7901,9 +7989,10 @@ def create_conference_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsConference",
+ "201": "CallBulkResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -7914,9 +8003,9 @@ def create_conference_without_preload_content(
)
return response_data.response
- def _create_conference_serialize(
+ def _create_bulk_serialize(
self,
- calls_conference_request,
+ call_bulk_request,
_request_auth,
_content_type,
_headers,
@@ -7939,8 +8028,8 @@ def _create_conference_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_conference_request is not None:
- _body_params = calls_conference_request
+ if call_bulk_request is not None:
+ _body_params = call_bulk_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -7962,7 +8051,7 @@ def _create_conference_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/conferences",
+ resource_path="/calls/1/bulks",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -7976,9 +8065,9 @@ def _create_conference_serialize(
)
@validate_call
- def create_dialog(
+ def create_call(
self,
- calls_dialog_request: CallsDialogRequest,
+ call_request: CallRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -7990,13 +8079,13 @@ def create_dialog(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsDialogResponse:
- """Create dialog
+ ) -> Call:
+ """Create call
- Create a dialog.
+ Create an outbound call to a given endpoint.
- :param calls_dialog_request: (required)
- :type calls_dialog_request: CallsDialogRequest
+ :param call_request: (required)
+ :type call_request: CallRequest
: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
@@ -8019,8 +8108,8 @@ def create_dialog(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_dialog_serialize(
- calls_dialog_request=calls_dialog_request,
+ _param = self._create_call_serialize(
+ call_request=call_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -8028,9 +8117,10 @@ def create_dialog(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsDialogResponse",
+ "201": "Call",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -8046,9 +8136,9 @@ def create_dialog(
).data
@validate_call
- def create_dialog_with_http_info(
+ def create_call_with_http_info(
self,
- calls_dialog_request: CallsDialogRequest,
+ call_request: CallRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -8060,13 +8150,13 @@ def create_dialog_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsDialogResponse]:
- """Create dialog
+ ) -> ApiResponse[Call]:
+ """Create call
- Create a dialog.
+ Create an outbound call to a given endpoint.
- :param calls_dialog_request: (required)
- :type calls_dialog_request: CallsDialogRequest
+ :param call_request: (required)
+ :type call_request: CallRequest
: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
@@ -8089,8 +8179,8 @@ def create_dialog_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_dialog_serialize(
- calls_dialog_request=calls_dialog_request,
+ _param = self._create_call_serialize(
+ call_request=call_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -8098,9 +8188,10 @@ def create_dialog_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsDialogResponse",
+ "201": "Call",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -8116,9 +8207,9 @@ def create_dialog_with_http_info(
)
@validate_call
- def create_dialog_without_preload_content(
+ def create_call_without_preload_content(
self,
- calls_dialog_request: CallsDialogRequest,
+ call_request: CallRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -8131,12 +8222,12 @@ def create_dialog_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Create dialog
+ """Create call
- Create a dialog.
+ Create an outbound call to a given endpoint.
- :param calls_dialog_request: (required)
- :type calls_dialog_request: CallsDialogRequest
+ :param call_request: (required)
+ :type call_request: CallRequest
: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
@@ -8159,8 +8250,8 @@ def create_dialog_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_dialog_serialize(
- calls_dialog_request=calls_dialog_request,
+ _param = self._create_call_serialize(
+ call_request=call_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -8168,9 +8259,10 @@ def create_dialog_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsDialogResponse",
+ "201": "Call",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -8181,9 +8273,9 @@ def create_dialog_without_preload_content(
)
return response_data.response
- def _create_dialog_serialize(
+ def _create_call_serialize(
self,
- calls_dialog_request,
+ call_request,
_request_auth,
_content_type,
_headers,
@@ -8206,8 +8298,8 @@ def _create_dialog_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_dialog_request is not None:
- _body_params = calls_dialog_request
+ if call_request is not None:
+ _body_params = call_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -8229,7 +8321,7 @@ def _create_dialog_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/dialogs",
+ resource_path="/calls/1/calls",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -8243,21 +8335,9 @@ def _create_dialog_serialize(
)
@validate_call
- def create_dialog_with_existing_calls(
+ def create_conference(
self,
- parent_call_id: Annotated[
- StrictStr,
- Field(
- description="Call ID of the parent call to be connected in a dialog."
- ),
- ],
- child_call_id: Annotated[
- StrictStr,
- Field(
- description="Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above."
- ),
- ],
- calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest,
+ calls_conference_request: CallsConferenceRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -8269,17 +8349,13 @@ def create_dialog_with_existing_calls(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsDialogResponse:
- """Create dialog with existing calls
+ ) -> CallsConference:
+ """Create conference
- Create a dialog with existing calls.
+ Create a conference.
- :param parent_call_id: Call ID of the parent call to be connected in a dialog. (required)
- :type parent_call_id: str
- :param child_call_id: Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above. (required)
- :type child_call_id: str
- :param calls_dialog_with_existing_call_request: (required)
- :type calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest
+ :param calls_conference_request: (required)
+ :type calls_conference_request: CallsConferenceRequest
: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
@@ -8302,10 +8378,8 @@ def create_dialog_with_existing_calls(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_dialog_with_existing_calls_serialize(
- parent_call_id=parent_call_id,
- child_call_id=child_call_id,
- calls_dialog_with_existing_call_request=calls_dialog_with_existing_call_request,
+ _param = self._create_conference_serialize(
+ calls_conference_request=calls_conference_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -8313,9 +8387,10 @@ def create_dialog_with_existing_calls(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsDialogResponse",
+ "201": "CallsConference",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -8331,21 +8406,9 @@ def create_dialog_with_existing_calls(
).data
@validate_call
- def create_dialog_with_existing_calls_with_http_info(
+ def create_conference_with_http_info(
self,
- parent_call_id: Annotated[
- StrictStr,
- Field(
- description="Call ID of the parent call to be connected in a dialog."
- ),
- ],
- child_call_id: Annotated[
- StrictStr,
- Field(
- description="Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above."
- ),
- ],
- calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest,
+ calls_conference_request: CallsConferenceRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -8357,17 +8420,13 @@ def create_dialog_with_existing_calls_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsDialogResponse]:
- """Create dialog with existing calls
+ ) -> ApiResponse[CallsConference]:
+ """Create conference
- Create a dialog with existing calls.
+ Create a conference.
- :param parent_call_id: Call ID of the parent call to be connected in a dialog. (required)
- :type parent_call_id: str
- :param child_call_id: Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above. (required)
- :type child_call_id: str
- :param calls_dialog_with_existing_call_request: (required)
- :type calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest
+ :param calls_conference_request: (required)
+ :type calls_conference_request: CallsConferenceRequest
: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
@@ -8390,10 +8449,8 @@ def create_dialog_with_existing_calls_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_dialog_with_existing_calls_serialize(
- parent_call_id=parent_call_id,
- child_call_id=child_call_id,
- calls_dialog_with_existing_call_request=calls_dialog_with_existing_call_request,
+ _param = self._create_conference_serialize(
+ calls_conference_request=calls_conference_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -8401,9 +8458,10 @@ def create_dialog_with_existing_calls_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsDialogResponse",
+ "201": "CallsConference",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -8419,21 +8477,9 @@ def create_dialog_with_existing_calls_with_http_info(
)
@validate_call
- def create_dialog_with_existing_calls_without_preload_content(
+ def create_conference_without_preload_content(
self,
- parent_call_id: Annotated[
- StrictStr,
- Field(
- description="Call ID of the parent call to be connected in a dialog."
- ),
- ],
- child_call_id: Annotated[
- StrictStr,
- Field(
- description="Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above."
- ),
- ],
- calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest,
+ calls_conference_request: CallsConferenceRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -8446,16 +8492,12 @@ def create_dialog_with_existing_calls_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Create dialog with existing calls
+ """Create conference
- Create a dialog with existing calls.
+ Create a conference.
- :param parent_call_id: Call ID of the parent call to be connected in a dialog. (required)
- :type parent_call_id: str
- :param child_call_id: Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above. (required)
- :type child_call_id: str
- :param calls_dialog_with_existing_call_request: (required)
- :type calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest
+ :param calls_conference_request: (required)
+ :type calls_conference_request: CallsConferenceRequest
: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
@@ -8478,10 +8520,8 @@ def create_dialog_with_existing_calls_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_dialog_with_existing_calls_serialize(
- parent_call_id=parent_call_id,
- child_call_id=child_call_id,
- calls_dialog_with_existing_call_request=calls_dialog_with_existing_call_request,
+ _param = self._create_conference_serialize(
+ calls_conference_request=calls_conference_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -8489,9 +8529,10 @@ def create_dialog_with_existing_calls_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsDialogResponse",
+ "201": "CallsConference",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -8502,11 +8543,9 @@ def create_dialog_with_existing_calls_without_preload_content(
)
return response_data.response
- def _create_dialog_with_existing_calls_serialize(
+ def _create_conference_serialize(
self,
- parent_call_id,
- child_call_id,
- calls_dialog_with_existing_call_request,
+ calls_conference_request,
_request_auth,
_content_type,
_headers,
@@ -8525,16 +8564,12 @@ def _create_dialog_with_existing_calls_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if parent_call_id is not None:
- _path_params["parentCallId"] = parent_call_id
- if child_call_id is not None:
- _path_params["childCallId"] = child_call_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_dialog_with_existing_call_request is not None:
- _body_params = calls_dialog_with_existing_call_request
+ if calls_conference_request is not None:
+ _body_params = calls_conference_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -8556,7 +8591,7 @@ def _create_dialog_with_existing_calls_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/dialogs/parent-call/{parentCallId}/child-call/{childCallId}",
+ resource_path="/calls/1/conferences",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -8570,9 +8605,9 @@ def _create_dialog_with_existing_calls_serialize(
)
@validate_call
- def create_media_stream_config(
+ def create_dialog(
self,
- calls_media_stream_config_request: CallsMediaStreamConfigRequest,
+ calls_dialog_request: CallsDialogRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -8584,13 +8619,13 @@ def create_media_stream_config(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsMediaStreamConfigResponse:
- """Create a media-stream configuration
+ ) -> CallsDialogResponse:
+ """Create dialog
- Create a media-stream configuration.
+ Create a dialog.
- :param calls_media_stream_config_request: (required)
- :type calls_media_stream_config_request: CallsMediaStreamConfigRequest
+ :param calls_dialog_request: (required)
+ :type calls_dialog_request: CallsDialogRequest
: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
@@ -8613,8 +8648,8 @@ def create_media_stream_config(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_media_stream_config_serialize(
- calls_media_stream_config_request=calls_media_stream_config_request,
+ _param = self._create_dialog_serialize(
+ calls_dialog_request=calls_dialog_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -8622,9 +8657,11 @@ def create_media_stream_config(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsMediaStreamConfigResponse",
+ "201": "CallsDialogResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -8639,9 +8676,9 @@ def create_media_stream_config(
).data
@validate_call
- def create_media_stream_config_with_http_info(
+ def create_dialog_with_http_info(
self,
- calls_media_stream_config_request: CallsMediaStreamConfigRequest,
+ calls_dialog_request: CallsDialogRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -8653,13 +8690,13 @@ def create_media_stream_config_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsMediaStreamConfigResponse]:
- """Create a media-stream configuration
+ ) -> ApiResponse[CallsDialogResponse]:
+ """Create dialog
- Create a media-stream configuration.
+ Create a dialog.
- :param calls_media_stream_config_request: (required)
- :type calls_media_stream_config_request: CallsMediaStreamConfigRequest
+ :param calls_dialog_request: (required)
+ :type calls_dialog_request: CallsDialogRequest
: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
@@ -8682,8 +8719,8 @@ def create_media_stream_config_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_media_stream_config_serialize(
- calls_media_stream_config_request=calls_media_stream_config_request,
+ _param = self._create_dialog_serialize(
+ calls_dialog_request=calls_dialog_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -8691,9 +8728,11 @@ def create_media_stream_config_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsMediaStreamConfigResponse",
+ "201": "CallsDialogResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -8708,9 +8747,9 @@ def create_media_stream_config_with_http_info(
)
@validate_call
- def create_media_stream_config_without_preload_content(
+ def create_dialog_without_preload_content(
self,
- calls_media_stream_config_request: CallsMediaStreamConfigRequest,
+ calls_dialog_request: CallsDialogRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -8723,12 +8762,12 @@ def create_media_stream_config_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Create a media-stream configuration
+ """Create dialog
- Create a media-stream configuration.
+ Create a dialog.
- :param calls_media_stream_config_request: (required)
- :type calls_media_stream_config_request: CallsMediaStreamConfigRequest
+ :param calls_dialog_request: (required)
+ :type calls_dialog_request: CallsDialogRequest
: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
@@ -8751,8 +8790,8 @@ def create_media_stream_config_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_media_stream_config_serialize(
- calls_media_stream_config_request=calls_media_stream_config_request,
+ _param = self._create_dialog_serialize(
+ calls_dialog_request=calls_dialog_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -8760,9 +8799,11 @@ def create_media_stream_config_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsMediaStreamConfigResponse",
+ "201": "CallsDialogResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -8772,9 +8813,9 @@ def create_media_stream_config_without_preload_content(
)
return response_data.response
- def _create_media_stream_config_serialize(
+ def _create_dialog_serialize(
self,
- calls_media_stream_config_request,
+ calls_dialog_request,
_request_auth,
_content_type,
_headers,
@@ -8797,8 +8838,8 @@ def _create_media_stream_config_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_media_stream_config_request is not None:
- _body_params = calls_media_stream_config_request
+ if calls_dialog_request is not None:
+ _body_params = calls_dialog_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -8820,7 +8861,7 @@ def _create_media_stream_config_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/media-stream-configs",
+ resource_path="/calls/1/dialogs",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -8834,9 +8875,21 @@ def _create_media_stream_config_serialize(
)
@validate_call
- def create_sip_trunk(
+ def create_dialog_with_existing_calls(
self,
- calls_sip_trunk_request: CallsSipTrunkRequest,
+ parent_call_id: Annotated[
+ StrictStr,
+ Field(
+ description="Call ID of the parent call to be connected in a dialog."
+ ),
+ ],
+ child_call_id: Annotated[
+ StrictStr,
+ Field(
+ description="Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above."
+ ),
+ ],
+ calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -8848,13 +8901,17 @@ def create_sip_trunk(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsCreateSipTrunkResponse:
- """Create SIP trunk
+ ) -> CallsDialogResponse:
+ """Create dialog with existing calls
- Create a SIP trunk. Fields not sent in request body will take default values. This operation is asynchronous. The SIP trunk will be created in the background.
+ Create a dialog with existing calls.
- :param calls_sip_trunk_request: (required)
- :type calls_sip_trunk_request: CallsSipTrunkRequest
+ :param parent_call_id: Call ID of the parent call to be connected in a dialog. (required)
+ :type parent_call_id: str
+ :param child_call_id: Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above. (required)
+ :type child_call_id: str
+ :param calls_dialog_with_existing_call_request: (required)
+ :type calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest
: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
@@ -8877,8 +8934,10 @@ def create_sip_trunk(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_sip_trunk_serialize(
- calls_sip_trunk_request=calls_sip_trunk_request,
+ _param = self._create_dialog_with_existing_calls_serialize(
+ parent_call_id=parent_call_id,
+ child_call_id=child_call_id,
+ calls_dialog_with_existing_call_request=calls_dialog_with_existing_call_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -8886,9 +8945,11 @@ def create_sip_trunk(
)
_response_types_map: Dict[str, Optional[str]] = {
- "202": "CallsCreateSipTrunkResponse",
+ "201": "CallsDialogResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -8903,9 +8964,21 @@ def create_sip_trunk(
).data
@validate_call
- def create_sip_trunk_with_http_info(
+ def create_dialog_with_existing_calls_with_http_info(
self,
- calls_sip_trunk_request: CallsSipTrunkRequest,
+ parent_call_id: Annotated[
+ StrictStr,
+ Field(
+ description="Call ID of the parent call to be connected in a dialog."
+ ),
+ ],
+ child_call_id: Annotated[
+ StrictStr,
+ Field(
+ description="Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above."
+ ),
+ ],
+ calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -8917,13 +8990,17 @@ def create_sip_trunk_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsCreateSipTrunkResponse]:
- """Create SIP trunk
+ ) -> ApiResponse[CallsDialogResponse]:
+ """Create dialog with existing calls
- Create a SIP trunk. Fields not sent in request body will take default values. This operation is asynchronous. The SIP trunk will be created in the background.
+ Create a dialog with existing calls.
- :param calls_sip_trunk_request: (required)
- :type calls_sip_trunk_request: CallsSipTrunkRequest
+ :param parent_call_id: Call ID of the parent call to be connected in a dialog. (required)
+ :type parent_call_id: str
+ :param child_call_id: Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above. (required)
+ :type child_call_id: str
+ :param calls_dialog_with_existing_call_request: (required)
+ :type calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest
: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
@@ -8946,8 +9023,10 @@ def create_sip_trunk_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_sip_trunk_serialize(
- calls_sip_trunk_request=calls_sip_trunk_request,
+ _param = self._create_dialog_with_existing_calls_serialize(
+ parent_call_id=parent_call_id,
+ child_call_id=child_call_id,
+ calls_dialog_with_existing_call_request=calls_dialog_with_existing_call_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -8955,9 +9034,11 @@ def create_sip_trunk_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "202": "CallsCreateSipTrunkResponse",
+ "201": "CallsDialogResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -8972,9 +9053,21 @@ def create_sip_trunk_with_http_info(
)
@validate_call
- def create_sip_trunk_without_preload_content(
+ def create_dialog_with_existing_calls_without_preload_content(
self,
- calls_sip_trunk_request: CallsSipTrunkRequest,
+ parent_call_id: Annotated[
+ StrictStr,
+ Field(
+ description="Call ID of the parent call to be connected in a dialog."
+ ),
+ ],
+ child_call_id: Annotated[
+ StrictStr,
+ Field(
+ description="Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above."
+ ),
+ ],
+ calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -8987,12 +9080,16 @@ def create_sip_trunk_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Create SIP trunk
+ """Create dialog with existing calls
- Create a SIP trunk. Fields not sent in request body will take default values. This operation is asynchronous. The SIP trunk will be created in the background.
+ Create a dialog with existing calls.
- :param calls_sip_trunk_request: (required)
- :type calls_sip_trunk_request: CallsSipTrunkRequest
+ :param parent_call_id: Call ID of the parent call to be connected in a dialog. (required)
+ :type parent_call_id: str
+ :param child_call_id: Call ID of the child call to be connected in a dialog. Needs to have been created using [create method](#create-call) with `parentCallId` parameter equal to the parent call ID above. (required)
+ :type child_call_id: str
+ :param calls_dialog_with_existing_call_request: (required)
+ :type calls_dialog_with_existing_call_request: CallsDialogWithExistingCallRequest
: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
@@ -9015,8 +9112,10 @@ def create_sip_trunk_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_sip_trunk_serialize(
- calls_sip_trunk_request=calls_sip_trunk_request,
+ _param = self._create_dialog_with_existing_calls_serialize(
+ parent_call_id=parent_call_id,
+ child_call_id=child_call_id,
+ calls_dialog_with_existing_call_request=calls_dialog_with_existing_call_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -9024,9 +9123,11 @@ def create_sip_trunk_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "202": "CallsCreateSipTrunkResponse",
+ "201": "CallsDialogResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -9036,9 +9137,11 @@ def create_sip_trunk_without_preload_content(
)
return response_data.response
- def _create_sip_trunk_serialize(
+ def _create_dialog_with_existing_calls_serialize(
self,
- calls_sip_trunk_request,
+ parent_call_id,
+ child_call_id,
+ calls_dialog_with_existing_call_request,
_request_auth,
_content_type,
_headers,
@@ -9057,12 +9160,16 @@ def _create_sip_trunk_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
+ if parent_call_id is not None:
+ _path_params["parentCallId"] = parent_call_id
+ if child_call_id is not None:
+ _path_params["childCallId"] = child_call_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_sip_trunk_request is not None:
- _body_params = calls_sip_trunk_request
+ if calls_dialog_with_existing_call_request is not None:
+ _body_params = calls_dialog_with_existing_call_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -9084,7 +9191,7 @@ def _create_sip_trunk_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/sip-trunks",
+ resource_path="/calls/1/dialogs/parent-call/{parentCallId}/child-call/{childCallId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -9098,9 +9205,9 @@ def _create_sip_trunk_serialize(
)
@validate_call
- def create_sip_trunk_service_address(
+ def create_media_stream_config(
self,
- calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest,
+ calls_media_stream_config_request: CallsMediaStreamConfigRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -9112,13 +9219,13 @@ def create_sip_trunk_service_address(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsPublicSipTrunkServiceAddress:
- """Create SIP trunk service address
+ ) -> CallsMediaStreamConfigResponse:
+ """Create a media-stream configuration
- Create a SIP trunk service address.
+ Create a media-stream configuration.
- :param calls_public_sip_trunk_service_address_request: (required)
- :type calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest
+ :param calls_media_stream_config_request: (required)
+ :type calls_media_stream_config_request: CallsMediaStreamConfigRequest
: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
@@ -9141,8 +9248,8 @@ def create_sip_trunk_service_address(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_sip_trunk_service_address_serialize(
- calls_public_sip_trunk_service_address_request=calls_public_sip_trunk_service_address_request,
+ _param = self._create_media_stream_config_serialize(
+ calls_media_stream_config_request=calls_media_stream_config_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -9150,9 +9257,10 @@ def create_sip_trunk_service_address(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsPublicSipTrunkServiceAddress",
+ "201": "CallsMediaStreamConfigResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -9167,9 +9275,9 @@ def create_sip_trunk_service_address(
).data
@validate_call
- def create_sip_trunk_service_address_with_http_info(
+ def create_media_stream_config_with_http_info(
self,
- calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest,
+ calls_media_stream_config_request: CallsMediaStreamConfigRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -9181,13 +9289,13 @@ def create_sip_trunk_service_address_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsPublicSipTrunkServiceAddress]:
- """Create SIP trunk service address
+ ) -> ApiResponse[CallsMediaStreamConfigResponse]:
+ """Create a media-stream configuration
- Create a SIP trunk service address.
+ Create a media-stream configuration.
- :param calls_public_sip_trunk_service_address_request: (required)
- :type calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest
+ :param calls_media_stream_config_request: (required)
+ :type calls_media_stream_config_request: CallsMediaStreamConfigRequest
: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
@@ -9210,8 +9318,8 @@ def create_sip_trunk_service_address_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_sip_trunk_service_address_serialize(
- calls_public_sip_trunk_service_address_request=calls_public_sip_trunk_service_address_request,
+ _param = self._create_media_stream_config_serialize(
+ calls_media_stream_config_request=calls_media_stream_config_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -9219,9 +9327,10 @@ def create_sip_trunk_service_address_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsPublicSipTrunkServiceAddress",
+ "201": "CallsMediaStreamConfigResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -9236,9 +9345,9 @@ def create_sip_trunk_service_address_with_http_info(
)
@validate_call
- def create_sip_trunk_service_address_without_preload_content(
+ def create_media_stream_config_without_preload_content(
self,
- calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest,
+ calls_media_stream_config_request: CallsMediaStreamConfigRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -9251,12 +9360,12 @@ def create_sip_trunk_service_address_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Create SIP trunk service address
+ """Create a media-stream configuration
- Create a SIP trunk service address.
+ Create a media-stream configuration.
- :param calls_public_sip_trunk_service_address_request: (required)
- :type calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest
+ :param calls_media_stream_config_request: (required)
+ :type calls_media_stream_config_request: CallsMediaStreamConfigRequest
: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
@@ -9279,8 +9388,8 @@ def create_sip_trunk_service_address_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._create_sip_trunk_service_address_serialize(
- calls_public_sip_trunk_service_address_request=calls_public_sip_trunk_service_address_request,
+ _param = self._create_media_stream_config_serialize(
+ calls_media_stream_config_request=calls_media_stream_config_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -9288,9 +9397,10 @@ def create_sip_trunk_service_address_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "201": "CallsPublicSipTrunkServiceAddress",
+ "201": "CallsMediaStreamConfigResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -9300,9 +9410,9 @@ def create_sip_trunk_service_address_without_preload_content(
)
return response_data.response
- def _create_sip_trunk_service_address_serialize(
+ def _create_media_stream_config_serialize(
self,
- calls_public_sip_trunk_service_address_request,
+ calls_media_stream_config_request,
_request_auth,
_content_type,
_headers,
@@ -9325,8 +9435,8 @@ def _create_sip_trunk_service_address_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_public_sip_trunk_service_address_request is not None:
- _body_params = calls_public_sip_trunk_service_address_request
+ if calls_media_stream_config_request is not None:
+ _body_params = calls_media_stream_config_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -9348,7 +9458,7 @@ def _create_sip_trunk_service_address_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/sip-trunks/service-addresses",
+ resource_path="/calls/1/media-stream-configs",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -9362,12 +9472,9 @@ def _create_sip_trunk_service_address_serialize(
)
@validate_call
- def delete_call_recordings(
+ def create_sip_trunk(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ calls_sip_trunk_request: CallsSipTrunkRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -9379,15 +9486,13 @@ def delete_call_recordings(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsPublicCallRecording:
- """Delete call recordings
+ ) -> CallsCreateSipTrunkResponse:
+ """Create SIP trunk
- Delete the recordings for a single call.
+ Create a SIP trunk. Fields not sent in request body will take default values. This operation is asynchronous. The SIP trunk will be created in the background.
- :param call_id: Call ID. (required)
- :type call_id: str
- :param location: Recording location.
- :type location: str
+ :param calls_sip_trunk_request: (required)
+ :type calls_sip_trunk_request: CallsSipTrunkRequest
: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
@@ -9410,9 +9515,8 @@ def delete_call_recordings(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_call_recordings_serialize(
- call_id=call_id,
- location=location,
+ _param = self._create_sip_trunk_serialize(
+ calls_sip_trunk_request=calls_sip_trunk_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -9420,9 +9524,10 @@ def delete_call_recordings(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicCallRecording",
+ "202": "CallsCreateSipTrunkResponse",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -9437,12 +9542,9 @@ def delete_call_recordings(
).data
@validate_call
- def delete_call_recordings_with_http_info(
+ def create_sip_trunk_with_http_info(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ calls_sip_trunk_request: CallsSipTrunkRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -9454,15 +9556,13 @@ def delete_call_recordings_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsPublicCallRecording]:
- """Delete call recordings
+ ) -> ApiResponse[CallsCreateSipTrunkResponse]:
+ """Create SIP trunk
- Delete the recordings for a single call.
+ Create a SIP trunk. Fields not sent in request body will take default values. This operation is asynchronous. The SIP trunk will be created in the background.
- :param call_id: Call ID. (required)
- :type call_id: str
- :param location: Recording location.
- :type location: str
+ :param calls_sip_trunk_request: (required)
+ :type calls_sip_trunk_request: CallsSipTrunkRequest
: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
@@ -9485,9 +9585,8 @@ def delete_call_recordings_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_call_recordings_serialize(
- call_id=call_id,
- location=location,
+ _param = self._create_sip_trunk_serialize(
+ calls_sip_trunk_request=calls_sip_trunk_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -9495,9 +9594,10 @@ def delete_call_recordings_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicCallRecording",
+ "202": "CallsCreateSipTrunkResponse",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -9512,12 +9612,9 @@ def delete_call_recordings_with_http_info(
)
@validate_call
- def delete_call_recordings_without_preload_content(
+ def create_sip_trunk_without_preload_content(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ calls_sip_trunk_request: CallsSipTrunkRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -9530,14 +9627,12 @@ def delete_call_recordings_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Delete call recordings
+ """Create SIP trunk
- Delete the recordings for a single call.
+ Create a SIP trunk. Fields not sent in request body will take default values. This operation is asynchronous. The SIP trunk will be created in the background.
- :param call_id: Call ID. (required)
- :type call_id: str
- :param location: Recording location.
- :type location: str
+ :param calls_sip_trunk_request: (required)
+ :type calls_sip_trunk_request: CallsSipTrunkRequest
: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
@@ -9560,9 +9655,8 @@ def delete_call_recordings_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_call_recordings_serialize(
- call_id=call_id,
- location=location,
+ _param = self._create_sip_trunk_serialize(
+ calls_sip_trunk_request=calls_sip_trunk_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -9570,9 +9664,10 @@ def delete_call_recordings_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicCallRecording",
+ "202": "CallsCreateSipTrunkResponse",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -9582,10 +9677,9 @@ def delete_call_recordings_without_preload_content(
)
return response_data.response
- def _delete_call_recordings_serialize(
+ def _create_sip_trunk_serialize(
self,
- call_id,
- location,
+ calls_sip_trunk_request,
_request_auth,
_content_type,
_headers,
@@ -9604,30 +9698,36 @@ def _delete_call_recordings_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if call_id is not None:
- _path_params["callId"] = call_id
# process the query parameters
- if location is not None:
-
- _query_params.append(("location", location))
-
# process the header parameters
# process the form parameters
# process the body parameter
+ if calls_sip_trunk_request is not None:
+ _body_params = calls_sip_trunk_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
["application/json"]
)
- # authentication setting
- _auth_settings: List[str] = ["APIKeyHeader"]
-
- return self.api_client.param_serialize(
- method="DELETE",
- resource_path="/calls/1/recordings/calls/{callId}",
- path_params=_path_params,
- query_params=_query_params,
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/calls/1/sip-trunks",
+ path_params=_path_params,
+ query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
@@ -9639,9 +9739,9 @@ def _delete_call_recordings_serialize(
)
@validate_call
- def delete_calls_file(
+ def create_sip_trunk_service_address(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
+ calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -9653,13 +9753,13 @@ def delete_calls_file(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsFile:
- """Delete file
+ ) -> CallsPublicSipTrunkServiceAddress:
+ """Create SIP trunk service address
- Delete a file.
+ Create a SIP trunk service address.
- :param file_id: File ID. (required)
- :type file_id: str
+ :param calls_public_sip_trunk_service_address_request: (required)
+ :type calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest
: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
@@ -9682,8 +9782,8 @@ def delete_calls_file(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_calls_file_serialize(
- file_id=file_id,
+ _param = self._create_sip_trunk_service_address_serialize(
+ calls_public_sip_trunk_service_address_request=calls_public_sip_trunk_service_address_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -9691,8 +9791,10 @@ def delete_calls_file(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsFile",
+ "201": "CallsPublicSipTrunkServiceAddress",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -9707,9 +9809,9 @@ def delete_calls_file(
).data
@validate_call
- def delete_calls_file_with_http_info(
+ def create_sip_trunk_service_address_with_http_info(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
+ calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -9721,13 +9823,13 @@ def delete_calls_file_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsFile]:
- """Delete file
+ ) -> ApiResponse[CallsPublicSipTrunkServiceAddress]:
+ """Create SIP trunk service address
- Delete a file.
+ Create a SIP trunk service address.
- :param file_id: File ID. (required)
- :type file_id: str
+ :param calls_public_sip_trunk_service_address_request: (required)
+ :type calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest
: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
@@ -9750,8 +9852,8 @@ def delete_calls_file_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_calls_file_serialize(
- file_id=file_id,
+ _param = self._create_sip_trunk_service_address_serialize(
+ calls_public_sip_trunk_service_address_request=calls_public_sip_trunk_service_address_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -9759,8 +9861,10 @@ def delete_calls_file_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsFile",
+ "201": "CallsPublicSipTrunkServiceAddress",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -9775,9 +9879,9 @@ def delete_calls_file_with_http_info(
)
@validate_call
- def delete_calls_file_without_preload_content(
+ def create_sip_trunk_service_address_without_preload_content(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
+ calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -9790,12 +9894,12 @@ def delete_calls_file_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Delete file
+ """Create SIP trunk service address
- Delete a file.
+ Create a SIP trunk service address.
- :param file_id: File ID. (required)
- :type file_id: str
+ :param calls_public_sip_trunk_service_address_request: (required)
+ :type calls_public_sip_trunk_service_address_request: CallsPublicSipTrunkServiceAddressRequest
: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
@@ -9818,8 +9922,8 @@ def delete_calls_file_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_calls_file_serialize(
- file_id=file_id,
+ _param = self._create_sip_trunk_service_address_serialize(
+ calls_public_sip_trunk_service_address_request=calls_public_sip_trunk_service_address_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -9827,8 +9931,10 @@ def delete_calls_file_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsFile",
+ "201": "CallsPublicSipTrunkServiceAddress",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -9838,9 +9944,9 @@ def delete_calls_file_without_preload_content(
)
return response_data.response
- def _delete_calls_file_serialize(
+ def _create_sip_trunk_service_address_serialize(
self,
- file_id,
+ calls_public_sip_trunk_service_address_request,
_request_auth,
_content_type,
_headers,
@@ -9859,24 +9965,34 @@ def _delete_calls_file_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if file_id is not None:
- _path_params["fileId"] = file_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
+ if calls_public_sip_trunk_service_address_request is not None:
+ _body_params = calls_public_sip_trunk_service_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
- method="DELETE",
- resource_path="/calls/1/files/{fileId}",
+ method="POST",
+ resource_path="/calls/1/sip-trunks/service-addresses",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -9890,11 +10006,11 @@ def _delete_calls_file_serialize(
)
@validate_call
- def delete_conference_recordings(
+ def delete_call_recordings(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
] = None,
_request_timeout: Union[
None,
@@ -9907,15 +10023,15 @@ def delete_conference_recordings(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsPublicConferenceRecording:
- """Delete conference recordings
+ ) -> CallRecording:
+ """Delete call recordings
- Delete the recordings for a single conference.
+ Delete the recordings for a single call.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
+ :param call_id: Call ID. (required)
+ :type call_id: str
:param location: Recording location.
- :type location: str
+ :type location: CallsRecordingLocation
: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
@@ -9938,8 +10054,8 @@ def delete_conference_recordings(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_conference_recordings_serialize(
- conference_id=conference_id,
+ _param = self._delete_call_recordings_serialize(
+ call_id=call_id,
location=location,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -9948,8 +10064,9 @@ def delete_conference_recordings(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicConferenceRecording",
+ "200": "CallRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -9965,11 +10082,11 @@ def delete_conference_recordings(
).data
@validate_call
- def delete_conference_recordings_with_http_info(
+ def delete_call_recordings_with_http_info(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
] = None,
_request_timeout: Union[
None,
@@ -9982,15 +10099,15 @@ def delete_conference_recordings_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsPublicConferenceRecording]:
- """Delete conference recordings
+ ) -> ApiResponse[CallRecording]:
+ """Delete call recordings
- Delete the recordings for a single conference.
+ Delete the recordings for a single call.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
+ :param call_id: Call ID. (required)
+ :type call_id: str
:param location: Recording location.
- :type location: str
+ :type location: CallsRecordingLocation
: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
@@ -10013,8 +10130,8 @@ def delete_conference_recordings_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_conference_recordings_serialize(
- conference_id=conference_id,
+ _param = self._delete_call_recordings_serialize(
+ call_id=call_id,
location=location,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -10023,8 +10140,9 @@ def delete_conference_recordings_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicConferenceRecording",
+ "200": "CallRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -10040,11 +10158,11 @@ def delete_conference_recordings_with_http_info(
)
@validate_call
- def delete_conference_recordings_without_preload_content(
+ def delete_call_recordings_without_preload_content(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
] = None,
_request_timeout: Union[
None,
@@ -10058,14 +10176,14 @@ def delete_conference_recordings_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Delete conference recordings
+ """Delete call recordings
- Delete the recordings for a single conference.
+ Delete the recordings for a single call.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
+ :param call_id: Call ID. (required)
+ :type call_id: str
:param location: Recording location.
- :type location: str
+ :type location: CallsRecordingLocation
: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
@@ -10088,8 +10206,8 @@ def delete_conference_recordings_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_conference_recordings_serialize(
- conference_id=conference_id,
+ _param = self._delete_call_recordings_serialize(
+ call_id=call_id,
location=location,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -10098,8 +10216,9 @@ def delete_conference_recordings_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicConferenceRecording",
+ "200": "CallRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -10110,9 +10229,9 @@ def delete_conference_recordings_without_preload_content(
)
return response_data.response
- def _delete_conference_recordings_serialize(
+ def _delete_call_recordings_serialize(
self,
- conference_id,
+ call_id,
location,
_request_auth,
_content_type,
@@ -10132,12 +10251,12 @@ def _delete_conference_recordings_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if conference_id is not None:
- _path_params["conferenceId"] = conference_id
+ if call_id is not None:
+ _path_params["callId"] = call_id
# process the query parameters
if location is not None:
- _query_params.append(("location", location))
+ _query_params.append(("location", location.value))
# process the header parameters
# process the form parameters
@@ -10153,7 +10272,7 @@ def _delete_conference_recordings_serialize(
return self.api_client.param_serialize(
method="DELETE",
- resource_path="/calls/1/recordings/conferences/{conferenceId}",
+ resource_path="/calls/1/recordings/calls/{callId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -10167,12 +10286,9 @@ def _delete_conference_recordings_serialize(
)
@validate_call
- def delete_dialog_recordings(
+ def delete_calls_file(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -10184,15 +10300,13 @@ def delete_dialog_recordings(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsPublicDialogRecording:
- """Delete dialog recordings
+ ) -> CallsFile:
+ """Delete file
- Delete the recordings for a single dialog.
+ Delete a file.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param location: Recording location.
- :type location: str
+ :param file_id: File ID. (required)
+ :type file_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
@@ -10215,9 +10329,8 @@ def delete_dialog_recordings(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_dialog_recordings_serialize(
- dialog_id=dialog_id,
- location=location,
+ _param = self._delete_calls_file_serialize(
+ file_id=file_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -10225,8 +10338,9 @@ def delete_dialog_recordings(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicDialogRecording",
+ "200": "CallsFile",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -10242,12 +10356,9 @@ def delete_dialog_recordings(
).data
@validate_call
- def delete_dialog_recordings_with_http_info(
+ def delete_calls_file_with_http_info(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -10259,15 +10370,13 @@ def delete_dialog_recordings_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsPublicDialogRecording]:
- """Delete dialog recordings
+ ) -> ApiResponse[CallsFile]:
+ """Delete file
- Delete the recordings for a single dialog.
+ Delete a file.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param location: Recording location.
- :type location: str
+ :param file_id: File ID. (required)
+ :type file_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
@@ -10290,9 +10399,8 @@ def delete_dialog_recordings_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_dialog_recordings_serialize(
- dialog_id=dialog_id,
- location=location,
+ _param = self._delete_calls_file_serialize(
+ file_id=file_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -10300,8 +10408,9 @@ def delete_dialog_recordings_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicDialogRecording",
+ "200": "CallsFile",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -10317,12 +10426,9 @@ def delete_dialog_recordings_with_http_info(
)
@validate_call
- def delete_dialog_recordings_without_preload_content(
+ def delete_calls_file_without_preload_content(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -10335,14 +10441,12 @@ def delete_dialog_recordings_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Delete dialog recordings
+ """Delete file
- Delete the recordings for a single dialog.
+ Delete a file.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param location: Recording location.
- :type location: str
+ :param file_id: File ID. (required)
+ :type file_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
@@ -10365,9 +10469,8 @@ def delete_dialog_recordings_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_dialog_recordings_serialize(
- dialog_id=dialog_id,
- location=location,
+ _param = self._delete_calls_file_serialize(
+ file_id=file_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -10375,8 +10478,9 @@ def delete_dialog_recordings_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicDialogRecording",
+ "200": "CallsFile",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -10387,10 +10491,9 @@ def delete_dialog_recordings_without_preload_content(
)
return response_data.response
- def _delete_dialog_recordings_serialize(
+ def _delete_calls_file_serialize(
self,
- dialog_id,
- location,
+ file_id,
_request_auth,
_content_type,
_headers,
@@ -10409,13 +10512,9 @@ def _delete_dialog_recordings_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if dialog_id is not None:
- _path_params["dialogId"] = dialog_id
+ if file_id is not None:
+ _path_params["fileId"] = file_id
# process the query parameters
- if location is not None:
-
- _query_params.append(("location", location))
-
# process the header parameters
# process the form parameters
# process the body parameter
@@ -10430,7 +10529,7 @@ def _delete_dialog_recordings_serialize(
return self.api_client.param_serialize(
method="DELETE",
- resource_path="/calls/1/recordings/dialogs/{dialogId}",
+ resource_path="/calls/1/files/{fileId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -10444,11 +10543,12 @@ def _delete_dialog_recordings_serialize(
)
@validate_call
- def delete_media_stream_config(
+ def delete_conference_recordings(
self,
- media_stream_config_id: Annotated[
- StrictStr, Field(description="Media-stream configuration ID.")
- ],
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -10460,13 +10560,15 @@ def delete_media_stream_config(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsMediaStreamConfigResponse:
- """Delete a media-stream configuration
+ ) -> CallsConferenceRecording:
+ """Delete conference recordings
- Delete a media-stream configuration.
+ Delete the recordings for a single conference.
- :param media_stream_config_id: Media-stream configuration ID. (required)
- :type media_stream_config_id: str
+ :param conference_id: Conference ID. (required)
+ :type conference_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -10489,8 +10591,9 @@ def delete_media_stream_config(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_media_stream_config_serialize(
- media_stream_config_id=media_stream_config_id,
+ _param = self._delete_conference_recordings_serialize(
+ conference_id=conference_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -10498,8 +10601,9 @@ def delete_media_stream_config(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsMediaStreamConfigResponse",
+ "200": "CallsConferenceRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -10515,11 +10619,12 @@ def delete_media_stream_config(
).data
@validate_call
- def delete_media_stream_config_with_http_info(
+ def delete_conference_recordings_with_http_info(
self,
- media_stream_config_id: Annotated[
- StrictStr, Field(description="Media-stream configuration ID.")
- ],
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -10531,13 +10636,15 @@ def delete_media_stream_config_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsMediaStreamConfigResponse]:
- """Delete a media-stream configuration
+ ) -> ApiResponse[CallsConferenceRecording]:
+ """Delete conference recordings
- Delete a media-stream configuration.
+ Delete the recordings for a single conference.
- :param media_stream_config_id: Media-stream configuration ID. (required)
- :type media_stream_config_id: str
+ :param conference_id: Conference ID. (required)
+ :type conference_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -10560,8 +10667,9 @@ def delete_media_stream_config_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_media_stream_config_serialize(
- media_stream_config_id=media_stream_config_id,
+ _param = self._delete_conference_recordings_serialize(
+ conference_id=conference_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -10569,8 +10677,9 @@ def delete_media_stream_config_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsMediaStreamConfigResponse",
+ "200": "CallsConferenceRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -10586,11 +10695,12 @@ def delete_media_stream_config_with_http_info(
)
@validate_call
- def delete_media_stream_config_without_preload_content(
+ def delete_conference_recordings_without_preload_content(
self,
- media_stream_config_id: Annotated[
- StrictStr, Field(description="Media-stream configuration ID.")
- ],
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -10603,12 +10713,14 @@ def delete_media_stream_config_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Delete a media-stream configuration
+ """Delete conference recordings
- Delete a media-stream configuration.
+ Delete the recordings for a single conference.
- :param media_stream_config_id: Media-stream configuration ID. (required)
- :type media_stream_config_id: str
+ :param conference_id: Conference ID. (required)
+ :type conference_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -10631,8 +10743,9 @@ def delete_media_stream_config_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_media_stream_config_serialize(
- media_stream_config_id=media_stream_config_id,
+ _param = self._delete_conference_recordings_serialize(
+ conference_id=conference_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -10640,8 +10753,9 @@ def delete_media_stream_config_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsMediaStreamConfigResponse",
+ "200": "CallsConferenceRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -10652,9 +10766,10 @@ def delete_media_stream_config_without_preload_content(
)
return response_data.response
- def _delete_media_stream_config_serialize(
+ def _delete_conference_recordings_serialize(
self,
- media_stream_config_id,
+ conference_id,
+ location,
_request_auth,
_content_type,
_headers,
@@ -10673,9 +10788,13 @@ def _delete_media_stream_config_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if media_stream_config_id is not None:
- _path_params["mediaStreamConfigId"] = media_stream_config_id
+ if conference_id is not None:
+ _path_params["conferenceId"] = conference_id
# process the query parameters
+ if location is not None:
+
+ _query_params.append(("location", location.value))
+
# process the header parameters
# process the form parameters
# process the body parameter
@@ -10690,7 +10809,7 @@ def _delete_media_stream_config_serialize(
return self.api_client.param_serialize(
method="DELETE",
- resource_path="/calls/1/media-stream-configs/{mediaStreamConfigId}",
+ resource_path="/calls/1/recordings/conferences/{conferenceId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -10704,11 +10823,11 @@ def _delete_media_stream_config_serialize(
)
@validate_call
- def delete_recording_file(
+ def delete_dialog_recordings(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
] = None,
_request_timeout: Union[
None,
@@ -10721,15 +10840,15 @@ def delete_recording_file(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsPublicRecordingFile:
- """Delete recording file
+ ) -> CallsDialogRecordingResponse:
+ """Delete dialog recordings
- Delete a single file from a call or conference recording. The call or conference recording metadata will still exist after deleting the file, but the file will not show up anymore in the file list of that call or conference recording.
+ Delete the recordings for a single dialog.
- :param file_id: File ID. (required)
- :type file_id: str
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_id: str
:param location: Recording location.
- :type location: str
+ :type location: CallsRecordingLocation
: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
@@ -10752,8 +10871,8 @@ def delete_recording_file(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_recording_file_serialize(
- file_id=file_id,
+ _param = self._delete_dialog_recordings_serialize(
+ dialog_id=dialog_id,
location=location,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -10762,8 +10881,9 @@ def delete_recording_file(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicRecordingFile",
+ "200": "CallsDialogRecordingResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -10779,11 +10899,11 @@ def delete_recording_file(
).data
@validate_call
- def delete_recording_file_with_http_info(
+ def delete_dialog_recordings_with_http_info(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
] = None,
_request_timeout: Union[
None,
@@ -10796,15 +10916,15 @@ def delete_recording_file_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsPublicRecordingFile]:
- """Delete recording file
+ ) -> ApiResponse[CallsDialogRecordingResponse]:
+ """Delete dialog recordings
- Delete a single file from a call or conference recording. The call or conference recording metadata will still exist after deleting the file, but the file will not show up anymore in the file list of that call or conference recording.
+ Delete the recordings for a single dialog.
- :param file_id: File ID. (required)
- :type file_id: str
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_id: str
:param location: Recording location.
- :type location: str
+ :type location: CallsRecordingLocation
: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
@@ -10827,8 +10947,8 @@ def delete_recording_file_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_recording_file_serialize(
- file_id=file_id,
+ _param = self._delete_dialog_recordings_serialize(
+ dialog_id=dialog_id,
location=location,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -10837,8 +10957,9 @@ def delete_recording_file_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicRecordingFile",
+ "200": "CallsDialogRecordingResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -10854,11 +10975,11 @@ def delete_recording_file_with_http_info(
)
@validate_call
- def delete_recording_file_without_preload_content(
+ def delete_dialog_recordings_without_preload_content(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
] = None,
_request_timeout: Union[
None,
@@ -10872,14 +10993,14 @@ def delete_recording_file_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Delete recording file
+ """Delete dialog recordings
- Delete a single file from a call or conference recording. The call or conference recording metadata will still exist after deleting the file, but the file will not show up anymore in the file list of that call or conference recording.
+ Delete the recordings for a single dialog.
- :param file_id: File ID. (required)
- :type file_id: str
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_id: str
:param location: Recording location.
- :type location: str
+ :type location: CallsRecordingLocation
: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
@@ -10902,8 +11023,8 @@ def delete_recording_file_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_recording_file_serialize(
- file_id=file_id,
+ _param = self._delete_dialog_recordings_serialize(
+ dialog_id=dialog_id,
location=location,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -10912,8 +11033,9 @@ def delete_recording_file_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicRecordingFile",
+ "200": "CallsDialogRecordingResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -10924,9 +11046,9 @@ def delete_recording_file_without_preload_content(
)
return response_data.response
- def _delete_recording_file_serialize(
+ def _delete_dialog_recordings_serialize(
self,
- file_id,
+ dialog_id,
location,
_request_auth,
_content_type,
@@ -10946,12 +11068,12 @@ def _delete_recording_file_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if file_id is not None:
- _path_params["fileId"] = file_id
+ if dialog_id is not None:
+ _path_params["dialogId"] = dialog_id
# process the query parameters
if location is not None:
- _query_params.append(("location", location))
+ _query_params.append(("location", location.value))
# process the header parameters
# process the form parameters
@@ -10967,7 +11089,7 @@ def _delete_recording_file_serialize(
return self.api_client.param_serialize(
method="DELETE",
- resource_path="/calls/1/recordings/files/{fileId}",
+ resource_path="/calls/1/recordings/dialogs/{dialogId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -10981,9 +11103,11 @@ def _delete_recording_file_serialize(
)
@validate_call
- def delete_sip_trunk(
+ def delete_media_stream_config(
self,
- sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
+ media_stream_config_id: Annotated[
+ StrictStr, Field(description="Media-stream configuration ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -10995,13 +11119,13 @@ def delete_sip_trunk(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsSipTrunkResponse:
- """Delete SIP trunk
+ ) -> CallsMediaStreamConfigResponse:
+ """Delete a media-stream configuration
- Delete a SIP trunk. This operation is asynchronous. The SIP trunk will be deleted in the background.
+ Delete a media-stream configuration.
- :param sip_trunk_id: SIP trunk ID. (required)
- :type sip_trunk_id: str
+ :param media_stream_config_id: Media-stream configuration ID. (required)
+ :type media_stream_config_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
@@ -11024,8 +11148,8 @@ def delete_sip_trunk(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_sip_trunk_serialize(
- sip_trunk_id=sip_trunk_id,
+ _param = self._delete_media_stream_config_serialize(
+ media_stream_config_id=media_stream_config_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11033,8 +11157,9 @@ def delete_sip_trunk(
)
_response_types_map: Dict[str, Optional[str]] = {
- "202": "CallsSipTrunkResponse",
+ "200": "CallsMediaStreamConfigResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -11050,9 +11175,11 @@ def delete_sip_trunk(
).data
@validate_call
- def delete_sip_trunk_with_http_info(
+ def delete_media_stream_config_with_http_info(
self,
- sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
+ media_stream_config_id: Annotated[
+ StrictStr, Field(description="Media-stream configuration ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -11064,13 +11191,13 @@ def delete_sip_trunk_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsSipTrunkResponse]:
- """Delete SIP trunk
+ ) -> ApiResponse[CallsMediaStreamConfigResponse]:
+ """Delete a media-stream configuration
- Delete a SIP trunk. This operation is asynchronous. The SIP trunk will be deleted in the background.
+ Delete a media-stream configuration.
- :param sip_trunk_id: SIP trunk ID. (required)
- :type sip_trunk_id: str
+ :param media_stream_config_id: Media-stream configuration ID. (required)
+ :type media_stream_config_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
@@ -11093,8 +11220,8 @@ def delete_sip_trunk_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_sip_trunk_serialize(
- sip_trunk_id=sip_trunk_id,
+ _param = self._delete_media_stream_config_serialize(
+ media_stream_config_id=media_stream_config_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11102,8 +11229,9 @@ def delete_sip_trunk_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "202": "CallsSipTrunkResponse",
+ "200": "CallsMediaStreamConfigResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -11119,9 +11247,11 @@ def delete_sip_trunk_with_http_info(
)
@validate_call
- def delete_sip_trunk_without_preload_content(
+ def delete_media_stream_config_without_preload_content(
self,
- sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
+ media_stream_config_id: Annotated[
+ StrictStr, Field(description="Media-stream configuration ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -11134,12 +11264,12 @@ def delete_sip_trunk_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Delete SIP trunk
+ """Delete a media-stream configuration
- Delete a SIP trunk. This operation is asynchronous. The SIP trunk will be deleted in the background.
+ Delete a media-stream configuration.
- :param sip_trunk_id: SIP trunk ID. (required)
- :type sip_trunk_id: str
+ :param media_stream_config_id: Media-stream configuration ID. (required)
+ :type media_stream_config_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
@@ -11162,8 +11292,8 @@ def delete_sip_trunk_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_sip_trunk_serialize(
- sip_trunk_id=sip_trunk_id,
+ _param = self._delete_media_stream_config_serialize(
+ media_stream_config_id=media_stream_config_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11171,8 +11301,9 @@ def delete_sip_trunk_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "202": "CallsSipTrunkResponse",
+ "200": "CallsMediaStreamConfigResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -11183,9 +11314,9 @@ def delete_sip_trunk_without_preload_content(
)
return response_data.response
- def _delete_sip_trunk_serialize(
+ def _delete_media_stream_config_serialize(
self,
- sip_trunk_id,
+ media_stream_config_id,
_request_auth,
_content_type,
_headers,
@@ -11204,8 +11335,8 @@ def _delete_sip_trunk_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if sip_trunk_id is not None:
- _path_params["sipTrunkId"] = sip_trunk_id
+ if media_stream_config_id is not None:
+ _path_params["mediaStreamConfigId"] = media_stream_config_id
# process the query parameters
# process the header parameters
# process the form parameters
@@ -11221,7 +11352,7 @@ def _delete_sip_trunk_serialize(
return self.api_client.param_serialize(
method="DELETE",
- resource_path="/calls/1/sip-trunks/{sipTrunkId}",
+ resource_path="/calls/1/media-stream-configs/{mediaStreamConfigId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -11235,11 +11366,12 @@ def _delete_sip_trunk_serialize(
)
@validate_call
- def delete_sip_trunk_service_address(
+ def delete_recording_file(
self,
- sip_trunk_service_address_id: Annotated[
- StrictStr, Field(description="SIP trunk service address ID.")
- ],
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -11251,13 +11383,15 @@ def delete_sip_trunk_service_address(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsPublicSipTrunkServiceAddress:
- """Delete SIP trunk service address
+ ) -> CallsRecordingFile:
+ """Delete recording file
- Delete SIP trunk service address.
+ Delete a single file from a call or conference recording. The call or conference recording metadata will still exist after deleting the file, but the file will not show up anymore in the file list of that call or conference recording.
- :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
- :type sip_trunk_service_address_id: str
+ :param file_id: File ID. (required)
+ :type file_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -11280,8 +11414,9 @@ def delete_sip_trunk_service_address(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_sip_trunk_service_address_serialize(
- sip_trunk_service_address_id=sip_trunk_service_address_id,
+ _param = self._delete_recording_file_serialize(
+ file_id=file_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11289,10 +11424,10 @@ def delete_sip_trunk_service_address(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicSipTrunkServiceAddress",
- "400": "ApiException",
+ "200": "CallsRecordingFile",
"401": "ApiException",
"403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -11307,11 +11442,12 @@ def delete_sip_trunk_service_address(
).data
@validate_call
- def delete_sip_trunk_service_address_with_http_info(
+ def delete_recording_file_with_http_info(
self,
- sip_trunk_service_address_id: Annotated[
- StrictStr, Field(description="SIP trunk service address ID.")
- ],
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -11323,13 +11459,15 @@ def delete_sip_trunk_service_address_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsPublicSipTrunkServiceAddress]:
- """Delete SIP trunk service address
+ ) -> ApiResponse[CallsRecordingFile]:
+ """Delete recording file
- Delete SIP trunk service address.
+ Delete a single file from a call or conference recording. The call or conference recording metadata will still exist after deleting the file, but the file will not show up anymore in the file list of that call or conference recording.
- :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
- :type sip_trunk_service_address_id: str
+ :param file_id: File ID. (required)
+ :type file_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -11352,8 +11490,9 @@ def delete_sip_trunk_service_address_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_sip_trunk_service_address_serialize(
- sip_trunk_service_address_id=sip_trunk_service_address_id,
+ _param = self._delete_recording_file_serialize(
+ file_id=file_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11361,10 +11500,10 @@ def delete_sip_trunk_service_address_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicSipTrunkServiceAddress",
- "400": "ApiException",
+ "200": "CallsRecordingFile",
"401": "ApiException",
"403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -11379,11 +11518,12 @@ def delete_sip_trunk_service_address_with_http_info(
)
@validate_call
- def delete_sip_trunk_service_address_without_preload_content(
+ def delete_recording_file_without_preload_content(
self,
- sip_trunk_service_address_id: Annotated[
- StrictStr, Field(description="SIP trunk service address ID.")
- ],
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -11396,12 +11536,14 @@ def delete_sip_trunk_service_address_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Delete SIP trunk service address
+ """Delete recording file
- Delete SIP trunk service address.
+ Delete a single file from a call or conference recording. The call or conference recording metadata will still exist after deleting the file, but the file will not show up anymore in the file list of that call or conference recording.
- :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
- :type sip_trunk_service_address_id: str
+ :param file_id: File ID. (required)
+ :type file_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -11424,8 +11566,9 @@ def delete_sip_trunk_service_address_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._delete_sip_trunk_service_address_serialize(
- sip_trunk_service_address_id=sip_trunk_service_address_id,
+ _param = self._delete_recording_file_serialize(
+ file_id=file_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11433,10 +11576,10 @@ def delete_sip_trunk_service_address_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicSipTrunkServiceAddress",
- "400": "ApiException",
+ "200": "CallsRecordingFile",
"401": "ApiException",
"403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -11446,9 +11589,10 @@ def delete_sip_trunk_service_address_without_preload_content(
)
return response_data.response
- def _delete_sip_trunk_service_address_serialize(
+ def _delete_recording_file_serialize(
self,
- sip_trunk_service_address_id,
+ file_id,
+ location,
_request_auth,
_content_type,
_headers,
@@ -11467,9 +11611,13 @@ def _delete_sip_trunk_service_address_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if sip_trunk_service_address_id is not None:
- _path_params["sipTrunkServiceAddressId"] = sip_trunk_service_address_id
+ if file_id is not None:
+ _path_params["fileId"] = file_id
# process the query parameters
+ if location is not None:
+
+ _query_params.append(("location", location.value))
+
# process the header parameters
# process the form parameters
# process the body parameter
@@ -11484,7 +11632,7 @@ def _delete_sip_trunk_service_address_serialize(
return self.api_client.param_serialize(
method="DELETE",
- resource_path="/calls/1/sip-trunks/service-addresses/{sipTrunkServiceAddressId}",
+ resource_path="/calls/1/recordings/files/{fileId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -11498,10 +11646,9 @@ def _delete_sip_trunk_service_address_serialize(
)
@validate_call
- def dialog_broadcast_webrtc_text(
+ def delete_sip_trunk(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest,
+ sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -11513,15 +11660,13 @@ def dialog_broadcast_webrtc_text(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsActionResponse:
- """Broadcast text
+ ) -> CallsSipTrunkResponse:
+ """Delete SIP trunk
- Broadcasts a text message to dialog WebRTC call legs with open data channel.
+ Delete a SIP trunk. This operation is asynchronous. The SIP trunk will be deleted in the background.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param calls_dialog_broadcast_webrtc_text_request: (required)
- :type calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest
+ :param sip_trunk_id: SIP trunk ID. (required)
+ :type sip_trunk_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
@@ -11544,9 +11689,8 @@ def dialog_broadcast_webrtc_text(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_broadcast_webrtc_text_serialize(
- dialog_id=dialog_id,
- calls_dialog_broadcast_webrtc_text_request=calls_dialog_broadcast_webrtc_text_request,
+ _param = self._delete_sip_trunk_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11554,9 +11698,9 @@ def dialog_broadcast_webrtc_text(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
- "400": "ApiException",
+ "202": "CallsSipTrunkResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -11572,10 +11716,9 @@ def dialog_broadcast_webrtc_text(
).data
@validate_call
- def dialog_broadcast_webrtc_text_with_http_info(
+ def delete_sip_trunk_with_http_info(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest,
+ sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -11587,15 +11730,13 @@ def dialog_broadcast_webrtc_text_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsActionResponse]:
- """Broadcast text
+ ) -> ApiResponse[CallsSipTrunkResponse]:
+ """Delete SIP trunk
- Broadcasts a text message to dialog WebRTC call legs with open data channel.
+ Delete a SIP trunk. This operation is asynchronous. The SIP trunk will be deleted in the background.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param calls_dialog_broadcast_webrtc_text_request: (required)
- :type calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest
+ :param sip_trunk_id: SIP trunk ID. (required)
+ :type sip_trunk_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
@@ -11618,9 +11759,8 @@ def dialog_broadcast_webrtc_text_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_broadcast_webrtc_text_serialize(
- dialog_id=dialog_id,
- calls_dialog_broadcast_webrtc_text_request=calls_dialog_broadcast_webrtc_text_request,
+ _param = self._delete_sip_trunk_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11628,9 +11768,9 @@ def dialog_broadcast_webrtc_text_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
- "400": "ApiException",
+ "202": "CallsSipTrunkResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -11646,10 +11786,9 @@ def dialog_broadcast_webrtc_text_with_http_info(
)
@validate_call
- def dialog_broadcast_webrtc_text_without_preload_content(
+ def delete_sip_trunk_without_preload_content(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest,
+ sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -11662,14 +11801,12 @@ def dialog_broadcast_webrtc_text_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Broadcast text
+ """Delete SIP trunk
- Broadcasts a text message to dialog WebRTC call legs with open data channel.
+ Delete a SIP trunk. This operation is asynchronous. The SIP trunk will be deleted in the background.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param calls_dialog_broadcast_webrtc_text_request: (required)
- :type calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest
+ :param sip_trunk_id: SIP trunk ID. (required)
+ :type sip_trunk_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
@@ -11692,9 +11829,8 @@ def dialog_broadcast_webrtc_text_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_broadcast_webrtc_text_serialize(
- dialog_id=dialog_id,
- calls_dialog_broadcast_webrtc_text_request=calls_dialog_broadcast_webrtc_text_request,
+ _param = self._delete_sip_trunk_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11702,9 +11838,9 @@ def dialog_broadcast_webrtc_text_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
- "400": "ApiException",
+ "202": "CallsSipTrunkResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -11715,10 +11851,9 @@ def dialog_broadcast_webrtc_text_without_preload_content(
)
return response_data.response
- def _dialog_broadcast_webrtc_text_serialize(
+ def _delete_sip_trunk_serialize(
self,
- dialog_id,
- calls_dialog_broadcast_webrtc_text_request,
+ sip_trunk_id,
_request_auth,
_content_type,
_headers,
@@ -11737,36 +11872,24 @@ def _dialog_broadcast_webrtc_text_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if dialog_id is not None:
- _path_params["dialogId"] = dialog_id
+ if sip_trunk_id is not None:
+ _path_params["sipTrunkId"] = sip_trunk_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_dialog_broadcast_webrtc_text_request is not None:
- _body_params = calls_dialog_broadcast_webrtc_text_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
- method="POST",
- resource_path="/calls/1/dialogs/{dialogId}/broadcast-webrtc-text",
+ method="DELETE",
+ resource_path="/calls/1/sip-trunks/{sipTrunkId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -11780,10 +11903,11 @@ def _dialog_broadcast_webrtc_text_serialize(
)
@validate_call
- def dialog_play_file(
+ def delete_sip_trunk_service_address(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_play_request: CallsDialogPlayRequest,
+ sip_trunk_service_address_id: Annotated[
+ StrictStr, Field(description="SIP trunk service address ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -11795,15 +11919,13 @@ def dialog_play_file(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsActionResponse:
- """Play file
+ ) -> CallsPublicSipTrunkServiceAddress:
+ """Delete SIP trunk service address
- Play an audio file on a dialog.
+ Delete SIP trunk service address.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param calls_dialog_play_request: (required)
- :type calls_dialog_play_request: CallsDialogPlayRequest
+ :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
+ :type sip_trunk_service_address_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
@@ -11826,9 +11948,8 @@ def dialog_play_file(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_play_file_serialize(
- dialog_id=dialog_id,
- calls_dialog_play_request=calls_dialog_play_request,
+ _param = self._delete_sip_trunk_service_address_serialize(
+ sip_trunk_service_address_id=sip_trunk_service_address_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11836,9 +11957,10 @@ def dialog_play_file(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
+ "200": "CallsPublicSipTrunkServiceAddress",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -11854,10 +11976,11 @@ def dialog_play_file(
).data
@validate_call
- def dialog_play_file_with_http_info(
+ def delete_sip_trunk_service_address_with_http_info(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_play_request: CallsDialogPlayRequest,
+ sip_trunk_service_address_id: Annotated[
+ StrictStr, Field(description="SIP trunk service address ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -11869,15 +11992,13 @@ def dialog_play_file_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsActionResponse]:
- """Play file
+ ) -> ApiResponse[CallsPublicSipTrunkServiceAddress]:
+ """Delete SIP trunk service address
- Play an audio file on a dialog.
+ Delete SIP trunk service address.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param calls_dialog_play_request: (required)
- :type calls_dialog_play_request: CallsDialogPlayRequest
+ :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
+ :type sip_trunk_service_address_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
@@ -11900,9 +12021,8 @@ def dialog_play_file_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_play_file_serialize(
- dialog_id=dialog_id,
- calls_dialog_play_request=calls_dialog_play_request,
+ _param = self._delete_sip_trunk_service_address_serialize(
+ sip_trunk_service_address_id=sip_trunk_service_address_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11910,9 +12030,10 @@ def dialog_play_file_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
+ "200": "CallsPublicSipTrunkServiceAddress",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -11928,10 +12049,11 @@ def dialog_play_file_with_http_info(
)
@validate_call
- def dialog_play_file_without_preload_content(
+ def delete_sip_trunk_service_address_without_preload_content(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_play_request: CallsDialogPlayRequest,
+ sip_trunk_service_address_id: Annotated[
+ StrictStr, Field(description="SIP trunk service address ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -11944,14 +12066,12 @@ def dialog_play_file_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Play file
+ """Delete SIP trunk service address
- Play an audio file on a dialog.
+ Delete SIP trunk service address.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param calls_dialog_play_request: (required)
- :type calls_dialog_play_request: CallsDialogPlayRequest
+ :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
+ :type sip_trunk_service_address_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
@@ -11974,9 +12094,8 @@ def dialog_play_file_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_play_file_serialize(
- dialog_id=dialog_id,
- calls_dialog_play_request=calls_dialog_play_request,
+ _param = self._delete_sip_trunk_service_address_serialize(
+ sip_trunk_service_address_id=sip_trunk_service_address_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -11984,9 +12103,10 @@ def dialog_play_file_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
+ "200": "CallsPublicSipTrunkServiceAddress",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -11997,10 +12117,9 @@ def dialog_play_file_without_preload_content(
)
return response_data.response
- def _dialog_play_file_serialize(
+ def _delete_sip_trunk_service_address_serialize(
self,
- dialog_id,
- calls_dialog_play_request,
+ sip_trunk_service_address_id,
_request_auth,
_content_type,
_headers,
@@ -12019,37 +12138,25 @@ def _dialog_play_file_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if dialog_id is not None:
- _path_params["dialogId"] = dialog_id
+ if sip_trunk_service_address_id is not None:
+ _path_params["sipTrunkServiceAddressId"] = sip_trunk_service_address_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_dialog_play_request is not None:
- _body_params = calls_dialog_play_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
- method="POST",
- resource_path="/calls/1/dialogs/{dialogId}/play",
- path_params=_path_params,
+ method="DELETE",
+ resource_path="/calls/1/sip-trunks/service-addresses/{sipTrunkServiceAddressId}",
+ path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
@@ -12062,10 +12169,10 @@ def _dialog_play_file_serialize(
)
@validate_call
- def dialog_say_text(
+ def dialog_broadcast_webrtc_text(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_say_request: CallsDialogSayRequest,
+ calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -12078,14 +12185,14 @@ def dialog_say_text(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Say text
+ """Broadcast text
- Say text on a dialog.
+ Broadcasts a text message to dialog WebRTC call legs with open data channel.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
- :param calls_dialog_say_request: (required)
- :type calls_dialog_say_request: CallsDialogSayRequest
+ :param calls_dialog_broadcast_webrtc_text_request: (required)
+ :type calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest
: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
@@ -12108,9 +12215,9 @@ def dialog_say_text(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_say_text_serialize(
+ _param = self._dialog_broadcast_webrtc_text_serialize(
dialog_id=dialog_id,
- calls_dialog_say_request=calls_dialog_say_request,
+ calls_dialog_broadcast_webrtc_text_request=calls_dialog_broadcast_webrtc_text_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -12121,6 +12228,7 @@ def dialog_say_text(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -12136,10 +12244,10 @@ def dialog_say_text(
).data
@validate_call
- def dialog_say_text_with_http_info(
+ def dialog_broadcast_webrtc_text_with_http_info(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_say_request: CallsDialogSayRequest,
+ calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -12152,14 +12260,14 @@ def dialog_say_text_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Say text
+ """Broadcast text
- Say text on a dialog.
+ Broadcasts a text message to dialog WebRTC call legs with open data channel.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
- :param calls_dialog_say_request: (required)
- :type calls_dialog_say_request: CallsDialogSayRequest
+ :param calls_dialog_broadcast_webrtc_text_request: (required)
+ :type calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest
: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
@@ -12182,9 +12290,9 @@ def dialog_say_text_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_say_text_serialize(
+ _param = self._dialog_broadcast_webrtc_text_serialize(
dialog_id=dialog_id,
- calls_dialog_say_request=calls_dialog_say_request,
+ calls_dialog_broadcast_webrtc_text_request=calls_dialog_broadcast_webrtc_text_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -12195,6 +12303,7 @@ def dialog_say_text_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -12210,10 +12319,10 @@ def dialog_say_text_with_http_info(
)
@validate_call
- def dialog_say_text_without_preload_content(
+ def dialog_broadcast_webrtc_text_without_preload_content(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_say_request: CallsDialogSayRequest,
+ calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -12226,14 +12335,14 @@ def dialog_say_text_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Say text
+ """Broadcast text
- Say text on a dialog.
+ Broadcasts a text message to dialog WebRTC call legs with open data channel.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
- :param calls_dialog_say_request: (required)
- :type calls_dialog_say_request: CallsDialogSayRequest
+ :param calls_dialog_broadcast_webrtc_text_request: (required)
+ :type calls_dialog_broadcast_webrtc_text_request: CallsDialogBroadcastWebrtcTextRequest
: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
@@ -12256,9 +12365,9 @@ def dialog_say_text_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_say_text_serialize(
+ _param = self._dialog_broadcast_webrtc_text_serialize(
dialog_id=dialog_id,
- calls_dialog_say_request=calls_dialog_say_request,
+ calls_dialog_broadcast_webrtc_text_request=calls_dialog_broadcast_webrtc_text_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -12269,6 +12378,7 @@ def dialog_say_text_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -12279,10 +12389,10 @@ def dialog_say_text_without_preload_content(
)
return response_data.response
- def _dialog_say_text_serialize(
+ def _dialog_broadcast_webrtc_text_serialize(
self,
dialog_id,
- calls_dialog_say_request,
+ calls_dialog_broadcast_webrtc_text_request,
_request_auth,
_content_type,
_headers,
@@ -12307,8 +12417,8 @@ def _dialog_say_text_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_dialog_say_request is not None:
- _body_params = calls_dialog_say_request
+ if calls_dialog_broadcast_webrtc_text_request is not None:
+ _body_params = calls_dialog_broadcast_webrtc_text_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -12330,7 +12440,7 @@ def _dialog_say_text_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/dialogs/{dialogId}/say",
+ resource_path="/calls/1/dialogs/{dialogId}/broadcast-webrtc-text",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -12344,10 +12454,10 @@ def _dialog_say_text_serialize(
)
@validate_call
- def dialog_start_recording(
+ def dialog_play_file(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_recording_request: CallsDialogRecordingRequest,
+ calls_dialog_play_request: CallsDialogPlayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -12360,14 +12470,14 @@ def dialog_start_recording(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Start recording
+ """Play file
- Start recording a dialog.
+ Play an audio file on a dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
- :param calls_dialog_recording_request: (required)
- :type calls_dialog_recording_request: CallsDialogRecordingRequest
+ :param calls_dialog_play_request: (required)
+ :type calls_dialog_play_request: CallsDialogPlayRequest
: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
@@ -12390,9 +12500,9 @@ def dialog_start_recording(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_start_recording_serialize(
+ _param = self._dialog_play_file_serialize(
dialog_id=dialog_id,
- calls_dialog_recording_request=calls_dialog_recording_request,
+ calls_dialog_play_request=calls_dialog_play_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -12403,6 +12513,7 @@ def dialog_start_recording(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -12418,10 +12529,10 @@ def dialog_start_recording(
).data
@validate_call
- def dialog_start_recording_with_http_info(
+ def dialog_play_file_with_http_info(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_recording_request: CallsDialogRecordingRequest,
+ calls_dialog_play_request: CallsDialogPlayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -12434,14 +12545,14 @@ def dialog_start_recording_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Start recording
+ """Play file
- Start recording a dialog.
+ Play an audio file on a dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
- :param calls_dialog_recording_request: (required)
- :type calls_dialog_recording_request: CallsDialogRecordingRequest
+ :param calls_dialog_play_request: (required)
+ :type calls_dialog_play_request: CallsDialogPlayRequest
: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
@@ -12464,9 +12575,9 @@ def dialog_start_recording_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_start_recording_serialize(
+ _param = self._dialog_play_file_serialize(
dialog_id=dialog_id,
- calls_dialog_recording_request=calls_dialog_recording_request,
+ calls_dialog_play_request=calls_dialog_play_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -12477,6 +12588,7 @@ def dialog_start_recording_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -12492,10 +12604,10 @@ def dialog_start_recording_with_http_info(
)
@validate_call
- def dialog_start_recording_without_preload_content(
+ def dialog_play_file_without_preload_content(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- calls_dialog_recording_request: CallsDialogRecordingRequest,
+ calls_dialog_play_request: CallsDialogPlayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -12508,14 +12620,14 @@ def dialog_start_recording_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Start recording
+ """Play file
- Start recording a dialog.
+ Play an audio file on a dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
- :param calls_dialog_recording_request: (required)
- :type calls_dialog_recording_request: CallsDialogRecordingRequest
+ :param calls_dialog_play_request: (required)
+ :type calls_dialog_play_request: CallsDialogPlayRequest
: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
@@ -12538,9 +12650,9 @@ def dialog_start_recording_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_start_recording_serialize(
+ _param = self._dialog_play_file_serialize(
dialog_id=dialog_id,
- calls_dialog_recording_request=calls_dialog_recording_request,
+ calls_dialog_play_request=calls_dialog_play_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -12551,6 +12663,7 @@ def dialog_start_recording_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -12561,10 +12674,10 @@ def dialog_start_recording_without_preload_content(
)
return response_data.response
- def _dialog_start_recording_serialize(
+ def _dialog_play_file_serialize(
self,
dialog_id,
- calls_dialog_recording_request,
+ calls_dialog_play_request,
_request_auth,
_content_type,
_headers,
@@ -12589,8 +12702,8 @@ def _dialog_start_recording_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_dialog_recording_request is not None:
- _body_params = calls_dialog_recording_request
+ if calls_dialog_play_request is not None:
+ _body_params = calls_dialog_play_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -12612,7 +12725,7 @@ def _dialog_start_recording_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/dialogs/{dialogId}/start-recording",
+ resource_path="/calls/1/dialogs/{dialogId}/play",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -12626,9 +12739,10 @@ def _dialog_start_recording_serialize(
)
@validate_call
- def dialog_stop_playing_file(
+ def dialog_say_text(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ calls_dialog_say_request: CallsDialogSayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -12641,12 +12755,14 @@ def dialog_stop_playing_file(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Stop playing file
+ """Say text
- Stop playing an audio file on a dialog.
+ Say text on a dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
+ :param calls_dialog_say_request: (required)
+ :type calls_dialog_say_request: CallsDialogSayRequest
: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
@@ -12669,8 +12785,9 @@ def dialog_stop_playing_file(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_stop_playing_file_serialize(
+ _param = self._dialog_say_text_serialize(
dialog_id=dialog_id,
+ calls_dialog_say_request=calls_dialog_say_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -12679,7 +12796,9 @@ def dialog_stop_playing_file(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -12695,9 +12814,10 @@ def dialog_stop_playing_file(
).data
@validate_call
- def dialog_stop_playing_file_with_http_info(
+ def dialog_say_text_with_http_info(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ calls_dialog_say_request: CallsDialogSayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -12710,12 +12830,14 @@ def dialog_stop_playing_file_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Stop playing file
+ """Say text
- Stop playing an audio file on a dialog.
+ Say text on a dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
+ :param calls_dialog_say_request: (required)
+ :type calls_dialog_say_request: CallsDialogSayRequest
: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
@@ -12738,8 +12860,9 @@ def dialog_stop_playing_file_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_stop_playing_file_serialize(
+ _param = self._dialog_say_text_serialize(
dialog_id=dialog_id,
+ calls_dialog_say_request=calls_dialog_say_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -12748,7 +12871,9 @@ def dialog_stop_playing_file_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -12764,9 +12889,10 @@ def dialog_stop_playing_file_with_http_info(
)
@validate_call
- def dialog_stop_playing_file_without_preload_content(
+ def dialog_say_text_without_preload_content(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ calls_dialog_say_request: CallsDialogSayRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -12779,12 +12905,14 @@ def dialog_stop_playing_file_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Stop playing file
+ """Say text
- Stop playing an audio file on a dialog.
+ Say text on a dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
+ :param calls_dialog_say_request: (required)
+ :type calls_dialog_say_request: CallsDialogSayRequest
: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
@@ -12807,8 +12935,9 @@ def dialog_stop_playing_file_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_stop_playing_file_serialize(
+ _param = self._dialog_say_text_serialize(
dialog_id=dialog_id,
+ calls_dialog_say_request=calls_dialog_say_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -12817,7 +12946,9 @@ def dialog_stop_playing_file_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -12828,9 +12959,10 @@ def dialog_stop_playing_file_without_preload_content(
)
return response_data.response
- def _dialog_stop_playing_file_serialize(
+ def _dialog_say_text_serialize(
self,
dialog_id,
+ calls_dialog_say_request,
_request_auth,
_content_type,
_headers,
@@ -12855,18 +12987,30 @@ def _dialog_stop_playing_file_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
+ if calls_dialog_say_request is not None:
+ _body_params = calls_dialog_say_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/dialogs/{dialogId}/stop-play",
+ resource_path="/calls/1/dialogs/{dialogId}/say",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -12880,9 +13024,10 @@ def _dialog_stop_playing_file_serialize(
)
@validate_call
- def dialog_stop_recording(
+ def dialog_start_recording(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ calls_dialog_recording_request: CallsDialogRecordingRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -12895,12 +13040,14 @@ def dialog_stop_recording(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Stop recording
+ """Start recording
- Stop recording a dialog.
+ Start recording a dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
+ :param calls_dialog_recording_request: (required)
+ :type calls_dialog_recording_request: CallsDialogRecordingRequest
: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
@@ -12923,8 +13070,9 @@ def dialog_stop_recording(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_stop_recording_serialize(
+ _param = self._dialog_start_recording_serialize(
dialog_id=dialog_id,
+ calls_dialog_recording_request=calls_dialog_recording_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -12935,6 +13083,7 @@ def dialog_stop_recording(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -12950,9 +13099,10 @@ def dialog_stop_recording(
).data
@validate_call
- def dialog_stop_recording_with_http_info(
+ def dialog_start_recording_with_http_info(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ calls_dialog_recording_request: CallsDialogRecordingRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -12965,12 +13115,14 @@ def dialog_stop_recording_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Stop recording
+ """Start recording
- Stop recording a dialog.
+ Start recording a dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
+ :param calls_dialog_recording_request: (required)
+ :type calls_dialog_recording_request: CallsDialogRecordingRequest
: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
@@ -12993,8 +13145,9 @@ def dialog_stop_recording_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_stop_recording_serialize(
+ _param = self._dialog_start_recording_serialize(
dialog_id=dialog_id,
+ calls_dialog_recording_request=calls_dialog_recording_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13005,6 +13158,7 @@ def dialog_stop_recording_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -13020,9 +13174,10 @@ def dialog_stop_recording_with_http_info(
)
@validate_call
- def dialog_stop_recording_without_preload_content(
+ def dialog_start_recording_without_preload_content(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ calls_dialog_recording_request: CallsDialogRecordingRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -13035,12 +13190,14 @@ def dialog_stop_recording_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Stop recording
+ """Start recording
- Stop recording a dialog.
+ Start recording a dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
+ :param calls_dialog_recording_request: (required)
+ :type calls_dialog_recording_request: CallsDialogRecordingRequest
: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
@@ -13063,8 +13220,9 @@ def dialog_stop_recording_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._dialog_stop_recording_serialize(
+ _param = self._dialog_start_recording_serialize(
dialog_id=dialog_id,
+ calls_dialog_recording_request=calls_dialog_recording_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13075,6 +13233,7 @@ def dialog_stop_recording_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -13085,9 +13244,10 @@ def dialog_stop_recording_without_preload_content(
)
return response_data.response
- def _dialog_stop_recording_serialize(
+ def _dialog_start_recording_serialize(
self,
dialog_id,
+ calls_dialog_recording_request,
_request_auth,
_content_type,
_headers,
@@ -13112,18 +13272,30 @@ def _dialog_stop_recording_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
+ if calls_dialog_recording_request is not None:
+ _body_params = calls_dialog_recording_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/dialogs/{dialogId}/stop-recording",
+ resource_path="/calls/1/dialogs/{dialogId}/start-recording",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -13137,12 +13309,9 @@ def _dialog_stop_recording_serialize(
)
@validate_call
- def download_recording_file(
+ def dialog_stop_playing_file(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -13154,16 +13323,14 @@ def download_recording_file(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> bytearray:
- """Download recording file
+ ) -> CallsActionResponse:
+ """Stop playing file
- Download a recording file.
+ Stop playing an audio file on a dialog.
- :param file_id: File ID. (required)
- :type file_id: str
- :param location: Recording location.
- :type location: str
- :param _request_timeout: timeout setting for this request. If one
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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.
@@ -13185,9 +13352,8 @@ def download_recording_file(
:return: Returns the result object.
""" # noqa: E501
- _param = self._download_recording_file_serialize(
- file_id=file_id,
- location=location,
+ _param = self._dialog_stop_playing_file_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13195,7 +13361,7 @@ def download_recording_file(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "bytearray",
+ "200": "CallsActionResponse",
"401": "ApiException",
"403": "ApiException",
"404": "ApiException",
@@ -13213,12 +13379,9 @@ def download_recording_file(
).data
@validate_call
- def download_recording_file_with_http_info(
+ def dialog_stop_playing_file_with_http_info(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -13230,15 +13393,13 @@ def download_recording_file_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[bytearray]:
- """Download recording file
+ ) -> ApiResponse[CallsActionResponse]:
+ """Stop playing file
- Download a recording file.
+ Stop playing an audio file on a dialog.
- :param file_id: File ID. (required)
- :type file_id: str
- :param location: Recording location.
- :type location: str
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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
@@ -13261,9 +13422,8 @@ def download_recording_file_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._download_recording_file_serialize(
- file_id=file_id,
- location=location,
+ _param = self._dialog_stop_playing_file_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13271,7 +13431,7 @@ def download_recording_file_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "bytearray",
+ "200": "CallsActionResponse",
"401": "ApiException",
"403": "ApiException",
"404": "ApiException",
@@ -13289,12 +13449,9 @@ def download_recording_file_with_http_info(
)
@validate_call
- def download_recording_file_without_preload_content(
+ def dialog_stop_playing_file_without_preload_content(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -13307,14 +13464,12 @@ def download_recording_file_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Download recording file
+ """Stop playing file
- Download a recording file.
+ Stop playing an audio file on a dialog.
- :param file_id: File ID. (required)
- :type file_id: str
- :param location: Recording location.
- :type location: str
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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
@@ -13337,9 +13492,8 @@ def download_recording_file_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._download_recording_file_serialize(
- file_id=file_id,
- location=location,
+ _param = self._dialog_stop_playing_file_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13347,7 +13501,7 @@ def download_recording_file_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "bytearray",
+ "200": "CallsActionResponse",
"401": "ApiException",
"403": "ApiException",
"404": "ApiException",
@@ -13360,10 +13514,9 @@ def download_recording_file_without_preload_content(
)
return response_data.response
- def _download_recording_file_serialize(
+ def _dialog_stop_playing_file_serialize(
self,
- file_id,
- location,
+ dialog_id,
_request_auth,
_content_type,
_headers,
@@ -13382,28 +13535,24 @@ def _download_recording_file_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if file_id is not None:
- _path_params["fileId"] = file_id
+ if dialog_id is not None:
+ _path_params["dialogId"] = dialog_id
# process the query parameters
- if location is not None:
-
- _query_params.append(("location", location))
-
# 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/octet-stream", "application/json"]
+ ["application/json"]
)
# authentication setting
_auth_settings: List[str] = ["APIKeyHeader"]
return self.api_client.param_serialize(
- method="GET",
- resource_path="/calls/1/recordings/files/{fileId}",
+ method="POST",
+ resource_path="/calls/1/dialogs/{dialogId}/stop-play",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -13417,9 +13566,9 @@ def _download_recording_file_serialize(
)
@validate_call
- def get_bulk_status(
+ def dialog_stop_recording(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -13431,13 +13580,13 @@ def get_bulk_status(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallBulkStatus:
- """Get bulk status
+ ) -> CallsActionResponse:
+ """Stop recording
- Get a single bulk status. Bulk has a status if it was created with scheduling options.
+ Stop recording a dialog.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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
@@ -13460,8 +13609,8 @@ def get_bulk_status(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_bulk_status_serialize(
- bulk_id=bulk_id,
+ _param = self._dialog_stop_recording_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13469,8 +13618,10 @@ def get_bulk_status(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -13486,9 +13637,9 @@ def get_bulk_status(
).data
@validate_call
- def get_bulk_status_with_http_info(
+ def dialog_stop_recording_with_http_info(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -13500,13 +13651,13 @@ def get_bulk_status_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallBulkStatus]:
- """Get bulk status
+ ) -> ApiResponse[CallsActionResponse]:
+ """Stop recording
- Get a single bulk status. Bulk has a status if it was created with scheduling options.
+ Stop recording a dialog.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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
@@ -13529,8 +13680,8 @@ def get_bulk_status_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_bulk_status_serialize(
- bulk_id=bulk_id,
+ _param = self._dialog_stop_recording_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13538,8 +13689,10 @@ def get_bulk_status_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -13555,9 +13708,9 @@ def get_bulk_status_with_http_info(
)
@validate_call
- def get_bulk_status_without_preload_content(
+ def dialog_stop_recording_without_preload_content(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -13570,12 +13723,12 @@ def get_bulk_status_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get bulk status
+ """Stop recording
- Get a single bulk status. Bulk has a status if it was created with scheduling options.
+ Stop recording a dialog.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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
@@ -13598,8 +13751,8 @@ def get_bulk_status_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_bulk_status_serialize(
- bulk_id=bulk_id,
+ _param = self._dialog_stop_recording_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13607,8 +13760,10 @@ def get_bulk_status_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -13619,9 +13774,9 @@ def get_bulk_status_without_preload_content(
)
return response_data.response
- def _get_bulk_status_serialize(
+ def _dialog_stop_recording_serialize(
self,
- bulk_id,
+ dialog_id,
_request_auth,
_content_type,
_headers,
@@ -13640,8 +13795,8 @@ def _get_bulk_status_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if bulk_id is not None:
- _path_params["bulkId"] = bulk_id
+ if dialog_id is not None:
+ _path_params["dialogId"] = dialog_id
# process the query parameters
# process the header parameters
# process the form parameters
@@ -13656,8 +13811,8 @@ def _get_bulk_status_serialize(
_auth_settings: List[str] = ["APIKeyHeader"]
return self.api_client.param_serialize(
- method="GET",
- resource_path="/calls/1/bulks/{bulkId}",
+ method="POST",
+ resource_path="/calls/1/dialogs/{dialogId}/stop-recording",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -13671,9 +13826,18 @@ def _get_bulk_status_serialize(
)
@validate_call
- def get_call(
+ def download_recording_file(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
+ range: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Range header specifies range of bytes to be returned by the response. If range header is not specified, response will return a complete file."
+ ),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -13685,13 +13849,17 @@ def get_call(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> Call:
- """Get call
+ ) -> bytearray:
+ """Download recording file
- Get a single call.
+ Download a recording file.
- :param call_id: Call ID. (required)
- :type call_id: str
+ :param file_id: File ID. (required)
+ :type file_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
+ :param range: Range header specifies range of bytes to be returned by the response. If range header is not specified, response will return a complete file.
+ :type range: 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
@@ -13714,8 +13882,10 @@ def get_call(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_call_serialize(
- call_id=call_id,
+ _param = self._download_recording_file_serialize(
+ file_id=file_id,
+ location=location,
+ range=range,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13723,9 +13893,12 @@ def get_call(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "Call",
+ "200": "bytearray",
+ "206": "bytearray",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
+ "416": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -13740,9 +13913,18 @@ def get_call(
).data
@validate_call
- def get_call_with_http_info(
+ def download_recording_file_with_http_info(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
+ range: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Range header specifies range of bytes to be returned by the response. If range header is not specified, response will return a complete file."
+ ),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -13754,13 +13936,17 @@ def get_call_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[Call]:
- """Get call
+ ) -> ApiResponse[bytearray]:
+ """Download recording file
- Get a single call.
+ Download a recording file.
- :param call_id: Call ID. (required)
- :type call_id: str
+ :param file_id: File ID. (required)
+ :type file_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
+ :param range: Range header specifies range of bytes to be returned by the response. If range header is not specified, response will return a complete file.
+ :type range: 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
@@ -13783,8 +13969,10 @@ def get_call_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_call_serialize(
- call_id=call_id,
+ _param = self._download_recording_file_serialize(
+ file_id=file_id,
+ location=location,
+ range=range,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13792,9 +13980,12 @@ def get_call_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "Call",
+ "200": "bytearray",
+ "206": "bytearray",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
+ "416": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -13809,9 +14000,18 @@ def get_call_with_http_info(
)
@validate_call
- def get_call_without_preload_content(
+ def download_recording_file_without_preload_content(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
+ range: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Range header specifies range of bytes to be returned by the response. If range header is not specified, response will return a complete file."
+ ),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -13824,12 +14024,16 @@ def get_call_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get call
+ """Download recording file
- Get a single call.
+ Download a recording file.
- :param call_id: Call ID. (required)
- :type call_id: str
+ :param file_id: File ID. (required)
+ :type file_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
+ :param range: Range header specifies range of bytes to be returned by the response. If range header is not specified, response will return a complete file.
+ :type range: 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
@@ -13852,8 +14056,10 @@ def get_call_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_call_serialize(
- call_id=call_id,
+ _param = self._download_recording_file_serialize(
+ file_id=file_id,
+ location=location,
+ range=range,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13861,9 +14067,12 @@ def get_call_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "Call",
+ "200": "bytearray",
+ "206": "bytearray",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
+ "416": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -13873,9 +14082,11 @@ def get_call_without_preload_content(
)
return response_data.response
- def _get_call_serialize(
+ def _download_recording_file_serialize(
self,
- call_id,
+ file_id,
+ location,
+ range,
_request_auth,
_content_type,
_headers,
@@ -13894,16 +14105,22 @@ def _get_call_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if call_id is not None:
- _path_params["callId"] = call_id
+ if file_id is not None:
+ _path_params["fileId"] = file_id
# process the query parameters
+ if location is not None:
+
+ _query_params.append(("location", location.value))
+
# process the header parameters
+ if range is not None:
+ _header_params["Range"] = range
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
+ ["application/octet-stream", "application/json"]
)
# authentication setting
@@ -13911,7 +14128,7 @@ def _get_call_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/calls/{callId}",
+ resource_path="/calls/1/recordings/files/{fileId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -13925,9 +14142,9 @@ def _get_call_serialize(
)
@validate_call
- def get_call_history(
+ def get_bulk_status(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -13939,13 +14156,13 @@ def get_call_history(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallLog:
- """Get call history
+ ) -> CallBulkStatus:
+ """Get bulk status
- Get a single call history. Call history retention period is 3 months.
+ Get a single bulk status. Bulk has a status if it was created with scheduling options.
- :param call_id: Call ID. (required)
- :type call_id: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_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
@@ -13968,8 +14185,8 @@ def get_call_history(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_call_history_serialize(
- call_id=call_id,
+ _param = self._get_bulk_status_serialize(
+ bulk_id=bulk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -13977,8 +14194,9 @@ def get_call_history(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallLog",
+ "200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -13994,9 +14212,9 @@ def get_call_history(
).data
@validate_call
- def get_call_history_with_http_info(
+ def get_bulk_status_with_http_info(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -14008,13 +14226,13 @@ def get_call_history_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallLog]:
- """Get call history
+ ) -> ApiResponse[CallBulkStatus]:
+ """Get bulk status
- Get a single call history. Call history retention period is 3 months.
+ Get a single bulk status. Bulk has a status if it was created with scheduling options.
- :param call_id: Call ID. (required)
- :type call_id: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_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
@@ -14037,8 +14255,8 @@ def get_call_history_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_call_history_serialize(
- call_id=call_id,
+ _param = self._get_bulk_status_serialize(
+ bulk_id=bulk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -14046,8 +14264,9 @@ def get_call_history_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallLog",
+ "200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -14063,9 +14282,9 @@ def get_call_history_with_http_info(
)
@validate_call
- def get_call_history_without_preload_content(
+ def get_bulk_status_without_preload_content(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -14078,12 +14297,12 @@ def get_call_history_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get call history
+ """Get bulk status
- Get a single call history. Call history retention period is 3 months.
+ Get a single bulk status. Bulk has a status if it was created with scheduling options.
- :param call_id: Call ID. (required)
- :type call_id: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_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
@@ -14106,8 +14325,8 @@ def get_call_history_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_call_history_serialize(
- call_id=call_id,
+ _param = self._get_bulk_status_serialize(
+ bulk_id=bulk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -14115,8 +14334,9 @@ def get_call_history_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallLog",
+ "200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -14127,9 +14347,9 @@ def get_call_history_without_preload_content(
)
return response_data.response
- def _get_call_history_serialize(
+ def _get_bulk_status_serialize(
self,
- call_id,
+ bulk_id,
_request_auth,
_content_type,
_headers,
@@ -14148,8 +14368,8 @@ def _get_call_history_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if call_id is not None:
- _path_params["callId"] = call_id
+ if bulk_id is not None:
+ _path_params["bulkId"] = bulk_id
# process the query parameters
# process the header parameters
# process the form parameters
@@ -14165,7 +14385,7 @@ def _get_call_history_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/calls/{callId}/history",
+ resource_path="/calls/1/bulks/{bulkId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -14179,12 +14399,9 @@ def _get_call_history_serialize(
)
@validate_call
- def get_call_recordings(
+ def get_call(
self,
call_id: Annotated[StrictStr, Field(description="Call ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -14196,15 +14413,13 @@ def get_call_recordings(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsPublicCallRecording:
- """Get call recordings
+ ) -> Call:
+ """Get call
- Get the recordings for a single call.
+ Get a single call.
:param call_id: Call ID. (required)
:type call_id: str
- :param location: Recording location.
- :type location: 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
@@ -14227,9 +14442,8 @@ def get_call_recordings(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_call_recordings_serialize(
+ _param = self._get_call_serialize(
call_id=call_id,
- location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -14237,8 +14451,9 @@ def get_call_recordings(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicCallRecording",
+ "200": "Call",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -14254,12 +14469,9 @@ def get_call_recordings(
).data
@validate_call
- def get_call_recordings_with_http_info(
+ def get_call_with_http_info(
self,
call_id: Annotated[StrictStr, Field(description="Call ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -14271,15 +14483,13 @@ def get_call_recordings_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsPublicCallRecording]:
- """Get call recordings
+ ) -> ApiResponse[Call]:
+ """Get call
- Get the recordings for a single call.
+ Get a single call.
:param call_id: Call ID. (required)
:type call_id: str
- :param location: Recording location.
- :type location: 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
@@ -14302,9 +14512,8 @@ def get_call_recordings_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_call_recordings_serialize(
+ _param = self._get_call_serialize(
call_id=call_id,
- location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -14312,8 +14521,9 @@ def get_call_recordings_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicCallRecording",
+ "200": "Call",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -14329,12 +14539,9 @@ def get_call_recordings_with_http_info(
)
@validate_call
- def get_call_recordings_without_preload_content(
+ def get_call_without_preload_content(
self,
call_id: Annotated[StrictStr, Field(description="Call ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -14347,14 +14554,12 @@ def get_call_recordings_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get call recordings
+ """Get call
- Get the recordings for a single call.
+ Get a single call.
:param call_id: Call ID. (required)
:type call_id: str
- :param location: Recording location.
- :type location: 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
@@ -14377,9 +14582,8 @@ def get_call_recordings_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_call_recordings_serialize(
+ _param = self._get_call_serialize(
call_id=call_id,
- location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -14387,8 +14591,9 @@ def get_call_recordings_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicCallRecording",
+ "200": "Call",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -14399,10 +14604,9 @@ def get_call_recordings_without_preload_content(
)
return response_data.response
- def _get_call_recordings_serialize(
+ def _get_call_serialize(
self,
call_id,
- location,
_request_auth,
_content_type,
_headers,
@@ -14424,10 +14628,6 @@ def _get_call_recordings_serialize(
if call_id is not None:
_path_params["callId"] = call_id
# process the query parameters
- if location is not None:
-
- _query_params.append(("location", location))
-
# process the header parameters
# process the form parameters
# process the body parameter
@@ -14442,7 +14642,7 @@ def _get_call_recordings_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/recordings/calls/{callId}",
+ resource_path="/calls/1/calls/{callId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -14456,48 +14656,9 @@ def _get_call_recordings_serialize(
)
@validate_call
- def get_calls(
+ def get_call_history(
self,
- type: Annotated[
- Optional[CallEndpointType], Field(description="Call endpoint type.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- var_from: Annotated[
- Optional[StrictStr], Field(description="Caller identifier.")
- ] = None,
- to: Annotated[
- Optional[StrictStr], Field(description="Callee identifier.")
- ] = None,
- direction: Annotated[
- Optional[CallDirection], Field(description="Call direction.")
- ] = None,
- status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
- ),
- ] = None,
- conference_id: Annotated[
- Optional[StrictStr], Field(description="Conference ID.")
- ] = None,
- dialog_id: Annotated[
- Optional[StrictStr], Field(description="Dialog ID.")
- ] = None,
- bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -14509,37 +14670,13 @@ def get_calls(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallPage:
- """Get calls
+ ) -> CallLog:
+ """Get call history
- Get calls with pagination.
+ Get a single call history. Call history retention period is 3 months.
- :param type: Call endpoint type.
- :type type: CallEndpointType
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param var_from: Caller identifier.
- :type var_from: str
- :param to: Callee identifier.
- :type to: str
- :param direction: Call direction.
- :type direction: CallDirection
- :param status: Call state.
- :type status: CallState
- :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
- :type start_time_after: datetime
- :param conference_id: Conference ID.
- :type conference_id: str
- :param dialog_id: Dialog ID.
- :type dialog_id: str
- :param bulk_id: Bulk ID.
- :type bulk_id: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param call_id: Call ID. (required)
+ :type call_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
@@ -14562,20 +14699,8 @@ def get_calls(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_serialize(
- type=type,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- var_from=var_from,
- to=to,
- direction=direction,
- status=status,
- start_time_after=start_time_after,
- conference_id=conference_id,
- dialog_id=dialog_id,
- bulk_id=bulk_id,
- page=page,
- size=size,
+ _param = self._get_call_history_serialize(
+ call_id=call_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -14583,9 +14708,10 @@ def get_calls(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallPage",
- "400": "ApiException",
+ "200": "CallLog",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -14600,90 +14726,27 @@ def get_calls(
).data
@validate_call
- def get_calls_with_http_info(
+ def get_call_history_with_http_info(
self,
- type: Annotated[
- Optional[CallEndpointType], Field(description="Call endpoint type.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- var_from: Annotated[
- Optional[StrictStr], Field(description="Caller identifier.")
- ] = None,
- to: Annotated[
- Optional[StrictStr], Field(description="Callee identifier.")
- ] = None,
- direction: Annotated[
- Optional[CallDirection], Field(description="Call direction.")
- ] = None,
- status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
- ),
- ] = None,
- conference_id: Annotated[
- Optional[StrictStr], Field(description="Conference ID.")
- ] = None,
- dialog_id: Annotated[
- Optional[StrictStr], Field(description="Dialog ID.")
- ] = None,
- bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
- ],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ _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[CallPage]:
- """Get calls
+ ) -> ApiResponse[CallLog]:
+ """Get call history
- Get calls with pagination.
+ Get a single call history. Call history retention period is 3 months.
- :param type: Call endpoint type.
- :type type: CallEndpointType
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param var_from: Caller identifier.
- :type var_from: str
- :param to: Callee identifier.
- :type to: str
- :param direction: Call direction.
- :type direction: CallDirection
- :param status: Call state.
- :type status: CallState
- :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
- :type start_time_after: datetime
- :param conference_id: Conference ID.
- :type conference_id: str
- :param dialog_id: Dialog ID.
- :type dialog_id: str
- :param bulk_id: Bulk ID.
- :type bulk_id: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param call_id: Call ID. (required)
+ :type call_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
@@ -14706,20 +14769,8 @@ def get_calls_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_serialize(
- type=type,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- var_from=var_from,
- to=to,
- direction=direction,
- status=status,
- start_time_after=start_time_after,
- conference_id=conference_id,
- dialog_id=dialog_id,
- bulk_id=bulk_id,
- page=page,
- size=size,
+ _param = self._get_call_history_serialize(
+ call_id=call_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -14727,9 +14778,10 @@ def get_calls_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallPage",
- "400": "ApiException",
+ "200": "CallLog",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -14744,48 +14796,9 @@ def get_calls_with_http_info(
)
@validate_call
- def get_calls_without_preload_content(
+ def get_call_history_without_preload_content(
self,
- type: Annotated[
- Optional[CallEndpointType], Field(description="Call endpoint type.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- var_from: Annotated[
- Optional[StrictStr], Field(description="Caller identifier.")
- ] = None,
- to: Annotated[
- Optional[StrictStr], Field(description="Callee identifier.")
- ] = None,
- direction: Annotated[
- Optional[CallDirection], Field(description="Call direction.")
- ] = None,
- status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
- ),
- ] = None,
- conference_id: Annotated[
- Optional[StrictStr], Field(description="Conference ID.")
- ] = None,
- dialog_id: Annotated[
- Optional[StrictStr], Field(description="Dialog ID.")
- ] = None,
- bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -14798,36 +14811,12 @@ def get_calls_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get calls
+ """Get call history
- Get calls with pagination.
+ Get a single call history. Call history retention period is 3 months.
- :param type: Call endpoint type.
- :type type: CallEndpointType
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param var_from: Caller identifier.
- :type var_from: str
- :param to: Callee identifier.
- :type to: str
- :param direction: Call direction.
- :type direction: CallDirection
- :param status: Call state.
- :type status: CallState
- :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
- :type start_time_after: datetime
- :param conference_id: Conference ID.
- :type conference_id: str
- :param dialog_id: Dialog ID.
- :type dialog_id: str
- :param bulk_id: Bulk ID.
- :type bulk_id: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param call_id: Call ID. (required)
+ :type call_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
@@ -14850,20 +14839,8 @@ def get_calls_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_serialize(
- type=type,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- var_from=var_from,
- to=to,
- direction=direction,
- status=status,
- start_time_after=start_time_after,
- conference_id=conference_id,
- dialog_id=dialog_id,
- bulk_id=bulk_id,
- page=page,
- size=size,
+ _param = self._get_call_history_serialize(
+ call_id=call_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -14871,9 +14848,10 @@ def get_calls_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallPage",
- "400": "ApiException",
+ "200": "CallLog",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -14883,21 +14861,9 @@ def get_calls_without_preload_content(
)
return response_data.response
- def _get_calls_serialize(
+ def _get_call_history_serialize(
self,
- type,
- calls_configuration_id,
- application_id,
- var_from,
- to,
- direction,
- status,
- start_time_after,
- conference_id,
- dialog_id,
- bulk_id,
- page,
- size,
+ call_id,
_request_auth,
_content_type,
_headers,
@@ -14916,68 +14882,9 @@ def _get_calls_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
+ if call_id is not None:
+ _path_params["callId"] = call_id
# process the query parameters
- if type is not None:
-
- _query_params.append(("type", type.value))
-
- if calls_configuration_id is not None:
-
- _query_params.append(("callsConfigurationId", calls_configuration_id))
-
- if application_id is not None:
-
- _query_params.append(("applicationId", application_id))
-
- if var_from is not None:
-
- _query_params.append(("from", var_from))
-
- if to is not None:
-
- _query_params.append(("to", to))
-
- if direction is not None:
-
- _query_params.append(("direction", direction.value))
-
- if status is not None:
-
- _query_params.append(("status", status.value))
-
- if start_time_after is not None:
- if isinstance(start_time_after, datetime):
- _query_params.append(
- (
- "startTimeAfter",
- start_time_after.strftime(
- self.api_client.configuration.datetime_format
- ),
- )
- )
- else:
- _query_params.append(("startTimeAfter", start_time_after))
-
- if conference_id is not None:
-
- _query_params.append(("conferenceId", conference_id))
-
- if dialog_id is not None:
-
- _query_params.append(("dialogId", dialog_id))
-
- if bulk_id is not None:
-
- _query_params.append(("bulkId", bulk_id))
-
- if page is not None:
-
- _query_params.append(("page", page))
-
- if size is not None:
-
- _query_params.append(("size", size))
-
# process the header parameters
# process the form parameters
# process the body parameter
@@ -14992,7 +14899,7 @@ def _get_calls_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/calls",
+ resource_path="/calls/1/calls/{callId}/history",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -15006,9 +14913,12 @@ def _get_calls_serialize(
)
@validate_call
- def get_calls_file(
+ def get_call_recordings(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -15020,13 +14930,15 @@ def get_calls_file(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsFile:
- """Get file
+ ) -> CallRecording:
+ """Get call recordings
- Get a single file.
+ Get the recordings for a single call.
- :param file_id: File ID. (required)
- :type file_id: str
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -15049,8 +14961,9 @@ def get_calls_file(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_file_serialize(
- file_id=file_id,
+ _param = self._get_call_recordings_serialize(
+ call_id=call_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -15058,8 +14971,9 @@ def get_calls_file(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsFile",
+ "200": "CallRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -15075,9 +14989,12 @@ def get_calls_file(
).data
@validate_call
- def get_calls_file_with_http_info(
+ def get_call_recordings_with_http_info(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -15089,13 +15006,15 @@ def get_calls_file_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsFile]:
- """Get file
+ ) -> ApiResponse[CallRecording]:
+ """Get call recordings
- Get a single file.
+ Get the recordings for a single call.
- :param file_id: File ID. (required)
- :type file_id: str
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -15118,8 +15037,9 @@ def get_calls_file_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_file_serialize(
- file_id=file_id,
+ _param = self._get_call_recordings_serialize(
+ call_id=call_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -15127,8 +15047,9 @@ def get_calls_file_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsFile",
+ "200": "CallRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -15144,9 +15065,12 @@ def get_calls_file_with_http_info(
)
@validate_call
- def get_calls_file_without_preload_content(
+ def get_call_recordings_without_preload_content(
self,
- file_id: Annotated[StrictStr, Field(description="File ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -15159,12 +15083,14 @@ def get_calls_file_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get file
+ """Get call recordings
- Get a single file.
+ Get the recordings for a single call.
- :param file_id: File ID. (required)
- :type file_id: str
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -15187,8 +15113,9 @@ def get_calls_file_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_file_serialize(
- file_id=file_id,
+ _param = self._get_call_recordings_serialize(
+ call_id=call_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -15196,8 +15123,9 @@ def get_calls_file_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsFile",
+ "200": "CallRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -15208,9 +15136,10 @@ def get_calls_file_without_preload_content(
)
return response_data.response
- def _get_calls_file_serialize(
+ def _get_call_recordings_serialize(
self,
- file_id,
+ call_id,
+ location,
_request_auth,
_content_type,
_headers,
@@ -15229,9 +15158,13 @@ def _get_calls_file_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if file_id is not None:
- _path_params["fileId"] = file_id
+ if call_id is not None:
+ _path_params["callId"] = call_id
# process the query parameters
+ if location is not None:
+
+ _query_params.append(("location", location.value))
+
# process the header parameters
# process the form parameters
# process the body parameter
@@ -15246,7 +15179,7 @@ def _get_calls_file_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/files/{fileId}",
+ resource_path="/calls/1/recordings/calls/{callId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -15260,8 +15193,40 @@ def _get_calls_file_serialize(
)
@validate_call
- def get_calls_files(
+ def get_calls(
self,
+ type: Annotated[
+ Optional[CallEndpointType], Field(description="Call endpoint type.")
+ ] = None,
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ var_from: Annotated[
+ Optional[StrictStr], Field(description="Caller identifier.")
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr], Field(description="Callee identifier.")
+ ] = None,
+ direction: Annotated[
+ Optional[CallDirection], Field(description="Call direction.")
+ ] = None,
+ status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ conference_id: Annotated[
+ Optional[StrictStr], Field(description="Conference ID.")
+ ] = None,
+ dialog_id: Annotated[
+ Optional[StrictStr], Field(description="Dialog ID.")
+ ] = None,
+ bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -15281,11 +15246,33 @@ def get_calls_files(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsFilePage:
- """Get files
+ ) -> CallPage:
+ """Get calls
- Get files with pagination. Maximum number of pages is 100.
+ Get calls with pagination.
+ :param type: Call endpoint type.
+ :type type: CallEndpointType
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param var_from: Caller identifier.
+ :type var_from: str
+ :param to: Callee identifier.
+ :type to: str
+ :param direction: Call direction.
+ :type direction: CallDirection
+ :param status: Call state.
+ :type status: CallState
+ :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param conference_id: Conference ID.
+ :type conference_id: str
+ :param dialog_id: Dialog ID.
+ :type dialog_id: str
+ :param bulk_id: Bulk ID.
+ :type bulk_id: str
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -15312,7 +15299,18 @@ def get_calls_files(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_files_serialize(
+ _param = self._get_calls_serialize(
+ type=type,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ var_from=var_from,
+ to=to,
+ direction=direction,
+ status=status,
+ start_time_after=start_time_after,
+ conference_id=conference_id,
+ dialog_id=dialog_id,
+ bulk_id=bulk_id,
page=page,
size=size,
_request_auth=_request_auth,
@@ -15322,9 +15320,10 @@ def get_calls_files(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsFilePage",
+ "200": "CallPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -15339,8 +15338,40 @@ def get_calls_files(
).data
@validate_call
- def get_calls_files_with_http_info(
+ def get_calls_with_http_info(
self,
+ type: Annotated[
+ Optional[CallEndpointType], Field(description="Call endpoint type.")
+ ] = None,
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ var_from: Annotated[
+ Optional[StrictStr], Field(description="Caller identifier.")
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr], Field(description="Callee identifier.")
+ ] = None,
+ direction: Annotated[
+ Optional[CallDirection], Field(description="Call direction.")
+ ] = None,
+ status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ conference_id: Annotated[
+ Optional[StrictStr], Field(description="Conference ID.")
+ ] = None,
+ dialog_id: Annotated[
+ Optional[StrictStr], Field(description="Dialog ID.")
+ ] = None,
+ bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -15360,11 +15391,33 @@ def get_calls_files_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsFilePage]:
- """Get files
+ ) -> ApiResponse[CallPage]:
+ """Get calls
- Get files with pagination. Maximum number of pages is 100.
+ Get calls with pagination.
+ :param type: Call endpoint type.
+ :type type: CallEndpointType
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param var_from: Caller identifier.
+ :type var_from: str
+ :param to: Callee identifier.
+ :type to: str
+ :param direction: Call direction.
+ :type direction: CallDirection
+ :param status: Call state.
+ :type status: CallState
+ :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param conference_id: Conference ID.
+ :type conference_id: str
+ :param dialog_id: Dialog ID.
+ :type dialog_id: str
+ :param bulk_id: Bulk ID.
+ :type bulk_id: str
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -15391,7 +15444,18 @@ def get_calls_files_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_files_serialize(
+ _param = self._get_calls_serialize(
+ type=type,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ var_from=var_from,
+ to=to,
+ direction=direction,
+ status=status,
+ start_time_after=start_time_after,
+ conference_id=conference_id,
+ dialog_id=dialog_id,
+ bulk_id=bulk_id,
page=page,
size=size,
_request_auth=_request_auth,
@@ -15401,9 +15465,10 @@ def get_calls_files_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsFilePage",
+ "200": "CallPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -15418,32 +15483,86 @@ def get_calls_files_with_http_info(
)
@validate_call
- def get_calls_files_without_preload_content(
+ def get_calls_without_preload_content(
self,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
+ type: Annotated[
+ Optional[CallEndpointType], Field(description="Call endpoint type.")
] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
] = None,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
- ],
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
] = 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 files
-
- Get files with pagination. Maximum number of pages is 100.
+ var_from: Annotated[
+ Optional[StrictStr], Field(description="Caller identifier.")
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr], Field(description="Callee identifier.")
+ ] = None,
+ direction: Annotated[
+ Optional[CallDirection], Field(description="Call direction.")
+ ] = None,
+ status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ conference_id: Annotated[
+ Optional[StrictStr], Field(description="Conference ID.")
+ ] = None,
+ dialog_id: Annotated[
+ Optional[StrictStr], Field(description="Dialog ID.")
+ ] = None,
+ bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records 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 calls
+
+ Get calls with pagination.
+ :param type: Call endpoint type.
+ :type type: CallEndpointType
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param var_from: Caller identifier.
+ :type var_from: str
+ :param to: Callee identifier.
+ :type to: str
+ :param direction: Call direction.
+ :type direction: CallDirection
+ :param status: Call state.
+ :type status: CallState
+ :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param conference_id: Conference ID.
+ :type conference_id: str
+ :param dialog_id: Dialog ID.
+ :type dialog_id: str
+ :param bulk_id: Bulk ID.
+ :type bulk_id: str
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -15470,7 +15589,18 @@ def get_calls_files_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_files_serialize(
+ _param = self._get_calls_serialize(
+ type=type,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ var_from=var_from,
+ to=to,
+ direction=direction,
+ status=status,
+ start_time_after=start_time_after,
+ conference_id=conference_id,
+ dialog_id=dialog_id,
+ bulk_id=bulk_id,
page=page,
size=size,
_request_auth=_request_auth,
@@ -15480,9 +15610,10 @@ def get_calls_files_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsFilePage",
+ "200": "CallPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -15492,8 +15623,19 @@ def get_calls_files_without_preload_content(
)
return response_data.response
- def _get_calls_files_serialize(
+ def _get_calls_serialize(
self,
+ type,
+ calls_configuration_id,
+ application_id,
+ var_from,
+ to,
+ direction,
+ status,
+ start_time_after,
+ conference_id,
+ dialog_id,
+ bulk_id,
page,
size,
_request_auth,
@@ -15515,6 +15657,59 @@ def _get_calls_files_serialize(
# process the path parameters
# process the query parameters
+ if type is not None:
+
+ _query_params.append(("type", type.value))
+
+ if calls_configuration_id is not None:
+
+ _query_params.append(("callsConfigurationId", calls_configuration_id))
+
+ if application_id is not None:
+
+ _query_params.append(("applicationId", application_id))
+
+ if var_from is not None:
+
+ _query_params.append(("from", var_from))
+
+ if to is not None:
+
+ _query_params.append(("to", to))
+
+ if direction is not None:
+
+ _query_params.append(("direction", direction.value))
+
+ if status is not None:
+
+ _query_params.append(("status", status.value))
+
+ if start_time_after is not None:
+ if isinstance(start_time_after, datetime):
+ _query_params.append(
+ (
+ "startTimeAfter",
+ start_time_after.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("startTimeAfter", start_time_after))
+
+ if conference_id is not None:
+
+ _query_params.append(("conferenceId", conference_id))
+
+ if dialog_id is not None:
+
+ _query_params.append(("dialogId", dialog_id))
+
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
if page is not None:
_query_params.append(("page", page))
@@ -15537,7 +15732,7 @@ def _get_calls_files_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/files",
+ resource_path="/calls/1/calls",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -15551,54 +15746,9 @@ def _get_calls_files_serialize(
)
@validate_call
- def get_calls_history(
+ def get_calls_file(
self,
- type: Annotated[
- Optional[CallEndpointType], Field(description="Call endpoint type.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- var_from: Annotated[
- Optional[StrictStr], Field(description="Caller identifier.")
- ] = None,
- to: Annotated[
- Optional[StrictStr], Field(description="Callee identifier.")
- ] = None,
- direction: Annotated[
- Optional[CallDirection], Field(description="Call direction.")
- ] = None,
- status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
- ),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(
- description="Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
- ),
- ] = None,
- conference_id: Annotated[
- Optional[StrictStr], Field(description="Conference ID.")
- ] = None,
- dialog_id: Annotated[
- Optional[StrictStr], Field(description="Dialog ID.")
- ] = None,
- bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -15610,39 +15760,13 @@ def get_calls_history(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallLogPage:
- """Get calls history
+ ) -> CallsFile:
+ """Get file
- Get calls history with pagination. Calls history retention period is 3 months.
+ Get a single file.
- :param type: Call endpoint type.
- :type type: CallEndpointType
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param var_from: Caller identifier.
- :type var_from: str
- :param to: Callee identifier.
- :type to: str
- :param direction: Call direction.
- :type direction: CallDirection
- :param status: Call state.
- :type status: CallState
- :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
- :type start_time_after: datetime
- :param end_time_before: Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
- :type end_time_before: datetime
- :param conference_id: Conference ID.
- :type conference_id: str
- :param dialog_id: Dialog ID.
- :type dialog_id: str
- :param bulk_id: Bulk ID.
- :type bulk_id: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param file_id: File ID. (required)
+ :type file_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
@@ -15665,21 +15789,8 @@ def get_calls_history(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_history_serialize(
- type=type,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- var_from=var_from,
- to=to,
- direction=direction,
- status=status,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- conference_id=conference_id,
- dialog_id=dialog_id,
- bulk_id=bulk_id,
- page=page,
- size=size,
+ _param = self._get_calls_file_serialize(
+ file_id=file_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -15687,9 +15798,10 @@ def get_calls_history(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallLogPage",
- "400": "ApiException",
+ "200": "CallsFile",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -15704,54 +15816,9 @@ def get_calls_history(
).data
@validate_call
- def get_calls_history_with_http_info(
+ def get_calls_file_with_http_info(
self,
- type: Annotated[
- Optional[CallEndpointType], Field(description="Call endpoint type.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- var_from: Annotated[
- Optional[StrictStr], Field(description="Caller identifier.")
- ] = None,
- to: Annotated[
- Optional[StrictStr], Field(description="Callee identifier.")
- ] = None,
- direction: Annotated[
- Optional[CallDirection], Field(description="Call direction.")
- ] = None,
- status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
- ),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(
- description="Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
- ),
- ] = None,
- conference_id: Annotated[
- Optional[StrictStr], Field(description="Conference ID.")
- ] = None,
- dialog_id: Annotated[
- Optional[StrictStr], Field(description="Dialog ID.")
- ] = None,
- bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -15763,39 +15830,13 @@ def get_calls_history_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallLogPage]:
- """Get calls history
+ ) -> ApiResponse[CallsFile]:
+ """Get file
- Get calls history with pagination. Calls history retention period is 3 months.
+ Get a single file.
- :param type: Call endpoint type.
- :type type: CallEndpointType
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param var_from: Caller identifier.
- :type var_from: str
- :param to: Callee identifier.
- :type to: str
- :param direction: Call direction.
- :type direction: CallDirection
- :param status: Call state.
- :type status: CallState
- :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
- :type start_time_after: datetime
- :param end_time_before: Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
- :type end_time_before: datetime
- :param conference_id: Conference ID.
- :type conference_id: str
- :param dialog_id: Dialog ID.
- :type dialog_id: str
- :param bulk_id: Bulk ID.
- :type bulk_id: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param file_id: File ID. (required)
+ :type file_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
@@ -15818,21 +15859,8 @@ def get_calls_history_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_history_serialize(
- type=type,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- var_from=var_from,
- to=to,
- direction=direction,
- status=status,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- conference_id=conference_id,
- dialog_id=dialog_id,
- bulk_id=bulk_id,
- page=page,
- size=size,
+ _param = self._get_calls_file_serialize(
+ file_id=file_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -15840,9 +15868,10 @@ def get_calls_history_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallLogPage",
- "400": "ApiException",
+ "200": "CallsFile",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -15857,54 +15886,9 @@ def get_calls_history_with_http_info(
)
@validate_call
- def get_calls_history_without_preload_content(
+ def get_calls_file_without_preload_content(
self,
- type: Annotated[
- Optional[CallEndpointType], Field(description="Call endpoint type.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- var_from: Annotated[
- Optional[StrictStr], Field(description="Caller identifier.")
- ] = None,
- to: Annotated[
- Optional[StrictStr], Field(description="Callee identifier.")
- ] = None,
- direction: Annotated[
- Optional[CallDirection], Field(description="Call direction.")
- ] = None,
- status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
- ),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(
- description="Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
- ),
- ] = None,
- conference_id: Annotated[
- Optional[StrictStr], Field(description="Conference ID.")
- ] = None,
- dialog_id: Annotated[
- Optional[StrictStr], Field(description="Dialog ID.")
- ] = None,
- bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ file_id: Annotated[StrictStr, Field(description="File ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -15917,38 +15901,12 @@ def get_calls_history_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get calls history
+ """Get file
- Get calls history with pagination. Calls history retention period is 3 months.
+ Get a single file.
- :param type: Call endpoint type.
- :type type: CallEndpointType
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param var_from: Caller identifier.
- :type var_from: str
- :param to: Callee identifier.
- :type to: str
- :param direction: Call direction.
- :type direction: CallDirection
- :param status: Call state.
- :type status: CallState
- :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
- :type start_time_after: datetime
- :param end_time_before: Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
- :type end_time_before: datetime
- :param conference_id: Conference ID.
- :type conference_id: str
- :param dialog_id: Dialog ID.
- :type dialog_id: str
- :param bulk_id: Bulk ID.
- :type bulk_id: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param file_id: File ID. (required)
+ :type file_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
@@ -15971,21 +15929,8 @@ def get_calls_history_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_history_serialize(
- type=type,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- var_from=var_from,
- to=to,
- direction=direction,
- status=status,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- conference_id=conference_id,
- dialog_id=dialog_id,
- bulk_id=bulk_id,
- page=page,
- size=size,
+ _param = self._get_calls_file_serialize(
+ file_id=file_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -15993,9 +15938,10 @@ def get_calls_history_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallLogPage",
- "400": "ApiException",
+ "200": "CallsFile",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -16005,22 +15951,9 @@ def get_calls_history_without_preload_content(
)
return response_data.response
- def _get_calls_history_serialize(
+ def _get_calls_file_serialize(
self,
- type,
- calls_configuration_id,
- application_id,
- var_from,
- to,
- direction,
- status,
- start_time_after,
- end_time_before,
- conference_id,
- dialog_id,
- bulk_id,
- page,
- size,
+ file_id,
_request_auth,
_content_type,
_headers,
@@ -16039,96 +15972,24 @@ def _get_calls_history_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
+ if file_id is not None:
+ _path_params["fileId"] = file_id
# process the query parameters
- if type is not None:
-
- _query_params.append(("type", type.value))
-
- if calls_configuration_id is not None:
-
- _query_params.append(("callsConfigurationId", calls_configuration_id))
-
- if application_id is not None:
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
- _query_params.append(("applicationId", application_id))
+ # set the HTTP header `Accept`
+ _header_params["Accept"] = self.api_client.select_header_accept(
+ ["application/json"]
+ )
- if var_from is not None:
-
- _query_params.append(("from", var_from))
-
- if to is not None:
-
- _query_params.append(("to", to))
-
- if direction is not None:
-
- _query_params.append(("direction", direction.value))
-
- if status is not None:
-
- _query_params.append(("status", status.value))
-
- if start_time_after is not None:
- if isinstance(start_time_after, datetime):
- _query_params.append(
- (
- "startTimeAfter",
- start_time_after.strftime(
- self.api_client.configuration.datetime_format
- ),
- )
- )
- else:
- _query_params.append(("startTimeAfter", start_time_after))
-
- if end_time_before is not None:
- if isinstance(end_time_before, datetime):
- _query_params.append(
- (
- "endTimeBefore",
- end_time_before.strftime(
- self.api_client.configuration.datetime_format
- ),
- )
- )
- else:
- _query_params.append(("endTimeBefore", end_time_before))
-
- if conference_id is not None:
-
- _query_params.append(("conferenceId", conference_id))
-
- if dialog_id is not None:
-
- _query_params.append(("dialogId", dialog_id))
-
- if bulk_id is not None:
-
- _query_params.append(("bulkId", bulk_id))
-
- if page is not None:
-
- _query_params.append(("page", page))
-
- if size is not None:
-
- _query_params.append(("size", size))
-
- # 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] = ["APIKeyHeader"]
+ # authentication setting
+ _auth_settings: List[str] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/calls/history",
+ resource_path="/calls/1/files/{fileId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -16142,35 +16003,8 @@ def _get_calls_history_serialize(
)
@validate_call
- def get_calls_recordings(
+ def get_calls_files(
self,
- call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- endpoint_identifier: Annotated[
- Optional[StrictStr], Field(description="Endpoint identifier.")
- ] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(description="Date and time when the (first) call recording started."),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(description="Date and time when the (last) call recording ended."),
- ] = None,
- direction: Annotated[
- Optional[CallDirection], Field(description="Call direction.")
- ] = None,
- endpoint_type: Annotated[
- Optional[CallEndpointType], Field(description="Endpoint type.")
- ] = None,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -16190,29 +16024,11 @@ def get_calls_recordings(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallRecordingPage:
- """Get calls recordings
+ ) -> CallsFilePage:
+ """Get files
- Get the recordings of calls with pagination.
+ Get files with pagination. Maximum number of pages is 100.
- :param call_id: Call ID.
- :type call_id: str
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param endpoint_identifier: Endpoint identifier.
- :type endpoint_identifier: str
- :param start_time_after: Date and time when the (first) call recording started.
- :type start_time_after: datetime
- :param end_time_before: Date and time when the (last) call recording ended.
- :type end_time_before: datetime
- :param direction: Call direction.
- :type direction: CallDirection
- :param endpoint_type: Endpoint type.
- :type endpoint_type: CallEndpointType
- :param location: Recording location.
- :type location: str
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -16239,16 +16055,7 @@ def get_calls_recordings(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_recordings_serialize(
- call_id=call_id,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- endpoint_identifier=endpoint_identifier,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- direction=direction,
- endpoint_type=endpoint_type,
- location=location,
+ _param = self._get_calls_files_serialize(
page=page,
size=size,
_request_auth=_request_auth,
@@ -16258,9 +16065,10 @@ def get_calls_recordings(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallRecordingPage",
+ "200": "CallsFilePage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -16275,35 +16083,8 @@ def get_calls_recordings(
).data
@validate_call
- def get_calls_recordings_with_http_info(
+ def get_calls_files_with_http_info(
self,
- call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- endpoint_identifier: Annotated[
- Optional[StrictStr], Field(description="Endpoint identifier.")
- ] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(description="Date and time when the (first) call recording started."),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(description="Date and time when the (last) call recording ended."),
- ] = None,
- direction: Annotated[
- Optional[CallDirection], Field(description="Call direction.")
- ] = None,
- endpoint_type: Annotated[
- Optional[CallEndpointType], Field(description="Endpoint type.")
- ] = None,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -16323,29 +16104,11 @@ def get_calls_recordings_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallRecordingPage]:
- """Get calls recordings
+ ) -> ApiResponse[CallsFilePage]:
+ """Get files
- Get the recordings of calls with pagination.
+ Get files with pagination. Maximum number of pages is 100.
- :param call_id: Call ID.
- :type call_id: str
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param endpoint_identifier: Endpoint identifier.
- :type endpoint_identifier: str
- :param start_time_after: Date and time when the (first) call recording started.
- :type start_time_after: datetime
- :param end_time_before: Date and time when the (last) call recording ended.
- :type end_time_before: datetime
- :param direction: Call direction.
- :type direction: CallDirection
- :param endpoint_type: Endpoint type.
- :type endpoint_type: CallEndpointType
- :param location: Recording location.
- :type location: str
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -16372,16 +16135,7 @@ def get_calls_recordings_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_recordings_serialize(
- call_id=call_id,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- endpoint_identifier=endpoint_identifier,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- direction=direction,
- endpoint_type=endpoint_type,
- location=location,
+ _param = self._get_calls_files_serialize(
page=page,
size=size,
_request_auth=_request_auth,
@@ -16391,9 +16145,10 @@ def get_calls_recordings_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallRecordingPage",
+ "200": "CallsFilePage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -16408,35 +16163,8 @@ def get_calls_recordings_with_http_info(
)
@validate_call
- def get_calls_recordings_without_preload_content(
+ def get_calls_files_without_preload_content(
self,
- call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- endpoint_identifier: Annotated[
- Optional[StrictStr], Field(description="Endpoint identifier.")
- ] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(description="Date and time when the (first) call recording started."),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(description="Date and time when the (last) call recording ended."),
- ] = None,
- direction: Annotated[
- Optional[CallDirection], Field(description="Call direction.")
- ] = None,
- endpoint_type: Annotated[
- Optional[CallEndpointType], Field(description="Endpoint type.")
- ] = None,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -16457,28 +16185,10 @@ def get_calls_recordings_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get calls recordings
+ """Get files
- Get the recordings of calls with pagination.
+ Get files with pagination. Maximum number of pages is 100.
- :param call_id: Call ID.
- :type call_id: str
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param endpoint_identifier: Endpoint identifier.
- :type endpoint_identifier: str
- :param start_time_after: Date and time when the (first) call recording started.
- :type start_time_after: datetime
- :param end_time_before: Date and time when the (last) call recording ended.
- :type end_time_before: datetime
- :param direction: Call direction.
- :type direction: CallDirection
- :param endpoint_type: Endpoint type.
- :type endpoint_type: CallEndpointType
- :param location: Recording location.
- :type location: str
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -16505,16 +16215,7 @@ def get_calls_recordings_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_calls_recordings_serialize(
- call_id=call_id,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- endpoint_identifier=endpoint_identifier,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- direction=direction,
- endpoint_type=endpoint_type,
- location=location,
+ _param = self._get_calls_files_serialize(
page=page,
size=size,
_request_auth=_request_auth,
@@ -16524,9 +16225,10 @@ def get_calls_recordings_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallRecordingPage",
+ "200": "CallsFilePage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -16536,17 +16238,8 @@ def get_calls_recordings_without_preload_content(
)
return response_data.response
- def _get_calls_recordings_serialize(
+ def _get_calls_files_serialize(
self,
- call_id,
- calls_configuration_id,
- application_id,
- endpoint_identifier,
- start_time_after,
- end_time_before,
- direction,
- endpoint_type,
- location,
page,
size,
_request_auth,
@@ -16568,60 +16261,6 @@ def _get_calls_recordings_serialize(
# process the path parameters
# process the query parameters
- if call_id is not None:
-
- _query_params.append(("callId", call_id))
-
- if calls_configuration_id is not None:
-
- _query_params.append(("callsConfigurationId", calls_configuration_id))
-
- if application_id is not None:
-
- _query_params.append(("applicationId", application_id))
-
- if endpoint_identifier is not None:
-
- _query_params.append(("endpointIdentifier", endpoint_identifier))
-
- if start_time_after is not None:
- if isinstance(start_time_after, datetime):
- _query_params.append(
- (
- "startTimeAfter",
- start_time_after.strftime(
- self.api_client.configuration.datetime_format
- ),
- )
- )
- else:
- _query_params.append(("startTimeAfter", start_time_after))
-
- if end_time_before is not None:
- if isinstance(end_time_before, datetime):
- _query_params.append(
- (
- "endTimeBefore",
- end_time_before.strftime(
- self.api_client.configuration.datetime_format
- ),
- )
- )
- else:
- _query_params.append(("endTimeBefore", end_time_before))
-
- if direction is not None:
-
- _query_params.append(("direction", direction.value))
-
- if endpoint_type is not None:
-
- _query_params.append(("endpointType", endpoint_type.value))
-
- if location is not None:
-
- _query_params.append(("location", location))
-
if page is not None:
_query_params.append(("page", page))
@@ -16644,7 +16283,7 @@ def _get_calls_recordings_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/recordings/calls",
+ resource_path="/calls/1/files",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -16658,9 +16297,54 @@ def _get_calls_recordings_serialize(
)
@validate_call
- def get_conference(
+ def get_calls_history(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ type: Annotated[
+ Optional[CallEndpointType], Field(description="Call endpoint type.")
+ ] = None,
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ var_from: Annotated[
+ Optional[StrictStr], Field(description="Caller identifier.")
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr], Field(description="Callee identifier.")
+ ] = None,
+ direction: Annotated[
+ Optional[CallDirection], Field(description="Call direction.")
+ ] = None,
+ status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ conference_id: Annotated[
+ Optional[StrictStr], Field(description="Conference ID.")
+ ] = None,
+ dialog_id: Annotated[
+ Optional[StrictStr], Field(description="Dialog ID.")
+ ] = None,
+ bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -16672,13 +16356,39 @@ def get_conference(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsConference:
- """Get conference
+ ) -> CallLogPage:
+ """Get calls history
- Get a single conference.
+ Get calls history with pagination. Calls history retention period is 3 months.
- :param conference_id: Conference ID. (required)
+ :param type: Call endpoint type.
+ :type type: CallEndpointType
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param var_from: Caller identifier.
+ :type var_from: str
+ :param to: Callee identifier.
+ :type to: str
+ :param direction: Call direction.
+ :type direction: CallDirection
+ :param status: Call state.
+ :type status: CallState
+ :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param end_time_before: Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type end_time_before: datetime
+ :param conference_id: Conference ID.
:type conference_id: str
+ :param dialog_id: Dialog ID.
+ :type dialog_id: str
+ :param bulk_id: Bulk ID.
+ :type bulk_id: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -16701,8 +16411,21 @@ def get_conference(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conference_serialize(
+ _param = self._get_calls_history_serialize(
+ type=type,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ var_from=var_from,
+ to=to,
+ direction=direction,
+ status=status,
+ start_time_after=start_time_after,
+ end_time_before=end_time_before,
conference_id=conference_id,
+ dialog_id=dialog_id,
+ bulk_id=bulk_id,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -16710,9 +16433,10 @@ def get_conference(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConference",
+ "200": "CallLogPage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -16727,9 +16451,54 @@ def get_conference(
).data
@validate_call
- def get_conference_with_http_info(
+ def get_calls_history_with_http_info(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ type: Annotated[
+ Optional[CallEndpointType], Field(description="Call endpoint type.")
+ ] = None,
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ var_from: Annotated[
+ Optional[StrictStr], Field(description="Caller identifier.")
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr], Field(description="Callee identifier.")
+ ] = None,
+ direction: Annotated[
+ Optional[CallDirection], Field(description="Call direction.")
+ ] = None,
+ status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ conference_id: Annotated[
+ Optional[StrictStr], Field(description="Conference ID.")
+ ] = None,
+ dialog_id: Annotated[
+ Optional[StrictStr], Field(description="Dialog ID.")
+ ] = None,
+ bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -16741,15 +16510,41 @@ def get_conference_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsConference]:
- """Get conference
+ ) -> ApiResponse[CallLogPage]:
+ """Get calls history
- Get a single conference.
+ Get calls history with pagination. Calls history retention period is 3 months.
- :param conference_id: Conference ID. (required)
+ :param type: Call endpoint type.
+ :type type: CallEndpointType
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param var_from: Caller identifier.
+ :type var_from: str
+ :param to: Callee identifier.
+ :type to: str
+ :param direction: Call direction.
+ :type direction: CallDirection
+ :param status: Call state.
+ :type status: CallState
+ :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param end_time_before: Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type end_time_before: datetime
+ :param conference_id: Conference ID.
:type conference_id: str
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
+ :param dialog_id: Dialog ID.
+ :type dialog_id: str
+ :param bulk_id: Bulk ID.
+ :type bulk_id: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -16770,8 +16565,21 @@ def get_conference_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conference_serialize(
+ _param = self._get_calls_history_serialize(
+ type=type,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ var_from=var_from,
+ to=to,
+ direction=direction,
+ status=status,
+ start_time_after=start_time_after,
+ end_time_before=end_time_before,
conference_id=conference_id,
+ dialog_id=dialog_id,
+ bulk_id=bulk_id,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -16779,9 +16587,10 @@ def get_conference_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConference",
+ "200": "CallLogPage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -16796,9 +16605,54 @@ def get_conference_with_http_info(
)
@validate_call
- def get_conference_without_preload_content(
+ def get_calls_history_without_preload_content(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ type: Annotated[
+ Optional[CallEndpointType], Field(description="Call endpoint type.")
+ ] = None,
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ var_from: Annotated[
+ Optional[StrictStr], Field(description="Caller identifier.")
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr], Field(description="Callee identifier.")
+ ] = None,
+ direction: Annotated[
+ Optional[CallDirection], Field(description="Call direction.")
+ ] = None,
+ status: Annotated[Optional[CallState], Field(description="Call state.")] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ conference_id: Annotated[
+ Optional[StrictStr], Field(description="Conference ID.")
+ ] = None,
+ dialog_id: Annotated[
+ Optional[StrictStr], Field(description="Dialog ID.")
+ ] = None,
+ bulk_id: Annotated[Optional[StrictStr], Field(description="Bulk ID.")] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -16811,12 +16665,38 @@ def get_conference_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get conference
+ """Get calls history
- Get a single conference.
+ Get calls history with pagination. Calls history retention period is 3 months.
- :param conference_id: Conference ID. (required)
+ :param type: Call endpoint type.
+ :type type: CallEndpointType
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param var_from: Caller identifier.
+ :type var_from: str
+ :param to: Callee identifier.
+ :type to: str
+ :param direction: Call direction.
+ :type direction: CallDirection
+ :param status: Call state.
+ :type status: CallState
+ :param start_time_after: Date and time for when the call has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param end_time_before: Date and time for when the call has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type end_time_before: datetime
+ :param conference_id: Conference ID.
:type conference_id: str
+ :param dialog_id: Dialog ID.
+ :type dialog_id: str
+ :param bulk_id: Bulk ID.
+ :type bulk_id: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -16839,8 +16719,21 @@ def get_conference_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conference_serialize(
+ _param = self._get_calls_history_serialize(
+ type=type,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ var_from=var_from,
+ to=to,
+ direction=direction,
+ status=status,
+ start_time_after=start_time_after,
+ end_time_before=end_time_before,
conference_id=conference_id,
+ dialog_id=dialog_id,
+ bulk_id=bulk_id,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -16848,9 +16741,10 @@ def get_conference_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConference",
+ "200": "CallLogPage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -16860,9 +16754,22 @@ def get_conference_without_preload_content(
)
return response_data.response
- def _get_conference_serialize(
+ def _get_calls_history_serialize(
self,
+ type,
+ calls_configuration_id,
+ application_id,
+ var_from,
+ to,
+ direction,
+ status,
+ start_time_after,
+ end_time_before,
conference_id,
+ dialog_id,
+ bulk_id,
+ page,
+ size,
_request_auth,
_content_type,
_headers,
@@ -16881,9 +16788,81 @@ def _get_conference_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if conference_id is not None:
- _path_params["conferenceId"] = conference_id
# process the query parameters
+ if type is not None:
+
+ _query_params.append(("type", type.value))
+
+ if calls_configuration_id is not None:
+
+ _query_params.append(("callsConfigurationId", calls_configuration_id))
+
+ if application_id is not None:
+
+ _query_params.append(("applicationId", application_id))
+
+ if var_from is not None:
+
+ _query_params.append(("from", var_from))
+
+ if to is not None:
+
+ _query_params.append(("to", to))
+
+ if direction is not None:
+
+ _query_params.append(("direction", direction.value))
+
+ if status is not None:
+
+ _query_params.append(("status", status.value))
+
+ if start_time_after is not None:
+ if isinstance(start_time_after, datetime):
+ _query_params.append(
+ (
+ "startTimeAfter",
+ start_time_after.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("startTimeAfter", start_time_after))
+
+ if end_time_before is not None:
+ if isinstance(end_time_before, datetime):
+ _query_params.append(
+ (
+ "endTimeBefore",
+ end_time_before.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("endTimeBefore", end_time_before))
+
+ if conference_id is not None:
+
+ _query_params.append(("conferenceId", conference_id))
+
+ if dialog_id is not None:
+
+ _query_params.append(("dialogId", dialog_id))
+
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ if size is not None:
+
+ _query_params.append(("size", size))
+
# process the header parameters
# process the form parameters
# process the body parameter
@@ -16898,7 +16877,7 @@ def _get_conference_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/conferences/{conferenceId}",
+ resource_path="/calls/1/calls/history",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -16912,37 +16891,976 @@ def _get_conference_serialize(
)
@validate_call
- def get_conference_history(
+ def get_calls_recordings(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
- ],
+ call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
] = 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,
- ) -> CallsConferenceLogResponse:
- """Get conference history
-
- Get a single conference history. Conference history retention period is 3 months.
-
- :param conference_id: Conference ID. (required)
- :type conference_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.
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr], Field(description="Entity ID.")
+ ] = None,
+ endpoint_identifier: Annotated[
+ Optional[StrictStr], Field(description="Endpoint identifier.")
+ ] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(description="Date and time when the (first) call recording started."),
+ ] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(description="Date and time when the (last) call recording ended."),
+ ] = None,
+ direction: Annotated[
+ Optional[CallDirection], Field(description="Call direction.")
+ ] = None,
+ endpoint_type: Annotated[
+ Optional[CallEndpointType], Field(description="Endpoint type.")
+ ] = None,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records 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,
+ ) -> CallRecordingPage:
+ """Get calls recordings
+
+ Get the recordings of calls with pagination.
+
+ :param call_id: Call ID.
+ :type call_id: str
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param entity_id: Entity ID.
+ :type entity_id: str
+ :param endpoint_identifier: Endpoint identifier.
+ :type endpoint_identifier: str
+ :param start_time_after: Date and time when the (first) call recording started.
+ :type start_time_after: datetime
+ :param end_time_before: Date and time when the (last) call recording ended.
+ :type end_time_before: datetime
+ :param direction: Call direction.
+ :type direction: CallDirection
+ :param endpoint_type: Endpoint type.
+ :type endpoint_type: CallEndpointType
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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_calls_recordings_serialize(
+ call_id=call_id,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ entity_id=entity_id,
+ endpoint_identifier=endpoint_identifier,
+ start_time_after=start_time_after,
+ end_time_before=end_time_before,
+ direction=direction,
+ endpoint_type=endpoint_type,
+ location=location,
+ page=page,
+ size=size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallRecordingPage",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_calls_recordings_with_http_info(
+ self,
+ call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr], Field(description="Entity ID.")
+ ] = None,
+ endpoint_identifier: Annotated[
+ Optional[StrictStr], Field(description="Endpoint identifier.")
+ ] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(description="Date and time when the (first) call recording started."),
+ ] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(description="Date and time when the (last) call recording ended."),
+ ] = None,
+ direction: Annotated[
+ Optional[CallDirection], Field(description="Call direction.")
+ ] = None,
+ endpoint_type: Annotated[
+ Optional[CallEndpointType], Field(description="Endpoint type.")
+ ] = None,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records 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[CallRecordingPage]:
+ """Get calls recordings
+
+ Get the recordings of calls with pagination.
+
+ :param call_id: Call ID.
+ :type call_id: str
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param entity_id: Entity ID.
+ :type entity_id: str
+ :param endpoint_identifier: Endpoint identifier.
+ :type endpoint_identifier: str
+ :param start_time_after: Date and time when the (first) call recording started.
+ :type start_time_after: datetime
+ :param end_time_before: Date and time when the (last) call recording ended.
+ :type end_time_before: datetime
+ :param direction: Call direction.
+ :type direction: CallDirection
+ :param endpoint_type: Endpoint type.
+ :type endpoint_type: CallEndpointType
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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_calls_recordings_serialize(
+ call_id=call_id,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ entity_id=entity_id,
+ endpoint_identifier=endpoint_identifier,
+ start_time_after=start_time_after,
+ end_time_before=end_time_before,
+ direction=direction,
+ endpoint_type=endpoint_type,
+ location=location,
+ page=page,
+ size=size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallRecordingPage",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_calls_recordings_without_preload_content(
+ self,
+ call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr], Field(description="Entity ID.")
+ ] = None,
+ endpoint_identifier: Annotated[
+ Optional[StrictStr], Field(description="Endpoint identifier.")
+ ] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(description="Date and time when the (first) call recording started."),
+ ] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(description="Date and time when the (last) call recording ended."),
+ ] = None,
+ direction: Annotated[
+ Optional[CallDirection], Field(description="Call direction.")
+ ] = None,
+ endpoint_type: Annotated[
+ Optional[CallEndpointType], Field(description="Endpoint type.")
+ ] = None,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records 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 calls recordings
+
+ Get the recordings of calls with pagination.
+
+ :param call_id: Call ID.
+ :type call_id: str
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param entity_id: Entity ID.
+ :type entity_id: str
+ :param endpoint_identifier: Endpoint identifier.
+ :type endpoint_identifier: str
+ :param start_time_after: Date and time when the (first) call recording started.
+ :type start_time_after: datetime
+ :param end_time_before: Date and time when the (last) call recording ended.
+ :type end_time_before: datetime
+ :param direction: Call direction.
+ :type direction: CallDirection
+ :param endpoint_type: Endpoint type.
+ :type endpoint_type: CallEndpointType
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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_calls_recordings_serialize(
+ call_id=call_id,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ entity_id=entity_id,
+ endpoint_identifier=endpoint_identifier,
+ start_time_after=start_time_after,
+ end_time_before=end_time_before,
+ direction=direction,
+ endpoint_type=endpoint_type,
+ location=location,
+ page=page,
+ size=size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallRecordingPage",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_calls_recordings_serialize(
+ self,
+ call_id,
+ calls_configuration_id,
+ application_id,
+ entity_id,
+ endpoint_identifier,
+ start_time_after,
+ end_time_before,
+ direction,
+ endpoint_type,
+ location,
+ page,
+ size,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if call_id is not None:
+
+ _query_params.append(("callId", call_id))
+
+ if calls_configuration_id is not None:
+
+ _query_params.append(("callsConfigurationId", calls_configuration_id))
+
+ if application_id is not None:
+
+ _query_params.append(("applicationId", application_id))
+
+ if entity_id is not None:
+
+ _query_params.append(("entityId", entity_id))
+
+ if endpoint_identifier is not None:
+
+ _query_params.append(("endpointIdentifier", endpoint_identifier))
+
+ if start_time_after is not None:
+ if isinstance(start_time_after, datetime):
+ _query_params.append(
+ (
+ "startTimeAfter",
+ start_time_after.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("startTimeAfter", start_time_after))
+
+ if end_time_before is not None:
+ if isinstance(end_time_before, datetime):
+ _query_params.append(
+ (
+ "endTimeBefore",
+ end_time_before.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("endTimeBefore", end_time_before))
+
+ if direction is not None:
+
+ _query_params.append(("direction", direction.value))
+
+ if endpoint_type is not None:
+
+ _query_params.append(("endpointType", endpoint_type.value))
+
+ if location is not None:
+
+ _query_params.append(("location", location.value))
+
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ if size is not None:
+
+ _query_params.append(("size", size))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/calls/1/recordings/calls",
+ 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_conference(
+ self,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ _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,
+ ) -> CallsConference:
+ """Get conference
+
+ Get a single conference.
+
+ :param conference_id: Conference ID. (required)
+ :type conference_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_conference_serialize(
+ conference_id=conference_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsConference",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_conference_with_http_info(
+ self,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ _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[CallsConference]:
+ """Get conference
+
+ Get a single conference.
+
+ :param conference_id: Conference ID. (required)
+ :type conference_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_conference_serialize(
+ conference_id=conference_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsConference",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_conference_without_preload_content(
+ self,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ _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 conference
+
+ Get a single conference.
+
+ :param conference_id: Conference ID. (required)
+ :type conference_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_conference_serialize(
+ conference_id=conference_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsConference",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_conference_serialize(
+ self,
+ conference_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if conference_id is not None:
+ _path_params["conferenceId"] = conference_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/calls/1/conferences/{conferenceId}",
+ 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_conference_history(
+ self,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ _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,
+ ) -> CallsConferenceLog:
+ """Get conference history
+
+ Get a single conference history. Conference history retention period is 3 months.
+
+ :param conference_id: Conference ID. (required)
+ :type conference_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_conference_history_serialize(
+ conference_id=conference_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsConferenceLog",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_conference_history_with_http_info(
+ self,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ _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[CallsConferenceLog]:
+ """Get conference history
+
+ Get a single conference history. Conference history retention period is 3 months.
+
+ :param conference_id: Conference ID. (required)
+ :type conference_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_conference_history_serialize(
+ conference_id=conference_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsConferenceLog",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_conference_history_without_preload_content(
+ self,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ _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 conference history
+
+ Get a single conference history. Conference history retention period is 3 months.
+
+ :param conference_id: Conference ID. (required)
+ :type conference_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
@@ -16964,8 +17882,132 @@ def get_conference_history(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceLogResponse",
+ "200": "CallsConferenceLog",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_conference_history_serialize(
+ self,
+ conference_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if conference_id is not None:
+ _path_params["conferenceId"] = conference_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/calls/1/conferences/{conferenceId}/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 get_conference_recordings(
+ self,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = 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,
+ ) -> CallsConferenceRecording:
+ """Get conference recordings
+
+ Get the recordings for a single conference.
+
+ :param conference_id: Conference ID. (required)
+ :type conference_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
+ :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_conference_recordings_serialize(
+ conference_id=conference_id,
+ location=location,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsConferenceRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -16981,9 +18023,12 @@ def get_conference_history(
).data
@validate_call
- def get_conference_history_with_http_info(
+ def get_conference_recordings_with_http_info(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -16995,13 +18040,15 @@ def get_conference_history_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsConferenceLogResponse]:
- """Get conference history
+ ) -> ApiResponse[CallsConferenceRecording]:
+ """Get conference recordings
- Get a single conference history. Conference history retention period is 3 months.
+ Get the recordings for a single conference.
:param conference_id: Conference ID. (required)
:type conference_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -17024,8 +18071,9 @@ def get_conference_history_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conference_history_serialize(
+ _param = self._get_conference_recordings_serialize(
conference_id=conference_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -17033,8 +18081,9 @@ def get_conference_history_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceLogResponse",
+ "200": "CallsConferenceRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -17050,9 +18099,12 @@ def get_conference_history_with_http_info(
)
@validate_call
- def get_conference_history_without_preload_content(
+ def get_conference_recordings_without_preload_content(
self,
conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -17065,12 +18117,14 @@ def get_conference_history_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get conference history
+ """Get conference recordings
- Get a single conference history. Conference history retention period is 3 months.
+ Get the recordings for a single conference.
:param conference_id: Conference ID. (required)
:type conference_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -17093,8 +18147,9 @@ def get_conference_history_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conference_history_serialize(
+ _param = self._get_conference_recordings_serialize(
conference_id=conference_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -17102,8 +18157,9 @@ def get_conference_history_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceLogResponse",
+ "200": "CallsConferenceRecording",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -17114,9 +18170,10 @@ def get_conference_history_without_preload_content(
)
return response_data.response
- def _get_conference_history_serialize(
+ def _get_conference_recordings_serialize(
self,
conference_id,
+ location,
_request_auth,
_content_type,
_headers,
@@ -17138,6 +18195,10 @@ def _get_conference_history_serialize(
if conference_id is not None:
_path_params["conferenceId"] = conference_id
# process the query parameters
+ if location is not None:
+
+ _query_params.append(("location", location.value))
+
# process the header parameters
# process the form parameters
# process the body parameter
@@ -17152,7 +18213,7 @@ def _get_conference_history_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/conferences/{conferenceId}/history",
+ resource_path="/calls/1/recordings/conferences/{conferenceId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -17166,11 +18227,31 @@ def _get_conference_history_serialize(
)
@validate_call
- def get_conference_recordings(
+ def get_conferences(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ name: Annotated[
+ Optional[StrictStr], Field(description="Conference name.")
+ ] = None,
+ call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
] = None,
_request_timeout: Union[
None,
@@ -17183,15 +18264,25 @@ def get_conference_recordings(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsPublicConferenceRecording:
- """Get conference recordings
+ ) -> CallsConferencePage:
+ """Get conferences
- Get the recordings for a single conference.
+ Get conferences with pagination.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param location: Recording location.
- :type location: str
+ :param name: Conference name.
+ :type name: str
+ :param call_id: Call ID.
+ :type call_id: str
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param start_time_after: Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -17214,9 +18305,14 @@ def get_conference_recordings(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conference_recordings_serialize(
- conference_id=conference_id,
- location=location,
+ _param = self._get_conferences_serialize(
+ name=name,
+ call_id=call_id,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ start_time_after=start_time_after,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -17224,9 +18320,10 @@ def get_conference_recordings(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicConferenceRecording",
+ "200": "CallsConferencePage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -17241,11 +18338,31 @@ def get_conference_recordings(
).data
@validate_call
- def get_conference_recordings_with_http_info(
+ def get_conferences_with_http_info(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ name: Annotated[
+ Optional[StrictStr], Field(description="Conference name.")
+ ] = None,
+ call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
] = None,
_request_timeout: Union[
None,
@@ -17258,15 +18375,25 @@ def get_conference_recordings_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsPublicConferenceRecording]:
- """Get conference recordings
+ ) -> ApiResponse[CallsConferencePage]:
+ """Get conferences
- Get the recordings for a single conference.
+ Get conferences with pagination.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param location: Recording location.
- :type location: str
+ :param name: Conference name.
+ :type name: str
+ :param call_id: Call ID.
+ :type call_id: str
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param start_time_after: Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -17289,9 +18416,14 @@ def get_conference_recordings_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conference_recordings_serialize(
- conference_id=conference_id,
- location=location,
+ _param = self._get_conferences_serialize(
+ name=name,
+ call_id=call_id,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ start_time_after=start_time_after,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -17299,9 +18431,10 @@ def get_conference_recordings_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicConferenceRecording",
+ "200": "CallsConferencePage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -17316,11 +18449,31 @@ def get_conference_recordings_with_http_info(
)
@validate_call
- def get_conference_recordings_without_preload_content(
+ def get_conferences_without_preload_content(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ name: Annotated[
+ Optional[StrictStr], Field(description="Conference name.")
+ ] = None,
+ call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
] = None,
_request_timeout: Union[
None,
@@ -17334,14 +18487,24 @@ def get_conference_recordings_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get conference recordings
+ """Get conferences
- Get the recordings for a single conference.
+ Get conferences with pagination.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param location: Recording location.
- :type location: str
+ :param name: Conference name.
+ :type name: str
+ :param call_id: Call ID.
+ :type call_id: str
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param start_time_after: Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -17364,9 +18527,14 @@ def get_conference_recordings_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conference_recordings_serialize(
- conference_id=conference_id,
- location=location,
+ _param = self._get_conferences_serialize(
+ name=name,
+ call_id=call_id,
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ start_time_after=start_time_after,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -17374,9 +18542,10 @@ def get_conference_recordings_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicConferenceRecording",
+ "200": "CallsConferencePage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -17386,10 +18555,15 @@ def get_conference_recordings_without_preload_content(
)
return response_data.response
- def _get_conference_recordings_serialize(
+ def _get_conferences_serialize(
self,
- conference_id,
- location,
+ name,
+ call_id,
+ calls_configuration_id,
+ application_id,
+ start_time_after,
+ page,
+ size,
_request_auth,
_content_type,
_headers,
@@ -17408,12 +18582,43 @@ def _get_conference_recordings_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if conference_id is not None:
- _path_params["conferenceId"] = conference_id
# process the query parameters
- if location is not None:
+ if name is not None:
+
+ _query_params.append(("name", name))
+
+ if call_id is not None:
+
+ _query_params.append(("callId", call_id))
+
+ if calls_configuration_id is not None:
+
+ _query_params.append(("callsConfigurationId", calls_configuration_id))
+
+ if application_id is not None:
+
+ _query_params.append(("applicationId", application_id))
+
+ if start_time_after is not None:
+ if isinstance(start_time_after, datetime):
+ _query_params.append(
+ (
+ "startTimeAfter",
+ start_time_after.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("startTimeAfter", start_time_after))
+
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ if size is not None:
- _query_params.append(("location", location))
+ _query_params.append(("size", size))
# process the header parameters
# process the form parameters
@@ -17429,7 +18634,7 @@ def _get_conference_recordings_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/recordings/conferences/{conferenceId}",
+ resource_path="/calls/1/conferences",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -17443,7 +18648,7 @@ def _get_conference_recordings_serialize(
)
@validate_call
- def get_conferences(
+ def get_conferences_history(
self,
name: Annotated[
Optional[StrictStr], Field(description="Conference name.")
@@ -17461,6 +18666,12 @@ def get_conferences(
description="Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
),
] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -17480,10 +18691,10 @@ def get_conferences(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsConferencePage:
- """Get conferences
+ ) -> CallsConferenceLogPage:
+ """Get conferences history
- Get conferences with pagination.
+ Get conferences history with pagination. Conferences history retention period is 3 months.
:param name: Conference name.
:type name: str
@@ -17495,6 +18706,8 @@ def get_conferences(
:type application_id: str
:param start_time_after: Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
:type start_time_after: datetime
+ :param end_time_before: Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type end_time_before: datetime
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -17521,12 +18734,13 @@ def get_conferences(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conferences_serialize(
+ _param = self._get_conferences_history_serialize(
name=name,
call_id=call_id,
calls_configuration_id=calls_configuration_id,
application_id=application_id,
start_time_after=start_time_after,
+ end_time_before=end_time_before,
page=page,
size=size,
_request_auth=_request_auth,
@@ -17536,9 +18750,10 @@ def get_conferences(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferencePage",
+ "200": "CallsConferenceLogPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -17553,7 +18768,7 @@ def get_conferences(
).data
@validate_call
- def get_conferences_with_http_info(
+ def get_conferences_history_with_http_info(
self,
name: Annotated[
Optional[StrictStr], Field(description="Conference name.")
@@ -17571,6 +18786,12 @@ def get_conferences_with_http_info(
description="Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
),
] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -17590,10 +18811,10 @@ def get_conferences_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsConferencePage]:
- """Get conferences
+ ) -> ApiResponse[CallsConferenceLogPage]:
+ """Get conferences history
- Get conferences with pagination.
+ Get conferences history with pagination. Conferences history retention period is 3 months.
:param name: Conference name.
:type name: str
@@ -17605,6 +18826,8 @@ def get_conferences_with_http_info(
:type application_id: str
:param start_time_after: Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
:type start_time_after: datetime
+ :param end_time_before: Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type end_time_before: datetime
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -17631,12 +18854,13 @@ def get_conferences_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conferences_serialize(
+ _param = self._get_conferences_history_serialize(
name=name,
call_id=call_id,
calls_configuration_id=calls_configuration_id,
application_id=application_id,
start_time_after=start_time_after,
+ end_time_before=end_time_before,
page=page,
size=size,
_request_auth=_request_auth,
@@ -17646,9 +18870,10 @@ def get_conferences_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferencePage",
+ "200": "CallsConferenceLogPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -17663,7 +18888,7 @@ def get_conferences_with_http_info(
)
@validate_call
- def get_conferences_without_preload_content(
+ def get_conferences_history_without_preload_content(
self,
name: Annotated[
Optional[StrictStr], Field(description="Conference name.")
@@ -17681,6 +18906,12 @@ def get_conferences_without_preload_content(
description="Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
),
] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -17701,9 +18932,9 @@ def get_conferences_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get conferences
+ """Get conferences history
- Get conferences with pagination.
+ Get conferences history with pagination. Conferences history retention period is 3 months.
:param name: Conference name.
:type name: str
@@ -17715,6 +18946,8 @@ def get_conferences_without_preload_content(
:type application_id: str
:param start_time_after: Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
:type start_time_after: datetime
+ :param end_time_before: Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type end_time_before: datetime
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -17741,12 +18974,13 @@ def get_conferences_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conferences_serialize(
+ _param = self._get_conferences_history_serialize(
name=name,
call_id=call_id,
calls_configuration_id=calls_configuration_id,
application_id=application_id,
start_time_after=start_time_after,
+ end_time_before=end_time_before,
page=page,
size=size,
_request_auth=_request_auth,
@@ -17756,9 +18990,10 @@ def get_conferences_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferencePage",
+ "200": "CallsConferenceLogPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -17768,13 +19003,14 @@ def get_conferences_without_preload_content(
)
return response_data.response
- def _get_conferences_serialize(
+ def _get_conferences_history_serialize(
self,
name,
call_id,
calls_configuration_id,
application_id,
start_time_after,
+ end_time_before,
page,
size,
_request_auth,
@@ -17816,14 +19052,27 @@ def _get_conferences_serialize(
if isinstance(start_time_after, datetime):
_query_params.append(
(
- "startTimeAfter",
- start_time_after.strftime(
+ "startTimeAfter",
+ start_time_after.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("startTimeAfter", start_time_after))
+
+ if end_time_before is not None:
+ if isinstance(end_time_before, datetime):
+ _query_params.append(
+ (
+ "endTimeBefore",
+ end_time_before.strftime(
self.api_client.configuration.datetime_format
),
)
)
else:
- _query_params.append(("startTimeAfter", start_time_after))
+ _query_params.append(("endTimeBefore", end_time_before))
if page is not None:
@@ -17847,7 +19096,7 @@ def _get_conferences_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/conferences",
+ resource_path="/calls/1/conferences/history",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -17861,30 +19110,62 @@ def _get_conferences_serialize(
)
@validate_call
- def get_conferences_history(
+ def get_conferences_recordings(
self,
- name: Annotated[
- Optional[StrictStr], Field(description="Conference name.")
+ conference_id: Annotated[
+ Optional[StrictStr], Field(description="Conference ID.")
] = None,
- call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
calls_configuration_id: Annotated[
Optional[StrictStr], Field(description="Calls Configuration ID.")
] = None,
application_id: Annotated[
Optional[StrictStr], Field(description="Application ID.")
] = None,
+ entity_id: Annotated[
+ Optional[StrictStr], Field(description="Entity ID.")
+ ] = None,
+ conference_name: Annotated[
+ Optional[StrictStr], Field(description="Conference name.")
+ ] = None,
+ call_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all conference recordings where call ID was included in the recording."
+ ),
+ ] = None,
+ call_endpoint_type: Annotated[
+ Optional[CallEndpointType],
+ Field(
+ description="Filter all conference recordings where calls with endpoint type were included in the recording."
+ ),
+ ] = None,
+ call_endpoint_identifier: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all conference recordings where calls with endpoint identifier were included in the recording."
+ ),
+ ] = None,
start_time_after: Annotated[
Optional[datetime],
Field(
- description="Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Date and time when the (first) conference recording started."
),
] = None,
end_time_before: Annotated[
Optional[datetime],
Field(
- description="Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Date and time when the (last) conference recording ended."
+ ),
+ ] = None,
+ composition: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="Flag indicating whether auto-compose feature was turned on for the recording."
),
] = None,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -17904,23 +19185,35 @@ def get_conferences_history(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsConferenceLogPage:
- """Get conferences history
+ ) -> CallsConferenceRecordingPage:
+ """Get conferences recordings
- Get conferences history with pagination. Conferences history retention period is 3 months.
+ Get the recordings of conferences with pagination.
- :param name: Conference name.
- :type name: str
- :param call_id: Call ID.
- :type call_id: str
+ :param conference_id: Conference ID.
+ :type conference_id: str
:param calls_configuration_id: Calls Configuration ID.
:type calls_configuration_id: str
:param application_id: Application ID.
:type application_id: str
- :param start_time_after: Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :param entity_id: Entity ID.
+ :type entity_id: str
+ :param conference_name: Conference name.
+ :type conference_name: str
+ :param call_id: Filter all conference recordings where call ID was included in the recording.
+ :type call_id: str
+ :param call_endpoint_type: Filter all conference recordings where calls with endpoint type were included in the recording.
+ :type call_endpoint_type: CallEndpointType
+ :param call_endpoint_identifier: Filter all conference recordings where calls with endpoint identifier were included in the recording.
+ :type call_endpoint_identifier: str
+ :param start_time_after: Date and time when the (first) conference recording started.
:type start_time_after: datetime
- :param end_time_before: Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :param end_time_before: Date and time when the (last) conference recording ended.
:type end_time_before: datetime
+ :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
+ :type composition: bool
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -17947,13 +19240,19 @@ def get_conferences_history(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conferences_history_serialize(
- name=name,
- call_id=call_id,
+ _param = self._get_conferences_recordings_serialize(
+ conference_id=conference_id,
calls_configuration_id=calls_configuration_id,
application_id=application_id,
+ entity_id=entity_id,
+ conference_name=conference_name,
+ call_id=call_id,
+ call_endpoint_type=call_endpoint_type,
+ call_endpoint_identifier=call_endpoint_identifier,
start_time_after=start_time_after,
end_time_before=end_time_before,
+ composition=composition,
+ location=location,
page=page,
size=size,
_request_auth=_request_auth,
@@ -17963,9 +19262,10 @@ def get_conferences_history(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceLogPage",
+ "200": "CallsConferenceRecordingPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -17980,30 +19280,62 @@ def get_conferences_history(
).data
@validate_call
- def get_conferences_history_with_http_info(
+ def get_conferences_recordings_with_http_info(
self,
- name: Annotated[
- Optional[StrictStr], Field(description="Conference name.")
+ conference_id: Annotated[
+ Optional[StrictStr], Field(description="Conference ID.")
] = None,
- call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
calls_configuration_id: Annotated[
Optional[StrictStr], Field(description="Calls Configuration ID.")
] = None,
application_id: Annotated[
Optional[StrictStr], Field(description="Application ID.")
] = None,
+ entity_id: Annotated[
+ Optional[StrictStr], Field(description="Entity ID.")
+ ] = None,
+ conference_name: Annotated[
+ Optional[StrictStr], Field(description="Conference name.")
+ ] = None,
+ call_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all conference recordings where call ID was included in the recording."
+ ),
+ ] = None,
+ call_endpoint_type: Annotated[
+ Optional[CallEndpointType],
+ Field(
+ description="Filter all conference recordings where calls with endpoint type were included in the recording."
+ ),
+ ] = None,
+ call_endpoint_identifier: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all conference recordings where calls with endpoint identifier were included in the recording."
+ ),
+ ] = None,
start_time_after: Annotated[
Optional[datetime],
Field(
- description="Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Date and time when the (first) conference recording started."
),
] = None,
end_time_before: Annotated[
Optional[datetime],
Field(
- description="Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Date and time when the (last) conference recording ended."
+ ),
+ ] = None,
+ composition: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="Flag indicating whether auto-compose feature was turned on for the recording."
),
] = None,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -18023,23 +19355,35 @@ def get_conferences_history_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsConferenceLogPage]:
- """Get conferences history
+ ) -> ApiResponse[CallsConferenceRecordingPage]:
+ """Get conferences recordings
- Get conferences history with pagination. Conferences history retention period is 3 months.
+ Get the recordings of conferences with pagination.
- :param name: Conference name.
- :type name: str
- :param call_id: Call ID.
- :type call_id: str
+ :param conference_id: Conference ID.
+ :type conference_id: str
:param calls_configuration_id: Calls Configuration ID.
:type calls_configuration_id: str
:param application_id: Application ID.
:type application_id: str
- :param start_time_after: Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :param entity_id: Entity ID.
+ :type entity_id: str
+ :param conference_name: Conference name.
+ :type conference_name: str
+ :param call_id: Filter all conference recordings where call ID was included in the recording.
+ :type call_id: str
+ :param call_endpoint_type: Filter all conference recordings where calls with endpoint type were included in the recording.
+ :type call_endpoint_type: CallEndpointType
+ :param call_endpoint_identifier: Filter all conference recordings where calls with endpoint identifier were included in the recording.
+ :type call_endpoint_identifier: str
+ :param start_time_after: Date and time when the (first) conference recording started.
:type start_time_after: datetime
- :param end_time_before: Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :param end_time_before: Date and time when the (last) conference recording ended.
:type end_time_before: datetime
+ :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
+ :type composition: bool
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -18066,13 +19410,19 @@ def get_conferences_history_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conferences_history_serialize(
- name=name,
- call_id=call_id,
+ _param = self._get_conferences_recordings_serialize(
+ conference_id=conference_id,
calls_configuration_id=calls_configuration_id,
application_id=application_id,
+ entity_id=entity_id,
+ conference_name=conference_name,
+ call_id=call_id,
+ call_endpoint_type=call_endpoint_type,
+ call_endpoint_identifier=call_endpoint_identifier,
start_time_after=start_time_after,
end_time_before=end_time_before,
+ composition=composition,
+ location=location,
page=page,
size=size,
_request_auth=_request_auth,
@@ -18082,9 +19432,10 @@ def get_conferences_history_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceLogPage",
+ "200": "CallsConferenceRecordingPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -18099,30 +19450,62 @@ def get_conferences_history_with_http_info(
)
@validate_call
- def get_conferences_history_without_preload_content(
+ def get_conferences_recordings_without_preload_content(
self,
- name: Annotated[
- Optional[StrictStr], Field(description="Conference name.")
+ conference_id: Annotated[
+ Optional[StrictStr], Field(description="Conference ID.")
] = None,
- call_id: Annotated[Optional[StrictStr], Field(description="Call ID.")] = None,
calls_configuration_id: Annotated[
Optional[StrictStr], Field(description="Calls Configuration ID.")
] = None,
application_id: Annotated[
Optional[StrictStr], Field(description="Application ID.")
] = None,
+ entity_id: Annotated[
+ Optional[StrictStr], Field(description="Entity ID.")
+ ] = None,
+ conference_name: Annotated[
+ Optional[StrictStr], Field(description="Conference name.")
+ ] = None,
+ call_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all conference recordings where call ID was included in the recording."
+ ),
+ ] = None,
+ call_endpoint_type: Annotated[
+ Optional[CallEndpointType],
+ Field(
+ description="Filter all conference recordings where calls with endpoint type were included in the recording."
+ ),
+ ] = None,
+ call_endpoint_identifier: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all conference recordings where calls with endpoint identifier were included in the recording."
+ ),
+ ] = None,
start_time_after: Annotated[
Optional[datetime],
Field(
- description="Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Date and time when the (first) conference recording started."
),
] = None,
end_time_before: Annotated[
Optional[datetime],
Field(
- description="Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Date and time when the (last) conference recording ended."
+ ),
+ ] = None,
+ composition: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="Flag indicating whether auto-compose feature was turned on for the recording."
),
] = None,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -18143,22 +19526,34 @@ def get_conferences_history_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get conferences history
+ """Get conferences recordings
- Get conferences history with pagination. Conferences history retention period is 3 months.
+ Get the recordings of conferences with pagination.
- :param name: Conference name.
- :type name: str
- :param call_id: Call ID.
- :type call_id: str
+ :param conference_id: Conference ID.
+ :type conference_id: str
:param calls_configuration_id: Calls Configuration ID.
:type calls_configuration_id: str
:param application_id: Application ID.
:type application_id: str
- :param start_time_after: Date and time for when the conference has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :param entity_id: Entity ID.
+ :type entity_id: str
+ :param conference_name: Conference name.
+ :type conference_name: str
+ :param call_id: Filter all conference recordings where call ID was included in the recording.
+ :type call_id: str
+ :param call_endpoint_type: Filter all conference recordings where calls with endpoint type were included in the recording.
+ :type call_endpoint_type: CallEndpointType
+ :param call_endpoint_identifier: Filter all conference recordings where calls with endpoint identifier were included in the recording.
+ :type call_endpoint_identifier: str
+ :param start_time_after: Date and time when the (first) conference recording started.
:type start_time_after: datetime
- :param end_time_before: Date and time for when the conference has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :param end_time_before: Date and time when the (last) conference recording ended.
:type end_time_before: datetime
+ :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
+ :type composition: bool
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -18185,13 +19580,19 @@ def get_conferences_history_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conferences_history_serialize(
- name=name,
- call_id=call_id,
+ _param = self._get_conferences_recordings_serialize(
+ conference_id=conference_id,
calls_configuration_id=calls_configuration_id,
application_id=application_id,
+ entity_id=entity_id,
+ conference_name=conference_name,
+ call_id=call_id,
+ call_endpoint_type=call_endpoint_type,
+ call_endpoint_identifier=call_endpoint_identifier,
start_time_after=start_time_after,
end_time_before=end_time_before,
+ composition=composition,
+ location=location,
page=page,
size=size,
_request_auth=_request_auth,
@@ -18201,9 +19602,10 @@ def get_conferences_history_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceLogPage",
+ "200": "CallsConferenceRecordingPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -18213,14 +19615,20 @@ def get_conferences_history_without_preload_content(
)
return response_data.response
- def _get_conferences_history_serialize(
+ def _get_conferences_recordings_serialize(
self,
- name,
- call_id,
+ conference_id,
calls_configuration_id,
application_id,
+ entity_id,
+ conference_name,
+ call_id,
+ call_endpoint_type,
+ call_endpoint_identifier,
start_time_after,
end_time_before,
+ composition,
+ location,
page,
size,
_request_auth,
@@ -18242,13 +19650,9 @@ def _get_conferences_history_serialize(
# process the path parameters
# process the query parameters
- if name is not None:
-
- _query_params.append(("name", name))
-
- if call_id is not None:
+ if conference_id is not None:
- _query_params.append(("callId", call_id))
+ _query_params.append(("conferenceId", conference_id))
if calls_configuration_id is not None:
@@ -18258,6 +19662,26 @@ def _get_conferences_history_serialize(
_query_params.append(("applicationId", application_id))
+ if entity_id is not None:
+
+ _query_params.append(("entityId", entity_id))
+
+ if conference_name is not None:
+
+ _query_params.append(("conferenceName", conference_name))
+
+ if call_id is not None:
+
+ _query_params.append(("callId", call_id))
+
+ if call_endpoint_type is not None:
+
+ _query_params.append(("callEndpointType", call_endpoint_type.value))
+
+ if call_endpoint_identifier is not None:
+
+ _query_params.append(("callEndpointIdentifier", call_endpoint_identifier))
+
if start_time_after is not None:
if isinstance(start_time_after, datetime):
_query_params.append(
@@ -18284,6 +19708,14 @@ def _get_conferences_history_serialize(
else:
_query_params.append(("endTimeBefore", end_time_before))
+ if composition is not None:
+
+ _query_params.append(("composition", composition))
+
+ if location is not None:
+
+ _query_params.append(("location", location.value))
+
if page is not None:
_query_params.append(("page", page))
@@ -18306,7 +19738,7 @@ def _get_conferences_history_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/conferences/history",
+ resource_path="/calls/1/recordings/conferences",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -18320,55 +19752,8 @@ def _get_conferences_history_serialize(
)
@validate_call
- def get_conferences_recordings(
+ def get_countries(
self,
- conference_id: Annotated[
- Optional[StrictStr], Field(description="Conference ID.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- conference_name: Annotated[
- Optional[StrictStr], Field(description="Conference name.")
- ] = None,
- call_id: Annotated[
- Optional[StrictStr],
- Field(
- description="Filter all conference recordings where call ID was included in the recording."
- ),
- ] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time when the (first) conference recording started."
- ),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(
- description="Date and time when the (last) conference recording ended."
- ),
- ] = None,
- composition: Annotated[
- Optional[StrictBool],
- Field(
- description="Flag indicating whether auto-compose feature was turned on for the recording."
- ),
- ] = None,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -18380,33 +19765,11 @@ def get_conferences_recordings(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsConferenceRecordingPage:
- """Get conferences recordings
+ ) -> CallsCountryList:
+ """Get countries
- Get the recordings of conferences with pagination.
+ Get countries with shortcodes you'd need for a SIP trunk address.
- :param conference_id: Conference ID.
- :type conference_id: str
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param conference_name: Conference name.
- :type conference_name: str
- :param call_id: Filter all conference recordings where call ID was included in the recording.
- :type call_id: str
- :param start_time_after: Date and time when the (first) conference recording started.
- :type start_time_after: datetime
- :param end_time_before: Date and time when the (last) conference recording ended.
- :type end_time_before: datetime
- :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
- :type composition: bool
- :param location: Recording location.
- :type location: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: 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
@@ -18429,18 +19792,7 @@ def get_conferences_recordings(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conferences_recordings_serialize(
- conference_id=conference_id,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- conference_name=conference_name,
- call_id=call_id,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- composition=composition,
- location=location,
- page=page,
- size=size,
+ _param = self._get_countries_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -18448,9 +19800,10 @@ def get_conferences_recordings(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceRecordingPage",
+ "200": "CallsCountryList",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -18465,55 +19818,8 @@ def get_conferences_recordings(
).data
@validate_call
- def get_conferences_recordings_with_http_info(
+ def get_countries_with_http_info(
self,
- conference_id: Annotated[
- Optional[StrictStr], Field(description="Conference ID.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- conference_name: Annotated[
- Optional[StrictStr], Field(description="Conference name.")
- ] = None,
- call_id: Annotated[
- Optional[StrictStr],
- Field(
- description="Filter all conference recordings where call ID was included in the recording."
- ),
- ] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time when the (first) conference recording started."
- ),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(
- description="Date and time when the (last) conference recording ended."
- ),
- ] = None,
- composition: Annotated[
- Optional[StrictBool],
- Field(
- description="Flag indicating whether auto-compose feature was turned on for the recording."
- ),
- ] = None,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -18525,33 +19831,11 @@ def get_conferences_recordings_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsConferenceRecordingPage]:
- """Get conferences recordings
+ ) -> ApiResponse[CallsCountryList]:
+ """Get countries
- Get the recordings of conferences with pagination.
+ Get countries with shortcodes you'd need for a SIP trunk address.
- :param conference_id: Conference ID.
- :type conference_id: str
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param conference_name: Conference name.
- :type conference_name: str
- :param call_id: Filter all conference recordings where call ID was included in the recording.
- :type call_id: str
- :param start_time_after: Date and time when the (first) conference recording started.
- :type start_time_after: datetime
- :param end_time_before: Date and time when the (last) conference recording ended.
- :type end_time_before: datetime
- :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
- :type composition: bool
- :param location: Recording location.
- :type location: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: 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
@@ -18574,91 +19858,34 @@ def get_conferences_recordings_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conferences_recordings_serialize(
- conference_id=conference_id,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- conference_name=conference_name,
- call_id=call_id,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- composition=composition,
- location=location,
- page=page,
- size=size,
+ _param = self._get_countries_serialize(
_request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index,
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceRecordingPage",
- "400": "ApiException",
- "401": "ApiException",
- "429": "ApiException",
- "500": "ApiException",
- }
-
- 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_conferences_recordings_without_preload_content(
- self,
- conference_id: Annotated[
- Optional[StrictStr], Field(description="Conference ID.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- conference_name: Annotated[
- Optional[StrictStr], Field(description="Conference name.")
- ] = None,
- call_id: Annotated[
- Optional[StrictStr],
- Field(
- description="Filter all conference recordings where call ID was included in the recording."
- ),
- ] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time when the (first) conference recording started."
- ),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(
- description="Date and time when the (last) conference recording ended."
- ),
- ] = None,
- composition: Annotated[
- Optional[StrictBool],
- Field(
- description="Flag indicating whether auto-compose feature was turned on for the recording."
- ),
- ] = None,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsCountryList",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_countries_without_preload_content(
+ self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -18671,32 +19898,10 @@ def get_conferences_recordings_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get conferences recordings
+ """Get countries
- Get the recordings of conferences with pagination.
+ Get countries with shortcodes you'd need for a SIP trunk address.
- :param conference_id: Conference ID.
- :type conference_id: str
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param conference_name: Conference name.
- :type conference_name: str
- :param call_id: Filter all conference recordings where call ID was included in the recording.
- :type call_id: str
- :param start_time_after: Date and time when the (first) conference recording started.
- :type start_time_after: datetime
- :param end_time_before: Date and time when the (last) conference recording ended.
- :type end_time_before: datetime
- :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
- :type composition: bool
- :param location: Recording location.
- :type location: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: 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
@@ -18719,18 +19924,7 @@ def get_conferences_recordings_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_conferences_recordings_serialize(
- conference_id=conference_id,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- conference_name=conference_name,
- call_id=call_id,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- composition=composition,
- location=location,
- page=page,
- size=size,
+ _param = self._get_countries_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -18738,9 +19932,10 @@ def get_conferences_recordings_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConferenceRecordingPage",
+ "200": "CallsCountryList",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -18750,19 +19945,8 @@ def get_conferences_recordings_without_preload_content(
)
return response_data.response
- def _get_conferences_recordings_serialize(
+ def _get_countries_serialize(
self,
- conference_id,
- calls_configuration_id,
- application_id,
- conference_name,
- call_id,
- start_time_after,
- end_time_before,
- composition,
- location,
- page,
- size,
_request_auth,
_content_type,
_headers,
@@ -18782,68 +19966,6 @@ def _get_conferences_recordings_serialize(
# process the path parameters
# process the query parameters
- if conference_id is not None:
-
- _query_params.append(("conferenceId", conference_id))
-
- if calls_configuration_id is not None:
-
- _query_params.append(("callsConfigurationId", calls_configuration_id))
-
- if application_id is not None:
-
- _query_params.append(("applicationId", application_id))
-
- if conference_name is not None:
-
- _query_params.append(("conferenceName", conference_name))
-
- if call_id is not None:
-
- _query_params.append(("callId", call_id))
-
- if start_time_after is not None:
- if isinstance(start_time_after, datetime):
- _query_params.append(
- (
- "startTimeAfter",
- start_time_after.strftime(
- self.api_client.configuration.datetime_format
- ),
- )
- )
- else:
- _query_params.append(("startTimeAfter", start_time_after))
-
- if end_time_before is not None:
- if isinstance(end_time_before, datetime):
- _query_params.append(
- (
- "endTimeBefore",
- end_time_before.strftime(
- self.api_client.configuration.datetime_format
- ),
- )
- )
- else:
- _query_params.append(("endTimeBefore", end_time_before))
-
- if composition is not None:
-
- _query_params.append(("composition", composition))
-
- if location is not None:
-
- _query_params.append(("location", location))
-
- if page is not None:
-
- _query_params.append(("page", page))
-
- if size is not None:
-
- _query_params.append(("size", size))
-
# process the header parameters
# process the form parameters
# process the body parameter
@@ -18858,7 +19980,7 @@ def _get_conferences_recordings_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/recordings/conferences",
+ resource_path="/calls/1/sip-trunks/service-addresses/countries",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -18872,8 +19994,9 @@ def _get_conferences_recordings_serialize(
)
@validate_call
- def get_countries(
+ def get_dialog(
self,
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -18885,11 +20008,13 @@ def get_countries(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsCountryList:
- """Get countries
+ ) -> CallsDialogResponse:
+ """Get dialog
- Get countries with shortcodes you'd need for a SIP trunk address.
+ Get a single dialog.
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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
@@ -18912,7 +20037,8 @@ def get_countries(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_countries_serialize(
+ _param = self._get_dialog_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -18920,9 +20046,10 @@ def get_countries(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsCountryList",
- "400": "ApiException",
+ "200": "CallsDialogResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -18937,8 +20064,9 @@ def get_countries(
).data
@validate_call
- def get_countries_with_http_info(
+ def get_dialog_with_http_info(
self,
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -18950,11 +20078,13 @@ def get_countries_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsCountryList]:
- """Get countries
+ ) -> ApiResponse[CallsDialogResponse]:
+ """Get dialog
- Get countries with shortcodes you'd need for a SIP trunk address.
+ Get a single dialog.
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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
@@ -18977,7 +20107,8 @@ def get_countries_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_countries_serialize(
+ _param = self._get_dialog_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -18985,9 +20116,10 @@ def get_countries_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsCountryList",
- "400": "ApiException",
+ "200": "CallsDialogResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -19002,8 +20134,9 @@ def get_countries_with_http_info(
)
@validate_call
- def get_countries_without_preload_content(
+ def get_dialog_without_preload_content(
self,
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -19016,10 +20149,12 @@ def get_countries_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get countries
+ """Get dialog
- Get countries with shortcodes you'd need for a SIP trunk address.
+ Get a single dialog.
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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
@@ -19042,7 +20177,8 @@ def get_countries_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_countries_serialize(
+ _param = self._get_dialog_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -19050,9 +20186,10 @@ def get_countries_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsCountryList",
- "400": "ApiException",
+ "200": "CallsDialogResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -19062,8 +20199,9 @@ def get_countries_without_preload_content(
)
return response_data.response
- def _get_countries_serialize(
+ def _get_dialog_serialize(
self,
+ dialog_id,
_request_auth,
_content_type,
_headers,
@@ -19082,6 +20220,8 @@ def _get_countries_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
+ if dialog_id is not None:
+ _path_params["dialogId"] = dialog_id
# process the query parameters
# process the header parameters
# process the form parameters
@@ -19097,7 +20237,7 @@ def _get_countries_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/sip-trunks/service-addresses/countries",
+ resource_path="/calls/1/dialogs/{dialogId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -19111,7 +20251,7 @@ def _get_countries_serialize(
)
@validate_call
- def get_dialog(
+ def get_dialog_history(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
@@ -19125,10 +20265,10 @@ def get_dialog(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsDialogResponse:
- """Get dialog
+ ) -> CallsDialogLogResponse:
+ """Get dialog history
- Get a single dialog.
+ Get a single dialog history. Dialog history retention period is 3 months.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
@@ -19154,7 +20294,7 @@ def get_dialog(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialog_serialize(
+ _param = self._get_dialog_history_serialize(
dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -19163,8 +20303,9 @@ def get_dialog(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogResponse",
+ "200": "CallsDialogLogResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -19180,7 +20321,7 @@ def get_dialog(
).data
@validate_call
- def get_dialog_with_http_info(
+ def get_dialog_history_with_http_info(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
@@ -19194,10 +20335,10 @@ def get_dialog_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsDialogResponse]:
- """Get dialog
+ ) -> ApiResponse[CallsDialogLogResponse]:
+ """Get dialog history
- Get a single dialog.
+ Get a single dialog history. Dialog history retention period is 3 months.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
@@ -19223,7 +20364,7 @@ def get_dialog_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialog_serialize(
+ _param = self._get_dialog_history_serialize(
dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -19232,8 +20373,9 @@ def get_dialog_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogResponse",
+ "200": "CallsDialogLogResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -19249,7 +20391,7 @@ def get_dialog_with_http_info(
)
@validate_call
- def get_dialog_without_preload_content(
+ def get_dialog_history_without_preload_content(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
@@ -19264,9 +20406,9 @@ def get_dialog_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get dialog
+ """Get dialog history
- Get a single dialog.
+ Get a single dialog history. Dialog history retention period is 3 months.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
@@ -19292,7 +20434,7 @@ def get_dialog_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialog_serialize(
+ _param = self._get_dialog_history_serialize(
dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -19301,8 +20443,9 @@ def get_dialog_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogResponse",
+ "200": "CallsDialogLogResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -19313,7 +20456,7 @@ def get_dialog_without_preload_content(
)
return response_data.response
- def _get_dialog_serialize(
+ def _get_dialog_history_serialize(
self,
dialog_id,
_request_auth,
@@ -19351,7 +20494,7 @@ def _get_dialog_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/dialogs/{dialogId}",
+ resource_path="/calls/1/dialogs/{dialogId}/history",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -19365,9 +20508,12 @@ def _get_dialog_serialize(
)
@validate_call
- def get_dialog_history(
+ def get_dialog_recordings(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -19379,13 +20525,15 @@ def get_dialog_history(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsDialogLogResponse:
- """Get dialog history
+ ) -> CallsDialogRecordingResponse:
+ """Get dialog recordings
- Get a single dialog history. Dialog history retention period is 3 months.
+ Get the recordings for a single dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -19408,8 +20556,9 @@ def get_dialog_history(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialog_history_serialize(
+ _param = self._get_dialog_recordings_serialize(
dialog_id=dialog_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -19417,8 +20566,9 @@ def get_dialog_history(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogLogResponse",
+ "200": "CallsDialogRecordingResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -19434,9 +20584,12 @@ def get_dialog_history(
).data
@validate_call
- def get_dialog_history_with_http_info(
+ def get_dialog_recordings_with_http_info(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -19448,13 +20601,15 @@ def get_dialog_history_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsDialogLogResponse]:
- """Get dialog history
+ ) -> ApiResponse[CallsDialogRecordingResponse]:
+ """Get dialog recordings
- Get a single dialog history. Dialog history retention period is 3 months.
+ Get the recordings for a single dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -19477,8 +20632,9 @@ def get_dialog_history_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialog_history_serialize(
+ _param = self._get_dialog_recordings_serialize(
dialog_id=dialog_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -19486,8 +20642,9 @@ def get_dialog_history_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogLogResponse",
+ "200": "CallsDialogRecordingResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -19503,9 +20660,12 @@ def get_dialog_history_with_http_info(
)
@validate_call
- def get_dialog_history_without_preload_content(
+ def get_dialog_recordings_without_preload_content(
self,
dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -19518,12 +20678,14 @@ def get_dialog_history_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get dialog history
+ """Get dialog recordings
- Get a single dialog history. Dialog history retention period is 3 months.
+ Get the recordings for a single dialog.
:param dialog_id: Dialog ID. (required)
:type dialog_id: str
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
: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
@@ -19546,8 +20708,9 @@ def get_dialog_history_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialog_history_serialize(
+ _param = self._get_dialog_recordings_serialize(
dialog_id=dialog_id,
+ location=location,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -19555,8 +20718,9 @@ def get_dialog_history_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogLogResponse",
+ "200": "CallsDialogRecordingResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -19567,9 +20731,10 @@ def get_dialog_history_without_preload_content(
)
return response_data.response
- def _get_dialog_history_serialize(
+ def _get_dialog_recordings_serialize(
self,
dialog_id,
+ location,
_request_auth,
_content_type,
_headers,
@@ -19591,6 +20756,10 @@ def _get_dialog_history_serialize(
if dialog_id is not None:
_path_params["dialogId"] = dialog_id
# process the query parameters
+ if location is not None:
+
+ _query_params.append(("location", location.value))
+
# process the header parameters
# process the form parameters
# process the body parameter
@@ -19605,7 +20774,7 @@ def _get_dialog_history_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/dialogs/{dialogId}/history",
+ resource_path="/calls/1/recordings/dialogs/{dialogId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -19619,11 +20788,36 @@ def _get_dialog_history_serialize(
)
@validate_call
- def get_dialog_recordings(
+ def get_dialogs(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ state: Annotated[
+ Optional[CallsDialogState], Field(description="Dialog state.")
+ ] = None,
+ parent_call_id: Annotated[
+ Optional[StrictStr], Field(description="Parent call ID.")
+ ] = None,
+ child_call_id: Annotated[
+ Optional[StrictStr], Field(description="Child call ID.")
+ ] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
] = None,
_request_timeout: Union[
None,
@@ -19636,15 +20830,27 @@ def get_dialog_recordings(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsPublicDialogRecording:
- """Get dialog recordings
+ ) -> CallsDialogPage:
+ """Get dialogs
- Get the recordings for a single dialog.
+ Get dialogs with pagination.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param location: Recording location.
- :type location: str
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param state: Dialog state.
+ :type state: CallsDialogState
+ :param parent_call_id: Parent call ID.
+ :type parent_call_id: str
+ :param child_call_id: Child call ID.
+ :type child_call_id: str
+ :param start_time_after: Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -19667,9 +20873,15 @@ def get_dialog_recordings(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialog_recordings_serialize(
- dialog_id=dialog_id,
- location=location,
+ _param = self._get_dialogs_serialize(
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ state=state,
+ parent_call_id=parent_call_id,
+ child_call_id=child_call_id,
+ start_time_after=start_time_after,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -19677,9 +20889,10 @@ def get_dialog_recordings(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicDialogRecording",
+ "200": "CallsDialogPage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -19694,11 +20907,36 @@ def get_dialog_recordings(
).data
@validate_call
- def get_dialog_recordings_with_http_info(
+ def get_dialogs_with_http_info(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ state: Annotated[
+ Optional[CallsDialogState], Field(description="Dialog state.")
+ ] = None,
+ parent_call_id: Annotated[
+ Optional[StrictStr], Field(description="Parent call ID.")
+ ] = None,
+ child_call_id: Annotated[
+ Optional[StrictStr], Field(description="Child call ID.")
+ ] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
] = None,
_request_timeout: Union[
None,
@@ -19711,15 +20949,27 @@ def get_dialog_recordings_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsPublicDialogRecording]:
- """Get dialog recordings
+ ) -> ApiResponse[CallsDialogPage]:
+ """Get dialogs
- Get the recordings for a single dialog.
+ Get dialogs with pagination.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param location: Recording location.
- :type location: str
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param state: Dialog state.
+ :type state: CallsDialogState
+ :param parent_call_id: Parent call ID.
+ :type parent_call_id: str
+ :param child_call_id: Child call ID.
+ :type child_call_id: str
+ :param start_time_after: Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -19742,9 +20992,15 @@ def get_dialog_recordings_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialog_recordings_serialize(
- dialog_id=dialog_id,
- location=location,
+ _param = self._get_dialogs_serialize(
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ state=state,
+ parent_call_id=parent_call_id,
+ child_call_id=child_call_id,
+ start_time_after=start_time_after,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -19752,9 +21008,10 @@ def get_dialog_recordings_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicDialogRecording",
+ "200": "CallsDialogPage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -19769,11 +21026,36 @@ def get_dialog_recordings_with_http_info(
)
@validate_call
- def get_dialog_recordings_without_preload_content(
+ def get_dialogs_without_preload_content(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
+ calls_configuration_id: Annotated[
+ Optional[StrictStr], Field(description="Calls Configuration ID.")
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr], Field(description="Application ID.")
+ ] = None,
+ state: Annotated[
+ Optional[CallsDialogState], Field(description="Dialog state.")
+ ] = None,
+ parent_call_id: Annotated[
+ Optional[StrictStr], Field(description="Parent call ID.")
+ ] = None,
+ child_call_id: Annotated[
+ Optional[StrictStr], Field(description="Child call ID.")
+ ] = None,
+ start_time_after: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
] = None,
_request_timeout: Union[
None,
@@ -19787,14 +21069,26 @@ def get_dialog_recordings_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get dialog recordings
+ """Get dialogs
- Get the recordings for a single dialog.
+ Get dialogs with pagination.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
- :param location: Recording location.
- :type location: str
+ :param calls_configuration_id: Calls Configuration ID.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param state: Dialog state.
+ :type state: CallsDialogState
+ :param parent_call_id: Parent call ID.
+ :type parent_call_id: str
+ :param child_call_id: Child call ID.
+ :type child_call_id: str
+ :param start_time_after: Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type start_time_after: datetime
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -19817,9 +21111,15 @@ def get_dialog_recordings_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialog_recordings_serialize(
- dialog_id=dialog_id,
- location=location,
+ _param = self._get_dialogs_serialize(
+ calls_configuration_id=calls_configuration_id,
+ application_id=application_id,
+ state=state,
+ parent_call_id=parent_call_id,
+ child_call_id=child_call_id,
+ start_time_after=start_time_after,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -19827,9 +21127,10 @@ def get_dialog_recordings_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicDialogRecording",
+ "200": "CallsDialogPage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -19839,10 +21140,16 @@ def get_dialog_recordings_without_preload_content(
)
return response_data.response
- def _get_dialog_recordings_serialize(
+ def _get_dialogs_serialize(
self,
- dialog_id,
- location,
+ calls_configuration_id,
+ application_id,
+ state,
+ parent_call_id,
+ child_call_id,
+ start_time_after,
+ page,
+ size,
_request_auth,
_content_type,
_headers,
@@ -19861,12 +21168,47 @@ def _get_dialog_recordings_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if dialog_id is not None:
- _path_params["dialogId"] = dialog_id
# process the query parameters
- if location is not None:
+ if calls_configuration_id is not None:
+
+ _query_params.append(("callsConfigurationId", calls_configuration_id))
+
+ if application_id is not None:
+
+ _query_params.append(("applicationId", application_id))
+
+ if state is not None:
+
+ _query_params.append(("state", state.value))
+
+ if parent_call_id is not None:
+
+ _query_params.append(("parentCallId", parent_call_id))
+
+ if child_call_id is not None:
+
+ _query_params.append(("childCallId", child_call_id))
+
+ if start_time_after is not None:
+ if isinstance(start_time_after, datetime):
+ _query_params.append(
+ (
+ "startTimeAfter",
+ start_time_after.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("startTimeAfter", start_time_after))
- _query_params.append(("location", location))
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ if size is not None:
+
+ _query_params.append(("size", size))
# process the header parameters
# process the form parameters
@@ -19882,7 +21224,7 @@ def _get_dialog_recordings_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/recordings/dialogs/{dialogId}",
+ resource_path="/calls/1/dialogs",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -19896,7 +21238,7 @@ def _get_dialog_recordings_serialize(
)
@validate_call
- def get_dialogs(
+ def get_dialogs_history(
self,
calls_configuration_id: Annotated[
Optional[StrictStr], Field(description="Calls Configuration ID.")
@@ -19919,6 +21261,12 @@ def get_dialogs(
description="Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
),
] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -19938,10 +21286,10 @@ def get_dialogs(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsDialogPage:
- """Get dialogs
+ ) -> CallsDialogLogPage:
+ """Get dialogs history
- Get dialogs with pagination.
+ Get dialogs history with pagination. Dialogs history retention period is 3 months.
:param calls_configuration_id: Calls Configuration ID.
:type calls_configuration_id: str
@@ -19955,6 +21303,8 @@ def get_dialogs(
:type child_call_id: str
:param start_time_after: Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
:type start_time_after: datetime
+ :param end_time_before: Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type end_time_before: datetime
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -19981,13 +21331,14 @@ def get_dialogs(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialogs_serialize(
+ _param = self._get_dialogs_history_serialize(
calls_configuration_id=calls_configuration_id,
application_id=application_id,
state=state,
parent_call_id=parent_call_id,
child_call_id=child_call_id,
start_time_after=start_time_after,
+ end_time_before=end_time_before,
page=page,
size=size,
_request_auth=_request_auth,
@@ -19997,9 +21348,10 @@ def get_dialogs(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogPage",
+ "200": "CallsDialogLogPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -20014,7 +21366,7 @@ def get_dialogs(
).data
@validate_call
- def get_dialogs_with_http_info(
+ def get_dialogs_history_with_http_info(
self,
calls_configuration_id: Annotated[
Optional[StrictStr], Field(description="Calls Configuration ID.")
@@ -20037,6 +21389,12 @@ def get_dialogs_with_http_info(
description="Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
),
] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -20056,10 +21414,10 @@ def get_dialogs_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsDialogPage]:
- """Get dialogs
+ ) -> ApiResponse[CallsDialogLogPage]:
+ """Get dialogs history
- Get dialogs with pagination.
+ Get dialogs history with pagination. Dialogs history retention period is 3 months.
:param calls_configuration_id: Calls Configuration ID.
:type calls_configuration_id: str
@@ -20073,6 +21431,8 @@ def get_dialogs_with_http_info(
:type child_call_id: str
:param start_time_after: Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
:type start_time_after: datetime
+ :param end_time_before: Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type end_time_before: datetime
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -20099,13 +21459,14 @@ def get_dialogs_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialogs_serialize(
+ _param = self._get_dialogs_history_serialize(
calls_configuration_id=calls_configuration_id,
application_id=application_id,
state=state,
parent_call_id=parent_call_id,
child_call_id=child_call_id,
start_time_after=start_time_after,
+ end_time_before=end_time_before,
page=page,
size=size,
_request_auth=_request_auth,
@@ -20115,9 +21476,10 @@ def get_dialogs_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogPage",
+ "200": "CallsDialogLogPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -20132,7 +21494,7 @@ def get_dialogs_with_http_info(
)
@validate_call
- def get_dialogs_without_preload_content(
+ def get_dialogs_history_without_preload_content(
self,
calls_configuration_id: Annotated[
Optional[StrictStr], Field(description="Calls Configuration ID.")
@@ -20155,6 +21517,12 @@ def get_dialogs_without_preload_content(
description="Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
),
] = None,
+ end_time_before: Annotated[
+ Optional[datetime],
+ Field(
+ description="Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ ),
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -20175,9 +21543,9 @@ def get_dialogs_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get dialogs
+ """Get dialogs history
- Get dialogs with pagination.
+ Get dialogs history with pagination. Dialogs history retention period is 3 months.
:param calls_configuration_id: Calls Configuration ID.
:type calls_configuration_id: str
@@ -20191,6 +21559,8 @@ def get_dialogs_without_preload_content(
:type child_call_id: str
:param start_time_after: Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
:type start_time_after: datetime
+ :param end_time_before: Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type end_time_before: datetime
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -20217,13 +21587,14 @@ def get_dialogs_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialogs_serialize(
+ _param = self._get_dialogs_history_serialize(
calls_configuration_id=calls_configuration_id,
application_id=application_id,
state=state,
parent_call_id=parent_call_id,
child_call_id=child_call_id,
start_time_after=start_time_after,
+ end_time_before=end_time_before,
page=page,
size=size,
_request_auth=_request_auth,
@@ -20233,9 +21604,10 @@ def get_dialogs_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogPage",
+ "200": "CallsDialogLogPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -20245,7 +21617,7 @@ def get_dialogs_without_preload_content(
)
return response_data.response
- def _get_dialogs_serialize(
+ def _get_dialogs_history_serialize(
self,
calls_configuration_id,
application_id,
@@ -20253,6 +21625,7 @@ def _get_dialogs_serialize(
parent_call_id,
child_call_id,
start_time_after,
+ end_time_before,
page,
size,
_request_auth,
@@ -20307,6 +21680,19 @@ def _get_dialogs_serialize(
else:
_query_params.append(("startTimeAfter", start_time_after))
+ if end_time_before is not None:
+ if isinstance(end_time_before, datetime):
+ _query_params.append(
+ (
+ "endTimeBefore",
+ end_time_before.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("endTimeBefore", end_time_before))
+
if page is not None:
_query_params.append(("page", page))
@@ -20329,7 +21715,7 @@ def _get_dialogs_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/dialogs",
+ resource_path="/calls/1/dialogs/history",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -20343,35 +21729,57 @@ def _get_dialogs_serialize(
)
@validate_call
- def get_dialogs_history(
+ def get_dialogs_recordings(
self,
+ dialog_id: Annotated[
+ Optional[StrictStr], Field(description="Dialog ID.")
+ ] = None,
calls_configuration_id: Annotated[
Optional[StrictStr], Field(description="Calls Configuration ID.")
] = None,
application_id: Annotated[
Optional[StrictStr], Field(description="Application ID.")
] = None,
- state: Annotated[
- Optional[CallsDialogState], Field(description="Dialog state.")
+ entity_id: Annotated[
+ Optional[StrictStr], Field(description="Entity ID.")
] = None,
- parent_call_id: Annotated[
- Optional[StrictStr], Field(description="Parent call ID.")
+ call_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all dialog recordings where call ID was included in the recording."
+ ),
] = None,
- child_call_id: Annotated[
- Optional[StrictStr], Field(description="Child call ID.")
+ call_endpoint_type: Annotated[
+ Optional[CallEndpointType],
+ Field(
+ description="Filter all dialog recordings where calls with endpoint type were included in the recording."
+ ),
+ ] = None,
+ call_endpoint_identifier: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all dialog recordings where calls with endpoint identifier were included in the recording."
+ ),
] = None,
start_time_after: Annotated[
Optional[datetime],
Field(
- description="Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Date and time when the (first) dialog recording started."
),
] = None,
end_time_before: Annotated[
Optional[datetime],
+ Field(description="Date and time when the (last) dialog recording ended."),
+ ] = None,
+ composition: Annotated[
+ Optional[StrictBool],
Field(
- description="Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Flag indicating whether auto-compose feature was turned on for the recording."
),
] = None,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -20391,25 +21799,33 @@ def get_dialogs_history(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsDialogLogPage:
- """Get dialogs history
+ ) -> CallsDialogRecordingPage:
+ """Get dialogs recordings
- Get dialogs history with pagination. Dialogs history retention period is 3 months.
+ Get the recordings of dialogs with pagination.
+ :param dialog_id: Dialog ID.
+ :type dialog_id: str
:param calls_configuration_id: Calls Configuration ID.
:type calls_configuration_id: str
:param application_id: Application ID.
:type application_id: str
- :param state: Dialog state.
- :type state: CallsDialogState
- :param parent_call_id: Parent call ID.
- :type parent_call_id: str
- :param child_call_id: Child call ID.
- :type child_call_id: str
- :param start_time_after: Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :param entity_id: Entity ID.
+ :type entity_id: str
+ :param call_id: Filter all dialog recordings where call ID was included in the recording.
+ :type call_id: str
+ :param call_endpoint_type: Filter all dialog recordings where calls with endpoint type were included in the recording.
+ :type call_endpoint_type: CallEndpointType
+ :param call_endpoint_identifier: Filter all dialog recordings where calls with endpoint identifier were included in the recording.
+ :type call_endpoint_identifier: str
+ :param start_time_after: Date and time when the (first) dialog recording started.
:type start_time_after: datetime
- :param end_time_before: Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :param end_time_before: Date and time when the (last) dialog recording ended.
:type end_time_before: datetime
+ :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
+ :type composition: bool
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -20436,14 +21852,18 @@ def get_dialogs_history(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialogs_history_serialize(
+ _param = self._get_dialogs_recordings_serialize(
+ dialog_id=dialog_id,
calls_configuration_id=calls_configuration_id,
application_id=application_id,
- state=state,
- parent_call_id=parent_call_id,
- child_call_id=child_call_id,
+ entity_id=entity_id,
+ call_id=call_id,
+ call_endpoint_type=call_endpoint_type,
+ call_endpoint_identifier=call_endpoint_identifier,
start_time_after=start_time_after,
end_time_before=end_time_before,
+ composition=composition,
+ location=location,
page=page,
size=size,
_request_auth=_request_auth,
@@ -20453,9 +21873,10 @@ def get_dialogs_history(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogLogPage",
+ "200": "CallsDialogRecordingPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -20470,35 +21891,57 @@ def get_dialogs_history(
).data
@validate_call
- def get_dialogs_history_with_http_info(
+ def get_dialogs_recordings_with_http_info(
self,
+ dialog_id: Annotated[
+ Optional[StrictStr], Field(description="Dialog ID.")
+ ] = None,
calls_configuration_id: Annotated[
Optional[StrictStr], Field(description="Calls Configuration ID.")
] = None,
application_id: Annotated[
Optional[StrictStr], Field(description="Application ID.")
] = None,
- state: Annotated[
- Optional[CallsDialogState], Field(description="Dialog state.")
+ entity_id: Annotated[
+ Optional[StrictStr], Field(description="Entity ID.")
] = None,
- parent_call_id: Annotated[
- Optional[StrictStr], Field(description="Parent call ID.")
+ call_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all dialog recordings where call ID was included in the recording."
+ ),
] = None,
- child_call_id: Annotated[
- Optional[StrictStr], Field(description="Child call ID.")
+ call_endpoint_type: Annotated[
+ Optional[CallEndpointType],
+ Field(
+ description="Filter all dialog recordings where calls with endpoint type were included in the recording."
+ ),
+ ] = None,
+ call_endpoint_identifier: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all dialog recordings where calls with endpoint identifier were included in the recording."
+ ),
] = None,
start_time_after: Annotated[
Optional[datetime],
Field(
- description="Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Date and time when the (first) dialog recording started."
),
] = None,
end_time_before: Annotated[
Optional[datetime],
+ Field(description="Date and time when the (last) dialog recording ended."),
+ ] = None,
+ composition: Annotated[
+ Optional[StrictBool],
Field(
- description="Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Flag indicating whether auto-compose feature was turned on for the recording."
),
] = None,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -20518,25 +21961,33 @@ def get_dialogs_history_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsDialogLogPage]:
- """Get dialogs history
+ ) -> ApiResponse[CallsDialogRecordingPage]:
+ """Get dialogs recordings
- Get dialogs history with pagination. Dialogs history retention period is 3 months.
+ Get the recordings of dialogs with pagination.
+ :param dialog_id: Dialog ID.
+ :type dialog_id: str
:param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param state: Dialog state.
- :type state: CallsDialogState
- :param parent_call_id: Parent call ID.
- :type parent_call_id: str
- :param child_call_id: Child call ID.
- :type child_call_id: str
- :param start_time_after: Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :type calls_configuration_id: str
+ :param application_id: Application ID.
+ :type application_id: str
+ :param entity_id: Entity ID.
+ :type entity_id: str
+ :param call_id: Filter all dialog recordings where call ID was included in the recording.
+ :type call_id: str
+ :param call_endpoint_type: Filter all dialog recordings where calls with endpoint type were included in the recording.
+ :type call_endpoint_type: CallEndpointType
+ :param call_endpoint_identifier: Filter all dialog recordings where calls with endpoint identifier were included in the recording.
+ :type call_endpoint_identifier: str
+ :param start_time_after: Date and time when the (first) dialog recording started.
:type start_time_after: datetime
- :param end_time_before: Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :param end_time_before: Date and time when the (last) dialog recording ended.
:type end_time_before: datetime
+ :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
+ :type composition: bool
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -20563,14 +22014,18 @@ def get_dialogs_history_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialogs_history_serialize(
+ _param = self._get_dialogs_recordings_serialize(
+ dialog_id=dialog_id,
calls_configuration_id=calls_configuration_id,
application_id=application_id,
- state=state,
- parent_call_id=parent_call_id,
- child_call_id=child_call_id,
+ entity_id=entity_id,
+ call_id=call_id,
+ call_endpoint_type=call_endpoint_type,
+ call_endpoint_identifier=call_endpoint_identifier,
start_time_after=start_time_after,
end_time_before=end_time_before,
+ composition=composition,
+ location=location,
page=page,
size=size,
_request_auth=_request_auth,
@@ -20580,9 +22035,10 @@ def get_dialogs_history_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogLogPage",
+ "200": "CallsDialogRecordingPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -20597,35 +22053,57 @@ def get_dialogs_history_with_http_info(
)
@validate_call
- def get_dialogs_history_without_preload_content(
+ def get_dialogs_recordings_without_preload_content(
self,
+ dialog_id: Annotated[
+ Optional[StrictStr], Field(description="Dialog ID.")
+ ] = None,
calls_configuration_id: Annotated[
Optional[StrictStr], Field(description="Calls Configuration ID.")
] = None,
application_id: Annotated[
Optional[StrictStr], Field(description="Application ID.")
] = None,
- state: Annotated[
- Optional[CallsDialogState], Field(description="Dialog state.")
+ entity_id: Annotated[
+ Optional[StrictStr], Field(description="Entity ID.")
] = None,
- parent_call_id: Annotated[
- Optional[StrictStr], Field(description="Parent call ID.")
+ call_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all dialog recordings where call ID was included in the recording."
+ ),
] = None,
- child_call_id: Annotated[
- Optional[StrictStr], Field(description="Child call ID.")
+ call_endpoint_type: Annotated[
+ Optional[CallEndpointType],
+ Field(
+ description="Filter all dialog recordings where calls with endpoint type were included in the recording."
+ ),
+ ] = None,
+ call_endpoint_identifier: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Filter all dialog recordings where calls with endpoint identifier were included in the recording."
+ ),
] = None,
start_time_after: Annotated[
Optional[datetime],
Field(
- description="Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Date and time when the (first) dialog recording started."
),
] = None,
end_time_before: Annotated[
Optional[datetime],
+ Field(description="Date and time when the (last) dialog recording ended."),
+ ] = None,
+ composition: Annotated[
+ Optional[StrictBool],
Field(
- description="Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`."
+ description="Flag indicating whether auto-compose feature was turned on for the recording."
),
] = None,
+ location: Annotated[
+ Optional[CallsRecordingLocation], Field(description="Recording location.")
+ ] = None,
page: Annotated[
Optional[Annotated[int, Field(strict=True, ge=0)]],
Field(description="Results page to retrieve (0..N)."),
@@ -20646,24 +22124,32 @@ def get_dialogs_history_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get dialogs history
+ """Get dialogs recordings
- Get dialogs history with pagination. Dialogs history retention period is 3 months.
+ Get the recordings of dialogs with pagination.
+ :param dialog_id: Dialog ID.
+ :type dialog_id: str
:param calls_configuration_id: Calls Configuration ID.
:type calls_configuration_id: str
:param application_id: Application ID.
:type application_id: str
- :param state: Dialog state.
- :type state: CallsDialogState
- :param parent_call_id: Parent call ID.
- :type parent_call_id: str
- :param child_call_id: Child call ID.
- :type child_call_id: str
- :param start_time_after: Date and time for when the dialog has been created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :param entity_id: Entity ID.
+ :type entity_id: str
+ :param call_id: Filter all dialog recordings where call ID was included in the recording.
+ :type call_id: str
+ :param call_endpoint_type: Filter all dialog recordings where calls with endpoint type were included in the recording.
+ :type call_endpoint_type: CallEndpointType
+ :param call_endpoint_identifier: Filter all dialog recordings where calls with endpoint identifier were included in the recording.
+ :type call_endpoint_identifier: str
+ :param start_time_after: Date and time when the (first) dialog recording started.
:type start_time_after: datetime
- :param end_time_before: Date and time for when the dialog has been finished. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSS+ZZZZ`.
+ :param end_time_before: Date and time when the (last) dialog recording ended.
:type end_time_before: datetime
+ :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
+ :type composition: bool
+ :param location: Recording location.
+ :type location: CallsRecordingLocation
:param page: Results page to retrieve (0..N).
:type page: int
:param size: Number of records per page.
@@ -20690,14 +22176,18 @@ def get_dialogs_history_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialogs_history_serialize(
+ _param = self._get_dialogs_recordings_serialize(
+ dialog_id=dialog_id,
calls_configuration_id=calls_configuration_id,
application_id=application_id,
- state=state,
- parent_call_id=parent_call_id,
- child_call_id=child_call_id,
+ entity_id=entity_id,
+ call_id=call_id,
+ call_endpoint_type=call_endpoint_type,
+ call_endpoint_identifier=call_endpoint_identifier,
start_time_after=start_time_after,
end_time_before=end_time_before,
+ composition=composition,
+ location=location,
page=page,
size=size,
_request_auth=_request_auth,
@@ -20707,9 +22197,10 @@ def get_dialogs_history_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogLogPage",
+ "200": "CallsDialogRecordingPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -20719,15 +22210,19 @@ def get_dialogs_history_without_preload_content(
)
return response_data.response
- def _get_dialogs_history_serialize(
+ def _get_dialogs_recordings_serialize(
self,
+ dialog_id,
calls_configuration_id,
application_id,
- state,
- parent_call_id,
- child_call_id,
+ entity_id,
+ call_id,
+ call_endpoint_type,
+ call_endpoint_identifier,
start_time_after,
end_time_before,
+ composition,
+ location,
page,
size,
_request_auth,
@@ -20749,6 +22244,10 @@ def _get_dialogs_history_serialize(
# process the path parameters
# process the query parameters
+ if dialog_id is not None:
+
+ _query_params.append(("dialogId", dialog_id))
+
if calls_configuration_id is not None:
_query_params.append(("callsConfigurationId", calls_configuration_id))
@@ -20757,17 +22256,21 @@ def _get_dialogs_history_serialize(
_query_params.append(("applicationId", application_id))
- if state is not None:
+ if entity_id is not None:
- _query_params.append(("state", state.value))
+ _query_params.append(("entityId", entity_id))
- if parent_call_id is not None:
+ if call_id is not None:
- _query_params.append(("parentCallId", parent_call_id))
+ _query_params.append(("callId", call_id))
- if child_call_id is not None:
+ if call_endpoint_type is not None:
- _query_params.append(("childCallId", child_call_id))
+ _query_params.append(("callEndpointType", call_endpoint_type.value))
+
+ if call_endpoint_identifier is not None:
+
+ _query_params.append(("callEndpointIdentifier", call_endpoint_identifier))
if start_time_after is not None:
if isinstance(start_time_after, datetime):
@@ -20795,6 +22298,14 @@ def _get_dialogs_history_serialize(
else:
_query_params.append(("endTimeBefore", end_time_before))
+ if composition is not None:
+
+ _query_params.append(("composition", composition))
+
+ if location is not None:
+
+ _query_params.append(("location", location.value))
+
if page is not None:
_query_params.append(("page", page))
@@ -20817,7 +22328,7 @@ def _get_dialogs_history_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/dialogs/history",
+ resource_path="/calls/1/recordings/dialogs",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -20831,50 +22342,11 @@ def _get_dialogs_history_serialize(
)
@validate_call
- def get_dialogs_recordings(
+ def get_media_stream_config(
self,
- dialog_id: Annotated[
- Optional[StrictStr], Field(description="Dialog ID.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- call_id: Annotated[
- Optional[StrictStr],
- Field(
- description="Filter all dialog recordings where call ID was included in the recording."
- ),
- ] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time when the (first) dialog recording started."
- ),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(description="Date and time when the (last) dialog recording ended."),
- ] = None,
- composition: Annotated[
- Optional[StrictBool],
- Field(
- description="Flag indicating whether auto-compose feature was turned on for the recording."
- ),
- ] = None,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ media_stream_config_id: Annotated[
+ StrictStr, Field(description="Media-stream configuration ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -20886,31 +22358,13 @@ def get_dialogs_recordings(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsDialogRecordingPage:
- """Get dialogs recordings
+ ) -> CallsMediaStreamConfigResponse:
+ """Get media-stream configuration
- Get the recordings of dialogs with pagination.
+ Get a single media-stream configuration.
- :param dialog_id: Dialog ID.
- :type dialog_id: str
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param call_id: Filter all dialog recordings where call ID was included in the recording.
- :type call_id: str
- :param start_time_after: Date and time when the (first) dialog recording started.
- :type start_time_after: datetime
- :param end_time_before: Date and time when the (last) dialog recording ended.
- :type end_time_before: datetime
- :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
- :type composition: bool
- :param location: Recording location.
- :type location: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param media_stream_config_id: Media-stream configuration ID. (required)
+ :type media_stream_config_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
@@ -20933,17 +22387,8 @@ def get_dialogs_recordings(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialogs_recordings_serialize(
- dialog_id=dialog_id,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- call_id=call_id,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- composition=composition,
- location=location,
- page=page,
- size=size,
+ _param = self._get_media_stream_config_serialize(
+ media_stream_config_id=media_stream_config_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -20951,9 +22396,10 @@ def get_dialogs_recordings(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogRecordingPage",
- "400": "ApiException",
+ "200": "CallsMediaStreamConfigResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -20968,50 +22414,11 @@ def get_dialogs_recordings(
).data
@validate_call
- def get_dialogs_recordings_with_http_info(
+ def get_media_stream_config_with_http_info(
self,
- dialog_id: Annotated[
- Optional[StrictStr], Field(description="Dialog ID.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- call_id: Annotated[
- Optional[StrictStr],
- Field(
- description="Filter all dialog recordings where call ID was included in the recording."
- ),
- ] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time when the (first) dialog recording started."
- ),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(description="Date and time when the (last) dialog recording ended."),
- ] = None,
- composition: Annotated[
- Optional[StrictBool],
- Field(
- description="Flag indicating whether auto-compose feature was turned on for the recording."
- ),
- ] = None,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ media_stream_config_id: Annotated[
+ StrictStr, Field(description="Media-stream configuration ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -21023,31 +22430,13 @@ def get_dialogs_recordings_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsDialogRecordingPage]:
- """Get dialogs recordings
+ ) -> ApiResponse[CallsMediaStreamConfigResponse]:
+ """Get media-stream configuration
- Get the recordings of dialogs with pagination.
+ Get a single media-stream configuration.
- :param dialog_id: Dialog ID.
- :type dialog_id: str
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param call_id: Filter all dialog recordings where call ID was included in the recording.
- :type call_id: str
- :param start_time_after: Date and time when the (first) dialog recording started.
- :type start_time_after: datetime
- :param end_time_before: Date and time when the (last) dialog recording ended.
- :type end_time_before: datetime
- :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
- :type composition: bool
- :param location: Recording location.
- :type location: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param media_stream_config_id: Media-stream configuration ID. (required)
+ :type media_stream_config_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
@@ -21070,17 +22459,8 @@ def get_dialogs_recordings_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialogs_recordings_serialize(
- dialog_id=dialog_id,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- call_id=call_id,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- composition=composition,
- location=location,
- page=page,
- size=size,
+ _param = self._get_media_stream_config_serialize(
+ media_stream_config_id=media_stream_config_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -21088,9 +22468,10 @@ def get_dialogs_recordings_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogRecordingPage",
- "400": "ApiException",
+ "200": "CallsMediaStreamConfigResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -21105,50 +22486,11 @@ def get_dialogs_recordings_with_http_info(
)
@validate_call
- def get_dialogs_recordings_without_preload_content(
+ def get_media_stream_config_without_preload_content(
self,
- dialog_id: Annotated[
- Optional[StrictStr], Field(description="Dialog ID.")
- ] = None,
- calls_configuration_id: Annotated[
- Optional[StrictStr], Field(description="Calls Configuration ID.")
- ] = None,
- application_id: Annotated[
- Optional[StrictStr], Field(description="Application ID.")
- ] = None,
- call_id: Annotated[
- Optional[StrictStr],
- Field(
- description="Filter all dialog recordings where call ID was included in the recording."
- ),
- ] = None,
- start_time_after: Annotated[
- Optional[datetime],
- Field(
- description="Date and time when the (first) dialog recording started."
- ),
- ] = None,
- end_time_before: Annotated[
- Optional[datetime],
- Field(description="Date and time when the (last) dialog recording ended."),
- ] = None,
- composition: Annotated[
- Optional[StrictBool],
- Field(
- description="Flag indicating whether auto-compose feature was turned on for the recording."
- ),
- ] = None,
- location: Annotated[
- Optional[StrictStr], Field(description="Recording location.")
- ] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ media_stream_config_id: Annotated[
+ StrictStr, Field(description="Media-stream configuration ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -21161,30 +22503,12 @@ def get_dialogs_recordings_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get dialogs recordings
+ """Get media-stream configuration
- Get the recordings of dialogs with pagination.
+ Get a single media-stream configuration.
- :param dialog_id: Dialog ID.
- :type dialog_id: str
- :param calls_configuration_id: Calls Configuration ID.
- :type calls_configuration_id: str
- :param application_id: Application ID.
- :type application_id: str
- :param call_id: Filter all dialog recordings where call ID was included in the recording.
- :type call_id: str
- :param start_time_after: Date and time when the (first) dialog recording started.
- :type start_time_after: datetime
- :param end_time_before: Date and time when the (last) dialog recording ended.
- :type end_time_before: datetime
- :param composition: Flag indicating whether auto-compose feature was turned on for the recording.
- :type composition: bool
- :param location: Recording location.
- :type location: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param media_stream_config_id: Media-stream configuration ID. (required)
+ :type media_stream_config_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
@@ -21207,17 +22531,8 @@ def get_dialogs_recordings_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_dialogs_recordings_serialize(
- dialog_id=dialog_id,
- calls_configuration_id=calls_configuration_id,
- application_id=application_id,
- call_id=call_id,
- start_time_after=start_time_after,
- end_time_before=end_time_before,
- composition=composition,
- location=location,
- page=page,
- size=size,
+ _param = self._get_media_stream_config_serialize(
+ media_stream_config_id=media_stream_config_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -21225,9 +22540,10 @@ def get_dialogs_recordings_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogRecordingPage",
- "400": "ApiException",
+ "200": "CallsMediaStreamConfigResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -21237,18 +22553,9 @@ def get_dialogs_recordings_without_preload_content(
)
return response_data.response
- def _get_dialogs_recordings_serialize(
+ def _get_media_stream_config_serialize(
self,
- dialog_id,
- calls_configuration_id,
- application_id,
- call_id,
- start_time_after,
- end_time_before,
- composition,
- location,
- page,
- size,
+ media_stream_config_id,
_request_auth,
_content_type,
_headers,
@@ -21267,65 +22574,9 @@ def _get_dialogs_recordings_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
+ if media_stream_config_id is not None:
+ _path_params["mediaStreamConfigId"] = media_stream_config_id
# process the query parameters
- if dialog_id is not None:
-
- _query_params.append(("dialogId", dialog_id))
-
- if calls_configuration_id is not None:
-
- _query_params.append(("callsConfigurationId", calls_configuration_id))
-
- if application_id is not None:
-
- _query_params.append(("applicationId", application_id))
-
- if call_id is not None:
-
- _query_params.append(("callId", call_id))
-
- if start_time_after is not None:
- if isinstance(start_time_after, datetime):
- _query_params.append(
- (
- "startTimeAfter",
- start_time_after.strftime(
- self.api_client.configuration.datetime_format
- ),
- )
- )
- else:
- _query_params.append(("startTimeAfter", start_time_after))
-
- if end_time_before is not None:
- if isinstance(end_time_before, datetime):
- _query_params.append(
- (
- "endTimeBefore",
- end_time_before.strftime(
- self.api_client.configuration.datetime_format
- ),
- )
- )
- else:
- _query_params.append(("endTimeBefore", end_time_before))
-
- if composition is not None:
-
- _query_params.append(("composition", composition))
-
- if location is not None:
-
- _query_params.append(("location", location))
-
- if page is not None:
-
- _query_params.append(("page", page))
-
- if size is not None:
-
- _query_params.append(("size", size))
-
# process the header parameters
# process the form parameters
# process the body parameter
@@ -21340,7 +22591,7 @@ def _get_dialogs_recordings_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/recordings/dialogs",
+ resource_path="/calls/1/media-stream-configs/{mediaStreamConfigId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -21354,11 +22605,16 @@ def _get_dialogs_recordings_serialize(
)
@validate_call
- def get_media_stream_config(
+ def get_media_stream_configs(
self,
- media_stream_config_id: Annotated[
- StrictStr, Field(description="Media-stream configuration ID.")
- ],
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -21370,13 +22626,15 @@ def get_media_stream_config(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsMediaStreamConfigResponse:
- """Get media-stream configuration
+ ) -> CallsMediaStreamConfigPage:
+ """Get media-stream configs
- Get a single media-stream configuration.
+ Get media-stream configs.
- :param media_stream_config_id: Media-stream configuration ID. (required)
- :type media_stream_config_id: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -21399,8 +22657,9 @@ def get_media_stream_config(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_media_stream_config_serialize(
- media_stream_config_id=media_stream_config_id,
+ _param = self._get_media_stream_configs_serialize(
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -21408,9 +22667,10 @@ def get_media_stream_config(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsMediaStreamConfigResponse",
+ "200": "CallsMediaStreamConfigPage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -21425,11 +22685,16 @@ def get_media_stream_config(
).data
@validate_call
- def get_media_stream_config_with_http_info(
+ def get_media_stream_configs_with_http_info(
self,
- media_stream_config_id: Annotated[
- StrictStr, Field(description="Media-stream configuration ID.")
- ],
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -21441,13 +22706,15 @@ def get_media_stream_config_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsMediaStreamConfigResponse]:
- """Get media-stream configuration
+ ) -> ApiResponse[CallsMediaStreamConfigPage]:
+ """Get media-stream configs
- Get a single media-stream configuration.
+ Get media-stream configs.
- :param media_stream_config_id: Media-stream configuration ID. (required)
- :type media_stream_config_id: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -21470,8 +22737,9 @@ def get_media_stream_config_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_media_stream_config_serialize(
- media_stream_config_id=media_stream_config_id,
+ _param = self._get_media_stream_configs_serialize(
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -21479,9 +22747,10 @@ def get_media_stream_config_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsMediaStreamConfigResponse",
+ "200": "CallsMediaStreamConfigPage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -21496,11 +22765,16 @@ def get_media_stream_config_with_http_info(
)
@validate_call
- def get_media_stream_config_without_preload_content(
+ def get_media_stream_configs_without_preload_content(
self,
- media_stream_config_id: Annotated[
- StrictStr, Field(description="Media-stream configuration ID.")
- ],
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -21513,12 +22787,14 @@ def get_media_stream_config_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get media-stream configuration
+ """Get media-stream configs
- Get a single media-stream configuration.
+ Get media-stream configs.
- :param media_stream_config_id: Media-stream configuration ID. (required)
- :type media_stream_config_id: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -21541,8 +22817,9 @@ def get_media_stream_config_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_media_stream_config_serialize(
- media_stream_config_id=media_stream_config_id,
+ _param = self._get_media_stream_configs_serialize(
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -21550,9 +22827,10 @@ def get_media_stream_config_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsMediaStreamConfigResponse",
+ "200": "CallsMediaStreamConfigPage",
+ "400": "ApiException",
"401": "ApiException",
- "404": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -21562,9 +22840,10 @@ def get_media_stream_config_without_preload_content(
)
return response_data.response
- def _get_media_stream_config_serialize(
+ def _get_media_stream_configs_serialize(
self,
- media_stream_config_id,
+ page,
+ size,
_request_auth,
_content_type,
_headers,
@@ -21583,9 +22862,15 @@ def _get_media_stream_config_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if media_stream_config_id is not None:
- _path_params["mediaStreamConfigId"] = media_stream_config_id
# process the query parameters
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ if size is not None:
+
+ _query_params.append(("size", size))
+
# process the header parameters
# process the form parameters
# process the body parameter
@@ -21600,7 +22885,7 @@ def _get_media_stream_config_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/media-stream-configs/{mediaStreamConfigId}",
+ resource_path="/calls/1/media-stream-configs",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -21614,16 +22899,9 @@ def _get_media_stream_config_serialize(
)
@validate_call
- def get_media_stream_configs(
+ def get_regions(
self,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ country_code: Annotated[StrictStr, Field(description="Country code.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -21635,15 +22913,13 @@ def get_media_stream_configs(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsMediaStreamConfigPage:
- """Get media-stream configs
+ ) -> CallsRegionList:
+ """Get regions
- Get media-stream configs.
+ Get regions with shortcodes you'd need for a SIP trunk address.
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param country_code: Country code. (required)
+ :type country_code: 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
@@ -21666,9 +22942,8 @@ def get_media_stream_configs(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_media_stream_configs_serialize(
- page=page,
- size=size,
+ _param = self._get_regions_serialize(
+ country_code=country_code,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -21676,9 +22951,10 @@ def get_media_stream_configs(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsMediaStreamConfigPage",
+ "200": "CallsRegionList",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -21693,16 +22969,9 @@ def get_media_stream_configs(
).data
@validate_call
- def get_media_stream_configs_with_http_info(
+ def get_regions_with_http_info(
self,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ country_code: Annotated[StrictStr, Field(description="Country code.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -21714,15 +22983,13 @@ def get_media_stream_configs_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsMediaStreamConfigPage]:
- """Get media-stream configs
+ ) -> ApiResponse[CallsRegionList]:
+ """Get regions
- Get media-stream configs.
+ Get regions with shortcodes you'd need for a SIP trunk address.
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param country_code: Country code. (required)
+ :type country_code: 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
@@ -21745,9 +23012,8 @@ def get_media_stream_configs_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_media_stream_configs_serialize(
- page=page,
- size=size,
+ _param = self._get_regions_serialize(
+ country_code=country_code,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -21755,9 +23021,10 @@ def get_media_stream_configs_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsMediaStreamConfigPage",
+ "200": "CallsRegionList",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -21772,16 +23039,9 @@ def get_media_stream_configs_with_http_info(
)
@validate_call
- def get_media_stream_configs_without_preload_content(
+ def get_regions_without_preload_content(
self,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ country_code: Annotated[StrictStr, Field(description="Country code.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -21794,14 +23054,12 @@ def get_media_stream_configs_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get media-stream configs
+ """Get regions
- Get media-stream configs.
+ Get regions with shortcodes you'd need for a SIP trunk address.
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param country_code: Country code. (required)
+ :type country_code: 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
@@ -21824,9 +23082,8 @@ def get_media_stream_configs_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_media_stream_configs_serialize(
- page=page,
- size=size,
+ _param = self._get_regions_serialize(
+ country_code=country_code,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -21834,9 +23091,10 @@ def get_media_stream_configs_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsMediaStreamConfigPage",
+ "200": "CallsRegionList",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -21846,10 +23104,9 @@ def get_media_stream_configs_without_preload_content(
)
return response_data.response
- def _get_media_stream_configs_serialize(
+ def _get_regions_serialize(
self,
- page,
- size,
+ country_code,
_request_auth,
_content_type,
_headers,
@@ -21869,13 +23126,9 @@ def _get_media_stream_configs_serialize(
# process the path parameters
# process the query parameters
- if page is not None:
-
- _query_params.append(("page", page))
-
- if size is not None:
+ if country_code is not None:
- _query_params.append(("size", size))
+ _query_params.append(("countryCode", country_code))
# process the header parameters
# process the form parameters
@@ -21891,7 +23144,7 @@ def _get_media_stream_configs_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/media-stream-configs",
+ resource_path="/calls/1/sip-trunks/service-addresses/countries/regions",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -21905,9 +23158,9 @@ def _get_media_stream_configs_serialize(
)
@validate_call
- def get_regions(
+ def get_sip_trunk(
self,
- country_code: Annotated[StrictStr, Field(description="Country code.")],
+ sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -21919,13 +23172,13 @@ def get_regions(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsRegionList:
- """Get regions
+ ) -> CallsSipTrunkResponse:
+ """Get SIP trunk
- Get regions with shortcodes you'd need for a SIP trunk address.
+ Get a single SIP trunk.
- :param country_code: Country code. (required)
- :type country_code: str
+ :param sip_trunk_id: SIP trunk ID. (required)
+ :type sip_trunk_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
@@ -21948,8 +23201,8 @@ def get_regions(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_regions_serialize(
- country_code=country_code,
+ _param = self._get_sip_trunk_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -21957,9 +23210,10 @@ def get_regions(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsRegionList",
- "400": "ApiException",
+ "200": "CallsSipTrunkResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -21974,9 +23228,9 @@ def get_regions(
).data
@validate_call
- def get_regions_with_http_info(
+ def get_sip_trunk_with_http_info(
self,
- country_code: Annotated[StrictStr, Field(description="Country code.")],
+ sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -21988,13 +23242,13 @@ def get_regions_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsRegionList]:
- """Get regions
+ ) -> ApiResponse[CallsSipTrunkResponse]:
+ """Get SIP trunk
- Get regions with shortcodes you'd need for a SIP trunk address.
+ Get a single SIP trunk.
- :param country_code: Country code. (required)
- :type country_code: str
+ :param sip_trunk_id: SIP trunk ID. (required)
+ :type sip_trunk_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
@@ -22017,8 +23271,8 @@ def get_regions_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_regions_serialize(
- country_code=country_code,
+ _param = self._get_sip_trunk_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -22026,9 +23280,10 @@ def get_regions_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsRegionList",
- "400": "ApiException",
+ "200": "CallsSipTrunkResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -22043,9 +23298,9 @@ def get_regions_with_http_info(
)
@validate_call
- def get_regions_without_preload_content(
+ def get_sip_trunk_without_preload_content(
self,
- country_code: Annotated[StrictStr, Field(description="Country code.")],
+ sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -22058,12 +23313,12 @@ def get_regions_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get regions
+ """Get SIP trunk
- Get regions with shortcodes you'd need for a SIP trunk address.
+ Get a single SIP trunk.
- :param country_code: Country code. (required)
- :type country_code: str
+ :param sip_trunk_id: SIP trunk ID. (required)
+ :type sip_trunk_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
@@ -22086,8 +23341,8 @@ def get_regions_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_regions_serialize(
- country_code=country_code,
+ _param = self._get_sip_trunk_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -22095,9 +23350,10 @@ def get_regions_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsRegionList",
- "400": "ApiException",
+ "200": "CallsSipTrunkResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -22107,9 +23363,9 @@ def get_regions_without_preload_content(
)
return response_data.response
- def _get_regions_serialize(
+ def _get_sip_trunk_serialize(
self,
- country_code,
+ sip_trunk_id,
_request_auth,
_content_type,
_headers,
@@ -22128,11 +23384,9 @@ def _get_regions_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
+ if sip_trunk_id is not None:
+ _path_params["sipTrunkId"] = sip_trunk_id
# process the query parameters
- if country_code is not None:
-
- _query_params.append(("countryCode", country_code))
-
# process the header parameters
# process the form parameters
# process the body parameter
@@ -22147,7 +23401,7 @@ def _get_regions_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/sip-trunks/service-addresses/countries/regions",
+ resource_path="/calls/1/sip-trunks/{sipTrunkId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -22161,9 +23415,11 @@ def _get_regions_serialize(
)
@validate_call
- def get_sip_trunk(
+ def get_sip_trunk_service_address(
self,
- sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
+ sip_trunk_service_address_id: Annotated[
+ StrictStr, Field(description="SIP trunk service address ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -22175,13 +23431,13 @@ def get_sip_trunk(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsSipTrunkResponse:
- """Get SIP trunk
+ ) -> CallsPublicSipTrunkServiceAddress:
+ """Get SIP trunk service address
- Get a single SIP trunk.
+ Get SIP trunk service address.
- :param sip_trunk_id: SIP trunk ID. (required)
- :type sip_trunk_id: str
+ :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
+ :type sip_trunk_service_address_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
@@ -22204,8 +23460,8 @@ def get_sip_trunk(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunk_serialize(
- sip_trunk_id=sip_trunk_id,
+ _param = self._get_sip_trunk_service_address_serialize(
+ sip_trunk_service_address_id=sip_trunk_service_address_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -22213,8 +23469,10 @@ def get_sip_trunk(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsSipTrunkResponse",
+ "200": "CallsPublicSipTrunkServiceAddress",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -22230,9 +23488,11 @@ def get_sip_trunk(
).data
@validate_call
- def get_sip_trunk_with_http_info(
+ def get_sip_trunk_service_address_with_http_info(
self,
- sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
+ sip_trunk_service_address_id: Annotated[
+ StrictStr, Field(description="SIP trunk service address ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -22244,13 +23504,13 @@ def get_sip_trunk_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsSipTrunkResponse]:
- """Get SIP trunk
+ ) -> ApiResponse[CallsPublicSipTrunkServiceAddress]:
+ """Get SIP trunk service address
- Get a single SIP trunk.
+ Get SIP trunk service address.
- :param sip_trunk_id: SIP trunk ID. (required)
- :type sip_trunk_id: str
+ :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
+ :type sip_trunk_service_address_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
@@ -22273,8 +23533,8 @@ def get_sip_trunk_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunk_serialize(
- sip_trunk_id=sip_trunk_id,
+ _param = self._get_sip_trunk_service_address_serialize(
+ sip_trunk_service_address_id=sip_trunk_service_address_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -22282,8 +23542,10 @@ def get_sip_trunk_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsSipTrunkResponse",
+ "200": "CallsPublicSipTrunkServiceAddress",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -22299,9 +23561,11 @@ def get_sip_trunk_with_http_info(
)
@validate_call
- def get_sip_trunk_without_preload_content(
+ def get_sip_trunk_service_address_without_preload_content(
self,
- sip_trunk_id: Annotated[StrictStr, Field(description="SIP trunk ID.")],
+ sip_trunk_service_address_id: Annotated[
+ StrictStr, Field(description="SIP trunk service address ID.")
+ ],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -22314,12 +23578,12 @@ def get_sip_trunk_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get SIP trunk
+ """Get SIP trunk service address
- Get a single SIP trunk.
+ Get SIP trunk service address.
- :param sip_trunk_id: SIP trunk ID. (required)
- :type sip_trunk_id: str
+ :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
+ :type sip_trunk_service_address_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
@@ -22342,8 +23606,8 @@ def get_sip_trunk_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunk_serialize(
- sip_trunk_id=sip_trunk_id,
+ _param = self._get_sip_trunk_service_address_serialize(
+ sip_trunk_service_address_id=sip_trunk_service_address_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -22351,8 +23615,10 @@ def get_sip_trunk_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsSipTrunkResponse",
+ "200": "CallsPublicSipTrunkServiceAddress",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -22363,9 +23629,9 @@ def get_sip_trunk_without_preload_content(
)
return response_data.response
- def _get_sip_trunk_serialize(
+ def _get_sip_trunk_service_address_serialize(
self,
- sip_trunk_id,
+ sip_trunk_service_address_id,
_request_auth,
_content_type,
_headers,
@@ -22384,8 +23650,8 @@ def _get_sip_trunk_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if sip_trunk_id is not None:
- _path_params["sipTrunkId"] = sip_trunk_id
+ if sip_trunk_service_address_id is not None:
+ _path_params["sipTrunkServiceAddressId"] = sip_trunk_service_address_id
# process the query parameters
# process the header parameters
# process the form parameters
@@ -22401,7 +23667,7 @@ def _get_sip_trunk_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/sip-trunks/{sipTrunkId}",
+ resource_path="/calls/1/sip-trunks/service-addresses/{sipTrunkServiceAddressId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -22415,11 +23681,16 @@ def _get_sip_trunk_serialize(
)
@validate_call
- def get_sip_trunk_service_address(
+ def get_sip_trunk_service_addresses(
self,
- sip_trunk_service_address_id: Annotated[
- StrictStr, Field(description="SIP trunk service address ID.")
- ],
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -22431,13 +23702,15 @@ def get_sip_trunk_service_address(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsPublicSipTrunkServiceAddress:
- """Get SIP trunk service address
+ ) -> CallsSipTrunkServiceAddressPage:
+ """Get SIP trunk service addresses
- Get SIP trunk service address.
+ Get SIP trunk service addresses.
- :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
- :type sip_trunk_service_address_id: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -22460,8 +23733,9 @@ def get_sip_trunk_service_address(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunk_service_address_serialize(
- sip_trunk_service_address_id=sip_trunk_service_address_id,
+ _param = self._get_sip_trunk_service_addresses_serialize(
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -22469,9 +23743,10 @@ def get_sip_trunk_service_address(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicSipTrunkServiceAddress",
+ "200": "CallsSipTrunkServiceAddressPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -22486,11 +23761,16 @@ def get_sip_trunk_service_address(
).data
@validate_call
- def get_sip_trunk_service_address_with_http_info(
+ def get_sip_trunk_service_addresses_with_http_info(
self,
- sip_trunk_service_address_id: Annotated[
- StrictStr, Field(description="SIP trunk service address ID.")
- ],
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -22502,13 +23782,15 @@ def get_sip_trunk_service_address_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsPublicSipTrunkServiceAddress]:
- """Get SIP trunk service address
+ ) -> ApiResponse[CallsSipTrunkServiceAddressPage]:
+ """Get SIP trunk service addresses
- Get SIP trunk service address.
+ Get SIP trunk service addresses.
- :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
- :type sip_trunk_service_address_id: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -22531,8 +23813,9 @@ def get_sip_trunk_service_address_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunk_service_address_serialize(
- sip_trunk_service_address_id=sip_trunk_service_address_id,
+ _param = self._get_sip_trunk_service_addresses_serialize(
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -22540,9 +23823,10 @@ def get_sip_trunk_service_address_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicSipTrunkServiceAddress",
+ "200": "CallsSipTrunkServiceAddressPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -22557,11 +23841,16 @@ def get_sip_trunk_service_address_with_http_info(
)
@validate_call
- def get_sip_trunk_service_address_without_preload_content(
+ def get_sip_trunk_service_addresses_without_preload_content(
self,
- sip_trunk_service_address_id: Annotated[
- StrictStr, Field(description="SIP trunk service address ID.")
- ],
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -22574,12 +23863,14 @@ def get_sip_trunk_service_address_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get SIP trunk service address
+ """Get SIP trunk service addresses
- Get SIP trunk service address.
+ Get SIP trunk service addresses.
- :param sip_trunk_service_address_id: SIP trunk service address ID. (required)
- :type sip_trunk_service_address_id: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -22602,8 +23893,9 @@ def get_sip_trunk_service_address_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunk_service_address_serialize(
- sip_trunk_service_address_id=sip_trunk_service_address_id,
+ _param = self._get_sip_trunk_service_addresses_serialize(
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -22611,9 +23903,10 @@ def get_sip_trunk_service_address_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsPublicSipTrunkServiceAddress",
+ "200": "CallsSipTrunkServiceAddressPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -22623,9 +23916,10 @@ def get_sip_trunk_service_address_without_preload_content(
)
return response_data.response
- def _get_sip_trunk_service_address_serialize(
+ def _get_sip_trunk_service_addresses_serialize(
self,
- sip_trunk_service_address_id,
+ page,
+ size,
_request_auth,
_content_type,
_headers,
@@ -22644,9 +23938,15 @@ def _get_sip_trunk_service_address_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if sip_trunk_service_address_id is not None:
- _path_params["sipTrunkServiceAddressId"] = sip_trunk_service_address_id
# process the query parameters
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ if size is not None:
+
+ _query_params.append(("size", size))
+
# process the header parameters
# process the form parameters
# process the body parameter
@@ -22661,7 +23961,7 @@ def _get_sip_trunk_service_address_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/sip-trunks/service-addresses/{sipTrunkServiceAddressId}",
+ resource_path="/calls/1/sip-trunks/service-addresses",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -22675,16 +23975,9 @@ def _get_sip_trunk_service_address_serialize(
)
@validate_call
- def get_sip_trunk_service_addresses(
+ def get_sip_trunk_status(
self,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ sip_trunk_id: Annotated[StrictStr, Field(description="Sip Trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -22696,15 +23989,13 @@ def get_sip_trunk_service_addresses(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsSipTrunkServiceAddressPage:
- """Get SIP trunk service addresses
+ ) -> CallsExtendedSipTrunkStatusResponse:
+ """Get SIP trunk status
- Get SIP trunk service addresses.
+ Get a SIP trunk status. Successfully deleted SIP trunk does not have status.
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param sip_trunk_id: Sip Trunk ID. (required)
+ :type sip_trunk_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
@@ -22727,9 +24018,8 @@ def get_sip_trunk_service_addresses(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunk_service_addresses_serialize(
- page=page,
- size=size,
+ _param = self._get_sip_trunk_status_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -22737,9 +24027,11 @@ def get_sip_trunk_service_addresses(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsSipTrunkServiceAddressPage",
+ "200": "CallsExtendedSipTrunkStatusResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -22754,16 +24046,9 @@ def get_sip_trunk_service_addresses(
).data
@validate_call
- def get_sip_trunk_service_addresses_with_http_info(
+ def get_sip_trunk_status_with_http_info(
self,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ sip_trunk_id: Annotated[StrictStr, Field(description="Sip Trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -22775,15 +24060,13 @@ def get_sip_trunk_service_addresses_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsSipTrunkServiceAddressPage]:
- """Get SIP trunk service addresses
+ ) -> ApiResponse[CallsExtendedSipTrunkStatusResponse]:
+ """Get SIP trunk status
- Get SIP trunk service addresses.
+ Get a SIP trunk status. Successfully deleted SIP trunk does not have status.
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param sip_trunk_id: Sip Trunk ID. (required)
+ :type sip_trunk_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
@@ -22804,11 +24087,10 @@ def get_sip_trunk_service_addresses_with_http_info(
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._get_sip_trunk_service_addresses_serialize(
- page=page,
- size=size,
+ """ # noqa: E501
+
+ _param = self._get_sip_trunk_status_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -22816,9 +24098,11 @@ def get_sip_trunk_service_addresses_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsSipTrunkServiceAddressPage",
+ "200": "CallsExtendedSipTrunkStatusResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -22833,16 +24117,9 @@ def get_sip_trunk_service_addresses_with_http_info(
)
@validate_call
- def get_sip_trunk_service_addresses_without_preload_content(
+ def get_sip_trunk_status_without_preload_content(
self,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ sip_trunk_id: Annotated[StrictStr, Field(description="Sip Trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -22855,14 +24132,12 @@ def get_sip_trunk_service_addresses_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get SIP trunk service addresses
+ """Get SIP trunk status
- Get SIP trunk service addresses.
+ Get a SIP trunk status. Successfully deleted SIP trunk does not have status.
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param sip_trunk_id: Sip Trunk ID. (required)
+ :type sip_trunk_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
@@ -22885,9 +24160,8 @@ def get_sip_trunk_service_addresses_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunk_service_addresses_serialize(
- page=page,
- size=size,
+ _param = self._get_sip_trunk_status_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -22895,9 +24169,11 @@ def get_sip_trunk_service_addresses_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsSipTrunkServiceAddressPage",
+ "200": "CallsExtendedSipTrunkStatusResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -22907,10 +24183,9 @@ def get_sip_trunk_service_addresses_without_preload_content(
)
return response_data.response
- def _get_sip_trunk_service_addresses_serialize(
+ def _get_sip_trunk_status_serialize(
self,
- page,
- size,
+ sip_trunk_id,
_request_auth,
_content_type,
_headers,
@@ -22929,15 +24204,9 @@ def _get_sip_trunk_service_addresses_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
+ if sip_trunk_id is not None:
+ _path_params["sipTrunkId"] = sip_trunk_id
# process the query parameters
- if page is not None:
-
- _query_params.append(("page", page))
-
- if size is not None:
-
- _query_params.append(("size", size))
-
# process the header parameters
# process the form parameters
# process the body parameter
@@ -22952,7 +24221,7 @@ def _get_sip_trunk_service_addresses_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/sip-trunks/service-addresses",
+ resource_path="/calls/1/sip-trunks/{sipTrunkId}/status",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -22966,9 +24235,19 @@ def _get_sip_trunk_service_addresses_serialize(
)
@validate_call
- def get_sip_trunk_status(
+ def get_sip_trunks(
self,
- sip_trunk_id: Annotated[StrictStr, Field(description="Sip Trunk ID.")],
+ name: Annotated[
+ Optional[StrictStr], Field(description="SIP trunk name.")
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -22980,13 +24259,17 @@ def get_sip_trunk_status(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsExtendedSipTrunkStatusResponse:
- """Get SIP trunk status
+ ) -> CallsSipTrunkPage:
+ """Get SIP trunks
- Get a SIP trunk status. Successfully deleted SIP trunk does not have status.
+ Get SIP trunks with pagination.
- :param sip_trunk_id: Sip Trunk ID. (required)
- :type sip_trunk_id: str
+ :param name: SIP trunk name.
+ :type name: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -23009,8 +24292,10 @@ def get_sip_trunk_status(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunk_status_serialize(
- sip_trunk_id=sip_trunk_id,
+ _param = self._get_sip_trunks_serialize(
+ name=name,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -23018,9 +24303,10 @@ def get_sip_trunk_status(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsExtendedSipTrunkStatusResponse",
+ "200": "CallsSipTrunkPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -23035,9 +24321,19 @@ def get_sip_trunk_status(
).data
@validate_call
- def get_sip_trunk_status_with_http_info(
+ def get_sip_trunks_with_http_info(
self,
- sip_trunk_id: Annotated[StrictStr, Field(description="Sip Trunk ID.")],
+ name: Annotated[
+ Optional[StrictStr], Field(description="SIP trunk name.")
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -23049,13 +24345,17 @@ def get_sip_trunk_status_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsExtendedSipTrunkStatusResponse]:
- """Get SIP trunk status
+ ) -> ApiResponse[CallsSipTrunkPage]:
+ """Get SIP trunks
- Get a SIP trunk status. Successfully deleted SIP trunk does not have status.
+ Get SIP trunks with pagination.
- :param sip_trunk_id: Sip Trunk ID. (required)
- :type sip_trunk_id: str
+ :param name: SIP trunk name.
+ :type name: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -23078,8 +24378,10 @@ def get_sip_trunk_status_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunk_status_serialize(
- sip_trunk_id=sip_trunk_id,
+ _param = self._get_sip_trunks_serialize(
+ name=name,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -23087,9 +24389,10 @@ def get_sip_trunk_status_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsExtendedSipTrunkStatusResponse",
+ "200": "CallsSipTrunkPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -23104,9 +24407,19 @@ def get_sip_trunk_status_with_http_info(
)
@validate_call
- def get_sip_trunk_status_without_preload_content(
+ def get_sip_trunks_without_preload_content(
self,
- sip_trunk_id: Annotated[StrictStr, Field(description="Sip Trunk ID.")],
+ name: Annotated[
+ Optional[StrictStr], Field(description="SIP trunk name.")
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Results page to retrieve (0..N)."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
+ Field(description="Number of records per page."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -23119,12 +24432,16 @@ def get_sip_trunk_status_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get SIP trunk status
+ """Get SIP trunks
- Get a SIP trunk status. Successfully deleted SIP trunk does not have status.
+ Get SIP trunks with pagination.
- :param sip_trunk_id: Sip Trunk ID. (required)
- :type sip_trunk_id: str
+ :param name: SIP trunk name.
+ :type name: str
+ :param page: Results page to retrieve (0..N).
+ :type page: int
+ :param size: Number of records per page.
+ :type size: 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
@@ -23147,8 +24464,10 @@ def get_sip_trunk_status_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunk_status_serialize(
- sip_trunk_id=sip_trunk_id,
+ _param = self._get_sip_trunks_serialize(
+ name=name,
+ page=page,
+ size=size,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -23156,9 +24475,10 @@ def get_sip_trunk_status_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsExtendedSipTrunkStatusResponse",
+ "200": "CallsSipTrunkPage",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -23168,9 +24488,11 @@ def get_sip_trunk_status_without_preload_content(
)
return response_data.response
- def _get_sip_trunk_status_serialize(
+ def _get_sip_trunks_serialize(
self,
- sip_trunk_id,
+ name,
+ page,
+ size,
_request_auth,
_content_type,
_headers,
@@ -23189,9 +24511,19 @@ def _get_sip_trunk_status_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if sip_trunk_id is not None:
- _path_params["sipTrunkId"] = sip_trunk_id
# process the query parameters
+ if name is not None:
+
+ _query_params.append(("name", name))
+
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ if size is not None:
+
+ _query_params.append(("size", size))
+
# process the header parameters
# process the form parameters
# process the body parameter
@@ -23206,7 +24538,7 @@ def _get_sip_trunk_status_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/calls/1/sip-trunks/{sipTrunkId}/status",
+ resource_path="/calls/1/sip-trunks",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -23220,19 +24552,10 @@ def _get_sip_trunk_status_serialize(
)
@validate_call
- def get_sip_trunks(
+ def hangup_call(
self,
- name: Annotated[
- Optional[StrictStr], Field(description="SIP trunk name.")
- ] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_hangup_request: CallsHangupRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -23244,17 +24567,15 @@ def get_sip_trunks(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsSipTrunkPage:
- """Get SIP trunks
+ ) -> Call:
+ """Hangup
- Get SIP trunks with pagination.
+ Hang up a call.
- :param name: SIP trunk name.
- :type name: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param calls_hangup_request: (required)
+ :type calls_hangup_request: CallsHangupRequest
: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
@@ -23277,10 +24598,9 @@ def get_sip_trunks(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunks_serialize(
- name=name,
- page=page,
- size=size,
+ _param = self._hangup_call_serialize(
+ call_id=call_id,
+ calls_hangup_request=calls_hangup_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -23288,9 +24608,11 @@ def get_sip_trunks(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsSipTrunkPage",
+ "200": "Call",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -23305,19 +24627,10 @@ def get_sip_trunks(
).data
@validate_call
- def get_sip_trunks_with_http_info(
+ def hangup_call_with_http_info(
self,
- name: Annotated[
- Optional[StrictStr], Field(description="SIP trunk name.")
- ] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_hangup_request: CallsHangupRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -23329,17 +24642,15 @@ def get_sip_trunks_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsSipTrunkPage]:
- """Get SIP trunks
-
- Get SIP trunks with pagination.
-
- :param name: SIP trunk name.
- :type name: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ ) -> ApiResponse[Call]:
+ """Hangup
+
+ Hang up a call.
+
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param calls_hangup_request: (required)
+ :type calls_hangup_request: CallsHangupRequest
: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
@@ -23362,10 +24673,9 @@ def get_sip_trunks_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunks_serialize(
- name=name,
- page=page,
- size=size,
+ _param = self._hangup_call_serialize(
+ call_id=call_id,
+ calls_hangup_request=calls_hangup_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -23373,9 +24683,11 @@ def get_sip_trunks_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsSipTrunkPage",
+ "200": "Call",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -23390,19 +24702,10 @@ def get_sip_trunks_with_http_info(
)
@validate_call
- def get_sip_trunks_without_preload_content(
+ def hangup_call_without_preload_content(
self,
- name: Annotated[
- Optional[StrictStr], Field(description="SIP trunk name.")
- ] = None,
- page: Annotated[
- Optional[Annotated[int, Field(strict=True, ge=0)]],
- Field(description="Results page to retrieve (0..N)."),
- ] = None,
- size: Annotated[
- Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
- Field(description="Number of records per page."),
- ] = None,
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_hangup_request: CallsHangupRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -23415,16 +24718,14 @@ def get_sip_trunks_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get SIP trunks
+ """Hangup
- Get SIP trunks with pagination.
+ Hang up a call.
- :param name: SIP trunk name.
- :type name: str
- :param page: Results page to retrieve (0..N).
- :type page: int
- :param size: Number of records per page.
- :type size: int
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param calls_hangup_request: (required)
+ :type calls_hangup_request: CallsHangupRequest
: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
@@ -23447,10 +24748,9 @@ def get_sip_trunks_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._get_sip_trunks_serialize(
- name=name,
- page=page,
- size=size,
+ _param = self._hangup_call_serialize(
+ call_id=call_id,
+ calls_hangup_request=calls_hangup_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -23458,9 +24758,11 @@ def get_sip_trunks_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsSipTrunkPage",
+ "200": "Call",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -23470,11 +24772,10 @@ def get_sip_trunks_without_preload_content(
)
return response_data.response
- def _get_sip_trunks_serialize(
+ def _hangup_call_serialize(
self,
- name,
- page,
- size,
+ call_id,
+ calls_hangup_request,
_request_auth,
_content_type,
_headers,
@@ -23493,34 +24794,36 @@ def _get_sip_trunks_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
+ if call_id is not None:
+ _path_params["callId"] = call_id
# process the query parameters
- if name is not None:
-
- _query_params.append(("name", name))
-
- if page is not None:
-
- _query_params.append(("page", page))
-
- if size is not None:
-
- _query_params.append(("size", size))
-
# process the header parameters
# process the form parameters
# process the body parameter
+ if calls_hangup_request is not None:
+ _body_params = calls_hangup_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
- method="GET",
- resource_path="/calls/1/sip-trunks",
+ method="POST",
+ resource_path="/calls/1/calls/{callId}/hangup",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -23534,10 +24837,9 @@ def _get_sip_trunks_serialize(
)
@validate_call
- def hangup_call(
+ def hangup_conference(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_hangup_request: CallsHangupRequest,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -23549,15 +24851,13 @@ def hangup_call(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> Call:
- """Hangup
+ ) -> CallsConference:
+ """Hangup conference
- Hang up a call.
+ Hang up a conference. This action also hangs up all calls in the conference.
- :param call_id: Call ID. (required)
- :type call_id: str
- :param calls_hangup_request: (required)
- :type calls_hangup_request: CallsHangupRequest
+ :param conference_id: Conference ID. (required)
+ :type conference_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
@@ -23580,9 +24880,8 @@ def hangup_call(
:return: Returns the result object.
""" # noqa: E501
- _param = self._hangup_call_serialize(
- call_id=call_id,
- calls_hangup_request=calls_hangup_request,
+ _param = self._hangup_conference_serialize(
+ conference_id=conference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -23590,9 +24889,9 @@ def hangup_call(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "Call",
- "400": "ApiException",
+ "200": "CallsConference",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -23608,10 +24907,9 @@ def hangup_call(
).data
@validate_call
- def hangup_call_with_http_info(
+ def hangup_conference_with_http_info(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_hangup_request: CallsHangupRequest,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -23623,15 +24921,13 @@ def hangup_call_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[Call]:
- """Hangup
+ ) -> ApiResponse[CallsConference]:
+ """Hangup conference
- Hang up a call.
+ Hang up a conference. This action also hangs up all calls in the conference.
- :param call_id: Call ID. (required)
- :type call_id: str
- :param calls_hangup_request: (required)
- :type calls_hangup_request: CallsHangupRequest
+ :param conference_id: Conference ID. (required)
+ :type conference_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
@@ -23654,9 +24950,8 @@ def hangup_call_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._hangup_call_serialize(
- call_id=call_id,
- calls_hangup_request=calls_hangup_request,
+ _param = self._hangup_conference_serialize(
+ conference_id=conference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -23664,9 +24959,9 @@ def hangup_call_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "Call",
- "400": "ApiException",
+ "200": "CallsConference",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -23682,10 +24977,9 @@ def hangup_call_with_http_info(
)
@validate_call
- def hangup_call_without_preload_content(
+ def hangup_conference_without_preload_content(
self,
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_hangup_request: CallsHangupRequest,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -23698,14 +24992,12 @@ def hangup_call_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Hangup
+ """Hangup conference
- Hang up a call.
+ Hang up a conference. This action also hangs up all calls in the conference.
- :param call_id: Call ID. (required)
- :type call_id: str
- :param calls_hangup_request: (required)
- :type calls_hangup_request: CallsHangupRequest
+ :param conference_id: Conference ID. (required)
+ :type conference_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
@@ -23728,9 +25020,8 @@ def hangup_call_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._hangup_call_serialize(
- call_id=call_id,
- calls_hangup_request=calls_hangup_request,
+ _param = self._hangup_conference_serialize(
+ conference_id=conference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -23738,9 +25029,9 @@ def hangup_call_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "Call",
- "400": "ApiException",
+ "200": "CallsConference",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -23751,10 +25042,9 @@ def hangup_call_without_preload_content(
)
return response_data.response
- def _hangup_call_serialize(
+ def _hangup_conference_serialize(
self,
- call_id,
- calls_hangup_request,
+ conference_id,
_request_auth,
_content_type,
_headers,
@@ -23773,36 +25063,24 @@ def _hangup_call_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if call_id is not None:
- _path_params["callId"] = call_id
+ if conference_id is not None:
+ _path_params["conferenceId"] = conference_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_hangup_request is not None:
- _body_params = calls_hangup_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/calls/{callId}/hangup",
+ resource_path="/calls/1/conferences/{conferenceId}/hangup",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -23816,9 +25094,9 @@ def _hangup_call_serialize(
)
@validate_call
- def hangup_conference(
+ def hangup_dialog(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -23830,13 +25108,13 @@ def hangup_conference(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsConference:
- """Hangup conference
+ ) -> CallsDialogResponse:
+ """Hangup dialog
- Hang up a conference. This action also hangs up all calls in the conference.
+ Hang up a dialog. This action also hangs up all calls in the dialog.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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
@@ -23859,8 +25137,8 @@ def hangup_conference(
:return: Returns the result object.
""" # noqa: E501
- _param = self._hangup_conference_serialize(
- conference_id=conference_id,
+ _param = self._hangup_dialog_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -23868,8 +25146,9 @@ def hangup_conference(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConference",
+ "200": "CallsDialogResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -23885,9 +25164,9 @@ def hangup_conference(
).data
@validate_call
- def hangup_conference_with_http_info(
+ def hangup_dialog_with_http_info(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -23899,13 +25178,13 @@ def hangup_conference_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsConference]:
- """Hangup conference
+ ) -> ApiResponse[CallsDialogResponse]:
+ """Hangup dialog
- Hang up a conference. This action also hangs up all calls in the conference.
+ Hang up a dialog. This action also hangs up all calls in the dialog.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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
@@ -23928,8 +25207,8 @@ def hangup_conference_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._hangup_conference_serialize(
- conference_id=conference_id,
+ _param = self._hangup_dialog_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -23937,8 +25216,9 @@ def hangup_conference_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConference",
+ "200": "CallsDialogResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -23954,9 +25234,9 @@ def hangup_conference_with_http_info(
)
@validate_call
- def hangup_conference_without_preload_content(
+ def hangup_dialog_without_preload_content(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
+ dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -23969,12 +25249,12 @@ def hangup_conference_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Hangup conference
+ """Hangup dialog
- Hang up a conference. This action also hangs up all calls in the conference.
+ Hang up a dialog. This action also hangs up all calls in the dialog.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
+ :param dialog_id: Dialog ID. (required)
+ :type dialog_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
@@ -23997,8 +25277,8 @@ def hangup_conference_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._hangup_conference_serialize(
- conference_id=conference_id,
+ _param = self._hangup_dialog_serialize(
+ dialog_id=dialog_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24006,8 +25286,9 @@ def hangup_conference_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsConference",
+ "200": "CallsDialogResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -24018,9 +25299,9 @@ def hangup_conference_without_preload_content(
)
return response_data.response
- def _hangup_conference_serialize(
+ def _hangup_dialog_serialize(
self,
- conference_id,
+ dialog_id,
_request_auth,
_content_type,
_headers,
@@ -24039,8 +25320,8 @@ def _hangup_conference_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if conference_id is not None:
- _path_params["conferenceId"] = conference_id
+ if dialog_id is not None:
+ _path_params["dialogId"] = dialog_id
# process the query parameters
# process the header parameters
# process the form parameters
@@ -24056,7 +25337,7 @@ def _hangup_conference_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/conferences/{conferenceId}/hangup",
+ resource_path="/calls/1/dialogs/{dialogId}/hangup",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -24070,9 +25351,9 @@ def _hangup_conference_serialize(
)
@validate_call
- def hangup_dialog(
+ def pause_bulk(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -24084,13 +25365,13 @@ def hangup_dialog(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsDialogResponse:
- """Hangup dialog
+ ) -> CallBulkStatus:
+ """Pause
- Hang up a dialog. This action also hangs up all calls in the dialog.
+ Pause a bulk. Bulk can be paused if it is in progress and was created with scheduling options.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_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
@@ -24113,8 +25394,8 @@ def hangup_dialog(
:return: Returns the result object.
""" # noqa: E501
- _param = self._hangup_dialog_serialize(
- dialog_id=dialog_id,
+ _param = self._pause_bulk_serialize(
+ bulk_id=bulk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24122,8 +25403,9 @@ def hangup_dialog(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogResponse",
+ "200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -24139,9 +25421,9 @@ def hangup_dialog(
).data
@validate_call
- def hangup_dialog_with_http_info(
+ def pause_bulk_with_http_info(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -24153,13 +25435,13 @@ def hangup_dialog_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsDialogResponse]:
- """Hangup dialog
+ ) -> ApiResponse[CallBulkStatus]:
+ """Pause
- Hang up a dialog. This action also hangs up all calls in the dialog.
+ Pause a bulk. Bulk can be paused if it is in progress and was created with scheduling options.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_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
@@ -24182,8 +25464,8 @@ def hangup_dialog_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._hangup_dialog_serialize(
- dialog_id=dialog_id,
+ _param = self._pause_bulk_serialize(
+ bulk_id=bulk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24191,8 +25473,9 @@ def hangup_dialog_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogResponse",
+ "200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -24208,9 +25491,9 @@ def hangup_dialog_with_http_info(
)
@validate_call
- def hangup_dialog_without_preload_content(
+ def pause_bulk_without_preload_content(
self,
- dialog_id: Annotated[StrictStr, Field(description="Dialog ID.")],
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -24223,12 +25506,12 @@ def hangup_dialog_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Hangup dialog
+ """Pause
- Hang up a dialog. This action also hangs up all calls in the dialog.
+ Pause a bulk. Bulk can be paused if it is in progress and was created with scheduling options.
- :param dialog_id: Dialog ID. (required)
- :type dialog_id: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_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
@@ -24251,8 +25534,8 @@ def hangup_dialog_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._hangup_dialog_serialize(
- dialog_id=dialog_id,
+ _param = self._pause_bulk_serialize(
+ bulk_id=bulk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24260,8 +25543,9 @@ def hangup_dialog_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsDialogResponse",
+ "200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -24272,9 +25556,9 @@ def hangup_dialog_without_preload_content(
)
return response_data.response
- def _hangup_dialog_serialize(
+ def _pause_bulk_serialize(
self,
- dialog_id,
+ bulk_id,
_request_auth,
_content_type,
_headers,
@@ -24293,8 +25577,8 @@ def _hangup_dialog_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if dialog_id is not None:
- _path_params["dialogId"] = dialog_id
+ if bulk_id is not None:
+ _path_params["bulkId"] = bulk_id
# process the query parameters
# process the header parameters
# process the form parameters
@@ -24310,7 +25594,7 @@ def _hangup_dialog_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/dialogs/{dialogId}/hangup",
+ resource_path="/calls/1/bulks/{bulkId}/pause",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -24324,9 +25608,10 @@ def _hangup_dialog_serialize(
)
@validate_call
- def pause_bulk(
+ def pre_answer_call(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_pre_answer_request: CallsPreAnswerRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -24338,13 +25623,15 @@ def pause_bulk(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallBulkStatus:
- """Pause
+ ) -> CallsActionResponse:
+ """Pre-answer
- Pause a bulk. Bulk can be paused if it is in progress and was created with scheduling options.
+ Pre-answer a call to handle early media.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param calls_pre_answer_request: (required)
+ :type calls_pre_answer_request: CallsPreAnswerRequest
: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
@@ -24367,8 +25654,9 @@ def pause_bulk(
:return: Returns the result object.
""" # noqa: E501
- _param = self._pause_bulk_serialize(
- bulk_id=bulk_id,
+ _param = self._pre_answer_call_serialize(
+ call_id=call_id,
+ calls_pre_answer_request=calls_pre_answer_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24376,8 +25664,10 @@ def pause_bulk(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -24393,9 +25683,10 @@ def pause_bulk(
).data
@validate_call
- def pause_bulk_with_http_info(
+ def pre_answer_call_with_http_info(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_pre_answer_request: CallsPreAnswerRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -24407,13 +25698,15 @@ def pause_bulk_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallBulkStatus]:
- """Pause
+ ) -> ApiResponse[CallsActionResponse]:
+ """Pre-answer
- Pause a bulk. Bulk can be paused if it is in progress and was created with scheduling options.
+ Pre-answer a call to handle early media.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param calls_pre_answer_request: (required)
+ :type calls_pre_answer_request: CallsPreAnswerRequest
: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
@@ -24436,8 +25729,9 @@ def pause_bulk_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._pause_bulk_serialize(
- bulk_id=bulk_id,
+ _param = self._pre_answer_call_serialize(
+ call_id=call_id,
+ calls_pre_answer_request=calls_pre_answer_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24445,8 +25739,10 @@ def pause_bulk_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -24462,9 +25758,10 @@ def pause_bulk_with_http_info(
)
@validate_call
- def pause_bulk_without_preload_content(
+ def pre_answer_call_without_preload_content(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ calls_pre_answer_request: CallsPreAnswerRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -24477,12 +25774,14 @@ def pause_bulk_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Pause
+ """Pre-answer
- Pause a bulk. Bulk can be paused if it is in progress and was created with scheduling options.
+ Pre-answer a call to handle early media.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
+ :param call_id: Call ID. (required)
+ :type call_id: str
+ :param calls_pre_answer_request: (required)
+ :type calls_pre_answer_request: CallsPreAnswerRequest
: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
@@ -24505,8 +25804,9 @@ def pause_bulk_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._pause_bulk_serialize(
- bulk_id=bulk_id,
+ _param = self._pre_answer_call_serialize(
+ call_id=call_id,
+ calls_pre_answer_request=calls_pre_answer_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24514,8 +25814,10 @@ def pause_bulk_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsActionResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -24526,9 +25828,10 @@ def pause_bulk_without_preload_content(
)
return response_data.response
- def _pause_bulk_serialize(
+ def _pre_answer_call_serialize(
self,
- bulk_id,
+ call_id,
+ calls_pre_answer_request,
_request_auth,
_content_type,
_headers,
@@ -24547,24 +25850,36 @@ def _pause_bulk_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if bulk_id is not None:
- _path_params["bulkId"] = bulk_id
+ if call_id is not None:
+ _path_params["callId"] = call_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
+ if calls_pre_answer_request is not None:
+ _body_params = calls_pre_answer_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/bulks/{bulkId}/pause",
+ resource_path="/calls/1/calls/{callId}/pre-answer",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -24578,10 +25893,10 @@ def _pause_bulk_serialize(
)
@validate_call
- def pre_answer_call(
+ def remove_conference_call(
self,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_pre_answer_request: CallsPreAnswerRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -24594,14 +25909,14 @@ def pre_answer_call(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> CallsActionResponse:
- """Pre-answer
+ """Remove call
- Pre-answer a call to handle early media.
+ Remove a call from a conference. The call stays active after this action.
+ :param conference_id: Conference ID. (required)
+ :type conference_id: str
:param call_id: Call ID. (required)
:type call_id: str
- :param calls_pre_answer_request: (required)
- :type calls_pre_answer_request: CallsPreAnswerRequest
: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
@@ -24624,9 +25939,9 @@ def pre_answer_call(
:return: Returns the result object.
""" # noqa: E501
- _param = self._pre_answer_call_serialize(
+ _param = self._remove_conference_call_serialize(
+ conference_id=conference_id,
call_id=call_id,
- calls_pre_answer_request=calls_pre_answer_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24636,6 +25951,7 @@ def pre_answer_call(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -24651,10 +25967,10 @@ def pre_answer_call(
).data
@validate_call
- def pre_answer_call_with_http_info(
+ def remove_conference_call_with_http_info(
self,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_pre_answer_request: CallsPreAnswerRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -24667,14 +25983,14 @@ def pre_answer_call_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[CallsActionResponse]:
- """Pre-answer
+ """Remove call
- Pre-answer a call to handle early media.
+ Remove a call from a conference. The call stays active after this action.
+ :param conference_id: Conference ID. (required)
+ :type conference_id: str
:param call_id: Call ID. (required)
:type call_id: str
- :param calls_pre_answer_request: (required)
- :type calls_pre_answer_request: CallsPreAnswerRequest
: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
@@ -24697,9 +26013,9 @@ def pre_answer_call_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._pre_answer_call_serialize(
+ _param = self._remove_conference_call_serialize(
+ conference_id=conference_id,
call_id=call_id,
- calls_pre_answer_request=calls_pre_answer_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24709,6 +26025,7 @@ def pre_answer_call_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -24724,10 +26041,10 @@ def pre_answer_call_with_http_info(
)
@validate_call
- def pre_answer_call_without_preload_content(
+ def remove_conference_call_without_preload_content(
self,
+ conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
call_id: Annotated[StrictStr, Field(description="Call ID.")],
- calls_pre_answer_request: CallsPreAnswerRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -24740,14 +26057,14 @@ def pre_answer_call_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Pre-answer
+ """Remove call
- Pre-answer a call to handle early media.
+ Remove a call from a conference. The call stays active after this action.
+ :param conference_id: Conference ID. (required)
+ :type conference_id: str
:param call_id: Call ID. (required)
:type call_id: str
- :param calls_pre_answer_request: (required)
- :type calls_pre_answer_request: CallsPreAnswerRequest
: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
@@ -24770,9 +26087,9 @@ def pre_answer_call_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._pre_answer_call_serialize(
+ _param = self._remove_conference_call_serialize(
+ conference_id=conference_id,
call_id=call_id,
- calls_pre_answer_request=calls_pre_answer_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24782,6 +26099,7 @@ def pre_answer_call_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -24792,10 +26110,10 @@ def pre_answer_call_without_preload_content(
)
return response_data.response
- def _pre_answer_call_serialize(
+ def _remove_conference_call_serialize(
self,
+ conference_id,
call_id,
- calls_pre_answer_request,
_request_auth,
_content_type,
_headers,
@@ -24814,36 +26132,26 @@ def _pre_answer_call_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
+ if conference_id is not None:
+ _path_params["conferenceId"] = conference_id
if call_id is not None:
_path_params["callId"] = call_id
# process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if calls_pre_answer_request is not None:
- _body_params = calls_pre_answer_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
+ # 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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
- method="POST",
- resource_path="/calls/1/calls/{callId}/pre-answer",
+ method="DELETE",
+ resource_path="/calls/1/conferences/{conferenceId}/call/{callId}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -24857,10 +26165,10 @@ def _pre_answer_call_serialize(
)
@validate_call
- def remove_conference_call(
+ def reschedule_bulk(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ calls_reschedule_request: CallsRescheduleRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -24872,15 +26180,15 @@ def remove_conference_call(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallsActionResponse:
- """Remove call
+ ) -> CallBulkStatus:
+ """Reschedule
- Remove a call from a conference. The call stays active after this action.
+ Reschedule a bulk. Rescheduling is possible only if the bulk was created with scheduling options and has not started yet.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param call_id: Call ID. (required)
- :type call_id: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_id: str
+ :param calls_reschedule_request: (required)
+ :type calls_reschedule_request: CallsRescheduleRequest
: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
@@ -24903,9 +26211,9 @@ def remove_conference_call(
:return: Returns the result object.
""" # noqa: E501
- _param = self._remove_conference_call_serialize(
- conference_id=conference_id,
- call_id=call_id,
+ _param = self._reschedule_bulk_serialize(
+ bulk_id=bulk_id,
+ calls_reschedule_request=calls_reschedule_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24913,8 +26221,10 @@ def remove_conference_call(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
+ "200": "CallBulkStatus",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -24930,10 +26240,10 @@ def remove_conference_call(
).data
@validate_call
- def remove_conference_call_with_http_info(
+ def reschedule_bulk_with_http_info(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ calls_reschedule_request: CallsRescheduleRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -24945,15 +26255,15 @@ def remove_conference_call_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallsActionResponse]:
- """Remove call
+ ) -> ApiResponse[CallBulkStatus]:
+ """Reschedule
- Remove a call from a conference. The call stays active after this action.
+ Reschedule a bulk. Rescheduling is possible only if the bulk was created with scheduling options and has not started yet.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param call_id: Call ID. (required)
- :type call_id: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_id: str
+ :param calls_reschedule_request: (required)
+ :type calls_reschedule_request: CallsRescheduleRequest
: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
@@ -24976,9 +26286,9 @@ def remove_conference_call_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._remove_conference_call_serialize(
- conference_id=conference_id,
- call_id=call_id,
+ _param = self._reschedule_bulk_serialize(
+ bulk_id=bulk_id,
+ calls_reschedule_request=calls_reschedule_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -24986,8 +26296,10 @@ def remove_conference_call_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
+ "200": "CallBulkStatus",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -25003,10 +26315,10 @@ def remove_conference_call_with_http_info(
)
@validate_call
- def remove_conference_call_without_preload_content(
+ def reschedule_bulk_without_preload_content(
self,
- conference_id: Annotated[StrictStr, Field(description="Conference ID.")],
- call_id: Annotated[StrictStr, Field(description="Call ID.")],
+ bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
+ calls_reschedule_request: CallsRescheduleRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -25019,14 +26331,14 @@ def remove_conference_call_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Remove call
+ """Reschedule
- Remove a call from a conference. The call stays active after this action.
+ Reschedule a bulk. Rescheduling is possible only if the bulk was created with scheduling options and has not started yet.
- :param conference_id: Conference ID. (required)
- :type conference_id: str
- :param call_id: Call ID. (required)
- :type call_id: str
+ :param bulk_id: Bulk ID. (required)
+ :type bulk_id: str
+ :param calls_reschedule_request: (required)
+ :type calls_reschedule_request: CallsRescheduleRequest
: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
@@ -25049,9 +26361,9 @@ def remove_conference_call_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._remove_conference_call_serialize(
- conference_id=conference_id,
- call_id=call_id,
+ _param = self._reschedule_bulk_serialize(
+ bulk_id=bulk_id,
+ calls_reschedule_request=calls_reschedule_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -25059,8 +26371,10 @@ def remove_conference_call_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallsActionResponse",
+ "200": "CallBulkStatus",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -25071,10 +26385,10 @@ def remove_conference_call_without_preload_content(
)
return response_data.response
- def _remove_conference_call_serialize(
+ def _reschedule_bulk_serialize(
self,
- conference_id,
- call_id,
+ bulk_id,
+ calls_reschedule_request,
_request_auth,
_content_type,
_headers,
@@ -25093,26 +26407,36 @@ def _remove_conference_call_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if conference_id is not None:
- _path_params["conferenceId"] = conference_id
- if call_id is not None:
- _path_params["callId"] = call_id
+ if bulk_id is not None:
+ _path_params["bulkId"] = bulk_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
+ if calls_reschedule_request is not None:
+ _body_params = calls_reschedule_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
- method="DELETE",
- resource_path="/calls/1/conferences/{conferenceId}/call/{callId}",
+ method="POST",
+ resource_path="/calls/1/bulks/{bulkId}/reschedule",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -25126,10 +26450,9 @@ def _remove_conference_call_serialize(
)
@validate_call
- def reschedule_bulk(
+ def reset_sip_trunk_password(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
- calls_reschedule_request: CallsRescheduleRequest,
+ sip_trunk_id: Annotated[StrictStr, Field(description="Sip Trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -25141,15 +26464,13 @@ def reschedule_bulk(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> CallBulkStatus:
- """Reschedule
+ ) -> CallsSipTrunkRegistrationCredentials:
+ """Reset registered SIP trunk password
- Reschedule a bulk. Rescheduling is possible only if the bulk was created with scheduling options and has not started yet.
+ Reset password. Applicable only for `REGISTERED` SIP trunks.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
- :param calls_reschedule_request: (required)
- :type calls_reschedule_request: CallsRescheduleRequest
+ :param sip_trunk_id: Sip Trunk ID. (required)
+ :type sip_trunk_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
@@ -25172,9 +26493,8 @@ def reschedule_bulk(
:return: Returns the result object.
""" # noqa: E501
- _param = self._reschedule_bulk_serialize(
- bulk_id=bulk_id,
- calls_reschedule_request=calls_reschedule_request,
+ _param = self._reset_sip_trunk_password_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -25182,8 +26502,10 @@ def reschedule_bulk(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsSipTrunkRegistrationCredentials",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -25199,10 +26521,9 @@ def reschedule_bulk(
).data
@validate_call
- def reschedule_bulk_with_http_info(
+ def reset_sip_trunk_password_with_http_info(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
- calls_reschedule_request: CallsRescheduleRequest,
+ sip_trunk_id: Annotated[StrictStr, Field(description="Sip Trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -25214,15 +26535,13 @@ def reschedule_bulk_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[CallBulkStatus]:
- """Reschedule
+ ) -> ApiResponse[CallsSipTrunkRegistrationCredentials]:
+ """Reset registered SIP trunk password
- Reschedule a bulk. Rescheduling is possible only if the bulk was created with scheduling options and has not started yet.
+ Reset password. Applicable only for `REGISTERED` SIP trunks.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
- :param calls_reschedule_request: (required)
- :type calls_reschedule_request: CallsRescheduleRequest
+ :param sip_trunk_id: Sip Trunk ID. (required)
+ :type sip_trunk_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
@@ -25245,9 +26564,8 @@ def reschedule_bulk_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._reschedule_bulk_serialize(
- bulk_id=bulk_id,
- calls_reschedule_request=calls_reschedule_request,
+ _param = self._reset_sip_trunk_password_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -25255,8 +26573,10 @@ def reschedule_bulk_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsSipTrunkRegistrationCredentials",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -25272,10 +26592,9 @@ def reschedule_bulk_with_http_info(
)
@validate_call
- def reschedule_bulk_without_preload_content(
+ def reset_sip_trunk_password_without_preload_content(
self,
- bulk_id: Annotated[StrictStr, Field(description="Bulk ID.")],
- calls_reschedule_request: CallsRescheduleRequest,
+ sip_trunk_id: Annotated[StrictStr, Field(description="Sip Trunk ID.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -25288,14 +26607,12 @@ def reschedule_bulk_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Reschedule
+ """Reset registered SIP trunk password
- Reschedule a bulk. Rescheduling is possible only if the bulk was created with scheduling options and has not started yet.
+ Reset password. Applicable only for `REGISTERED` SIP trunks.
- :param bulk_id: Bulk ID. (required)
- :type bulk_id: str
- :param calls_reschedule_request: (required)
- :type calls_reschedule_request: CallsRescheduleRequest
+ :param sip_trunk_id: Sip Trunk ID. (required)
+ :type sip_trunk_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
@@ -25318,9 +26635,8 @@ def reschedule_bulk_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._reschedule_bulk_serialize(
- bulk_id=bulk_id,
- calls_reschedule_request=calls_reschedule_request,
+ _param = self._reset_sip_trunk_password_serialize(
+ sip_trunk_id=sip_trunk_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -25328,8 +26644,10 @@ def reschedule_bulk_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- "200": "CallBulkStatus",
+ "200": "CallsSipTrunkRegistrationCredentials",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -25340,10 +26658,9 @@ def reschedule_bulk_without_preload_content(
)
return response_data.response
- def _reschedule_bulk_serialize(
+ def _reset_sip_trunk_password_serialize(
self,
- bulk_id,
- calls_reschedule_request,
+ sip_trunk_id,
_request_auth,
_content_type,
_headers,
@@ -25362,36 +26679,24 @@ def _reschedule_bulk_serialize(
_body_params: Optional[bytes] = None
# process the path parameters
- if bulk_id is not None:
- _path_params["bulkId"] = bulk_id
+ if sip_trunk_id is not None:
+ _path_params["sipTrunkId"] = sip_trunk_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
- if calls_reschedule_request is not None:
- _body_params = calls_reschedule_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] = ["APIKeyHeader"]
return self.api_client.param_serialize(
method="POST",
- resource_path="/calls/1/bulks/{bulkId}/reschedule",
+ resource_path="/calls/1/sip-trunks/{sipTrunkId}/reset-password",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -25459,6 +26764,7 @@ def resume_bulk(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -25528,6 +26834,7 @@ def resume_bulk_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -25597,6 +26904,7 @@ def resume_bulk_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallBulkStatus",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -25713,6 +27021,7 @@ def send_ringing(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -25782,6 +27091,7 @@ def send_ringing_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -25851,6 +27161,7 @@ def send_ringing_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsActionResponse",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -25972,6 +27283,8 @@ def set_sip_trunk_status(
"200": "CallsSipTrunkStatusResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -26045,6 +27358,8 @@ def set_sip_trunk_status_with_http_info(
"200": "CallsSipTrunkStatusResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -26118,6 +27433,8 @@ def set_sip_trunk_status_without_preload_content(
"200": "CallsSipTrunkStatusResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -26251,6 +27568,7 @@ def start_media_stream(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -26325,6 +27643,7 @@ def start_media_stream_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -26399,6 +27718,7 @@ def start_media_stream_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -26529,6 +27849,7 @@ def stop_media_stream(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -26599,6 +27920,7 @@ def stop_media_stream_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -26669,6 +27991,7 @@ def stop_media_stream_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -26790,6 +28113,7 @@ def update_conference(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -26864,6 +28188,7 @@ def update_conference_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -26938,6 +28263,7 @@ def update_conference_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -27076,6 +28402,7 @@ def update_conference_call(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -27154,6 +28481,7 @@ def update_conference_call_with_http_info(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -27232,6 +28560,7 @@ def update_conference_call_without_preload_content(
"200": "CallsActionResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -27369,7 +28698,9 @@ def update_media_stream_config(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsMediaStreamConfigResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -27444,7 +28775,9 @@ def update_media_stream_config_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsMediaStreamConfigResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -27519,7 +28852,9 @@ def update_media_stream_config_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsMediaStreamConfigResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"429": "ApiException",
"500": "ApiException",
@@ -27654,6 +28989,8 @@ def update_sip_trunk(
"202": "CallsSipTrunkResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -27727,6 +29064,8 @@ def update_sip_trunk_with_http_info(
"202": "CallsSipTrunkResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -27800,6 +29139,8 @@ def update_sip_trunk_without_preload_content(
"202": "CallsSipTrunkResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -27935,6 +29276,8 @@ def update_sip_trunk_service_address(
"200": "CallsPublicSipTrunkServiceAddress",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -28010,6 +29353,8 @@ def update_sip_trunk_service_address_with_http_info(
"200": "CallsPublicSipTrunkServiceAddress",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -28085,6 +29430,8 @@ def update_sip_trunk_service_address_without_preload_content(
"200": "CallsPublicSipTrunkServiceAddress",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -28212,7 +29559,9 @@ def upload_calls_audio_file(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsFile",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -28280,7 +29629,9 @@ def upload_calls_audio_file_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsFile",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
@@ -28348,7 +29699,9 @@ def upload_calls_audio_file_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsFile",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
}
diff --git a/infobip_api_client/api/click_to_call_api.py b/infobip_api_client/api/click_to_call_api.py
index dd36be1..a957b8b 100644
--- a/infobip_api_client/api/click_to_call_api.py
+++ b/infobip_api_client/api/click_to_call_api.py
@@ -11,7 +11,6 @@
Do not edit the class manually.
""" # noqa: E501
-
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
@@ -93,7 +92,9 @@ def send_click_to_call_message(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsVoiceResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -162,7 +163,9 @@ def send_click_to_call_message_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsVoiceResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -231,7 +234,9 @@ def send_click_to_call_message_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "CallsVoiceResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
diff --git a/infobip_api_client/api/email_api.py b/infobip_api_client/api/email_api.py
new file mode 100644
index 0000000..25875ef
--- /dev/null
+++ b/infobip_api_client/api/email_api.py
@@ -0,0 +1,11512 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from datetime import datetime
+from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr
+from typing import List, Optional, Union
+from typing_extensions import Annotated
+from infobip_api_client.models.email_add_domain_request import EmailAddDomainRequest
+from infobip_api_client.models.email_add_suppression_request import (
+ EmailAddSuppressionRequest,
+)
+from infobip_api_client.models.email_all_domains_response import EmailAllDomainsResponse
+from infobip_api_client.models.email_bulk_reschedule_request import (
+ EmailBulkRescheduleRequest,
+)
+from infobip_api_client.models.email_bulk_reschedule_response import (
+ EmailBulkRescheduleResponse,
+)
+from infobip_api_client.models.email_bulk_schedule_response import (
+ EmailBulkScheduleResponse,
+)
+from infobip_api_client.models.email_bulk_status_response import EmailBulkStatusResponse
+from infobip_api_client.models.email_bulk_update_status_request import (
+ EmailBulkUpdateStatusRequest,
+)
+from infobip_api_client.models.email_bulk_update_status_response import (
+ EmailBulkUpdateStatusResponse,
+)
+from infobip_api_client.models.email_delete_suppression_request import (
+ EmailDeleteSuppressionRequest,
+)
+from infobip_api_client.models.email_domain_info_page_response import (
+ EmailDomainInfoPageResponse,
+)
+from infobip_api_client.models.email_domain_ip_pool_assign_request import (
+ EmailDomainIpPoolAssignRequest,
+)
+from infobip_api_client.models.email_domain_ip_pool_update_request import (
+ EmailDomainIpPoolUpdateRequest,
+)
+from infobip_api_client.models.email_domain_ip_request import EmailDomainIpRequest
+from infobip_api_client.models.email_domain_ip_response import EmailDomainIpResponse
+from infobip_api_client.models.email_domain_response import EmailDomainResponse
+from infobip_api_client.models.email_get_suppression_type import EmailGetSuppressionType
+from infobip_api_client.models.email_ip_detail_response import EmailIpDetailResponse
+from infobip_api_client.models.email_ip_domain_response import EmailIpDomainResponse
+from infobip_api_client.models.email_ip_pool_assign_ip_request import (
+ EmailIpPoolAssignIpRequest,
+)
+from infobip_api_client.models.email_ip_pool_create_request import (
+ EmailIpPoolCreateRequest,
+)
+from infobip_api_client.models.email_ip_pool_detail_response import (
+ EmailIpPoolDetailResponse,
+)
+from infobip_api_client.models.email_ip_pool_response import EmailIpPoolResponse
+from infobip_api_client.models.email_ip_response import EmailIpResponse
+from infobip_api_client.models.email_logs_response import EmailLogsResponse
+from infobip_api_client.models.email_reports_result import EmailReportsResult
+from infobip_api_client.models.email_return_path_address_request import (
+ EmailReturnPathAddressRequest,
+)
+from infobip_api_client.models.email_send_response import EmailSendResponse
+from infobip_api_client.models.email_simple_api_response import EmailSimpleApiResponse
+from infobip_api_client.models.email_suppression_info_page_response import (
+ EmailSuppressionInfoPageResponse,
+)
+from infobip_api_client.models.email_tracking_event_request import (
+ EmailTrackingEventRequest,
+)
+from infobip_api_client.models.email_validation_request import EmailValidationRequest
+from infobip_api_client.models.email_validation_response import EmailValidationResponse
+
+from infobip_api_client.api_client import ApiClient, RequestSerialized
+from infobip_api_client.api_response import ApiResponse
+from infobip_api_client.rest import RESTResponseType
+
+
+class EmailApi:
+ """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_domain(
+ self,
+ email_add_domain_request: EmailAddDomainRequest,
+ _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,
+ ) -> EmailDomainResponse:
+ """Add new domain
+
+ This method allows you to add new domains with a limit to create a maximum of 1000 domains in a day.
+
+ :param email_add_domain_request: (required)
+ :type email_add_domain_request: EmailAddDomainRequest
+ :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_domain_serialize(
+ email_add_domain_request=email_add_domain_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "409": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_domain_with_http_info(
+ self,
+ email_add_domain_request: EmailAddDomainRequest,
+ _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[EmailDomainResponse]:
+ """Add new domain
+
+ This method allows you to add new domains with a limit to create a maximum of 1000 domains in a day.
+
+ :param email_add_domain_request: (required)
+ :type email_add_domain_request: EmailAddDomainRequest
+ :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_domain_serialize(
+ email_add_domain_request=email_add_domain_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "409": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_domain_without_preload_content(
+ self,
+ email_add_domain_request: EmailAddDomainRequest,
+ _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 new domain
+
+ This method allows you to add new domains with a limit to create a maximum of 1000 domains in a day.
+
+ :param email_add_domain_request: (required)
+ :type email_add_domain_request: EmailAddDomainRequest
+ :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_domain_serialize(
+ email_add_domain_request=email_add_domain_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "409": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _add_domain_serialize(
+ self,
+ email_add_domain_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 email_add_domain_request is not None:
+ _body_params = email_add_domain_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/email/1/domains",
+ 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_suppressions(
+ self,
+ email_add_suppression_request: EmailAddSuppressionRequest,
+ _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:
+ """Add suppressions
+
+ This method allows you to add email addresses to the suppression list. It accepts suppression requests, saves them asynchronously, and automatically ignores any duplicate entries.
+
+ :param email_add_suppression_request: (required)
+ :type email_add_suppression_request: EmailAddSuppressionRequest
+ :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_suppressions_serialize(
+ email_add_suppression_request=email_add_suppression_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_suppressions_with_http_info(
+ self,
+ email_add_suppression_request: EmailAddSuppressionRequest,
+ _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]:
+ """Add suppressions
+
+ This method allows you to add email addresses to the suppression list. It accepts suppression requests, saves them asynchronously, and automatically ignores any duplicate entries.
+
+ :param email_add_suppression_request: (required)
+ :type email_add_suppression_request: EmailAddSuppressionRequest
+ :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_suppressions_serialize(
+ email_add_suppression_request=email_add_suppression_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_suppressions_without_preload_content(
+ self,
+ email_add_suppression_request: EmailAddSuppressionRequest,
+ _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 suppressions
+
+ This method allows you to add email addresses to the suppression list. It accepts suppression requests, saves them asynchronously, and automatically ignores any duplicate entries.
+
+ :param email_add_suppression_request: (required)
+ :type email_add_suppression_request: EmailAddSuppressionRequest
+ :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_suppressions_serialize(
+ email_add_suppression_request=email_add_suppression_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _add_suppressions_serialize(
+ self,
+ email_add_suppression_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 email_add_suppression_request is not None:
+ _body_params = email_add_suppression_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/email/1/suppressions",
+ 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 assign_ip_to_domain(
+ self,
+ email_domain_ip_request: EmailDomainIpRequest,
+ _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,
+ ) -> EmailSimpleApiResponse:
+ """Assign dedicated ip address to the provided domain for the account id
+
+ Assign dedicated ip address to the provided domain for the account id.
+
+ :param email_domain_ip_request: (required)
+ :type email_domain_ip_request: EmailDomainIpRequest
+ :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._assign_ip_to_domain_serialize(
+ email_domain_ip_request=email_domain_ip_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSimpleApiResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 assign_ip_to_domain_with_http_info(
+ self,
+ email_domain_ip_request: EmailDomainIpRequest,
+ _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[EmailSimpleApiResponse]:
+ """Assign dedicated ip address to the provided domain for the account id
+
+ Assign dedicated ip address to the provided domain for the account id.
+
+ :param email_domain_ip_request: (required)
+ :type email_domain_ip_request: EmailDomainIpRequest
+ :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._assign_ip_to_domain_serialize(
+ email_domain_ip_request=email_domain_ip_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSimpleApiResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 assign_ip_to_domain_without_preload_content(
+ self,
+ email_domain_ip_request: EmailDomainIpRequest,
+ _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:
+ """Assign dedicated ip address to the provided domain for the account id
+
+ Assign dedicated ip address to the provided domain for the account id.
+
+ :param email_domain_ip_request: (required)
+ :type email_domain_ip_request: EmailDomainIpRequest
+ :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._assign_ip_to_domain_serialize(
+ email_domain_ip_request=email_domain_ip_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSimpleApiResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _assign_ip_to_domain_serialize(
+ self,
+ email_domain_ip_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 email_domain_ip_request is not None:
+ _body_params = email_domain_ip_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/email/1/domain-ips",
+ 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 assign_ip_to_pool(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ email_ip_pool_assign_ip_request: EmailIpPoolAssignIpRequest,
+ _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:
+ """Assign IP to pool
+
+ Assign provided dedicated IP to the provided IP pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param email_ip_pool_assign_ip_request: (required)
+ :type email_ip_pool_assign_ip_request: EmailIpPoolAssignIpRequest
+ :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._assign_ip_to_pool_serialize(
+ pool_id=pool_id,
+ email_ip_pool_assign_ip_request=email_ip_pool_assign_ip_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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 assign_ip_to_pool_with_http_info(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ email_ip_pool_assign_ip_request: EmailIpPoolAssignIpRequest,
+ _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]:
+ """Assign IP to pool
+
+ Assign provided dedicated IP to the provided IP pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param email_ip_pool_assign_ip_request: (required)
+ :type email_ip_pool_assign_ip_request: EmailIpPoolAssignIpRequest
+ :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._assign_ip_to_pool_serialize(
+ pool_id=pool_id,
+ email_ip_pool_assign_ip_request=email_ip_pool_assign_ip_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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 assign_ip_to_pool_without_preload_content(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ email_ip_pool_assign_ip_request: EmailIpPoolAssignIpRequest,
+ _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:
+ """Assign IP to pool
+
+ Assign provided dedicated IP to the provided IP pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param email_ip_pool_assign_ip_request: (required)
+ :type email_ip_pool_assign_ip_request: EmailIpPoolAssignIpRequest
+ :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._assign_ip_to_pool_serialize(
+ pool_id=pool_id,
+ email_ip_pool_assign_ip_request=email_ip_pool_assign_ip_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _assign_ip_to_pool_serialize(
+ self,
+ pool_id,
+ email_ip_pool_assign_ip_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if pool_id is not None:
+ _path_params["poolId"] = pool_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if email_ip_pool_assign_ip_request is not None:
+ _body_params = email_ip_pool_assign_ip_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/email/1/ip-management/pools/{poolId}/ips",
+ 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 assign_pool_to_domain(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ email_domain_ip_pool_assign_request: EmailDomainIpPoolAssignRequest,
+ _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:
+ """Assign IP pool to domain
+
+ Assign an IP pool to the provided domain.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_id: int
+ :param email_domain_ip_pool_assign_request: (required)
+ :type email_domain_ip_pool_assign_request: EmailDomainIpPoolAssignRequest
+ :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._assign_pool_to_domain_serialize(
+ domain_id=domain_id,
+ email_domain_ip_pool_assign_request=email_domain_ip_pool_assign_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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 assign_pool_to_domain_with_http_info(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ email_domain_ip_pool_assign_request: EmailDomainIpPoolAssignRequest,
+ _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]:
+ """Assign IP pool to domain
+
+ Assign an IP pool to the provided domain.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_id: int
+ :param email_domain_ip_pool_assign_request: (required)
+ :type email_domain_ip_pool_assign_request: EmailDomainIpPoolAssignRequest
+ :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._assign_pool_to_domain_serialize(
+ domain_id=domain_id,
+ email_domain_ip_pool_assign_request=email_domain_ip_pool_assign_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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 assign_pool_to_domain_without_preload_content(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ email_domain_ip_pool_assign_request: EmailDomainIpPoolAssignRequest,
+ _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:
+ """Assign IP pool to domain
+
+ Assign an IP pool to the provided domain.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_id: int
+ :param email_domain_ip_pool_assign_request: (required)
+ :type email_domain_ip_pool_assign_request: EmailDomainIpPoolAssignRequest
+ :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._assign_pool_to_domain_serialize(
+ domain_id=domain_id,
+ email_domain_ip_pool_assign_request=email_domain_ip_pool_assign_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _assign_pool_to_domain_serialize(
+ self,
+ domain_id,
+ email_domain_ip_pool_assign_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if domain_id is not None:
+ _path_params["domainId"] = domain_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if email_domain_ip_pool_assign_request is not None:
+ _body_params = email_domain_ip_pool_assign_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/email/1/ip-management/domains/{domainId}/pools",
+ 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_ip_pool(
+ self,
+ email_ip_pool_create_request: EmailIpPoolCreateRequest,
+ _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,
+ ) -> EmailIpPoolResponse:
+ """Create IP pool
+
+ Create a new IP pool.
+
+ :param email_ip_pool_create_request: (required)
+ :type email_ip_pool_create_request: EmailIpPoolCreateRequest
+ :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_ip_pool_serialize(
+ email_ip_pool_create_request=email_ip_pool_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "201": "EmailIpPoolResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_pool_with_http_info(
+ self,
+ email_ip_pool_create_request: EmailIpPoolCreateRequest,
+ _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[EmailIpPoolResponse]:
+ """Create IP pool
+
+ Create a new IP pool.
+
+ :param email_ip_pool_create_request: (required)
+ :type email_ip_pool_create_request: EmailIpPoolCreateRequest
+ :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_ip_pool_serialize(
+ email_ip_pool_create_request=email_ip_pool_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "201": "EmailIpPoolResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_pool_without_preload_content(
+ self,
+ email_ip_pool_create_request: EmailIpPoolCreateRequest,
+ _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:
+ """Create IP pool
+
+ Create a new IP pool.
+
+ :param email_ip_pool_create_request: (required)
+ :type email_ip_pool_create_request: EmailIpPoolCreateRequest
+ :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_ip_pool_serialize(
+ email_ip_pool_create_request=email_ip_pool_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "201": "EmailIpPoolResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _create_ip_pool_serialize(
+ self,
+ email_ip_pool_create_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 email_ip_pool_create_request is not None:
+ _body_params = email_ip_pool_create_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/email/1/ip-management/pools",
+ 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_domain(
+ self,
+ domain_name: Annotated[
+ StrictStr, Field(description="Domain name which needs to be 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,
+ ) -> None:
+ """Delete existing domain
+
+ This method allows you to delete an existing domain.
+
+ :param domain_name: Domain name which needs to be deleted. (required)
+ :type domain_name: 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_domain_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_domain_with_http_info(
+ self,
+ domain_name: Annotated[
+ StrictStr, Field(description="Domain name which needs to be 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[None]:
+ """Delete existing domain
+
+ This method allows you to delete an existing domain.
+
+ :param domain_name: Domain name which needs to be deleted. (required)
+ :type domain_name: 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_domain_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_domain_without_preload_content(
+ self,
+ domain_name: Annotated[
+ StrictStr, Field(description="Domain name which needs to be 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 existing domain
+
+ This method allows you to delete an existing domain.
+
+ :param domain_name: Domain name which needs to be deleted. (required)
+ :type domain_name: 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_domain_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _delete_domain_serialize(
+ self,
+ domain_name,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if domain_name is not None:
+ _path_params["domainName"] = domain_name
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="DELETE",
+ resource_path="/email/1/domains/{domainName}",
+ 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_ip_pool(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ _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 IP pool
+
+ Delete provided IP pool. Deleting an IP pool also deletes any assigned IPs and any assignments to domains.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_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_ip_pool_serialize(
+ pool_id=pool_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_pool_with_http_info(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ _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 IP pool
+
+ Delete provided IP pool. Deleting an IP pool also deletes any assigned IPs and any assignments to domains.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_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_ip_pool_serialize(
+ pool_id=pool_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_pool_without_preload_content(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ _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 IP pool
+
+ Delete provided IP pool. Deleting an IP pool also deletes any assigned IPs and any assignments to domains.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_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_ip_pool_serialize(
+ pool_id=pool_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _delete_ip_pool_serialize(
+ self,
+ pool_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if pool_id is not None:
+ _path_params["poolId"] = pool_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="DELETE",
+ resource_path="/email/1/ip-management/pools/{poolId}",
+ 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_suppressions(
+ self,
+ email_delete_suppression_request: EmailDeleteSuppressionRequest,
+ _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 suppressions
+
+ This method allows you to delete email addresses from the suppression list. It accepts delete suppression requests and asynchronously deletes them.
+
+ :param email_delete_suppression_request: (required)
+ :type email_delete_suppression_request: EmailDeleteSuppressionRequest
+ :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_suppressions_serialize(
+ email_delete_suppression_request=email_delete_suppression_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_suppressions_with_http_info(
+ self,
+ email_delete_suppression_request: EmailDeleteSuppressionRequest,
+ _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 suppressions
+
+ This method allows you to delete email addresses from the suppression list. It accepts delete suppression requests and asynchronously deletes them.
+
+ :param email_delete_suppression_request: (required)
+ :type email_delete_suppression_request: EmailDeleteSuppressionRequest
+ :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_suppressions_serialize(
+ email_delete_suppression_request=email_delete_suppression_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_suppressions_without_preload_content(
+ self,
+ email_delete_suppression_request: EmailDeleteSuppressionRequest,
+ _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 suppressions
+
+ This method allows you to delete email addresses from the suppression list. It accepts delete suppression requests and asynchronously deletes them.
+
+ :param email_delete_suppression_request: (required)
+ :type email_delete_suppression_request: EmailDeleteSuppressionRequest
+ :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_suppressions_serialize(
+ email_delete_suppression_request=email_delete_suppression_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _delete_suppressions_serialize(
+ self,
+ email_delete_suppression_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 email_delete_suppression_request is not None:
+ _body_params = email_delete_suppression_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="DELETE",
+ resource_path="/email/1/suppressions",
+ 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_domain_ips(
+ self,
+ domain_name: Annotated[StrictStr, Field(description="Name of the domain.")],
+ _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,
+ ) -> EmailDomainIpResponse:
+ """List all dedicated ips for domain and for provided account id
+
+ Fetch all dedicated ips for domain and provided account id.
+
+ :param domain_name: Name of the domain. (required)
+ :type domain_name: 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_domain_ips_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainIpResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_domain_ips_with_http_info(
+ self,
+ domain_name: Annotated[StrictStr, Field(description="Name of the domain.")],
+ _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[EmailDomainIpResponse]:
+ """List all dedicated ips for domain and for provided account id
+
+ Fetch all dedicated ips for domain and provided account id.
+
+ :param domain_name: Name of the domain. (required)
+ :type domain_name: 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_domain_ips_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainIpResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_domain_ips_without_preload_content(
+ self,
+ domain_name: Annotated[StrictStr, Field(description="Name of the domain.")],
+ _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:
+ """List all dedicated ips for domain and for provided account id
+
+ Fetch all dedicated ips for domain and provided account id.
+
+ :param domain_name: Name of the domain. (required)
+ :type domain_name: 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_domain_ips_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainIpResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_all_domain_ips_serialize(
+ self,
+ domain_name,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if domain_name is not None:
+
+ _query_params.append(("domainName", domain_name))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/domain-ips",
+ 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_domains(
+ self,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=20, strict=True, ge=1)]],
+ Field(
+ description="Maximum number of domains to be viewed per page. Default value is 10 with a maximum of 20 records per page."
+ ),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Page number you want to see. Default is 0."),
+ ] = 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,
+ ) -> EmailAllDomainsResponse:
+ """Get all domains for the account
+
+ This API is to get all domain associated with the account. It also provides details of the retrieved domain like the DNS records, Tracking details, Active/Blocked status,etc.
+
+ :param size: Maximum number of domains to be viewed per page. Default value is 10 with a maximum of 20 records per page.
+ :type size: int
+ :param page: Page number you want to see. Default is 0.
+ :type page: 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_all_domains_serialize(
+ size=size,
+ page=page,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailAllDomainsResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_domains_with_http_info(
+ self,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=20, strict=True, ge=1)]],
+ Field(
+ description="Maximum number of domains to be viewed per page. Default value is 10 with a maximum of 20 records per page."
+ ),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Page number you want to see. Default is 0."),
+ ] = 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[EmailAllDomainsResponse]:
+ """Get all domains for the account
+
+ This API is to get all domain associated with the account. It also provides details of the retrieved domain like the DNS records, Tracking details, Active/Blocked status,etc.
+
+ :param size: Maximum number of domains to be viewed per page. Default value is 10 with a maximum of 20 records per page.
+ :type size: int
+ :param page: Page number you want to see. Default is 0.
+ :type page: 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_all_domains_serialize(
+ size=size,
+ page=page,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailAllDomainsResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_domains_without_preload_content(
+ self,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=20, strict=True, ge=1)]],
+ Field(
+ description="Maximum number of domains to be viewed per page. Default value is 10 with a maximum of 20 records per page."
+ ),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Page number you want to see. Default is 0."),
+ ] = 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 domains for the account
+
+ This API is to get all domain associated with the account. It also provides details of the retrieved domain like the DNS records, Tracking details, Active/Blocked status,etc.
+
+ :param size: Maximum number of domains to be viewed per page. Default value is 10 with a maximum of 20 records per page.
+ :type size: int
+ :param page: Page number you want to see. Default is 0.
+ :type page: 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_all_domains_serialize(
+ size=size,
+ page=page,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailAllDomainsResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_all_domains_serialize(
+ self,
+ size,
+ page,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if size is not None:
+
+ _query_params.append(("size", size))
+
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/domains",
+ 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_ips(
+ 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,
+ ) -> EmailDomainIpResponse:
+ """List all dedicated ips for provided account id
+
+ Fetch all dedicated ips for the provided account id.
+
+ :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_ips_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainIpResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_ips_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[EmailDomainIpResponse]:
+ """List all dedicated ips for provided account id
+
+ Fetch all dedicated ips for the provided account id.
+
+ :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_ips_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainIpResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_ips_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:
+ """List all dedicated ips for provided account id
+
+ Fetch all dedicated ips for the provided account id.
+
+ :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_ips_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainIpResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_all_ips_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/ips",
+ 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_ips_management(
+ 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[EmailIpResponse]:
+ """Get IPs
+
+ Returns all the dedicated IP addresses owned by this 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_all_ips_management_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[EmailIpResponse]",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ips_management_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[EmailIpResponse]]:
+ """Get IPs
+
+ Returns all the dedicated IP addresses owned by this 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_all_ips_management_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[EmailIpResponse]",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ips_management_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 IPs
+
+ Returns all the dedicated IP addresses owned by this 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_all_ips_management_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[EmailIpResponse]",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_all_ips_management_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/ip-management/ips",
+ 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_domain_details(
+ self,
+ domain_name: Annotated[
+ StrictStr,
+ Field(description="Domain for which the details need to be viewed."),
+ ],
+ _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,
+ ) -> EmailDomainResponse:
+ """Get domain details
+
+ This API provides with the details of the domain like the DNS records, Tracking details, Active/Blocked status,etc.
+
+ :param domain_name: Domain for which the details need to be viewed. (required)
+ :type domain_name: 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_domain_details_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_domain_details_with_http_info(
+ self,
+ domain_name: Annotated[
+ StrictStr,
+ Field(description="Domain for which the details need to be viewed."),
+ ],
+ _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[EmailDomainResponse]:
+ """Get domain details
+
+ This API provides with the details of the domain like the DNS records, Tracking details, Active/Blocked status,etc.
+
+ :param domain_name: Domain for which the details need to be viewed. (required)
+ :type domain_name: 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_domain_details_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_domain_details_without_preload_content(
+ self,
+ domain_name: Annotated[
+ StrictStr,
+ Field(description="Domain for which the details need to be viewed."),
+ ],
+ _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 domain details
+
+ This API provides with the details of the domain like the DNS records, Tracking details, Active/Blocked status,etc.
+
+ :param domain_name: Domain for which the details need to be viewed. (required)
+ :type domain_name: 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_domain_details_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_domain_details_serialize(
+ self,
+ domain_name,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if domain_name is not None:
+ _path_params["domainName"] = domain_name
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/domains/{domainName}",
+ 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_domains(
+ self,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Requested page number."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
+ Field(description="Requested page size."),
+ ] = 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,
+ ) -> EmailDomainInfoPageResponse:
+ """Get suppression domains
+
+ This method allows you to get domains that can be managed for suppressions and are either owned or have granted permissions.
+
+ :param page: Requested page number.
+ :type page: int
+ :param size: Requested page size.
+ :type size: 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_domains_serialize(
+ page=page,
+ size=size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainInfoPageResponse",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_domains_with_http_info(
+ self,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Requested page number."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
+ Field(description="Requested page size."),
+ ] = 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[EmailDomainInfoPageResponse]:
+ """Get suppression domains
+
+ This method allows you to get domains that can be managed for suppressions and are either owned or have granted permissions.
+
+ :param page: Requested page number.
+ :type page: int
+ :param size: Requested page size.
+ :type size: 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_domains_serialize(
+ page=page,
+ size=size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainInfoPageResponse",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_domains_without_preload_content(
+ self,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Requested page number."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
+ Field(description="Requested page size."),
+ ] = 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 suppression domains
+
+ This method allows you to get domains that can be managed for suppressions and are either owned or have granted permissions.
+
+ :param page: Requested page number.
+ :type page: int
+ :param size: Requested page size.
+ :type size: 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_domains_serialize(
+ page=page,
+ size=size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainInfoPageResponse",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_domains_serialize(
+ self,
+ page,
+ size,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ if size is not None:
+
+ _query_params.append(("size", size))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/suppressions/domains",
+ 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_delivery_reports(
+ self,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(description="Bulk ID for which report is requested."),
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(description="The ID that uniquely identifies the sent email."),
+ ] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns."
+ ),
+ ] = None,
+ limit: Annotated[
+ Optional[Annotated[int, Field(le=1000, strict=True)]],
+ Field(description="Maximum number of reports."),
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering."
+ ),
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering."
+ ),
+ ] = 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,
+ ) -> EmailReportsResult:
+ """Email delivery reports
+
+ Get one-time delivery reports for all sent emails.
+
+ :param bulk_id: Bulk ID for which report is requested.
+ :type bulk_id: str
+ :param message_id: The ID that uniquely identifies the sent email.
+ :type message_id: str
+ :param campaign_reference_id: The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns.
+ :type campaign_reference_id: str
+ :param limit: Maximum number of reports.
+ :type limit: int
+ :param application_id: [Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering.
+ :type application_id: str
+ :param entity_id: [Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering.
+ :type entity_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_delivery_reports_serialize(
+ bulk_id=bulk_id,
+ message_id=message_id,
+ campaign_reference_id=campaign_reference_id,
+ limit=limit,
+ application_id=application_id,
+ entity_id=entity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailReportsResult",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_delivery_reports_with_http_info(
+ self,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(description="Bulk ID for which report is requested."),
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(description="The ID that uniquely identifies the sent email."),
+ ] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns."
+ ),
+ ] = None,
+ limit: Annotated[
+ Optional[Annotated[int, Field(le=1000, strict=True)]],
+ Field(description="Maximum number of reports."),
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering."
+ ),
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering."
+ ),
+ ] = 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[EmailReportsResult]:
+ """Email delivery reports
+
+ Get one-time delivery reports for all sent emails.
+
+ :param bulk_id: Bulk ID for which report is requested.
+ :type bulk_id: str
+ :param message_id: The ID that uniquely identifies the sent email.
+ :type message_id: str
+ :param campaign_reference_id: The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns.
+ :type campaign_reference_id: str
+ :param limit: Maximum number of reports.
+ :type limit: int
+ :param application_id: [Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering.
+ :type application_id: str
+ :param entity_id: [Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering.
+ :type entity_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_delivery_reports_serialize(
+ bulk_id=bulk_id,
+ message_id=message_id,
+ campaign_reference_id=campaign_reference_id,
+ limit=limit,
+ application_id=application_id,
+ entity_id=entity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailReportsResult",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_delivery_reports_without_preload_content(
+ self,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(description="Bulk ID for which report is requested."),
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(description="The ID that uniquely identifies the sent email."),
+ ] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns."
+ ),
+ ] = None,
+ limit: Annotated[
+ Optional[Annotated[int, Field(le=1000, strict=True)]],
+ Field(description="Maximum number of reports."),
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering."
+ ),
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering."
+ ),
+ ] = 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:
+ """Email delivery reports
+
+ Get one-time delivery reports for all sent emails.
+
+ :param bulk_id: Bulk ID for which report is requested.
+ :type bulk_id: str
+ :param message_id: The ID that uniquely identifies the sent email.
+ :type message_id: str
+ :param campaign_reference_id: The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns.
+ :type campaign_reference_id: str
+ :param limit: Maximum number of reports.
+ :type limit: int
+ :param application_id: [Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering.
+ :type application_id: str
+ :param entity_id: [Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering.
+ :type entity_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_delivery_reports_serialize(
+ bulk_id=bulk_id,
+ message_id=message_id,
+ campaign_reference_id=campaign_reference_id,
+ limit=limit,
+ application_id=application_id,
+ entity_id=entity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailReportsResult",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_email_delivery_reports_serialize(
+ self,
+ bulk_id,
+ message_id,
+ campaign_reference_id,
+ limit,
+ application_id,
+ entity_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ if message_id is not None:
+
+ _query_params.append(("messageId", message_id))
+
+ if campaign_reference_id is not None:
+
+ _query_params.append(("campaignReferenceId", campaign_reference_id))
+
+ if limit is not None:
+
+ _query_params.append(("limit", limit))
+
+ if application_id is not None:
+
+ _query_params.append(("applicationId", application_id))
+
+ if entity_id is not None:
+
+ _query_params.append(("entityId", entity_id))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/reports",
+ 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_logs(
+ self,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(description="The ID that uniquely identifies the sent email."),
+ ] = None,
+ var_from: Annotated[
+ Optional[StrictStr], Field(description="From email address.")
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr], Field(description="The recipient email address.")
+ ] = None,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(description="Bulk ID that uniquely identifies the request."),
+ ] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns."
+ ),
+ ] = None,
+ general_status: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Indicates whether the initiated email has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status."
+ ),
+ ] = None,
+ sent_since: Annotated[
+ Optional[datetime],
+ Field(
+ description="Tells when the email was initiated. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ ),
+ ] = None,
+ sent_until: Annotated[
+ Optional[datetime],
+ Field(
+ description="Tells when the email request was processed by Infobip.Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ ),
+ ] = None,
+ limit: Annotated[
+ Optional[Annotated[int, Field(le=1000, strict=True)]],
+ Field(description="Maximum number of logs."),
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering."
+ ),
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering."
+ ),
+ ] = 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,
+ ) -> EmailLogsResponse:
+ """Get email logs
+
+ This method allows you to get logs for sent emails using their messageId. Email logs are available for the last 48 hours.
+
+ :param message_id: The ID that uniquely identifies the sent email.
+ :type message_id: str
+ :param var_from: From email address.
+ :type var_from: str
+ :param to: The recipient email address.
+ :type to: str
+ :param bulk_id: Bulk ID that uniquely identifies the request.
+ :type bulk_id: str
+ :param campaign_reference_id: The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns.
+ :type campaign_reference_id: str
+ :param general_status: Indicates whether the initiated email has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.
+ :type general_status: str
+ :param sent_since: Tells when the email was initiated. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :type sent_since: datetime
+ :param sent_until: Tells when the email request was processed by Infobip.Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :type sent_until: datetime
+ :param limit: Maximum number of logs.
+ :type limit: int
+ :param application_id: [Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering.
+ :type application_id: str
+ :param entity_id: [Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering.
+ :type entity_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_logs_serialize(
+ message_id=message_id,
+ var_from=var_from,
+ to=to,
+ bulk_id=bulk_id,
+ campaign_reference_id=campaign_reference_id,
+ general_status=general_status,
+ sent_since=sent_since,
+ sent_until=sent_until,
+ limit=limit,
+ application_id=application_id,
+ entity_id=entity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailLogsResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_logs_with_http_info(
+ self,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(description="The ID that uniquely identifies the sent email."),
+ ] = None,
+ var_from: Annotated[
+ Optional[StrictStr], Field(description="From email address.")
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr], Field(description="The recipient email address.")
+ ] = None,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(description="Bulk ID that uniquely identifies the request."),
+ ] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns."
+ ),
+ ] = None,
+ general_status: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Indicates whether the initiated email has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status."
+ ),
+ ] = None,
+ sent_since: Annotated[
+ Optional[datetime],
+ Field(
+ description="Tells when the email was initiated. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ ),
+ ] = None,
+ sent_until: Annotated[
+ Optional[datetime],
+ Field(
+ description="Tells when the email request was processed by Infobip.Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ ),
+ ] = None,
+ limit: Annotated[
+ Optional[Annotated[int, Field(le=1000, strict=True)]],
+ Field(description="Maximum number of logs."),
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering."
+ ),
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering."
+ ),
+ ] = 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[EmailLogsResponse]:
+ """Get email logs
+
+ This method allows you to get logs for sent emails using their messageId. Email logs are available for the last 48 hours.
+
+ :param message_id: The ID that uniquely identifies the sent email.
+ :type message_id: str
+ :param var_from: From email address.
+ :type var_from: str
+ :param to: The recipient email address.
+ :type to: str
+ :param bulk_id: Bulk ID that uniquely identifies the request.
+ :type bulk_id: str
+ :param campaign_reference_id: The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns.
+ :type campaign_reference_id: str
+ :param general_status: Indicates whether the initiated email has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.
+ :type general_status: str
+ :param sent_since: Tells when the email was initiated. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :type sent_since: datetime
+ :param sent_until: Tells when the email request was processed by Infobip.Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :type sent_until: datetime
+ :param limit: Maximum number of logs.
+ :type limit: int
+ :param application_id: [Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering.
+ :type application_id: str
+ :param entity_id: [Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering.
+ :type entity_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_logs_serialize(
+ message_id=message_id,
+ var_from=var_from,
+ to=to,
+ bulk_id=bulk_id,
+ campaign_reference_id=campaign_reference_id,
+ general_status=general_status,
+ sent_since=sent_since,
+ sent_until=sent_until,
+ limit=limit,
+ application_id=application_id,
+ entity_id=entity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailLogsResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_logs_without_preload_content(
+ self,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(description="The ID that uniquely identifies the sent email."),
+ ] = None,
+ var_from: Annotated[
+ Optional[StrictStr], Field(description="From email address.")
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr], Field(description="The recipient email address.")
+ ] = None,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(description="Bulk ID that uniquely identifies the request."),
+ ] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns."
+ ),
+ ] = None,
+ general_status: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Indicates whether the initiated email has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status."
+ ),
+ ] = None,
+ sent_since: Annotated[
+ Optional[datetime],
+ Field(
+ description="Tells when the email was initiated. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ ),
+ ] = None,
+ sent_until: Annotated[
+ Optional[datetime],
+ Field(
+ description="Tells when the email request was processed by Infobip.Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ ),
+ ] = None,
+ limit: Annotated[
+ Optional[Annotated[int, Field(le=1000, strict=True)]],
+ Field(description="Maximum number of logs."),
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering."
+ ),
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="[Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering."
+ ),
+ ] = 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 email logs
+
+ This method allows you to get logs for sent emails using their messageId. Email logs are available for the last 48 hours.
+
+ :param message_id: The ID that uniquely identifies the sent email.
+ :type message_id: str
+ :param var_from: From email address.
+ :type var_from: str
+ :param to: The recipient email address.
+ :type to: str
+ :param bulk_id: Bulk ID that uniquely identifies the request.
+ :type bulk_id: str
+ :param campaign_reference_id: The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns.
+ :type campaign_reference_id: str
+ :param general_status: Indicates whether the initiated email has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.
+ :type general_status: str
+ :param sent_since: Tells when the email was initiated. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :type sent_since: datetime
+ :param sent_until: Tells when the email request was processed by Infobip.Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :type sent_until: datetime
+ :param limit: Maximum number of logs.
+ :type limit: int
+ :param application_id: [Application](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#application) identifier used for filtering.
+ :type application_id: str
+ :param entity_id: [Entity](https://www.infobip.com/docs/cpaas-x/application-and-entity-management#entity) identifier used for filtering.
+ :type entity_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_logs_serialize(
+ message_id=message_id,
+ var_from=var_from,
+ to=to,
+ bulk_id=bulk_id,
+ campaign_reference_id=campaign_reference_id,
+ general_status=general_status,
+ sent_since=sent_since,
+ sent_until=sent_until,
+ limit=limit,
+ application_id=application_id,
+ entity_id=entity_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailLogsResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_email_logs_serialize(
+ self,
+ message_id,
+ var_from,
+ to,
+ bulk_id,
+ campaign_reference_id,
+ general_status,
+ sent_since,
+ sent_until,
+ limit,
+ application_id,
+ entity_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if message_id is not None:
+
+ _query_params.append(("messageId", message_id))
+
+ if var_from is not None:
+
+ _query_params.append(("from", var_from))
+
+ if to is not None:
+
+ _query_params.append(("to", to))
+
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ if campaign_reference_id is not None:
+
+ _query_params.append(("campaignReferenceId", campaign_reference_id))
+
+ if general_status is not None:
+
+ _query_params.append(("generalStatus", general_status))
+
+ if sent_since is not None:
+ if isinstance(sent_since, datetime):
+ _query_params.append(
+ (
+ "sentSince",
+ sent_since.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("sentSince", sent_since))
+
+ if sent_until is not None:
+ if isinstance(sent_until, datetime):
+ _query_params.append(
+ (
+ "sentUntil",
+ sent_until.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("sentUntil", sent_until))
+
+ if limit is not None:
+
+ _query_params.append(("limit", limit))
+
+ if application_id is not None:
+
+ _query_params.append(("applicationId", application_id))
+
+ if entity_id is not None:
+
+ _query_params.append(("entityId", entity_id))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/logs",
+ 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_ip_details(
+ self,
+ ip_id: Annotated[StrictStr, Field(description="Dedicated IP identifier.")],
+ _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,
+ ) -> EmailIpDetailResponse:
+ """Get IP
+
+ Get detailed information about provided dedicated IP.
+
+ :param ip_id: Dedicated IP identifier. (required)
+ :type ip_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_ip_details_serialize(
+ ip_id=ip_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpDetailResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_details_with_http_info(
+ self,
+ ip_id: Annotated[StrictStr, Field(description="Dedicated IP identifier.")],
+ _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[EmailIpDetailResponse]:
+ """Get IP
+
+ Get detailed information about provided dedicated IP.
+
+ :param ip_id: Dedicated IP identifier. (required)
+ :type ip_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_ip_details_serialize(
+ ip_id=ip_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpDetailResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_details_without_preload_content(
+ self,
+ ip_id: Annotated[StrictStr, Field(description="Dedicated IP identifier.")],
+ _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 IP
+
+ Get detailed information about provided dedicated IP.
+
+ :param ip_id: Dedicated IP identifier. (required)
+ :type ip_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_ip_details_serialize(
+ ip_id=ip_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpDetailResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_ip_details_serialize(
+ self,
+ ip_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if ip_id is not None:
+ _path_params["ipId"] = ip_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/ip-management/ips/{ipId}",
+ 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_ip_domain(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ _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,
+ ) -> EmailIpDomainResponse:
+ """Get domain
+
+ Get detailed information for provided domain such as assigned pools and their IPs.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_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_ip_domain_serialize(
+ domain_id=domain_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpDomainResponse",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_domain_with_http_info(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ _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[EmailIpDomainResponse]:
+ """Get domain
+
+ Get detailed information for provided domain such as assigned pools and their IPs.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_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_ip_domain_serialize(
+ domain_id=domain_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpDomainResponse",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_domain_without_preload_content(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ _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 domain
+
+ Get detailed information for provided domain such as assigned pools and their IPs.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_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_ip_domain_serialize(
+ domain_id=domain_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpDomainResponse",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_ip_domain_serialize(
+ self,
+ domain_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if domain_id is not None:
+ _path_params["domainId"] = domain_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/ip-management/domains/{domainId}",
+ 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_ip_pool(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ _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,
+ ) -> EmailIpPoolDetailResponse:
+ """Get IP pool
+
+ Get detailed information about a provided IP pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_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_ip_pool_serialize(
+ pool_id=pool_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpPoolDetailResponse",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_pool_with_http_info(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ _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[EmailIpPoolDetailResponse]:
+ """Get IP pool
+
+ Get detailed information about a provided IP pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_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_ip_pool_serialize(
+ pool_id=pool_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpPoolDetailResponse",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_pool_without_preload_content(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ _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 IP pool
+
+ Get detailed information about a provided IP pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_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_ip_pool_serialize(
+ pool_id=pool_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpPoolDetailResponse",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_ip_pool_serialize(
+ self,
+ pool_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if pool_id is not None:
+ _path_params["poolId"] = pool_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/ip-management/pools/{poolId}",
+ 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_ip_pools(
+ self,
+ name: Annotated[
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]],
+ Field(description="IP pool name."),
+ ] = 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[EmailIpPoolResponse]:
+ """Get IP pools
+
+ Returns all the pools that are owned (created) by this account.
+
+ :param name: IP pool name.
+ :type name: 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_ip_pools_serialize(
+ name=name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[EmailIpPoolResponse]",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_pools_with_http_info(
+ self,
+ name: Annotated[
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]],
+ Field(description="IP pool name."),
+ ] = 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[EmailIpPoolResponse]]:
+ """Get IP pools
+
+ Returns all the pools that are owned (created) by this account.
+
+ :param name: IP pool name.
+ :type name: 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_ip_pools_serialize(
+ name=name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[EmailIpPoolResponse]",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_pools_without_preload_content(
+ self,
+ name: Annotated[
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]],
+ Field(description="IP pool name."),
+ ] = 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 IP pools
+
+ Returns all the pools that are owned (created) by this account.
+
+ :param name: IP pool name.
+ :type name: 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_ip_pools_serialize(
+ name=name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[EmailIpPoolResponse]",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_ip_pools_serialize(
+ self,
+ name,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if name is not None:
+
+ _query_params.append(("name", name))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/ip-management/pools",
+ 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_scheduled_email_statuses(
+ self,
+ bulk_id: Annotated[
+ StrictStr,
+ Field(description="The ID uniquely identifies the sent email request."),
+ ],
+ _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,
+ ) -> EmailBulkStatusResponse:
+ """Get sent email bulks status
+
+ See the status of scheduled email messages.
+
+ :param bulk_id: The ID uniquely identifies the sent email request. (required)
+ :type bulk_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_scheduled_email_statuses_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkStatusResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_scheduled_email_statuses_with_http_info(
+ self,
+ bulk_id: Annotated[
+ StrictStr,
+ Field(description="The ID uniquely identifies the sent email request."),
+ ],
+ _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[EmailBulkStatusResponse]:
+ """Get sent email bulks status
+
+ See the status of scheduled email messages.
+
+ :param bulk_id: The ID uniquely identifies the sent email request. (required)
+ :type bulk_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_scheduled_email_statuses_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkStatusResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_scheduled_email_statuses_without_preload_content(
+ self,
+ bulk_id: Annotated[
+ StrictStr,
+ Field(description="The ID uniquely identifies the sent email request."),
+ ],
+ _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 sent email bulks status
+
+ See the status of scheduled email messages.
+
+ :param bulk_id: The ID uniquely identifies the sent email request. (required)
+ :type bulk_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_scheduled_email_statuses_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkStatusResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_scheduled_email_statuses_serialize(
+ self,
+ bulk_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/bulks/status",
+ 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_scheduled_emails(
+ self,
+ bulk_id: Annotated[
+ StrictStr,
+ Field(description="The ID uniquely identifies the sent email request."),
+ ],
+ _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,
+ ) -> EmailBulkScheduleResponse:
+ """Get sent email bulks
+
+ See the scheduled time of your Email messages.
+
+ :param bulk_id: The ID uniquely identifies the sent email request. (required)
+ :type bulk_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_scheduled_emails_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkScheduleResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_scheduled_emails_with_http_info(
+ self,
+ bulk_id: Annotated[
+ StrictStr,
+ Field(description="The ID uniquely identifies the sent email request."),
+ ],
+ _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[EmailBulkScheduleResponse]:
+ """Get sent email bulks
+
+ See the scheduled time of your Email messages.
+
+ :param bulk_id: The ID uniquely identifies the sent email request. (required)
+ :type bulk_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_scheduled_emails_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkScheduleResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_scheduled_emails_without_preload_content(
+ self,
+ bulk_id: Annotated[
+ StrictStr,
+ Field(description="The ID uniquely identifies the sent email request."),
+ ],
+ _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 sent email bulks
+
+ See the scheduled time of your Email messages.
+
+ :param bulk_id: The ID uniquely identifies the sent email request. (required)
+ :type bulk_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_scheduled_emails_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkScheduleResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_scheduled_emails_serialize(
+ self,
+ bulk_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/bulks",
+ 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_suppressions(
+ self,
+ domain_name: Annotated[
+ StrictStr, Field(description="Name of the requested domain.")
+ ],
+ type: Annotated[
+ EmailGetSuppressionType, Field(description="Type of suppression.")
+ ],
+ email_address: Annotated[
+ Optional[StrictStr], Field(description="Email address that is suppressed.")
+ ] = None,
+ recipient_domain: Annotated[
+ Optional[StrictStr],
+ Field(description="Recipient domain that is suppressed."),
+ ] = None,
+ created_date_from: Annotated[
+ Optional[datetime],
+ Field(description="Start date for searching suppressions."),
+ ] = None,
+ created_date_to: Annotated[
+ Optional[datetime],
+ Field(description="End date for searching suppressions."),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Requested page number."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
+ Field(description="Requested page size."),
+ ] = 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,
+ ) -> EmailSuppressionInfoPageResponse:
+ """Get suppressions
+
+ This method retrieves the suppressions for domains that are owned or have permissions granted.
+
+ :param domain_name: Name of the requested domain. (required)
+ :type domain_name: str
+ :param type: Type of suppression. (required)
+ :type type: EmailGetSuppressionType
+ :param email_address: Email address that is suppressed.
+ :type email_address: str
+ :param recipient_domain: Recipient domain that is suppressed.
+ :type recipient_domain: str
+ :param created_date_from: Start date for searching suppressions.
+ :type created_date_from: datetime
+ :param created_date_to: End date for searching suppressions.
+ :type created_date_to: datetime
+ :param page: Requested page number.
+ :type page: int
+ :param size: Requested page size.
+ :type size: 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_suppressions_serialize(
+ domain_name=domain_name,
+ type=type,
+ email_address=email_address,
+ recipient_domain=recipient_domain,
+ created_date_from=created_date_from,
+ created_date_to=created_date_to,
+ page=page,
+ size=size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSuppressionInfoPageResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_suppressions_with_http_info(
+ self,
+ domain_name: Annotated[
+ StrictStr, Field(description="Name of the requested domain.")
+ ],
+ type: Annotated[
+ EmailGetSuppressionType, Field(description="Type of suppression.")
+ ],
+ email_address: Annotated[
+ Optional[StrictStr], Field(description="Email address that is suppressed.")
+ ] = None,
+ recipient_domain: Annotated[
+ Optional[StrictStr],
+ Field(description="Recipient domain that is suppressed."),
+ ] = None,
+ created_date_from: Annotated[
+ Optional[datetime],
+ Field(description="Start date for searching suppressions."),
+ ] = None,
+ created_date_to: Annotated[
+ Optional[datetime],
+ Field(description="End date for searching suppressions."),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Requested page number."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
+ Field(description="Requested page size."),
+ ] = 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[EmailSuppressionInfoPageResponse]:
+ """Get suppressions
+
+ This method retrieves the suppressions for domains that are owned or have permissions granted.
+
+ :param domain_name: Name of the requested domain. (required)
+ :type domain_name: str
+ :param type: Type of suppression. (required)
+ :type type: EmailGetSuppressionType
+ :param email_address: Email address that is suppressed.
+ :type email_address: str
+ :param recipient_domain: Recipient domain that is suppressed.
+ :type recipient_domain: str
+ :param created_date_from: Start date for searching suppressions.
+ :type created_date_from: datetime
+ :param created_date_to: End date for searching suppressions.
+ :type created_date_to: datetime
+ :param page: Requested page number.
+ :type page: int
+ :param size: Requested page size.
+ :type size: 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_suppressions_serialize(
+ domain_name=domain_name,
+ type=type,
+ email_address=email_address,
+ recipient_domain=recipient_domain,
+ created_date_from=created_date_from,
+ created_date_to=created_date_to,
+ page=page,
+ size=size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSuppressionInfoPageResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_suppressions_without_preload_content(
+ self,
+ domain_name: Annotated[
+ StrictStr, Field(description="Name of the requested domain.")
+ ],
+ type: Annotated[
+ EmailGetSuppressionType, Field(description="Type of suppression.")
+ ],
+ email_address: Annotated[
+ Optional[StrictStr], Field(description="Email address that is suppressed.")
+ ] = None,
+ recipient_domain: Annotated[
+ Optional[StrictStr],
+ Field(description="Recipient domain that is suppressed."),
+ ] = None,
+ created_date_from: Annotated[
+ Optional[datetime],
+ Field(description="Start date for searching suppressions."),
+ ] = None,
+ created_date_to: Annotated[
+ Optional[datetime],
+ Field(description="End date for searching suppressions."),
+ ] = None,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
+ Field(description="Requested page number."),
+ ] = None,
+ size: Annotated[
+ Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
+ Field(description="Requested page size."),
+ ] = 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 suppressions
+
+ This method retrieves the suppressions for domains that are owned or have permissions granted.
+
+ :param domain_name: Name of the requested domain. (required)
+ :type domain_name: str
+ :param type: Type of suppression. (required)
+ :type type: EmailGetSuppressionType
+ :param email_address: Email address that is suppressed.
+ :type email_address: str
+ :param recipient_domain: Recipient domain that is suppressed.
+ :type recipient_domain: str
+ :param created_date_from: Start date for searching suppressions.
+ :type created_date_from: datetime
+ :param created_date_to: End date for searching suppressions.
+ :type created_date_to: datetime
+ :param page: Requested page number.
+ :type page: int
+ :param size: Requested page size.
+ :type size: 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_suppressions_serialize(
+ domain_name=domain_name,
+ type=type,
+ email_address=email_address,
+ recipient_domain=recipient_domain,
+ created_date_from=created_date_from,
+ created_date_to=created_date_to,
+ page=page,
+ size=size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSuppressionInfoPageResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_suppressions_serialize(
+ self,
+ domain_name,
+ type,
+ email_address,
+ recipient_domain,
+ created_date_from,
+ created_date_to,
+ page,
+ size,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if domain_name is not None:
+
+ _query_params.append(("domainName", domain_name))
+
+ if type is not None:
+
+ _query_params.append(("type", type.value))
+
+ if email_address is not None:
+
+ _query_params.append(("emailAddress", email_address))
+
+ if recipient_domain is not None:
+
+ _query_params.append(("recipientDomain", recipient_domain))
+
+ if created_date_from is not None:
+ if isinstance(created_date_from, datetime):
+ _query_params.append(
+ (
+ "createdDateFrom",
+ created_date_from.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("createdDateFrom", created_date_from))
+
+ if created_date_to is not None:
+ if isinstance(created_date_to, datetime):
+ _query_params.append(
+ (
+ "createdDateTo",
+ created_date_to.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("createdDateTo", created_date_to))
+
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ if size is not None:
+
+ _query_params.append(("size", size))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/email/1/suppressions",
+ 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 remove_ip_from_domain(
+ self,
+ domain_name: Annotated[StrictStr, Field(description="Name of the domain.")],
+ ip_address: Annotated[StrictStr, Field(description="Dedicated ip 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,
+ ) -> EmailSimpleApiResponse:
+ """Remove dedicated ip address from the provided domain
+
+ Remove dedicated ip address from the provided domain.
+
+ :param domain_name: Name of the domain. (required)
+ :type domain_name: str
+ :param ip_address: Dedicated ip address. (required)
+ :type ip_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._remove_ip_from_domain_serialize(
+ domain_name=domain_name,
+ ip_address=ip_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSimpleApiResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 remove_ip_from_domain_with_http_info(
+ self,
+ domain_name: Annotated[StrictStr, Field(description="Name of the domain.")],
+ ip_address: Annotated[StrictStr, Field(description="Dedicated ip 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[EmailSimpleApiResponse]:
+ """Remove dedicated ip address from the provided domain
+
+ Remove dedicated ip address from the provided domain.
+
+ :param domain_name: Name of the domain. (required)
+ :type domain_name: str
+ :param ip_address: Dedicated ip address. (required)
+ :type ip_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._remove_ip_from_domain_serialize(
+ domain_name=domain_name,
+ ip_address=ip_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSimpleApiResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 remove_ip_from_domain_without_preload_content(
+ self,
+ domain_name: Annotated[StrictStr, Field(description="Name of the domain.")],
+ ip_address: Annotated[StrictStr, Field(description="Dedicated ip 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:
+ """Remove dedicated ip address from the provided domain
+
+ Remove dedicated ip address from the provided domain.
+
+ :param domain_name: Name of the domain. (required)
+ :type domain_name: str
+ :param ip_address: Dedicated ip address. (required)
+ :type ip_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._remove_ip_from_domain_serialize(
+ domain_name=domain_name,
+ ip_address=ip_address,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSimpleApiResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _remove_ip_from_domain_serialize(
+ self,
+ domain_name,
+ ip_address,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if domain_name is not None:
+
+ _query_params.append(("domainName", domain_name))
+
+ if ip_address is not None:
+
+ _query_params.append(("ipAddress", ip_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="DELETE",
+ resource_path="/email/1/domain-ips",
+ 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 remove_ip_from_pool(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ ip_id: Annotated[StrictStr, Field(description="Dedicated IP identifier.")],
+ _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:
+ """Unassign IP from pool
+
+ Unassign provided IP from the specific pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param ip_id: Dedicated IP identifier. (required)
+ :type ip_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._remove_ip_from_pool_serialize(
+ pool_id=pool_id,
+ ip_id=ip_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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 remove_ip_from_pool_with_http_info(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ ip_id: Annotated[StrictStr, Field(description="Dedicated IP identifier.")],
+ _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]:
+ """Unassign IP from pool
+
+ Unassign provided IP from the specific pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param ip_id: Dedicated IP identifier. (required)
+ :type ip_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._remove_ip_from_pool_serialize(
+ pool_id=pool_id,
+ ip_id=ip_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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 remove_ip_from_pool_without_preload_content(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ ip_id: Annotated[StrictStr, Field(description="Dedicated IP identifier.")],
+ _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:
+ """Unassign IP from pool
+
+ Unassign provided IP from the specific pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param ip_id: Dedicated IP identifier. (required)
+ :type ip_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._remove_ip_from_pool_serialize(
+ pool_id=pool_id,
+ ip_id=ip_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _remove_ip_from_pool_serialize(
+ self,
+ pool_id,
+ ip_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if pool_id is not None:
+ _path_params["poolId"] = pool_id
+ if ip_id is not None:
+ _path_params["ipId"] = ip_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="DELETE",
+ resource_path="/email/1/ip-management/pools/{poolId}/ips/{ipId}",
+ 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 remove_ip_pool_from_domain(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ _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:
+ """Unassign IP pool from domain
+
+ Unassign a specified pool from the provided domain.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_id: int
+ :param pool_id: IP pool identifier. (required)
+ :type pool_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._remove_ip_pool_from_domain_serialize(
+ domain_id=domain_id,
+ pool_id=pool_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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 remove_ip_pool_from_domain_with_http_info(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ _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]:
+ """Unassign IP pool from domain
+
+ Unassign a specified pool from the provided domain.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_id: int
+ :param pool_id: IP pool identifier. (required)
+ :type pool_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._remove_ip_pool_from_domain_serialize(
+ domain_id=domain_id,
+ pool_id=pool_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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 remove_ip_pool_from_domain_without_preload_content(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ _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:
+ """Unassign IP pool from domain
+
+ Unassign a specified pool from the provided domain.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_id: int
+ :param pool_id: IP pool identifier. (required)
+ :type pool_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._remove_ip_pool_from_domain_serialize(
+ domain_id=domain_id,
+ pool_id=pool_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": None,
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _remove_ip_pool_from_domain_serialize(
+ self,
+ domain_id,
+ pool_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if domain_id is not None:
+ _path_params["domainId"] = domain_id
+ if pool_id is not None:
+ _path_params["poolId"] = pool_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="DELETE",
+ resource_path="/email/1/ip-management/domains/{domainId}/pools/{poolId}",
+ 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 reschedule_emails(
+ self,
+ bulk_id: StrictStr,
+ email_bulk_reschedule_request: EmailBulkRescheduleRequest,
+ _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,
+ ) -> EmailBulkRescheduleResponse:
+ """Reschedule Email messages
+
+ Change the date and time for sending scheduled messages.
+
+ :param bulk_id: (required)
+ :type bulk_id: str
+ :param email_bulk_reschedule_request: (required)
+ :type email_bulk_reschedule_request: EmailBulkRescheduleRequest
+ :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._reschedule_emails_serialize(
+ bulk_id=bulk_id,
+ email_bulk_reschedule_request=email_bulk_reschedule_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkRescheduleResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 reschedule_emails_with_http_info(
+ self,
+ bulk_id: StrictStr,
+ email_bulk_reschedule_request: EmailBulkRescheduleRequest,
+ _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[EmailBulkRescheduleResponse]:
+ """Reschedule Email messages
+
+ Change the date and time for sending scheduled messages.
+
+ :param bulk_id: (required)
+ :type bulk_id: str
+ :param email_bulk_reschedule_request: (required)
+ :type email_bulk_reschedule_request: EmailBulkRescheduleRequest
+ :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._reschedule_emails_serialize(
+ bulk_id=bulk_id,
+ email_bulk_reschedule_request=email_bulk_reschedule_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkRescheduleResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 reschedule_emails_without_preload_content(
+ self,
+ bulk_id: StrictStr,
+ email_bulk_reschedule_request: EmailBulkRescheduleRequest,
+ _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:
+ """Reschedule Email messages
+
+ Change the date and time for sending scheduled messages.
+
+ :param bulk_id: (required)
+ :type bulk_id: str
+ :param email_bulk_reschedule_request: (required)
+ :type email_bulk_reschedule_request: EmailBulkRescheduleRequest
+ :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._reschedule_emails_serialize(
+ bulk_id=bulk_id,
+ email_bulk_reschedule_request=email_bulk_reschedule_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkRescheduleResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _reschedule_emails_serialize(
+ self,
+ bulk_id,
+ email_bulk_reschedule_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if email_bulk_reschedule_request is not None:
+ _body_params = email_bulk_reschedule_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="PUT",
+ resource_path="/email/1/bulks",
+ 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 send_email(
+ self,
+ to: Annotated[
+ List[Annotated[str, Field(strict=True)]],
+ Field(
+ description='Email address of the recipient in a form of `To=\\"john.smith@somecompany.com\\"`. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Given `To` value should look like: `To= {\\"to\\": \\"john.smith@somecompany.com\\",\\"placeholders\\": {\\"name\\": \\"John\\"}}` `To= {\\"to\\": \\"alice.grey@somecompany.com\\",\\"placeholders\\": {\\"name\\": \\"Alice\\"}}`. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field.'
+ ),
+ ],
+ var_from: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Email address with optional sender name. Note: This field is required if `templateId` is not present."
+ ),
+ ] = None,
+ cc: Annotated[
+ Optional[List[Annotated[str, Field(strict=True)]]],
+ Field(
+ description="CC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field."
+ ),
+ ] = None,
+ bcc: Annotated[
+ Optional[List[Annotated[str, Field(strict=True)]]],
+ Field(
+ description="BCC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field."
+ ),
+ ] = None,
+ subject: Annotated[
+ Optional[Annotated[str, Field(strict=True)]],
+ Field(
+ description="Message subject. Note: This field is required if `templateId` is not present."
+ ),
+ ] = None,
+ text: Annotated[
+ Optional[StrictStr], Field(description="Body of the message.")
+ ] = None,
+ html: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="HTML body of the message. If `html` and `text` fields are present, the `text` field will be ignored and `html` will be delivered as a message body."
+ ),
+ ] = None,
+ amp_html: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Amp HTML body of the message. If `ampHtml` is present, `html` is mandatory. Amp HTML is not supported by all the email clients. Please check this link for configuring gmail client https://developers.google.com/gmail/ampemail/."
+ ),
+ ] = None,
+ template_id: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="Template ID used for generating email content. The template is created over Infobip web interface. If `templateId` is present, then `html` and `text` values are ignored. Note: `templateId` only supports the value of `Broadcast`. `Content` and `Flow` are not supported."
+ ),
+ ] = None,
+ attachment: Annotated[
+ Optional[List[Union[StrictBytes, StrictStr]]],
+ Field(description="File attachment."),
+ ] = None,
+ inline_image: Annotated[
+ Optional[List[Union[StrictBytes, StrictStr]]],
+ Field(
+ description="Allows for inserting an image file inside the HTML code of the email by using `cid:FILENAME` instead of providing an external link to the image."
+ ),
+ ] = None,
+ intermediate_report: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="The real-time Intermediate delivery report that will be sent on your callback server."
+ ),
+ ] = None,
+ notify_url: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The URL on your callback server on which the Delivery report will be sent."
+ ),
+ ] = None,
+ notify_content_type: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Preferred Delivery report content type. Can be `application/json` or `application/xml`."
+ ),
+ ] = None,
+ callback_data: Annotated[
+ Optional[Annotated[str, Field(strict=True)]],
+ Field(
+ description="Additional client data that will be sent on the notifyUrl."
+ ),
+ ] = None,
+ track: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="Enable or disable open and click tracking. Passing true will only enable tracking and the statistics would be visible in the web interface alone. This can be explicitly overridden by `trackClicks` and `trackOpens`."
+ ),
+ ] = None,
+ track_clicks: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="This parameter enables or disables track click feature. Note: Option to disable click tracking per URL is available. For detailed usage, please refer to the [documentation](https://www.infobip.com/docs/email/tracking-service#disable-click-tracking-on-urls)."
+ ),
+ ] = None,
+ track_opens: Annotated[
+ Optional[StrictBool],
+ Field(description="This parameter enables or disables track open feature."),
+ ] = None,
+ tracking_url: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The URL on your callback server on which the open and click notifications will be sent. See [Tracking Notifications](https://www.infobip.com/docs/email/send-email-over-api#tracking-notifications) for details."
+ ),
+ ] = None,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID uniquely identifies the sent email request. This filter will enable you to query delivery reports for all the messages using just one request. You will receive a `bulkId` in the response after sending an email request. If you don't set your own `bulkId`, unique ID will be generated by our system and returned in the API response. (Optional Field)"
+ ),
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that uniquely identifies the message sent to a recipient. (Optional Field)"
+ ),
+ ] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns."
+ ),
+ ] = None,
+ reply_to: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Email address to which recipients of the email can reply."
+ ),
+ ] = None,
+ default_placeholders: Annotated[
+ Optional[StrictStr],
+ Field(
+ description='General placeholder, given in a form of json example: `defaultPlaceholders={\\"ph1\\": \\"Success\\"}`, which will replace given key `{{ph1}}` with given value `Success` anywhere in the email (subject, text, html...). In case of more destinations in `To` field, this placeholder will resolve the same value for key `ph1`.'
+ ),
+ ] = None,
+ preserve_recipients: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="If set to `true`, the `to` recipients will see the list of all other recipients to get the email and the response will return only one `messageId`. Otherwise, each recipient will see just their own email and the response will return a unique `messageId` for each email recipient."
+ ),
+ ] = None,
+ send_at: Annotated[
+ Optional[datetime],
+ Field(
+ description="To schedule message at a given time. Time provided should be in UTC in the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ` and cannot exceed 30 days in the future. "
+ ),
+ ] = None,
+ landing_page_placeholders: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Personalize opt out landing page by inserting placeholders. Insert placeholder or tag while designing landing page."
+ ),
+ ] = None,
+ landing_page_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID of an opt out landing page to be used and displayed once an end user clicks the unsubscribe link. If not present, default opt out landing page will be displayed. Create a landing page in your Infobip account and use its ID, e.g., `1_23456`."
+ ),
+ ] = None,
+ template_language_version: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Specifies template language version that will be used in the current message template. Use version 1 for previous version of template language. Use version 2 for features of the new template language. If not present version 1 will be used as default version. "
+ ),
+ ] = None,
+ client_priority: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Adds a priority rating to this email message. Allowed values are `HIGH`, `STANDARD` and `LOW`. Messages with a higher priority value sent by your account are prioritized over messages with a lower priority value sent by your account. If no priority value is provided, messages will be treated with `STANDARD` priority by default."
+ ),
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Required for application use in a send request for outbound traffic. Returned in notification events."
+ ),
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Required for entity use in a send request for outbound traffic. Returned in notification events."
+ ),
+ ] = None,
+ headers: Annotated[
+ Optional[StrictStr],
+ Field(
+ description='Additional email headers for customization that can be provided in a form of JSON. Example: `headers={\\"X-CustomHeader\\": \\"Header value\\"}`. There are a few exceptions of headers which are not adjustable through this option: `To`, `Cc`, `Bcc`, `From`, `Subject`,`Content-Type`, `DKIM-Signature`, `Content-Transfer-Encoding`, `Return-Path`, `MIME-Version`'
+ ),
+ ] = 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,
+ ) -> EmailSendResponse:
+ """Send fully featured email
+
+ Send an email or multiple emails to a recipient or multiple recipients with CC/BCC enabled.
+
+ :param to: Email address of the recipient in a form of `To=\\\"john.smith@somecompany.com\\\"`. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Given `To` value should look like: `To= {\\\"to\\\": \\\"john.smith@somecompany.com\\\",\\\"placeholders\\\": {\\\"name\\\": \\\"John\\\"}}` `To= {\\\"to\\\": \\\"alice.grey@somecompany.com\\\",\\\"placeholders\\\": {\\\"name\\\": \\\"Alice\\\"}}`. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field. (required)
+ :type to: List[str]
+ :param var_from: Email address with optional sender name. Note: This field is required if `templateId` is not present.
+ :type var_from: str
+ :param cc: CC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field.
+ :type cc: List[str]
+ :param bcc: BCC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field.
+ :type bcc: List[str]
+ :param subject: Message subject. Note: This field is required if `templateId` is not present.
+ :type subject: str
+ :param text: Body of the message.
+ :type text: str
+ :param html: HTML body of the message. If `html` and `text` fields are present, the `text` field will be ignored and `html` will be delivered as a message body.
+ :type html: str
+ :param amp_html: Amp HTML body of the message. If `ampHtml` is present, `html` is mandatory. Amp HTML is not supported by all the email clients. Please check this link for configuring gmail client https://developers.google.com/gmail/ampemail/.
+ :type amp_html: str
+ :param template_id: Template ID used for generating email content. The template is created over Infobip web interface. If `templateId` is present, then `html` and `text` values are ignored. Note: `templateId` only supports the value of `Broadcast`. `Content` and `Flow` are not supported.
+ :type template_id: int
+ :param attachment: File attachment.
+ :type attachment: List[bytearray]
+ :param inline_image: Allows for inserting an image file inside the HTML code of the email by using `cid:FILENAME` instead of providing an external link to the image.
+ :type inline_image: List[bytearray]
+ :param intermediate_report: The real-time Intermediate delivery report that will be sent on your callback server.
+ :type intermediate_report: bool
+ :param notify_url: The URL on your callback server on which the Delivery report will be sent.
+ :type notify_url: str
+ :param notify_content_type: Preferred Delivery report content type. Can be `application/json` or `application/xml`.
+ :type notify_content_type: str
+ :param callback_data: Additional client data that will be sent on the notifyUrl.
+ :type callback_data: str
+ :param track: Enable or disable open and click tracking. Passing true will only enable tracking and the statistics would be visible in the web interface alone. This can be explicitly overridden by `trackClicks` and `trackOpens`.
+ :type track: bool
+ :param track_clicks: This parameter enables or disables track click feature. Note: Option to disable click tracking per URL is available. For detailed usage, please refer to the [documentation](https://www.infobip.com/docs/email/tracking-service#disable-click-tracking-on-urls).
+ :type track_clicks: bool
+ :param track_opens: This parameter enables or disables track open feature.
+ :type track_opens: bool
+ :param tracking_url: The URL on your callback server on which the open and click notifications will be sent. See [Tracking Notifications](https://www.infobip.com/docs/email/send-email-over-api#tracking-notifications) for details.
+ :type tracking_url: str
+ :param bulk_id: The ID uniquely identifies the sent email request. This filter will enable you to query delivery reports for all the messages using just one request. You will receive a `bulkId` in the response after sending an email request. If you don't set your own `bulkId`, unique ID will be generated by our system and returned in the API response. (Optional Field)
+ :type bulk_id: str
+ :param message_id: The ID that uniquely identifies the message sent to a recipient. (Optional Field)
+ :type message_id: str
+ :param campaign_reference_id: The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns.
+ :type campaign_reference_id: str
+ :param reply_to: Email address to which recipients of the email can reply.
+ :type reply_to: str
+ :param default_placeholders: General placeholder, given in a form of json example: `defaultPlaceholders={\\\"ph1\\\": \\\"Success\\\"}`, which will replace given key `{{ph1}}` with given value `Success` anywhere in the email (subject, text, html...). In case of more destinations in `To` field, this placeholder will resolve the same value for key `ph1`.
+ :type default_placeholders: str
+ :param preserve_recipients: If set to `true`, the `to` recipients will see the list of all other recipients to get the email and the response will return only one `messageId`. Otherwise, each recipient will see just their own email and the response will return a unique `messageId` for each email recipient.
+ :type preserve_recipients: bool
+ :param send_at: To schedule message at a given time. Time provided should be in UTC in the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ` and cannot exceed 30 days in the future.
+ :type send_at: datetime
+ :param landing_page_placeholders: Personalize opt out landing page by inserting placeholders. Insert placeholder or tag while designing landing page.
+ :type landing_page_placeholders: str
+ :param landing_page_id: The ID of an opt out landing page to be used and displayed once an end user clicks the unsubscribe link. If not present, default opt out landing page will be displayed. Create a landing page in your Infobip account and use its ID, e.g., `1_23456`.
+ :type landing_page_id: str
+ :param template_language_version: Specifies template language version that will be used in the current message template. Use version 1 for previous version of template language. Use version 2 for features of the new template language. If not present version 1 will be used as default version.
+ :type template_language_version: str
+ :param client_priority: Adds a priority rating to this email message. Allowed values are `HIGH`, `STANDARD` and `LOW`. Messages with a higher priority value sent by your account are prioritized over messages with a lower priority value sent by your account. If no priority value is provided, messages will be treated with `STANDARD` priority by default.
+ :type client_priority: str
+ :param application_id: Required for application use in a send request for outbound traffic. Returned in notification events.
+ :type application_id: str
+ :param entity_id: Required for entity use in a send request for outbound traffic. Returned in notification events.
+ :type entity_id: str
+ :param headers: Additional email headers for customization that can be provided in a form of JSON. Example: `headers={\\\"X-CustomHeader\\\": \\\"Header value\\\"}`. There are a few exceptions of headers which are not adjustable through this option: `To`, `Cc`, `Bcc`, `From`, `Subject`,`Content-Type`, `DKIM-Signature`, `Content-Transfer-Encoding`, `Return-Path`, `MIME-Version`
+ :type headers: 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._send_email_serialize(
+ to=to,
+ var_from=var_from,
+ cc=cc,
+ bcc=bcc,
+ subject=subject,
+ text=text,
+ html=html,
+ amp_html=amp_html,
+ template_id=template_id,
+ attachment=attachment,
+ inline_image=inline_image,
+ intermediate_report=intermediate_report,
+ notify_url=notify_url,
+ notify_content_type=notify_content_type,
+ callback_data=callback_data,
+ track=track,
+ track_clicks=track_clicks,
+ track_opens=track_opens,
+ tracking_url=tracking_url,
+ bulk_id=bulk_id,
+ message_id=message_id,
+ campaign_reference_id=campaign_reference_id,
+ reply_to=reply_to,
+ default_placeholders=default_placeholders,
+ preserve_recipients=preserve_recipients,
+ send_at=send_at,
+ landing_page_placeholders=landing_page_placeholders,
+ landing_page_id=landing_page_id,
+ template_language_version=template_language_version,
+ client_priority=client_priority,
+ application_id=application_id,
+ entity_id=entity_id,
+ headers=headers,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSendResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 send_email_with_http_info(
+ self,
+ to: Annotated[
+ List[Annotated[str, Field(strict=True)]],
+ Field(
+ description='Email address of the recipient in a form of `To=\\"john.smith@somecompany.com\\"`. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Given `To` value should look like: `To= {\\"to\\": \\"john.smith@somecompany.com\\",\\"placeholders\\": {\\"name\\": \\"John\\"}}` `To= {\\"to\\": \\"alice.grey@somecompany.com\\",\\"placeholders\\": {\\"name\\": \\"Alice\\"}}`. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field.'
+ ),
+ ],
+ var_from: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Email address with optional sender name. Note: This field is required if `templateId` is not present."
+ ),
+ ] = None,
+ cc: Annotated[
+ Optional[List[Annotated[str, Field(strict=True)]]],
+ Field(
+ description="CC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field."
+ ),
+ ] = None,
+ bcc: Annotated[
+ Optional[List[Annotated[str, Field(strict=True)]]],
+ Field(
+ description="BCC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field."
+ ),
+ ] = None,
+ subject: Annotated[
+ Optional[Annotated[str, Field(strict=True)]],
+ Field(
+ description="Message subject. Note: This field is required if `templateId` is not present."
+ ),
+ ] = None,
+ text: Annotated[
+ Optional[StrictStr], Field(description="Body of the message.")
+ ] = None,
+ html: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="HTML body of the message. If `html` and `text` fields are present, the `text` field will be ignored and `html` will be delivered as a message body."
+ ),
+ ] = None,
+ amp_html: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Amp HTML body of the message. If `ampHtml` is present, `html` is mandatory. Amp HTML is not supported by all the email clients. Please check this link for configuring gmail client https://developers.google.com/gmail/ampemail/."
+ ),
+ ] = None,
+ template_id: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="Template ID used for generating email content. The template is created over Infobip web interface. If `templateId` is present, then `html` and `text` values are ignored. Note: `templateId` only supports the value of `Broadcast`. `Content` and `Flow` are not supported."
+ ),
+ ] = None,
+ attachment: Annotated[
+ Optional[List[Union[StrictBytes, StrictStr]]],
+ Field(description="File attachment."),
+ ] = None,
+ inline_image: Annotated[
+ Optional[List[Union[StrictBytes, StrictStr]]],
+ Field(
+ description="Allows for inserting an image file inside the HTML code of the email by using `cid:FILENAME` instead of providing an external link to the image."
+ ),
+ ] = None,
+ intermediate_report: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="The real-time Intermediate delivery report that will be sent on your callback server."
+ ),
+ ] = None,
+ notify_url: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The URL on your callback server on which the Delivery report will be sent."
+ ),
+ ] = None,
+ notify_content_type: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Preferred Delivery report content type. Can be `application/json` or `application/xml`."
+ ),
+ ] = None,
+ callback_data: Annotated[
+ Optional[Annotated[str, Field(strict=True)]],
+ Field(
+ description="Additional client data that will be sent on the notifyUrl."
+ ),
+ ] = None,
+ track: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="Enable or disable open and click tracking. Passing true will only enable tracking and the statistics would be visible in the web interface alone. This can be explicitly overridden by `trackClicks` and `trackOpens`."
+ ),
+ ] = None,
+ track_clicks: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="This parameter enables or disables track click feature. Note: Option to disable click tracking per URL is available. For detailed usage, please refer to the [documentation](https://www.infobip.com/docs/email/tracking-service#disable-click-tracking-on-urls)."
+ ),
+ ] = None,
+ track_opens: Annotated[
+ Optional[StrictBool],
+ Field(description="This parameter enables or disables track open feature."),
+ ] = None,
+ tracking_url: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The URL on your callback server on which the open and click notifications will be sent. See [Tracking Notifications](https://www.infobip.com/docs/email/send-email-over-api#tracking-notifications) for details."
+ ),
+ ] = None,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID uniquely identifies the sent email request. This filter will enable you to query delivery reports for all the messages using just one request. You will receive a `bulkId` in the response after sending an email request. If you don't set your own `bulkId`, unique ID will be generated by our system and returned in the API response. (Optional Field)"
+ ),
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that uniquely identifies the message sent to a recipient. (Optional Field)"
+ ),
+ ] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns."
+ ),
+ ] = None,
+ reply_to: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Email address to which recipients of the email can reply."
+ ),
+ ] = None,
+ default_placeholders: Annotated[
+ Optional[StrictStr],
+ Field(
+ description='General placeholder, given in a form of json example: `defaultPlaceholders={\\"ph1\\": \\"Success\\"}`, which will replace given key `{{ph1}}` with given value `Success` anywhere in the email (subject, text, html...). In case of more destinations in `To` field, this placeholder will resolve the same value for key `ph1`.'
+ ),
+ ] = None,
+ preserve_recipients: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="If set to `true`, the `to` recipients will see the list of all other recipients to get the email and the response will return only one `messageId`. Otherwise, each recipient will see just their own email and the response will return a unique `messageId` for each email recipient."
+ ),
+ ] = None,
+ send_at: Annotated[
+ Optional[datetime],
+ Field(
+ description="To schedule message at a given time. Time provided should be in UTC in the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ` and cannot exceed 30 days in the future. "
+ ),
+ ] = None,
+ landing_page_placeholders: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Personalize opt out landing page by inserting placeholders. Insert placeholder or tag while designing landing page."
+ ),
+ ] = None,
+ landing_page_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID of an opt out landing page to be used and displayed once an end user clicks the unsubscribe link. If not present, default opt out landing page will be displayed. Create a landing page in your Infobip account and use its ID, e.g., `1_23456`."
+ ),
+ ] = None,
+ template_language_version: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Specifies template language version that will be used in the current message template. Use version 1 for previous version of template language. Use version 2 for features of the new template language. If not present version 1 will be used as default version. "
+ ),
+ ] = None,
+ client_priority: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Adds a priority rating to this email message. Allowed values are `HIGH`, `STANDARD` and `LOW`. Messages with a higher priority value sent by your account are prioritized over messages with a lower priority value sent by your account. If no priority value is provided, messages will be treated with `STANDARD` priority by default."
+ ),
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Required for application use in a send request for outbound traffic. Returned in notification events."
+ ),
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Required for entity use in a send request for outbound traffic. Returned in notification events."
+ ),
+ ] = None,
+ headers: Annotated[
+ Optional[StrictStr],
+ Field(
+ description='Additional email headers for customization that can be provided in a form of JSON. Example: `headers={\\"X-CustomHeader\\": \\"Header value\\"}`. There are a few exceptions of headers which are not adjustable through this option: `To`, `Cc`, `Bcc`, `From`, `Subject`,`Content-Type`, `DKIM-Signature`, `Content-Transfer-Encoding`, `Return-Path`, `MIME-Version`'
+ ),
+ ] = 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[EmailSendResponse]:
+ """Send fully featured email
+
+ Send an email or multiple emails to a recipient or multiple recipients with CC/BCC enabled.
+
+ :param to: Email address of the recipient in a form of `To=\\\"john.smith@somecompany.com\\\"`. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Given `To` value should look like: `To= {\\\"to\\\": \\\"john.smith@somecompany.com\\\",\\\"placeholders\\\": {\\\"name\\\": \\\"John\\\"}}` `To= {\\\"to\\\": \\\"alice.grey@somecompany.com\\\",\\\"placeholders\\\": {\\\"name\\\": \\\"Alice\\\"}}`. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field. (required)
+ :type to: List[str]
+ :param var_from: Email address with optional sender name. Note: This field is required if `templateId` is not present.
+ :type var_from: str
+ :param cc: CC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field.
+ :type cc: List[str]
+ :param bcc: BCC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field.
+ :type bcc: List[str]
+ :param subject: Message subject. Note: This field is required if `templateId` is not present.
+ :type subject: str
+ :param text: Body of the message.
+ :type text: str
+ :param html: HTML body of the message. If `html` and `text` fields are present, the `text` field will be ignored and `html` will be delivered as a message body.
+ :type html: str
+ :param amp_html: Amp HTML body of the message. If `ampHtml` is present, `html` is mandatory. Amp HTML is not supported by all the email clients. Please check this link for configuring gmail client https://developers.google.com/gmail/ampemail/.
+ :type amp_html: str
+ :param template_id: Template ID used for generating email content. The template is created over Infobip web interface. If `templateId` is present, then `html` and `text` values are ignored. Note: `templateId` only supports the value of `Broadcast`. `Content` and `Flow` are not supported.
+ :type template_id: int
+ :param attachment: File attachment.
+ :type attachment: List[bytearray]
+ :param inline_image: Allows for inserting an image file inside the HTML code of the email by using `cid:FILENAME` instead of providing an external link to the image.
+ :type inline_image: List[bytearray]
+ :param intermediate_report: The real-time Intermediate delivery report that will be sent on your callback server.
+ :type intermediate_report: bool
+ :param notify_url: The URL on your callback server on which the Delivery report will be sent.
+ :type notify_url: str
+ :param notify_content_type: Preferred Delivery report content type. Can be `application/json` or `application/xml`.
+ :type notify_content_type: str
+ :param callback_data: Additional client data that will be sent on the notifyUrl.
+ :type callback_data: str
+ :param track: Enable or disable open and click tracking. Passing true will only enable tracking and the statistics would be visible in the web interface alone. This can be explicitly overridden by `trackClicks` and `trackOpens`.
+ :type track: bool
+ :param track_clicks: This parameter enables or disables track click feature. Note: Option to disable click tracking per URL is available. For detailed usage, please refer to the [documentation](https://www.infobip.com/docs/email/tracking-service#disable-click-tracking-on-urls).
+ :type track_clicks: bool
+ :param track_opens: This parameter enables or disables track open feature.
+ :type track_opens: bool
+ :param tracking_url: The URL on your callback server on which the open and click notifications will be sent. See [Tracking Notifications](https://www.infobip.com/docs/email/send-email-over-api#tracking-notifications) for details.
+ :type tracking_url: str
+ :param bulk_id: The ID uniquely identifies the sent email request. This filter will enable you to query delivery reports for all the messages using just one request. You will receive a `bulkId` in the response after sending an email request. If you don't set your own `bulkId`, unique ID will be generated by our system and returned in the API response. (Optional Field)
+ :type bulk_id: str
+ :param message_id: The ID that uniquely identifies the message sent to a recipient. (Optional Field)
+ :type message_id: str
+ :param campaign_reference_id: The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns.
+ :type campaign_reference_id: str
+ :param reply_to: Email address to which recipients of the email can reply.
+ :type reply_to: str
+ :param default_placeholders: General placeholder, given in a form of json example: `defaultPlaceholders={\\\"ph1\\\": \\\"Success\\\"}`, which will replace given key `{{ph1}}` with given value `Success` anywhere in the email (subject, text, html...). In case of more destinations in `To` field, this placeholder will resolve the same value for key `ph1`.
+ :type default_placeholders: str
+ :param preserve_recipients: If set to `true`, the `to` recipients will see the list of all other recipients to get the email and the response will return only one `messageId`. Otherwise, each recipient will see just their own email and the response will return a unique `messageId` for each email recipient.
+ :type preserve_recipients: bool
+ :param send_at: To schedule message at a given time. Time provided should be in UTC in the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ` and cannot exceed 30 days in the future.
+ :type send_at: datetime
+ :param landing_page_placeholders: Personalize opt out landing page by inserting placeholders. Insert placeholder or tag while designing landing page.
+ :type landing_page_placeholders: str
+ :param landing_page_id: The ID of an opt out landing page to be used and displayed once an end user clicks the unsubscribe link. If not present, default opt out landing page will be displayed. Create a landing page in your Infobip account and use its ID, e.g., `1_23456`.
+ :type landing_page_id: str
+ :param template_language_version: Specifies template language version that will be used in the current message template. Use version 1 for previous version of template language. Use version 2 for features of the new template language. If not present version 1 will be used as default version.
+ :type template_language_version: str
+ :param client_priority: Adds a priority rating to this email message. Allowed values are `HIGH`, `STANDARD` and `LOW`. Messages with a higher priority value sent by your account are prioritized over messages with a lower priority value sent by your account. If no priority value is provided, messages will be treated with `STANDARD` priority by default.
+ :type client_priority: str
+ :param application_id: Required for application use in a send request for outbound traffic. Returned in notification events.
+ :type application_id: str
+ :param entity_id: Required for entity use in a send request for outbound traffic. Returned in notification events.
+ :type entity_id: str
+ :param headers: Additional email headers for customization that can be provided in a form of JSON. Example: `headers={\\\"X-CustomHeader\\\": \\\"Header value\\\"}`. There are a few exceptions of headers which are not adjustable through this option: `To`, `Cc`, `Bcc`, `From`, `Subject`,`Content-Type`, `DKIM-Signature`, `Content-Transfer-Encoding`, `Return-Path`, `MIME-Version`
+ :type headers: 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._send_email_serialize(
+ to=to,
+ var_from=var_from,
+ cc=cc,
+ bcc=bcc,
+ subject=subject,
+ text=text,
+ html=html,
+ amp_html=amp_html,
+ template_id=template_id,
+ attachment=attachment,
+ inline_image=inline_image,
+ intermediate_report=intermediate_report,
+ notify_url=notify_url,
+ notify_content_type=notify_content_type,
+ callback_data=callback_data,
+ track=track,
+ track_clicks=track_clicks,
+ track_opens=track_opens,
+ tracking_url=tracking_url,
+ bulk_id=bulk_id,
+ message_id=message_id,
+ campaign_reference_id=campaign_reference_id,
+ reply_to=reply_to,
+ default_placeholders=default_placeholders,
+ preserve_recipients=preserve_recipients,
+ send_at=send_at,
+ landing_page_placeholders=landing_page_placeholders,
+ landing_page_id=landing_page_id,
+ template_language_version=template_language_version,
+ client_priority=client_priority,
+ application_id=application_id,
+ entity_id=entity_id,
+ headers=headers,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSendResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 send_email_without_preload_content(
+ self,
+ to: Annotated[
+ List[Annotated[str, Field(strict=True)]],
+ Field(
+ description='Email address of the recipient in a form of `To=\\"john.smith@somecompany.com\\"`. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Given `To` value should look like: `To= {\\"to\\": \\"john.smith@somecompany.com\\",\\"placeholders\\": {\\"name\\": \\"John\\"}}` `To= {\\"to\\": \\"alice.grey@somecompany.com\\",\\"placeholders\\": {\\"name\\": \\"Alice\\"}}`. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field.'
+ ),
+ ],
+ var_from: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Email address with optional sender name. Note: This field is required if `templateId` is not present."
+ ),
+ ] = None,
+ cc: Annotated[
+ Optional[List[Annotated[str, Field(strict=True)]]],
+ Field(
+ description="CC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field."
+ ),
+ ] = None,
+ bcc: Annotated[
+ Optional[List[Annotated[str, Field(strict=True)]]],
+ Field(
+ description="BCC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field."
+ ),
+ ] = None,
+ subject: Annotated[
+ Optional[Annotated[str, Field(strict=True)]],
+ Field(
+ description="Message subject. Note: This field is required if `templateId` is not present."
+ ),
+ ] = None,
+ text: Annotated[
+ Optional[StrictStr], Field(description="Body of the message.")
+ ] = None,
+ html: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="HTML body of the message. If `html` and `text` fields are present, the `text` field will be ignored and `html` will be delivered as a message body."
+ ),
+ ] = None,
+ amp_html: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Amp HTML body of the message. If `ampHtml` is present, `html` is mandatory. Amp HTML is not supported by all the email clients. Please check this link for configuring gmail client https://developers.google.com/gmail/ampemail/."
+ ),
+ ] = None,
+ template_id: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="Template ID used for generating email content. The template is created over Infobip web interface. If `templateId` is present, then `html` and `text` values are ignored. Note: `templateId` only supports the value of `Broadcast`. `Content` and `Flow` are not supported."
+ ),
+ ] = None,
+ attachment: Annotated[
+ Optional[List[Union[StrictBytes, StrictStr]]],
+ Field(description="File attachment."),
+ ] = None,
+ inline_image: Annotated[
+ Optional[List[Union[StrictBytes, StrictStr]]],
+ Field(
+ description="Allows for inserting an image file inside the HTML code of the email by using `cid:FILENAME` instead of providing an external link to the image."
+ ),
+ ] = None,
+ intermediate_report: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="The real-time Intermediate delivery report that will be sent on your callback server."
+ ),
+ ] = None,
+ notify_url: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The URL on your callback server on which the Delivery report will be sent."
+ ),
+ ] = None,
+ notify_content_type: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Preferred Delivery report content type. Can be `application/json` or `application/xml`."
+ ),
+ ] = None,
+ callback_data: Annotated[
+ Optional[Annotated[str, Field(strict=True)]],
+ Field(
+ description="Additional client data that will be sent on the notifyUrl."
+ ),
+ ] = None,
+ track: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="Enable or disable open and click tracking. Passing true will only enable tracking and the statistics would be visible in the web interface alone. This can be explicitly overridden by `trackClicks` and `trackOpens`."
+ ),
+ ] = None,
+ track_clicks: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="This parameter enables or disables track click feature. Note: Option to disable click tracking per URL is available. For detailed usage, please refer to the [documentation](https://www.infobip.com/docs/email/tracking-service#disable-click-tracking-on-urls)."
+ ),
+ ] = None,
+ track_opens: Annotated[
+ Optional[StrictBool],
+ Field(description="This parameter enables or disables track open feature."),
+ ] = None,
+ tracking_url: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The URL on your callback server on which the open and click notifications will be sent. See [Tracking Notifications](https://www.infobip.com/docs/email/send-email-over-api#tracking-notifications) for details."
+ ),
+ ] = None,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID uniquely identifies the sent email request. This filter will enable you to query delivery reports for all the messages using just one request. You will receive a `bulkId` in the response after sending an email request. If you don't set your own `bulkId`, unique ID will be generated by our system and returned in the API response. (Optional Field)"
+ ),
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that uniquely identifies the message sent to a recipient. (Optional Field)"
+ ),
+ ] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns."
+ ),
+ ] = None,
+ reply_to: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Email address to which recipients of the email can reply."
+ ),
+ ] = None,
+ default_placeholders: Annotated[
+ Optional[StrictStr],
+ Field(
+ description='General placeholder, given in a form of json example: `defaultPlaceholders={\\"ph1\\": \\"Success\\"}`, which will replace given key `{{ph1}}` with given value `Success` anywhere in the email (subject, text, html...). In case of more destinations in `To` field, this placeholder will resolve the same value for key `ph1`.'
+ ),
+ ] = None,
+ preserve_recipients: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="If set to `true`, the `to` recipients will see the list of all other recipients to get the email and the response will return only one `messageId`. Otherwise, each recipient will see just their own email and the response will return a unique `messageId` for each email recipient."
+ ),
+ ] = None,
+ send_at: Annotated[
+ Optional[datetime],
+ Field(
+ description="To schedule message at a given time. Time provided should be in UTC in the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ` and cannot exceed 30 days in the future. "
+ ),
+ ] = None,
+ landing_page_placeholders: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Personalize opt out landing page by inserting placeholders. Insert placeholder or tag while designing landing page."
+ ),
+ ] = None,
+ landing_page_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID of an opt out landing page to be used and displayed once an end user clicks the unsubscribe link. If not present, default opt out landing page will be displayed. Create a landing page in your Infobip account and use its ID, e.g., `1_23456`."
+ ),
+ ] = None,
+ template_language_version: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Specifies template language version that will be used in the current message template. Use version 1 for previous version of template language. Use version 2 for features of the new template language. If not present version 1 will be used as default version. "
+ ),
+ ] = None,
+ client_priority: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Adds a priority rating to this email message. Allowed values are `HIGH`, `STANDARD` and `LOW`. Messages with a higher priority value sent by your account are prioritized over messages with a lower priority value sent by your account. If no priority value is provided, messages will be treated with `STANDARD` priority by default."
+ ),
+ ] = None,
+ application_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Required for application use in a send request for outbound traffic. Returned in notification events."
+ ),
+ ] = None,
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Required for entity use in a send request for outbound traffic. Returned in notification events."
+ ),
+ ] = None,
+ headers: Annotated[
+ Optional[StrictStr],
+ Field(
+ description='Additional email headers for customization that can be provided in a form of JSON. Example: `headers={\\"X-CustomHeader\\": \\"Header value\\"}`. There are a few exceptions of headers which are not adjustable through this option: `To`, `Cc`, `Bcc`, `From`, `Subject`,`Content-Type`, `DKIM-Signature`, `Content-Transfer-Encoding`, `Return-Path`, `MIME-Version`'
+ ),
+ ] = 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:
+ """Send fully featured email
+
+ Send an email or multiple emails to a recipient or multiple recipients with CC/BCC enabled.
+
+ :param to: Email address of the recipient in a form of `To=\\\"john.smith@somecompany.com\\\"`. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Given `To` value should look like: `To= {\\\"to\\\": \\\"john.smith@somecompany.com\\\",\\\"placeholders\\\": {\\\"name\\\": \\\"John\\\"}}` `To= {\\\"to\\\": \\\"alice.grey@somecompany.com\\\",\\\"placeholders\\\": {\\\"name\\\": \\\"Alice\\\"}}`. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field. (required)
+ :type to: List[str]
+ :param var_from: Email address with optional sender name. Note: This field is required if `templateId` is not present.
+ :type var_from: str
+ :param cc: CC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field.
+ :type cc: List[str]
+ :param bcc: BCC recipient email address. As optional feature on this field, a specific placeholder can be defined whose value will apply only for this destination. Note: Maximum number of recipients per request is 1000 overall including to, cc and bcc field.
+ :type bcc: List[str]
+ :param subject: Message subject. Note: This field is required if `templateId` is not present.
+ :type subject: str
+ :param text: Body of the message.
+ :type text: str
+ :param html: HTML body of the message. If `html` and `text` fields are present, the `text` field will be ignored and `html` will be delivered as a message body.
+ :type html: str
+ :param amp_html: Amp HTML body of the message. If `ampHtml` is present, `html` is mandatory. Amp HTML is not supported by all the email clients. Please check this link for configuring gmail client https://developers.google.com/gmail/ampemail/.
+ :type amp_html: str
+ :param template_id: Template ID used for generating email content. The template is created over Infobip web interface. If `templateId` is present, then `html` and `text` values are ignored. Note: `templateId` only supports the value of `Broadcast`. `Content` and `Flow` are not supported.
+ :type template_id: int
+ :param attachment: File attachment.
+ :type attachment: List[bytearray]
+ :param inline_image: Allows for inserting an image file inside the HTML code of the email by using `cid:FILENAME` instead of providing an external link to the image.
+ :type inline_image: List[bytearray]
+ :param intermediate_report: The real-time Intermediate delivery report that will be sent on your callback server.
+ :type intermediate_report: bool
+ :param notify_url: The URL on your callback server on which the Delivery report will be sent.
+ :type notify_url: str
+ :param notify_content_type: Preferred Delivery report content type. Can be `application/json` or `application/xml`.
+ :type notify_content_type: str
+ :param callback_data: Additional client data that will be sent on the notifyUrl.
+ :type callback_data: str
+ :param track: Enable or disable open and click tracking. Passing true will only enable tracking and the statistics would be visible in the web interface alone. This can be explicitly overridden by `trackClicks` and `trackOpens`.
+ :type track: bool
+ :param track_clicks: This parameter enables or disables track click feature. Note: Option to disable click tracking per URL is available. For detailed usage, please refer to the [documentation](https://www.infobip.com/docs/email/tracking-service#disable-click-tracking-on-urls).
+ :type track_clicks: bool
+ :param track_opens: This parameter enables or disables track open feature.
+ :type track_opens: bool
+ :param tracking_url: The URL on your callback server on which the open and click notifications will be sent. See [Tracking Notifications](https://www.infobip.com/docs/email/send-email-over-api#tracking-notifications) for details.
+ :type tracking_url: str
+ :param bulk_id: The ID uniquely identifies the sent email request. This filter will enable you to query delivery reports for all the messages using just one request. You will receive a `bulkId` in the response after sending an email request. If you don't set your own `bulkId`, unique ID will be generated by our system and returned in the API response. (Optional Field)
+ :type bulk_id: str
+ :param message_id: The ID that uniquely identifies the message sent to a recipient. (Optional Field)
+ :type message_id: str
+ :param campaign_reference_id: The ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns.
+ :type campaign_reference_id: str
+ :param reply_to: Email address to which recipients of the email can reply.
+ :type reply_to: str
+ :param default_placeholders: General placeholder, given in a form of json example: `defaultPlaceholders={\\\"ph1\\\": \\\"Success\\\"}`, which will replace given key `{{ph1}}` with given value `Success` anywhere in the email (subject, text, html...). In case of more destinations in `To` field, this placeholder will resolve the same value for key `ph1`.
+ :type default_placeholders: str
+ :param preserve_recipients: If set to `true`, the `to` recipients will see the list of all other recipients to get the email and the response will return only one `messageId`. Otherwise, each recipient will see just their own email and the response will return a unique `messageId` for each email recipient.
+ :type preserve_recipients: bool
+ :param send_at: To schedule message at a given time. Time provided should be in UTC in the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ` and cannot exceed 30 days in the future.
+ :type send_at: datetime
+ :param landing_page_placeholders: Personalize opt out landing page by inserting placeholders. Insert placeholder or tag while designing landing page.
+ :type landing_page_placeholders: str
+ :param landing_page_id: The ID of an opt out landing page to be used and displayed once an end user clicks the unsubscribe link. If not present, default opt out landing page will be displayed. Create a landing page in your Infobip account and use its ID, e.g., `1_23456`.
+ :type landing_page_id: str
+ :param template_language_version: Specifies template language version that will be used in the current message template. Use version 1 for previous version of template language. Use version 2 for features of the new template language. If not present version 1 will be used as default version.
+ :type template_language_version: str
+ :param client_priority: Adds a priority rating to this email message. Allowed values are `HIGH`, `STANDARD` and `LOW`. Messages with a higher priority value sent by your account are prioritized over messages with a lower priority value sent by your account. If no priority value is provided, messages will be treated with `STANDARD` priority by default.
+ :type client_priority: str
+ :param application_id: Required for application use in a send request for outbound traffic. Returned in notification events.
+ :type application_id: str
+ :param entity_id: Required for entity use in a send request for outbound traffic. Returned in notification events.
+ :type entity_id: str
+ :param headers: Additional email headers for customization that can be provided in a form of JSON. Example: `headers={\\\"X-CustomHeader\\\": \\\"Header value\\\"}`. There are a few exceptions of headers which are not adjustable through this option: `To`, `Cc`, `Bcc`, `From`, `Subject`,`Content-Type`, `DKIM-Signature`, `Content-Transfer-Encoding`, `Return-Path`, `MIME-Version`
+ :type headers: 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._send_email_serialize(
+ to=to,
+ var_from=var_from,
+ cc=cc,
+ bcc=bcc,
+ subject=subject,
+ text=text,
+ html=html,
+ amp_html=amp_html,
+ template_id=template_id,
+ attachment=attachment,
+ inline_image=inline_image,
+ intermediate_report=intermediate_report,
+ notify_url=notify_url,
+ notify_content_type=notify_content_type,
+ callback_data=callback_data,
+ track=track,
+ track_clicks=track_clicks,
+ track_opens=track_opens,
+ tracking_url=tracking_url,
+ bulk_id=bulk_id,
+ message_id=message_id,
+ campaign_reference_id=campaign_reference_id,
+ reply_to=reply_to,
+ default_placeholders=default_placeholders,
+ preserve_recipients=preserve_recipients,
+ send_at=send_at,
+ landing_page_placeholders=landing_page_placeholders,
+ landing_page_id=landing_page_id,
+ template_language_version=template_language_version,
+ client_priority=client_priority,
+ application_id=application_id,
+ entity_id=entity_id,
+ headers=headers,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailSendResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _send_email_serialize(
+ self,
+ to,
+ var_from,
+ cc,
+ bcc,
+ subject,
+ text,
+ html,
+ amp_html,
+ template_id,
+ attachment,
+ inline_image,
+ intermediate_report,
+ notify_url,
+ notify_content_type,
+ callback_data,
+ track,
+ track_clicks,
+ track_opens,
+ tracking_url,
+ bulk_id,
+ message_id,
+ campaign_reference_id,
+ reply_to,
+ default_placeholders,
+ preserve_recipients,
+ send_at,
+ landing_page_placeholders,
+ landing_page_id,
+ template_language_version,
+ client_priority,
+ application_id,
+ entity_id,
+ headers,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ "to": "multi",
+ "cc": "multi",
+ "bcc": "multi",
+ "attachment": "multi",
+ "inlineImage": "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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ if var_from is not None:
+ _form_params.append(("from", var_from))
+ if to is not None:
+ _form_params.append(("to", to))
+ if cc is not None:
+ _form_params.append(("cc", cc))
+ if bcc is not None:
+ _form_params.append(("bcc", bcc))
+ if subject is not None:
+ _form_params.append(("subject", subject))
+ if text is not None:
+ _form_params.append(("text", text))
+ if html is not None:
+ _form_params.append(("html", html))
+ if amp_html is not None:
+ _form_params.append(("ampHtml", amp_html))
+ if template_id is not None:
+ _form_params.append(("templateId", template_id))
+ if attachment is not None:
+ _files["attachment"] = attachment
+ if inline_image is not None:
+ _files["inlineImage"] = inline_image
+ if intermediate_report is not None:
+ _form_params.append(("intermediateReport", intermediate_report))
+ if notify_url is not None:
+ _form_params.append(("notifyUrl", notify_url))
+ if notify_content_type is not None:
+ _form_params.append(("notifyContentType", notify_content_type))
+ if callback_data is not None:
+ _form_params.append(("callbackData", callback_data))
+ if track is not None:
+ _form_params.append(("track", track))
+ if track_clicks is not None:
+ _form_params.append(("trackClicks", track_clicks))
+ if track_opens is not None:
+ _form_params.append(("trackOpens", track_opens))
+ if tracking_url is not None:
+ _form_params.append(("trackingUrl", tracking_url))
+ if bulk_id is not None:
+ _form_params.append(("bulkId", bulk_id))
+ if message_id is not None:
+ _form_params.append(("messageId", message_id))
+ if campaign_reference_id is not None:
+ _form_params.append(("campaignReferenceId", campaign_reference_id))
+ if reply_to is not None:
+ _form_params.append(("replyTo", reply_to))
+ if default_placeholders is not None:
+ _form_params.append(("defaultPlaceholders", default_placeholders))
+ if preserve_recipients is not None:
+ _form_params.append(("preserveRecipients", preserve_recipients))
+ if send_at is not None:
+ _form_params.append(("sendAt", send_at))
+ if landing_page_placeholders is not None:
+ _form_params.append(("landingPagePlaceholders", landing_page_placeholders))
+ if landing_page_id is not None:
+ _form_params.append(("landingPageId", landing_page_id))
+ if template_language_version is not None:
+ _form_params.append(("templateLanguageVersion", template_language_version))
+ if client_priority is not None:
+ _form_params.append(("clientPriority", client_priority))
+ if application_id is not None:
+ _form_params.append(("applicationId", application_id))
+ if entity_id is not None:
+ _form_params.append(("entityId", entity_id))
+ if headers is not None:
+ _form_params.append(("headers", headers))
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/email/3/send",
+ 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_domain_pool_priority(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ email_domain_ip_pool_update_request: EmailDomainIpPoolUpdateRequest,
+ _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:
+ """Update IP pool sending priority
+
+ Update specified pool's sending priority for the provided domain.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_id: int
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param email_domain_ip_pool_update_request: (required)
+ :type email_domain_ip_pool_update_request: EmailDomainIpPoolUpdateRequest
+ :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_domain_pool_priority_serialize(
+ domain_id=domain_id,
+ pool_id=pool_id,
+ email_domain_ip_pool_update_request=email_domain_ip_pool_update_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_domain_pool_priority_with_http_info(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ email_domain_ip_pool_update_request: EmailDomainIpPoolUpdateRequest,
+ _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]:
+ """Update IP pool sending priority
+
+ Update specified pool's sending priority for the provided domain.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_id: int
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param email_domain_ip_pool_update_request: (required)
+ :type email_domain_ip_pool_update_request: EmailDomainIpPoolUpdateRequest
+ :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_domain_pool_priority_serialize(
+ domain_id=domain_id,
+ pool_id=pool_id,
+ email_domain_ip_pool_update_request=email_domain_ip_pool_update_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_domain_pool_priority_without_preload_content(
+ self,
+ domain_id: Annotated[
+ int, Field(strict=True, ge=1, description="Domain identifier.")
+ ],
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ email_domain_ip_pool_update_request: EmailDomainIpPoolUpdateRequest,
+ _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:
+ """Update IP pool sending priority
+
+ Update specified pool's sending priority for the provided domain.
+
+ :param domain_id: Domain identifier. (required)
+ :type domain_id: int
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param email_domain_ip_pool_update_request: (required)
+ :type email_domain_ip_pool_update_request: EmailDomainIpPoolUpdateRequest
+ :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_domain_pool_priority_serialize(
+ domain_id=domain_id,
+ pool_id=pool_id,
+ email_domain_ip_pool_update_request=email_domain_ip_pool_update_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": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _update_domain_pool_priority_serialize(
+ self,
+ domain_id,
+ pool_id,
+ email_domain_ip_pool_update_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if domain_id is not None:
+ _path_params["domainId"] = domain_id
+ if pool_id is not None:
+ _path_params["poolId"] = pool_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if email_domain_ip_pool_update_request is not None:
+ _body_params = email_domain_ip_pool_update_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="PUT",
+ resource_path="/email/1/ip-management/domains/{domainId}/pools/{poolId}",
+ 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_ip_pool(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ email_ip_pool_create_request: EmailIpPoolCreateRequest,
+ _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,
+ ) -> EmailIpPoolResponse:
+ """Update IP pool
+
+ Update a provided IP pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param email_ip_pool_create_request: (required)
+ :type email_ip_pool_create_request: EmailIpPoolCreateRequest
+ :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_ip_pool_serialize(
+ pool_id=pool_id,
+ email_ip_pool_create_request=email_ip_pool_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpPoolResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_pool_with_http_info(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ email_ip_pool_create_request: EmailIpPoolCreateRequest,
+ _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[EmailIpPoolResponse]:
+ """Update IP pool
+
+ Update a provided IP pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param email_ip_pool_create_request: (required)
+ :type email_ip_pool_create_request: EmailIpPoolCreateRequest
+ :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_ip_pool_serialize(
+ pool_id=pool_id,
+ email_ip_pool_create_request=email_ip_pool_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpPoolResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ 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_ip_pool_without_preload_content(
+ self,
+ pool_id: Annotated[StrictStr, Field(description="IP pool identifier.")],
+ email_ip_pool_create_request: EmailIpPoolCreateRequest,
+ _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:
+ """Update IP pool
+
+ Update a provided IP pool.
+
+ :param pool_id: IP pool identifier. (required)
+ :type pool_id: str
+ :param email_ip_pool_create_request: (required)
+ :type email_ip_pool_create_request: EmailIpPoolCreateRequest
+ :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_ip_pool_serialize(
+ pool_id=pool_id,
+ email_ip_pool_create_request=email_ip_pool_create_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailIpPoolResponse",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "404": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _update_ip_pool_serialize(
+ self,
+ pool_id,
+ email_ip_pool_create_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if pool_id is not None:
+ _path_params["poolId"] = pool_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if email_ip_pool_create_request is not None:
+ _body_params = email_ip_pool_create_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="PUT",
+ resource_path="/email/1/ip-management/pools/{poolId}",
+ 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_return_path(
+ self,
+ domain_name: Annotated[
+ StrictStr,
+ Field(
+ description="Domain for which the return path address needs to be updated."
+ ),
+ ],
+ email_return_path_address_request: EmailReturnPathAddressRequest,
+ _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,
+ ) -> EmailDomainResponse:
+ """Update return path
+
+ API to update return path for the provided domain. The mailbox used for return path should be based on the same domain.
+
+ :param domain_name: Domain for which the return path address needs to be updated. (required)
+ :type domain_name: str
+ :param email_return_path_address_request: (required)
+ :type email_return_path_address_request: EmailReturnPathAddressRequest
+ :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_return_path_serialize(
+ domain_name=domain_name,
+ email_return_path_address_request=email_return_path_address_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_return_path_with_http_info(
+ self,
+ domain_name: Annotated[
+ StrictStr,
+ Field(
+ description="Domain for which the return path address needs to be updated."
+ ),
+ ],
+ email_return_path_address_request: EmailReturnPathAddressRequest,
+ _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[EmailDomainResponse]:
+ """Update return path
+
+ API to update return path for the provided domain. The mailbox used for return path should be based on the same domain.
+
+ :param domain_name: Domain for which the return path address needs to be updated. (required)
+ :type domain_name: str
+ :param email_return_path_address_request: (required)
+ :type email_return_path_address_request: EmailReturnPathAddressRequest
+ :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_return_path_serialize(
+ domain_name=domain_name,
+ email_return_path_address_request=email_return_path_address_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_return_path_without_preload_content(
+ self,
+ domain_name: Annotated[
+ StrictStr,
+ Field(
+ description="Domain for which the return path address needs to be updated."
+ ),
+ ],
+ email_return_path_address_request: EmailReturnPathAddressRequest,
+ _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:
+ """Update return path
+
+ API to update return path for the provided domain. The mailbox used for return path should be based on the same domain.
+
+ :param domain_name: Domain for which the return path address needs to be updated. (required)
+ :type domain_name: str
+ :param email_return_path_address_request: (required)
+ :type email_return_path_address_request: EmailReturnPathAddressRequest
+ :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_return_path_serialize(
+ domain_name=domain_name,
+ email_return_path_address_request=email_return_path_address_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _update_return_path_serialize(
+ self,
+ domain_name,
+ email_return_path_address_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if domain_name is not None:
+ _path_params["domainName"] = domain_name
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if email_return_path_address_request is not None:
+ _body_params = email_return_path_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="PUT",
+ resource_path="/email/1/domains/{domainName}/return-path",
+ 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_scheduled_email_statuses(
+ self,
+ bulk_id: Annotated[
+ StrictStr,
+ Field(description="The ID uniquely identifies the sent email request."),
+ ],
+ email_bulk_update_status_request: EmailBulkUpdateStatusRequest,
+ _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,
+ ) -> EmailBulkUpdateStatusResponse:
+ """Update scheduled Email messages status
+
+ Change status or completely cancel sending of scheduled messages.
+
+ :param bulk_id: The ID uniquely identifies the sent email request. (required)
+ :type bulk_id: str
+ :param email_bulk_update_status_request: (required)
+ :type email_bulk_update_status_request: EmailBulkUpdateStatusRequest
+ :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_scheduled_email_statuses_serialize(
+ bulk_id=bulk_id,
+ email_bulk_update_status_request=email_bulk_update_status_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkUpdateStatusResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_scheduled_email_statuses_with_http_info(
+ self,
+ bulk_id: Annotated[
+ StrictStr,
+ Field(description="The ID uniquely identifies the sent email request."),
+ ],
+ email_bulk_update_status_request: EmailBulkUpdateStatusRequest,
+ _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[EmailBulkUpdateStatusResponse]:
+ """Update scheduled Email messages status
+
+ Change status or completely cancel sending of scheduled messages.
+
+ :param bulk_id: The ID uniquely identifies the sent email request. (required)
+ :type bulk_id: str
+ :param email_bulk_update_status_request: (required)
+ :type email_bulk_update_status_request: EmailBulkUpdateStatusRequest
+ :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_scheduled_email_statuses_serialize(
+ bulk_id=bulk_id,
+ email_bulk_update_status_request=email_bulk_update_status_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkUpdateStatusResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_scheduled_email_statuses_without_preload_content(
+ self,
+ bulk_id: Annotated[
+ StrictStr,
+ Field(description="The ID uniquely identifies the sent email request."),
+ ],
+ email_bulk_update_status_request: EmailBulkUpdateStatusRequest,
+ _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:
+ """Update scheduled Email messages status
+
+ Change status or completely cancel sending of scheduled messages.
+
+ :param bulk_id: The ID uniquely identifies the sent email request. (required)
+ :type bulk_id: str
+ :param email_bulk_update_status_request: (required)
+ :type email_bulk_update_status_request: EmailBulkUpdateStatusRequest
+ :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_scheduled_email_statuses_serialize(
+ bulk_id=bulk_id,
+ email_bulk_update_status_request=email_bulk_update_status_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailBulkUpdateStatusResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _update_scheduled_email_statuses_serialize(
+ self,
+ bulk_id,
+ email_bulk_update_status_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if email_bulk_update_status_request is not None:
+ _body_params = email_bulk_update_status_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="PUT",
+ resource_path="/email/1/bulks/status",
+ 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_tracking_events(
+ self,
+ domain_name: Annotated[
+ StrictStr,
+ Field(
+ description="Domain for which the tracking events need to be updated."
+ ),
+ ],
+ email_tracking_event_request: EmailTrackingEventRequest,
+ _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,
+ ) -> EmailDomainResponse:
+ """Update tracking events
+
+ API to update tracking events for the provided domain. Tracking events can be updated only for CLICKS, OPENS and UNSUBSCRIBES.
+
+ :param domain_name: Domain for which the tracking events need to be updated. (required)
+ :type domain_name: str
+ :param email_tracking_event_request: (required)
+ :type email_tracking_event_request: EmailTrackingEventRequest
+ :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_tracking_events_serialize(
+ domain_name=domain_name,
+ email_tracking_event_request=email_tracking_event_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_tracking_events_with_http_info(
+ self,
+ domain_name: Annotated[
+ StrictStr,
+ Field(
+ description="Domain for which the tracking events need to be updated."
+ ),
+ ],
+ email_tracking_event_request: EmailTrackingEventRequest,
+ _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[EmailDomainResponse]:
+ """Update tracking events
+
+ API to update tracking events for the provided domain. Tracking events can be updated only for CLICKS, OPENS and UNSUBSCRIBES.
+
+ :param domain_name: Domain for which the tracking events need to be updated. (required)
+ :type domain_name: str
+ :param email_tracking_event_request: (required)
+ :type email_tracking_event_request: EmailTrackingEventRequest
+ :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_tracking_events_serialize(
+ domain_name=domain_name,
+ email_tracking_event_request=email_tracking_event_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_tracking_events_without_preload_content(
+ self,
+ domain_name: Annotated[
+ StrictStr,
+ Field(
+ description="Domain for which the tracking events need to be updated."
+ ),
+ ],
+ email_tracking_event_request: EmailTrackingEventRequest,
+ _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:
+ """Update tracking events
+
+ API to update tracking events for the provided domain. Tracking events can be updated only for CLICKS, OPENS and UNSUBSCRIBES.
+
+ :param domain_name: Domain for which the tracking events need to be updated. (required)
+ :type domain_name: str
+ :param email_tracking_event_request: (required)
+ :type email_tracking_event_request: EmailTrackingEventRequest
+ :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_tracking_events_serialize(
+ domain_name=domain_name,
+ email_tracking_event_request=email_tracking_event_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailDomainResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _update_tracking_events_serialize(
+ self,
+ domain_name,
+ email_tracking_event_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if domain_name is not None:
+ _path_params["domainName"] = domain_name
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if email_tracking_event_request is not None:
+ _body_params = email_tracking_event_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="PUT",
+ resource_path="/email/1/domains/{domainName}/tracking",
+ 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 validate_email_addresses(
+ self,
+ email_validation_request: EmailValidationRequest,
+ _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,
+ ) -> EmailValidationResponse:
+ """Validate email addresses
+
+ Run validation to identify poor quality emails to clean up your recipient list.
+
+ :param email_validation_request: (required)
+ :type email_validation_request: EmailValidationRequest
+ :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._validate_email_addresses_serialize(
+ email_validation_request=email_validation_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailValidationResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 validate_email_addresses_with_http_info(
+ self,
+ email_validation_request: EmailValidationRequest,
+ _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[EmailValidationResponse]:
+ """Validate email addresses
+
+ Run validation to identify poor quality emails to clean up your recipient list.
+
+ :param email_validation_request: (required)
+ :type email_validation_request: EmailValidationRequest
+ :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._validate_email_addresses_serialize(
+ email_validation_request=email_validation_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailValidationResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 validate_email_addresses_without_preload_content(
+ self,
+ email_validation_request: EmailValidationRequest,
+ _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:
+ """Validate email addresses
+
+ Run validation to identify poor quality emails to clean up your recipient list.
+
+ :param email_validation_request: (required)
+ :type email_validation_request: EmailValidationRequest
+ :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._validate_email_addresses_serialize(
+ email_validation_request=email_validation_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "EmailValidationResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _validate_email_addresses_serialize(
+ self,
+ email_validation_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 email_validation_request is not None:
+ _body_params = email_validation_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/email/2/validation",
+ 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 verify_domain(
+ self,
+ domain_name: Annotated[
+ StrictStr, Field(description="Name of the domain that has to be verified.")
+ ],
+ _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:
+ """Verify Domain
+
+ API request to verify records(TXT, MX, DKIM) associated with the provided domain.
+
+ :param domain_name: Name of the domain that has to be verified. (required)
+ :type domain_name: 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._verify_domain_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "202": None,
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 verify_domain_with_http_info(
+ self,
+ domain_name: Annotated[
+ StrictStr, Field(description="Name of the domain that has to be verified.")
+ ],
+ _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]:
+ """Verify Domain
+
+ API request to verify records(TXT, MX, DKIM) associated with the provided domain.
+
+ :param domain_name: Name of the domain that has to be verified. (required)
+ :type domain_name: 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._verify_domain_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "202": None,
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 verify_domain_without_preload_content(
+ self,
+ domain_name: Annotated[
+ StrictStr, Field(description="Name of the domain that has to be verified.")
+ ],
+ _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:
+ """Verify Domain
+
+ API request to verify records(TXT, MX, DKIM) associated with the provided domain.
+
+ :param domain_name: Name of the domain that has to be verified. (required)
+ :type domain_name: 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._verify_domain_serialize(
+ domain_name=domain_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "202": None,
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _verify_domain_serialize(
+ self,
+ domain_name,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if domain_name is not None:
+ _path_params["domainName"] = domain_name
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/email/1/domains/{domainName}/verify",
+ 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/infobip_api_client/api/flow_api.py b/infobip_api_client/api/flow_api.py
new file mode 100644
index 0000000..9593e58
--- /dev/null
+++ b/infobip_api_client/api/flow_api.py
@@ -0,0 +1,989 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from pydantic import Field, StrictInt, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from infobip_api_client.models.flow_add_flow_participants_request import (
+ FlowAddFlowParticipantsRequest,
+)
+from infobip_api_client.models.flow_add_flow_participants_response import (
+ FlowAddFlowParticipantsResponse,
+)
+from infobip_api_client.models.flow_participants_report_response import (
+ FlowParticipantsReportResponse,
+)
+
+from infobip_api_client.api_client import ApiClient, RequestSerialized
+from infobip_api_client.api_response import ApiResponse
+from infobip_api_client.rest import RESTResponseType
+
+
+class FlowApi:
+ """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_flow_participants(
+ self,
+ campaign_id: Annotated[
+ StrictInt,
+ Field(
+ description="Unique identifier of the flow that participant will be added to."
+ ),
+ ],
+ flow_add_flow_participants_request: FlowAddFlowParticipantsRequest,
+ _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,
+ ) -> FlowAddFlowParticipantsResponse:
+ """Add participants to flow
+
+ Use this endpoint to add participants to a flow, accommodating anywhere from 1 to 1000 persons. When participants are added, their profiles in People are automatically created, updated or merged based on the identifiers provided.
If identifiers are unique, a new profile is created.
If identifiers match an existing profile, then that profile is updated.
If identifiers refer to multiple existing profiles or are not unique within the request, profiles are merged.
To prevent unwanted merges, ensure each participant's identifiers (identifyBy
, externalId
and contactInformation
) are unique.
+
+ :param campaign_id: Unique identifier of the flow that participant will be added to. (required)
+ :type campaign_id: int
+ :param flow_add_flow_participants_request: (required)
+ :type flow_add_flow_participants_request: FlowAddFlowParticipantsRequest
+ :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_flow_participants_serialize(
+ campaign_id=campaign_id,
+ flow_add_flow_participants_request=flow_add_flow_participants_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FlowAddFlowParticipantsResponse",
+ "400": "FlowApiException",
+ "401": "FlowApiException",
+ "403": "FlowApiException",
+ "404": "FlowApiException",
+ "429": "FlowApiException",
+ "500": "FlowApiException",
+ }
+
+ 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_flow_participants_with_http_info(
+ self,
+ campaign_id: Annotated[
+ StrictInt,
+ Field(
+ description="Unique identifier of the flow that participant will be added to."
+ ),
+ ],
+ flow_add_flow_participants_request: FlowAddFlowParticipantsRequest,
+ _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[FlowAddFlowParticipantsResponse]:
+ """Add participants to flow
+
+ Use this endpoint to add participants to a flow, accommodating anywhere from 1 to 1000 persons. When participants are added, their profiles in People are automatically created, updated or merged based on the identifiers provided.
If identifiers are unique, a new profile is created.
If identifiers match an existing profile, then that profile is updated.
If identifiers refer to multiple existing profiles or are not unique within the request, profiles are merged.
To prevent unwanted merges, ensure each participant's identifiers (identifyBy
, externalId
and contactInformation
) are unique.
+
+ :param campaign_id: Unique identifier of the flow that participant will be added to. (required)
+ :type campaign_id: int
+ :param flow_add_flow_participants_request: (required)
+ :type flow_add_flow_participants_request: FlowAddFlowParticipantsRequest
+ :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_flow_participants_serialize(
+ campaign_id=campaign_id,
+ flow_add_flow_participants_request=flow_add_flow_participants_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FlowAddFlowParticipantsResponse",
+ "400": "FlowApiException",
+ "401": "FlowApiException",
+ "403": "FlowApiException",
+ "404": "FlowApiException",
+ "429": "FlowApiException",
+ "500": "FlowApiException",
+ }
+
+ 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_flow_participants_without_preload_content(
+ self,
+ campaign_id: Annotated[
+ StrictInt,
+ Field(
+ description="Unique identifier of the flow that participant will be added to."
+ ),
+ ],
+ flow_add_flow_participants_request: FlowAddFlowParticipantsRequest,
+ _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 participants to flow
+
+ Use this endpoint to add participants to a flow, accommodating anywhere from 1 to 1000 persons. When participants are added, their profiles in People are automatically created, updated or merged based on the identifiers provided.
If identifiers are unique, a new profile is created.
If identifiers match an existing profile, then that profile is updated.
If identifiers refer to multiple existing profiles or are not unique within the request, profiles are merged.
To prevent unwanted merges, ensure each participant's identifiers (identifyBy
, externalId
and contactInformation
) are unique.
+
+ :param campaign_id: Unique identifier of the flow that participant will be added to. (required)
+ :type campaign_id: int
+ :param flow_add_flow_participants_request: (required)
+ :type flow_add_flow_participants_request: FlowAddFlowParticipantsRequest
+ :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_flow_participants_serialize(
+ campaign_id=campaign_id,
+ flow_add_flow_participants_request=flow_add_flow_participants_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FlowAddFlowParticipantsResponse",
+ "400": "FlowApiException",
+ "401": "FlowApiException",
+ "403": "FlowApiException",
+ "404": "FlowApiException",
+ "429": "FlowApiException",
+ "500": "FlowApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _add_flow_participants_serialize(
+ self,
+ campaign_id,
+ flow_add_flow_participants_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_id is not None:
+ _path_params["campaignId"] = campaign_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if flow_add_flow_participants_request is not None:
+ _body_params = flow_add_flow_participants_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/moments/1/flows/{campaignId}/participants",
+ 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_flow_participants_added_report(
+ self,
+ campaign_id: Annotated[
+ StrictInt,
+ Field(
+ description="Unique identifier of the flow that participant will be added to."
+ ),
+ ],
+ operation_id: Annotated[
+ StrictStr, Field(description="Unique identifier of the operation.")
+ ],
+ _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,
+ ) -> FlowParticipantsReportResponse:
+ """Get a report on participants added to flow
+
+ Use this API endpoint to fetch a report to confirm that all persons have been successfully added to the flow. Please note that report is stored for 30 days.
+
+ :param campaign_id: Unique identifier of the flow that participant will be added to. (required)
+ :type campaign_id: int
+ :param operation_id: Unique identifier of the operation. (required)
+ :type operation_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_flow_participants_added_report_serialize(
+ campaign_id=campaign_id,
+ operation_id=operation_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FlowParticipantsReportResponse",
+ "401": "FlowApiException",
+ "403": "FlowApiException",
+ "404": None,
+ "429": "FlowApiException",
+ "500": "FlowApiException",
+ }
+
+ 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_flow_participants_added_report_with_http_info(
+ self,
+ campaign_id: Annotated[
+ StrictInt,
+ Field(
+ description="Unique identifier of the flow that participant will be added to."
+ ),
+ ],
+ operation_id: Annotated[
+ StrictStr, Field(description="Unique identifier of the operation.")
+ ],
+ _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[FlowParticipantsReportResponse]:
+ """Get a report on participants added to flow
+
+ Use this API endpoint to fetch a report to confirm that all persons have been successfully added to the flow. Please note that report is stored for 30 days.
+
+ :param campaign_id: Unique identifier of the flow that participant will be added to. (required)
+ :type campaign_id: int
+ :param operation_id: Unique identifier of the operation. (required)
+ :type operation_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_flow_participants_added_report_serialize(
+ campaign_id=campaign_id,
+ operation_id=operation_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FlowParticipantsReportResponse",
+ "401": "FlowApiException",
+ "403": "FlowApiException",
+ "404": None,
+ "429": "FlowApiException",
+ "500": "FlowApiException",
+ }
+
+ 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_flow_participants_added_report_without_preload_content(
+ self,
+ campaign_id: Annotated[
+ StrictInt,
+ Field(
+ description="Unique identifier of the flow that participant will be added to."
+ ),
+ ],
+ operation_id: Annotated[
+ StrictStr, Field(description="Unique identifier of the operation.")
+ ],
+ _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 report on participants added to flow
+
+ Use this API endpoint to fetch a report to confirm that all persons have been successfully added to the flow. Please note that report is stored for 30 days.
+
+ :param campaign_id: Unique identifier of the flow that participant will be added to. (required)
+ :type campaign_id: int
+ :param operation_id: Unique identifier of the operation. (required)
+ :type operation_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_flow_participants_added_report_serialize(
+ campaign_id=campaign_id,
+ operation_id=operation_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FlowParticipantsReportResponse",
+ "401": "FlowApiException",
+ "403": "FlowApiException",
+ "404": None,
+ "429": "FlowApiException",
+ "500": "FlowApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_flow_participants_added_report_serialize(
+ self,
+ campaign_id,
+ operation_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_id is not None:
+ _path_params["campaignId"] = campaign_id
+ # process the query parameters
+ if operation_id is not None:
+
+ _query_params.append(("operationId", operation_id))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/moments/1/flows/{campaignId}/participants/report",
+ 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 remove_people_from_flow(
+ self,
+ campaign_id: Annotated[
+ StrictInt,
+ Field(
+ description="Unique identifier of the flow that person will be removed from."
+ ),
+ ],
+ phone: Annotated[
+ Optional[StrictStr], Field(description="Person's phone number.")
+ ] = None,
+ email: Annotated[
+ Optional[StrictStr], Field(description="Person's email address.")
+ ] = None,
+ external_id: Annotated[
+ Optional[StrictStr],
+ Field(description="Unique ID for the person from an external system."),
+ ] = 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,
+ ) -> None:
+ """Remove person from flow
+
+ Removes a participant with given identifier from the flow.
+
+ :param campaign_id: Unique identifier of the flow that person will be removed from. (required)
+ :type campaign_id: int
+ :param phone: Person's phone number.
+ :type phone: str
+ :param email: Person's email address.
+ :type email: str
+ :param external_id: Unique ID for the person from an external system.
+ :type external_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._remove_people_from_flow_serialize(
+ campaign_id=campaign_id,
+ phone=phone,
+ email=email,
+ external_id=external_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": None,
+ "400": "FlowExceptionResponse",
+ "401": "FlowApiException",
+ "403": "FlowApiException",
+ "404": "FlowExceptionResponse",
+ "429": "FlowApiException",
+ "500": "FlowApiException",
+ }
+
+ 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 remove_people_from_flow_with_http_info(
+ self,
+ campaign_id: Annotated[
+ StrictInt,
+ Field(
+ description="Unique identifier of the flow that person will be removed from."
+ ),
+ ],
+ phone: Annotated[
+ Optional[StrictStr], Field(description="Person's phone number.")
+ ] = None,
+ email: Annotated[
+ Optional[StrictStr], Field(description="Person's email address.")
+ ] = None,
+ external_id: Annotated[
+ Optional[StrictStr],
+ Field(description="Unique ID for the person from an external system."),
+ ] = 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[None]:
+ """Remove person from flow
+
+ Removes a participant with given identifier from the flow.
+
+ :param campaign_id: Unique identifier of the flow that person will be removed from. (required)
+ :type campaign_id: int
+ :param phone: Person's phone number.
+ :type phone: str
+ :param email: Person's email address.
+ :type email: str
+ :param external_id: Unique ID for the person from an external system.
+ :type external_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._remove_people_from_flow_serialize(
+ campaign_id=campaign_id,
+ phone=phone,
+ email=email,
+ external_id=external_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": None,
+ "400": "FlowExceptionResponse",
+ "401": "FlowApiException",
+ "403": "FlowApiException",
+ "404": "FlowExceptionResponse",
+ "429": "FlowApiException",
+ "500": "FlowApiException",
+ }
+
+ 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 remove_people_from_flow_without_preload_content(
+ self,
+ campaign_id: Annotated[
+ StrictInt,
+ Field(
+ description="Unique identifier of the flow that person will be removed from."
+ ),
+ ],
+ phone: Annotated[
+ Optional[StrictStr], Field(description="Person's phone number.")
+ ] = None,
+ email: Annotated[
+ Optional[StrictStr], Field(description="Person's email address.")
+ ] = None,
+ external_id: Annotated[
+ Optional[StrictStr],
+ Field(description="Unique ID for the person from an external system."),
+ ] = 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:
+ """Remove person from flow
+
+ Removes a participant with given identifier from the flow.
+
+ :param campaign_id: Unique identifier of the flow that person will be removed from. (required)
+ :type campaign_id: int
+ :param phone: Person's phone number.
+ :type phone: str
+ :param email: Person's email address.
+ :type email: str
+ :param external_id: Unique ID for the person from an external system.
+ :type external_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._remove_people_from_flow_serialize(
+ campaign_id=campaign_id,
+ phone=phone,
+ email=email,
+ external_id=external_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": None,
+ "400": "FlowExceptionResponse",
+ "401": "FlowApiException",
+ "403": "FlowApiException",
+ "404": "FlowExceptionResponse",
+ "429": "FlowApiException",
+ "500": "FlowApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _remove_people_from_flow_serialize(
+ self,
+ campaign_id,
+ phone,
+ email,
+ external_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if campaign_id is not None:
+ _path_params["campaignId"] = campaign_id
+ # process the query parameters
+ if phone is not None:
+
+ _query_params.append(("phone", phone))
+
+ if email is not None:
+
+ _query_params.append(("email", email))
+
+ if external_id is not None:
+
+ _query_params.append(("externalId", external_id))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="DELETE",
+ resource_path="/communication/1/flows/{campaignId}/participants",
+ 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/infobip_api_client/api/forms_api.py b/infobip_api_client/api/forms_api.py
new file mode 100644
index 0000000..2098e2a
--- /dev/null
+++ b/infobip_api_client/api/forms_api.py
@@ -0,0 +1,1238 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from pydantic import Field, StrictInt, StrictStr, field_validator
+from typing import Any, Dict, Optional
+from typing_extensions import Annotated
+from infobip_api_client.models.forms_response import FormsResponse
+from infobip_api_client.models.forms_response_content import FormsResponseContent
+from infobip_api_client.models.forms_status import FormsStatus
+from infobip_api_client.models.forms_status_response import FormsStatusResponse
+
+from infobip_api_client.api_client import ApiClient, RequestSerialized
+from infobip_api_client.api_response import ApiResponse
+from infobip_api_client.rest import RESTResponseType
+
+
+class FormsApi:
+ """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_form(
+ self,
+ id: Annotated[StrictStr, Field(description="ID of a form")],
+ _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,
+ ) -> FormsResponseContent:
+ """Get form
+
+ Use this method to get a form by its ID.
+
+ :param id: ID of a form (required)
+ :type 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_form_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsResponseContent",
+ "401": "FormsException",
+ "403": "FormsException",
+ "404": "FormsException",
+ "500": "FormsException",
+ }
+
+ 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_form_with_http_info(
+ self,
+ id: Annotated[StrictStr, Field(description="ID of a form")],
+ _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[FormsResponseContent]:
+ """Get form
+
+ Use this method to get a form by its ID.
+
+ :param id: ID of a form (required)
+ :type 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_form_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsResponseContent",
+ "401": "FormsException",
+ "403": "FormsException",
+ "404": "FormsException",
+ "500": "FormsException",
+ }
+
+ 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_form_without_preload_content(
+ self,
+ id: Annotated[StrictStr, Field(description="ID of a form")],
+ _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 form
+
+ Use this method to get a form by its ID.
+
+ :param id: ID of a form (required)
+ :type 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_form_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsResponseContent",
+ "401": "FormsException",
+ "403": "FormsException",
+ "404": "FormsException",
+ "500": "FormsException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_form_serialize(
+ self,
+ id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if id is not None:
+ _path_params["id"] = 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/forms/1/forms/{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_forms(
+ self,
+ offset: Annotated[
+ Optional[StrictInt],
+ Field(description="Skip first {offset} forms of the list."),
+ ] = None,
+ limit: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="The maximum number of returned forms. Maximum value is `100`."
+ ),
+ ] = None,
+ form_type: Annotated[
+ Optional[StrictStr], Field(description="The type of returned forms.")
+ ] = None,
+ form_status: Annotated[
+ Optional[FormsStatus], Field(description="The status of returned forms.")
+ ] = 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,
+ ) -> FormsResponse:
+ """Get forms
+
+ Use this method to get a list of forms.
+
+ :param offset: Skip first {offset} forms of the list.
+ :type offset: int
+ :param limit: The maximum number of returned forms. Maximum value is `100`.
+ :type limit: int
+ :param form_type: The type of returned forms.
+ :type form_type: str
+ :param form_status: The status of returned forms.
+ :type form_status: FormsStatus
+ :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_forms_serialize(
+ offset=offset,
+ limit=limit,
+ form_type=form_type,
+ form_status=form_status,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsResponse",
+ "400": "FormsException",
+ "401": "FormsException",
+ "403": "FormsException",
+ "500": "FormsException",
+ }
+
+ 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_forms_with_http_info(
+ self,
+ offset: Annotated[
+ Optional[StrictInt],
+ Field(description="Skip first {offset} forms of the list."),
+ ] = None,
+ limit: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="The maximum number of returned forms. Maximum value is `100`."
+ ),
+ ] = None,
+ form_type: Annotated[
+ Optional[StrictStr], Field(description="The type of returned forms.")
+ ] = None,
+ form_status: Annotated[
+ Optional[FormsStatus], Field(description="The status of returned forms.")
+ ] = 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[FormsResponse]:
+ """Get forms
+
+ Use this method to get a list of forms.
+
+ :param offset: Skip first {offset} forms of the list.
+ :type offset: int
+ :param limit: The maximum number of returned forms. Maximum value is `100`.
+ :type limit: int
+ :param form_type: The type of returned forms.
+ :type form_type: str
+ :param form_status: The status of returned forms.
+ :type form_status: FormsStatus
+ :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_forms_serialize(
+ offset=offset,
+ limit=limit,
+ form_type=form_type,
+ form_status=form_status,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsResponse",
+ "400": "FormsException",
+ "401": "FormsException",
+ "403": "FormsException",
+ "500": "FormsException",
+ }
+
+ 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_forms_without_preload_content(
+ self,
+ offset: Annotated[
+ Optional[StrictInt],
+ Field(description="Skip first {offset} forms of the list."),
+ ] = None,
+ limit: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="The maximum number of returned forms. Maximum value is `100`."
+ ),
+ ] = None,
+ form_type: Annotated[
+ Optional[StrictStr], Field(description="The type of returned forms.")
+ ] = None,
+ form_status: Annotated[
+ Optional[FormsStatus], Field(description="The status of returned forms.")
+ ] = 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 forms
+
+ Use this method to get a list of forms.
+
+ :param offset: Skip first {offset} forms of the list.
+ :type offset: int
+ :param limit: The maximum number of returned forms. Maximum value is `100`.
+ :type limit: int
+ :param form_type: The type of returned forms.
+ :type form_type: str
+ :param form_status: The status of returned forms.
+ :type form_status: FormsStatus
+ :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_forms_serialize(
+ offset=offset,
+ limit=limit,
+ form_type=form_type,
+ form_status=form_status,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsResponse",
+ "400": "FormsException",
+ "401": "FormsException",
+ "403": "FormsException",
+ "500": "FormsException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_forms_serialize(
+ self,
+ offset,
+ limit,
+ form_type,
+ form_status,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if offset is not None:
+
+ _query_params.append(("offset", offset))
+
+ if limit is not None:
+
+ _query_params.append(("limit", limit))
+
+ if form_type is not None:
+
+ _query_params.append(("formType", form_type))
+
+ if form_status is not None:
+
+ _query_params.append(("formStatus", form_status.value))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/forms/1/forms",
+ 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 increment_view_count(
+ self,
+ id: Annotated[StrictStr, Field(description="ID of a form")],
+ _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,
+ ) -> FormsStatusResponse:
+ """Increment form view count
+
+ Use this method to increase the view counter of a specific form. It's used for proper statistics calculation. Statistics are available on the form performance page on the Portal.
+
+ :param id: ID of a form (required)
+ :type 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._increment_view_count_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsStatusResponse",
+ "401": "FormsException",
+ "403": "FormsException",
+ "404": "FormsException",
+ "500": "FormsException",
+ }
+
+ 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 increment_view_count_with_http_info(
+ self,
+ id: Annotated[StrictStr, Field(description="ID of a form")],
+ _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[FormsStatusResponse]:
+ """Increment form view count
+
+ Use this method to increase the view counter of a specific form. It's used for proper statistics calculation. Statistics are available on the form performance page on the Portal.
+
+ :param id: ID of a form (required)
+ :type 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._increment_view_count_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsStatusResponse",
+ "401": "FormsException",
+ "403": "FormsException",
+ "404": "FormsException",
+ "500": "FormsException",
+ }
+
+ 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 increment_view_count_without_preload_content(
+ self,
+ id: Annotated[StrictStr, Field(description="ID of a form")],
+ _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:
+ """Increment form view count
+
+ Use this method to increase the view counter of a specific form. It's used for proper statistics calculation. Statistics are available on the form performance page on the Portal.
+
+ :param id: ID of a form (required)
+ :type 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._increment_view_count_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsStatusResponse",
+ "401": "FormsException",
+ "403": "FormsException",
+ "404": "FormsException",
+ "500": "FormsException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _increment_view_count_serialize(
+ self,
+ id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if id is not None:
+ _path_params["id"] = 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/forms/1/forms/{id}/views",
+ 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 submit_form_data(
+ self,
+ id: Annotated[StrictStr, Field(description="ID of a form")],
+ body: Annotated[Dict[str, Any], Field(description="Form Data")],
+ ib_submission_source: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="By sending source information you will be able to see Analytics by Source – It reflects the submission rates by source if your form is present in numerous places."
+ ),
+ ] = None,
+ ib_submission_form_campaign: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="By sending campaign information you will be able to see Analytics by Campaign – It reflects the submission rates by campaign if your form is included in multiple campaigns."
+ ),
+ ] = 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,
+ ) -> FormsStatusResponse:
+ """Submit form data
+
+ Use this method to submit form data.
+
+ :param id: ID of a form (required)
+ :type id: str
+ :param body: Form Data (required)
+ :type body: object
+ :param ib_submission_source: By sending source information you will be able to see Analytics by Source – It reflects the submission rates by source if your form is present in numerous places.
+ :type ib_submission_source: str
+ :param ib_submission_form_campaign: By sending campaign information you will be able to see Analytics by Campaign – It reflects the submission rates by campaign if your form is included in multiple campaigns.
+ :type ib_submission_form_campaign: 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._submit_form_data_serialize(
+ id=id,
+ body=body,
+ ib_submission_source=ib_submission_source,
+ ib_submission_form_campaign=ib_submission_form_campaign,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsStatusResponse",
+ "400": "FormsException",
+ "401": "FormsException",
+ "403": "FormsException",
+ "404": "FormsException",
+ "429": "FormsException",
+ "500": "FormsException",
+ }
+
+ 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 submit_form_data_with_http_info(
+ self,
+ id: Annotated[StrictStr, Field(description="ID of a form")],
+ body: Annotated[Dict[str, Any], Field(description="Form Data")],
+ ib_submission_source: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="By sending source information you will be able to see Analytics by Source – It reflects the submission rates by source if your form is present in numerous places."
+ ),
+ ] = None,
+ ib_submission_form_campaign: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="By sending campaign information you will be able to see Analytics by Campaign – It reflects the submission rates by campaign if your form is included in multiple campaigns."
+ ),
+ ] = 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[FormsStatusResponse]:
+ """Submit form data
+
+ Use this method to submit form data.
+
+ :param id: ID of a form (required)
+ :type id: str
+ :param body: Form Data (required)
+ :type body: object
+ :param ib_submission_source: By sending source information you will be able to see Analytics by Source – It reflects the submission rates by source if your form is present in numerous places.
+ :type ib_submission_source: str
+ :param ib_submission_form_campaign: By sending campaign information you will be able to see Analytics by Campaign – It reflects the submission rates by campaign if your form is included in multiple campaigns.
+ :type ib_submission_form_campaign: 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._submit_form_data_serialize(
+ id=id,
+ body=body,
+ ib_submission_source=ib_submission_source,
+ ib_submission_form_campaign=ib_submission_form_campaign,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsStatusResponse",
+ "400": "FormsException",
+ "401": "FormsException",
+ "403": "FormsException",
+ "404": "FormsException",
+ "429": "FormsException",
+ "500": "FormsException",
+ }
+
+ 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 submit_form_data_without_preload_content(
+ self,
+ id: Annotated[StrictStr, Field(description="ID of a form")],
+ body: Annotated[Dict[str, Any], Field(description="Form Data")],
+ ib_submission_source: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="By sending source information you will be able to see Analytics by Source – It reflects the submission rates by source if your form is present in numerous places."
+ ),
+ ] = None,
+ ib_submission_form_campaign: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="By sending campaign information you will be able to see Analytics by Campaign – It reflects the submission rates by campaign if your form is included in multiple campaigns."
+ ),
+ ] = 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:
+ """Submit form data
+
+ Use this method to submit form data.
+
+ :param id: ID of a form (required)
+ :type id: str
+ :param body: Form Data (required)
+ :type body: object
+ :param ib_submission_source: By sending source information you will be able to see Analytics by Source – It reflects the submission rates by source if your form is present in numerous places.
+ :type ib_submission_source: str
+ :param ib_submission_form_campaign: By sending campaign information you will be able to see Analytics by Campaign – It reflects the submission rates by campaign if your form is included in multiple campaigns.
+ :type ib_submission_form_campaign: 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._submit_form_data_serialize(
+ id=id,
+ body=body,
+ ib_submission_source=ib_submission_source,
+ ib_submission_form_campaign=ib_submission_form_campaign,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "FormsStatusResponse",
+ "400": "FormsException",
+ "401": "FormsException",
+ "403": "FormsException",
+ "404": "FormsException",
+ "429": "FormsException",
+ "500": "FormsException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _submit_form_data_serialize(
+ self,
+ id,
+ body,
+ ib_submission_source,
+ ib_submission_form_campaign,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if id is not None:
+ _path_params["id"] = id
+ # process the query parameters
+ # process the header parameters
+ if ib_submission_source is not None:
+ _header_params["ib-submission-source"] = ib_submission_source
+ if ib_submission_form_campaign is not None:
+ _header_params["ib-submission-form-campaign"] = ib_submission_form_campaign
+ # process the form parameters
+ # process the body parameter
+ if body is not None:
+ _body_params = body
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/forms/1/forms/{id}/data",
+ 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/infobip_api_client/api/number_masking_api.py b/infobip_api_client/api/number_masking_api.py
new file mode 100644
index 0000000..b8b3b90
--- /dev/null
+++ b/infobip_api_client/api/number_masking_api.py
@@ -0,0 +1,2639 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from pydantic import Field, StrictStr
+from typing import Any, Dict, List
+from typing_extensions import Annotated
+from infobip_api_client.models.number_masking_credentials_body import (
+ NumberMaskingCredentialsBody,
+)
+from infobip_api_client.models.number_masking_credentials_response import (
+ NumberMaskingCredentialsResponse,
+)
+from infobip_api_client.models.number_masking_setup_body import NumberMaskingSetupBody
+from infobip_api_client.models.number_masking_setup_response import (
+ NumberMaskingSetupResponse,
+)
+from infobip_api_client.models.number_masking_upload_body import NumberMaskingUploadBody
+from infobip_api_client.models.number_masking_upload_response import (
+ NumberMaskingUploadResponse,
+)
+
+from infobip_api_client.api_client import ApiClient, RequestSerialized
+from infobip_api_client.api_response import ApiResponse
+from infobip_api_client.rest import RESTResponseType
+
+
+class NumberMaskingApi:
+ """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_number_masking_configuration(
+ self,
+ number_masking_setup_body: NumberMaskingSetupBody,
+ _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,
+ ) -> NumberMaskingSetupResponse:
+ """Create number masking configuration
+
+ This method allows you to create masking configuration.
+
+ :param number_masking_setup_body: (required)
+ :type number_masking_setup_body: NumberMaskingSetupBody
+ :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_number_masking_configuration_serialize(
+ number_masking_setup_body=number_masking_setup_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingSetupResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_number_masking_configuration_with_http_info(
+ self,
+ number_masking_setup_body: NumberMaskingSetupBody,
+ _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[NumberMaskingSetupResponse]:
+ """Create number masking configuration
+
+ This method allows you to create masking configuration.
+
+ :param number_masking_setup_body: (required)
+ :type number_masking_setup_body: NumberMaskingSetupBody
+ :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_number_masking_configuration_serialize(
+ number_masking_setup_body=number_masking_setup_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingSetupResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_number_masking_configuration_without_preload_content(
+ self,
+ number_masking_setup_body: NumberMaskingSetupBody,
+ _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:
+ """Create number masking configuration
+
+ This method allows you to create masking configuration.
+
+ :param number_masking_setup_body: (required)
+ :type number_masking_setup_body: NumberMaskingSetupBody
+ :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_number_masking_configuration_serialize(
+ number_masking_setup_body=number_masking_setup_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingSetupResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _create_number_masking_configuration_serialize(
+ self,
+ number_masking_setup_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 number_masking_setup_body is not None:
+ _body_params = number_masking_setup_body
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/voice/masking/2/config",
+ 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_number_masking_credentials(
+ self,
+ number_masking_credentials_body: NumberMaskingCredentialsBody,
+ _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,
+ ) -> NumberMaskingCredentialsResponse:
+ """Create number masking credentials
+
+ This method allows you to create Voice number masking credentials.
+
+ :param number_masking_credentials_body: (required)
+ :type number_masking_credentials_body: NumberMaskingCredentialsBody
+ :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_number_masking_credentials_serialize(
+ number_masking_credentials_body=number_masking_credentials_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingCredentialsResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "409": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_credentials_with_http_info(
+ self,
+ number_masking_credentials_body: NumberMaskingCredentialsBody,
+ _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[NumberMaskingCredentialsResponse]:
+ """Create number masking credentials
+
+ This method allows you to create Voice number masking credentials.
+
+ :param number_masking_credentials_body: (required)
+ :type number_masking_credentials_body: NumberMaskingCredentialsBody
+ :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_number_masking_credentials_serialize(
+ number_masking_credentials_body=number_masking_credentials_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingCredentialsResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "409": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_credentials_without_preload_content(
+ self,
+ number_masking_credentials_body: NumberMaskingCredentialsBody,
+ _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:
+ """Create number masking credentials
+
+ This method allows you to create Voice number masking credentials.
+
+ :param number_masking_credentials_body: (required)
+ :type number_masking_credentials_body: NumberMaskingCredentialsBody
+ :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_number_masking_credentials_serialize(
+ number_masking_credentials_body=number_masking_credentials_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingCredentialsResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "409": None,
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _create_number_masking_credentials_serialize(
+ self,
+ number_masking_credentials_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 number_masking_credentials_body is not None:
+ _body_params = number_masking_credentials_body
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/voice/masking/2/credentials",
+ 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_number_masking_configuration(
+ self,
+ key: Annotated[
+ StrictStr, Field(description="Masking configuration identifier.")
+ ],
+ _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 number masking configuration
+
+ This method allows you to delete a Voice number masking configuration.
+
+ :param key: Masking configuration identifier. (required)
+ :type key: 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_number_masking_configuration_serialize(
+ key=key,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": None,
+ "400": None,
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_configuration_with_http_info(
+ self,
+ key: Annotated[
+ StrictStr, Field(description="Masking configuration identifier.")
+ ],
+ _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 number masking configuration
+
+ This method allows you to delete a Voice number masking configuration.
+
+ :param key: Masking configuration identifier. (required)
+ :type key: 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_number_masking_configuration_serialize(
+ key=key,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": None,
+ "400": None,
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_configuration_without_preload_content(
+ self,
+ key: Annotated[
+ StrictStr, Field(description="Masking configuration identifier.")
+ ],
+ _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 number masking configuration
+
+ This method allows you to delete a Voice number masking configuration.
+
+ :param key: Masking configuration identifier. (required)
+ :type key: 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_number_masking_configuration_serialize(
+ key=key,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": None,
+ "400": None,
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _delete_number_masking_configuration_serialize(
+ self,
+ key,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if key is not None:
+ _path_params["key"] = key
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="DELETE",
+ resource_path="/voice/masking/2/config/{key}",
+ 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_number_masking_credentials(
+ 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,
+ ) -> object:
+ """Delete number masking credentials
+
+ This method allows you to delete Voice number masking credentials.
+
+ :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_number_masking_credentials_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": "object",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_credentials_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[object]:
+ """Delete number masking credentials
+
+ This method allows you to delete Voice number masking credentials.
+
+ :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_number_masking_credentials_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": "object",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_credentials_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:
+ """Delete number masking credentials
+
+ This method allows you to delete Voice number masking credentials.
+
+ :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_number_masking_credentials_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "204": "object",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _delete_number_masking_credentials_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="DELETE",
+ resource_path="/voice/masking/2/credentials",
+ 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_number_masking_configuration(
+ self,
+ key: Annotated[
+ StrictStr, Field(description="Masking configuration identifier.")
+ ],
+ _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,
+ ) -> NumberMaskingSetupResponse:
+ """Get number masking configuration
+
+ This method allows you to get a Voice number masking configuration.
+
+ :param key: Masking configuration identifier. (required)
+ :type key: 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_number_masking_configuration_serialize(
+ key=key,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingSetupResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_configuration_with_http_info(
+ self,
+ key: Annotated[
+ StrictStr, Field(description="Masking configuration identifier.")
+ ],
+ _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[NumberMaskingSetupResponse]:
+ """Get number masking configuration
+
+ This method allows you to get a Voice number masking configuration.
+
+ :param key: Masking configuration identifier. (required)
+ :type key: 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_number_masking_configuration_serialize(
+ key=key,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingSetupResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_configuration_without_preload_content(
+ self,
+ key: Annotated[
+ StrictStr, Field(description="Masking configuration identifier.")
+ ],
+ _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 number masking configuration
+
+ This method allows you to get a Voice number masking configuration.
+
+ :param key: Masking configuration identifier. (required)
+ :type key: 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_number_masking_configuration_serialize(
+ key=key,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingSetupResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_number_masking_configuration_serialize(
+ self,
+ key,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if key is not None:
+ _path_params["key"] = key
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/voice/masking/2/config/{key}",
+ 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_number_masking_configurations(
+ 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[NumberMaskingSetupResponse]:
+ """Get number masking configurations
+
+ This method allows you to get all voice number masking configurations.
+
+ :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_number_masking_configurations_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[NumberMaskingSetupResponse]",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_configurations_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[NumberMaskingSetupResponse]]:
+ """Get number masking configurations
+
+ This method allows you to get all voice number masking configurations.
+
+ :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_number_masking_configurations_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[NumberMaskingSetupResponse]",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_configurations_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 number masking configurations
+
+ This method allows you to get all voice number masking configurations.
+
+ :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_number_masking_configurations_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[NumberMaskingSetupResponse]",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_number_masking_configurations_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/voice/masking/2/config",
+ 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_number_masking_credentials(
+ 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,
+ ) -> NumberMaskingCredentialsResponse:
+ """Get number masking credentials
+
+ This method allows you to get Voice number masking credentials.
+
+ :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_number_masking_credentials_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingCredentialsResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_credentials_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[NumberMaskingCredentialsResponse]:
+ """Get number masking credentials
+
+ This method allows you to get Voice number masking credentials.
+
+ :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_number_masking_credentials_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingCredentialsResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_credentials_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 number masking credentials
+
+ This method allows you to get Voice number masking credentials.
+
+ :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_number_masking_credentials_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingCredentialsResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_number_masking_credentials_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/voice/masking/2/credentials",
+ 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_number_masking_configuration(
+ self,
+ key: Annotated[
+ StrictStr, Field(description="Masking configuration identifier.")
+ ],
+ number_masking_setup_body: NumberMaskingSetupBody,
+ _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,
+ ) -> NumberMaskingSetupResponse:
+ """Update number masking configuration
+
+ This method allows you to update a Voice number masking configuration.
+
+ :param key: Masking configuration identifier. (required)
+ :type key: str
+ :param number_masking_setup_body: (required)
+ :type number_masking_setup_body: NumberMaskingSetupBody
+ :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_number_masking_configuration_serialize(
+ key=key,
+ number_masking_setup_body=number_masking_setup_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingSetupResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_configuration_with_http_info(
+ self,
+ key: Annotated[
+ StrictStr, Field(description="Masking configuration identifier.")
+ ],
+ number_masking_setup_body: NumberMaskingSetupBody,
+ _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[NumberMaskingSetupResponse]:
+ """Update number masking configuration
+
+ This method allows you to update a Voice number masking configuration.
+
+ :param key: Masking configuration identifier. (required)
+ :type key: str
+ :param number_masking_setup_body: (required)
+ :type number_masking_setup_body: NumberMaskingSetupBody
+ :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_number_masking_configuration_serialize(
+ key=key,
+ number_masking_setup_body=number_masking_setup_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingSetupResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ 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_number_masking_configuration_without_preload_content(
+ self,
+ key: Annotated[
+ StrictStr, Field(description="Masking configuration identifier.")
+ ],
+ number_masking_setup_body: NumberMaskingSetupBody,
+ _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:
+ """Update number masking configuration
+
+ This method allows you to update a Voice number masking configuration.
+
+ :param key: Masking configuration identifier. (required)
+ :type key: str
+ :param number_masking_setup_body: (required)
+ :type number_masking_setup_body: NumberMaskingSetupBody
+ :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_number_masking_configuration_serialize(
+ key=key,
+ number_masking_setup_body=number_masking_setup_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingSetupResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": None,
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _update_number_masking_configuration_serialize(
+ self,
+ key,
+ number_masking_setup_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if key is not None:
+ _path_params["key"] = key
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if number_masking_setup_body is not None:
+ _body_params = number_masking_setup_body
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="PUT",
+ resource_path="/voice/masking/2/config/{key}",
+ 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_number_masking_credentials(
+ self,
+ number_masking_credentials_body: NumberMaskingCredentialsBody,
+ _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,
+ ) -> NumberMaskingCredentialsResponse:
+ """Update number masking credentials
+
+ This method allows you to update Voice number masking credentials.
+
+ :param number_masking_credentials_body: (required)
+ :type number_masking_credentials_body: NumberMaskingCredentialsBody
+ :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_number_masking_credentials_serialize(
+ number_masking_credentials_body=number_masking_credentials_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingCredentialsResponse",
+ "400": None,
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_number_masking_credentials_with_http_info(
+ self,
+ number_masking_credentials_body: NumberMaskingCredentialsBody,
+ _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[NumberMaskingCredentialsResponse]:
+ """Update number masking credentials
+
+ This method allows you to update Voice number masking credentials.
+
+ :param number_masking_credentials_body: (required)
+ :type number_masking_credentials_body: NumberMaskingCredentialsBody
+ :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_number_masking_credentials_serialize(
+ number_masking_credentials_body=number_masking_credentials_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingCredentialsResponse",
+ "400": None,
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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_number_masking_credentials_without_preload_content(
+ self,
+ number_masking_credentials_body: NumberMaskingCredentialsBody,
+ _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:
+ """Update number masking credentials
+
+ This method allows you to update Voice number masking credentials.
+
+ :param number_masking_credentials_body: (required)
+ :type number_masking_credentials_body: NumberMaskingCredentialsBody
+ :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_number_masking_credentials_serialize(
+ number_masking_credentials_body=number_masking_credentials_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingCredentialsResponse",
+ "400": None,
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _update_number_masking_credentials_serialize(
+ self,
+ number_masking_credentials_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 number_masking_credentials_body is not None:
+ _body_params = number_masking_credentials_body
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="PUT",
+ resource_path="/voice/masking/2/credentials",
+ 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 upload_audio_files(
+ self,
+ number_masking_upload_body: NumberMaskingUploadBody,
+ _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,
+ ) -> NumberMaskingUploadResponse:
+ """Upload audio files
+
+ This method allows uploading audio files that can be used on Infobip Voice platform. The method accepts either a URL or an uploaded audio file in the request body. Using both or neither will cause the request to be rejected.
+
+ :param number_masking_upload_body: (required)
+ :type number_masking_upload_body: NumberMaskingUploadBody
+ :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._upload_audio_files_serialize(
+ number_masking_upload_body=number_masking_upload_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingUploadResponse",
+ "400": None,
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 upload_audio_files_with_http_info(
+ self,
+ number_masking_upload_body: NumberMaskingUploadBody,
+ _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[NumberMaskingUploadResponse]:
+ """Upload audio files
+
+ This method allows uploading audio files that can be used on Infobip Voice platform. The method accepts either a URL or an uploaded audio file in the request body. Using both or neither will cause the request to be rejected.
+
+ :param number_masking_upload_body: (required)
+ :type number_masking_upload_body: NumberMaskingUploadBody
+ :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._upload_audio_files_serialize(
+ number_masking_upload_body=number_masking_upload_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingUploadResponse",
+ "400": None,
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ }
+
+ 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 upload_audio_files_without_preload_content(
+ self,
+ number_masking_upload_body: NumberMaskingUploadBody,
+ _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:
+ """Upload audio files
+
+ This method allows uploading audio files that can be used on Infobip Voice platform. The method accepts either a URL or an uploaded audio file in the request body. Using both or neither will cause the request to be rejected.
+
+ :param number_masking_upload_body: (required)
+ :type number_masking_upload_body: NumberMaskingUploadBody
+ :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._upload_audio_files_serialize(
+ number_masking_upload_body=number_masking_upload_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "NumberMaskingUploadResponse",
+ "400": None,
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _upload_audio_files_serialize(
+ self,
+ number_masking_upload_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 number_masking_upload_body is not None:
+ _body_params = number_masking_upload_body
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/voice/masking/1/upload",
+ 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/infobip_api_client/api/sms_api.py b/infobip_api_client/api/sms_api.py
index 95144a6..bc6097e 100644
--- a/infobip_api_client/api/sms_api.py
+++ b/infobip_api_client/api/sms_api.py
@@ -11,7 +11,6 @@
Do not edit the class manually.
""" # noqa: E501
-
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
@@ -21,12 +20,7 @@
from pydantic import Field, StrictInt, StrictStr
from typing import List, Optional
from typing_extensions import Annotated
-from infobip_api_client.models.sms_advanced_binary_request import (
- SmsAdvancedBinaryRequest,
-)
-from infobip_api_client.models.sms_advanced_textual_request import (
- SmsAdvancedTextualRequest,
-)
+from infobip_api_client.models.message_general_status import MessageGeneralStatus
from infobip_api_client.models.sms_bulk_request import SmsBulkRequest
from infobip_api_client.models.sms_bulk_response import SmsBulkResponse
from infobip_api_client.models.sms_bulk_status_response import SmsBulkStatusResponse
@@ -35,6 +29,7 @@
from infobip_api_client.models.sms_logs_response import SmsLogsResponse
from infobip_api_client.models.sms_preview_request import SmsPreviewRequest
from infobip_api_client.models.sms_preview_response import SmsPreviewResponse
+from infobip_api_client.models.sms_request import SmsRequest
from infobip_api_client.models.sms_response import SmsResponse
from infobip_api_client.models.sms_update_status_request import SmsUpdateStatusRequest
@@ -76,6 +71,10 @@ def get_inbound_sms_messages(
description="Entity id that the message is linked to. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(description="ID of a campaign that was sent in the message."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -98,6 +97,8 @@ def get_inbound_sms_messages(
:type application_id: str
:param entity_id: Entity id that the message is linked to. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
:type entity_id: str
+ :param campaign_reference_id: ID of a campaign that was sent in the message.
+ :type campaign_reference_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
@@ -124,6 +125,7 @@ def get_inbound_sms_messages(
limit=limit,
application_id=application_id,
entity_id=entity_id,
+ campaign_reference_id=campaign_reference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -133,6 +135,7 @@ def get_inbound_sms_messages(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsInboundMessageResult",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -168,6 +171,10 @@ def get_inbound_sms_messages_with_http_info(
description="Entity id that the message is linked to. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(description="ID of a campaign that was sent in the message."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -190,6 +197,8 @@ def get_inbound_sms_messages_with_http_info(
:type application_id: str
:param entity_id: Entity id that the message is linked to. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
:type entity_id: str
+ :param campaign_reference_id: ID of a campaign that was sent in the message.
+ :type campaign_reference_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
@@ -216,6 +225,7 @@ def get_inbound_sms_messages_with_http_info(
limit=limit,
application_id=application_id,
entity_id=entity_id,
+ campaign_reference_id=campaign_reference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -225,6 +235,7 @@ def get_inbound_sms_messages_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsInboundMessageResult",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -260,6 +271,10 @@ def get_inbound_sms_messages_without_preload_content(
description="Entity id that the message is linked to. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(description="ID of a campaign that was sent in the message."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -282,6 +297,8 @@ def get_inbound_sms_messages_without_preload_content(
:type application_id: str
:param entity_id: Entity id that the message is linked to. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
:type entity_id: str
+ :param campaign_reference_id: ID of a campaign that was sent in the message.
+ :type campaign_reference_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
@@ -308,6 +325,7 @@ def get_inbound_sms_messages_without_preload_content(
limit=limit,
application_id=application_id,
entity_id=entity_id,
+ campaign_reference_id=campaign_reference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -317,6 +335,7 @@ def get_inbound_sms_messages_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsInboundMessageResult",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -332,6 +351,7 @@ def _get_inbound_sms_messages_serialize(
limit,
application_id,
entity_id,
+ campaign_reference_id,
_request_auth,
_content_type,
_headers,
@@ -363,6 +383,10 @@ def _get_inbound_sms_messages_serialize(
_query_params.append(("entityId", entity_id))
+ if campaign_reference_id is not None:
+
+ _query_params.append(("campaignReferenceId", campaign_reference_id))
+
# process the header parameters
# process the form parameters
# process the body parameter
@@ -396,31 +420,35 @@ def get_outbound_sms_message_delivery_reports(
bulk_id: Annotated[
Optional[StrictStr],
Field(
- description="Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request."
+ description="The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address."
),
] = None,
message_id: Annotated[
Optional[StrictStr],
- Field(description="Unique message ID for which a report is requested."),
+ Field(description="The ID that uniquely identifies the message sent."),
] = None,
limit: Annotated[
Optional[Annotated[int, Field(le=1000, strict=True)]],
Field(
- description="Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access reports for the last 48h."
+ description="Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access reports for the last 48h"
),
] = None,
- application_id: Annotated[
+ entity_id: Annotated[
Optional[StrictStr],
Field(
- description="Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
- entity_id: Annotated[
+ application_id: Annotated[
Optional[StrictStr],
Field(
- description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ description="Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(description="ID of a campaign that was sent in the message."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -435,18 +463,20 @@ def get_outbound_sms_message_delivery_reports(
) -> SmsDeliveryResult:
"""Get outbound SMS message delivery reports
- If you are for any reason unable to receive real-time delivery reports on your endpoint, you can use this API method to learn if and when the message has been delivered to the recipient. Each request will return a batch of delivery reports - only once. The following API request will return only new reports that arrived since the last API request in the last 48 hours.
+ If you are unable to receive real-time message delivery reports towards your endpoint for various reasons, we offer you an API method to fetch batches of message reports to confirm whether specific messages have been delivered. Each request towards this endpoint will return batches of the latest message reports. Please note they will be returned only once.
- :param bulk_id: Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request.
+ :param bulk_id: The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address.
:type bulk_id: str
- :param message_id: Unique message ID for which a report is requested.
+ :param message_id: The ID that uniquely identifies the message sent.
:type message_id: str
- :param limit: Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access reports for the last 48h.
+ :param limit: Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access reports for the last 48h
:type limit: int
- :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
- :type application_id: str
:param entity_id: Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
:type entity_id: str
+ :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
+ :type application_id: str
+ :param campaign_reference_id: ID of a campaign that was sent in the message.
+ :type campaign_reference_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
@@ -473,8 +503,9 @@ def get_outbound_sms_message_delivery_reports(
bulk_id=bulk_id,
message_id=message_id,
limit=limit,
- application_id=application_id,
entity_id=entity_id,
+ application_id=application_id,
+ campaign_reference_id=campaign_reference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -483,9 +514,9 @@ def get_outbound_sms_message_delivery_reports(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsDeliveryResult",
- "400": "ApiException",
- "401": "ApiException",
- "500": "ApiException",
+ "401": "ApiError",
+ "403": "ApiError",
+ "500": "ApiError",
}
response_data = self.api_client.call_api(
@@ -503,31 +534,35 @@ def get_outbound_sms_message_delivery_reports_with_http_info(
bulk_id: Annotated[
Optional[StrictStr],
Field(
- description="Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request."
+ description="The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address."
),
] = None,
message_id: Annotated[
Optional[StrictStr],
- Field(description="Unique message ID for which a report is requested."),
+ Field(description="The ID that uniquely identifies the message sent."),
] = None,
limit: Annotated[
Optional[Annotated[int, Field(le=1000, strict=True)]],
Field(
- description="Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access reports for the last 48h."
+ description="Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access reports for the last 48h"
),
] = None,
- application_id: Annotated[
+ entity_id: Annotated[
Optional[StrictStr],
Field(
- description="Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
- entity_id: Annotated[
+ application_id: Annotated[
Optional[StrictStr],
Field(
- description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ description="Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(description="ID of a campaign that was sent in the message."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -542,18 +577,20 @@ def get_outbound_sms_message_delivery_reports_with_http_info(
) -> ApiResponse[SmsDeliveryResult]:
"""Get outbound SMS message delivery reports
- If you are for any reason unable to receive real-time delivery reports on your endpoint, you can use this API method to learn if and when the message has been delivered to the recipient. Each request will return a batch of delivery reports - only once. The following API request will return only new reports that arrived since the last API request in the last 48 hours.
+ If you are unable to receive real-time message delivery reports towards your endpoint for various reasons, we offer you an API method to fetch batches of message reports to confirm whether specific messages have been delivered. Each request towards this endpoint will return batches of the latest message reports. Please note they will be returned only once.
- :param bulk_id: Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request.
+ :param bulk_id: The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address.
:type bulk_id: str
- :param message_id: Unique message ID for which a report is requested.
+ :param message_id: The ID that uniquely identifies the message sent.
:type message_id: str
- :param limit: Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access reports for the last 48h.
+ :param limit: Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access reports for the last 48h
:type limit: int
- :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
- :type application_id: str
:param entity_id: Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
:type entity_id: str
+ :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
+ :type application_id: str
+ :param campaign_reference_id: ID of a campaign that was sent in the message.
+ :type campaign_reference_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
@@ -580,8 +617,9 @@ def get_outbound_sms_message_delivery_reports_with_http_info(
bulk_id=bulk_id,
message_id=message_id,
limit=limit,
- application_id=application_id,
entity_id=entity_id,
+ application_id=application_id,
+ campaign_reference_id=campaign_reference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -590,9 +628,9 @@ def get_outbound_sms_message_delivery_reports_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsDeliveryResult",
- "400": "ApiException",
- "401": "ApiException",
- "500": "ApiException",
+ "401": "ApiError",
+ "403": "ApiError",
+ "500": "ApiError",
}
response_data = self.api_client.call_api(
@@ -610,31 +648,35 @@ def get_outbound_sms_message_delivery_reports_without_preload_content(
bulk_id: Annotated[
Optional[StrictStr],
Field(
- description="Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request."
+ description="The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address."
),
] = None,
message_id: Annotated[
Optional[StrictStr],
- Field(description="Unique message ID for which a report is requested."),
+ Field(description="The ID that uniquely identifies the message sent."),
] = None,
limit: Annotated[
Optional[Annotated[int, Field(le=1000, strict=True)]],
Field(
- description="Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access reports for the last 48h."
+ description="Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access reports for the last 48h"
),
] = None,
- application_id: Annotated[
+ entity_id: Annotated[
Optional[StrictStr],
Field(
- description="Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
- entity_id: Annotated[
+ application_id: Annotated[
Optional[StrictStr],
Field(
- description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ description="Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
+ campaign_reference_id: Annotated[
+ Optional[StrictStr],
+ Field(description="ID of a campaign that was sent in the message."),
+ ] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -649,18 +691,20 @@ def get_outbound_sms_message_delivery_reports_without_preload_content(
) -> RESTResponseType:
"""Get outbound SMS message delivery reports
- If you are for any reason unable to receive real-time delivery reports on your endpoint, you can use this API method to learn if and when the message has been delivered to the recipient. Each request will return a batch of delivery reports - only once. The following API request will return only new reports that arrived since the last API request in the last 48 hours.
+ If you are unable to receive real-time message delivery reports towards your endpoint for various reasons, we offer you an API method to fetch batches of message reports to confirm whether specific messages have been delivered. Each request towards this endpoint will return batches of the latest message reports. Please note they will be returned only once.
- :param bulk_id: Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request.
+ :param bulk_id: The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address.
:type bulk_id: str
- :param message_id: Unique message ID for which a report is requested.
+ :param message_id: The ID that uniquely identifies the message sent.
:type message_id: str
- :param limit: Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access reports for the last 48h.
+ :param limit: Maximum number of delivery reports to be returned. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access reports for the last 48h
:type limit: int
- :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
- :type application_id: str
:param entity_id: Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
:type entity_id: str
+ :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
+ :type application_id: str
+ :param campaign_reference_id: ID of a campaign that was sent in the message.
+ :type campaign_reference_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
@@ -687,8 +731,9 @@ def get_outbound_sms_message_delivery_reports_without_preload_content(
bulk_id=bulk_id,
message_id=message_id,
limit=limit,
- application_id=application_id,
entity_id=entity_id,
+ application_id=application_id,
+ campaign_reference_id=campaign_reference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -697,9 +742,9 @@ def get_outbound_sms_message_delivery_reports_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsDeliveryResult",
- "400": "ApiException",
- "401": "ApiException",
- "500": "ApiException",
+ "401": "ApiError",
+ "403": "ApiError",
+ "500": "ApiError",
}
response_data = self.api_client.call_api(
@@ -712,8 +757,9 @@ def _get_outbound_sms_message_delivery_reports_serialize(
bulk_id,
message_id,
limit,
- application_id,
entity_id,
+ application_id,
+ campaign_reference_id,
_request_auth,
_content_type,
_headers,
@@ -745,13 +791,17 @@ def _get_outbound_sms_message_delivery_reports_serialize(
_query_params.append(("limit", limit))
+ if entity_id is not None:
+
+ _query_params.append(("entityId", entity_id))
+
if application_id is not None:
_query_params.append(("applicationId", application_id))
- if entity_id is not None:
+ if campaign_reference_id is not None:
- _query_params.append(("entityId", entity_id))
+ _query_params.append(("campaignReferenceId", campaign_reference_id))
# process the header parameters
# process the form parameters
@@ -767,7 +817,7 @@ def _get_outbound_sms_message_delivery_reports_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/sms/1/reports",
+ resource_path="/sms/3/reports",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -783,11 +833,20 @@ def _get_outbound_sms_message_delivery_reports_serialize(
@validate_call
def get_outbound_sms_message_logs(
self,
- var_from: Annotated[
+ mcc: Annotated[
+ Optional[StrictStr], Field(description="Mobile Country Code.")
+ ] = None,
+ mnc: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Mobile Network Code. Mobile Country Code is required if this property is used."
+ ),
+ ] = None,
+ sender: Annotated[
Optional[StrictStr],
Field(description="The sender ID which can be alphanumeric or numeric."),
] = None,
- to: Annotated[
+ destination: Annotated[
Optional[StrictStr], Field(description="Message destination address.")
] = None,
bulk_id: Annotated[
@@ -802,35 +861,30 @@ def get_outbound_sms_message_logs(
description="Unique message ID for which a log is requested. May contain multiple comma-separated values. Maximum length 2048 characters."
),
] = None,
- general_status: Annotated[
- Optional[StrictStr],
- Field(
- description="Sent [message status](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes). Possible values: `ACCEPTED`, `PENDING`, `UNDELIVERABLE`, `DELIVERED`, `REJECTED`, `EXPIRED`."
- ),
- ] = None,
+ general_status: Optional[MessageGeneralStatus] = None,
sent_since: Annotated[
Optional[datetime],
Field(
- description="The logs will only include messages sent after this date. Use it together with `sentUntil` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ description="The logs will only include messages sent after this date. Use it together with sentUntil to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ."
),
] = None,
sent_until: Annotated[
Optional[datetime],
Field(
- description="The logs will only include messages sent before this date. Use it together with `sentBefore` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ description="The logs will only include messages sent before this date. Use it together with sentSince to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ."
),
] = None,
limit: Annotated[
- Optional[StrictInt],
+ Optional[Annotated[int, Field(le=1000, strict=True)]],
Field(
- description="Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use `sentBefore` and `sentUntil` to retrieve them in pages."
+ description="Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use sentBefore and sentUntil to retrieve them in pages."
),
] = None,
- mcc: Annotated[
- Optional[StrictStr], Field(description="Mobile Country Code.")
- ] = None,
- mnc: Annotated[
- Optional[StrictStr], Field(description="Mobile Network Code.")
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ ),
] = None,
application_id: Annotated[
Optional[StrictStr],
@@ -838,10 +892,10 @@ def get_outbound_sms_message_logs(
description="Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
- entity_id: Annotated[
- Optional[StrictStr],
+ campaign_reference_id: Annotated[
+ Optional[List[StrictStr]],
Field(
- description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ description="ID of a campaign that was sent in the message. May contain multiple comma-separated values."
),
] = None,
_request_timeout: Union[
@@ -858,32 +912,34 @@ def get_outbound_sms_message_logs(
) -> SmsLogsResponse:
"""Get outbound SMS message logs
- Use this method for displaying logs for example in the user interface. Available are the logs for the last 48 hours and you can only retrieve maximum of 1000 logs per call. See [message delivery reports](#channels/sms/get-outbound-sms-message-delivery-reports) if your use case is to verify message delivery.
+ Use this method for displaying logs, for example, in the user interface. Available are the logs for the last 48 hours and you can only retrieve maximum of 1000 logs per call. See [message delivery reports](#channels/sms/get-outbound-sms-message-delivery-reports-v3) if your use case is to verify message delivery.
- :param var_from: The sender ID which can be alphanumeric or numeric.
- :type var_from: str
- :param to: Message destination address.
- :type to: str
+ :param mcc: Mobile Country Code.
+ :type mcc: str
+ :param mnc: Mobile Network Code. Mobile Country Code is required if this property is used.
+ :type mnc: str
+ :param sender: The sender ID which can be alphanumeric or numeric.
+ :type sender: str
+ :param destination: Message destination address.
+ :type destination: str
:param bulk_id: Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. May contain multiple comma-separated values. Maximum length 2048 characters.
:type bulk_id: List[str]
:param message_id: Unique message ID for which a log is requested. May contain multiple comma-separated values. Maximum length 2048 characters.
:type message_id: List[str]
- :param general_status: Sent [message status](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes). Possible values: `ACCEPTED`, `PENDING`, `UNDELIVERABLE`, `DELIVERED`, `REJECTED`, `EXPIRED`.
- :type general_status: str
- :param sent_since: The logs will only include messages sent after this date. Use it together with `sentUntil` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :param general_status:
+ :type general_status: MessageGeneralStatus
+ :param sent_since: The logs will only include messages sent after this date. Use it together with sentUntil to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
:type sent_since: datetime
- :param sent_until: The logs will only include messages sent before this date. Use it together with `sentBefore` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :param sent_until: The logs will only include messages sent before this date. Use it together with sentSince to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
:type sent_until: datetime
- :param limit: Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use `sentBefore` and `sentUntil` to retrieve them in pages.
+ :param limit: Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use sentBefore and sentUntil to retrieve them in pages.
:type limit: int
- :param mcc: Mobile Country Code.
- :type mcc: str
- :param mnc: Mobile Network Code.
- :type mnc: str
- :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
- :type application_id: str
:param entity_id: Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
:type entity_id: str
+ :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
+ :type application_id: str
+ :param campaign_reference_id: ID of a campaign that was sent in the message. May contain multiple comma-separated values.
+ :type campaign_reference_id: 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
@@ -907,18 +963,19 @@ def get_outbound_sms_message_logs(
""" # noqa: E501
_param = self._get_outbound_sms_message_logs_serialize(
- var_from=var_from,
- to=to,
+ mcc=mcc,
+ mnc=mnc,
+ sender=sender,
+ destination=destination,
bulk_id=bulk_id,
message_id=message_id,
general_status=general_status,
sent_since=sent_since,
sent_until=sent_until,
limit=limit,
- mcc=mcc,
- mnc=mnc,
- application_id=application_id,
entity_id=entity_id,
+ application_id=application_id,
+ campaign_reference_id=campaign_reference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -927,11 +984,10 @@ def get_outbound_sms_message_logs(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsLogsResponse",
- "401": "ApiException",
- "429": "ApiException",
- "500": "ApiException",
- "4XX": "ApiException",
- "5XX": "ApiException",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
}
response_data = self.api_client.call_api(
@@ -946,11 +1002,20 @@ def get_outbound_sms_message_logs(
@validate_call
def get_outbound_sms_message_logs_with_http_info(
self,
- var_from: Annotated[
+ mcc: Annotated[
+ Optional[StrictStr], Field(description="Mobile Country Code.")
+ ] = None,
+ mnc: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Mobile Network Code. Mobile Country Code is required if this property is used."
+ ),
+ ] = None,
+ sender: Annotated[
Optional[StrictStr],
Field(description="The sender ID which can be alphanumeric or numeric."),
] = None,
- to: Annotated[
+ destination: Annotated[
Optional[StrictStr], Field(description="Message destination address.")
] = None,
bulk_id: Annotated[
@@ -965,35 +1030,30 @@ def get_outbound_sms_message_logs_with_http_info(
description="Unique message ID for which a log is requested. May contain multiple comma-separated values. Maximum length 2048 characters."
),
] = None,
- general_status: Annotated[
- Optional[StrictStr],
- Field(
- description="Sent [message status](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes). Possible values: `ACCEPTED`, `PENDING`, `UNDELIVERABLE`, `DELIVERED`, `REJECTED`, `EXPIRED`."
- ),
- ] = None,
+ general_status: Optional[MessageGeneralStatus] = None,
sent_since: Annotated[
Optional[datetime],
Field(
- description="The logs will only include messages sent after this date. Use it together with `sentUntil` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ description="The logs will only include messages sent after this date. Use it together with sentUntil to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ."
),
] = None,
sent_until: Annotated[
Optional[datetime],
Field(
- description="The logs will only include messages sent before this date. Use it together with `sentBefore` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ description="The logs will only include messages sent before this date. Use it together with sentSince to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ."
),
] = None,
limit: Annotated[
- Optional[StrictInt],
+ Optional[Annotated[int, Field(le=1000, strict=True)]],
Field(
- description="Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use `sentBefore` and `sentUntil` to retrieve them in pages."
+ description="Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use sentBefore and sentUntil to retrieve them in pages."
),
] = None,
- mcc: Annotated[
- Optional[StrictStr], Field(description="Mobile Country Code.")
- ] = None,
- mnc: Annotated[
- Optional[StrictStr], Field(description="Mobile Network Code.")
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ ),
] = None,
application_id: Annotated[
Optional[StrictStr],
@@ -1001,10 +1061,10 @@ def get_outbound_sms_message_logs_with_http_info(
description="Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
- entity_id: Annotated[
- Optional[StrictStr],
+ campaign_reference_id: Annotated[
+ Optional[List[StrictStr]],
Field(
- description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ description="ID of a campaign that was sent in the message. May contain multiple comma-separated values."
),
] = None,
_request_timeout: Union[
@@ -1021,32 +1081,34 @@ def get_outbound_sms_message_logs_with_http_info(
) -> ApiResponse[SmsLogsResponse]:
"""Get outbound SMS message logs
- Use this method for displaying logs for example in the user interface. Available are the logs for the last 48 hours and you can only retrieve maximum of 1000 logs per call. See [message delivery reports](#channels/sms/get-outbound-sms-message-delivery-reports) if your use case is to verify message delivery.
+ Use this method for displaying logs, for example, in the user interface. Available are the logs for the last 48 hours and you can only retrieve maximum of 1000 logs per call. See [message delivery reports](#channels/sms/get-outbound-sms-message-delivery-reports-v3) if your use case is to verify message delivery.
- :param var_from: The sender ID which can be alphanumeric or numeric.
- :type var_from: str
- :param to: Message destination address.
- :type to: str
+ :param mcc: Mobile Country Code.
+ :type mcc: str
+ :param mnc: Mobile Network Code. Mobile Country Code is required if this property is used.
+ :type mnc: str
+ :param sender: The sender ID which can be alphanumeric or numeric.
+ :type sender: str
+ :param destination: Message destination address.
+ :type destination: str
:param bulk_id: Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. May contain multiple comma-separated values. Maximum length 2048 characters.
:type bulk_id: List[str]
:param message_id: Unique message ID for which a log is requested. May contain multiple comma-separated values. Maximum length 2048 characters.
:type message_id: List[str]
- :param general_status: Sent [message status](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes). Possible values: `ACCEPTED`, `PENDING`, `UNDELIVERABLE`, `DELIVERED`, `REJECTED`, `EXPIRED`.
- :type general_status: str
- :param sent_since: The logs will only include messages sent after this date. Use it together with `sentUntil` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :param general_status:
+ :type general_status: MessageGeneralStatus
+ :param sent_since: The logs will only include messages sent after this date. Use it together with sentUntil to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
:type sent_since: datetime
- :param sent_until: The logs will only include messages sent before this date. Use it together with `sentBefore` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :param sent_until: The logs will only include messages sent before this date. Use it together with sentSince to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
:type sent_until: datetime
- :param limit: Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use `sentBefore` and `sentUntil` to retrieve them in pages.
+ :param limit: Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use sentBefore and sentUntil to retrieve them in pages.
:type limit: int
- :param mcc: Mobile Country Code.
- :type mcc: str
- :param mnc: Mobile Network Code.
- :type mnc: str
- :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
- :type application_id: str
:param entity_id: Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
:type entity_id: str
+ :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
+ :type application_id: str
+ :param campaign_reference_id: ID of a campaign that was sent in the message. May contain multiple comma-separated values.
+ :type campaign_reference_id: 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
@@ -1070,18 +1132,19 @@ def get_outbound_sms_message_logs_with_http_info(
""" # noqa: E501
_param = self._get_outbound_sms_message_logs_serialize(
- var_from=var_from,
- to=to,
+ mcc=mcc,
+ mnc=mnc,
+ sender=sender,
+ destination=destination,
bulk_id=bulk_id,
message_id=message_id,
general_status=general_status,
sent_since=sent_since,
sent_until=sent_until,
limit=limit,
- mcc=mcc,
- mnc=mnc,
- application_id=application_id,
entity_id=entity_id,
+ application_id=application_id,
+ campaign_reference_id=campaign_reference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -1090,11 +1153,10 @@ def get_outbound_sms_message_logs_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsLogsResponse",
- "401": "ApiException",
- "429": "ApiException",
- "500": "ApiException",
- "4XX": "ApiException",
- "5XX": "ApiException",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
}
response_data = self.api_client.call_api(
@@ -1109,11 +1171,20 @@ def get_outbound_sms_message_logs_with_http_info(
@validate_call
def get_outbound_sms_message_logs_without_preload_content(
self,
- var_from: Annotated[
+ mcc: Annotated[
+ Optional[StrictStr], Field(description="Mobile Country Code.")
+ ] = None,
+ mnc: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Mobile Network Code. Mobile Country Code is required if this property is used."
+ ),
+ ] = None,
+ sender: Annotated[
Optional[StrictStr],
Field(description="The sender ID which can be alphanumeric or numeric."),
] = None,
- to: Annotated[
+ destination: Annotated[
Optional[StrictStr], Field(description="Message destination address.")
] = None,
bulk_id: Annotated[
@@ -1128,35 +1199,30 @@ def get_outbound_sms_message_logs_without_preload_content(
description="Unique message ID for which a log is requested. May contain multiple comma-separated values. Maximum length 2048 characters."
),
] = None,
- general_status: Annotated[
- Optional[StrictStr],
- Field(
- description="Sent [message status](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes). Possible values: `ACCEPTED`, `PENDING`, `UNDELIVERABLE`, `DELIVERED`, `REJECTED`, `EXPIRED`."
- ),
- ] = None,
+ general_status: Optional[MessageGeneralStatus] = None,
sent_since: Annotated[
Optional[datetime],
Field(
- description="The logs will only include messages sent after this date. Use it together with `sentUntil` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ description="The logs will only include messages sent after this date. Use it together with sentUntil to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ."
),
] = None,
sent_until: Annotated[
Optional[datetime],
Field(
- description="The logs will only include messages sent before this date. Use it together with `sentBefore` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`."
+ description="The logs will only include messages sent before this date. Use it together with sentSince to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ."
),
] = None,
limit: Annotated[
- Optional[StrictInt],
+ Optional[Annotated[int, Field(le=1000, strict=True)]],
Field(
- description="Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use `sentBefore` and `sentUntil` to retrieve them in pages."
+ description="Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use sentBefore and sentUntil to retrieve them in pages."
),
] = None,
- mcc: Annotated[
- Optional[StrictStr], Field(description="Mobile Country Code.")
- ] = None,
- mnc: Annotated[
- Optional[StrictStr], Field(description="Mobile Network Code.")
+ entity_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ ),
] = None,
application_id: Annotated[
Optional[StrictStr],
@@ -1164,10 +1230,10 @@ def get_outbound_sms_message_logs_without_preload_content(
description="Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
),
] = None,
- entity_id: Annotated[
- Optional[StrictStr],
+ campaign_reference_id: Annotated[
+ Optional[List[StrictStr]],
Field(
- description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management)."
+ description="ID of a campaign that was sent in the message. May contain multiple comma-separated values."
),
] = None,
_request_timeout: Union[
@@ -1184,32 +1250,34 @@ def get_outbound_sms_message_logs_without_preload_content(
) -> RESTResponseType:
"""Get outbound SMS message logs
- Use this method for displaying logs for example in the user interface. Available are the logs for the last 48 hours and you can only retrieve maximum of 1000 logs per call. See [message delivery reports](#channels/sms/get-outbound-sms-message-delivery-reports) if your use case is to verify message delivery.
+ Use this method for displaying logs, for example, in the user interface. Available are the logs for the last 48 hours and you can only retrieve maximum of 1000 logs per call. See [message delivery reports](#channels/sms/get-outbound-sms-message-delivery-reports-v3) if your use case is to verify message delivery.
- :param var_from: The sender ID which can be alphanumeric or numeric.
- :type var_from: str
- :param to: Message destination address.
- :type to: str
+ :param mcc: Mobile Country Code.
+ :type mcc: str
+ :param mnc: Mobile Network Code. Mobile Country Code is required if this property is used.
+ :type mnc: str
+ :param sender: The sender ID which can be alphanumeric or numeric.
+ :type sender: str
+ :param destination: Message destination address.
+ :type destination: str
:param bulk_id: Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. May contain multiple comma-separated values. Maximum length 2048 characters.
:type bulk_id: List[str]
:param message_id: Unique message ID for which a log is requested. May contain multiple comma-separated values. Maximum length 2048 characters.
:type message_id: List[str]
- :param general_status: Sent [message status](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes). Possible values: `ACCEPTED`, `PENDING`, `UNDELIVERABLE`, `DELIVERED`, `REJECTED`, `EXPIRED`.
- :type general_status: str
- :param sent_since: The logs will only include messages sent after this date. Use it together with `sentUntil` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :param general_status:
+ :type general_status: MessageGeneralStatus
+ :param sent_since: The logs will only include messages sent after this date. Use it together with sentUntil to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
:type sent_since: datetime
- :param sent_until: The logs will only include messages sent before this date. Use it together with `sentBefore` to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
+ :param sent_until: The logs will only include messages sent before this date. Use it together with sentSince to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
:type sent_until: datetime
- :param limit: Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is `1000` and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use `sentBefore` and `sentUntil` to retrieve them in pages.
+ :param limit: Maximum number of messages to include in logs. If not set, the latest 50 records are returned. Maximum limit value is 1000 and you can only access logs for the last 48h. If you want to fetch more than 1000 logs allowed per call, use sentBefore and sentUntil to retrieve them in pages.
:type limit: int
- :param mcc: Mobile Country Code.
- :type mcc: str
- :param mnc: Mobile Network Code.
- :type mnc: str
- :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
- :type application_id: str
:param entity_id: Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
:type entity_id: str
+ :param application_id: Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
+ :type application_id: str
+ :param campaign_reference_id: ID of a campaign that was sent in the message. May contain multiple comma-separated values.
+ :type campaign_reference_id: 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
@@ -1233,18 +1301,19 @@ def get_outbound_sms_message_logs_without_preload_content(
""" # noqa: E501
_param = self._get_outbound_sms_message_logs_serialize(
- var_from=var_from,
- to=to,
+ mcc=mcc,
+ mnc=mnc,
+ sender=sender,
+ destination=destination,
bulk_id=bulk_id,
message_id=message_id,
general_status=general_status,
sent_since=sent_since,
sent_until=sent_until,
limit=limit,
- mcc=mcc,
- mnc=mnc,
- application_id=application_id,
entity_id=entity_id,
+ application_id=application_id,
+ campaign_reference_id=campaign_reference_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -1253,11 +1322,10 @@ def get_outbound_sms_message_logs_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsLogsResponse",
- "401": "ApiException",
- "429": "ApiException",
- "500": "ApiException",
- "4XX": "ApiException",
- "5XX": "ApiException",
+ "401": "ApiError",
+ "403": "ApiError",
+ "429": "ApiError",
+ "500": "ApiError",
}
response_data = self.api_client.call_api(
@@ -1267,18 +1335,19 @@ def get_outbound_sms_message_logs_without_preload_content(
def _get_outbound_sms_message_logs_serialize(
self,
- var_from,
- to,
+ mcc,
+ mnc,
+ sender,
+ destination,
bulk_id,
message_id,
general_status,
sent_since,
sent_until,
limit,
- mcc,
- mnc,
- application_id,
entity_id,
+ application_id,
+ campaign_reference_id,
_request_auth,
_content_type,
_headers,
@@ -1290,6 +1359,7 @@ def _get_outbound_sms_message_logs_serialize(
_collection_formats: Dict[str, str] = {
"bulkId": "multi",
"messageId": "multi",
+ "campaignReferenceId": "multi",
}
_path_params: Dict[str, str] = {}
@@ -1301,13 +1371,21 @@ def _get_outbound_sms_message_logs_serialize(
# process the path parameters
# process the query parameters
- if var_from is not None:
+ if mcc is not None:
+
+ _query_params.append(("mcc", mcc))
+
+ if mnc is not None:
+
+ _query_params.append(("mnc", mnc))
- _query_params.append(("from", var_from))
+ if sender is not None:
- if to is not None:
+ _query_params.append(("sender", sender))
- _query_params.append(("to", to))
+ if destination is not None:
+
+ _query_params.append(("destination", destination))
if bulk_id is not None:
@@ -1319,7 +1397,7 @@ def _get_outbound_sms_message_logs_serialize(
if general_status is not None:
- _query_params.append(("generalStatus", general_status))
+ _query_params.append(("generalStatus", general_status.value))
if sent_since is not None:
if isinstance(sent_since, datetime):
@@ -1351,21 +1429,17 @@ def _get_outbound_sms_message_logs_serialize(
_query_params.append(("limit", limit))
- if mcc is not None:
-
- _query_params.append(("mcc", mcc))
-
- if mnc is not None:
+ if entity_id is not None:
- _query_params.append(("mnc", mnc))
+ _query_params.append(("entityId", entity_id))
if application_id is not None:
_query_params.append(("applicationId", application_id))
- if entity_id is not None:
+ if campaign_reference_id is not None:
- _query_params.append(("entityId", entity_id))
+ _query_params.append(("campaignReferenceId", campaign_reference_id))
# process the header parameters
# process the form parameters
@@ -1381,7 +1455,7 @@ def _get_outbound_sms_message_logs_serialize(
return self.api_client.param_serialize(
method="GET",
- resource_path="/sms/1/logs",
+ resource_path="/sms/3/logs",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -1449,6 +1523,7 @@ def get_scheduled_sms_messages(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsBulkResponse",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -1518,6 +1593,7 @@ def get_scheduled_sms_messages_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsBulkResponse",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -1587,6 +1663,7 @@ def get_scheduled_sms_messages_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsBulkResponse",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -1706,6 +1783,7 @@ def get_scheduled_sms_messages_status(
"200": "SmsBulkStatusResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"500": "ApiException",
}
@@ -1775,6 +1853,7 @@ def get_scheduled_sms_messages_status_with_http_info(
"200": "SmsBulkStatusResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"500": "ApiException",
}
@@ -1844,6 +1923,7 @@ def get_scheduled_sms_messages_status_without_preload_content(
"200": "SmsBulkStatusResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"404": "ApiException",
"500": "ApiException",
}
@@ -1962,6 +2042,7 @@ def preview_sms_message(
"200": "SmsPreviewResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
}
@@ -2030,6 +2111,7 @@ def preview_sms_message_with_http_info(
"200": "SmsPreviewResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
}
@@ -2098,6 +2180,7 @@ def preview_sms_message_without_preload_content(
"200": "SmsPreviewResponse",
"400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
}
@@ -2225,7 +2308,9 @@ def reschedule_sms_messages(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsBulkResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2298,7 +2383,9 @@ def reschedule_sms_messages_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsBulkResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2371,7 +2458,9 @@ def reschedule_sms_messages_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsBulkResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2449,270 +2538,9 @@ def _reschedule_sms_messages_serialize(
)
@validate_call
- def send_binary_sms_message(
- self,
- sms_advanced_binary_request: SmsAdvancedBinaryRequest,
- _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,
- ) -> SmsResponse:
- """Send binary SMS message
-
- Send single or multiple binary messages to one or more destination address. The API response will not contain the final delivery status, use [Delivery Reports](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports/receive-outbound-sms-message-report) instead.
-
- :param sms_advanced_binary_request: (required)
- :type sms_advanced_binary_request: SmsAdvancedBinaryRequest
- :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._send_binary_sms_message_serialize(
- sms_advanced_binary_request=sms_advanced_binary_request,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index,
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- "200": "SmsResponse",
- "400": "ApiException",
- "401": "ApiException",
- "500": "ApiException",
- }
-
- 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 send_binary_sms_message_with_http_info(
- self,
- sms_advanced_binary_request: SmsAdvancedBinaryRequest,
- _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[SmsResponse]:
- """Send binary SMS message
-
- Send single or multiple binary messages to one or more destination address. The API response will not contain the final delivery status, use [Delivery Reports](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports/receive-outbound-sms-message-report) instead.
-
- :param sms_advanced_binary_request: (required)
- :type sms_advanced_binary_request: SmsAdvancedBinaryRequest
- :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._send_binary_sms_message_serialize(
- sms_advanced_binary_request=sms_advanced_binary_request,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index,
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- "200": "SmsResponse",
- "400": "ApiException",
- "401": "ApiException",
- "500": "ApiException",
- }
-
- 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 send_binary_sms_message_without_preload_content(
- self,
- sms_advanced_binary_request: SmsAdvancedBinaryRequest,
- _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:
- """Send binary SMS message
-
- Send single or multiple binary messages to one or more destination address. The API response will not contain the final delivery status, use [Delivery Reports](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports/receive-outbound-sms-message-report) instead.
-
- :param sms_advanced_binary_request: (required)
- :type sms_advanced_binary_request: SmsAdvancedBinaryRequest
- :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._send_binary_sms_message_serialize(
- sms_advanced_binary_request=sms_advanced_binary_request,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index,
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- "200": "SmsResponse",
- "400": "ApiException",
- "401": "ApiException",
- "500": "ApiException",
- }
-
- response_data = self.api_client.call_api(
- *_param, _request_timeout=_request_timeout
- )
- return response_data.response
-
- def _send_binary_sms_message_serialize(
- self,
- sms_advanced_binary_request,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> RequestSerialized:
-
- _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, Union[str, bytes]] = {}
- _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 sms_advanced_binary_request is not None:
- _body_params = sms_advanced_binary_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] = ["APIKeyHeader"]
-
- return self.api_client.param_serialize(
- method="POST",
- resource_path="/sms/2/binary/advanced",
- 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 send_sms_message(
+ def send_sms_messages(
self,
- sms_advanced_textual_request: SmsAdvancedTextualRequest,
+ sms_request: SmsRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -2727,10 +2555,10 @@ def send_sms_message(
) -> SmsResponse:
"""Send SMS message
- Use this endpoint to send an SMS and set up a rich set of features, such as batch sending with a single API request, scheduling, URL tracking, language and transliteration configuration, etc. The API response will not contain the final delivery status, use [Delivery Reports](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports/receive-outbound-sms-message-report) instead.
+ With this API method, you can do anything from sending a basic message to one person, all the way to sending customized messages to thousands of recipients in one go. It comes with a range of useful features like transliteration, scheduling, and tracking in a unified way.\\ If utilizing Message Delivery Reports webhook, please consult the documentation provided at [Receive outbound SMS message reports](#channels/sms/receive-outbound-sms-message-report-v3).\\ This endpoint is the successor of [Send SMS message](#channels/sms/send-sms-message) and [Send binary SMS message](#channels/sms/send-binary-sms-message).
- :param sms_advanced_textual_request: (required)
- :type sms_advanced_textual_request: SmsAdvancedTextualRequest
+ :param sms_request: (required)
+ :type sms_request: SmsRequest
: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
@@ -2753,8 +2581,8 @@ def send_sms_message(
:return: Returns the result object.
""" # noqa: E501
- _param = self._send_sms_message_serialize(
- sms_advanced_textual_request=sms_advanced_textual_request,
+ _param = self._send_sms_messages_serialize(
+ sms_request=sms_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -2763,9 +2591,10 @@ def send_sms_message(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsResponse",
- "400": "ApiException",
- "401": "ApiException",
- "500": "ApiException",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "500": "ApiError",
}
response_data = self.api_client.call_api(
@@ -2778,9 +2607,9 @@ def send_sms_message(
).data
@validate_call
- def send_sms_message_with_http_info(
+ def send_sms_messages_with_http_info(
self,
- sms_advanced_textual_request: SmsAdvancedTextualRequest,
+ sms_request: SmsRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -2795,10 +2624,10 @@ def send_sms_message_with_http_info(
) -> ApiResponse[SmsResponse]:
"""Send SMS message
- Use this endpoint to send an SMS and set up a rich set of features, such as batch sending with a single API request, scheduling, URL tracking, language and transliteration configuration, etc. The API response will not contain the final delivery status, use [Delivery Reports](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports/receive-outbound-sms-message-report) instead.
+ With this API method, you can do anything from sending a basic message to one person, all the way to sending customized messages to thousands of recipients in one go. It comes with a range of useful features like transliteration, scheduling, and tracking in a unified way.\\ If utilizing Message Delivery Reports webhook, please consult the documentation provided at [Receive outbound SMS message reports](#channels/sms/receive-outbound-sms-message-report-v3).\\ This endpoint is the successor of [Send SMS message](#channels/sms/send-sms-message) and [Send binary SMS message](#channels/sms/send-binary-sms-message).
- :param sms_advanced_textual_request: (required)
- :type sms_advanced_textual_request: SmsAdvancedTextualRequest
+ :param sms_request: (required)
+ :type sms_request: SmsRequest
: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
@@ -2821,8 +2650,8 @@ def send_sms_message_with_http_info(
:return: Returns the result object.
""" # noqa: E501
- _param = self._send_sms_message_serialize(
- sms_advanced_textual_request=sms_advanced_textual_request,
+ _param = self._send_sms_messages_serialize(
+ sms_request=sms_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -2831,9 +2660,10 @@ def send_sms_message_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsResponse",
- "400": "ApiException",
- "401": "ApiException",
- "500": "ApiException",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "500": "ApiError",
}
response_data = self.api_client.call_api(
@@ -2846,9 +2676,9 @@ def send_sms_message_with_http_info(
)
@validate_call
- def send_sms_message_without_preload_content(
+ def send_sms_messages_without_preload_content(
self,
- sms_advanced_textual_request: SmsAdvancedTextualRequest,
+ sms_request: SmsRequest,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -2863,10 +2693,10 @@ def send_sms_message_without_preload_content(
) -> RESTResponseType:
"""Send SMS message
- Use this endpoint to send an SMS and set up a rich set of features, such as batch sending with a single API request, scheduling, URL tracking, language and transliteration configuration, etc. The API response will not contain the final delivery status, use [Delivery Reports](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports/receive-outbound-sms-message-report) instead.
+ With this API method, you can do anything from sending a basic message to one person, all the way to sending customized messages to thousands of recipients in one go. It comes with a range of useful features like transliteration, scheduling, and tracking in a unified way.\\ If utilizing Message Delivery Reports webhook, please consult the documentation provided at [Receive outbound SMS message reports](#channels/sms/receive-outbound-sms-message-report-v3).\\ This endpoint is the successor of [Send SMS message](#channels/sms/send-sms-message) and [Send binary SMS message](#channels/sms/send-binary-sms-message).
- :param sms_advanced_textual_request: (required)
- :type sms_advanced_textual_request: SmsAdvancedTextualRequest
+ :param sms_request: (required)
+ :type sms_request: SmsRequest
: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
@@ -2889,8 +2719,8 @@ def send_sms_message_without_preload_content(
:return: Returns the result object.
""" # noqa: E501
- _param = self._send_sms_message_serialize(
- sms_advanced_textual_request=sms_advanced_textual_request,
+ _param = self._send_sms_messages_serialize(
+ sms_request=sms_request,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -2899,9 +2729,10 @@ def send_sms_message_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsResponse",
- "400": "ApiException",
- "401": "ApiException",
- "500": "ApiException",
+ "400": "ApiError",
+ "401": "ApiError",
+ "403": "ApiError",
+ "500": "ApiError",
}
response_data = self.api_client.call_api(
@@ -2909,9 +2740,9 @@ def send_sms_message_without_preload_content(
)
return response_data.response
- def _send_sms_message_serialize(
+ def _send_sms_messages_serialize(
self,
- sms_advanced_textual_request,
+ sms_request,
_request_auth,
_content_type,
_headers,
@@ -2934,8 +2765,8 @@ def _send_sms_message_serialize(
# process the header parameters
# process the form parameters
# process the body parameter
- if sms_advanced_textual_request is not None:
- _body_params = sms_advanced_textual_request
+ if sms_request is not None:
+ _body_params = sms_request
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
@@ -2957,7 +2788,7 @@ def _send_sms_message_serialize(
return self.api_client.param_serialize(
method="POST",
- resource_path="/sms/2/text/advanced",
+ resource_path="/sms/3/messages",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
@@ -3028,7 +2859,9 @@ def update_scheduled_sms_messages_status(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsBulkStatusResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3101,7 +2934,9 @@ def update_scheduled_sms_messages_status_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsBulkStatusResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3174,7 +3009,9 @@ def update_scheduled_sms_messages_status_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "SmsBulkStatusResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
diff --git a/infobip_api_client/api/tfa_api.py b/infobip_api_client/api/tfa_api.py
index 971939f..74786ce 100644
--- a/infobip_api_client/api/tfa_api.py
+++ b/infobip_api_client/api/tfa_api.py
@@ -11,7 +11,6 @@
Do not edit the class manually.
""" # noqa: E501
-
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
@@ -120,7 +119,9 @@ def create_tfa_application(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaApplicationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -190,7 +191,9 @@ def create_tfa_application_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaApplicationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -260,7 +263,9 @@ def create_tfa_application_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaApplicationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -396,7 +401,10 @@ def create_tfa_email_message_template(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaEmailMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -475,7 +483,10 @@ def create_tfa_email_message_template_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaEmailMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -554,7 +565,10 @@ def create_tfa_email_message_template_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaEmailMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -693,7 +707,10 @@ def create_tfa_message_template(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -771,7 +788,10 @@ def create_tfa_message_template_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -849,7 +869,10 @@ def create_tfa_message_template_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -984,6 +1007,8 @@ def get_tfa_application(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaApplicationResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -1059,6 +1084,8 @@ def get_tfa_application_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaApplicationResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -1134,6 +1161,8 @@ def get_tfa_application_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaApplicationResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -1211,7 +1240,7 @@ def get_tfa_applications(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[TfaApplicationResponse]:
- """Get 2FA applications
+ """Get all 2FA applications
An application is a container for 2FA message templates. Use this method to list your applications.
@@ -1247,6 +1276,7 @@ def get_tfa_applications(
_response_types_map: Dict[str, Optional[str]] = {
"200": "List[TfaApplicationResponse]",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -1277,7 +1307,7 @@ def get_tfa_applications_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[TfaApplicationResponse]]:
- """Get 2FA applications
+ """Get all 2FA applications
An application is a container for 2FA message templates. Use this method to list your applications.
@@ -1313,6 +1343,7 @@ def get_tfa_applications_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "List[TfaApplicationResponse]",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -1343,7 +1374,7 @@ def get_tfa_applications_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get 2FA applications
+ """Get all 2FA applications
An application is a container for 2FA message templates. Use this method to list your applications.
@@ -1379,6 +1410,7 @@ def get_tfa_applications_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "List[TfaApplicationResponse]",
"401": "ApiException",
+ "403": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -1502,6 +1534,8 @@ def get_tfa_message_template(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaMessage",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -1580,6 +1614,8 @@ def get_tfa_message_template_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaMessage",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -1658,6 +1694,8 @@ def get_tfa_message_template_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaMessage",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -1743,7 +1781,7 @@ def get_tfa_message_templates(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[TfaMessage]:
- """Get 2FA message templates
+ """Get all 2FA message templates
List all message templates in a 2FA application.
@@ -1782,6 +1820,8 @@ def get_tfa_message_templates(
_response_types_map: Dict[str, Optional[str]] = {
"200": "List[TfaMessage]",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -1817,7 +1857,7 @@ def get_tfa_message_templates_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[TfaMessage]]:
- """Get 2FA message templates
+ """Get all 2FA message templates
List all message templates in a 2FA application.
@@ -1856,6 +1896,8 @@ def get_tfa_message_templates_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "List[TfaMessage]",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -1891,7 +1933,7 @@ def get_tfa_message_templates_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Get 2FA message templates
+ """Get all 2FA message templates
List all message templates in a 2FA application.
@@ -1930,6 +1972,8 @@ def get_tfa_message_templates_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "List[TfaMessage]",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2074,6 +2118,8 @@ def get_tfa_verification_status(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaVerificationResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2171,6 +2217,8 @@ def get_tfa_verification_status_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaVerificationResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2268,6 +2316,8 @@ def get_tfa_verification_status_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaVerificationResponse",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2404,7 +2454,10 @@ def resend2fa_pin_code_over_email(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartEmailAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2479,7 +2532,10 @@ def resend2fa_pin_code_over_email_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartEmailAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2554,7 +2610,10 @@ def resend2fa_pin_code_over_email_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartEmailAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2689,7 +2748,10 @@ def resend_tfa_pin_code_over_sms(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2764,7 +2826,10 @@ def resend_tfa_pin_code_over_sms_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2839,7 +2904,10 @@ def resend_tfa_pin_code_over_sms_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -2974,7 +3042,10 @@ def resend_tfa_pin_code_over_voice(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3049,7 +3120,10 @@ def resend_tfa_pin_code_over_voice_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3124,7 +3198,10 @@ def resend_tfa_pin_code_over_voice_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3253,7 +3330,9 @@ def send2fa_pin_code_over_email(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartEmailAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3322,7 +3401,9 @@ def send2fa_pin_code_over_email_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartEmailAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3391,7 +3472,9 @@ def send2fa_pin_code_over_email_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartEmailAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3470,7 +3553,7 @@ def send_tfa_pin_code_over_sms(
nc_needed: Annotated[
Optional[StrictBool],
Field(
- description="Indicates if Number Lookup is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`."
+ description="Indicates if [Number Lookup](https://www.infobip.com/docs/api/connectivity/number-lookup) is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`."
),
] = None,
_request_timeout: Union[
@@ -3491,7 +3574,7 @@ def send_tfa_pin_code_over_sms(
:param tfa_start_authentication_request: (required)
:type tfa_start_authentication_request: TfaStartAuthenticationRequest
- :param nc_needed: Indicates if Number Lookup is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`.
+ :param nc_needed: Indicates if [Number Lookup](https://www.infobip.com/docs/api/connectivity/number-lookup) is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`.
:type nc_needed: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -3526,7 +3609,9 @@ def send_tfa_pin_code_over_sms(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3548,7 +3633,7 @@ def send_tfa_pin_code_over_sms_with_http_info(
nc_needed: Annotated[
Optional[StrictBool],
Field(
- description="Indicates if Number Lookup is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`."
+ description="Indicates if [Number Lookup](https://www.infobip.com/docs/api/connectivity/number-lookup) is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`."
),
] = None,
_request_timeout: Union[
@@ -3569,7 +3654,7 @@ def send_tfa_pin_code_over_sms_with_http_info(
:param tfa_start_authentication_request: (required)
:type tfa_start_authentication_request: TfaStartAuthenticationRequest
- :param nc_needed: Indicates if Number Lookup is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`.
+ :param nc_needed: Indicates if [Number Lookup](https://www.infobip.com/docs/api/connectivity/number-lookup) is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`.
:type nc_needed: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -3604,7 +3689,9 @@ def send_tfa_pin_code_over_sms_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3626,7 +3713,7 @@ def send_tfa_pin_code_over_sms_without_preload_content(
nc_needed: Annotated[
Optional[StrictBool],
Field(
- description="Indicates if Number Lookup is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`."
+ description="Indicates if [Number Lookup](https://www.infobip.com/docs/api/connectivity/number-lookup) is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`."
),
] = None,
_request_timeout: Union[
@@ -3647,7 +3734,7 @@ def send_tfa_pin_code_over_sms_without_preload_content(
:param tfa_start_authentication_request: (required)
:type tfa_start_authentication_request: TfaStartAuthenticationRequest
- :param nc_needed: Indicates if Number Lookup is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`.
+ :param nc_needed: Indicates if [Number Lookup](https://www.infobip.com/docs/api/connectivity/number-lookup) is needed before sending the 2FA message. If the parameter value is true, Number Lookup will be requested before sending the SMS. If the value is false, the SMS will be sent without requesting Number Lookup. Field's default value is `true`.
:type nc_needed: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -3682,7 +3769,9 @@ def send_tfa_pin_code_over_sms_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3813,7 +3902,9 @@ def send_tfa_pin_code_over_voice(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3882,7 +3973,9 @@ def send_tfa_pin_code_over_voice_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -3951,7 +4044,9 @@ def send_tfa_pin_code_over_voice_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaStartAuthenticationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -4083,7 +4178,10 @@ def update_tfa_application(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaApplicationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -4159,7 +4257,10 @@ def update_tfa_application_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaApplicationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -4235,7 +4336,10 @@ def update_tfa_application_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaApplicationResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -4378,7 +4482,10 @@ def update_tfa_email_message_template(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaEmailMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -4461,7 +4568,10 @@ def update_tfa_email_message_template_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaEmailMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -4544,7 +4654,10 @@ def update_tfa_email_message_template_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaEmailMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"429": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
@@ -4690,7 +4803,10 @@ def update_tfa_message_template(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -4772,7 +4888,10 @@ def update_tfa_message_template_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -4854,7 +4973,10 @@ def update_tfa_message_template_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaMessage",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -4951,9 +5073,9 @@ def verify_tfa_phone_number(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> TfaVerifyPinResponse:
- """Verify phone number
+ """Verify a PIN
- Verify a phone number to confirm successful 2FA authentication.
+ Verify OTP to confirm successful phone number verification. pinId is received in the response after [sending the OTP message](#channels/sms/2fa/pin-sending-and-verification/send-2fa-pin-code-over-voice).
:param pin_id: ID of the pin code that has to be verified. (required)
:type pin_id: str
@@ -4992,7 +5114,10 @@ def verify_tfa_phone_number(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaVerifyPinResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -5026,9 +5151,9 @@ def verify_tfa_phone_number_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[TfaVerifyPinResponse]:
- """Verify phone number
+ """Verify a PIN
- Verify a phone number to confirm successful 2FA authentication.
+ Verify OTP to confirm successful phone number verification. pinId is received in the response after [sending the OTP message](#channels/sms/2fa/pin-sending-and-verification/send-2fa-pin-code-over-voice).
:param pin_id: ID of the pin code that has to be verified. (required)
:type pin_id: str
@@ -5067,7 +5192,10 @@ def verify_tfa_phone_number_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaVerifyPinResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
@@ -5101,9 +5229,9 @@ def verify_tfa_phone_number_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
- """Verify phone number
+ """Verify a PIN
- Verify a phone number to confirm successful 2FA authentication.
+ Verify OTP to confirm successful phone number verification. pinId is received in the response after [sending the OTP message](#channels/sms/2fa/pin-sending-and-verification/send-2fa-pin-code-over-voice).
:param pin_id: ID of the pin code that has to be verified. (required)
:type pin_id: str
@@ -5142,7 +5270,10 @@ def verify_tfa_phone_number_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
"200": "TfaVerifyPinResponse",
+ "400": "ApiException",
"401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
"500": "ApiException",
"4XX": "ApiException",
"5XX": "ApiException",
diff --git a/infobip_api_client/api/voice_api.py b/infobip_api_client/api/voice_api.py
new file mode 100644
index 0000000..0d3d061
--- /dev/null
+++ b/infobip_api_client/api/voice_api.py
@@ -0,0 +1,5284 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from datetime import datetime
+from pydantic import Field, StrictBool, StrictInt, StrictStr
+from typing import List, Optional
+from typing_extensions import Annotated
+from infobip_api_client.models.calls_advanced_body import CallsAdvancedBody
+from infobip_api_client.models.calls_bulk_request import CallsBulkRequest
+from infobip_api_client.models.calls_bulk_response import CallsBulkResponse
+from infobip_api_client.models.calls_bulk_status_response import CallsBulkStatusResponse
+from infobip_api_client.models.calls_get_voices_response import CallsGetVoicesResponse
+from infobip_api_client.models.calls_ip_core_general_status import (
+ CallsIpCoreGeneralStatus,
+)
+from infobip_api_client.models.calls_launch_scenario_request import (
+ CallsLaunchScenarioRequest,
+)
+from infobip_api_client.models.calls_logs_response import CallsLogsResponse
+from infobip_api_client.models.calls_multi_body import CallsMultiBody
+from infobip_api_client.models.calls_recorded_audio_files_response import (
+ CallsRecordedAudioFilesResponse,
+)
+from infobip_api_client.models.calls_report_response import CallsReportResponse
+from infobip_api_client.models.calls_search_response import CallsSearchResponse
+from infobip_api_client.models.calls_single_body import CallsSingleBody
+from infobip_api_client.models.calls_update_scenario_request import (
+ CallsUpdateScenarioRequest,
+)
+from infobip_api_client.models.calls_update_scenario_response import (
+ CallsUpdateScenarioResponse,
+)
+from infobip_api_client.models.calls_update_status_request import (
+ CallsUpdateStatusRequest,
+)
+from infobip_api_client.models.calls_voice_response import CallsVoiceResponse
+
+from infobip_api_client.api_client import ApiClient, RequestSerialized
+from infobip_api_client.api_response import ApiResponse
+from infobip_api_client.rest import RESTResponseType
+
+
+class VoiceApi:
+ """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_a_voice_ivr_scenario(
+ self,
+ calls_update_scenario_request: CallsUpdateScenarioRequest,
+ _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,
+ ) -> CallsUpdateScenarioResponse:
+ """Create Voice IVR Scenarios
+
+ This method allows you to create a Voice IVR Scenario.
+
+ :param calls_update_scenario_request: (required)
+ :type calls_update_scenario_request: CallsUpdateScenarioRequest
+ :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_a_voice_ivr_scenario_serialize(
+ calls_update_scenario_request=calls_update_scenario_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsUpdateScenarioResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_a_voice_ivr_scenario_with_http_info(
+ self,
+ calls_update_scenario_request: CallsUpdateScenarioRequest,
+ _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[CallsUpdateScenarioResponse]:
+ """Create Voice IVR Scenarios
+
+ This method allows you to create a Voice IVR Scenario.
+
+ :param calls_update_scenario_request: (required)
+ :type calls_update_scenario_request: CallsUpdateScenarioRequest
+ :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_a_voice_ivr_scenario_serialize(
+ calls_update_scenario_request=calls_update_scenario_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsUpdateScenarioResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_a_voice_ivr_scenario_without_preload_content(
+ self,
+ calls_update_scenario_request: CallsUpdateScenarioRequest,
+ _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:
+ """Create Voice IVR Scenarios
+
+ This method allows you to create a Voice IVR Scenario.
+
+ :param calls_update_scenario_request: (required)
+ :type calls_update_scenario_request: CallsUpdateScenarioRequest
+ :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_a_voice_ivr_scenario_serialize(
+ calls_update_scenario_request=calls_update_scenario_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsUpdateScenarioResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _create_a_voice_ivr_scenario_serialize(
+ self,
+ calls_update_scenario_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 calls_update_scenario_request is not None:
+ _body_params = calls_update_scenario_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/voice/ivr/1/scenarios",
+ 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_a_voice_ivr_scenario(
+ self,
+ id: Annotated[
+ StrictStr,
+ Field(
+ description="Scenario identifier (for example E83E787CF2613450157ADA3476171E3F)."
+ ),
+ ],
+ _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:
+ """Delete Voice IVR Scenarios
+
+ This method allows you to delete a Voice IVR Scenario.
+
+ :param id: Scenario identifier (for example E83E787CF2613450157ADA3476171E3F). (required)
+ :type 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_a_voice_ivr_scenario_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "str",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_a_voice_ivr_scenario_with_http_info(
+ self,
+ id: Annotated[
+ StrictStr,
+ Field(
+ description="Scenario identifier (for example E83E787CF2613450157ADA3476171E3F)."
+ ),
+ ],
+ _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]:
+ """Delete Voice IVR Scenarios
+
+ This method allows you to delete a Voice IVR Scenario.
+
+ :param id: Scenario identifier (for example E83E787CF2613450157ADA3476171E3F). (required)
+ :type 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_a_voice_ivr_scenario_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "str",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_a_voice_ivr_scenario_without_preload_content(
+ self,
+ id: Annotated[
+ StrictStr,
+ Field(
+ description="Scenario identifier (for example E83E787CF2613450157ADA3476171E3F)."
+ ),
+ ],
+ _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 Voice IVR Scenarios
+
+ This method allows you to delete a Voice IVR Scenario.
+
+ :param id: Scenario identifier (for example E83E787CF2613450157ADA3476171E3F). (required)
+ :type 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_a_voice_ivr_scenario_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "str",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _delete_a_voice_ivr_scenario_serialize(
+ self,
+ id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if id is not None:
+ _path_params["id"] = 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="DELETE",
+ resource_path="/voice/ivr/1/scenarios/{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_a_voice_ivr_scenario(
+ self,
+ id: Annotated[StrictStr, Field(description="Scenario identifier.")],
+ _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,
+ ) -> CallsUpdateScenarioResponse:
+ """Get a Voice IVR Scenario
+
+ This method allows you to get a Voice IVR Scenario.
+
+ :param id: Scenario identifier. (required)
+ :type 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_a_voice_ivr_scenario_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsUpdateScenarioResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_a_voice_ivr_scenario_with_http_info(
+ self,
+ id: Annotated[StrictStr, Field(description="Scenario identifier.")],
+ _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[CallsUpdateScenarioResponse]:
+ """Get a Voice IVR Scenario
+
+ This method allows you to get a Voice IVR Scenario.
+
+ :param id: Scenario identifier. (required)
+ :type 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_a_voice_ivr_scenario_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsUpdateScenarioResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_a_voice_ivr_scenario_without_preload_content(
+ self,
+ id: Annotated[StrictStr, Field(description="Scenario identifier.")],
+ _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 Voice IVR Scenario
+
+ This method allows you to get a Voice IVR Scenario.
+
+ :param id: Scenario identifier. (required)
+ :type 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_a_voice_ivr_scenario_serialize(
+ id=id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsUpdateScenarioResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_a_voice_ivr_scenario_serialize(
+ self,
+ id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if id is not None:
+ _path_params["id"] = 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/voice/ivr/1/scenarios/{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_sent_bulks(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ _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,
+ ) -> CallsBulkResponse:
+ """Get sent bulks
+
+ This method will return information about the scheduled time for a unique bulk message. Canceling and rescheduling are supported only when the Fully featured voice message request contains at least one message and the message bulkId is unique.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_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_sent_bulks_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_sent_bulks_with_http_info(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ _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[CallsBulkResponse]:
+ """Get sent bulks
+
+ This method will return information about the scheduled time for a unique bulk message. Canceling and rescheduling are supported only when the Fully featured voice message request contains at least one message and the message bulkId is unique.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_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_sent_bulks_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_sent_bulks_without_preload_content(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ _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 sent bulks
+
+ This method will return information about the scheduled time for a unique bulk message. Canceling and rescheduling are supported only when the Fully featured voice message request contains at least one message and the message bulkId is unique.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_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_sent_bulks_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_sent_bulks_serialize(
+ self,
+ bulk_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/tts/3/bulks",
+ 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_sent_bulks_status(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ _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,
+ ) -> CallsBulkStatusResponse:
+ """Get sent bulk's status
+
+ This method allows you to get status of scheduled TTS bulk.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_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_sent_bulks_status_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkStatusResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_sent_bulks_status_with_http_info(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ _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[CallsBulkStatusResponse]:
+ """Get sent bulk's status
+
+ This method allows you to get status of scheduled TTS bulk.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_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_sent_bulks_status_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkStatusResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_sent_bulks_status_without_preload_content(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ _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 sent bulk's status
+
+ This method allows you to get status of scheduled TTS bulk.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_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_sent_bulks_status_serialize(
+ bulk_id=bulk_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkStatusResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_sent_bulks_status_serialize(
+ self,
+ bulk_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/tts/3/bulks/status",
+ 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_sent_voice_logs(
+ self,
+ var_from: Annotated[
+ Optional[StrictStr],
+ Field(description="The sender ID which can be alphanumeric or numeric."),
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr],
+ Field(description="Destination address of the voice message."),
+ ] = None,
+ bulk_id: Annotated[
+ Optional[List[StrictStr]],
+ Field(description="The ID which uniquely identifies the request."),
+ ] = None,
+ message_id: Annotated[
+ Optional[List[StrictStr]],
+ Field(description="The ID that uniquely identifies the message sent."),
+ ] = None,
+ general_status: Annotated[
+ Optional[CallsIpCoreGeneralStatus],
+ Field(
+ description="Sent voice message status group. Indicates whether the message has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status."
+ ),
+ ] = None,
+ sent_since: Annotated[
+ Optional[datetime],
+ Field(
+ description="Lower limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX."
+ ),
+ ] = None,
+ sent_until: Annotated[
+ Optional[datetime],
+ Field(
+ description="Upper limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX."
+ ),
+ ] = None,
+ limit: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="Maximal number of messages in the returned logs. Default value is 50."
+ ),
+ ] = None,
+ mcc: Annotated[
+ Optional[StrictStr], Field(description="Mobile country code.")
+ ] = None,
+ mnc: Annotated[
+ Optional[StrictStr], Field(description="Mobile network code.")
+ ] = 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,
+ ) -> CallsLogsResponse:
+ """Get sent Voice logs
+
+ This method allows you to get logs of sent Voice messages. Voice logs are available for the last 48 hours!
+
+ :param var_from: The sender ID which can be alphanumeric or numeric.
+ :type var_from: str
+ :param to: Destination address of the voice message.
+ :type to: str
+ :param bulk_id: The ID which uniquely identifies the request.
+ :type bulk_id: List[str]
+ :param message_id: The ID that uniquely identifies the message sent.
+ :type message_id: List[str]
+ :param general_status: Sent voice message status group. Indicates whether the message has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.
+ :type general_status: CallsIpCoreGeneralStatus
+ :param sent_since: Lower limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX.
+ :type sent_since: datetime
+ :param sent_until: Upper limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX.
+ :type sent_until: datetime
+ :param limit: Maximal number of messages in the returned logs. Default value is 50.
+ :type limit: int
+ :param mcc: Mobile country code.
+ :type mcc: str
+ :param mnc: Mobile network code.
+ :type mnc: 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_sent_voice_logs_serialize(
+ var_from=var_from,
+ to=to,
+ bulk_id=bulk_id,
+ message_id=message_id,
+ general_status=general_status,
+ sent_since=sent_since,
+ sent_until=sent_until,
+ limit=limit,
+ mcc=mcc,
+ mnc=mnc,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsLogsResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_sent_voice_logs_with_http_info(
+ self,
+ var_from: Annotated[
+ Optional[StrictStr],
+ Field(description="The sender ID which can be alphanumeric or numeric."),
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr],
+ Field(description="Destination address of the voice message."),
+ ] = None,
+ bulk_id: Annotated[
+ Optional[List[StrictStr]],
+ Field(description="The ID which uniquely identifies the request."),
+ ] = None,
+ message_id: Annotated[
+ Optional[List[StrictStr]],
+ Field(description="The ID that uniquely identifies the message sent."),
+ ] = None,
+ general_status: Annotated[
+ Optional[CallsIpCoreGeneralStatus],
+ Field(
+ description="Sent voice message status group. Indicates whether the message has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status."
+ ),
+ ] = None,
+ sent_since: Annotated[
+ Optional[datetime],
+ Field(
+ description="Lower limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX."
+ ),
+ ] = None,
+ sent_until: Annotated[
+ Optional[datetime],
+ Field(
+ description="Upper limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX."
+ ),
+ ] = None,
+ limit: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="Maximal number of messages in the returned logs. Default value is 50."
+ ),
+ ] = None,
+ mcc: Annotated[
+ Optional[StrictStr], Field(description="Mobile country code.")
+ ] = None,
+ mnc: Annotated[
+ Optional[StrictStr], Field(description="Mobile network code.")
+ ] = 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[CallsLogsResponse]:
+ """Get sent Voice logs
+
+ This method allows you to get logs of sent Voice messages. Voice logs are available for the last 48 hours!
+
+ :param var_from: The sender ID which can be alphanumeric or numeric.
+ :type var_from: str
+ :param to: Destination address of the voice message.
+ :type to: str
+ :param bulk_id: The ID which uniquely identifies the request.
+ :type bulk_id: List[str]
+ :param message_id: The ID that uniquely identifies the message sent.
+ :type message_id: List[str]
+ :param general_status: Sent voice message status group. Indicates whether the message has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.
+ :type general_status: CallsIpCoreGeneralStatus
+ :param sent_since: Lower limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX.
+ :type sent_since: datetime
+ :param sent_until: Upper limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX.
+ :type sent_until: datetime
+ :param limit: Maximal number of messages in the returned logs. Default value is 50.
+ :type limit: int
+ :param mcc: Mobile country code.
+ :type mcc: str
+ :param mnc: Mobile network code.
+ :type mnc: 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_sent_voice_logs_serialize(
+ var_from=var_from,
+ to=to,
+ bulk_id=bulk_id,
+ message_id=message_id,
+ general_status=general_status,
+ sent_since=sent_since,
+ sent_until=sent_until,
+ limit=limit,
+ mcc=mcc,
+ mnc=mnc,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsLogsResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_sent_voice_logs_without_preload_content(
+ self,
+ var_from: Annotated[
+ Optional[StrictStr],
+ Field(description="The sender ID which can be alphanumeric or numeric."),
+ ] = None,
+ to: Annotated[
+ Optional[StrictStr],
+ Field(description="Destination address of the voice message."),
+ ] = None,
+ bulk_id: Annotated[
+ Optional[List[StrictStr]],
+ Field(description="The ID which uniquely identifies the request."),
+ ] = None,
+ message_id: Annotated[
+ Optional[List[StrictStr]],
+ Field(description="The ID that uniquely identifies the message sent."),
+ ] = None,
+ general_status: Annotated[
+ Optional[CallsIpCoreGeneralStatus],
+ Field(
+ description="Sent voice message status group. Indicates whether the message has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status."
+ ),
+ ] = None,
+ sent_since: Annotated[
+ Optional[datetime],
+ Field(
+ description="Lower limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX."
+ ),
+ ] = None,
+ sent_until: Annotated[
+ Optional[datetime],
+ Field(
+ description="Upper limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX."
+ ),
+ ] = None,
+ limit: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="Maximal number of messages in the returned logs. Default value is 50."
+ ),
+ ] = None,
+ mcc: Annotated[
+ Optional[StrictStr], Field(description="Mobile country code.")
+ ] = None,
+ mnc: Annotated[
+ Optional[StrictStr], Field(description="Mobile network code.")
+ ] = 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 sent Voice logs
+
+ This method allows you to get logs of sent Voice messages. Voice logs are available for the last 48 hours!
+
+ :param var_from: The sender ID which can be alphanumeric or numeric.
+ :type var_from: str
+ :param to: Destination address of the voice message.
+ :type to: str
+ :param bulk_id: The ID which uniquely identifies the request.
+ :type bulk_id: List[str]
+ :param message_id: The ID that uniquely identifies the message sent.
+ :type message_id: List[str]
+ :param general_status: Sent voice message status group. Indicates whether the message has been successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.
+ :type general_status: CallsIpCoreGeneralStatus
+ :param sent_since: Lower limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX.
+ :type sent_since: datetime
+ :param sent_until: Upper limit on date and time of sending a Voice message. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX.
+ :type sent_until: datetime
+ :param limit: Maximal number of messages in the returned logs. Default value is 50.
+ :type limit: int
+ :param mcc: Mobile country code.
+ :type mcc: str
+ :param mnc: Mobile network code.
+ :type mnc: 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_sent_voice_logs_serialize(
+ var_from=var_from,
+ to=to,
+ bulk_id=bulk_id,
+ message_id=message_id,
+ general_status=general_status,
+ sent_since=sent_since,
+ sent_until=sent_until,
+ limit=limit,
+ mcc=mcc,
+ mnc=mnc,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsLogsResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_sent_voice_logs_serialize(
+ self,
+ var_from,
+ to,
+ bulk_id,
+ message_id,
+ general_status,
+ sent_since,
+ sent_until,
+ limit,
+ mcc,
+ mnc,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ "bulkId": "multi",
+ "messageId": "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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if var_from is not None:
+
+ _query_params.append(("from", var_from))
+
+ if to is not None:
+
+ _query_params.append(("to", to))
+
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ if message_id is not None:
+
+ _query_params.append(("messageId", message_id))
+
+ if general_status is not None:
+
+ _query_params.append(("generalStatus", general_status.value))
+
+ if sent_since is not None:
+ if isinstance(sent_since, datetime):
+ _query_params.append(
+ (
+ "sentSince",
+ sent_since.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("sentSince", sent_since))
+
+ if sent_until is not None:
+ if isinstance(sent_until, datetime):
+ _query_params.append(
+ (
+ "sentUntil",
+ sent_until.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("sentUntil", sent_until))
+
+ if limit is not None:
+
+ _query_params.append(("limit", limit))
+
+ if mcc is not None:
+
+ _query_params.append(("mcc", mcc))
+
+ if mnc is not None:
+
+ _query_params.append(("mnc", mnc))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/tts/3/logs",
+ 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_voice_delivery_reports(
+ self,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination addresses."
+ ),
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(description="The ID that uniquely identifies the message sent."),
+ ] = None,
+ limit: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="The maximum number of returned delivery reports. Default value is 50."
+ ),
+ ] = 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,
+ ) -> CallsReportResponse:
+ """Get Voice Delivery Reports
+
+ This method allows you to get delivery reports for sent Voice messages, outbound IVR or Click-to-call (without notifyUrl request parameter). Delivery reports are returned only once. Additional delivery report request will return an empty collection.
+
+ :param bulk_id: The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination addresses.
+ :type bulk_id: str
+ :param message_id: The ID that uniquely identifies the message sent.
+ :type message_id: str
+ :param limit: The maximum number of returned delivery reports. Default value is 50.
+ :type limit: 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_voice_delivery_reports_serialize(
+ bulk_id=bulk_id,
+ message_id=message_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": "CallsReportResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_voice_delivery_reports_with_http_info(
+ self,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination addresses."
+ ),
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(description="The ID that uniquely identifies the message sent."),
+ ] = None,
+ limit: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="The maximum number of returned delivery reports. Default value is 50."
+ ),
+ ] = 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[CallsReportResponse]:
+ """Get Voice Delivery Reports
+
+ This method allows you to get delivery reports for sent Voice messages, outbound IVR or Click-to-call (without notifyUrl request parameter). Delivery reports are returned only once. Additional delivery report request will return an empty collection.
+
+ :param bulk_id: The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination addresses.
+ :type bulk_id: str
+ :param message_id: The ID that uniquely identifies the message sent.
+ :type message_id: str
+ :param limit: The maximum number of returned delivery reports. Default value is 50.
+ :type limit: 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_voice_delivery_reports_serialize(
+ bulk_id=bulk_id,
+ message_id=message_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": "CallsReportResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_voice_delivery_reports_without_preload_content(
+ self,
+ bulk_id: Annotated[
+ Optional[StrictStr],
+ Field(
+ description="The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination addresses."
+ ),
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr],
+ Field(description="The ID that uniquely identifies the message sent."),
+ ] = None,
+ limit: Annotated[
+ Optional[StrictInt],
+ Field(
+ description="The maximum number of returned delivery reports. Default value is 50."
+ ),
+ ] = 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 Voice Delivery Reports
+
+ This method allows you to get delivery reports for sent Voice messages, outbound IVR or Click-to-call (without notifyUrl request parameter). Delivery reports are returned only once. Additional delivery report request will return an empty collection.
+
+ :param bulk_id: The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination addresses.
+ :type bulk_id: str
+ :param message_id: The ID that uniquely identifies the message sent.
+ :type message_id: str
+ :param limit: The maximum number of returned delivery reports. Default value is 50.
+ :type limit: 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_voice_delivery_reports_serialize(
+ bulk_id=bulk_id,
+ message_id=message_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": "CallsReportResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_voice_delivery_reports_serialize(
+ self,
+ bulk_id,
+ message_id,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ if message_id is not None:
+
+ _query_params.append(("messageId", message_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/voice/1/reports",
+ 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_voices(
+ self,
+ language: Annotated[
+ StrictStr,
+ Field(
+ description="Represents the language abbreviation. (e.g. `en`). You can find the list of supported languages in corresponding section for sending voice message."
+ ),
+ ],
+ include_neural: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="Indicates whether neural voices should be included in the response. If set to `false` or omitted, only standard voices will be included in the response. If set to `true`, both standard and neural voices will be included in the response. "
+ ),
+ ] = 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,
+ ) -> CallsGetVoicesResponse:
+ """Get Voices
+
+ This method allows you to retrieve all voices for the given language
+
+ :param language: Represents the language abbreviation. (e.g. `en`). You can find the list of supported languages in corresponding section for sending voice message. (required)
+ :type language: str
+ :param include_neural: Indicates whether neural voices should be included in the response. If set to `false` or omitted, only standard voices will be included in the response. If set to `true`, both standard and neural voices will be included in the response.
+ :type include_neural: 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_voices_serialize(
+ language=language,
+ include_neural=include_neural,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsGetVoicesResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_voices_with_http_info(
+ self,
+ language: Annotated[
+ StrictStr,
+ Field(
+ description="Represents the language abbreviation. (e.g. `en`). You can find the list of supported languages in corresponding section for sending voice message."
+ ),
+ ],
+ include_neural: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="Indicates whether neural voices should be included in the response. If set to `false` or omitted, only standard voices will be included in the response. If set to `true`, both standard and neural voices will be included in the response. "
+ ),
+ ] = 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[CallsGetVoicesResponse]:
+ """Get Voices
+
+ This method allows you to retrieve all voices for the given language
+
+ :param language: Represents the language abbreviation. (e.g. `en`). You can find the list of supported languages in corresponding section for sending voice message. (required)
+ :type language: str
+ :param include_neural: Indicates whether neural voices should be included in the response. If set to `false` or omitted, only standard voices will be included in the response. If set to `true`, both standard and neural voices will be included in the response.
+ :type include_neural: 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_voices_serialize(
+ language=language,
+ include_neural=include_neural,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsGetVoicesResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_voices_without_preload_content(
+ self,
+ language: Annotated[
+ StrictStr,
+ Field(
+ description="Represents the language abbreviation. (e.g. `en`). You can find the list of supported languages in corresponding section for sending voice message."
+ ),
+ ],
+ include_neural: Annotated[
+ Optional[StrictBool],
+ Field(
+ description="Indicates whether neural voices should be included in the response. If set to `false` or omitted, only standard voices will be included in the response. If set to `true`, both standard and neural voices will be included in the response. "
+ ),
+ ] = 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 Voices
+
+ This method allows you to retrieve all voices for the given language
+
+ :param language: Represents the language abbreviation. (e.g. `en`). You can find the list of supported languages in corresponding section for sending voice message. (required)
+ :type language: str
+ :param include_neural: Indicates whether neural voices should be included in the response. If set to `false` or omitted, only standard voices will be included in the response. If set to `true`, both standard and neural voices will be included in the response.
+ :type include_neural: 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_voices_serialize(
+ language=language,
+ include_neural=include_neural,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsGetVoicesResponse",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _get_voices_serialize(
+ self,
+ language,
+ include_neural,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if language is not None:
+ _path_params["language"] = language
+ # process the query parameters
+ if include_neural is not None:
+
+ _query_params.append(("includeNeural", include_neural))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/tts/3/voices/{language}",
+ 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 manage_sent_bulks_status(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ calls_update_status_request: CallsUpdateStatusRequest,
+ _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,
+ ) -> CallsBulkStatusResponse:
+ """Manage sent bulk's status
+
+ This method allows you to manage statuses of scheduled TTS bulk. Messages scheduled with the sendAt or sending speed parameter can be paused, resumed or canceled by changing the message status, or rescheduled using the bulkId parameter as an identifier. Only voice messages that were not already sent can be canceled.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_id: str
+ :param calls_update_status_request: (required)
+ :type calls_update_status_request: CallsUpdateStatusRequest
+ :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._manage_sent_bulks_status_serialize(
+ bulk_id=bulk_id,
+ calls_update_status_request=calls_update_status_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkStatusResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 manage_sent_bulks_status_with_http_info(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ calls_update_status_request: CallsUpdateStatusRequest,
+ _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[CallsBulkStatusResponse]:
+ """Manage sent bulk's status
+
+ This method allows you to manage statuses of scheduled TTS bulk. Messages scheduled with the sendAt or sending speed parameter can be paused, resumed or canceled by changing the message status, or rescheduled using the bulkId parameter as an identifier. Only voice messages that were not already sent can be canceled.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_id: str
+ :param calls_update_status_request: (required)
+ :type calls_update_status_request: CallsUpdateStatusRequest
+ :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._manage_sent_bulks_status_serialize(
+ bulk_id=bulk_id,
+ calls_update_status_request=calls_update_status_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkStatusResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 manage_sent_bulks_status_without_preload_content(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ calls_update_status_request: CallsUpdateStatusRequest,
+ _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:
+ """Manage sent bulk's status
+
+ This method allows you to manage statuses of scheduled TTS bulk. Messages scheduled with the sendAt or sending speed parameter can be paused, resumed or canceled by changing the message status, or rescheduled using the bulkId parameter as an identifier. Only voice messages that were not already sent can be canceled.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_id: str
+ :param calls_update_status_request: (required)
+ :type calls_update_status_request: CallsUpdateStatusRequest
+ :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._manage_sent_bulks_status_serialize(
+ bulk_id=bulk_id,
+ calls_update_status_request=calls_update_status_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkStatusResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _manage_sent_bulks_status_serialize(
+ self,
+ bulk_id,
+ calls_update_status_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if calls_update_status_request is not None:
+ _body_params = calls_update_status_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="PUT",
+ resource_path="/tts/3/bulks/status",
+ 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 reschedule_sent_bulk(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ calls_bulk_request: CallsBulkRequest,
+ _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,
+ ) -> CallsBulkResponse:
+ """Reschedule sent bulk
+
+ This method allows you to reschedule scheduled TTS bulk. Messages scheduled with the sendAt or Sending speed parameter can be paused, resumed or canceled by changing the message status, or rescheduled using the bulkId parameter as an identifier.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_id: str
+ :param calls_bulk_request: (required)
+ :type calls_bulk_request: CallsBulkRequest
+ :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._reschedule_sent_bulk_serialize(
+ bulk_id=bulk_id,
+ calls_bulk_request=calls_bulk_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 reschedule_sent_bulk_with_http_info(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ calls_bulk_request: CallsBulkRequest,
+ _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[CallsBulkResponse]:
+ """Reschedule sent bulk
+
+ This method allows you to reschedule scheduled TTS bulk. Messages scheduled with the sendAt or Sending speed parameter can be paused, resumed or canceled by changing the message status, or rescheduled using the bulkId parameter as an identifier.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_id: str
+ :param calls_bulk_request: (required)
+ :type calls_bulk_request: CallsBulkRequest
+ :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._reschedule_sent_bulk_serialize(
+ bulk_id=bulk_id,
+ calls_bulk_request=calls_bulk_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 reschedule_sent_bulk_without_preload_content(
+ self,
+ bulk_id: Annotated[StrictStr, Field(description="Unique ID of the bulk.")],
+ calls_bulk_request: CallsBulkRequest,
+ _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:
+ """Reschedule sent bulk
+
+ This method allows you to reschedule scheduled TTS bulk. Messages scheduled with the sendAt or Sending speed parameter can be paused, resumed or canceled by changing the message status, or rescheduled using the bulkId parameter as an identifier.
+
+ :param bulk_id: Unique ID of the bulk. (required)
+ :type bulk_id: str
+ :param calls_bulk_request: (required)
+ :type calls_bulk_request: CallsBulkRequest
+ :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._reschedule_sent_bulk_serialize(
+ bulk_id=bulk_id,
+ calls_bulk_request=calls_bulk_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsBulkResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _reschedule_sent_bulk_serialize(
+ self,
+ bulk_id,
+ calls_bulk_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if bulk_id is not None:
+
+ _query_params.append(("bulkId", bulk_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if calls_bulk_request is not None:
+ _body_params = calls_bulk_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="PUT",
+ resource_path="/tts/3/bulks",
+ 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 search_voice_ivr_recorded_files(
+ self,
+ page: Annotated[
+ Optional[StrictInt], Field(description="Page number you want to see.")
+ ] = None,
+ page_size: Annotated[
+ Optional[StrictInt], Field(description="Size of the page you want to see.")
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr], Field(description="The message ID to search by.")
+ ] = None,
+ number: Annotated[
+ Optional[StrictStr],
+ Field(description="The called phone number to search by."),
+ ] = 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[CallsRecordedAudioFilesResponse]:
+ """Search Voice IVR Recorded Files
+
+ This method allows you to search Voice IVR Recorded Audio Files.
+
+ :param page: Page number you want to see.
+ :type page: int
+ :param page_size: Size of the page you want to see.
+ :type page_size: int
+ :param message_id: The message ID to search by.
+ :type message_id: str
+ :param number: The called phone number to search by.
+ :type number: 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._search_voice_ivr_recorded_files_serialize(
+ page=page,
+ page_size=page_size,
+ message_id=message_id,
+ number=number,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[CallsRecordedAudioFilesResponse]",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 search_voice_ivr_recorded_files_with_http_info(
+ self,
+ page: Annotated[
+ Optional[StrictInt], Field(description="Page number you want to see.")
+ ] = None,
+ page_size: Annotated[
+ Optional[StrictInt], Field(description="Size of the page you want to see.")
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr], Field(description="The message ID to search by.")
+ ] = None,
+ number: Annotated[
+ Optional[StrictStr],
+ Field(description="The called phone number to search by."),
+ ] = 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[CallsRecordedAudioFilesResponse]]:
+ """Search Voice IVR Recorded Files
+
+ This method allows you to search Voice IVR Recorded Audio Files.
+
+ :param page: Page number you want to see.
+ :type page: int
+ :param page_size: Size of the page you want to see.
+ :type page_size: int
+ :param message_id: The message ID to search by.
+ :type message_id: str
+ :param number: The called phone number to search by.
+ :type number: 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._search_voice_ivr_recorded_files_serialize(
+ page=page,
+ page_size=page_size,
+ message_id=message_id,
+ number=number,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[CallsRecordedAudioFilesResponse]",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 search_voice_ivr_recorded_files_without_preload_content(
+ self,
+ page: Annotated[
+ Optional[StrictInt], Field(description="Page number you want to see.")
+ ] = None,
+ page_size: Annotated[
+ Optional[StrictInt], Field(description="Size of the page you want to see.")
+ ] = None,
+ message_id: Annotated[
+ Optional[StrictStr], Field(description="The message ID to search by.")
+ ] = None,
+ number: Annotated[
+ Optional[StrictStr],
+ Field(description="The called phone number to search by."),
+ ] = 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:
+ """Search Voice IVR Recorded Files
+
+ This method allows you to search Voice IVR Recorded Audio Files.
+
+ :param page: Page number you want to see.
+ :type page: int
+ :param page_size: Size of the page you want to see.
+ :type page_size: int
+ :param message_id: The message ID to search by.
+ :type message_id: str
+ :param number: The called phone number to search by.
+ :type number: 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._search_voice_ivr_recorded_files_serialize(
+ page=page,
+ page_size=page_size,
+ message_id=message_id,
+ number=number,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[CallsRecordedAudioFilesResponse]",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _search_voice_ivr_recorded_files_serialize(
+ self,
+ page,
+ page_size,
+ message_id,
+ number,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ if page_size is not None:
+
+ _query_params.append(("pageSize", page_size))
+
+ if message_id is not None:
+
+ _query_params.append(("messageId", message_id))
+
+ if number is not None:
+
+ _query_params.append(("number", number))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/voice/ivr/1/files",
+ 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 search_voice_ivr_scenarios(
+ self,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
+ Field(description="Page number you want to see. Default is 1."),
+ ] = None,
+ page_size: Annotated[
+ Optional[Annotated[int, Field(le=50, strict=True, ge=1)]],
+ Field(description="Size of the page you want to see. Default is 50."),
+ ] = None,
+ name: Annotated[
+ Optional[StrictStr], Field(description="The name to search by.")
+ ] = None,
+ label: Annotated[
+ Optional[StrictStr],
+ Field(description="The label of scenario to search by."),
+ ] = None,
+ last_usage_date_since: Annotated[
+ Optional[datetime],
+ Field(
+ description="Lower limit of last usage date in `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`."
+ ),
+ ] = None,
+ last_usage_date_until: Annotated[
+ Optional[datetime],
+ Field(
+ description="Upper limit of last usage date `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`."
+ ),
+ ] = 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[CallsSearchResponse]:
+ """Search Voice IVR Scenarios
+
+ This method allows you to search Voice IVR Scenarios by name. To get a list of all IVR Scenarios, make a request without any parameters.
+
+ :param page: Page number you want to see. Default is 1.
+ :type page: int
+ :param page_size: Size of the page you want to see. Default is 50.
+ :type page_size: int
+ :param name: The name to search by.
+ :type name: str
+ :param label: The label of scenario to search by.
+ :type label: str
+ :param last_usage_date_since: Lower limit of last usage date in `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`.
+ :type last_usage_date_since: datetime
+ :param last_usage_date_until: Upper limit of last usage date `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`.
+ :type last_usage_date_until: datetime
+ :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._search_voice_ivr_scenarios_serialize(
+ page=page,
+ page_size=page_size,
+ name=name,
+ label=label,
+ last_usage_date_since=last_usage_date_since,
+ last_usage_date_until=last_usage_date_until,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[CallsSearchResponse]",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 search_voice_ivr_scenarios_with_http_info(
+ self,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
+ Field(description="Page number you want to see. Default is 1."),
+ ] = None,
+ page_size: Annotated[
+ Optional[Annotated[int, Field(le=50, strict=True, ge=1)]],
+ Field(description="Size of the page you want to see. Default is 50."),
+ ] = None,
+ name: Annotated[
+ Optional[StrictStr], Field(description="The name to search by.")
+ ] = None,
+ label: Annotated[
+ Optional[StrictStr],
+ Field(description="The label of scenario to search by."),
+ ] = None,
+ last_usage_date_since: Annotated[
+ Optional[datetime],
+ Field(
+ description="Lower limit of last usage date in `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`."
+ ),
+ ] = None,
+ last_usage_date_until: Annotated[
+ Optional[datetime],
+ Field(
+ description="Upper limit of last usage date `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`."
+ ),
+ ] = 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[CallsSearchResponse]]:
+ """Search Voice IVR Scenarios
+
+ This method allows you to search Voice IVR Scenarios by name. To get a list of all IVR Scenarios, make a request without any parameters.
+
+ :param page: Page number you want to see. Default is 1.
+ :type page: int
+ :param page_size: Size of the page you want to see. Default is 50.
+ :type page_size: int
+ :param name: The name to search by.
+ :type name: str
+ :param label: The label of scenario to search by.
+ :type label: str
+ :param last_usage_date_since: Lower limit of last usage date in `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`.
+ :type last_usage_date_since: datetime
+ :param last_usage_date_until: Upper limit of last usage date `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`.
+ :type last_usage_date_until: datetime
+ :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._search_voice_ivr_scenarios_serialize(
+ page=page,
+ page_size=page_size,
+ name=name,
+ label=label,
+ last_usage_date_since=last_usage_date_since,
+ last_usage_date_until=last_usage_date_until,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[CallsSearchResponse]",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 search_voice_ivr_scenarios_without_preload_content(
+ self,
+ page: Annotated[
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
+ Field(description="Page number you want to see. Default is 1."),
+ ] = None,
+ page_size: Annotated[
+ Optional[Annotated[int, Field(le=50, strict=True, ge=1)]],
+ Field(description="Size of the page you want to see. Default is 50."),
+ ] = None,
+ name: Annotated[
+ Optional[StrictStr], Field(description="The name to search by.")
+ ] = None,
+ label: Annotated[
+ Optional[StrictStr],
+ Field(description="The label of scenario to search by."),
+ ] = None,
+ last_usage_date_since: Annotated[
+ Optional[datetime],
+ Field(
+ description="Lower limit of last usage date in `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`."
+ ),
+ ] = None,
+ last_usage_date_until: Annotated[
+ Optional[datetime],
+ Field(
+ description="Upper limit of last usage date `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`."
+ ),
+ ] = 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:
+ """Search Voice IVR Scenarios
+
+ This method allows you to search Voice IVR Scenarios by name. To get a list of all IVR Scenarios, make a request without any parameters.
+
+ :param page: Page number you want to see. Default is 1.
+ :type page: int
+ :param page_size: Size of the page you want to see. Default is 50.
+ :type page_size: int
+ :param name: The name to search by.
+ :type name: str
+ :param label: The label of scenario to search by.
+ :type label: str
+ :param last_usage_date_since: Lower limit of last usage date in `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`.
+ :type last_usage_date_since: datetime
+ :param last_usage_date_until: Upper limit of last usage date `yyyy-MM-dd` format. Note: For scenarios where `lastUsageDate` is `null`, filtering matches `createTime`.
+ :type last_usage_date_until: datetime
+ :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._search_voice_ivr_scenarios_serialize(
+ page=page,
+ page_size=page_size,
+ name=name,
+ label=label,
+ last_usage_date_since=last_usage_date_since,
+ last_usage_date_until=last_usage_date_until,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "List[CallsSearchResponse]",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _search_voice_ivr_scenarios_serialize(
+ self,
+ page,
+ page_size,
+ name,
+ label,
+ last_usage_date_since,
+ last_usage_date_until,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if page is not None:
+
+ _query_params.append(("page", page))
+
+ if page_size is not None:
+
+ _query_params.append(("pageSize", page_size))
+
+ if name is not None:
+
+ _query_params.append(("name", name))
+
+ if label is not None:
+
+ _query_params.append(("label", label))
+
+ if last_usage_date_since is not None:
+ if isinstance(last_usage_date_since, datetime):
+ _query_params.append(
+ (
+ "lastUsageDateSince",
+ last_usage_date_since.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("lastUsageDateSince", last_usage_date_since))
+
+ if last_usage_date_until is not None:
+ if isinstance(last_usage_date_until, datetime):
+ _query_params.append(
+ (
+ "lastUsageDateUntil",
+ last_usage_date_until.strftime(
+ self.api_client.configuration.datetime_format
+ ),
+ )
+ )
+ else:
+ _query_params.append(("lastUsageDateUntil", last_usage_date_until))
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="GET",
+ resource_path="/voice/ivr/1/scenarios",
+ 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 send_advanced_voice_tts(
+ self,
+ calls_advanced_body: CallsAdvancedBody,
+ _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,
+ ) -> CallsVoiceResponse:
+ """Send advanced voice message
+
+ This method allows you to send advanced voice messages to one or more destination addresses.
+
+ :param calls_advanced_body: (required)
+ :type calls_advanced_body: CallsAdvancedBody
+ :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._send_advanced_voice_tts_serialize(
+ calls_advanced_body=calls_advanced_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 send_advanced_voice_tts_with_http_info(
+ self,
+ calls_advanced_body: CallsAdvancedBody,
+ _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[CallsVoiceResponse]:
+ """Send advanced voice message
+
+ This method allows you to send advanced voice messages to one or more destination addresses.
+
+ :param calls_advanced_body: (required)
+ :type calls_advanced_body: CallsAdvancedBody
+ :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._send_advanced_voice_tts_serialize(
+ calls_advanced_body=calls_advanced_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 send_advanced_voice_tts_without_preload_content(
+ self,
+ calls_advanced_body: CallsAdvancedBody,
+ _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:
+ """Send advanced voice message
+
+ This method allows you to send advanced voice messages to one or more destination addresses.
+
+ :param calls_advanced_body: (required)
+ :type calls_advanced_body: CallsAdvancedBody
+ :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._send_advanced_voice_tts_serialize(
+ calls_advanced_body=calls_advanced_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _send_advanced_voice_tts_serialize(
+ self,
+ calls_advanced_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 calls_advanced_body is not None:
+ _body_params = calls_advanced_body
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/tts/3/advanced",
+ 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 send_multiple_voice_tts(
+ self,
+ calls_multi_body: CallsMultiBody,
+ _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,
+ ) -> CallsVoiceResponse:
+ """Send multiple voice messages
+
+ This method allows you to send multiple voice messages to one or more destination addresses.
+
+ :param calls_multi_body: (required)
+ :type calls_multi_body: CallsMultiBody
+ :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._send_multiple_voice_tts_serialize(
+ calls_multi_body=calls_multi_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 send_multiple_voice_tts_with_http_info(
+ self,
+ calls_multi_body: CallsMultiBody,
+ _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[CallsVoiceResponse]:
+ """Send multiple voice messages
+
+ This method allows you to send multiple voice messages to one or more destination addresses.
+
+ :param calls_multi_body: (required)
+ :type calls_multi_body: CallsMultiBody
+ :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._send_multiple_voice_tts_serialize(
+ calls_multi_body=calls_multi_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 send_multiple_voice_tts_without_preload_content(
+ self,
+ calls_multi_body: CallsMultiBody,
+ _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:
+ """Send multiple voice messages
+
+ This method allows you to send multiple voice messages to one or more destination addresses.
+
+ :param calls_multi_body: (required)
+ :type calls_multi_body: CallsMultiBody
+ :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._send_multiple_voice_tts_serialize(
+ calls_multi_body=calls_multi_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _send_multiple_voice_tts_serialize(
+ self,
+ calls_multi_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 calls_multi_body is not None:
+ _body_params = calls_multi_body
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/tts/3/multi",
+ 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 send_single_voice_tts(
+ self,
+ calls_single_body: CallsSingleBody,
+ _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,
+ ) -> CallsVoiceResponse:
+ """Send single voice message
+
+ This method allows you to send single voice message to one or more destination addresses.
+
+ :param calls_single_body: (required)
+ :type calls_single_body: CallsSingleBody
+ :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._send_single_voice_tts_serialize(
+ calls_single_body=calls_single_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 send_single_voice_tts_with_http_info(
+ self,
+ calls_single_body: CallsSingleBody,
+ _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[CallsVoiceResponse]:
+ """Send single voice message
+
+ This method allows you to send single voice message to one or more destination addresses.
+
+ :param calls_single_body: (required)
+ :type calls_single_body: CallsSingleBody
+ :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._send_single_voice_tts_serialize(
+ calls_single_body=calls_single_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 send_single_voice_tts_without_preload_content(
+ self,
+ calls_single_body: CallsSingleBody,
+ _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:
+ """Send single voice message
+
+ This method allows you to send single voice message to one or more destination addresses.
+
+ :param calls_single_body: (required)
+ :type calls_single_body: CallsSingleBody
+ :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._send_single_voice_tts_serialize(
+ calls_single_body=calls_single_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _send_single_voice_tts_serialize(
+ self,
+ calls_single_body,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 calls_single_body is not None:
+ _body_params = calls_single_body
+
+ # 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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/tts/3/single",
+ 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 send_voice_messages_with_an_ivr_scenario(
+ self,
+ calls_launch_scenario_request: CallsLaunchScenarioRequest,
+ _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,
+ ) -> CallsVoiceResponse:
+ """Launch IVR Scenario
+
+ This method allows you to start an outbound IVR toward a multiple destinations.
+
+ :param calls_launch_scenario_request: (required)
+ :type calls_launch_scenario_request: CallsLaunchScenarioRequest
+ :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._send_voice_messages_with_an_ivr_scenario_serialize(
+ calls_launch_scenario_request=calls_launch_scenario_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 send_voice_messages_with_an_ivr_scenario_with_http_info(
+ self,
+ calls_launch_scenario_request: CallsLaunchScenarioRequest,
+ _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[CallsVoiceResponse]:
+ """Launch IVR Scenario
+
+ This method allows you to start an outbound IVR toward a multiple destinations.
+
+ :param calls_launch_scenario_request: (required)
+ :type calls_launch_scenario_request: CallsLaunchScenarioRequest
+ :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._send_voice_messages_with_an_ivr_scenario_serialize(
+ calls_launch_scenario_request=calls_launch_scenario_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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 send_voice_messages_with_an_ivr_scenario_without_preload_content(
+ self,
+ calls_launch_scenario_request: CallsLaunchScenarioRequest,
+ _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:
+ """Launch IVR Scenario
+
+ This method allows you to start an outbound IVR toward a multiple destinations.
+
+ :param calls_launch_scenario_request: (required)
+ :type calls_launch_scenario_request: CallsLaunchScenarioRequest
+ :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._send_voice_messages_with_an_ivr_scenario_serialize(
+ calls_launch_scenario_request=calls_launch_scenario_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsVoiceResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _send_voice_messages_with_an_ivr_scenario_serialize(
+ self,
+ calls_launch_scenario_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _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 calls_launch_scenario_request is not None:
+ _body_params = calls_launch_scenario_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="POST",
+ resource_path="/voice/ivr/1/messages",
+ 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_voice_ivr_scenario(
+ self,
+ id: Annotated[StrictStr, Field(description="Scenario identifier.")],
+ calls_update_scenario_request: CallsUpdateScenarioRequest,
+ _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,
+ ) -> CallsUpdateScenarioResponse:
+ """Update Voice IVR Scenarios
+
+ This method allows you to update a Voice IVR Scenario.
+
+ :param id: Scenario identifier. (required)
+ :type id: str
+ :param calls_update_scenario_request: (required)
+ :type calls_update_scenario_request: CallsUpdateScenarioRequest
+ :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_voice_ivr_scenario_serialize(
+ id=id,
+ calls_update_scenario_request=calls_update_scenario_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsUpdateScenarioResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_voice_ivr_scenario_with_http_info(
+ self,
+ id: Annotated[StrictStr, Field(description="Scenario identifier.")],
+ calls_update_scenario_request: CallsUpdateScenarioRequest,
+ _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[CallsUpdateScenarioResponse]:
+ """Update Voice IVR Scenarios
+
+ This method allows you to update a Voice IVR Scenario.
+
+ :param id: Scenario identifier. (required)
+ :type id: str
+ :param calls_update_scenario_request: (required)
+ :type calls_update_scenario_request: CallsUpdateScenarioRequest
+ :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_voice_ivr_scenario_serialize(
+ id=id,
+ calls_update_scenario_request=calls_update_scenario_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsUpdateScenarioResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ 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_voice_ivr_scenario_without_preload_content(
+ self,
+ id: Annotated[StrictStr, Field(description="Scenario identifier.")],
+ calls_update_scenario_request: CallsUpdateScenarioRequest,
+ _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:
+ """Update Voice IVR Scenarios
+
+ This method allows you to update a Voice IVR Scenario.
+
+ :param id: Scenario identifier. (required)
+ :type id: str
+ :param calls_update_scenario_request: (required)
+ :type calls_update_scenario_request: CallsUpdateScenarioRequest
+ :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_voice_ivr_scenario_serialize(
+ id=id,
+ calls_update_scenario_request=calls_update_scenario_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index,
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ "200": "CallsUpdateScenarioResponse",
+ "400": "ApiException",
+ "401": "ApiException",
+ "403": "ApiException",
+ "404": "ApiException",
+ "429": "ApiException",
+ "500": "ApiException",
+ "4XX": "ApiException",
+ "5XX": "ApiException",
+ }
+
+ response_data = self.api_client.call_api(
+ *_param, _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+ def _update_voice_ivr_scenario_serialize(
+ self,
+ id,
+ calls_update_scenario_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _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, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if id is not None:
+ _path_params["id"] = id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if calls_update_scenario_request is not None:
+ _body_params = calls_update_scenario_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] = ["APIKeyHeader"]
+
+ return self.api_client.param_serialize(
+ method="PUT",
+ resource_path="/voice/ivr/1/scenarios/{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,
+ )
diff --git a/infobip_api_client/api_client.py b/infobip_api_client/api_client.py
index 07132f3..1542a0a 100644
--- a/infobip_api_client/api_client.py
+++ b/infobip_api_client/api_client.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
import datetime
from dateutil.parser import parse
from enum import Enum
@@ -73,7 +72,7 @@ class ApiClient:
_pool = None
def __init__(
- self, configuration=None, header_name=None, header_value=None, cookie=None
+ self, configuration=None, header_name=None, header_value=None, cookie=None
) -> None:
# use default configuration if none is provided
if configuration is None:
@@ -86,7 +85,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
- self.user_agent = "infobip-api-client-python/4.0.0"
+ self.user_agent = "infobip-api-client-python/5.0.0"
self.client_side_validation = configuration.client_side_validation
def __enter__(self):
@@ -134,19 +133,19 @@ def set_default(cls, default):
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,
+ 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,
) -> RequestSerialized:
"""Builds the HTTP request params needed by the request.
@@ -233,13 +232,13 @@ def param_serialize(
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,
+ 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.
@@ -270,9 +269,9 @@ def call_api(
return response_data
def response_deserialize(
- self,
- response_data: rest.RESTResponse,
- response_types_map: Optional[Dict[str, ApiResponseT]] = None,
+ self,
+ response_data: rest.RESTResponse,
+ response_types_map: Optional[Dict[str, ApiResponseT]] = None,
) -> ApiResponse[ApiResponseT]:
"""Deserializes response into an object.
:param response_data: RESTResponse object to be deserialized.
@@ -285,9 +284,9 @@ def response_deserialize(
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
+ 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(
@@ -514,17 +513,20 @@ def files_parameters(self, files: Dict[str, Union[str, bytes]]):
"""
params = []
for k, v in files.items():
- if isinstance(v, str):
- with open(v, "rb") as f:
- filename = os.path.basename(f.name)
- filedata = f.read()
- elif isinstance(v, bytes):
- filename = k
- filedata = v
- else:
- raise ValueError("Unsupported file value")
- mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream"
- params.append(tuple([k, tuple([filename, filedata, mimetype])]))
+ if not isinstance(v, list):
+ v = [v]
+ for file_param_content in v:
+ if isinstance(file_param_content, str):
+ with open(file_param_content, "rb") as f:
+ filename = os.path.basename(f.name)
+ filedata = f.read()
+ elif isinstance(file_param_content, bytes):
+ filename = k
+ filedata = file_param_content
+ else:
+ raise ValueError("Unsupported file value")
+ 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]:
@@ -558,14 +560,14 @@ def select_header_content_type(self, content_types):
return content_types[0]
def update_params_for_auth(
- self,
- headers,
- queries,
- auth_settings,
- resource_path,
- method,
- body,
- request_auth=None,
+ self,
+ headers,
+ queries,
+ auth_settings,
+ resource_path,
+ method,
+ body,
+ request_auth=None,
) -> None:
"""Updates header and query params based on authentication setting.
@@ -595,7 +597,7 @@ def update_params_for_auth(
)
def _apply_auth_params(
- self, headers, queries, resource_path, method, body, auth_setting
+ self, headers, queries, resource_path, method, body, auth_setting
) -> None:
"""Updates the request parameters based on a single auth_setting
diff --git a/infobip_api_client/configuration.py b/infobip_api_client/configuration.py
index 240fb67..736a016 100644
--- a/infobip_api_client/configuration.py
+++ b/infobip_api_client/configuration.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
import copy
import logging
from logging import FileHandler
@@ -416,7 +415,7 @@ def to_debug_report(self):
"OS: {env}\n"
"Python Version: {pyversion}\n"
"Version of the API: 1.0.0\n"
- "SDK Package Version: 4.0.0".format(env=sys.platform, pyversion=sys.version)
+ "SDK Package Version: 5.0.0".format(env=sys.platform, pyversion=sys.version)
)
def get_host_settings(self):
diff --git a/infobip_api_client/exceptions.py b/infobip_api_client/exceptions.py
index 586317a..c0b2998 100644
--- a/infobip_api_client/exceptions.py
+++ b/infobip_api_client/exceptions.py
@@ -11,7 +11,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from typing import Any, Optional
from typing_extensions import Self
diff --git a/infobip_api_client/models/__init__.py b/infobip_api_client/models/__init__.py
index f438189..cba5722 100644
--- a/infobip_api_client/models/__init__.py
+++ b/infobip_api_client/models/__init__.py
@@ -13,7 +13,6 @@
Do not edit the class manually.
""" # noqa: E501
-
# import models into model package
from infobip_api_client.models.api_error import ApiError
from infobip_api_client.models.api_error_resource import ApiErrorResource
@@ -21,6 +20,7 @@
from infobip_api_client.models.api_exception import ApiException
from infobip_api_client.models.api_request_error import ApiRequestError
from infobip_api_client.models.api_request_error_details import ApiRequestErrorDetails
+from infobip_api_client.models.basic_security_config import BasicSecurityConfig
from infobip_api_client.models.call import Call
from infobip_api_client.models.call_bulk_request import CallBulkRequest
from infobip_api_client.models.call_bulk_response import CallBulkResponse
@@ -36,25 +36,23 @@
from infobip_api_client.models.call_recording_page import CallRecordingPage
from infobip_api_client.models.call_recording_request import CallRecordingRequest
from infobip_api_client.models.call_request import CallRequest
-from infobip_api_client.models.call_routing_allowed_day import CallRoutingAllowedDay
-from infobip_api_client.models.call_routing_allowed_time_from import (
- CallRoutingAllowedTimeFrom,
-)
-from infobip_api_client.models.call_routing_allowed_time_to import (
- CallRoutingAllowedTimeTo,
-)
-from infobip_api_client.models.call_routing_allowed_time_window import (
- CallRoutingAllowedTimeWindow,
-)
from infobip_api_client.models.call_routing_criteria import CallRoutingCriteria
+from infobip_api_client.models.call_routing_criteria_type import CallRoutingCriteriaType
from infobip_api_client.models.call_routing_custom_data_entry import (
CallRoutingCustomDataEntry,
)
from infobip_api_client.models.call_routing_destination import CallRoutingDestination
+from infobip_api_client.models.call_routing_destination_type import (
+ CallRoutingDestinationType,
+)
from infobip_api_client.models.call_routing_endpoint import CallRoutingEndpoint
from infobip_api_client.models.call_routing_endpoint_destination import (
CallRoutingEndpointDestination,
)
+from infobip_api_client.models.call_routing_endpoint_destination_response import (
+ CallRoutingEndpointDestinationResponse,
+)
+from infobip_api_client.models.call_routing_endpoint_type import CallRoutingEndpointType
from infobip_api_client.models.call_routing_phone_criteria import (
CallRoutingPhoneCriteria,
)
@@ -84,6 +82,15 @@
from infobip_api_client.models.call_routing_url_destination import (
CallRoutingUrlDestination,
)
+from infobip_api_client.models.call_routing_url_destination_http_request import (
+ CallRoutingUrlDestinationHttpRequest,
+)
+from infobip_api_client.models.call_routing_url_destination_response import (
+ CallRoutingUrlDestinationResponse,
+)
+from infobip_api_client.models.call_routing_viber_endpoint import (
+ CallRoutingViberEndpoint,
+)
from infobip_api_client.models.call_routing_web_rtc_criteria import (
CallRoutingWebRTCCriteria,
)
@@ -93,6 +100,7 @@
from infobip_api_client.models.call_state import CallState
from infobip_api_client.models.call_transfer import CallTransfer
from infobip_api_client.models.call_voice import CallVoice
+from infobip_api_client.models.callback_response import CallbackResponse
from infobip_api_client.models.calls_action_call_request import CallsActionCallRequest
from infobip_api_client.models.calls_action_conference_request import (
CallsActionConferenceRequest,
@@ -105,11 +113,17 @@
from infobip_api_client.models.calls_add_new_call_request import CallsAddNewCallRequest
from infobip_api_client.models.calls_advanced_body import CallsAdvancedBody
from infobip_api_client.models.calls_advanced_message import CallsAdvancedMessage
+from infobip_api_client.models.calls_announcement_callee import CallsAnnouncementCallee
+from infobip_api_client.models.calls_announcement_caller import CallsAnnouncementCaller
+from infobip_api_client.models.calls_announcements import CallsAnnouncements
from infobip_api_client.models.calls_anonymization_type import CallsAnonymizationType
from infobip_api_client.models.calls_answer_request import CallsAnswerRequest
from infobip_api_client.models.calls_application_transfer_request import (
CallsApplicationTransferRequest,
)
+from infobip_api_client.models.calls_audio_callback_response import (
+ CallsAudioCallbackResponse,
+)
from infobip_api_client.models.calls_audio_codec import CallsAudioCodec
from infobip_api_client.models.calls_audio_media_properties import (
CallsAudioMediaProperties,
@@ -126,12 +140,22 @@
from infobip_api_client.models.calls_bulk_response import CallsBulkResponse
from infobip_api_client.models.calls_bulk_status import CallsBulkStatus
from infobip_api_client.models.calls_bulk_status_response import CallsBulkStatusResponse
+from infobip_api_client.models.calls_call_api import CallsCallApi
+from infobip_api_client.models.calls_call_api_options import CallsCallApiOptions
+from infobip_api_client.models.calls_capture import CallsCapture
+from infobip_api_client.models.calls_capture_dtmf_callback_response import (
+ CallsCaptureDtmfCallbackResponse,
+)
+from infobip_api_client.models.calls_case_object import CallsCaseObject
+from infobip_api_client.models.calls_cisco_webex_provider import CallsCiscoWebexProvider
from infobip_api_client.models.calls_click_to_call_message import (
CallsClickToCallMessage,
)
from infobip_api_client.models.calls_click_to_call_message_body import (
CallsClickToCallMessageBody,
)
+from infobip_api_client.models.calls_collect import CallsCollect
+from infobip_api_client.models.calls_collect_options import CallsCollectOptions
from infobip_api_client.models.calls_conference import CallsConference
from infobip_api_client.models.calls_conference_and_call import CallsConferenceAndCall
from infobip_api_client.models.calls_conference_broadcast_webrtc_text_request import (
@@ -140,11 +164,15 @@
from infobip_api_client.models.calls_conference_composition import (
CallsConferenceComposition,
)
+from infobip_api_client.models.calls_conference_log import CallsConferenceLog
from infobip_api_client.models.calls_conference_log_page import CallsConferenceLogPage
-from infobip_api_client.models.calls_conference_log_response import (
- CallsConferenceLogResponse,
-)
from infobip_api_client.models.calls_conference_page import CallsConferencePage
+from infobip_api_client.models.calls_conference_play_request import (
+ CallsConferencePlayRequest,
+)
+from infobip_api_client.models.calls_conference_recording import (
+ CallsConferenceRecording,
+)
from infobip_api_client.models.calls_conference_recording_log import (
CallsConferenceRecordingLog,
)
@@ -173,11 +201,25 @@
CallsCreateStaticSipTrunkResponse,
)
from infobip_api_client.models.calls_creation_method import CallsCreationMethod
-from infobip_api_client.models.calls_delivery_day import CallsDeliveryDay
-from infobip_api_client.models.calls_delivery_time import CallsDeliveryTime
-from infobip_api_client.models.calls_delivery_time_window import CallsDeliveryTimeWindow
from infobip_api_client.models.calls_destination import CallsDestination
from infobip_api_client.models.calls_detection_result import CallsDetectionResult
+from infobip_api_client.models.calls_dial import CallsDial
+from infobip_api_client.models.calls_dial_callback_response import (
+ CallsDialCallbackResponse,
+)
+from infobip_api_client.models.calls_dial_options import CallsDialOptions
+from infobip_api_client.models.calls_dial_to_conversations import (
+ CallsDialToConversations,
+)
+from infobip_api_client.models.calls_dial_to_conversations_data import (
+ CallsDialToConversationsData,
+)
+from infobip_api_client.models.calls_dial_to_conversations_options import (
+ CallsDialToConversationsOptions,
+)
+from infobip_api_client.models.calls_dial_to_many import CallsDialToMany
+from infobip_api_client.models.calls_dial_to_many_options import CallsDialToManyOptions
+from infobip_api_client.models.calls_dial_to_web_rtc import CallsDialToWebRTC
from infobip_api_client.models.calls_dialog_broadcast_webrtc_text_request import (
CallsDialogBroadcastWebrtcTextRequest,
)
@@ -199,6 +241,9 @@
from infobip_api_client.models.calls_dialog_recording_request import (
CallsDialogRecordingRequest,
)
+from infobip_api_client.models.calls_dialog_recording_response import (
+ CallsDialogRecordingResponse,
+)
from infobip_api_client.models.calls_dialog_request import CallsDialogRequest
from infobip_api_client.models.calls_dialog_response import CallsDialogResponse
from infobip_api_client.models.calls_dialog_say_request import CallsDialogSayRequest
@@ -207,6 +252,7 @@
CallsDialogWithExistingCallRequest,
)
from infobip_api_client.models.calls_dtmf_capture_request import CallsDtmfCaptureRequest
+from infobip_api_client.models.calls_dtmf_options import CallsDtmfOptions
from infobip_api_client.models.calls_dtmf_send_request import CallsDtmfSendRequest
from infobip_api_client.models.calls_dtmf_termination import CallsDtmfTermination
from infobip_api_client.models.calls_dtmf_type import CallsDtmfType
@@ -220,11 +266,33 @@
from infobip_api_client.models.calls_file_format import CallsFileFormat
from infobip_api_client.models.calls_file_page import CallsFilePage
from infobip_api_client.models.calls_file_play_content import CallsFilePlayContent
+from infobip_api_client.models.calls_for_each import CallsForEach
from infobip_api_client.models.calls_freshworks_provider import CallsFreshworksProvider
from infobip_api_client.models.calls_gender import CallsGender
+from infobip_api_client.models.calls_genesys_cloud_provider import (
+ CallsGenesysCloudProvider,
+)
+from infobip_api_client.models.calls_genesys_cloud_region import CallsGenesysCloudRegion
from infobip_api_client.models.calls_get_voices_response import CallsGetVoicesResponse
+from infobip_api_client.models.calls_go_to import CallsGoTo
+from infobip_api_client.models.calls_go_to_options import CallsGoToOptions
+from infobip_api_client.models.calls_hangup import CallsHangup
from infobip_api_client.models.calls_hangup_request import CallsHangupRequest
+from infobip_api_client.models.calls_hangup_source import CallsHangupSource
+from infobip_api_client.models.calls_http_method import CallsHttpMethod
+from infobip_api_client.models.calls_if_then_else import CallsIfThenElse
+from infobip_api_client.models.calls_ip_core_general_status import (
+ CallsIpCoreGeneralStatus,
+)
+from infobip_api_client.models.calls_ivr_data import CallsIvrData
+from infobip_api_client.models.calls_ivr_message import CallsIvrMessage
from infobip_api_client.models.calls_language import CallsLanguage
+from infobip_api_client.models.calls_launch_scenario_request import (
+ CallsLaunchScenarioRequest,
+)
+from infobip_api_client.models.calls_logs_report import CallsLogsReport
+from infobip_api_client.models.calls_logs_response import CallsLogsResponse
+from infobip_api_client.models.calls_machine_detection import CallsMachineDetection
from infobip_api_client.models.calls_machine_detection_properties import (
CallsMachineDetectionProperties,
)
@@ -246,43 +314,39 @@
CallsMediaStreamConfigResponse,
)
from infobip_api_client.models.calls_multi_body import CallsMultiBody
+from infobip_api_client.models.calls_multi_channel import CallsMultiChannel
from infobip_api_client.models.calls_multi_message import CallsMultiMessage
from infobip_api_client.models.calls_number_presentation_format import (
CallsNumberPresentationFormat,
)
+from infobip_api_client.models.calls_numbers import CallsNumbers
from infobip_api_client.models.calls_on_demand_composition import (
CallsOnDemandComposition,
)
from infobip_api_client.models.calls_participant import CallsParticipant
from infobip_api_client.models.calls_participant_session import CallsParticipantSession
from infobip_api_client.models.calls_participant_state import CallsParticipantState
-from infobip_api_client.models.calls_pegasus_provider import CallsPegasusProvider
-from infobip_api_client.models.calls_pegasus_provider_trunk_type import (
- CallsPegasusProviderTrunkType,
-)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
+from infobip_api_client.models.calls_pause import CallsPause
from infobip_api_client.models.calls_phone_endpoint import CallsPhoneEndpoint
+from infobip_api_client.models.calls_play import CallsPlay
from infobip_api_client.models.calls_play_content import CallsPlayContent
+from infobip_api_client.models.calls_play_content_type import CallsPlayContentType
+from infobip_api_client.models.calls_play_from_recording import CallsPlayFromRecording
from infobip_api_client.models.calls_play_request import CallsPlayRequest
from infobip_api_client.models.calls_pre_answer_request import CallsPreAnswerRequest
+from infobip_api_client.models.calls_price import CallsPrice
+from infobip_api_client.models.calls_provider import CallsProvider
from infobip_api_client.models.calls_provider_sip_trunk_request import (
CallsProviderSipTrunkRequest,
)
-from infobip_api_client.models.calls_public_call_recording import (
- CallsPublicCallRecording,
+from infobip_api_client.models.calls_provider_sip_trunk_response import (
+ CallsProviderSipTrunkResponse,
)
-from infobip_api_client.models.calls_public_conference_recording import (
- CallsPublicConferenceRecording,
+from infobip_api_client.models.calls_provider_sip_trunk_update_request import (
+ CallsProviderSipTrunkUpdateRequest,
)
+from infobip_api_client.models.calls_provider_trunk_type import CallsProviderTrunkType
from infobip_api_client.models.calls_public_country import CallsPublicCountry
-from infobip_api_client.models.calls_public_dialog_recording import (
- CallsPublicDialogRecording,
-)
-from infobip_api_client.models.calls_public_recording_file import (
- CallsPublicRecordingFile,
-)
from infobip_api_client.models.calls_public_region import CallsPublicRegion
from infobip_api_client.models.calls_public_sip_trunk_service_address import (
CallsPublicSipTrunkServiceAddress,
@@ -290,10 +354,18 @@
from infobip_api_client.models.calls_public_sip_trunk_service_address_request import (
CallsPublicSipTrunkServiceAddressRequest,
)
+from infobip_api_client.models.calls_record import CallsRecord
+from infobip_api_client.models.calls_record_options import CallsRecordOptions
+from infobip_api_client.models.calls_recorded_audio_files_response import (
+ CallsRecordedAudioFilesResponse,
+)
+from infobip_api_client.models.calls_recorded_ivr_file import CallsRecordedIvrFile
+from infobip_api_client.models.calls_recording import CallsRecording
from infobip_api_client.models.calls_recording_file import CallsRecordingFile
from infobip_api_client.models.calls_recording_file_location import (
CallsRecordingFileLocation,
)
+from infobip_api_client.models.calls_recording_location import CallsRecordingLocation
from infobip_api_client.models.calls_recording_play_content import (
CallsRecordingPlayContent,
)
@@ -313,14 +385,27 @@
from infobip_api_client.models.calls_registered_sip_trunk_update_request import (
CallsRegisteredSipTrunkUpdateRequest,
)
+from infobip_api_client.models.calls_repeat_until import CallsRepeatUntil
+from infobip_api_client.models.calls_repeat_while import CallsRepeatWhile
+from infobip_api_client.models.calls_report import CallsReport
+from infobip_api_client.models.calls_report_response import CallsReportResponse
from infobip_api_client.models.calls_reschedule_request import CallsRescheduleRequest
from infobip_api_client.models.calls_retry import CallsRetry
from infobip_api_client.models.calls_retry_options import CallsRetryOptions
+from infobip_api_client.models.calls_say import CallsSay
+from infobip_api_client.models.calls_say_options import CallsSayOptions
from infobip_api_client.models.calls_say_request import CallsSayRequest
from infobip_api_client.models.calls_sbc_hosts import CallsSbcHosts
from infobip_api_client.models.calls_scheduling_options import CallsSchedulingOptions
+from infobip_api_client.models.calls_script_inner import CallsScriptInner
+from infobip_api_client.models.calls_search_response import CallsSearchResponse
from infobip_api_client.models.calls_selection_strategy import CallsSelectionStrategy
+from infobip_api_client.models.calls_send_sms import CallsSendSms
+from infobip_api_client.models.calls_send_sms_data import CallsSendSmsData
+from infobip_api_client.models.calls_send_to_reports import CallsSendToReports
from infobip_api_client.models.calls_sending_speed import CallsSendingSpeed
+from infobip_api_client.models.calls_set_variable import CallsSetVariable
+from infobip_api_client.models.calls_sftp_upload_status import CallsSftpUploadStatus
from infobip_api_client.models.calls_single_body import CallsSingleBody
from infobip_api_client.models.calls_single_message_status import (
CallsSingleMessageStatus,
@@ -338,6 +423,9 @@
)
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
from infobip_api_client.models.calls_sip_trunk_page import CallsSipTrunkPage
+from infobip_api_client.models.calls_sip_trunk_registration_credentials import (
+ CallsSipTrunkRegistrationCredentials,
+)
from infobip_api_client.models.calls_sip_trunk_registration_status import (
CallsSipTrunkRegistrationStatus,
)
@@ -352,15 +440,20 @@
from infobip_api_client.models.calls_sip_trunk_status_response import (
CallsSipTrunkStatusResponse,
)
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from infobip_api_client.models.calls_sip_trunk_update_request import (
CallsSipTrunkUpdateRequest,
)
from infobip_api_client.models.calls_speech_capture_request import (
CallsSpeechCaptureRequest,
)
+from infobip_api_client.models.calls_speech_options import CallsSpeechOptions
from infobip_api_client.models.calls_start_media_stream_request import (
CallsStartMediaStreamRequest,
)
+from infobip_api_client.models.calls_start_transcription_request import (
+ CallsStartTranscriptionRequest,
+)
from infobip_api_client.models.calls_static_sip_trunk_request import (
CallsStaticSipTrunkRequest,
)
@@ -372,82 +465,290 @@
)
from infobip_api_client.models.calls_status import CallsStatus
from infobip_api_client.models.calls_stop_play_request import CallsStopPlayRequest
+from infobip_api_client.models.calls_switch_case import CallsSwitchCase
+from infobip_api_client.models.calls_tag_identifier_type import CallsTagIdentifierType
from infobip_api_client.models.calls_termination import CallsTermination
from infobip_api_client.models.calls_termination_type import CallsTerminationType
from infobip_api_client.models.calls_text_play_content import CallsTextPlayContent
-from infobip_api_client.models.calls_time_window import CallsTimeWindow
-from infobip_api_client.models.calls_time_window_point import CallsTimeWindowPoint
+from infobip_api_client.models.calls_time_unit import CallsTimeUnit
+from infobip_api_client.models.calls_transcription import CallsTranscription
from infobip_api_client.models.calls_update_request import CallsUpdateRequest
+from infobip_api_client.models.calls_update_scenario_request import (
+ CallsUpdateScenarioRequest,
+)
+from infobip_api_client.models.calls_update_scenario_response import (
+ CallsUpdateScenarioResponse,
+)
from infobip_api_client.models.calls_update_status_request import (
CallsUpdateStatusRequest,
)
from infobip_api_client.models.calls_url_play_content import CallsUrlPlayContent
-from infobip_api_client.models.calls_url_security_config_type import (
- CallsUrlSecurityConfigType,
-)
from infobip_api_client.models.calls_viber_endpoint import CallsViberEndpoint
from infobip_api_client.models.calls_video_media_properties import (
CallsVideoMediaProperties,
)
from infobip_api_client.models.calls_voice import CallsVoice
+from infobip_api_client.models.calls_voice_data import CallsVoiceData
+from infobip_api_client.models.calls_voice_error import CallsVoiceError
+from infobip_api_client.models.calls_voice_options import CallsVoiceOptions
from infobip_api_client.models.calls_voice_preferences import CallsVoicePreferences
from infobip_api_client.models.calls_voice_response import CallsVoiceResponse
from infobip_api_client.models.calls_voice_response_details import (
CallsVoiceResponseDetails,
)
from infobip_api_client.models.calls_web_rtc_endpoint import CallsWebRtcEndpoint
+from infobip_api_client.models.calls_while_do import CallsWhileDo
+from infobip_api_client.models.delivery_day import DeliveryDay
+from infobip_api_client.models.delivery_time import DeliveryTime
+from infobip_api_client.models.delivery_time_window import DeliveryTimeWindow
+from infobip_api_client.models.email_add_delete_suppression_type import (
+ EmailAddDeleteSuppressionType,
+)
+from infobip_api_client.models.email_add_domain_request import EmailAddDomainRequest
+from infobip_api_client.models.email_add_suppression import EmailAddSuppression
+from infobip_api_client.models.email_add_suppression_request import (
+ EmailAddSuppressionRequest,
+)
+from infobip_api_client.models.email_all_domains_response import EmailAllDomainsResponse
+from infobip_api_client.models.email_bulk_info import EmailBulkInfo
+from infobip_api_client.models.email_bulk_reschedule_request import (
+ EmailBulkRescheduleRequest,
+)
+from infobip_api_client.models.email_bulk_reschedule_response import (
+ EmailBulkRescheduleResponse,
+)
+from infobip_api_client.models.email_bulk_schedule_response import (
+ EmailBulkScheduleResponse,
+)
+from infobip_api_client.models.email_bulk_status import EmailBulkStatus
+from infobip_api_client.models.email_bulk_status_info import EmailBulkStatusInfo
+from infobip_api_client.models.email_bulk_status_response import EmailBulkStatusResponse
+from infobip_api_client.models.email_bulk_update_status_request import (
+ EmailBulkUpdateStatusRequest,
+)
+from infobip_api_client.models.email_bulk_update_status_response import (
+ EmailBulkUpdateStatusResponse,
+)
+from infobip_api_client.models.email_delete_suppression import EmailDeleteSuppression
+from infobip_api_client.models.email_delete_suppression_request import (
+ EmailDeleteSuppressionRequest,
+)
+from infobip_api_client.models.email_dns_record_response import EmailDnsRecordResponse
+from infobip_api_client.models.email_domain_access import EmailDomainAccess
+from infobip_api_client.models.email_domain_info import EmailDomainInfo
+from infobip_api_client.models.email_domain_info_page_response import (
+ EmailDomainInfoPageResponse,
+)
+from infobip_api_client.models.email_domain_ip import EmailDomainIp
+from infobip_api_client.models.email_domain_ip_pool import EmailDomainIpPool
+from infobip_api_client.models.email_domain_ip_pool_assign_request import (
+ EmailDomainIpPoolAssignRequest,
+)
+from infobip_api_client.models.email_domain_ip_pool_update_request import (
+ EmailDomainIpPoolUpdateRequest,
+)
+from infobip_api_client.models.email_domain_ip_request import EmailDomainIpRequest
+from infobip_api_client.models.email_domain_ip_response import EmailDomainIpResponse
+from infobip_api_client.models.email_domain_response import EmailDomainResponse
+from infobip_api_client.models.email_get_suppression_type import EmailGetSuppressionType
+from infobip_api_client.models.email_ip_detail_response import EmailIpDetailResponse
+from infobip_api_client.models.email_ip_domain_response import EmailIpDomainResponse
+from infobip_api_client.models.email_ip_pool_assign_ip_request import (
+ EmailIpPoolAssignIpRequest,
+)
+from infobip_api_client.models.email_ip_pool_create_request import (
+ EmailIpPoolCreateRequest,
+)
+from infobip_api_client.models.email_ip_pool_detail_response import (
+ EmailIpPoolDetailResponse,
+)
+from infobip_api_client.models.email_ip_pool_response import EmailIpPoolResponse
+from infobip_api_client.models.email_ip_response import EmailIpResponse
+from infobip_api_client.models.email_log import EmailLog
+from infobip_api_client.models.email_logs_response import EmailLogsResponse
+from infobip_api_client.models.email_page_details import EmailPageDetails
+from infobip_api_client.models.email_paging import EmailPaging
+from infobip_api_client.models.email_report import EmailReport
+from infobip_api_client.models.email_reports_result import EmailReportsResult
+from infobip_api_client.models.email_response_details import EmailResponseDetails
+from infobip_api_client.models.email_return_path_address_request import (
+ EmailReturnPathAddressRequest,
+)
+from infobip_api_client.models.email_send_response import EmailSendResponse
+from infobip_api_client.models.email_simple_api_response import EmailSimpleApiResponse
+from infobip_api_client.models.email_suppression_info import EmailSuppressionInfo
+from infobip_api_client.models.email_suppression_info_page_response import (
+ EmailSuppressionInfoPageResponse,
+)
+from infobip_api_client.models.email_tracking_event_request import (
+ EmailTrackingEventRequest,
+)
+from infobip_api_client.models.email_tracking_response import EmailTrackingResponse
+from infobip_api_client.models.email_validation_request import EmailValidationRequest
+from infobip_api_client.models.email_validation_response import EmailValidationResponse
+from infobip_api_client.models.email_webhook_dlr_report_response import (
+ EmailWebhookDLRReportResponse,
+)
+from infobip_api_client.models.email_webhook_delivery_report import (
+ EmailWebhookDeliveryReport,
+)
+from infobip_api_client.models.email_webhook_geo_location import EmailWebhookGeoLocation
+from infobip_api_client.models.email_webhook_recipient_info import (
+ EmailWebhookRecipientInfo,
+)
+from infobip_api_client.models.email_webhook_track_report import EmailWebhookTrackReport
+from infobip_api_client.models.email_webhook_track_response import (
+ EmailWebhookTrackResponse,
+)
+from infobip_api_client.models.flow_add_flow_participant_result import (
+ FlowAddFlowParticipantResult,
+)
+from infobip_api_client.models.flow_add_flow_participant_status import (
+ FlowAddFlowParticipantStatus,
+)
+from infobip_api_client.models.flow_add_flow_participants_request import (
+ FlowAddFlowParticipantsRequest,
+)
+from infobip_api_client.models.flow_add_flow_participants_response import (
+ FlowAddFlowParticipantsResponse,
+)
+from infobip_api_client.models.flow_api_exception import FlowApiException
+from infobip_api_client.models.flow_api_request_error import FlowApiRequestError
+from infobip_api_client.models.flow_api_request_error_details import (
+ FlowApiRequestErrorDetails,
+)
+from infobip_api_client.models.flow_common_ott_contact import FlowCommonOttContact
+from infobip_api_client.models.flow_common_push_contact import FlowCommonPushContact
+from infobip_api_client.models.flow_email_contact import FlowEmailContact
+from infobip_api_client.models.flow_error_status_reason import FlowErrorStatusReason
+from infobip_api_client.models.flow_exception_response import FlowExceptionResponse
+from infobip_api_client.models.flow_gender import FlowGender
+from infobip_api_client.models.flow_integrations import FlowIntegrations
+from infobip_api_client.models.flow_origin import FlowOrigin
+from infobip_api_client.models.flow_participant import FlowParticipant
+from infobip_api_client.models.flow_participants_report_response import (
+ FlowParticipantsReportResponse,
+)
+from infobip_api_client.models.flow_person import FlowPerson
+from infobip_api_client.models.flow_person_contacts import FlowPersonContacts
+from infobip_api_client.models.flow_person_unique_field import FlowPersonUniqueField
+from infobip_api_client.models.flow_person_unique_field_type import (
+ FlowPersonUniqueFieldType,
+)
+from infobip_api_client.models.flow_phone_contact import FlowPhoneContact
+from infobip_api_client.models.flow_push_contact import FlowPushContact
+from infobip_api_client.models.flow_salesforce import FlowSalesforce
+from infobip_api_client.models.flow_type import FlowType
+from infobip_api_client.models.forms_action_after_submission import (
+ FormsActionAfterSubmission,
+)
+from infobip_api_client.models.forms_action_after_submission_type import (
+ FormsActionAfterSubmissionType,
+)
+from infobip_api_client.models.forms_component_type import FormsComponentType
+from infobip_api_client.models.forms_element import FormsElement
+from infobip_api_client.models.forms_element_option import FormsElementOption
+from infobip_api_client.models.forms_exception import FormsException
+from infobip_api_client.models.forms_request_error import FormsRequestError
+from infobip_api_client.models.forms_request_error_details import (
+ FormsRequestErrorDetails,
+)
+from infobip_api_client.models.forms_response import FormsResponse
+from infobip_api_client.models.forms_response_content import FormsResponseContent
+from infobip_api_client.models.forms_status import FormsStatus
+from infobip_api_client.models.forms_status_response import FormsStatusResponse
+from infobip_api_client.models.forms_type import FormsType
+from infobip_api_client.models.forms_validation_rules import FormsValidationRules
+from infobip_api_client.models.hmac_algorithm import HmacAlgorithm
+from infobip_api_client.models.hmac_security_config import HmacSecurityConfig
+from infobip_api_client.models.iys_recipient_type import IysRecipientType
from infobip_api_client.models.message_error import MessageError
+from infobip_api_client.models.message_general_status import MessageGeneralStatus
from infobip_api_client.models.message_price import MessagePrice
from infobip_api_client.models.message_status import MessageStatus
-from infobip_api_client.models.page_info import PageInfo
-from infobip_api_client.models.security_config import SecurityConfig
-from infobip_api_client.models.security_config_type import SecurityConfigType
-from infobip_api_client.models.sms_advanced_binary_request import (
- SmsAdvancedBinaryRequest,
+from infobip_api_client.models.number_masking_callback_request import (
+ NumberMaskingCallbackRequest,
+)
+from infobip_api_client.models.number_masking_credentials_body import (
+ NumberMaskingCredentialsBody,
)
-from infobip_api_client.models.sms_advanced_textual_request import (
- SmsAdvancedTextualRequest,
+from infobip_api_client.models.number_masking_credentials_response import (
+ NumberMaskingCredentialsResponse,
)
+from infobip_api_client.models.number_masking_recording_status import (
+ NumberMaskingRecordingStatus,
+)
+from infobip_api_client.models.number_masking_setup_body import NumberMaskingSetupBody
+from infobip_api_client.models.number_masking_setup_response import (
+ NumberMaskingSetupResponse,
+)
+from infobip_api_client.models.number_masking_status_request import (
+ NumberMaskingStatusRequest,
+)
+from infobip_api_client.models.number_masking_upload_body import NumberMaskingUploadBody
+from infobip_api_client.models.number_masking_upload_response import (
+ NumberMaskingUploadResponse,
+)
+from infobip_api_client.models.page_info import PageInfo
+from infobip_api_client.models.platform import Platform
+from infobip_api_client.models.ringback_generation import RingbackGeneration
+from infobip_api_client.models.security_config import SecurityConfig
from infobip_api_client.models.sms_binary_content import SmsBinaryContent
-from infobip_api_client.models.sms_binary_message import SmsBinaryMessage
from infobip_api_client.models.sms_bulk_request import SmsBulkRequest
from infobip_api_client.models.sms_bulk_response import SmsBulkResponse
from infobip_api_client.models.sms_bulk_status import SmsBulkStatus
from infobip_api_client.models.sms_bulk_status_response import SmsBulkStatusResponse
-from infobip_api_client.models.sms_delivery_day import SmsDeliveryDay
+from infobip_api_client.models.sms_delivery_report import SmsDeliveryReport
from infobip_api_client.models.sms_delivery_result import SmsDeliveryResult
-from infobip_api_client.models.sms_delivery_time_from import SmsDeliveryTimeFrom
-from infobip_api_client.models.sms_delivery_time_to import SmsDeliveryTimeTo
-from infobip_api_client.models.sms_delivery_time_window import SmsDeliveryTimeWindow
from infobip_api_client.models.sms_destination import SmsDestination
from infobip_api_client.models.sms_inbound_message import SmsInboundMessage
from infobip_api_client.models.sms_inbound_message_result import SmsInboundMessageResult
from infobip_api_client.models.sms_india_dlt_options import SmsIndiaDltOptions
from infobip_api_client.models.sms_language import SmsLanguage
+from infobip_api_client.models.sms_language_code import SmsLanguageCode
from infobip_api_client.models.sms_language_configuration import (
SmsLanguageConfiguration,
)
from infobip_api_client.models.sms_log import SmsLog
+from infobip_api_client.models.sms_message_content import SmsMessageContent
from infobip_api_client.models.sms_logs_response import SmsLogsResponse
+from infobip_api_client.models.sms_message import SmsMessage
+from infobip_api_client.models.sms_message_delivery_reporting import (
+ SmsMessageDeliveryReporting,
+)
+from infobip_api_client.models.sms_message_error import SmsMessageError
+from infobip_api_client.models.sms_message_error_group import SmsMessageErrorGroup
+from infobip_api_client.models.sms_message_options import SmsMessageOptions
+from infobip_api_client.models.sms_message_request_options import (
+ SmsMessageRequestOptions,
+)
+from infobip_api_client.models.sms_message_response_details import (
+ SmsMessageResponseDetails,
+)
+from infobip_api_client.models.sms_message_status import SmsMessageStatus
from infobip_api_client.models.sms_preview import SmsPreview
+from infobip_api_client.models.sms_preview_language import SmsPreviewLanguage
from infobip_api_client.models.sms_preview_request import SmsPreviewRequest
from infobip_api_client.models.sms_preview_response import SmsPreviewResponse
from infobip_api_client.models.sms_regional_options import SmsRegionalOptions
-from infobip_api_client.models.sms_report import SmsReport
+from infobip_api_client.models.sms_request import SmsRequest
+from infobip_api_client.models.sms_request_scheduling_settings import (
+ SmsRequestSchedulingSettings,
+)
from infobip_api_client.models.sms_response import SmsResponse
from infobip_api_client.models.sms_response_details import SmsResponseDetails
from infobip_api_client.models.sms_sending_speed_limit import SmsSendingSpeedLimit
from infobip_api_client.models.sms_south_korea_options import SmsSouthKoreaOptions
-from infobip_api_client.models.sms_speed_limit_time_unit import SmsSpeedLimitTimeUnit
-from infobip_api_client.models.sms_textual_message import SmsTextualMessage
+from infobip_api_client.models.sms_text_content import SmsTextContent
from infobip_api_client.models.sms_tracking import SmsTracking
-from infobip_api_client.models.sms_turkey_iys_options import SmsTurkeyIysOptions
+from infobip_api_client.models.sms_transliteration_code import SmsTransliterationCode
from infobip_api_client.models.sms_update_status_request import SmsUpdateStatusRequest
-from infobip_api_client.models.sms_url_options import SmsUrlOptions
from infobip_api_client.models.sms_webhook_inbound_report import SmsWebhookInboundReport
from infobip_api_client.models.sms_webhook_inbound_report_response import (
SmsWebhookInboundReportResponse,
)
+from infobip_api_client.models.sms_webhooks import SmsWebhooks
+from infobip_api_client.models.speed_limit_time_unit import SpeedLimitTimeUnit
from infobip_api_client.models.tfa_application_configuration import (
TfaApplicationConfiguration,
)
@@ -485,3 +786,9 @@
from infobip_api_client.models.tfa_verification_response import TfaVerificationResponse
from infobip_api_client.models.tfa_verify_pin_request import TfaVerifyPinRequest
from infobip_api_client.models.tfa_verify_pin_response import TfaVerifyPinResponse
+from infobip_api_client.models.turkey_iys_options import TurkeyIysOptions
+from infobip_api_client.models.url_options import UrlOptions
+from infobip_api_client.models.url_security_config_type import UrlSecurityConfigType
+from infobip_api_client.models.validity_period import ValidityPeriod
+from infobip_api_client.models.validity_period_time_unit import ValidityPeriodTimeUnit
+from infobip_api_client.models.webhook_message_count import WebhookMessageCount
diff --git a/infobip_api_client/models/api_error.py b/infobip_api_client/models/api_error.py
index 966cae4..9e711fe 100644
--- a/infobip_api_client/models/api_error.py
+++ b/infobip_api_client/models/api_error.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/api_error_resource.py b/infobip_api_client/models/api_error_resource.py
index b9d2d99..506d103 100644
--- a/infobip_api_client/models/api_error_resource.py
+++ b/infobip_api_client/models/api_error_resource.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/api_error_violation.py b/infobip_api_client/models/api_error_violation.py
index c3e4702..3100c68 100644
--- a/infobip_api_client/models/api_error_violation.py
+++ b/infobip_api_client/models/api_error_violation.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/api_exception.py b/infobip_api_client/models/api_exception.py
index e6ba2bb..53715b0 100644
--- a/infobip_api_client/models/api_exception.py
+++ b/infobip_api_client/models/api_exception.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/api_request_error.py b/infobip_api_client/models/api_request_error.py
index 3b8ca2d..cd09f94 100644
--- a/infobip_api_client/models/api_request_error.py
+++ b/infobip_api_client/models/api_request_error.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/api_request_error_details.py b/infobip_api_client/models/api_request_error_details.py
index 77589de..4639e7e 100644
--- a/infobip_api_client/models/api_request_error_details.py
+++ b/infobip_api_client/models/api_request_error_details.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/basic_security_config.py b/infobip_api_client/models/basic_security_config.py
new file mode 100644
index 0000000..caa52da
--- /dev/null
+++ b/infobip_api_client/models/basic_security_config.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from infobip_api_client.models.security_config import SecurityConfig
+from infobip_api_client.models.url_security_config_type import UrlSecurityConfigType
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class BasicSecurityConfig(SecurityConfig):
+ """
+ BasicSecurityConfig
+ """ # noqa: E501
+
+ username: StrictStr = Field(description="Username.")
+ password: StrictStr = Field(description="Password.")
+ __properties: ClassVar[List[str]] = ["type", "username", "password"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BasicSecurityConfig from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BasicSecurityConfig from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "type": obj.get("type"),
+ "username": obj.get("username"),
+ "password": obj.get("password"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/call.py b/infobip_api_client/models/call.py
index 04ba029..c68ea54 100644
--- a/infobip_api_client/models/call.py
+++ b/infobip_api_client/models/call.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -29,6 +28,7 @@
CallsMachineDetectionProperties,
)
from infobip_api_client.models.calls_media_properties import CallsMediaProperties
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
@@ -78,9 +78,7 @@ class Call(BaseModel):
description="Current calls configuration ID.",
alias="callsConfigurationId",
)
- application_id: Optional[StrictStr] = Field(
- default=None, description="Current application ID.", alias="applicationId"
- )
+ platform: Optional[Platform] = None
conference_id: Optional[Annotated[str, Field(strict=True, max_length=128)]] = Field(
default=None, description="Current conference ID.", alias="conferenceId"
)
@@ -105,7 +103,7 @@ class Call(BaseModel):
"machineDetection",
"ringDuration",
"callsConfigurationId",
- "applicationId",
+ "platform",
"conferenceId",
"customData",
"dialogId",
@@ -157,6 +155,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of machine_detection
if self.machine_detection:
_dict["machineDetection"] = self.machine_detection.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
return _dict
@classmethod
@@ -192,7 +193,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
else None,
"ringDuration": obj.get("ringDuration"),
"callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"conferenceId": obj.get("conferenceId"),
"customData": obj.get("customData"),
"dialogId": obj.get("dialogId"),
diff --git a/infobip_api_client/models/call_bulk_request.py b/infobip_api_client/models/call_bulk_request.py
index 0910e41..d0bc66b 100644
--- a/infobip_api_client/models/call_bulk_request.py
+++ b/infobip_api_client/models/call_bulk_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,6 +20,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.calls_bulk_item import CallsBulkItem
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
@@ -35,19 +35,15 @@ class CallBulkRequest(BaseModel):
description="Unique ID of the bulk request. If it's not set, a unique ID will be assigned to the bulk request.",
alias="bulkId",
)
- calls_configuration_id: Optional[StrictStr] = Field(
- default=None,
- description="Calls Configuration ID.",
- alias="callsConfigurationId",
- )
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
+ calls_configuration_id: StrictStr = Field(
+ description="Calls Configuration ID.", alias="callsConfigurationId"
)
+ platform: Optional[Platform] = None
items: List[CallsBulkItem] = Field(description="Bulk item list.")
__properties: ClassVar[List[str]] = [
"bulkId",
"callsConfigurationId",
- "applicationId",
+ "platform",
"items",
]
@@ -88,6 +84,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
_items = []
if self.items:
@@ -110,7 +109,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"bulkId": obj.get("bulkId"),
"callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"items": [CallsBulkItem.from_dict(_item) for _item in obj["items"]]
if obj.get("items") is not None
else None,
diff --git a/infobip_api_client/models/call_bulk_response.py b/infobip_api_client/models/call_bulk_response.py
index 4345040..32cc330 100644
--- a/infobip_api_client/models/call_bulk_response.py
+++ b/infobip_api_client/models/call_bulk_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_bulk_status.py b/infobip_api_client/models/call_bulk_status.py
index 0983d2e..fbbda4d 100644
--- a/infobip_api_client/models/call_bulk_status.py
+++ b/infobip_api_client/models/call_bulk_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_direction.py b/infobip_api_client/models/call_direction.py
index 78dd7c6..d11dfdf 100644
--- a/infobip_api_client/models/call_direction.py
+++ b/infobip_api_client/models/call_direction.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/call_endpoint.py b/infobip_api_client/models/call_endpoint.py
index ff6a99a..69cd096 100644
--- a/infobip_api_client/models/call_endpoint.py
+++ b/infobip_api_client/models/call_endpoint.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_endpoint_type.py b/infobip_api_client/models/call_endpoint_type.py
index 8b38e8f..632fe26 100644
--- a/infobip_api_client/models/call_endpoint_type.py
+++ b/infobip_api_client/models/call_endpoint_type.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/call_log.py b/infobip_api_client/models/call_log.py
index 7960fdf..d41df26 100644
--- a/infobip_api_client/models/call_log.py
+++ b/infobip_api_client/models/call_log.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -26,9 +25,11 @@
from infobip_api_client.models.call_endpoint import CallEndpoint
from infobip_api_client.models.call_state import CallState
from infobip_api_client.models.calls_error_code_info import CallsErrorCodeInfo
+from infobip_api_client.models.calls_hangup_source import CallsHangupSource
from infobip_api_client.models.calls_machine_detection_properties import (
CallsMachineDetectionProperties,
)
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
@@ -77,11 +78,7 @@ class CallLog(BaseModel):
description="IDs of the calls configurations used during the call.",
alias="callsConfigurationIds",
)
- application_ids: Optional[List[StrictStr]] = Field(
- default=None,
- description="IDs of the applications used during the call.",
- alias="applicationIds",
- )
+ platform: Optional[Platform] = None
conference_ids: Optional[List[StrictStr]] = Field(
default=None,
description="IDs of the conferences where the call was a participant.",
@@ -108,6 +105,9 @@ class CallLog(BaseModel):
default=None, description="Dialog ID.", alias="dialogId"
)
sender: Optional[StrictStr] = Field(default=None, description="Sender.")
+ hangup_source: Optional[CallsHangupSource] = Field(
+ default=None, alias="hangupSource"
+ )
__properties: ClassVar[List[str]] = [
"callId",
"endpoint",
@@ -122,7 +122,7 @@ class CallLog(BaseModel):
"machineDetection",
"ringDuration",
"callsConfigurationIds",
- "applicationIds",
+ "platform",
"conferenceIds",
"duration",
"hasCameraVideo",
@@ -131,6 +131,7 @@ class CallLog(BaseModel):
"customData",
"dialogId",
"sender",
+ "hangupSource",
]
model_config = ConfigDict(
@@ -176,6 +177,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of machine_detection
if self.machine_detection:
_dict["machineDetection"] = self.machine_detection.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
# override the default output from pydantic by calling `to_dict()` of error_code
if self.error_code:
_dict["errorCode"] = self.error_code.to_dict()
@@ -211,7 +215,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
else None,
"ringDuration": obj.get("ringDuration"),
"callsConfigurationIds": obj.get("callsConfigurationIds"),
- "applicationIds": obj.get("applicationIds"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"conferenceIds": obj.get("conferenceIds"),
"duration": obj.get("duration"),
"hasCameraVideo": obj.get("hasCameraVideo"),
@@ -222,6 +228,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"customData": obj.get("customData"),
"dialogId": obj.get("dialogId"),
"sender": obj.get("sender"),
+ "hangupSource": obj.get("hangupSource"),
}
)
return _obj
diff --git a/infobip_api_client/models/call_log_page.py b/infobip_api_client/models/call_log_page.py
index 9d4eefc..a922cd9 100644
--- a/infobip_api_client/models/call_log_page.py
+++ b/infobip_api_client/models/call_log_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_page.py b/infobip_api_client/models/call_page.py
index 50bf464..6352b51 100644
--- a/infobip_api_client/models/call_page.py
+++ b/infobip_api_client/models/call_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_rate.py b/infobip_api_client/models/call_rate.py
index cba60e3..6016ba5 100644
--- a/infobip_api_client/models/call_rate.py
+++ b/infobip_api_client/models/call_rate.py
@@ -12,14 +12,14 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_time_unit import CallsTimeUnit
from typing import Optional, Set
from typing_extensions import Self
@@ -34,25 +34,9 @@ class CallRate(BaseModel):
description="Defines the number of calls scheduled per specified time unit.",
alias="maxCalls",
)
- time_unit: Optional[StrictStr] = Field(
- default=None,
- description="Defines a time unit used for calculating call creation rate.",
- alias="timeUnit",
- )
+ time_unit: Optional[CallsTimeUnit] = Field(default=None, alias="timeUnit")
__properties: ClassVar[List[str]] = ["maxCalls", "timeUnit"]
- @field_validator("time_unit")
- def time_unit_validate_enum(cls, value):
- """Validates the enum"""
- if value is None:
- return value
-
- if value not in set(["SECONDS", "MINUTES", "HOURS", "DAYS"]):
- raise ValueError(
- "must be one of enum values ('SECONDS', 'MINUTES', 'HOURS', 'DAYS')"
- )
- return value
-
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
diff --git a/infobip_api_client/models/call_recording.py b/infobip_api_client/models/call_recording.py
index 189c894..0040ad7 100644
--- a/infobip_api_client/models/call_recording.py
+++ b/infobip_api_client/models/call_recording.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -26,6 +25,7 @@
from infobip_api_client.models.call_endpoint import CallEndpoint
from infobip_api_client.models.calls_recording_file import CallsRecordingFile
from infobip_api_client.models.calls_recording_status import CallsRecordingStatus
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
@@ -52,9 +52,7 @@ class CallRecording(BaseModel):
description="Calls Configuration ID.",
alias="callsConfigurationId",
)
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
- )
+ platform: Optional[Platform] = None
start_time: Optional[datetime] = Field(
default=None,
description="Date and time when the (first) call recording started.",
@@ -73,7 +71,7 @@ class CallRecording(BaseModel):
"status",
"reason",
"callsConfigurationId",
- "applicationId",
+ "platform",
"startTime",
"endTime",
]
@@ -125,6 +123,9 @@ def to_dict(self) -> Dict[str, Any]:
if _item:
_items.append(_item.to_dict())
_dict["files"] = _items
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
return _dict
@classmethod
@@ -149,7 +150,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"status": obj.get("status"),
"reason": obj.get("reason"),
"callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"startTime": obj.get("startTime"),
"endTime": obj.get("endTime"),
}
diff --git a/infobip_api_client/models/call_recording_page.py b/infobip_api_client/models/call_recording_page.py
index 66f76c4..07aa554 100644
--- a/infobip_api_client/models/call_recording_page.py
+++ b/infobip_api_client/models/call_recording_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_recording_request.py b/infobip_api_client/models/call_recording_request.py
index 3740d1a..fa4b6b8 100644
--- a/infobip_api_client/models/call_recording_request.py
+++ b/infobip_api_client/models/call_recording_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -36,7 +35,7 @@ class CallRecordingRequest(BaseModel):
default=None, alias="customData"
)
file_prefix: Optional[
- Annotated[str, Field(min_length=1, strict=True, max_length=100)]
+ Annotated[str, Field(min_length=1, strict=True, max_length=214)]
] = Field(default=None, alias="filePrefix")
__properties: ClassVar[List[str]] = ["recordingType", "customData", "filePrefix"]
diff --git a/infobip_api_client/models/call_request.py b/infobip_api_client/models/call_request.py
index 22af324..5181448 100644
--- a/infobip_api_client/models/call_request.py
+++ b/infobip_api_client/models/call_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -26,6 +25,7 @@
from infobip_api_client.models.calls_machine_detection_request import (
CallsMachineDetectionRequest,
)
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
@@ -60,14 +60,10 @@ class CallRequest(BaseModel):
custom_data: Optional[Dict[str, StrictStr]] = Field(
default=None, description="Custom data.", alias="customData"
)
- calls_configuration_id: Optional[StrictStr] = Field(
- default=None,
- description="Calls Configuration ID.",
- alias="callsConfigurationId",
- )
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
+ calls_configuration_id: StrictStr = Field(
+ description="Calls Configuration ID.", alias="callsConfigurationId"
)
+ platform: Optional[Platform] = None
parent_call_id: Optional[
Annotated[str, Field(strict=True, max_length=128)]
] = Field(
@@ -85,7 +81,7 @@ class CallRequest(BaseModel):
"maxDuration",
"customData",
"callsConfigurationId",
- "applicationId",
+ "platform",
"parentCallId",
]
@@ -135,6 +131,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of machine_detection
if self.machine_detection:
_dict["machineDetection"] = self.machine_detection.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
return _dict
@classmethod
@@ -167,7 +166,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
else 28800,
"customData": obj.get("customData"),
"callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"parentCallId": obj.get("parentCallId"),
}
)
diff --git a/infobip_api_client/models/call_routing_criteria.py b/infobip_api_client/models/call_routing_criteria.py
index 42bd59f..dccdbd7 100644
--- a/infobip_api_client/models/call_routing_criteria.py
+++ b/infobip_api_client/models/call_routing_criteria.py
@@ -12,15 +12,15 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from importlib import import_module
-from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Union
+from infobip_api_client.models.call_routing_criteria_type import CallRoutingCriteriaType
from typing import Optional, Set
from typing_extensions import Self
@@ -43,16 +43,9 @@ class CallRoutingCriteria(BaseModel):
Criteria type.
""" # noqa: E501
- type: StrictStr
+ type: CallRoutingCriteriaType
__properties: ClassVar[List[str]] = ["type"]
- @field_validator("type")
- def type_validate_enum(cls, value):
- """Validates the enum"""
- if value not in set(["PHONE", "SIP", "WEBRTC"]):
- raise ValueError("must be one of enum values ('PHONE', 'SIP', 'WEBRTC')")
- return value
-
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
diff --git a/infobip_api_client/models/call_routing_criteria_type.py b/infobip_api_client/models/call_routing_criteria_type.py
new file mode 100644
index 0000000..f836687
--- /dev/null
+++ b/infobip_api_client/models/call_routing_criteria_type.py
@@ -0,0 +1,36 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallRoutingCriteriaType(str, Enum):
+ """
+ CallRoutingCriteriaType
+ """
+
+ """
+ allowed enum values
+ """
+ PHONE = "PHONE"
+ SIP = "SIP"
+ WEBRTC = "WEBRTC"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallRoutingCriteriaType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/call_routing_custom_data_entry.py b/infobip_api_client/models/call_routing_custom_data_entry.py
index 3a08a63..cb2f394 100644
--- a/infobip_api_client/models/call_routing_custom_data_entry.py
+++ b/infobip_api_client/models/call_routing_custom_data_entry.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_routing_destination.py b/infobip_api_client/models/call_routing_destination.py
index 6208d7d..ec4e4ef 100644
--- a/infobip_api_client/models/call_routing_destination.py
+++ b/infobip_api_client/models/call_routing_destination.py
@@ -12,15 +12,17 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from importlib import import_module
-from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, StrictInt
from typing import Any, ClassVar, Dict, List, Optional, Union
+from infobip_api_client.models.call_routing_destination_type import (
+ CallRoutingDestinationType,
+)
from typing import Optional, Set
from typing_extensions import Self
@@ -40,19 +42,10 @@ class CallRoutingDestination(BaseModel):
List of destinations. First destination in the list is the first one to be executed. Subsequent destinations are executed only if the previous one fails.
""" # noqa: E501
- weight: Optional[StrictInt] = None
priority: Optional[StrictInt] = None
- type: StrictStr
- __properties: ClassVar[List[str]] = ["weight", "priority", "type"]
-
- @field_validator("type")
- def type_validate_enum(cls, value):
- """Validates the enum"""
- if value not in set(["APPLICATION", "ENDPOINT", "URL"]):
- raise ValueError(
- "must be one of enum values ('APPLICATION', 'ENDPOINT', 'URL')"
- )
- return value
+ type: CallRoutingDestinationType
+ weight: Optional[StrictInt] = None
+ __properties: ClassVar[List[str]] = ["priority", "type", "weight"]
model_config = ConfigDict(
populate_by_name=True,
diff --git a/infobip_api_client/models/call_routing_destination_type.py b/infobip_api_client/models/call_routing_destination_type.py
new file mode 100644
index 0000000..55614d9
--- /dev/null
+++ b/infobip_api_client/models/call_routing_destination_type.py
@@ -0,0 +1,36 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallRoutingDestinationType(str, Enum):
+ """
+ CallRoutingDestinationType
+ """
+
+ """
+ allowed enum values
+ """
+ APPLICATION = "APPLICATION"
+ ENDPOINT = "ENDPOINT"
+ URL = "URL"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallRoutingDestinationType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/call_routing_endpoint.py b/infobip_api_client/models/call_routing_endpoint.py
index e50ca28..95c7c9d 100644
--- a/infobip_api_client/models/call_routing_endpoint.py
+++ b/infobip_api_client/models/call_routing_endpoint.py
@@ -12,15 +12,15 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from importlib import import_module
-from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Union
+from infobip_api_client.models.call_routing_endpoint_type import CallRoutingEndpointType
from typing import Optional, Set
from typing_extensions import Self
@@ -33,6 +33,9 @@
from infobip_api_client.models.call_routing_sip_endpoint import (
CallRoutingSipEndpoint,
)
+ from infobip_api_client.models.call_routing_viber_endpoint import (
+ CallRoutingViberEndpoint,
+ )
from infobip_api_client.models.call_routing_web_rtc_endpoint import (
CallRoutingWebRtcEndpoint,
)
@@ -43,16 +46,9 @@ class CallRoutingEndpoint(BaseModel):
Endpoint for a given destination.
""" # noqa: E501
- type: StrictStr
+ type: CallRoutingEndpointType
__properties: ClassVar[List[str]] = ["type"]
- @field_validator("type")
- def type_validate_enum(cls, value):
- """Validates the enum"""
- if value not in set(["PHONE", "SIP", "WEBRTC"]):
- raise ValueError("must be one of enum values ('PHONE', 'SIP', 'WEBRTC')")
- return value
-
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
@@ -66,6 +62,7 @@ def type_validate_enum(cls, value):
__discriminator_value_class_map: ClassVar[Dict[str, str]] = {
"PHONE": "CallRoutingPhoneEndpoint",
"SIP": "CallRoutingSipEndpoint",
+ "VIBER": "CallRoutingViberEndpoint",
"WEBRTC": "CallRoutingWebRtcEndpoint",
}
@@ -92,7 +89,10 @@ def from_json(
cls, json_str: str
) -> Optional[
Union[
- CallRoutingPhoneEndpoint, CallRoutingSipEndpoint, CallRoutingWebRtcEndpoint
+ CallRoutingPhoneEndpoint,
+ CallRoutingSipEndpoint,
+ CallRoutingViberEndpoint,
+ CallRoutingWebRtcEndpoint,
]
]:
"""Create an instance of CallRoutingEndpoint from a JSON string"""
@@ -122,7 +122,10 @@ def from_dict(
cls, obj: Dict[str, Any]
) -> Optional[
Union[
- CallRoutingPhoneEndpoint, CallRoutingSipEndpoint, CallRoutingWebRtcEndpoint
+ CallRoutingPhoneEndpoint,
+ CallRoutingSipEndpoint,
+ CallRoutingViberEndpoint,
+ CallRoutingWebRtcEndpoint,
]
]:
"""Create an instance of CallRoutingEndpoint from a dict"""
@@ -136,6 +139,10 @@ def from_dict(
return import_module(
"infobip_api_client.models.call_routing_sip_endpoint"
).CallRoutingSipEndpoint.from_dict(obj)
+ if object_type == "CallRoutingViberEndpoint":
+ return import_module(
+ "infobip_api_client.models.call_routing_viber_endpoint"
+ ).CallRoutingViberEndpoint.from_dict(obj)
if object_type == "CallRoutingWebRtcEndpoint":
return import_module(
"infobip_api_client.models.call_routing_web_rtc_endpoint"
diff --git a/infobip_api_client/models/call_routing_endpoint_destination.py b/infobip_api_client/models/call_routing_endpoint_destination.py
index 6ed6b5e..37a5671 100644
--- a/infobip_api_client/models/call_routing_endpoint_destination.py
+++ b/infobip_api_client/models/call_routing_endpoint_destination.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,12 +20,13 @@
from pydantic import ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
-from infobip_api_client.models.call_routing_allowed_time_window import (
- CallRoutingAllowedTimeWindow,
-)
from infobip_api_client.models.call_routing_destination import CallRoutingDestination
+from infobip_api_client.models.call_routing_destination_type import (
+ CallRoutingDestinationType,
+)
from infobip_api_client.models.call_routing_endpoint import CallRoutingEndpoint
from infobip_api_client.models.call_routing_recording import CallRoutingRecording
+from infobip_api_client.models.delivery_time_window import DeliveryTimeWindow
from typing import Optional, Set
from typing_extensions import Self
@@ -51,15 +51,15 @@ class CallRoutingEndpointDestination(CallRoutingDestination):
alias="connectTimeout",
)
recording: Optional[CallRoutingRecording] = None
- allowed_time_windows: Optional[List[CallRoutingAllowedTimeWindow]] = Field(
+ allowed_time_windows: Optional[List[DeliveryTimeWindow]] = Field(
default=None,
description="Sets specific delivery windows outside of which calls won't be forwarded to the destination. If defined, call forwarding is allowed only if any time window in array is satisfied. ",
alias="allowedTimeWindows",
)
__properties: ClassVar[List[str]] = [
- "weight",
"priority",
"type",
+ "weight",
"value",
"connectTimeout",
"recording",
@@ -129,9 +129,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
- "weight": obj.get("weight"),
"priority": obj.get("priority"),
"type": obj.get("type"),
+ "weight": obj.get("weight"),
"value": CallRoutingEndpoint.from_dict(obj["value"])
if obj.get("value") is not None
else None,
@@ -140,7 +140,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if obj.get("recording") is not None
else None,
"allowedTimeWindows": [
- CallRoutingAllowedTimeWindow.from_dict(_item)
+ DeliveryTimeWindow.from_dict(_item)
for _item in obj["allowedTimeWindows"]
]
if obj.get("allowedTimeWindows") is not None
diff --git a/infobip_api_client/models/calls_delivery_time_window.py b/infobip_api_client/models/call_routing_endpoint_destination_response.py
similarity index 57%
rename from infobip_api_client/models/calls_delivery_time_window.py
rename to infobip_api_client/models/call_routing_endpoint_destination_response.py
index ddcc7ce..2ad0101 100644
--- a/infobip_api_client/models/calls_delivery_time_window.py
+++ b/infobip_api_client/models/call_routing_endpoint_destination_response.py
@@ -12,29 +12,38 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field
+from pydantic import ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.calls_delivery_day import CallsDeliveryDay
-from infobip_api_client.models.calls_delivery_time import CallsDeliveryTime
+from infobip_api_client.models.call_routing_destination_type import (
+ CallRoutingDestinationType,
+)
+from infobip_api_client.models.call_routing_endpoint import CallRoutingEndpoint
+from infobip_api_client.models.call_routing_recording import CallRoutingRecording
+from infobip_api_client.models.call_routing_url_destination_response import (
+ CallRoutingUrlDestinationResponse,
+)
from typing import Optional, Set
from typing_extensions import Self
-class CallsDeliveryTimeWindow(BaseModel):
+class CallRoutingEndpointDestinationResponse(CallRoutingUrlDestinationResponse):
"""
- Scheduling object that allows setting up detailed time windows in which the message can be sent. Consists of from, to and days properties. Days property is mandatory. Days in the week are written as their full names: Monday-Sunday. Days parameter must be populated as a list, between two square brackets. `Example: ['MONDAY', 'TUESDAY', 'WEDNESDAY']`. From and to properties should be either both included, to allow finer time window granulation or both omitted, to include whole days in the delivery time window. From and to parameters are objects, that consist of hour and minute fields that hold integer values. For example, ` from: [ hour: 15, minute:45 ]`. For complete json, please check out our example. Note: delivery time window is set in UTC timezone.
+ CallRoutingEndpointDestinationResponse
""" # noqa: E501
- days: Optional[List[CallsDeliveryDay]] = None
- var_from: CallsDeliveryTime = Field(alias="from")
- to: CallsDeliveryTime
- __properties: ClassVar[List[str]] = ["days", "from", "to"]
+ value: CallRoutingEndpoint
+ connect_timeout: Optional[StrictInt] = Field(
+ default=None,
+ description="Time to wait, in seconds, to establish a call toward the destination endpoint. The call will be terminated if it is not answered within the specified time.",
+ alias="connectTimeout",
+ )
+ recording: Optional[CallRoutingRecording] = None
+ __properties: ClassVar[List[str]] = ["type", "value", "connectTimeout", "recording"]
model_config = ConfigDict(
populate_by_name=True,
@@ -53,7 +62,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of CallsDeliveryTimeWindow from a JSON string"""
+ """Create an instance of CallRoutingEndpointDestinationResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -73,17 +82,17 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
- # override the default output from pydantic by calling `to_dict()` of var_from
- if self.var_from:
- _dict["from"] = self.var_from.to_dict()
- # override the default output from pydantic by calling `to_dict()` of to
- if self.to:
- _dict["to"] = self.to.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of value
+ if self.value:
+ _dict["value"] = self.value.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of recording
+ if self.recording:
+ _dict["recording"] = self.recording.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of CallsDeliveryTimeWindow from a dict"""
+ """Create an instance of CallRoutingEndpointDestinationResponse from a dict"""
if obj is None:
return None
@@ -92,12 +101,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
- "days": obj.get("days"),
- "from": CallsDeliveryTime.from_dict(obj["from"])
- if obj.get("from") is not None
+ "type": obj.get("type"),
+ "value": CallRoutingEndpoint.from_dict(obj["value"])
+ if obj.get("value") is not None
else None,
- "to": CallsDeliveryTime.from_dict(obj["to"])
- if obj.get("to") is not None
+ "connectTimeout": obj.get("connectTimeout"),
+ "recording": CallRoutingRecording.from_dict(obj["recording"])
+ if obj.get("recording") is not None
else None,
}
)
diff --git a/infobip_api_client/models/call_routing_endpoint_type.py b/infobip_api_client/models/call_routing_endpoint_type.py
new file mode 100644
index 0000000..d61a7de
--- /dev/null
+++ b/infobip_api_client/models/call_routing_endpoint_type.py
@@ -0,0 +1,37 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallRoutingEndpointType(str, Enum):
+ """
+ CallRoutingEndpointType
+ """
+
+ """
+ allowed enum values
+ """
+ PHONE = "PHONE"
+ SIP = "SIP"
+ WEBRTC = "WEBRTC"
+ VIBER = "VIBER"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallRoutingEndpointType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/call_routing_phone_criteria.py b/infobip_api_client/models/call_routing_phone_criteria.py
index 0e63574..e8090fa 100644
--- a/infobip_api_client/models/call_routing_phone_criteria.py
+++ b/infobip_api_client/models/call_routing_phone_criteria.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,6 +20,7 @@
from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.call_routing_criteria import CallRoutingCriteria
+from infobip_api_client.models.call_routing_criteria_type import CallRoutingCriteriaType
from typing import Optional, Set
from typing_extensions import Self
diff --git a/infobip_api_client/models/call_routing_phone_endpoint.py b/infobip_api_client/models/call_routing_phone_endpoint.py
index 1133d20..6056d96 100644
--- a/infobip_api_client/models/call_routing_phone_endpoint.py
+++ b/infobip_api_client/models/call_routing_phone_endpoint.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,6 +20,7 @@
from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.call_routing_endpoint import CallRoutingEndpoint
+from infobip_api_client.models.call_routing_endpoint_type import CallRoutingEndpointType
from typing import Optional, Set
from typing_extensions import Self
diff --git a/infobip_api_client/models/call_routing_recording.py b/infobip_api_client/models/call_routing_recording.py
index 6112264..def0c36 100644
--- a/infobip_api_client/models/call_routing_recording.py
+++ b/infobip_api_client/models/call_routing_recording.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_routing_recording_composition.py b/infobip_api_client/models/call_routing_recording_composition.py
index 39b0a70..9b56e0a 100644
--- a/infobip_api_client/models/call_routing_recording_composition.py
+++ b/infobip_api_client/models/call_routing_recording_composition.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_routing_recording_type.py b/infobip_api_client/models/call_routing_recording_type.py
index a761c47..215711d 100644
--- a/infobip_api_client/models/call_routing_recording_type.py
+++ b/infobip_api_client/models/call_routing_recording_type.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/call_routing_route_request.py b/infobip_api_client/models/call_routing_route_request.py
index ec4e906..63e6c5d 100644
--- a/infobip_api_client/models/call_routing_route_request.py
+++ b/infobip_api_client/models/call_routing_route_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_routing_route_response.py b/infobip_api_client/models/call_routing_route_response.py
index 68bc2fc..4325d57 100644
--- a/infobip_api_client/models/call_routing_route_response.py
+++ b/infobip_api_client/models/call_routing_route_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_routing_route_response_page.py b/infobip_api_client/models/call_routing_route_response_page.py
index 8bd4c98..68bbb20 100644
--- a/infobip_api_client/models/call_routing_route_response_page.py
+++ b/infobip_api_client/models/call_routing_route_response_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_routing_search_criteria.py b/infobip_api_client/models/call_routing_search_criteria.py
index 1d17549..9c0a9f1 100644
--- a/infobip_api_client/models/call_routing_search_criteria.py
+++ b/infobip_api_client/models/call_routing_search_criteria.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_routing_sip_criteria.py b/infobip_api_client/models/call_routing_sip_criteria.py
index 73feccc..db63e51 100644
--- a/infobip_api_client/models/call_routing_sip_criteria.py
+++ b/infobip_api_client/models/call_routing_sip_criteria.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,6 +20,7 @@
from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.call_routing_criteria import CallRoutingCriteria
+from infobip_api_client.models.call_routing_criteria_type import CallRoutingCriteriaType
from infobip_api_client.models.call_routing_sip_header import CallRoutingSipHeader
from typing import Optional, Set
from typing_extensions import Self
diff --git a/infobip_api_client/models/call_routing_sip_endpoint.py b/infobip_api_client/models/call_routing_sip_endpoint.py
index 47d307c..747e938 100644
--- a/infobip_api_client/models/call_routing_sip_endpoint.py
+++ b/infobip_api_client/models/call_routing_sip_endpoint.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,6 +20,7 @@
from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.call_routing_endpoint import CallRoutingEndpoint
+from infobip_api_client.models.call_routing_endpoint_type import CallRoutingEndpointType
from typing import Optional, Set
from typing_extensions import Self
diff --git a/infobip_api_client/models/call_routing_sip_header.py b/infobip_api_client/models/call_routing_sip_header.py
index 5252c49..9e6ce51 100644
--- a/infobip_api_client/models/call_routing_sip_header.py
+++ b/infobip_api_client/models/call_routing_sip_header.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_routing_url_destination.py b/infobip_api_client/models/call_routing_url_destination.py
index e8a2cf6..4e7d447 100644
--- a/infobip_api_client/models/call_routing_url_destination.py
+++ b/infobip_api_client/models/call_routing_url_destination.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -22,6 +21,9 @@
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from infobip_api_client.models.call_routing_destination import CallRoutingDestination
+from infobip_api_client.models.call_routing_destination_type import (
+ CallRoutingDestinationType,
+)
from infobip_api_client.models.security_config import SecurityConfig
from typing import Optional, Set
from typing_extensions import Self
@@ -47,9 +49,9 @@ class CallRoutingUrlDestination(CallRoutingDestination):
default=None, alias="securityConfig"
)
__properties: ClassVar[List[str]] = [
- "weight",
"priority",
"type",
+ "weight",
"url",
"securityConfig",
]
@@ -107,9 +109,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
- "weight": obj.get("weight"),
"priority": obj.get("priority"),
"type": obj.get("type"),
+ "weight": obj.get("weight"),
"url": obj.get("url"),
"securityConfig": SecurityConfig.from_dict(obj["securityConfig"])
if obj.get("securityConfig") is not None
diff --git a/infobip_api_client/models/calls_public_recording_file.py b/infobip_api_client/models/call_routing_url_destination_http_request.py
similarity index 58%
rename from infobip_api_client/models/calls_public_recording_file.py
rename to infobip_api_client/models/call_routing_url_destination_http_request.py
index 0f4c7ac..3446dcb 100644
--- a/infobip_api_client/models/calls_public_recording_file.py
+++ b/infobip_api_client/models/call_routing_url_destination_http_request.py
@@ -12,59 +12,58 @@
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 pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.calls_file_format import CallsFileFormat
-from infobip_api_client.models.calls_recording_file_location import (
- CallsRecordingFileLocation,
-)
from typing import Optional, Set
from typing_extensions import Self
-class CallsPublicRecordingFile(BaseModel):
+class CallRoutingUrlDestinationHttpRequest(BaseModel):
"""
- CallsPublicRecordingFile
+ CallRoutingUrlDestinationHttpRequest
""" # noqa: E501
- id: Optional[StrictStr] = Field(default=None, description="File ID.")
- name: StrictStr = Field(description="File name.")
- file_format: CallsFileFormat = Field(alias="fileFormat")
- size: Optional[StrictInt] = Field(default=None, description="File size in bytes.")
- creation_time: Optional[datetime] = Field(
- default=None, description="File creation time.", alias="creationTime"
+ application_id: Optional[StrictStr] = Field(
+ default="CALL_ROUTING",
+ description="Identifier of the application that originated the call.",
+ alias="applicationId",
)
- duration: Optional[StrictInt] = Field(
- default=None, description="File duration in seconds."
+ route_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Identifier of the route that is used to process the call.",
+ alias="routeId",
)
- start_time: Optional[datetime] = Field(
+ call_id: Optional[StrictStr] = Field(
default=None,
- description="Date and time when the recording started.",
- alias="startTime",
+ description="Identifier of the call that is being processed.",
+ alias="callId",
)
- end_time: Optional[datetime] = Field(
+ var_from: Optional[StrictStr] = Field(
default=None,
- description="Date and time when the recording ended.",
- alias="endTime",
+ description="Phone number from which the call originated from.",
+ alias="from",
+ )
+ to: Optional[StrictStr] = Field(
+ default=None, description="Destination phone number of the call."
+ )
+ start_time: Optional[datetime] = Field(
+ default=None,
+ description="Timestamp representing start time of the call.",
+ alias="startTime",
)
- location: Optional[CallsRecordingFileLocation] = None
__properties: ClassVar[List[str]] = [
- "id",
- "name",
- "fileFormat",
- "size",
- "creationTime",
- "duration",
+ "applicationId",
+ "routeId",
+ "callId",
+ "from",
+ "to",
"startTime",
- "endTime",
- "location",
]
model_config = ConfigDict(
@@ -84,7 +83,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of CallsPublicRecordingFile from a JSON string"""
+ """Create an instance of CallRoutingUrlDestinationHttpRequest from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -108,7 +107,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of CallsPublicRecordingFile from a dict"""
+ """Create an instance of CallRoutingUrlDestinationHttpRequest from a dict"""
if obj is None:
return None
@@ -117,15 +116,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
- "id": obj.get("id"),
- "name": obj.get("name"),
- "fileFormat": obj.get("fileFormat"),
- "size": obj.get("size"),
- "creationTime": obj.get("creationTime"),
- "duration": obj.get("duration"),
+ "applicationId": obj.get("applicationId")
+ if obj.get("applicationId") is not None
+ else "CALL_ROUTING",
+ "routeId": obj.get("routeId"),
+ "callId": obj.get("callId"),
+ "from": obj.get("from"),
+ "to": obj.get("to"),
"startTime": obj.get("startTime"),
- "endTime": obj.get("endTime"),
- "location": obj.get("location"),
}
)
return _obj
diff --git a/infobip_api_client/models/calls_pegasus_provider.py b/infobip_api_client/models/call_routing_url_destination_response.py
similarity index 71%
rename from infobip_api_client/models/calls_pegasus_provider.py
rename to infobip_api_client/models/call_routing_url_destination_response.py
index b22ca67..eb0561a 100644
--- a/infobip_api_client/models/calls_pegasus_provider.py
+++ b/infobip_api_client/models/call_routing_url_destination_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,9 +19,9 @@
from importlib import import_module
from pydantic import BaseModel, ConfigDict
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from infobip_api_client.models.calls_pegasus_provider_trunk_type import (
- CallsPegasusProviderTrunkType,
+from typing import Any, ClassVar, Dict, List, Union
+from infobip_api_client.models.call_routing_destination_type import (
+ CallRoutingDestinationType,
)
from typing import Optional, Set
from typing_extensions import Self
@@ -30,17 +29,17 @@
from typing import TYPE_CHECKING
if TYPE_CHECKING:
- from infobip_api_client.models.calls_freshworks_provider import (
- CallsFreshworksProvider,
+ from infobip_api_client.models.call_routing_endpoint_destination_response import (
+ CallRoutingEndpointDestinationResponse,
)
-class CallsPegasusProvider(BaseModel):
+class CallRoutingUrlDestinationResponse(BaseModel):
"""
- CallsPegasusProvider
+ CallRoutingUrlDestinationResponse
""" # noqa: E501
- type: Optional[CallsPegasusProviderTrunkType] = None
+ type: CallRoutingDestinationType
__properties: ClassVar[List[str]] = ["type"]
model_config = ConfigDict(
@@ -54,7 +53,7 @@ class CallsPegasusProvider(BaseModel):
# discriminator mappings
__discriminator_value_class_map: ClassVar[Dict[str, str]] = {
- "FRESHWORKS": "CallsFreshworksProvider"
+ "ENDPOINT": "CallRoutingEndpointDestinationResponse"
}
@classmethod
@@ -76,8 +75,10 @@ def to_json(self) -> str:
return json.dumps(self.to_dict())
@classmethod
- def from_json(cls, json_str: str) -> Optional[Union[CallsFreshworksProvider]]:
- """Create an instance of CallsPegasusProvider from a JSON string"""
+ def from_json(
+ cls, json_str: str
+ ) -> Optional[Union[CallRoutingEndpointDestinationResponse]]:
+ """Create an instance of CallRoutingUrlDestinationResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -100,17 +101,19 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[CallsFreshworksProvider]]:
- """Create an instance of CallsPegasusProvider from a dict"""
+ def from_dict(
+ cls, obj: Dict[str, Any]
+ ) -> Optional[Union[CallRoutingEndpointDestinationResponse]]:
+ """Create an instance of CallRoutingUrlDestinationResponse from a dict"""
# look up the object type based on discriminator mapping
object_type = cls.get_discriminator_value(obj)
- if object_type == "CallsFreshworksProvider":
+ if object_type == "CallRoutingEndpointDestinationResponse":
return import_module(
- "infobip_api_client.models.calls_freshworks_provider"
- ).CallsFreshworksProvider.from_dict(obj)
+ "infobip_api_client.models.call_routing_endpoint_destination_response"
+ ).CallRoutingEndpointDestinationResponse.from_dict(obj)
raise ValueError(
- "CallsPegasusProvider failed to lookup discriminator value from "
+ "CallRoutingUrlDestinationResponse failed to lookup discriminator value from "
+ json.dumps(obj)
+ ". Discriminator property name: "
+ cls.__discriminator_property_name
diff --git a/infobip_api_client/models/call_routing_viber_endpoint.py b/infobip_api_client/models/call_routing_viber_endpoint.py
new file mode 100644
index 0000000..0d573b7
--- /dev/null
+++ b/infobip_api_client/models/call_routing_viber_endpoint.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.call_routing_endpoint import CallRoutingEndpoint
+from infobip_api_client.models.call_routing_endpoint_type import CallRoutingEndpointType
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallRoutingViberEndpoint(CallRoutingEndpoint):
+ """
+ CallRoutingViberEndpoint
+ """ # noqa: E501
+
+ var_from: Optional[StrictStr] = Field(
+ default=None,
+ description="Viber registered phone number. Defaults to `from` value used in inbound call.",
+ alias="from",
+ )
+ phone_number: Optional[StrictStr] = Field(
+ default=None,
+ description="Phone number in the [E.164](https://en.wikipedia.org/wiki/E.164) format. Defaults to `to` value used in inbound call.",
+ alias="phoneNumber",
+ )
+ __properties: ClassVar[List[str]] = ["type", "from", "phoneNumber"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallRoutingViberEndpoint from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallRoutingViberEndpoint from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "type": obj.get("type"),
+ "from": obj.get("from"),
+ "phoneNumber": obj.get("phoneNumber"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/call_routing_web_rtc_criteria.py b/infobip_api_client/models/call_routing_web_rtc_criteria.py
index 0575756..da99cd9 100644
--- a/infobip_api_client/models/call_routing_web_rtc_criteria.py
+++ b/infobip_api_client/models/call_routing_web_rtc_criteria.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,6 +20,7 @@
from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.call_routing_criteria import CallRoutingCriteria
+from infobip_api_client.models.call_routing_criteria_type import CallRoutingCriteriaType
from infobip_api_client.models.call_routing_custom_data_entry import (
CallRoutingCustomDataEntry,
)
diff --git a/infobip_api_client/models/call_routing_web_rtc_endpoint.py b/infobip_api_client/models/call_routing_web_rtc_endpoint.py
index 1950c90..384892a 100644
--- a/infobip_api_client/models/call_routing_web_rtc_endpoint.py
+++ b/infobip_api_client/models/call_routing_web_rtc_endpoint.py
@@ -12,15 +12,15 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import ConfigDict, Field, StrictStr
-from typing import Any, ClassVar, Dict, List
+from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.call_routing_endpoint import CallRoutingEndpoint
+from infobip_api_client.models.call_routing_endpoint_type import CallRoutingEndpointType
from typing import Optional, Set
from typing_extensions import Self
@@ -30,8 +30,9 @@ class CallRoutingWebRtcEndpoint(CallRoutingEndpoint):
CallRoutingWebRtcEndpoint
""" # noqa: E501
- identity: StrictStr = Field(
- description="The unique identity used to present a user on the Infobip WebRTC platform."
+ identity: Optional[StrictStr] = Field(
+ default=None,
+ description="The unique identity used to present a user on the Infobip WebRTC platform. Defaults to `to` value used in inbound call.",
)
__properties: ClassVar[List[str]] = ["type", "identity"]
diff --git a/infobip_api_client/models/call_state.py b/infobip_api_client/models/call_state.py
index 9cef70b..e89d34c 100644
--- a/infobip_api_client/models/call_state.py
+++ b/infobip_api_client/models/call_state.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
@@ -36,6 +35,7 @@ class CallState(str, Enum):
CANCELLED = "CANCELLED"
NO_ANSWER = "NO_ANSWER"
BUSY = "BUSY"
+ DISCONNECTED = "DISCONNECTED"
@classmethod
def from_json(cls, json_str: str) -> Self:
diff --git a/infobip_api_client/models/call_transfer.py b/infobip_api_client/models/call_transfer.py
index d6311eb..67f359c 100644
--- a/infobip_api_client/models/call_transfer.py
+++ b/infobip_api_client/models/call_transfer.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/call_voice.py b/infobip_api_client/models/call_voice.py
index 655afdb..b7fd10d 100644
--- a/infobip_api_client/models/call_voice.py
+++ b/infobip_api_client/models/call_voice.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
@@ -27,22 +26,16 @@ class CallVoice(str, Enum):
"""
allowed enum values
"""
- HODA = "Hoda"
ZEINA = "Zeina"
- NAAYF = "Naayf"
AISHA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Aisha (beta)"
FAROOQ_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Farooq (beta)"
HUSSEIN_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Hussein (beta)"
AMAL_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Amal (beta)"
SAYAN_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Sayan (beta)"
SUSHMITA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Sushmita (beta)"
- IVAN = "Ivan"
+ DARINA = "Darina"
CONCHITA = "Conchita"
- HERENA = "Herena"
- HUIHUI = "Huihui"
ZHIYU = "Zhiyu"
- YAOYAO = "Yaoyao"
- KANGKANG = "Kangkang"
LIU_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Liu (beta)"
WANG_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Wang (beta)"
ZHANG_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Zhang (beta)"
@@ -50,21 +43,15 @@ class CallVoice(str, Enum):
AKEMI_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Akemi (beta)"
CHEN_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Chen (beta)"
HUANG_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Huang (beta)"
- DANNY = "Danny"
- TRACY = "Tracy"
- HANHAN = "Hanhan"
- ZHIWEI = "Zhiwei"
- YATING = "Yating"
- MATEJ = "Matej"
- JAKUB = "Jakub"
- HELLE = "Helle"
+ FANG = "Fang"
+ CHAO = "Chao"
+ MING = "Ming"
+ ANETA = "Aneta"
NAJA = "Naja"
MADS = "Mads"
RUBEN = "Ruben"
LOTTE = "Lotte"
- HANNA = "Hanna"
JOANNA = "Joanna"
- ZIRA = "Zira"
IVY = "Ivy"
KENDRA = "Kendra"
KIMBERLY = "Kimberly"
@@ -72,96 +59,66 @@ class CallVoice(str, Enum):
JOEY = "Joey"
JUSTIN = "Justin"
MATTHEW = "Matthew"
- BENJAMIN = "Benjamin"
- JESSICA = "Jessica"
- JANE = "Jane"
- GUY = "Guy"
RUSSELL = "Russell"
- CATHERINE = "Catherine"
NICOLE = "Nicole"
- HAYLEY = "Hayley"
BRIAN = "Brian"
- HAZEL = "Hazel"
AMY = "Amy"
EMMA = "Emma"
- ROSIE = "Rosie"
- GEORGE = "George"
- HEATHER = "Heather"
- ALICE = "Alice"
- HEERA = "Heera"
ADITI = "Aditi"
RAVEENA = "Raveena"
- PRIYA = "Priya"
- RAVI = "Ravi"
- SEAN = "Sean"
GERAINT = "Geraint"
- HEIDI = "Heidi"
EVELIN_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Evelin (beta)"
- HORTENSE = "Hortense"
CELINE = "Celine"
LEA = "Lea"
MATHIEU = "Mathieu"
- JULIETTE = "Juliette"
- PICARD = "Picard"
- CAROLINE = "Caroline"
- HARMONIE = "Harmonie"
CHANTAL = "Chantal"
- GUILLAUME = "Guillaume"
VICKI = "Vicki"
HANS = "Hans"
- STEFAN = "Stefan"
MARLENE = "Marlene"
- HEDDA = "Hedda"
- ANGELA = "Angela"
- MICHAEL = "Michael"
- KARSTEN = "Karsten"
- STEFANOS = "Stefanos"
SOPHIA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Sophia (beta)"
DINESH_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Dinesh (beta)"
LEELA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Leela (beta)"
- ASAF = "Asaf"
+ ABIGAIL = "Abigail"
+ MEIRA = "Meira"
+ IDAN = "Idan"
+ YOSEF = "Yosef"
AADITA = "Aadita"
- KALPANA = "Kalpana"
- HEMANT = "Hemant"
- SZABOLCS = "Szabolcs"
+ AARUSHI_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Aarushi (beta)"
+ AKASH_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Akash (beta)"
+ DAMAN_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Daman (beta)"
+ DIVYA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Divya (beta)"
+ AGOTA = "Agota"
DORA = "Dora"
KARL = "Karl"
INDAH_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Indah (beta)"
ARIF_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Arif (beta)"
REZA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Reza (beta)"
- ANDIKA = "Andika"
NURUL_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Nurul (beta)"
GIANNA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Gianna (beta)"
- COSIMO = "Cosimo"
CARLA = "Carla"
BIANCA = "Bianca"
GIORGIO = "Giorgio"
- LUCIA = "Lucia"
TAKUMI = "Takumi"
- HARUKA = "Haruka"
- ICHIRO = "Ichiro"
MIZUKI = "Mizuki"
- AYUMI = "Ayumi"
SHASHANK_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Shashank (beta)"
NAMRATHA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Namratha (beta)"
SEOYEON = "Seoyeon"
- HEAMI = "Heami"
SUMI_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Sumi (beta)"
JINA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Jina (beta)"
HIMCHAN_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Himchan (beta)"
MINHO_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Minho (beta)"
- RIZWAN = "Rizwan"
+ AMEERA = "Ameera"
+ NURIN = "Nurin"
+ NIJAT = "Nijat"
+ FUAAD = "Fuaad"
VISHNU_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Vishnu (beta)"
KIRTI_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Kirti (beta)"
- HULDA = "Hulda"
LIV = "Liv"
EWA = "Ewa"
- PAULINA = "Paulina"
MAJA = "Maja"
JACEK = "Jacek"
JAN = "Jan"
CRISTIANO = "Cristiano"
- HELIA = "Helia"
INES = "Ines"
ABRIELLE_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Abrielle (beta)"
HENRIQUES_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Henriques (beta)"
@@ -169,44 +126,26 @@ class CallVoice(str, Enum):
JACINDA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Jacinda (beta)"
CAMILA = "Camila"
RICARDO = "Ricardo"
- DANIEL = "Daniel"
VITORIA = "Vitoria"
- HELOISA = "Heloisa"
CARMEN = "Carmen"
- ANDREI = "Andrei"
MAXIM = "Maxim"
- EKATERINA = "Ekaterina"
- PAVEL = "Pavel"
TATYANA = "Tatyana"
- IRINA = "Irina"
- FILIP = "Filip"
- LADO = "Lado"
+ NATALIA = "Natalia"
MIGUEL = "Miguel"
LINDA = "Linda"
ENRIQUE = "Enrique"
- JUANA = "Juana"
- PABLO = "Pablo"
GABRIELA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Gabriela (beta)"
LUPE = "Lupe"
- LAURA = "Laura"
PENELOPE = "Penelope"
- HILDA = "Hilda"
- RAUL = "Raul"
MIA = "Mia"
- HEDVIG = "Hedvig"
ASTRID = "Astrid"
- VALLUVAR = "Valluvar"
GANESH_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Ganesh (beta)"
SHRUTI_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Shruti (beta)"
- CHITRA = "Chitra"
VIJAY_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Vijay (beta)"
SAMANTHA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Samantha (beta)"
NATCHAYA_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Natchaya (beta)"
- PATTARA = "Pattara"
- SEDA = "Seda"
FILIZ = "Filiz"
ULYANA = "Ulyana"
- AN = "An"
LIEN_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Lien (beta)"
QUAN_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Quan (beta)"
MAI_LEFT_PARENTHESIS_BETA_RIGHT_PARENTHESIS = "Mai (beta)"
@@ -497,6 +436,10 @@ class CallVoice(str, Enum):
NAM_MINH_LEFT_PARENTHESIS_NEURAL_RIGHT_PARENTHESIS = "NamMinh (neural)"
ALED_LEFT_PARENTHESIS_NEURAL_RIGHT_PARENTHESIS = "Aled (neural)"
NIA_LEFT_PARENTHESIS_NEURAL_RIGHT_PARENTHESIS = "Nia (neural)"
+ MOUNA_LEFT_PARENTHESIS_NEURAL_RIGHT_PARENTHESIS = "Mouna (neural)"
+ JAMAL_LEFT_PARENTHESIS_NEURAL_RIGHT_PARENTHESIS = "Jamal (neural)"
+ UZMA_LEFT_PARENTHESIS_NEURAL_RIGHT_PARENTHESIS = "Uzma (neural)"
+ ASAD_LEFT_PARENTHESIS_NEURAL_RIGHT_PARENTHESIS = "Asad (neural)"
@classmethod
def from_json(cls, json_str: str) -> Self:
diff --git a/infobip_api_client/models/callback_response.py b/infobip_api_client/models/callback_response.py
new file mode 100644
index 0000000..6f7e1e3
--- /dev/null
+++ b/infobip_api_client/models/callback_response.py
@@ -0,0 +1,147 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from importlib import import_module
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List, Union
+from typing import Optional, Set
+from typing_extensions import Self
+
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from infobip_api_client.models.calls_audio_callback_response import (
+ CallsAudioCallbackResponse,
+ )
+ from infobip_api_client.models.calls_capture_dtmf_callback_response import (
+ CallsCaptureDtmfCallbackResponse,
+ )
+ from infobip_api_client.models.calls_dial_callback_response import (
+ CallsDialCallbackResponse,
+ )
+
+
+class CallbackResponse(BaseModel):
+ """
+ CallbackResponse
+ """ # noqa: E501
+
+ command: StrictStr
+ __properties: ClassVar[List[str]] = ["command"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ # JSON field name that stores the object type
+ __discriminator_property_name: ClassVar[str] = "command"
+
+ # discriminator mappings
+ __discriminator_value_class_map: ClassVar[Dict[str, str]] = {
+ "audio": "CallsAudioCallbackResponse",
+ "captureDtmf": "CallsCaptureDtmfCallbackResponse",
+ "dial": "CallsDialCallbackResponse",
+ }
+
+ @classmethod
+ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
+ """Returns the discriminator value (object type) of the data"""
+ discriminator_value = obj[cls.__discriminator_property_name]
+ if discriminator_value:
+ return cls.__discriminator_value_class_map.get(discriminator_value)
+ else:
+ return None
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(
+ cls, json_str: str
+ ) -> Optional[
+ Union[
+ CallsAudioCallbackResponse,
+ CallsCaptureDtmfCallbackResponse,
+ CallsDialCallbackResponse,
+ ]
+ ]:
+ """Create an instance of CallbackResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(
+ cls, obj: Dict[str, Any]
+ ) -> Optional[
+ Union[
+ CallsAudioCallbackResponse,
+ CallsCaptureDtmfCallbackResponse,
+ CallsDialCallbackResponse,
+ ]
+ ]:
+ """Create an instance of CallbackResponse from a dict"""
+ # look up the object type based on discriminator mapping
+ object_type = cls.get_discriminator_value(obj)
+ if object_type == "CallsAudioCallbackResponse":
+ return import_module(
+ "infobip_api_client.models.calls_audio_callback_response"
+ ).CallsAudioCallbackResponse.from_dict(obj)
+ if object_type == "CallsCaptureDtmfCallbackResponse":
+ return import_module(
+ "infobip_api_client.models.calls_capture_dtmf_callback_response"
+ ).CallsCaptureDtmfCallbackResponse.from_dict(obj)
+ if object_type == "CallsDialCallbackResponse":
+ return import_module(
+ "infobip_api_client.models.calls_dial_callback_response"
+ ).CallsDialCallbackResponse.from_dict(obj)
+
+ raise ValueError(
+ "CallbackResponse failed to lookup discriminator value from "
+ + json.dumps(obj)
+ + ". Discriminator property name: "
+ + cls.__discriminator_property_name
+ + ", mapping: "
+ + json.dumps(cls.__discriminator_value_class_map)
+ )
diff --git a/infobip_api_client/models/calls_action_call_request.py b/infobip_api_client/models/calls_action_call_request.py
index 6d649b8..53a0915 100644
--- a/infobip_api_client/models/calls_action_call_request.py
+++ b/infobip_api_client/models/calls_action_call_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_action_conference_request.py b/infobip_api_client/models/calls_action_conference_request.py
index 760cf29..2652ece 100644
--- a/infobip_api_client/models/calls_action_conference_request.py
+++ b/infobip_api_client/models/calls_action_conference_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_action_response.py b/infobip_api_client/models/calls_action_response.py
index bf49129..ac1ea67 100644
--- a/infobip_api_client/models/calls_action_response.py
+++ b/infobip_api_client/models/calls_action_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_action_status.py b/infobip_api_client/models/calls_action_status.py
index 435fb31..79879a6 100644
--- a/infobip_api_client/models/calls_action_status.py
+++ b/infobip_api_client/models/calls_action_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_add_existing_call_request.py b/infobip_api_client/models/calls_add_existing_call_request.py
index 5b2ce69..4f49776 100644
--- a/infobip_api_client/models/calls_add_existing_call_request.py
+++ b/infobip_api_client/models/calls_add_existing_call_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,6 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.ringback_generation import RingbackGeneration
from typing import Optional, Set
from typing_extensions import Self
@@ -31,10 +31,13 @@ class CallsAddExistingCallRequest(BaseModel):
connect_on_early_media: Optional[StrictBool] = Field(
default=False,
- description="Indicates whether to add an existing call on early media. Otherwise, the call will be added after being established. This field is applicable for `OUTBOUND` calls only.",
+ description="Indicates whether to add an existing call on early media. Otherwise, the call will be added after being established. This field is applicable for `OUTBOUND` calls only. Cannot be `true` when `ringbackGeneration` is enabled.",
alias="connectOnEarlyMedia",
)
- __properties: ClassVar[List[str]] = ["connectOnEarlyMedia"]
+ ringback_generation: Optional[RingbackGeneration] = Field(
+ default=None, alias="ringbackGeneration"
+ )
+ __properties: ClassVar[List[str]] = ["connectOnEarlyMedia", "ringbackGeneration"]
model_config = ConfigDict(
populate_by_name=True,
@@ -73,6 +76,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of ringback_generation
+ if self.ringback_generation:
+ _dict["ringbackGeneration"] = self.ringback_generation.to_dict()
return _dict
@classmethod
@@ -88,7 +94,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"connectOnEarlyMedia": obj.get("connectOnEarlyMedia")
if obj.get("connectOnEarlyMedia") is not None
- else False
+ else False,
+ "ringbackGeneration": RingbackGeneration.from_dict(
+ obj["ringbackGeneration"]
+ )
+ if obj.get("ringbackGeneration") is not None
+ else None,
}
)
return _obj
diff --git a/infobip_api_client/models/calls_add_new_call_request.py b/infobip_api_client/models/calls_add_new_call_request.py
index c526cfa..8f0bbfa 100644
--- a/infobip_api_client/models/calls_add_new_call_request.py
+++ b/infobip_api_client/models/calls_add_new_call_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,6 +20,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.calls_action_call_request import CallsActionCallRequest
+from infobip_api_client.models.ringback_generation import RingbackGeneration
from typing import Optional, Set
from typing_extensions import Self
@@ -33,10 +33,17 @@ class CallsAddNewCallRequest(BaseModel):
call_request: CallsActionCallRequest = Field(alias="callRequest")
connect_on_early_media: Optional[StrictBool] = Field(
default=False,
- description="Indicates whether to connect a new call on early media. Otherwise, the call will be connected after being established.",
+ description="Indicates whether to connect a new call on early media. Otherwise, the call will be connected after being established. Cannot be `true` when `ringbackGeneration` is enabled.",
alias="connectOnEarlyMedia",
)
- __properties: ClassVar[List[str]] = ["callRequest", "connectOnEarlyMedia"]
+ ringback_generation: Optional[RingbackGeneration] = Field(
+ default=None, alias="ringbackGeneration"
+ )
+ __properties: ClassVar[List[str]] = [
+ "callRequest",
+ "connectOnEarlyMedia",
+ "ringbackGeneration",
+ ]
model_config = ConfigDict(
populate_by_name=True,
@@ -78,6 +85,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of call_request
if self.call_request:
_dict["callRequest"] = self.call_request.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of ringback_generation
+ if self.ringback_generation:
+ _dict["ringbackGeneration"] = self.ringback_generation.to_dict()
return _dict
@classmethod
@@ -97,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"connectOnEarlyMedia": obj.get("connectOnEarlyMedia")
if obj.get("connectOnEarlyMedia") is not None
else False,
+ "ringbackGeneration": RingbackGeneration.from_dict(
+ obj["ringbackGeneration"]
+ )
+ if obj.get("ringbackGeneration") is not None
+ else None,
}
)
return _obj
diff --git a/infobip_api_client/models/calls_advanced_body.py b/infobip_api_client/models/calls_advanced_body.py
index f3e1e74..887ee47 100644
--- a/infobip_api_client/models/calls_advanced_body.py
+++ b/infobip_api_client/models/calls_advanced_body.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_advanced_message.py b/infobip_api_client/models/calls_advanced_message.py
index 0e591f1..388ed58 100644
--- a/infobip_api_client/models/calls_advanced_message.py
+++ b/infobip_api_client/models/calls_advanced_message.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,12 +20,13 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing_extensions import Annotated
from infobip_api_client.models.call_transfer import CallTransfer
-from infobip_api_client.models.calls_delivery_time_window import CallsDeliveryTimeWindow
from infobip_api_client.models.calls_destination import CallsDestination
from infobip_api_client.models.calls_retry import CallsRetry
from infobip_api_client.models.calls_sending_speed import CallsSendingSpeed
from infobip_api_client.models.calls_voice import CallsVoice
+from infobip_api_client.models.delivery_time_window import DeliveryTimeWindow
from typing import Optional, Set
from typing_extensions import Self
@@ -51,12 +51,14 @@ class CallsAdvancedMessage(BaseModel):
description="Call transfers object enables transferring the ongoing call to another recipient(s) and establish a communication between your original recipient and additional one.",
alias="callTransfers",
)
- callback_data: Optional[StrictStr] = Field(
+ callback_data: Optional[
+ Annotated[str, Field(min_length=0, strict=True, max_length=700)]
+ ] = Field(
default=None,
- description="Additional client's data that will be sent on the notifyUrl. The maximum value is 200 characters. Example: `Text containing some additional data needed in Delivery Report`.",
+ description="Additional client's data that will be sent on the notifyUrl. The maximum value is 700 characters. Example: `Text containing some additional data needed in Delivery Report`.",
alias="callbackData",
)
- delivery_time_window: Optional[CallsDeliveryTimeWindow] = Field(
+ delivery_time_window: Optional[DeliveryTimeWindow] = Field(
default=None, alias="deliveryTimeWindow"
)
destinations: List[CallsDestination] = Field(
@@ -250,7 +252,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if obj.get("callTransfers") is not None
else None,
"callbackData": obj.get("callbackData"),
- "deliveryTimeWindow": CallsDeliveryTimeWindow.from_dict(
+ "deliveryTimeWindow": DeliveryTimeWindow.from_dict(
obj["deliveryTimeWindow"]
)
if obj.get("deliveryTimeWindow") is not None
diff --git a/infobip_api_client/models/calls_announcement_callee.py b/infobip_api_client/models/calls_announcement_callee.py
new file mode 100644
index 0000000..f9b21ee
--- /dev/null
+++ b/infobip_api_client/models/calls_announcement_callee.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsAnnouncementCallee(BaseModel):
+ """
+ Announcement to be played to a callee before connecting them to a caller.
+ """ # noqa: E501
+
+ file_id: Optional[StrictStr] = Field(
+ default=None,
+ description="ID of an audio file played to a callee. Required if `fileUrl` is not provided.",
+ alias="fileId",
+ )
+ file_url: Optional[StrictStr] = Field(
+ default=None,
+ description="URL of an audio file played to a callee. Required if `fileId` is not provided.",
+ alias="fileUrl",
+ )
+ __properties: ClassVar[List[str]] = ["fileId", "fileUrl"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsAnnouncementCallee from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsAnnouncementCallee from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"fileId": obj.get("fileId"), "fileUrl": obj.get("fileUrl")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_announcement_caller.py b/infobip_api_client/models/calls_announcement_caller.py
new file mode 100644
index 0000000..a1f8c29
--- /dev/null
+++ b/infobip_api_client/models/calls_announcement_caller.py
@@ -0,0 +1,94 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsAnnouncementCaller(BaseModel):
+ """
+ Announcement to be played to a caller before they dial in to the callee.
+ """ # noqa: E501
+
+ file_id: Optional[StrictStr] = Field(
+ default=None,
+ description="ID of an audio file to be played to a caller. Required if `fileUrl` is not provided.",
+ alias="fileId",
+ )
+ file_url: Optional[StrictStr] = Field(
+ default=None,
+ description="URL of a file played to a caller. Required if `fileId` is not provided.",
+ alias="fileUrl",
+ )
+ __properties: ClassVar[List[str]] = ["fileId", "fileUrl"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsAnnouncementCaller from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsAnnouncementCaller from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"fileId": obj.get("fileId"), "fileUrl": obj.get("fileUrl")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_announcements.py b/infobip_api_client/models/calls_announcements.py
new file mode 100644
index 0000000..ec6fc4a
--- /dev/null
+++ b/infobip_api_client/models/calls_announcements.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_announcement_callee import CallsAnnouncementCallee
+from infobip_api_client.models.calls_announcement_caller import CallsAnnouncementCaller
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsAnnouncements(BaseModel):
+ """
+ Announcements to be played when a call is answered.
+ """ # noqa: E501
+
+ caller: Optional[CallsAnnouncementCaller] = None
+ callee: Optional[CallsAnnouncementCallee] = None
+ __properties: ClassVar[List[str]] = ["caller", "callee"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsAnnouncements from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of caller
+ if self.caller:
+ _dict["caller"] = self.caller.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of callee
+ if self.callee:
+ _dict["callee"] = self.callee.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsAnnouncements from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "caller": CallsAnnouncementCaller.from_dict(obj["caller"])
+ if obj.get("caller") is not None
+ else None,
+ "callee": CallsAnnouncementCallee.from_dict(obj["callee"])
+ if obj.get("callee") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_anonymization_type.py b/infobip_api_client/models/calls_anonymization_type.py
index 6b4b900..86a9250 100644
--- a/infobip_api_client/models/calls_anonymization_type.py
+++ b/infobip_api_client/models/calls_anonymization_type.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_answer_request.py b/infobip_api_client/models/calls_answer_request.py
index 5e408be..cbefc8e 100644
--- a/infobip_api_client/models/calls_answer_request.py
+++ b/infobip_api_client/models/calls_answer_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_application_transfer_request.py b/infobip_api_client/models/calls_application_transfer_request.py
index 6619d8f..a8e82c1 100644
--- a/infobip_api_client/models/calls_application_transfer_request.py
+++ b/infobip_api_client/models/calls_application_transfer_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,6 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
@@ -29,16 +29,11 @@ class CallsApplicationTransferRequest(BaseModel):
CallsApplicationTransferRequest
""" # noqa: E501
- destination_calls_configuration_id: Optional[StrictStr] = Field(
- default=None,
+ destination_calls_configuration_id: StrictStr = Field(
description="ID of the calls configuration to which the call is to be transferred.",
alias="destinationCallsConfigurationId",
)
- destination_application_id: Optional[StrictStr] = Field(
- default=None,
- description="ID of the application to which the call is to be transferred.",
- alias="destinationApplicationId",
- )
+ platform: Optional[Platform] = None
timeout: Optional[StrictInt] = Field(
default=30,
description="Time to wait, in seconds, for the receiving application to accept the transfer.",
@@ -50,7 +45,7 @@ class CallsApplicationTransferRequest(BaseModel):
)
__properties: ClassVar[List[str]] = [
"destinationCallsConfigurationId",
- "destinationApplicationId",
+ "platform",
"timeout",
"customData",
]
@@ -92,6 +87,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
return _dict
@classmethod
@@ -108,7 +106,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"destinationCallsConfigurationId": obj.get(
"destinationCallsConfigurationId"
),
- "destinationApplicationId": obj.get("destinationApplicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"timeout": obj.get("timeout") if obj.get("timeout") is not None else 30,
"customData": obj.get("customData"),
}
diff --git a/infobip_api_client/models/calls_audio_callback_response.py b/infobip_api_client/models/calls_audio_callback_response.py
new file mode 100644
index 0000000..f8beb43
--- /dev/null
+++ b/infobip_api_client/models/calls_audio_callback_response.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.callback_response import CallbackResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsAudioCallbackResponse(CallbackResponse):
+ """
+ CallsAudioCallbackResponse
+ """ # noqa: E501
+
+ file_url: Optional[StrictStr] = Field(
+ default=None,
+ description="Url of the audio file to be played to the caller. Required if `fileId` is not provided.",
+ alias="fileUrl",
+ )
+ file_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Identification of the audio file to be played to the caller. Required if `fileUrl` is not provided.",
+ alias="fileId",
+ )
+ __properties: ClassVar[List[str]] = ["command", "fileUrl", "fileId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsAudioCallbackResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsAudioCallbackResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "command": obj.get("command"),
+ "fileUrl": obj.get("fileUrl"),
+ "fileId": obj.get("fileId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_audio_codec.py b/infobip_api_client/models/calls_audio_codec.py
index 7a0a2be..c8c3cfd 100644
--- a/infobip_api_client/models/calls_audio_codec.py
+++ b/infobip_api_client/models/calls_audio_codec.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_audio_media_properties.py b/infobip_api_client/models/calls_audio_media_properties.py
index c6026da..b4c1447 100644
--- a/infobip_api_client/models/calls_audio_media_properties.py
+++ b/infobip_api_client/models/calls_audio_media_properties.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_billing_package.py b/infobip_api_client/models/calls_billing_package.py
index da7f530..333c730 100644
--- a/infobip_api_client/models/calls_billing_package.py
+++ b/infobip_api_client/models/calls_billing_package.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_billing_package_type.py b/infobip_api_client/models/calls_billing_package_type.py
index ad3eb34..d902e44 100644
--- a/infobip_api_client/models/calls_billing_package_type.py
+++ b/infobip_api_client/models/calls_billing_package_type.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_bulk_call.py b/infobip_api_client/models/calls_bulk_call.py
index 5133368..d51404a 100644
--- a/infobip_api_client/models/calls_bulk_call.py
+++ b/infobip_api_client/models/calls_bulk_call.py
@@ -12,16 +12,17 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
+from infobip_api_client.models.calls_action_status import CallsActionStatus
from infobip_api_client.models.calls_bulk_endpoint import CallsBulkEndpoint
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
@@ -36,9 +37,7 @@ class CallsBulkCall(BaseModel):
description="Calls Configuration ID.",
alias="callsConfigurationId",
)
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
- )
+ platform: Optional[Platform] = None
call_id: Optional[Annotated[str, Field(strict=True, max_length=128)]] = Field(
default=None, description="Unique call ID.", alias="callId"
)
@@ -49,13 +48,13 @@ class CallsBulkCall(BaseModel):
default=None, description="Caller identifier.", alias="from"
)
endpoint: Optional[CallsBulkEndpoint] = None
- status: Optional[StrictStr] = Field(default=None, description="Action status.")
+ status: Optional[CallsActionStatus] = None
reason: Optional[StrictStr] = Field(
default=None, description="Failure reason in human-readable format."
)
__properties: ClassVar[List[str]] = [
"callsConfigurationId",
- "applicationId",
+ "platform",
"callId",
"externalId",
"from",
@@ -64,18 +63,6 @@ class CallsBulkCall(BaseModel):
"reason",
]
- @field_validator("status")
- def status_validate_enum(cls, value):
- """Validates the enum"""
- if value is None:
- return value
-
- if value not in set(["PENDING", "IN_PROGRESS", "COMPLETED", "FAILED"]):
- raise ValueError(
- "must be one of enum values ('PENDING', 'IN_PROGRESS', 'COMPLETED', 'FAILED')"
- )
- return value
-
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
@@ -113,6 +100,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
# override the default output from pydantic by calling `to_dict()` of endpoint
if self.endpoint:
_dict["endpoint"] = self.endpoint.to_dict()
@@ -130,7 +120,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"callId": obj.get("callId"),
"externalId": obj.get("externalId"),
"from": obj.get("from"),
diff --git a/infobip_api_client/models/calls_bulk_call_request.py b/infobip_api_client/models/calls_bulk_call_request.py
index b83b362..a758aa7 100644
--- a/infobip_api_client/models/calls_bulk_call_request.py
+++ b/infobip_api_client/models/calls_bulk_call_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_bulk_endpoint.py b/infobip_api_client/models/calls_bulk_endpoint.py
index d0bfeda..ab5744a 100644
--- a/infobip_api_client/models/calls_bulk_endpoint.py
+++ b/infobip_api_client/models/calls_bulk_endpoint.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_bulk_endpoint_type.py b/infobip_api_client/models/calls_bulk_endpoint_type.py
index 3dbda71..2a9852b 100644
--- a/infobip_api_client/models/calls_bulk_endpoint_type.py
+++ b/infobip_api_client/models/calls_bulk_endpoint_type.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_bulk_item.py b/infobip_api_client/models/calls_bulk_item.py
index 049559e..495b936 100644
--- a/infobip_api_client/models/calls_bulk_item.py
+++ b/infobip_api_client/models/calls_bulk_item.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_bulk_phone_endpoint.py b/infobip_api_client/models/calls_bulk_phone_endpoint.py
index e7b15f2..3bd33cf 100644
--- a/infobip_api_client/models/calls_bulk_phone_endpoint.py
+++ b/infobip_api_client/models/calls_bulk_phone_endpoint.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_bulk_request.py b/infobip_api_client/models/calls_bulk_request.py
index 57326fa..f4c43d0 100644
--- a/infobip_api_client/models/calls_bulk_request.py
+++ b/infobip_api_client/models/calls_bulk_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_bulk_response.py b/infobip_api_client/models/calls_bulk_response.py
index 0b13bf4..9552f9b 100644
--- a/infobip_api_client/models/calls_bulk_response.py
+++ b/infobip_api_client/models/calls_bulk_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_bulk_status.py b/infobip_api_client/models/calls_bulk_status.py
index 8b9c717..b02242d 100644
--- a/infobip_api_client/models/calls_bulk_status.py
+++ b/infobip_api_client/models/calls_bulk_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_bulk_status_response.py b/infobip_api_client/models/calls_bulk_status_response.py
index 3ba1eff..008bf61 100644
--- a/infobip_api_client/models/calls_bulk_status_response.py
+++ b/infobip_api_client/models/calls_bulk_status_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_call_api.py b/infobip_api_client/models/calls_call_api.py
new file mode 100644
index 0000000..6299bda
--- /dev/null
+++ b/infobip_api_client/models/calls_call_api.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_call_api_options import CallsCallApiOptions
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsCallApi(BaseModel):
+ """
+ Call API Action performs an HTTP request to a client’s endpoint, and (if told to) processes the response data. If collectResponse is set, the system will attempt to parse the response from the server. Our platform needs to be able to make HTTP requests to the specified endpoint.
+ """ # noqa: E501
+
+ request: StrictStr = Field(description="The URL to target")
+ options: CallsCallApiOptions
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = ["request", "options", "actionId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsCallApi from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of options
+ if self.options:
+ _dict["options"] = self.options.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsCallApi from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "request": obj.get("request"),
+ "options": CallsCallApiOptions.from_dict(obj["options"])
+ if obj.get("options") is not None
+ else None,
+ "actionId": obj.get("actionId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_call_api_options.py b/infobip_api_client/models/calls_call_api_options.py
new file mode 100644
index 0000000..5e06788
--- /dev/null
+++ b/infobip_api_client/models/calls_call_api_options.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_http_method import CallsHttpMethod
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsCallApiOptions(BaseModel):
+ """
+ CallsCallApiOptions
+ """ # noqa: E501
+
+ method: CallsHttpMethod
+ headers: Optional[Dict[str, Any]] = Field(default=None, description="HTTP headers")
+ body: Optional[StrictStr] = Field(default=None, description="HTTP body")
+ collect_response: Optional[StrictBool] = Field(
+ default=None,
+ description='If this field is set, the system will parse the response and save all its fields as variables inside scenario. Note: Parser ignores non-primitive fields and does not go deeper than the first level. For example, if the response is {"letters": "abcd", "numbers": 12345}, the system will store variables letters and numbers, with values abcd and 12345 respectively. Check the example Say action with Call Api Responses. Response that is parsed can only be in JSON or XML.',
+ alias="collectResponse",
+ )
+ __properties: ClassVar[List[str]] = ["method", "headers", "body", "collectResponse"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsCallApiOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsCallApiOptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "method": obj.get("method"),
+ "headers": obj.get("headers"),
+ "body": obj.get("body"),
+ "collectResponse": obj.get("collectResponse"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_capture.py b/infobip_api_client/models/calls_capture.py
new file mode 100644
index 0000000..3bacb93
--- /dev/null
+++ b/infobip_api_client/models/calls_capture.py
@@ -0,0 +1,128 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from infobip_api_client.models.calls_dtmf_options import CallsDtmfOptions
+from infobip_api_client.models.calls_send_to_reports import CallsSendToReports
+from infobip_api_client.models.calls_speech_options import CallsSpeechOptions
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsCapture(BaseModel):
+ """
+ Capture action performs speech recognition of a specified duration. The recognized text can be used in other actions of the scenario.
+ """ # noqa: E501
+
+ capture: StrictStr = Field(
+ description="Variable name. If speech recognition matches one of the specified keyPhrases, a variable with this name will be set to match the keyphrase. Otherwise, this variable will be an empty string. Together with this variable, an implicit variable that contains the full text of the captured speech will be created. The name of this variable is constructed by adding _Full suffix to the variable name."
+ )
+ timeout: Annotated[int, Field(le=30, strict=True, ge=1)] = Field(
+ description="Number of seconds used for capturing speech or digits failover. Minimum value is 1 and maximum value is 30. Can be overriden with speechOptions.maxSilence."
+ )
+ speech_options: CallsSpeechOptions = Field(alias="speechOptions")
+ dtmf_options: Optional[CallsDtmfOptions] = Field(default=None, alias="dtmfOptions")
+ send_to_reports: Optional[CallsSendToReports] = Field(
+ default=None, alias="sendToReports"
+ )
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = [
+ "capture",
+ "timeout",
+ "speechOptions",
+ "dtmfOptions",
+ "sendToReports",
+ "actionId",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsCapture from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of speech_options
+ if self.speech_options:
+ _dict["speechOptions"] = self.speech_options.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of dtmf_options
+ if self.dtmf_options:
+ _dict["dtmfOptions"] = self.dtmf_options.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsCapture from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "capture": obj.get("capture"),
+ "timeout": obj.get("timeout"),
+ "speechOptions": CallsSpeechOptions.from_dict(obj["speechOptions"])
+ if obj.get("speechOptions") is not None
+ else None,
+ "dtmfOptions": CallsDtmfOptions.from_dict(obj["dtmfOptions"])
+ if obj.get("dtmfOptions") is not None
+ else None,
+ "sendToReports": obj.get("sendToReports"),
+ "actionId": obj.get("actionId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_capture_dtmf_callback_response.py b/infobip_api_client/models/calls_capture_dtmf_callback_response.py
new file mode 100644
index 0000000..d02ab1a
--- /dev/null
+++ b/infobip_api_client/models/calls_capture_dtmf_callback_response.py
@@ -0,0 +1,139 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.callback_response import CallbackResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsCaptureDtmfCallbackResponse(CallbackResponse):
+ """
+ CallsCaptureDtmfCallbackResponse
+ """ # noqa: E501
+
+ file_id: Optional[StrictStr] = Field(
+ default=None,
+ description="ID of an audio file to play. Required if `fileUrl` is not provided.",
+ alias="fileId",
+ )
+ file_url: Optional[StrictStr] = Field(
+ default=None,
+ description="URL of an audio file to play. Required if `fileId` is not provided.",
+ alias="fileUrl",
+ )
+ max_length: StrictInt = Field(
+ description="Maximum number of digits to capture.", alias="maxLength"
+ )
+ timeout: StrictInt = Field(
+ description="The duration, in milliseconds, to wait for the first DTMF digit response."
+ )
+ digit_timeout: Optional[StrictInt] = Field(
+ default=None,
+ description="Duration, in milliseconds, to wait for a DTMF digit in-between individual digit inputs. If not set, `digitTimeout` will use the same duration as `timeout`.",
+ alias="digitTimeout",
+ )
+ terminator: Optional[StrictStr] = Field(
+ default="#",
+ description="Digit used to end input if less than `maxLength` digits have been pressed.",
+ )
+ add_country_code: Optional[StrictBool] = Field(
+ default=False,
+ description="Whether to convert the collected number into international format or not.",
+ alias="addCountryCode",
+ )
+ __properties: ClassVar[List[str]] = [
+ "command",
+ "fileId",
+ "fileUrl",
+ "maxLength",
+ "timeout",
+ "digitTimeout",
+ "terminator",
+ "addCountryCode",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsCaptureDtmfCallbackResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsCaptureDtmfCallbackResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "command": obj.get("command"),
+ "fileId": obj.get("fileId"),
+ "fileUrl": obj.get("fileUrl"),
+ "maxLength": obj.get("maxLength")
+ if obj.get("maxLength") is not None
+ else 15,
+ "timeout": obj.get("timeout"),
+ "digitTimeout": obj.get("digitTimeout"),
+ "terminator": obj.get("terminator")
+ if obj.get("terminator") is not None
+ else "#",
+ "addCountryCode": obj.get("addCountryCode")
+ if obj.get("addCountryCode") is not None
+ else False,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_case_object.py b/infobip_api_client/models/calls_case_object.py
new file mode 100644
index 0000000..b81c7ad
--- /dev/null
+++ b/infobip_api_client/models/calls_case_object.py
@@ -0,0 +1,86 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsCaseObject(BaseModel):
+ """
+ CallsCaseObject
+ """ # noqa: E501
+
+ default: List[Dict[str, Any]] = Field(
+ description="Array of actions to execute if none of the conditions above are met.",
+ alias="__default",
+ )
+ __properties: ClassVar[List[str]] = ["__default"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsCaseObject from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsCaseObject from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"__default": obj.get("__default")})
+ return _obj
diff --git a/infobip_api_client/models/calls_cisco_webex_provider.py b/infobip_api_client/models/calls_cisco_webex_provider.py
new file mode 100644
index 0000000..b5c8622
--- /dev/null
+++ b/infobip_api_client/models/calls_cisco_webex_provider.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from infobip_api_client.models.calls_provider import CallsProvider
+from infobip_api_client.models.calls_provider_trunk_type import CallsProviderTrunkType
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsCiscoWebexProvider(CallsProvider):
+ """
+ CallsCiscoWebexProvider
+ """ # noqa: E501
+
+ cisco_uuid: StrictStr = Field(
+ description="Cisco organization ID.", alias="ciscoUUID"
+ )
+ __properties: ClassVar[List[str]] = ["type", "ciscoUUID"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsCiscoWebexProvider from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsCiscoWebexProvider from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"type": obj.get("type"), "ciscoUUID": obj.get("ciscoUUID")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_click_to_call_message.py b/infobip_api_client/models/calls_click_to_call_message.py
index ed8f4dc..007c913 100644
--- a/infobip_api_client/models/calls_click_to_call_message.py
+++ b/infobip_api_client/models/calls_click_to_call_message.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,9 +19,9 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.calls_delivery_time_window import CallsDeliveryTimeWindow
from infobip_api_client.models.calls_retry import CallsRetry
from infobip_api_client.models.calls_voice import CallsVoice
+from infobip_api_client.models.delivery_time_window import DeliveryTimeWindow
from typing import Optional, Set
from typing_extensions import Self
@@ -41,7 +40,7 @@ class CallsClickToCallMessage(BaseModel):
description="An audio file can be delivered as a voice message to the recipients. An audio file must be uploaded online, so that the existing URL can be available for file download. Size of the audio file must be below 4 MB. Supported formats of the provided file are aac, aiff, m4a, mp2, mp3, mp4 (audio only), ogg, wav and wma. Our platform needs to have permission to make GET and HEAD HTTP requests on the provided URL. Standard http ports (like 80, 8080, etc.) are advised.",
alias="audioFileUrl",
)
- delivery_time_window: Optional[CallsDeliveryTimeWindow] = Field(
+ delivery_time_window: Optional[DeliveryTimeWindow] = Field(
default=None, alias="deliveryTimeWindow"
)
destination_a: StrictStr = Field(
@@ -188,7 +187,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"anonymization": obj.get("anonymization"),
"audioFileUrl": obj.get("audioFileUrl"),
- "deliveryTimeWindow": CallsDeliveryTimeWindow.from_dict(
+ "deliveryTimeWindow": DeliveryTimeWindow.from_dict(
obj["deliveryTimeWindow"]
)
if obj.get("deliveryTimeWindow") is not None
diff --git a/infobip_api_client/models/calls_click_to_call_message_body.py b/infobip_api_client/models/calls_click_to_call_message_body.py
index 5d82263..f5cdb7d 100644
--- a/infobip_api_client/models/calls_click_to_call_message_body.py
+++ b/infobip_api_client/models/calls_click_to_call_message_body.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_collect.py b/infobip_api_client/models/calls_collect.py
new file mode 100644
index 0000000..131d5b5
--- /dev/null
+++ b/infobip_api_client/models/calls_collect.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_collect_options import CallsCollectOptions
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsCollect(BaseModel):
+ """
+ Collect action reads the DTMF input from the user’s phone and saves it into a variable. Saved variable can be used within the IVR in any other action that allows variable usage. (e.g. switch/case)
+ """ # noqa: E501
+
+ collect_into: StrictStr = Field(
+ description="The name of the variable to set.", alias="collectInto"
+ )
+ options: Optional[CallsCollectOptions] = None
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = ["collectInto", "options", "actionId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsCollect from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of options
+ if self.options:
+ _dict["options"] = self.options.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsCollect from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "collectInto": obj.get("collectInto"),
+ "options": CallsCollectOptions.from_dict(obj["options"])
+ if obj.get("options") is not None
+ else None,
+ "actionId": obj.get("actionId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_collect_options.py b/infobip_api_client/models/calls_collect_options.py
new file mode 100644
index 0000000..d283bf9
--- /dev/null
+++ b/infobip_api_client/models/calls_collect_options.py
@@ -0,0 +1,113 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from infobip_api_client.models.calls_send_to_reports import CallsSendToReports
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsCollectOptions(BaseModel):
+ """
+ CallsCollectOptions
+ """ # noqa: E501
+
+ max_input_length: Optional[Annotated[int, Field(le=255, strict=True)]] = Field(
+ default=None,
+ description="Maximum acceptable number of digits. Stops reading after maxdigits have been entered (without requiring the user to press '#' key). Max accepted value is 255. If set to 0 then max value is applied.",
+ alias="maxInputLength",
+ )
+ timeout: Optional[Annotated[int, Field(le=30, strict=True)]] = Field(
+ default=None,
+ description="Timeout in seconds for user to press both first DTMF and all other inter-digit DTMFs. Default value is 5. Max value is 30.",
+ )
+ send_to_reports: Optional[CallsSendToReports] = Field(
+ default=None, alias="sendToReports"
+ )
+ mapped_values: Optional[Dict[str, Any]] = Field(
+ default=None,
+ description='Map of expected collected DTMF values with some real meaning. (Example: if you have multilingual IVR, and option for users to press 1 to enter "English" menu, you can define {"1":"English"}, so the reporting and analysis will be easier). When this option is defined additional variable is present in the scenario. If you set your collect action variable name to myVar, then you will get additional variable myVar_Meaning containing the mapped value for a collected DTMF.',
+ alias="mappedValues",
+ )
+ __properties: ClassVar[List[str]] = [
+ "maxInputLength",
+ "timeout",
+ "sendToReports",
+ "mappedValues",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsCollectOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsCollectOptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "maxInputLength": obj.get("maxInputLength"),
+ "timeout": obj.get("timeout"),
+ "sendToReports": obj.get("sendToReports"),
+ "mappedValues": obj.get("mappedValues"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_conference.py b/infobip_api_client/models/calls_conference.py
index b7619b2..fb5d401 100644
--- a/infobip_api_client/models/calls_conference.py
+++ b/infobip_api_client/models/calls_conference.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -22,6 +21,7 @@
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from infobip_api_client.models.calls_participant import CallsParticipant
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
@@ -46,15 +46,13 @@ class CallsConference(BaseModel):
description="Calls Configuration ID.",
alias="callsConfigurationId",
)
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
- )
+ platform: Optional[Platform] = None
__properties: ClassVar[List[str]] = [
"id",
"name",
"participants",
"callsConfigurationId",
- "applicationId",
+ "platform",
]
model_config = ConfigDict(
@@ -101,6 +99,9 @@ def to_dict(self) -> Dict[str, Any]:
if _item:
_items.append(_item.to_dict())
_dict["participants"] = _items
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
return _dict
@classmethod
@@ -122,7 +123,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if obj.get("participants") is not None
else None,
"callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
}
)
return _obj
diff --git a/infobip_api_client/models/calls_conference_and_call.py b/infobip_api_client/models/calls_conference_and_call.py
index 5055058..b327310 100644
--- a/infobip_api_client/models/calls_conference_and_call.py
+++ b/infobip_api_client/models/calls_conference_and_call.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_conference_broadcast_webrtc_text_request.py b/infobip_api_client/models/calls_conference_broadcast_webrtc_text_request.py
index 8aaa056..1b25970 100644
--- a/infobip_api_client/models/calls_conference_broadcast_webrtc_text_request.py
+++ b/infobip_api_client/models/calls_conference_broadcast_webrtc_text_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_conference_composition.py b/infobip_api_client/models/calls_conference_composition.py
index d6979ac..7198afb 100644
--- a/infobip_api_client/models/calls_conference_composition.py
+++ b/infobip_api_client/models/calls_conference_composition.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_conference_log_response.py b/infobip_api_client/models/calls_conference_log.py
similarity index 88%
rename from infobip_api_client/models/calls_conference_log_response.py
rename to infobip_api_client/models/calls_conference_log.py
index ce9eb40..9b8d236 100644
--- a/infobip_api_client/models/calls_conference_log_response.py
+++ b/infobip_api_client/models/calls_conference_log.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -27,13 +26,14 @@
)
from infobip_api_client.models.calls_error_code_info import CallsErrorCodeInfo
from infobip_api_client.models.calls_participant_session import CallsParticipantSession
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
-class CallsConferenceLogResponse(BaseModel):
+class CallsConferenceLog(BaseModel):
"""
- CallsConferenceLogResponse
+ CallsConferenceLog
""" # noqa: E501
conference_id: Optional[Annotated[str, Field(strict=True, max_length=128)]] = Field(
@@ -43,14 +43,7 @@ class CallsConferenceLogResponse(BaseModel):
default=None,
description="Conference name, requested or autogenerated on creation.",
)
- calls_configuration_id: Optional[StrictStr] = Field(
- default=None,
- description="Calls Configuration ID.",
- alias="callsConfigurationId",
- )
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
- )
+ platform: Optional[Platform] = None
start_time: Optional[datetime] = Field(
default=None,
description="Date and time for when the conference has been created.",
@@ -72,8 +65,7 @@ class CallsConferenceLogResponse(BaseModel):
__properties: ClassVar[List[str]] = [
"conferenceId",
"name",
- "callsConfigurationId",
- "applicationId",
+ "platform",
"startTime",
"endTime",
"duration",
@@ -99,7 +91,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of CallsConferenceLogResponse from a JSON string"""
+ """Create an instance of CallsConferenceLog from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -119,6 +111,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in sessions (list)
_items = []
if self.sessions:
@@ -136,7 +131,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of CallsConferenceLogResponse from a dict"""
+ """Create an instance of CallsConferenceLog from a dict"""
if obj is None:
return None
@@ -147,8 +142,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"conferenceId": obj.get("conferenceId"),
"name": obj.get("name"),
- "callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"startTime": obj.get("startTime"),
"endTime": obj.get("endTime"),
"duration": obj.get("duration"),
diff --git a/infobip_api_client/models/calls_conference_log_page.py b/infobip_api_client/models/calls_conference_log_page.py
index 8ace78e..8e2603f 100644
--- a/infobip_api_client/models/calls_conference_log_page.py
+++ b/infobip_api_client/models/calls_conference_log_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,9 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.calls_conference_log_response import (
- CallsConferenceLogResponse,
-)
+from infobip_api_client.models.calls_conference_log import CallsConferenceLog
from infobip_api_client.models.page_info import PageInfo
from typing import Optional, Set
from typing_extensions import Self
@@ -33,7 +30,7 @@ class CallsConferenceLogPage(BaseModel):
CallsConferenceLogPage
""" # noqa: E501
- results: Optional[List[CallsConferenceLogResponse]] = Field(
+ results: Optional[List[CallsConferenceLog]] = Field(
default=None, description="The list of the results for this page."
)
paging: Optional[PageInfo] = None
@@ -100,8 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"results": [
- CallsConferenceLogResponse.from_dict(_item)
- for _item in obj["results"]
+ CallsConferenceLog.from_dict(_item) for _item in obj["results"]
]
if obj.get("results") is not None
else None,
diff --git a/infobip_api_client/models/calls_conference_page.py b/infobip_api_client/models/calls_conference_page.py
index d3f1899..6fe29ec 100644
--- a/infobip_api_client/models/calls_conference_page.py
+++ b/infobip_api_client/models/calls_conference_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_conference_play_request.py b/infobip_api_client/models/calls_conference_play_request.py
new file mode 100644
index 0000000..33828b3
--- /dev/null
+++ b/infobip_api_client/models/calls_conference_play_request.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_play_content import CallsPlayContent
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsConferencePlayRequest(BaseModel):
+ """
+ CallsConferencePlayRequest
+ """ # noqa: E501
+
+ loop_count: Optional[StrictInt] = Field(
+ default=None,
+ description="Number of times the file will be played.",
+ alias="loopCount",
+ )
+ content: CallsPlayContent
+ __properties: ClassVar[List[str]] = ["loopCount", "content"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsConferencePlayRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of content
+ if self.content:
+ _dict["content"] = self.content.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsConferencePlayRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "loopCount": obj.get("loopCount"),
+ "content": CallsPlayContent.from_dict(obj["content"])
+ if obj.get("content") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_public_conference_recording.py b/infobip_api_client/models/calls_conference_recording.py
similarity index 82%
rename from infobip_api_client/models/calls_public_conference_recording.py
rename to infobip_api_client/models/calls_conference_recording.py
index a6e83aa..2e69052 100644
--- a/infobip_api_client/models/calls_public_conference_recording.py
+++ b/infobip_api_client/models/calls_conference_recording.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -22,19 +21,16 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
-from infobip_api_client.models.calls_public_call_recording import (
- CallsPublicCallRecording,
-)
-from infobip_api_client.models.calls_public_recording_file import (
- CallsPublicRecordingFile,
-)
+from infobip_api_client.models.call_recording import CallRecording
+from infobip_api_client.models.calls_recording_file import CallsRecordingFile
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
-class CallsPublicConferenceRecording(BaseModel):
+class CallsConferenceRecording(BaseModel):
"""
- CallsPublicConferenceRecording
+ CallsConferenceRecording
""" # noqa: E501
conference_id: Optional[Annotated[str, Field(strict=True, max_length=128)]] = Field(
@@ -48,15 +44,13 @@ class CallsPublicConferenceRecording(BaseModel):
description="Calls Configuration ID.",
alias="callsConfigurationId",
)
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
- )
- composed_files: Optional[List[CallsPublicRecordingFile]] = Field(
+ platform: Optional[Platform] = None
+ composed_files: Optional[List[CallsRecordingFile]] = Field(
default=None,
description="File(s) with a recording of all conference participants.",
alias="composedFiles",
)
- call_recordings: Optional[List[CallsPublicCallRecording]] = Field(
+ call_recordings: Optional[List[CallRecording]] = Field(
default=None,
description="File(s) with a recording of one conference participant.",
alias="callRecordings",
@@ -75,7 +69,7 @@ class CallsPublicConferenceRecording(BaseModel):
"conferenceId",
"conferenceName",
"callsConfigurationId",
- "applicationId",
+ "platform",
"composedFiles",
"callRecordings",
"startTime",
@@ -99,7 +93,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of CallsPublicConferenceRecording from a JSON string"""
+ """Create an instance of CallsConferenceRecording from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -119,6 +113,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in composed_files (list)
_items = []
if self.composed_files:
@@ -137,7 +134,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of CallsPublicConferenceRecording from a dict"""
+ """Create an instance of CallsConferenceRecording from a dict"""
if obj is None:
return None
@@ -149,16 +146,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"conferenceId": obj.get("conferenceId"),
"conferenceName": obj.get("conferenceName"),
"callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"composedFiles": [
- CallsPublicRecordingFile.from_dict(_item)
+ CallsRecordingFile.from_dict(_item)
for _item in obj["composedFiles"]
]
if obj.get("composedFiles") is not None
else None,
"callRecordings": [
- CallsPublicCallRecording.from_dict(_item)
- for _item in obj["callRecordings"]
+ CallRecording.from_dict(_item) for _item in obj["callRecordings"]
]
if obj.get("callRecordings") is not None
else None,
diff --git a/infobip_api_client/models/calls_conference_recording_log.py b/infobip_api_client/models/calls_conference_recording_log.py
index 31199da..486f03e 100644
--- a/infobip_api_client/models/calls_conference_recording_log.py
+++ b/infobip_api_client/models/calls_conference_recording_log.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,12 +19,8 @@
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.calls_public_call_recording import (
- CallsPublicCallRecording,
-)
-from infobip_api_client.models.calls_public_recording_file import (
- CallsPublicRecordingFile,
-)
+from infobip_api_client.models.call_recording import CallRecording
+from infobip_api_client.models.calls_recording_file import CallsRecordingFile
from typing import Optional, Set
from typing_extensions import Self
@@ -35,12 +30,12 @@ class CallsConferenceRecordingLog(BaseModel):
Conference recordings.
""" # noqa: E501
- composed_files: Optional[List[CallsPublicRecordingFile]] = Field(
+ composed_files: Optional[List[CallsRecordingFile]] = Field(
default=None,
description="File(s) with a recording of all conference participants.",
alias="composedFiles",
)
- call_recordings: Optional[List[CallsPublicCallRecording]] = Field(
+ call_recordings: Optional[List[CallRecording]] = Field(
default=None,
description="File(s) with a recording of one conference participant.",
alias="callRecordings",
@@ -112,14 +107,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"composedFiles": [
- CallsPublicRecordingFile.from_dict(_item)
+ CallsRecordingFile.from_dict(_item)
for _item in obj["composedFiles"]
]
if obj.get("composedFiles") is not None
else None,
"callRecordings": [
- CallsPublicCallRecording.from_dict(_item)
- for _item in obj["callRecordings"]
+ CallRecording.from_dict(_item) for _item in obj["callRecordings"]
]
if obj.get("callRecordings") is not None
else None,
diff --git a/infobip_api_client/models/calls_conference_recording_page.py b/infobip_api_client/models/calls_conference_recording_page.py
index d89d320..5e51b90 100644
--- a/infobip_api_client/models/calls_conference_recording_page.py
+++ b/infobip_api_client/models/calls_conference_recording_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,8 +19,8 @@
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.calls_public_conference_recording import (
- CallsPublicConferenceRecording,
+from infobip_api_client.models.calls_conference_recording import (
+ CallsConferenceRecording,
)
from infobip_api_client.models.page_info import PageInfo
from typing import Optional, Set
@@ -33,7 +32,7 @@ class CallsConferenceRecordingPage(BaseModel):
CallsConferenceRecordingPage
""" # noqa: E501
- results: Optional[List[CallsPublicConferenceRecording]] = Field(
+ results: Optional[List[CallsConferenceRecording]] = Field(
default=None, description="The list of the results for this page."
)
paging: Optional[PageInfo] = None
@@ -100,7 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"results": [
- CallsPublicConferenceRecording.from_dict(_item)
+ CallsConferenceRecording.from_dict(_item)
for _item in obj["results"]
]
if obj.get("results") is not None
diff --git a/infobip_api_client/models/calls_conference_recording_request.py b/infobip_api_client/models/calls_conference_recording_request.py
index ffb2a67..b1a1582 100644
--- a/infobip_api_client/models/calls_conference_recording_request.py
+++ b/infobip_api_client/models/calls_conference_recording_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_conference_request.py b/infobip_api_client/models/calls_conference_request.py
index 786c4b2..bb43f65 100644
--- a/infobip_api_client/models/calls_conference_request.py
+++ b/infobip_api_client/models/calls_conference_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -23,6 +22,7 @@
from infobip_api_client.models.calls_conference_recording_request import (
CallsConferenceRecordingRequest,
)
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
@@ -40,20 +40,16 @@ class CallsConferenceRequest(BaseModel):
max_duration: Optional[StrictInt] = Field(
default=28800, description="Max duration in seconds.", alias="maxDuration"
)
- calls_configuration_id: Optional[StrictStr] = Field(
- default=None,
- description="Calls Configuration ID.",
- alias="callsConfigurationId",
- )
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
+ calls_configuration_id: StrictStr = Field(
+ description="Calls Configuration ID.", alias="callsConfigurationId"
)
+ platform: Optional[Platform] = None
__properties: ClassVar[List[str]] = [
"name",
"recording",
"maxDuration",
"callsConfigurationId",
- "applicationId",
+ "platform",
]
model_config = ConfigDict(
@@ -96,6 +92,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of recording
if self.recording:
_dict["recording"] = self.recording.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
return _dict
@classmethod
@@ -117,7 +116,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if obj.get("maxDuration") is not None
else 28800,
"callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
}
)
return _obj
diff --git a/infobip_api_client/models/calls_connect_request.py b/infobip_api_client/models/calls_connect_request.py
index b6a20af..7f4907c 100644
--- a/infobip_api_client/models/calls_connect_request.py
+++ b/infobip_api_client/models/calls_connect_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_connect_with_new_call_request.py b/infobip_api_client/models/calls_connect_with_new_call_request.py
index cb5e833..ca63607 100644
--- a/infobip_api_client/models/calls_connect_with_new_call_request.py
+++ b/infobip_api_client/models/calls_connect_with_new_call_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -24,6 +23,7 @@
from infobip_api_client.models.calls_action_conference_request import (
CallsActionConferenceRequest,
)
+from infobip_api_client.models.ringback_generation import RingbackGeneration
from typing import Optional, Set
from typing_extensions import Self
@@ -38,15 +38,19 @@ class CallsConnectWithNewCallRequest(BaseModel):
)
connect_on_early_media: Optional[StrictBool] = Field(
default=False,
- description="Indicates whether to connect calls on early media. Otherwise, the calls are connected after being established.",
+ description="Indicates whether to connect calls on early media. Otherwise, the calls are connected after being established. Cannot be `true` when `ringbackGeneration` is enabled.",
alias="connectOnEarlyMedia",
)
+ ringback_generation: Optional[RingbackGeneration] = Field(
+ default=None, alias="ringbackGeneration"
+ )
conference_request: Optional[CallsActionConferenceRequest] = Field(
default=None, alias="conferenceRequest"
)
__properties: ClassVar[List[str]] = [
"callRequest",
"connectOnEarlyMedia",
+ "ringbackGeneration",
"conferenceRequest",
]
@@ -90,6 +94,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of call_request
if self.call_request:
_dict["callRequest"] = self.call_request.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of ringback_generation
+ if self.ringback_generation:
+ _dict["ringbackGeneration"] = self.ringback_generation.to_dict()
# override the default output from pydantic by calling `to_dict()` of conference_request
if self.conference_request:
_dict["conferenceRequest"] = self.conference_request.to_dict()
@@ -112,6 +119,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"connectOnEarlyMedia": obj.get("connectOnEarlyMedia")
if obj.get("connectOnEarlyMedia") is not None
else False,
+ "ringbackGeneration": RingbackGeneration.from_dict(
+ obj["ringbackGeneration"]
+ )
+ if obj.get("ringbackGeneration") is not None
+ else None,
"conferenceRequest": CallsActionConferenceRequest.from_dict(
obj["conferenceRequest"]
)
diff --git a/infobip_api_client/models/calls_country_list.py b/infobip_api_client/models/calls_country_list.py
index aabbb1e..cdabbd5 100644
--- a/infobip_api_client/models/calls_country_list.py
+++ b/infobip_api_client/models/calls_country_list.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_create_provider_sip_trunk_response.py b/infobip_api_client/models/calls_create_provider_sip_trunk_response.py
index cbc2732..92ea7ce 100644
--- a/infobip_api_client/models/calls_create_provider_sip_trunk_response.py
+++ b/infobip_api_client/models/calls_create_provider_sip_trunk_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -24,12 +23,10 @@
from infobip_api_client.models.calls_create_sip_trunk_response import (
CallsCreateSipTrunkResponse,
)
-from infobip_api_client.models.calls_pegasus_provider import CallsPegasusProvider
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
+from infobip_api_client.models.calls_provider import CallsProvider
from infobip_api_client.models.calls_sbc_hosts import CallsSbcHosts
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
@@ -39,7 +36,7 @@ class CallsCreateProviderSipTrunkResponse(CallsCreateSipTrunkResponse):
CallsCreateProviderSipTrunkResponse
""" # noqa: E501
- provider: Optional[CallsPegasusProvider] = None
+ provider: Optional[CallsProvider] = None
__properties: ClassVar[List[str]] = [
"id",
"type",
@@ -123,7 +120,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"sbcHosts": CallsSbcHosts.from_dict(obj["sbcHosts"])
if obj.get("sbcHosts") is not None
else None,
- "provider": CallsPegasusProvider.from_dict(obj["provider"])
+ "provider": CallsProvider.from_dict(obj["provider"])
if obj.get("provider") is not None
else None,
}
diff --git a/infobip_api_client/models/calls_create_registered_sip_trunk_response.py b/infobip_api_client/models/calls_create_registered_sip_trunk_response.py
index 8f8a2d7..c6fcf09 100644
--- a/infobip_api_client/models/calls_create_registered_sip_trunk_response.py
+++ b/infobip_api_client/models/calls_create_registered_sip_trunk_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -31,11 +30,9 @@
from infobip_api_client.models.calls_number_presentation_format import (
CallsNumberPresentationFormat,
)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
from infobip_api_client.models.calls_sbc_hosts import CallsSbcHosts
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
diff --git a/infobip_api_client/models/calls_create_sip_trunk_response.py b/infobip_api_client/models/calls_create_sip_trunk_response.py
index b35ddd8..4559661 100644
--- a/infobip_api_client/models/calls_create_sip_trunk_response.py
+++ b/infobip_api_client/models/calls_create_sip_trunk_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -22,11 +21,9 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from infobip_api_client.models.calls_billing_package import CallsBillingPackage
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
from infobip_api_client.models.calls_sbc_hosts import CallsSbcHosts
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
@@ -50,7 +47,7 @@ class CallsCreateSipTrunkResponse(BaseModel):
""" # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="SIP trunk ID.")
- type: Optional[CallsPegasusSipTrunkType] = None
+ type: Optional[CallsSipTrunkType] = None
name: Optional[StrictStr] = Field(default=None, description="SIP trunk name.")
location: Optional[CallsSipTrunkLocation] = None
international_calls_allowed: Optional[StrictBool] = Field(
diff --git a/infobip_api_client/models/calls_create_static_sip_trunk_response.py b/infobip_api_client/models/calls_create_static_sip_trunk_response.py
index 47ec89b..1468127 100644
--- a/infobip_api_client/models/calls_create_static_sip_trunk_response.py
+++ b/infobip_api_client/models/calls_create_static_sip_trunk_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -31,13 +30,11 @@
from infobip_api_client.models.calls_number_presentation_format import (
CallsNumberPresentationFormat,
)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
from infobip_api_client.models.calls_sbc_hosts import CallsSbcHosts
from infobip_api_client.models.calls_selection_strategy import CallsSelectionStrategy
from infobip_api_client.models.calls_sip_options import CallsSipOptions
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
diff --git a/infobip_api_client/models/calls_creation_method.py b/infobip_api_client/models/calls_creation_method.py
index 291b1c4..983b13f 100644
--- a/infobip_api_client/models/calls_creation_method.py
+++ b/infobip_api_client/models/calls_creation_method.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_destination.py b/infobip_api_client/models/calls_destination.py
index c8d06b2..b4a0adc 100644
--- a/infobip_api_client/models/calls_destination.py
+++ b/infobip_api_client/models/calls_destination.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_detection_result.py b/infobip_api_client/models/calls_detection_result.py
index 0d4701a..4ee3c5d 100644
--- a/infobip_api_client/models/calls_detection_result.py
+++ b/infobip_api_client/models/calls_detection_result.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_dial.py b/infobip_api_client/models/calls_dial.py
new file mode 100644
index 0000000..335b3c8
--- /dev/null
+++ b/infobip_api_client/models/calls_dial.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_dial_options import CallsDialOptions
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsDial(BaseModel):
+ """
+ Dial action performs a call redirection, joining the user's call with another destination. After Dial action the following actions are forbidden: Say, Collect, Dial, Dial to Many, Dial to WebRTC, Dial to SIP trunk, Dial to Conversations, Play, Record and Play from Recording.
+ """ # noqa: E501
+
+ dial: StrictStr = Field(
+ description="must be a valid E164 MSISDN; the parameter can be constructed using variables"
+ )
+ options: Optional[CallsDialOptions] = None
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = ["dial", "options", "actionId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsDial from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of options
+ if self.options:
+ _dict["options"] = self.options.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsDial from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "dial": obj.get("dial"),
+ "options": CallsDialOptions.from_dict(obj["options"])
+ if obj.get("options") is not None
+ else None,
+ "actionId": obj.get("actionId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_dial_callback_response.py b/infobip_api_client/models/calls_dial_callback_response.py
new file mode 100644
index 0000000..91b2a91
--- /dev/null
+++ b/infobip_api_client/models/calls_dial_callback_response.py
@@ -0,0 +1,124 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.callback_response import CallbackResponse
+from infobip_api_client.models.calls_announcements import CallsAnnouncements
+from infobip_api_client.models.calls_recording import CallsRecording
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsDialCallbackResponse(CallbackResponse):
+ """
+ CallsDialCallbackResponse
+ """ # noqa: E501
+
+ phone_number: StrictStr = Field(
+ description="Destination phone number to call.", alias="phoneNumber"
+ )
+ caller_id: StrictStr = Field(
+ description="Caller ID displayed to a called party.", alias="callerId"
+ )
+ announcements: Optional[CallsAnnouncements] = None
+ recording: Optional[CallsRecording] = None
+ client_reference_id: Optional[StrictStr] = Field(
+ default=None,
+ description="A user-defined reference ID for associating with a number masking session. This ID will appear in subsequent status requests and, if the session is recorded and our SFTP facility is used, will name the recording file. **Note:** In the case of recording, please limit this field to `200` characters as generated file name uses this field, call ID and extension, and if total file name is bigger than 256 characters, saving of the recording file will fail.",
+ alias="clientReferenceId",
+ )
+ __properties: ClassVar[List[str]] = [
+ "command",
+ "phoneNumber",
+ "callerId",
+ "announcements",
+ "recording",
+ "clientReferenceId",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsDialCallbackResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of announcements
+ if self.announcements:
+ _dict["announcements"] = self.announcements.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of recording
+ if self.recording:
+ _dict["recording"] = self.recording.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsDialCallbackResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "command": obj.get("command"),
+ "phoneNumber": obj.get("phoneNumber"),
+ "callerId": obj.get("callerId"),
+ "announcements": CallsAnnouncements.from_dict(obj["announcements"])
+ if obj.get("announcements") is not None
+ else None,
+ "recording": CallsRecording.from_dict(obj["recording"])
+ if obj.get("recording") is not None
+ else None,
+ "clientReferenceId": obj.get("clientReferenceId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_dial_options.py b/infobip_api_client/models/calls_dial_options.py
new file mode 100644
index 0000000..3f5d2b4
--- /dev/null
+++ b/infobip_api_client/models/calls_dial_options.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsDialOptions(BaseModel):
+ """
+ CallsDialOptions
+ """ # noqa: E501
+
+ sender_id: Optional[StrictStr] = Field(
+ default=None,
+ description="must be a valid E164 MSISDN; the parameter can be constructed using variables",
+ alias="senderId",
+ )
+ max_call_duration: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(
+ default=None,
+ description="If set, call transfer will be limited by maxCallDuration seconds, must be a positive number, no upper bound.",
+ alias="maxCallDuration",
+ )
+ __properties: ClassVar[List[str]] = ["senderId", "maxCallDuration"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsDialOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsDialOptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "senderId": obj.get("senderId"),
+ "maxCallDuration": obj.get("maxCallDuration"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_dial_to_conversations.py b/infobip_api_client/models/calls_dial_to_conversations.py
new file mode 100644
index 0000000..4dc69be
--- /dev/null
+++ b/infobip_api_client/models/calls_dial_to_conversations.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List
+from infobip_api_client.models.calls_dial_to_conversations_data import (
+ CallsDialToConversationsData,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsDialToConversations(BaseModel):
+ """
+ Dial to Conversations action performs a call redirection to the [Infobip Conversations platform](https://www.infobip.com/docs/conversations), joining the user’s call with an agent. After Dial to Conversations action the following actions are forbidden: Say, Collect, Dial, Dial to Many, Dial to WebRTC, Dial to SIP trunk, Dial to Conversations, Play, Record and Play from Recording.
+ """ # noqa: E501
+
+ dial_to_conversations: CallsDialToConversationsData = Field(
+ alias="dialToConversations"
+ )
+ __properties: ClassVar[List[str]] = ["dialToConversations"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsDialToConversations from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of dial_to_conversations
+ if self.dial_to_conversations:
+ _dict["dialToConversations"] = self.dial_to_conversations.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsDialToConversations from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "dialToConversations": CallsDialToConversationsData.from_dict(
+ obj["dialToConversations"]
+ )
+ if obj.get("dialToConversations") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_dial_to_conversations_data.py b/infobip_api_client/models/calls_dial_to_conversations_data.py
new file mode 100644
index 0000000..a302f13
--- /dev/null
+++ b/infobip_api_client/models/calls_dial_to_conversations_data.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List
+from infobip_api_client.models.calls_dial_to_conversations_options import (
+ CallsDialToConversationsOptions,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsDialToConversationsData(BaseModel):
+ """
+ CallsDialToConversationsData
+ """ # noqa: E501
+
+ options: CallsDialToConversationsOptions
+ __properties: ClassVar[List[str]] = ["options"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsDialToConversationsData from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of options
+ if self.options:
+ _dict["options"] = self.options.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsDialToConversationsData from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "options": CallsDialToConversationsOptions.from_dict(obj["options"])
+ if obj.get("options") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_dial_to_conversations_options.py b/infobip_api_client/models/calls_dial_to_conversations_options.py
new file mode 100644
index 0000000..d39ccbe
--- /dev/null
+++ b/infobip_api_client/models/calls_dial_to_conversations_options.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_tag_identifier_type import CallsTagIdentifierType
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsDialToConversationsOptions(BaseModel):
+ """
+ CallsDialToConversationsOptions
+ """ # noqa: E501
+
+ tag_identifier_type: Optional[CallsTagIdentifierType] = Field(
+ default=None, alias="tagIdentifierType"
+ )
+ tags: List[StrictStr] = Field(
+ description="An array of [conversation tag](https://www.infobip.com/docs/conversations/get-to-know-conversations#tags-templates-and-tags) names or ids that are assigned to this conversation for better categorization of the topics or customer intent. Value can be an array of tag names/ids, empty array, or null value."
+ )
+ __properties: ClassVar[List[str]] = ["tagIdentifierType", "tags"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsDialToConversationsOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsDialToConversationsOptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"tagIdentifierType": obj.get("tagIdentifierType"), "tags": obj.get("tags")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_time_window.py b/infobip_api_client/models/calls_dial_to_many.py
similarity index 56%
rename from infobip_api_client/models/calls_time_window.py
rename to infobip_api_client/models/calls_dial_to_many.py
index 27d63f5..61c2846 100644
--- a/infobip_api_client/models/calls_time_window.py
+++ b/infobip_api_client/models/calls_dial_to_many.py
@@ -12,50 +12,32 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.calls_time_window_point import CallsTimeWindowPoint
+from infobip_api_client.models.calls_dial_to_many_options import CallsDialToManyOptions
+from infobip_api_client.models.calls_numbers import CallsNumbers
from typing import Optional, Set
from typing_extensions import Self
-class CallsTimeWindow(BaseModel):
+class CallsDialToMany(BaseModel):
"""
- Defines a scheduling object that allows setting up a detailed time window in which calls can be established. Consists of from, to and days properties. Days property is mandatory.
+ Dial to Many action performs a call redirection to multiple destinations, joining the user’s call only with the destination that answered the call first. After Dial to Many action the following actions are forbidden: Say, Collect, Dial, Dial to Many, Dial to WebRTC, Dial to SIP trunk, Dial to Conversations, Play, Record and Play from Recording.
""" # noqa: E501
- var_from: Optional[CallsTimeWindowPoint] = Field(default=None, alias="from")
- to: Optional[CallsTimeWindowPoint] = None
- days: List[StrictStr] = Field(
- description="Days when scheduling call establishment will be attempted."
+ dial_to_many: List[CallsNumbers] = Field(alias="dialToMany")
+ options: Optional[CallsDialToManyOptions] = None
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
)
- __properties: ClassVar[List[str]] = ["from", "to", "days"]
-
- @field_validator("days")
- def days_validate_enum(cls, value):
- """Validates the enum"""
- for i in value:
- if i not in set(
- [
- "MONDAY",
- "TUESDAY",
- "WEDNESDAY",
- "THURSDAY",
- "FRIDAY",
- "SATURDAY",
- "SUNDAY",
- ]
- ):
- raise ValueError(
- "each list item must be one of ('MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY')"
- )
- return value
+ __properties: ClassVar[List[str]] = ["dialToMany", "options", "actionId"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,7 +56,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of CallsTimeWindow from a JSON string"""
+ """Create an instance of CallsDialToMany from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -94,17 +76,21 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
- # override the default output from pydantic by calling `to_dict()` of var_from
- if self.var_from:
- _dict["from"] = self.var_from.to_dict()
- # override the default output from pydantic by calling `to_dict()` of to
- if self.to:
- _dict["to"] = self.to.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in dial_to_many (list)
+ _items = []
+ if self.dial_to_many:
+ for _item in self.dial_to_many:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["dialToMany"] = _items
+ # override the default output from pydantic by calling `to_dict()` of options
+ if self.options:
+ _dict["options"] = self.options.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of CallsTimeWindow from a dict"""
+ """Create an instance of CallsDialToMany from a dict"""
if obj is None:
return None
@@ -113,13 +99,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
- "from": CallsTimeWindowPoint.from_dict(obj["from"])
- if obj.get("from") is not None
+ "dialToMany": [
+ CallsNumbers.from_dict(_item) for _item in obj["dialToMany"]
+ ]
+ if obj.get("dialToMany") is not None
else None,
- "to": CallsTimeWindowPoint.from_dict(obj["to"])
- if obj.get("to") is not None
+ "options": CallsDialToManyOptions.from_dict(obj["options"])
+ if obj.get("options") is not None
else None,
- "days": obj.get("days"),
+ "actionId": obj.get("actionId"),
}
)
return _obj
diff --git a/infobip_api_client/models/calls_dial_to_many_options.py b/infobip_api_client/models/calls_dial_to_many_options.py
new file mode 100644
index 0000000..2d6f824
--- /dev/null
+++ b/infobip_api_client/models/calls_dial_to_many_options.py
@@ -0,0 +1,114 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsDialToManyOptions(BaseModel):
+ """
+ CallsDialToManyOptions
+ """ # noqa: E501
+
+ parallel: Optional[StrictBool] = Field(
+ default=None,
+ description="Flag indicating that parallel (true), or sequential (false) Dial to Many will be executed.",
+ )
+ sender_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Must be a valid E164 MSISDN; the parameter can be constructed using variables",
+ alias="senderId",
+ )
+ max_call_duration: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(
+ default=None,
+ description="If set, call transfer will be limited by maxCallDuration seconds; must be a positive number, no upper bound.",
+ alias="maxCallDuration",
+ )
+ ring_timeout: Optional[StrictInt] = Field(
+ default=None,
+ description="If set limits the duration of the ringing of transferred calls in seconds. The default value is 30 seconds. This parameter can be changed only for sequential calls.",
+ alias="ringTimeout",
+ )
+ __properties: ClassVar[List[str]] = [
+ "parallel",
+ "senderId",
+ "maxCallDuration",
+ "ringTimeout",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsDialToManyOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsDialToManyOptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "parallel": obj.get("parallel"),
+ "senderId": obj.get("senderId"),
+ "maxCallDuration": obj.get("maxCallDuration"),
+ "ringTimeout": obj.get("ringTimeout"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_dial_to_web_rtc.py b/infobip_api_client/models/calls_dial_to_web_rtc.py
new file mode 100644
index 0000000..13b77f3
--- /dev/null
+++ b/infobip_api_client/models/calls_dial_to_web_rtc.py
@@ -0,0 +1,86 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsDialToWebRTC(BaseModel):
+ """
+ Dial to WebRTC action performs a call redirection to WebRTC application, joining the user’s call with the WebRTC application. After Dial to WebRTC action the following actions are forbidden: Say, Collect, Dial, Dial to Many, Dial to WebRTC, Dial to SIP trunk, Dial to Conversations, Play, Record and Play from Recording.
+ """ # noqa: E501
+
+ dial_to_web_rtc: StrictStr = Field(
+ description="Web and in-app calls applicationId. Read more about Web and in-app calls [here](https://www.infobip.com/docs/voice-and-video/web-and-in-app-calls)",
+ alias="dialToWebRTC",
+ )
+ __properties: ClassVar[List[str]] = ["dialToWebRTC"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsDialToWebRTC from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsDialToWebRTC from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"dialToWebRTC": obj.get("dialToWebRTC")})
+ return _obj
diff --git a/infobip_api_client/models/calls_dialog_broadcast_webrtc_text_request.py b/infobip_api_client/models/calls_dialog_broadcast_webrtc_text_request.py
index 5790846..1894650 100644
--- a/infobip_api_client/models/calls_dialog_broadcast_webrtc_text_request.py
+++ b/infobip_api_client/models/calls_dialog_broadcast_webrtc_text_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dialog_call_request.py b/infobip_api_client/models/calls_dialog_call_request.py
index 305c3f8..310d2a8 100644
--- a/infobip_api_client/models/calls_dialog_call_request.py
+++ b/infobip_api_client/models/calls_dialog_call_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dialog_log_page.py b/infobip_api_client/models/calls_dialog_log_page.py
index 3f5996f..b6e6f7f 100644
--- a/infobip_api_client/models/calls_dialog_log_page.py
+++ b/infobip_api_client/models/calls_dialog_log_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dialog_log_response.py b/infobip_api_client/models/calls_dialog_log_response.py
index 3cdfcc9..ecbff31 100644
--- a/infobip_api_client/models/calls_dialog_log_response.py
+++ b/infobip_api_client/models/calls_dialog_log_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -25,6 +24,7 @@
from infobip_api_client.models.calls_dialog_recording_log import CallsDialogRecordingLog
from infobip_api_client.models.calls_dialog_state import CallsDialogState
from infobip_api_client.models.calls_error_code_info import CallsErrorCodeInfo
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
@@ -42,9 +42,7 @@ class CallsDialogLogResponse(BaseModel):
description="Calls Configuration ID.",
alias="callsConfigurationId",
)
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
- )
+ platform: Optional[Platform] = None
state: Optional[CallsDialogState] = None
start_time: Optional[datetime] = Field(
default=None,
@@ -75,7 +73,7 @@ class CallsDialogLogResponse(BaseModel):
__properties: ClassVar[List[str]] = [
"dialogId",
"callsConfigurationId",
- "applicationId",
+ "platform",
"state",
"startTime",
"establishTime",
@@ -124,6 +122,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
# override the default output from pydantic by calling `to_dict()` of recording
if self.recording:
_dict["recording"] = self.recording.to_dict()
@@ -145,7 +146,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"dialogId": obj.get("dialogId"),
"callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"state": obj.get("state"),
"startTime": obj.get("startTime"),
"establishTime": obj.get("establishTime"),
diff --git a/infobip_api_client/models/calls_dialog_page.py b/infobip_api_client/models/calls_dialog_page.py
index 6fd52f5..f5b7f11 100644
--- a/infobip_api_client/models/calls_dialog_page.py
+++ b/infobip_api_client/models/calls_dialog_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dialog_play_request.py b/infobip_api_client/models/calls_dialog_play_request.py
index a2f34aa..85f2a34 100644
--- a/infobip_api_client/models/calls_dialog_play_request.py
+++ b/infobip_api_client/models/calls_dialog_play_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dialog_propagation_options.py b/infobip_api_client/models/calls_dialog_propagation_options.py
index 91f25dd..e780c3a 100644
--- a/infobip_api_client/models/calls_dialog_propagation_options.py
+++ b/infobip_api_client/models/calls_dialog_propagation_options.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,6 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.ringback_generation import RingbackGeneration
from typing import Optional, Set
from typing_extensions import Self
@@ -36,10 +36,17 @@ class CallsDialogPropagationOptions(BaseModel):
)
child_call_ringing: Optional[StrictBool] = Field(
default=False,
- description="Flag indicating if a child call's ringing should be propagated to the parent call. The parent call must be `INBOUND`.",
+ description="Flag indicating if a child call's ringing should be propagated to the parent call. The parent call must be `INBOUND`. Cannot be `true` when `ringbackGeneration` is enabled.",
alias="childCallRinging",
)
- __properties: ClassVar[List[str]] = ["childCallHangup", "childCallRinging"]
+ ringback_generation: Optional[RingbackGeneration] = Field(
+ default=None, alias="ringbackGeneration"
+ )
+ __properties: ClassVar[List[str]] = [
+ "childCallHangup",
+ "childCallRinging",
+ "ringbackGeneration",
+ ]
model_config = ConfigDict(
populate_by_name=True,
@@ -78,6 +85,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of ringback_generation
+ if self.ringback_generation:
+ _dict["ringbackGeneration"] = self.ringback_generation.to_dict()
return _dict
@classmethod
@@ -97,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"childCallRinging": obj.get("childCallRinging")
if obj.get("childCallRinging") is not None
else False,
+ "ringbackGeneration": RingbackGeneration.from_dict(
+ obj["ringbackGeneration"]
+ )
+ if obj.get("ringbackGeneration") is not None
+ else None,
}
)
return _obj
diff --git a/infobip_api_client/models/calls_dialog_recording_composition.py b/infobip_api_client/models/calls_dialog_recording_composition.py
index bc54f72..d466d1b 100644
--- a/infobip_api_client/models/calls_dialog_recording_composition.py
+++ b/infobip_api_client/models/calls_dialog_recording_composition.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dialog_recording_log.py b/infobip_api_client/models/calls_dialog_recording_log.py
index a30e05a..5b943ee 100644
--- a/infobip_api_client/models/calls_dialog_recording_log.py
+++ b/infobip_api_client/models/calls_dialog_recording_log.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,12 +19,8 @@
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.calls_public_call_recording import (
- CallsPublicCallRecording,
-)
-from infobip_api_client.models.calls_public_recording_file import (
- CallsPublicRecordingFile,
-)
+from infobip_api_client.models.call_recording import CallRecording
+from infobip_api_client.models.calls_recording_file import CallsRecordingFile
from typing import Optional, Set
from typing_extensions import Self
@@ -35,12 +30,12 @@ class CallsDialogRecordingLog(BaseModel):
Dialog recordings.
""" # noqa: E501
- composed_files: Optional[List[CallsPublicRecordingFile]] = Field(
+ composed_files: Optional[List[CallsRecordingFile]] = Field(
default=None,
description="File(s) with a recording of both dialog calls.",
alias="composedFiles",
)
- call_recordings: Optional[List[CallsPublicCallRecording]] = Field(
+ call_recordings: Optional[List[CallRecording]] = Field(
default=None,
description="File(s) with a recording of individual dialog calls.",
alias="callRecordings",
@@ -112,14 +107,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"composedFiles": [
- CallsPublicRecordingFile.from_dict(_item)
+ CallsRecordingFile.from_dict(_item)
for _item in obj["composedFiles"]
]
if obj.get("composedFiles") is not None
else None,
"callRecordings": [
- CallsPublicCallRecording.from_dict(_item)
- for _item in obj["callRecordings"]
+ CallRecording.from_dict(_item) for _item in obj["callRecordings"]
]
if obj.get("callRecordings") is not None
else None,
diff --git a/infobip_api_client/models/calls_dialog_recording_page.py b/infobip_api_client/models/calls_dialog_recording_page.py
index 626f3db..7597676 100644
--- a/infobip_api_client/models/calls_dialog_recording_page.py
+++ b/infobip_api_client/models/calls_dialog_recording_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,8 +19,8 @@
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.calls_public_dialog_recording import (
- CallsPublicDialogRecording,
+from infobip_api_client.models.calls_dialog_recording_response import (
+ CallsDialogRecordingResponse,
)
from infobip_api_client.models.page_info import PageInfo
from typing import Optional, Set
@@ -33,7 +32,7 @@ class CallsDialogRecordingPage(BaseModel):
CallsDialogRecordingPage
""" # noqa: E501
- results: Optional[List[CallsPublicDialogRecording]] = Field(
+ results: Optional[List[CallsDialogRecordingResponse]] = Field(
default=None, description="The list of the results for this page."
)
paging: Optional[PageInfo] = None
@@ -100,7 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"results": [
- CallsPublicDialogRecording.from_dict(_item)
+ CallsDialogRecordingResponse.from_dict(_item)
for _item in obj["results"]
]
if obj.get("results") is not None
diff --git a/infobip_api_client/models/calls_dialog_recording_request.py b/infobip_api_client/models/calls_dialog_recording_request.py
index 50f5894..2c5a794 100644
--- a/infobip_api_client/models/calls_dialog_recording_request.py
+++ b/infobip_api_client/models/calls_dialog_recording_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_public_dialog_recording.py b/infobip_api_client/models/calls_dialog_recording_response.py
similarity index 81%
rename from infobip_api_client/models/calls_public_dialog_recording.py
rename to infobip_api_client/models/calls_dialog_recording_response.py
index f01d652..46cb4a0 100644
--- a/infobip_api_client/models/calls_public_dialog_recording.py
+++ b/infobip_api_client/models/calls_dialog_recording_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -22,19 +21,16 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
-from infobip_api_client.models.calls_public_call_recording import (
- CallsPublicCallRecording,
-)
-from infobip_api_client.models.calls_public_recording_file import (
- CallsPublicRecordingFile,
-)
+from infobip_api_client.models.call_recording import CallRecording
+from infobip_api_client.models.calls_recording_file import CallsRecordingFile
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
-class CallsPublicDialogRecording(BaseModel):
+class CallsDialogRecordingResponse(BaseModel):
"""
- CallsPublicDialogRecording
+ CallsDialogRecordingResponse
""" # noqa: E501
dialog_id: Optional[Annotated[str, Field(strict=True, max_length=128)]] = Field(
@@ -45,15 +41,13 @@ class CallsPublicDialogRecording(BaseModel):
description="Calls Configuration ID.",
alias="callsConfigurationId",
)
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
- )
- composed_files: Optional[List[CallsPublicRecordingFile]] = Field(
+ platform: Optional[Platform] = None
+ composed_files: Optional[List[CallsRecordingFile]] = Field(
default=None,
description="File(s) with a recording of both dialog participants.",
alias="composedFiles",
)
- call_recordings: Optional[List[CallsPublicCallRecording]] = Field(
+ call_recordings: Optional[List[CallRecording]] = Field(
default=None,
description="File(s) with a recording of one dialog participant.",
alias="callRecordings",
@@ -71,7 +65,7 @@ class CallsPublicDialogRecording(BaseModel):
__properties: ClassVar[List[str]] = [
"dialogId",
"callsConfigurationId",
- "applicationId",
+ "platform",
"composedFiles",
"callRecordings",
"startTime",
@@ -95,7 +89,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of CallsPublicDialogRecording from a JSON string"""
+ """Create an instance of CallsDialogRecordingResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -115,6 +109,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in composed_files (list)
_items = []
if self.composed_files:
@@ -133,7 +130,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of CallsPublicDialogRecording from a dict"""
+ """Create an instance of CallsDialogRecordingResponse from a dict"""
if obj is None:
return None
@@ -144,16 +141,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"dialogId": obj.get("dialogId"),
"callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"composedFiles": [
- CallsPublicRecordingFile.from_dict(_item)
+ CallsRecordingFile.from_dict(_item)
for _item in obj["composedFiles"]
]
if obj.get("composedFiles") is not None
else None,
"callRecordings": [
- CallsPublicCallRecording.from_dict(_item)
- for _item in obj["callRecordings"]
+ CallRecording.from_dict(_item) for _item in obj["callRecordings"]
]
if obj.get("callRecordings") is not None
else None,
diff --git a/infobip_api_client/models/calls_dialog_request.py b/infobip_api_client/models/calls_dialog_request.py
index cd7e99d..7eba2af 100644
--- a/infobip_api_client/models/calls_dialog_request.py
+++ b/infobip_api_client/models/calls_dialog_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dialog_response.py b/infobip_api_client/models/calls_dialog_response.py
index a0c2040..f0d4d98 100644
--- a/infobip_api_client/models/calls_dialog_response.py
+++ b/infobip_api_client/models/calls_dialog_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -24,6 +23,7 @@
from typing_extensions import Annotated
from infobip_api_client.models.call import Call
from infobip_api_client.models.calls_dialog_state import CallsDialogState
+from infobip_api_client.models.platform import Platform
from typing import Optional, Set
from typing_extensions import Self
@@ -41,9 +41,7 @@ class CallsDialogResponse(BaseModel):
description="Calls Configuration ID.",
alias="callsConfigurationId",
)
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
- )
+ platform: Optional[Platform] = None
state: Optional[CallsDialogState] = None
start_time: Optional[datetime] = Field(
default=None,
@@ -65,7 +63,7 @@ class CallsDialogResponse(BaseModel):
__properties: ClassVar[List[str]] = [
"id",
"callsConfigurationId",
- "applicationId",
+ "platform",
"state",
"startTime",
"establishTime",
@@ -111,6 +109,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
# override the default output from pydantic by calling `to_dict()` of parent_call
if self.parent_call:
_dict["parentCall"] = self.parent_call.to_dict()
@@ -132,7 +133,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"id": obj.get("id"),
"callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
"state": obj.get("state"),
"startTime": obj.get("startTime"),
"establishTime": obj.get("establishTime"),
diff --git a/infobip_api_client/models/calls_dialog_say_request.py b/infobip_api_client/models/calls_dialog_say_request.py
index 6a456bb..b12e089 100644
--- a/infobip_api_client/models/calls_dialog_say_request.py
+++ b/infobip_api_client/models/calls_dialog_say_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dialog_state.py b/infobip_api_client/models/calls_dialog_state.py
index aef2a94..282d0f6 100644
--- a/infobip_api_client/models/calls_dialog_state.py
+++ b/infobip_api_client/models/calls_dialog_state.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_dialog_with_existing_call_request.py b/infobip_api_client/models/calls_dialog_with_existing_call_request.py
index 8babf55..ecb7f69 100644
--- a/infobip_api_client/models/calls_dialog_with_existing_call_request.py
+++ b/infobip_api_client/models/calls_dialog_with_existing_call_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dtmf_capture_request.py b/infobip_api_client/models/calls_dtmf_capture_request.py
index 6e31b74..cbfbc93 100644
--- a/infobip_api_client/models/calls_dtmf_capture_request.py
+++ b/infobip_api_client/models/calls_dtmf_capture_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dtmf_options.py b/infobip_api_client/models/calls_dtmf_options.py
new file mode 100644
index 0000000..a809eea
--- /dev/null
+++ b/infobip_api_client/models/calls_dtmf_options.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsDtmfOptions(BaseModel):
+ """
+ CallsDtmfOptions
+ """ # noqa: E501
+
+ max_input_length: Optional[Annotated[int, Field(le=255, strict=True)]] = Field(
+ default=None,
+ description="Maximum acceptable number of digits. Capturing is stopped after this number of digits has been entered. Max accepted value is 255. If not set, maximum value will be used.",
+ alias="maxInputLength",
+ )
+ mapped_values: Optional[Dict[str, Any]] = Field(
+ default=None,
+ description='Map of expected collected DTMF values with some real meaning. (Example: if you have multilingual IVR, and option for users to press 1 to enter "English" menu, you can define {"1":"English"}, so the reporting and analysis will be easier). When this option is defined additional variable is present in the scenario. If you set your capture action variable name to myVar, then you will get additional variable myVar_Meaning containing the mapped value for a collected DTMF.',
+ alias="mappedValues",
+ )
+ __properties: ClassVar[List[str]] = ["maxInputLength", "mappedValues"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsDtmfOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsDtmfOptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "maxInputLength": obj.get("maxInputLength"),
+ "mappedValues": obj.get("mappedValues"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_dtmf_send_request.py b/infobip_api_client/models/calls_dtmf_send_request.py
index 4cc2111..2277ddf 100644
--- a/infobip_api_client/models/calls_dtmf_send_request.py
+++ b/infobip_api_client/models/calls_dtmf_send_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dtmf_termination.py b/infobip_api_client/models/calls_dtmf_termination.py
index db15d83..b3bec08 100644
--- a/infobip_api_client/models/calls_dtmf_termination.py
+++ b/infobip_api_client/models/calls_dtmf_termination.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_dtmf_type.py b/infobip_api_client/models/calls_dtmf_type.py
index cce7590..64e15bd 100644
--- a/infobip_api_client/models/calls_dtmf_type.py
+++ b/infobip_api_client/models/calls_dtmf_type.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_error_code.py b/infobip_api_client/models/calls_error_code.py
index c69ee1f..fb401ad 100644
--- a/infobip_api_client/models/calls_error_code.py
+++ b/infobip_api_client/models/calls_error_code.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
@@ -21,13 +20,14 @@
class CallsErrorCode(str, Enum):
"""
- Error code to hang up with. There are rules for using error codes. `NORMAL_HANGUP` - Call needs to be established. `NO_ANSWER` - Call cannot be established. `BUSY` - Call cannot be established. `CANCELLED` - Call cannot be established and must be `INBOUND` call `REJECTED` - Call cannot be established and must be `OUTBOUND` call. `FORBIDDEN` - Call cannot be established. `DESTINATION_NOT_FOUND` - Call cannot be established and must be `OUTBOUND` `DESTINATION_UNAVAILABLE` - Call cannot be established and must be `OUTBOUND`. `INVALID_DESTINATION` - Call needs to be established and must be `OUTBOUND`. `SERVICE_UNAVAILABLE` - Call cannot to be established.
+ Error code to hang up with. There are rules for using error codes. `NORMAL_HANGUP` - Call needs to be established. `MACHINE_DETECTED` - Call needs to be established and must be `OUTBOUND`. `NO_ANSWER` - Call cannot be established. `BUSY` - Call cannot be established. `CANCELLED` - Call cannot be established. `REJECTED` - Call cannot be established. `FORBIDDEN` - Call cannot be established. `DESTINATION_NOT_FOUND` - Call cannot be established. `DESTINATION_UNAVAILABLE` - Call cannot be established. `INVALID_DESTINATION` - Call cannot be established. `SERVICE_UNAVAILABLE` - Call cannot be established.
"""
"""
allowed enum values
"""
NORMAL_HANGUP = "NORMAL_HANGUP"
+ MACHINE_DETECTED = "MACHINE_DETECTED"
NO_ANSWER = "NO_ANSWER"
BUSY = "BUSY"
CANCELLED = "CANCELLED"
diff --git a/infobip_api_client/models/calls_error_code_info.py b/infobip_api_client/models/calls_error_code_info.py
index 0b80fb4..5838592 100644
--- a/infobip_api_client/models/calls_error_code_info.py
+++ b/infobip_api_client/models/calls_error_code_info.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_extended_sip_trunk_status_response.py b/infobip_api_client/models/calls_extended_sip_trunk_status_response.py
index 1bf726e..c0e680e 100644
--- a/infobip_api_client/models/calls_extended_sip_trunk_status_response.py
+++ b/infobip_api_client/models/calls_extended_sip_trunk_status_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_fax_type.py b/infobip_api_client/models/calls_fax_type.py
index 15c706a..b1c1bb3 100644
--- a/infobip_api_client/models/calls_fax_type.py
+++ b/infobip_api_client/models/calls_fax_type.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_file.py b/infobip_api_client/models/calls_file.py
index d4e1451..774694c 100644
--- a/infobip_api_client/models/calls_file.py
+++ b/infobip_api_client/models/calls_file.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_file_format.py b/infobip_api_client/models/calls_file_format.py
index d681518..63bff96 100644
--- a/infobip_api_client/models/calls_file_format.py
+++ b/infobip_api_client/models/calls_file_format.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_file_page.py b/infobip_api_client/models/calls_file_page.py
index 7f18dcc..baf587b 100644
--- a/infobip_api_client/models/calls_file_page.py
+++ b/infobip_api_client/models/calls_file_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_file_play_content.py b/infobip_api_client/models/calls_file_play_content.py
index b30d2fb..346c217 100644
--- a/infobip_api_client/models/calls_file_play_content.py
+++ b/infobip_api_client/models/calls_file_play_content.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,6 +20,7 @@
from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from infobip_api_client.models.calls_play_content import CallsPlayContent
+from infobip_api_client.models.calls_play_content_type import CallsPlayContentType
from typing import Optional, Set
from typing_extensions import Self
diff --git a/infobip_api_client/models/calls_for_each.py b/infobip_api_client/models/calls_for_each.py
new file mode 100644
index 0000000..deaeed9
--- /dev/null
+++ b/infobip_api_client/models/calls_for_each.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsForEach(BaseModel):
+ """
+ For-each action is a control statement that executes a block of code for each of the values within the supplied list. The Supplied list of values can be static or dynamic (defined as user variable).
+ """ # noqa: E501
+
+ for_each: StrictStr = Field(
+ description="Variable name that will be used inside the loop to represent single value from supplied list of values.",
+ alias="for-each",
+ )
+ var_in: StrictStr = Field(
+ description="Variable name that will be used inside the loop to represent single value from supplied list of values.",
+ alias="in",
+ )
+ delimiter: Optional[StrictStr] = Field(
+ default=None,
+ description="Variable name that will be used inside the loop to represent single value from supplied list of values.",
+ )
+ do: List[Dict[str, Any]] = Field(description="Array of actions to execute.")
+ __properties: ClassVar[List[str]] = ["for-each", "in", "delimiter", "do"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsForEach from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsForEach from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "for-each": obj.get("for-each"),
+ "in": obj.get("in"),
+ "delimiter": obj.get("delimiter"),
+ "do": obj.get("do"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_freshworks_provider.py b/infobip_api_client/models/calls_freshworks_provider.py
index 64fb94f..07bf3ce 100644
--- a/infobip_api_client/models/calls_freshworks_provider.py
+++ b/infobip_api_client/models/calls_freshworks_provider.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,15 +19,13 @@
from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
-from infobip_api_client.models.calls_pegasus_provider import CallsPegasusProvider
-from infobip_api_client.models.calls_pegasus_provider_trunk_type import (
- CallsPegasusProviderTrunkType,
-)
+from infobip_api_client.models.calls_provider import CallsProvider
+from infobip_api_client.models.calls_provider_trunk_type import CallsProviderTrunkType
from typing import Optional, Set
from typing_extensions import Self
-class CallsFreshworksProvider(CallsPegasusProvider):
+class CallsFreshworksProvider(CallsProvider):
"""
CallsFreshworksProvider
""" # noqa: E501
diff --git a/infobip_api_client/models/calls_gender.py b/infobip_api_client/models/calls_gender.py
index 57c5427..588183a 100644
--- a/infobip_api_client/models/calls_gender.py
+++ b/infobip_api_client/models/calls_gender.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_genesys_cloud_provider.py b/infobip_api_client/models/calls_genesys_cloud_provider.py
new file mode 100644
index 0000000..1c4f0a8
--- /dev/null
+++ b/infobip_api_client/models/calls_genesys_cloud_provider.py
@@ -0,0 +1,115 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_genesys_cloud_region import CallsGenesysCloudRegion
+from infobip_api_client.models.calls_provider import CallsProvider
+from infobip_api_client.models.calls_provider_trunk_type import CallsProviderTrunkType
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsGenesysCloudProvider(CallsProvider):
+ """
+ CallsGenesysCloudProvider
+ """ # noqa: E501
+
+ region: CallsGenesysCloudRegion
+ outbound_termination_fqdn: Optional[StrictStr] = Field(
+ default=None,
+ description="Outbound termination FQDN.",
+ alias="outboundTerminationFQDN",
+ )
+ inbound_termination_identifier: Optional[StrictStr] = Field(
+ default=None,
+ description="Inbound termination identifier.",
+ alias="inboundTerminationIdentifier",
+ )
+ __properties: ClassVar[List[str]] = [
+ "type",
+ "region",
+ "outboundTerminationFQDN",
+ "inboundTerminationIdentifier",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsGenesysCloudProvider from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `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.
+ """
+ excluded_fields: Set[str] = set(
+ [
+ "outbound_termination_fqdn",
+ "inbound_termination_identifier",
+ ]
+ )
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsGenesysCloudProvider from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "type": obj.get("type"),
+ "region": obj.get("region"),
+ "outboundTerminationFQDN": obj.get("outboundTerminationFQDN"),
+ "inboundTerminationIdentifier": obj.get("inboundTerminationIdentifier"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_genesys_cloud_region.py b/infobip_api_client/models/calls_genesys_cloud_region.py
new file mode 100644
index 0000000..ebdd8c1
--- /dev/null
+++ b/infobip_api_client/models/calls_genesys_cloud_region.py
@@ -0,0 +1,48 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallsGenesysCloudRegion(str, Enum):
+ """
+ Genesys cloud region.
+ """
+
+ """
+ allowed enum values
+ """
+ NA_US_EAST_1 = "NA_US_EAST_1"
+ NA_US_EAST_2 = "NA_US_EAST_2"
+ NA_US_WEST_2 = "NA_US_WEST_2"
+ CA_CENTRAL_1 = "CA_CENTRAL_1"
+ SA_EAST_1 = "SA_EAST_1"
+ EU_CENTRAL_1 = "EU_CENTRAL_1"
+ EU_CENTRAL_2 = "EU_CENTRAL_2"
+ EU_WEST_1 = "EU_WEST_1"
+ EU_WEST_2 = "EU_WEST_2"
+ ME_CENTRAL_1 = "ME_CENTRAL_1"
+ AP_SOUTH_1 = "AP_SOUTH_1"
+ AP_NORTHEAST_3 = "AP_NORTHEAST_3"
+ AP_NORTHEAST_2 = "AP_NORTHEAST_2"
+ AP_SOUTHEAST_2 = "AP_SOUTHEAST_2"
+ AP_NORTHEAST_1 = "AP_NORTHEAST_1"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallsGenesysCloudRegion from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_get_voices_response.py b/infobip_api_client/models/calls_get_voices_response.py
index bb0886d..98e4a14 100644
--- a/infobip_api_client/models/calls_get_voices_response.py
+++ b/infobip_api_client/models/calls_get_voices_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_go_to.py b/infobip_api_client/models/calls_go_to.py
new file mode 100644
index 0000000..ada6816
--- /dev/null
+++ b/infobip_api_client/models/calls_go_to.py
@@ -0,0 +1,97 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_go_to_options import CallsGoToOptions
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsGoTo(BaseModel):
+ """
+ Go-To action is used to go back to some specified action that was already executed in the scenario and continue the execution from that point.
+ """ # noqa: E501
+
+ go_to: StrictInt = Field(
+ description="The actionId of an action to which to jump", alias="goTo"
+ )
+ options: Optional[CallsGoToOptions] = None
+ __properties: ClassVar[List[str]] = ["goTo", "options"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsGoTo from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of options
+ if self.options:
+ _dict["options"] = self.options.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsGoTo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "goTo": obj.get("goTo"),
+ "options": CallsGoToOptions.from_dict(obj["options"])
+ if obj.get("options") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_go_to_options.py b/infobip_api_client/models/calls_go_to_options.py
new file mode 100644
index 0000000..6d6c56c
--- /dev/null
+++ b/infobip_api_client/models/calls_go_to_options.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsGoToOptions(BaseModel):
+ """
+ CallsGoToOptions
+ """ # noqa: E501
+
+ go_to_limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = Field(
+ default=None,
+ description="Maximum number of times goto can jump to specified action. Valid values are from 1 to 100.",
+ alias="goToLimit",
+ )
+ count_variable: Optional[StrictStr] = Field(
+ default=None,
+ description="Name of the variable which counts passes through goto action",
+ alias="countVariable",
+ )
+ __properties: ClassVar[List[str]] = ["goToLimit", "countVariable"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsGoToOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsGoToOptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "goToLimit": obj.get("goToLimit"),
+ "countVariable": obj.get("countVariable"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_hangup.py b/infobip_api_client/models/calls_hangup.py
new file mode 100644
index 0000000..6bd952e
--- /dev/null
+++ b/infobip_api_client/models/calls_hangup.py
@@ -0,0 +1,34 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallsHangup(str, Enum):
+ """
+ Hangup action marks the end of the IVR flow execution, leading to the call actually being hung up.
+ """
+
+ """
+ allowed enum values
+ """
+ HANGUP = "hangup"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallsHangup from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_hangup_request.py b/infobip_api_client/models/calls_hangup_request.py
index 8dbc43f..c60b8b5 100644
--- a/infobip_api_client/models/calls_hangup_request.py
+++ b/infobip_api_client/models/calls_hangup_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_url_security_config_type.py b/infobip_api_client/models/calls_hangup_source.py
similarity index 76%
rename from infobip_api_client/models/calls_url_security_config_type.py
rename to infobip_api_client/models/calls_hangup_source.py
index 6ae48ff..e05c1d8 100644
--- a/infobip_api_client/models/calls_url_security_config_type.py
+++ b/infobip_api_client/models/calls_hangup_source.py
@@ -12,25 +12,25 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
-class CallsUrlSecurityConfigType(str, Enum):
+class CallsHangupSource(str, Enum):
"""
- CallsUrlSecurityConfigType
+ Hangup source.
"""
"""
allowed enum values
"""
- BASIC = "BASIC"
- HMAC = "HMAC"
+ ENDPOINT = "ENDPOINT"
+ API = "API"
+ PLATFORM = "PLATFORM"
@classmethod
def from_json(cls, json_str: str) -> Self:
- """Create an instance of CallsUrlSecurityConfigType from a JSON string"""
+ """Create an instance of CallsHangupSource from a JSON string"""
return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_http_method.py b/infobip_api_client/models/calls_http_method.py
new file mode 100644
index 0000000..0efbe39
--- /dev/null
+++ b/infobip_api_client/models/calls_http_method.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallsHttpMethod(str, Enum):
+ """
+ Http method
+ """
+
+ """
+ allowed enum values
+ """
+ GET = "GET"
+ POST = "POST"
+ PUT = "PUT"
+ DELETE = "DELETE"
+ PATCH = "PATCH"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallsHttpMethod from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_if_then_else.py b/infobip_api_client/models/calls_if_then_else.py
new file mode 100644
index 0000000..6f7ca02
--- /dev/null
+++ b/infobip_api_client/models/calls_if_then_else.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsIfThenElse(BaseModel):
+ """
+ If-Then-Else action provides simple branching based on a condition. If the condition evaluates to true, the then block is executed, otherwise the else block is executed. Only one of the blocks is required to be non-empty.
+ """ # noqa: E501
+
+ var_if: StrictStr = Field(description="The expression to evaluate", alias="if")
+ then: Optional[List[Dict[str, Any]]] = Field(
+ default=None,
+ description="The actions to execute if condition is evaluated to true.",
+ )
+ var_else: Optional[List[Dict[str, Any]]] = Field(
+ default=None,
+ description="The actions to execute if condition is evaluated to false.",
+ alias="else",
+ )
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = ["if", "then", "else", "actionId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsIfThenElse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsIfThenElse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "if": obj.get("if"),
+ "then": obj.get("then"),
+ "else": obj.get("else"),
+ "actionId": obj.get("actionId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_delivery_day.py b/infobip_api_client/models/calls_ip_core_general_status.py
similarity index 66%
rename from infobip_api_client/models/calls_delivery_day.py
rename to infobip_api_client/models/calls_ip_core_general_status.py
index 7b0c077..1163f78 100644
--- a/infobip_api_client/models/calls_delivery_day.py
+++ b/infobip_api_client/models/calls_ip_core_general_status.py
@@ -12,30 +12,28 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
-class CallsDeliveryDay(str, Enum):
+class CallsIpCoreGeneralStatus(str, Enum):
"""
- CallsDeliveryDay
+ CallsIpCoreGeneralStatus
"""
"""
allowed enum values
"""
- MONDAY = "MONDAY"
- TUESDAY = "TUESDAY"
- WEDNESDAY = "WEDNESDAY"
- THURSDAY = "THURSDAY"
- FRIDAY = "FRIDAY"
- SATURDAY = "SATURDAY"
- SUNDAY = "SUNDAY"
+ ACCEPTED = "ACCEPTED"
+ PENDING = "PENDING"
+ UNDELIVERABLE = "UNDELIVERABLE"
+ DELIVERED = "DELIVERED"
+ EXPIRED = "EXPIRED"
+ REJECTED = "REJECTED"
@classmethod
def from_json(cls, json_str: str) -> Self:
- """Create an instance of CallsDeliveryDay from a JSON string"""
+ """Create an instance of CallsIpCoreGeneralStatus from a JSON string"""
return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_ivr_data.py b/infobip_api_client/models/calls_ivr_data.py
new file mode 100644
index 0000000..1ced93c
--- /dev/null
+++ b/infobip_api_client/models/calls_ivr_data.py
@@ -0,0 +1,126 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsIvrData(BaseModel):
+ """
+ Fields representing details about IVR, if outbound IVR is being used. If the call was not IVR, the field will be null.
+ """ # noqa: E501
+
+ scenario_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the IVR scenario.",
+ alias="scenarioId",
+ )
+ scenario_name: Optional[StrictStr] = Field(
+ default=None, description="Name of IVR scenario.", alias="scenarioName"
+ )
+ collected_dtmfs: Optional[StrictStr] = Field(
+ default=None,
+ description="JSON object showing the result of every CollectAction in IVR scenario in the form of key/value pairs, where the key is CollectAction variable and pair is collected DTMF.",
+ alias="collectedDtmfs",
+ )
+ collected_mapped_dtmfs: Optional[StrictStr] = Field(
+ default=None,
+ description="JSON object showing the result of every CollectAction in IVR scenario with the mapped, meaningful, values you defined in CollectAction `mappedValues` option.",
+ alias="collectedMappedDtmfs",
+ )
+ spoken_input: Optional[StrictStr] = Field(
+ default=None,
+ description="JSON object showing the result of every CaptureSpeech action with full text spoken by the user.",
+ alias="spokenInput",
+ )
+ matched_spoken_input: Optional[StrictStr] = Field(
+ default=None,
+ description="JSON object showing the result of every CaptureSpeech action with only the key phrases that matched user spoken input.",
+ alias="matchedSpokenInput",
+ )
+ __properties: ClassVar[List[str]] = [
+ "scenarioId",
+ "scenarioName",
+ "collectedDtmfs",
+ "collectedMappedDtmfs",
+ "spokenInput",
+ "matchedSpokenInput",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsIvrData from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsIvrData from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "scenarioId": obj.get("scenarioId"),
+ "scenarioName": obj.get("scenarioName"),
+ "collectedDtmfs": obj.get("collectedDtmfs"),
+ "collectedMappedDtmfs": obj.get("collectedMappedDtmfs"),
+ "spokenInput": obj.get("spokenInput"),
+ "matchedSpokenInput": obj.get("matchedSpokenInput"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_ivr_message.py b/infobip_api_client/models/calls_ivr_message.py
new file mode 100644
index 0000000..60746af
--- /dev/null
+++ b/infobip_api_client/models/calls_ivr_message.py
@@ -0,0 +1,221 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_destination import CallsDestination
+from infobip_api_client.models.calls_retry import CallsRetry
+from infobip_api_client.models.calls_sending_speed import CallsSendingSpeed
+from infobip_api_client.models.delivery_time_window import DeliveryTimeWindow
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsIvrMessage(BaseModel):
+ """
+ Array of IVR messages to be sent, one object per every message.
+ """ # noqa: E501
+
+ scenario_id: StrictStr = Field(description="Scenario key.", alias="scenarioId")
+ var_from: Optional[StrictStr] = Field(
+ default=None,
+ description="Numeric sender ID length should be between 3 and 14 characters.",
+ alias="from",
+ )
+ destinations: List[CallsDestination] = Field(
+ description="Array of message destination addresses. Maximum number of destination addresses is 20k."
+ )
+ notify_url: Optional[StrictStr] = Field(
+ default=None,
+ description="The URL on your callback server on which the Delivery report will be sent.",
+ alias="notifyUrl",
+ )
+ notify_content_type: Optional[StrictStr] = Field(
+ default=None,
+ description="Preferred Delivery report content type. Can be `application/json` or `application/xml`.",
+ alias="notifyContentType",
+ )
+ notify_content_version: Optional[StrictInt] = Field(
+ default=None,
+ description="Specifies the version of the report model to be sent. Can be `1` ([deprecated version 1](#programmable-communications/voice/receive-voice-delivery-reports-deprecated)) or `2` ([current version 2](#programmable-communications/voice/receive-voice-delivery-reports)). The default is version 2.",
+ alias="notifyContentVersion",
+ )
+ callback_data: Optional[StrictStr] = Field(
+ default=None,
+ description="Additional client's data that will be sent on the notifyUrl. The maximum value is 200 characters.",
+ alias="callbackData",
+ )
+ validity_period: Optional[StrictInt] = Field(
+ default=None,
+ description="The message validity period shown in minutes. When the period expires, it will not be allowed for the message to be sent. A validity period longer than 48h is not supported (in this case, it will be automatically set to 48h).",
+ alias="validityPeriod",
+ )
+ send_at: Optional[datetime] = Field(
+ default=None,
+ description="Used for scheduled Voice messages (message not to be sent immediately, but at scheduled time).",
+ alias="sendAt",
+ )
+ retry: Optional[CallsRetry] = None
+ ring_timeout: Optional[StrictInt] = Field(
+ default=None,
+ description="Ringing duration, unless there are no operator limitations. Default value is `45`. Note: There are no limitations on the Voice platform regarding this value, however, most of the operators have their own ring timeout limitations and it is advisable to keep the ringTimeout value up to `45` seconds.",
+ alias="ringTimeout",
+ )
+ sending_speed: Optional[CallsSendingSpeed] = Field(
+ default=None, alias="sendingSpeed"
+ )
+ parameters: Optional[Dict[str, StrictStr]] = Field(
+ default=None,
+ description="The parameters that should be passed to the scenario on execution.",
+ )
+ pause: Optional[StrictInt] = Field(
+ default=None,
+ description="Indicating period of time in seconds between end user answering the call and message starting to be played. Minimal value is `0` and maximum value is `10` seconds. Default value is `0`.",
+ )
+ record: Optional[StrictBool] = Field(
+ default=None,
+ description="[Early access: Contact your account manager to enable the usage] Record the call and expose it to client as URL inside the delivery report. Can be `true` or `false`.",
+ )
+ delivery_time_window: Optional[DeliveryTimeWindow] = Field(
+ default=None, alias="deliveryTimeWindow"
+ )
+ call_timeout: Optional[StrictInt] = Field(
+ default=None,
+ description="Maximum possible duration of the call to be set, shown in seconds.",
+ alias="callTimeout",
+ )
+ __properties: ClassVar[List[str]] = [
+ "scenarioId",
+ "from",
+ "destinations",
+ "notifyUrl",
+ "notifyContentType",
+ "notifyContentVersion",
+ "callbackData",
+ "validityPeriod",
+ "sendAt",
+ "retry",
+ "ringTimeout",
+ "sendingSpeed",
+ "parameters",
+ "pause",
+ "record",
+ "deliveryTimeWindow",
+ "callTimeout",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsIvrMessage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in destinations (list)
+ _items = []
+ if self.destinations:
+ for _item in self.destinations:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["destinations"] = _items
+ # override the default output from pydantic by calling `to_dict()` of retry
+ if self.retry:
+ _dict["retry"] = self.retry.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of sending_speed
+ if self.sending_speed:
+ _dict["sendingSpeed"] = self.sending_speed.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of delivery_time_window
+ if self.delivery_time_window:
+ _dict["deliveryTimeWindow"] = self.delivery_time_window.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsIvrMessage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "scenarioId": obj.get("scenarioId"),
+ "from": obj.get("from"),
+ "destinations": [
+ CallsDestination.from_dict(_item) for _item in obj["destinations"]
+ ]
+ if obj.get("destinations") is not None
+ else None,
+ "notifyUrl": obj.get("notifyUrl"),
+ "notifyContentType": obj.get("notifyContentType"),
+ "notifyContentVersion": obj.get("notifyContentVersion"),
+ "callbackData": obj.get("callbackData"),
+ "validityPeriod": obj.get("validityPeriod"),
+ "sendAt": obj.get("sendAt"),
+ "retry": CallsRetry.from_dict(obj["retry"])
+ if obj.get("retry") is not None
+ else None,
+ "ringTimeout": obj.get("ringTimeout"),
+ "sendingSpeed": CallsSendingSpeed.from_dict(obj["sendingSpeed"])
+ if obj.get("sendingSpeed") is not None
+ else None,
+ "parameters": obj.get("parameters"),
+ "pause": obj.get("pause"),
+ "record": obj.get("record"),
+ "deliveryTimeWindow": DeliveryTimeWindow.from_dict(
+ obj["deliveryTimeWindow"]
+ )
+ if obj.get("deliveryTimeWindow") is not None
+ else None,
+ "callTimeout": obj.get("callTimeout"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_language.py b/infobip_api_client/models/calls_language.py
index 2285081..2de0dc2 100644
--- a/infobip_api_client/models/calls_language.py
+++ b/infobip_api_client/models/calls_language.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
@@ -85,6 +84,8 @@ class CallsLanguage(str, Enum):
UK = "uk"
VI = "vi"
WLS = "wls"
+ AR_MINUS_MA = "ar-ma"
+ UR_MINUS_PK = "ur-pk"
@classmethod
def from_json(cls, json_str: str) -> Self:
diff --git a/infobip_api_client/models/calls_launch_scenario_request.py b/infobip_api_client/models/calls_launch_scenario_request.py
new file mode 100644
index 0000000..fc86797
--- /dev/null
+++ b/infobip_api_client/models/calls_launch_scenario_request.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_ivr_message import CallsIvrMessage
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsLaunchScenarioRequest(BaseModel):
+ """
+ CallsLaunchScenarioRequest
+ """ # noqa: E501
+
+ bulk_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID which uniquely identifies the request.",
+ alias="bulkId",
+ )
+ messages: List[CallsIvrMessage] = Field(
+ description="Array of IVR messages to be sent, one object per every message."
+ )
+ __properties: ClassVar[List[str]] = ["bulkId", "messages"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsLaunchScenarioRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in messages (list)
+ _items = []
+ if self.messages:
+ for _item in self.messages:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["messages"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsLaunchScenarioRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "bulkId": obj.get("bulkId"),
+ "messages": [
+ CallsIvrMessage.from_dict(_item) for _item in obj["messages"]
+ ]
+ if obj.get("messages") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_logs_report.py b/infobip_api_client/models/calls_logs_report.py
new file mode 100644
index 0000000..be9d1c7
--- /dev/null
+++ b/infobip_api_client/models/calls_logs_report.py
@@ -0,0 +1,171 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_price import CallsPrice
+from infobip_api_client.models.calls_single_message_status import (
+ CallsSingleMessageStatus,
+)
+from infobip_api_client.models.calls_voice_error import CallsVoiceError
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsLogsReport(BaseModel):
+ """
+ Array of voice message logs, one object per each message.
+ """ # noqa: E501
+
+ bulk_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the bulk of messages.",
+ alias="bulkId",
+ )
+ message_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the message sent.",
+ alias="messageId",
+ )
+ to: Optional[StrictStr] = Field(
+ default=None, description="Destination address of the voice message."
+ )
+ var_from: Optional[StrictStr] = Field(
+ default=None,
+ description="The sender ID which can be alphanumeric or numeric.",
+ alias="from",
+ )
+ text: Optional[StrictStr] = Field(
+ default=None, description="Content of the voice message that was sent."
+ )
+ sent_at: Optional[datetime] = Field(
+ default=None,
+ description="Date and time when the voice message was initiated. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.",
+ alias="sentAt",
+ )
+ done_at: Optional[datetime] = Field(
+ default=None,
+ description="Date and time when the Infobip services finished processing the voice message (i.e. delivered to the destination, delivered to the destination network, etc.).",
+ alias="doneAt",
+ )
+ duration: Optional[StrictInt] = Field(
+ default=None, description="Voice message duration in seconds."
+ )
+ mcc_mnc: Optional[StrictStr] = Field(
+ default=None, description="Mobile country and network codes.", alias="mccMnc"
+ )
+ price: Optional[CallsPrice] = None
+ status: Optional[CallsSingleMessageStatus] = None
+ error: Optional[CallsVoiceError] = None
+ __properties: ClassVar[List[str]] = [
+ "bulkId",
+ "messageId",
+ "to",
+ "from",
+ "text",
+ "sentAt",
+ "doneAt",
+ "duration",
+ "mccMnc",
+ "price",
+ "status",
+ "error",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsLogsReport from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of price
+ if self.price:
+ _dict["price"] = self.price.to_dict()
+ # 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 error
+ if self.error:
+ _dict["error"] = self.error.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsLogsReport from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "bulkId": obj.get("bulkId"),
+ "messageId": obj.get("messageId"),
+ "to": obj.get("to"),
+ "from": obj.get("from"),
+ "text": obj.get("text"),
+ "sentAt": obj.get("sentAt"),
+ "doneAt": obj.get("doneAt"),
+ "duration": obj.get("duration"),
+ "mccMnc": obj.get("mccMnc"),
+ "price": CallsPrice.from_dict(obj["price"])
+ if obj.get("price") is not None
+ else None,
+ "status": CallsSingleMessageStatus.from_dict(obj["status"])
+ if obj.get("status") is not None
+ else None,
+ "error": CallsVoiceError.from_dict(obj["error"])
+ if obj.get("error") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_logs_response.py b/infobip_api_client/models/calls_logs_response.py
new file mode 100644
index 0000000..346177e
--- /dev/null
+++ b/infobip_api_client/models/calls_logs_response.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_logs_report import CallsLogsReport
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsLogsResponse(BaseModel):
+ """
+ CallsLogsResponse
+ """ # noqa: E501
+
+ results: Optional[List[CallsLogsReport]] = Field(
+ default=None,
+ description="Array of voice message logs, one object per each message.",
+ )
+ __properties: ClassVar[List[str]] = ["results"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsLogsResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # 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: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsLogsResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "results": [
+ CallsLogsReport.from_dict(_item) for _item in obj["results"]
+ ]
+ if obj.get("results") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_machine_detection.py b/infobip_api_client/models/calls_machine_detection.py
new file mode 100644
index 0000000..4c0ec65
--- /dev/null
+++ b/infobip_api_client/models/calls_machine_detection.py
@@ -0,0 +1,34 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallsMachineDetection(str, Enum):
+ """
+ Machine Detection action detects answering machines at the beginning of the call. This action sets `machineAnswered` variable upon completion to `true` or `false`. Machine Detection introduces a delay of approximately 4s. This is the minimum time needed for machine detection. Machine Detection action has to be followed by a condition action that uses the value of `machineAnswered` for branching into the 'human answered' block and the 'answering machine answered' block. The 'answering machine' block can have a Say/Play/PlayFromRecording action or a Hangup action. If answering machine is detected, and a Say/Play/Play from Recording action is up next - the voice message will start playing into the voice mail only after the answering machine is finished with its greeting.
+ """
+
+ """
+ allowed enum values
+ """
+ MACHINEDETECTION = "machineDetection"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallsMachineDetection from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_machine_detection_properties.py b/infobip_api_client/models/calls_machine_detection_properties.py
index c5e81c9..ac27e63 100644
--- a/infobip_api_client/models/calls_machine_detection_properties.py
+++ b/infobip_api_client/models/calls_machine_detection_properties.py
@@ -12,13 +12,12 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.calls_detection_result import CallsDetectionResult
from typing import Optional, Set
@@ -33,7 +32,10 @@ class CallsMachineDetectionProperties(BaseModel):
detection_result: Optional[CallsDetectionResult] = Field(
default=None, alias="detectionResult"
)
- __properties: ClassVar[List[str]] = ["detectionResult"]
+ custom_data: Optional[Dict[str, StrictStr]] = Field(
+ default=None, description="Custom data.", alias="customData"
+ )
+ __properties: ClassVar[List[str]] = ["detectionResult", "customData"]
model_config = ConfigDict(
populate_by_name=True,
@@ -83,5 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if not isinstance(obj, dict):
return cls.model_validate(obj)
- _obj = cls.model_validate({"detectionResult": obj.get("detectionResult")})
+ _obj = cls.model_validate(
+ {
+ "detectionResult": obj.get("detectionResult"),
+ "customData": obj.get("customData"),
+ }
+ )
return _obj
diff --git a/infobip_api_client/models/calls_machine_detection_request.py b/infobip_api_client/models/calls_machine_detection_request.py
index a138a36..0963202 100644
--- a/infobip_api_client/models/calls_machine_detection_request.py
+++ b/infobip_api_client/models/calls_machine_detection_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_media_properties.py b/infobip_api_client/models/calls_media_properties.py
index e7c0e41..d453bdb 100644
--- a/infobip_api_client/models/calls_media_properties.py
+++ b/infobip_api_client/models/calls_media_properties.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_media_stream.py b/infobip_api_client/models/calls_media_stream.py
index c1786c2..91a32ff 100644
--- a/infobip_api_client/models/calls_media_stream.py
+++ b/infobip_api_client/models/calls_media_stream.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_media_stream_audio_properties.py b/infobip_api_client/models/calls_media_stream_audio_properties.py
index 3b12225..29a5f11 100644
--- a/infobip_api_client/models/calls_media_stream_audio_properties.py
+++ b/infobip_api_client/models/calls_media_stream_audio_properties.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_media_stream_config_page.py b/infobip_api_client/models/calls_media_stream_config_page.py
index 8d26268..d06cebb 100644
--- a/infobip_api_client/models/calls_media_stream_config_page.py
+++ b/infobip_api_client/models/calls_media_stream_config_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_media_stream_config_request.py b/infobip_api_client/models/calls_media_stream_config_request.py
index 5b08dfc..a0b9a03 100644
--- a/infobip_api_client/models/calls_media_stream_config_request.py
+++ b/infobip_api_client/models/calls_media_stream_config_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_media_stream_config_response.py b/infobip_api_client/models/calls_media_stream_config_response.py
index 73fd6c2..468ae24 100644
--- a/infobip_api_client/models/calls_media_stream_config_response.py
+++ b/infobip_api_client/models/calls_media_stream_config_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_multi_body.py b/infobip_api_client/models/calls_multi_body.py
index ded2419..f05e458 100644
--- a/infobip_api_client/models/calls_multi_body.py
+++ b/infobip_api_client/models/calls_multi_body.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_multi_channel.py b/infobip_api_client/models/calls_multi_channel.py
new file mode 100644
index 0000000..1f57c36
--- /dev/null
+++ b/infobip_api_client/models/calls_multi_channel.py
@@ -0,0 +1,83 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictBool
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsMultiChannel(BaseModel):
+ """
+ Multi-channel configuration. If enabled, audio of each participant will be in a separate channel in the composed file. Otherwise, audio of all participants will be mixed into a single channel in the composed file.
+ """ # noqa: E501
+
+ enabled: StrictBool
+ __properties: ClassVar[List[str]] = ["enabled"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsMultiChannel from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsMultiChannel from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"enabled": obj.get("enabled")})
+ return _obj
diff --git a/infobip_api_client/models/calls_multi_message.py b/infobip_api_client/models/calls_multi_message.py
index 266f93b..0e696c7 100644
--- a/infobip_api_client/models/calls_multi_message.py
+++ b/infobip_api_client/models/calls_multi_message.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_number_presentation_format.py b/infobip_api_client/models/calls_number_presentation_format.py
index e01e908..73a9c13 100644
--- a/infobip_api_client/models/calls_number_presentation_format.py
+++ b/infobip_api_client/models/calls_number_presentation_format.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_numbers.py b/infobip_api_client/models/calls_numbers.py
new file mode 100644
index 0000000..13ff339
--- /dev/null
+++ b/infobip_api_client/models/calls_numbers.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsNumbers(BaseModel):
+ """
+ CallsNumbers
+ """ # noqa: E501
+
+ number: Optional[StrictStr] = Field(
+ default=None,
+ description="must be a valid E164 MSISDN; the parameter can be constructed using variables",
+ )
+ numbers: Optional[StrictStr] = Field(
+ default=None,
+ description="must be a comma-separated list of valid E164 MSISDN numbers; the parameter can be constructed using variables",
+ )
+ __properties: ClassVar[List[str]] = ["number", "numbers"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsNumbers from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsNumbers from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"number": obj.get("number"), "numbers": obj.get("numbers")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_on_demand_composition.py b/infobip_api_client/models/calls_on_demand_composition.py
index 5ca5508..b7c6ba4 100644
--- a/infobip_api_client/models/calls_on_demand_composition.py
+++ b/infobip_api_client/models/calls_on_demand_composition.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,6 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_multi_channel import CallsMultiChannel
from typing import Optional, Set
from typing_extensions import Self
@@ -31,10 +31,13 @@ class CallsOnDemandComposition(BaseModel):
delete_call_recordings: Optional[StrictBool] = Field(
default=True,
- description="Indicates whether to delete call recordings after composition. If set to 'true' then call recordings will be deleted after composition. Otherwise, call recordings will be available, alongside with composed file.",
+ description="Indicates whether to delete individual files for the call recordings after composition. If set to 'true' then files from the call recordings will be deleted after composition. Otherwise, files from the call recordings will be available, alongside with composed file.",
alias="deleteCallRecordings",
)
- __properties: ClassVar[List[str]] = ["deleteCallRecordings"]
+ multi_channel: Optional[CallsMultiChannel] = Field(
+ default=None, alias="multiChannel"
+ )
+ __properties: ClassVar[List[str]] = ["deleteCallRecordings", "multiChannel"]
model_config = ConfigDict(
populate_by_name=True,
@@ -73,6 +76,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of multi_channel
+ if self.multi_channel:
+ _dict["multiChannel"] = self.multi_channel.to_dict()
return _dict
@classmethod
@@ -88,7 +94,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"deleteCallRecordings": obj.get("deleteCallRecordings")
if obj.get("deleteCallRecordings") is not None
- else True
+ else True,
+ "multiChannel": CallsMultiChannel.from_dict(obj["multiChannel"])
+ if obj.get("multiChannel") is not None
+ else None,
}
)
return _obj
diff --git a/infobip_api_client/models/calls_participant.py b/infobip_api_client/models/calls_participant.py
index 871abed..a608261 100644
--- a/infobip_api_client/models/calls_participant.py
+++ b/infobip_api_client/models/calls_participant.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_participant_session.py b/infobip_api_client/models/calls_participant_session.py
index 25970d1..914f266 100644
--- a/infobip_api_client/models/calls_participant_session.py
+++ b/infobip_api_client/models/calls_participant_session.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_participant_state.py b/infobip_api_client/models/calls_participant_state.py
index 643164f..b0bb112 100644
--- a/infobip_api_client/models/calls_participant_state.py
+++ b/infobip_api_client/models/calls_participant_state.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_pause.py b/infobip_api_client/models/calls_pause.py
new file mode 100644
index 0000000..9e030df
--- /dev/null
+++ b/infobip_api_client/models/calls_pause.py
@@ -0,0 +1,96 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsPause(BaseModel):
+ """
+ Pause action pauses execution of the IVR scenario for the provided duration.
+ """ # noqa: E501
+
+ pause: Union[
+ Annotated[float, Field(le=5.0, strict=True, ge=0.0)],
+ Annotated[int, Field(le=5, strict=True, ge=0)],
+ ] = Field(
+ description="the amount to wait in seconds, from 0 (exclusive) to 5 (inclusive)"
+ )
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = ["pause", "actionId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsPause from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsPause from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"pause": obj.get("pause"), "actionId": obj.get("actionId")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_phone_endpoint.py b/infobip_api_client/models/calls_phone_endpoint.py
index e042d28..e3b4e76 100644
--- a/infobip_api_client/models/calls_phone_endpoint.py
+++ b/infobip_api_client/models/calls_phone_endpoint.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_play.py b/infobip_api_client/models/calls_play.py
new file mode 100644
index 0000000..d380eba
--- /dev/null
+++ b/infobip_api_client/models/calls_play.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsPlay(BaseModel):
+ """
+ Play action performs playback of audio provided by the client’s URL. Supported formats of the provided file are aac, aiff, m4a, mp2, mp3, mp4 (audio only), ogg, wav and wma. Our platform needs to have permission to make GET and HEAD HTTP requests on the provided URL. Standard http ports (like 80, 8080, etc.) are advised.
+ """ # noqa: E501
+
+ play_from_url: StrictStr = Field(description="Audio file URL.", alias="playFromUrl")
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = ["playFromUrl", "actionId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsPlay from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsPlay from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"playFromUrl": obj.get("playFromUrl"), "actionId": obj.get("actionId")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_play_content.py b/infobip_api_client/models/calls_play_content.py
index 6a68f1a..315745d 100644
--- a/infobip_api_client/models/calls_play_content.py
+++ b/infobip_api_client/models/calls_play_content.py
@@ -12,15 +12,15 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from importlib import import_module
-from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional, Union
+from infobip_api_client.models.calls_play_content_type import CallsPlayContentType
from typing import Optional, Set
from typing_extensions import Self
@@ -37,24 +37,12 @@
class CallsPlayContent(BaseModel):
"""
- CallsPlayContent
+ Audio content to play. It can either be previously uploaded file or a file from a URL.
""" # noqa: E501
- type: Optional[StrictStr] = None
+ type: Optional[CallsPlayContentType] = None
__properties: ClassVar[List[str]] = ["type"]
- @field_validator("type")
- def type_validate_enum(cls, value):
- """Validates the enum"""
- if value is None:
- return value
-
- if value not in set(["FILE", "URL", "RECORDING", "TEXT"]):
- raise ValueError(
- "must be one of enum values ('FILE', 'URL', 'RECORDING', 'TEXT')"
- )
- return value
-
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
diff --git a/infobip_api_client/models/calls_play_content_type.py b/infobip_api_client/models/calls_play_content_type.py
new file mode 100644
index 0000000..a0378af
--- /dev/null
+++ b/infobip_api_client/models/calls_play_content_type.py
@@ -0,0 +1,37 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallsPlayContentType(str, Enum):
+ """
+ CallsPlayContentType
+ """
+
+ """
+ allowed enum values
+ """
+ FILE = "FILE"
+ URL = "URL"
+ RECORDING = "RECORDING"
+ TEXT = "TEXT"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallsPlayContentType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_play_from_recording.py b/infobip_api_client/models/calls_play_from_recording.py
new file mode 100644
index 0000000..521f46f
--- /dev/null
+++ b/infobip_api_client/models/calls_play_from_recording.py
@@ -0,0 +1,96 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsPlayFromRecording(BaseModel):
+ """
+ Play from Recording Action plays audio recorded from the current or some other call.
+ """ # noqa: E501
+
+ play_from_recording: StrictStr = Field(
+ description="Can be null (play last recorded audio from the current call), number (play the recording passed index) or text (play recording with identifier - current or previous call)",
+ alias="playFromRecording",
+ )
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = ["playFromRecording", "actionId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsPlayFromRecording from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsPlayFromRecording from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "playFromRecording": obj.get("playFromRecording"),
+ "actionId": obj.get("actionId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_play_request.py b/infobip_api_client/models/calls_play_request.py
index 8de7351..96feb21 100644
--- a/infobip_api_client/models/calls_play_request.py
+++ b/infobip_api_client/models/calls_play_request.py
@@ -12,22 +12,22 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.calls_play_content import CallsPlayContent
+from infobip_api_client.models.calls_termination import CallsTermination
from typing import Optional, Set
from typing_extensions import Self
class CallsPlayRequest(BaseModel):
"""
- CallsPlayRequest
+ Call play request.
""" # noqa: E501
loop_count: Optional[StrictInt] = Field(
@@ -35,8 +35,29 @@ class CallsPlayRequest(BaseModel):
description="Number of times the file will be played.",
alias="loopCount",
)
+ timeout: Optional[StrictInt] = Field(
+ default=None,
+ description="The duration, in milliseconds, of the file to be played. If timeout is not defined, the file will be played until it ends.",
+ )
+ offset: Optional[StrictInt] = Field(
+ default=None,
+ description="The starting point, in milliseconds, from which the file will be played. If offset is not defined, the file will be played from its beginning.",
+ )
content: CallsPlayContent
- __properties: ClassVar[List[str]] = ["loopCount", "content"]
+ stop_on: Optional[CallsTermination] = Field(default=None, alias="stopOn")
+ custom_data: Optional[Dict[str, StrictStr]] = Field(
+ default=None,
+ description="Optional parameter to update a call's custom data.",
+ alias="customData",
+ )
+ __properties: ClassVar[List[str]] = [
+ "loopCount",
+ "timeout",
+ "offset",
+ "content",
+ "stopOn",
+ "customData",
+ ]
model_config = ConfigDict(
populate_by_name=True,
@@ -78,6 +99,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of content
if self.content:
_dict["content"] = self.content.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of stop_on
+ if self.stop_on:
+ _dict["stopOn"] = self.stop_on.to_dict()
return _dict
@classmethod
@@ -92,9 +116,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"loopCount": obj.get("loopCount"),
+ "timeout": obj.get("timeout"),
+ "offset": obj.get("offset"),
"content": CallsPlayContent.from_dict(obj["content"])
if obj.get("content") is not None
else None,
+ "stopOn": CallsTermination.from_dict(obj["stopOn"])
+ if obj.get("stopOn") is not None
+ else None,
+ "customData": obj.get("customData"),
}
)
return _obj
diff --git a/infobip_api_client/models/calls_pre_answer_request.py b/infobip_api_client/models/calls_pre_answer_request.py
index 6230779..2be2b09 100644
--- a/infobip_api_client/models/calls_pre_answer_request.py
+++ b/infobip_api_client/models/calls_pre_answer_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_price.py b/infobip_api_client/models/calls_price.py
new file mode 100644
index 0000000..748a741
--- /dev/null
+++ b/infobip_api_client/models/calls_price.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsPrice(BaseModel):
+ """
+ Sent voice message price.
+ """ # noqa: E501
+
+ price_per_second: Optional[Union[StrictFloat, StrictInt]] = Field(
+ default=None,
+ description="Price per one second of the voice message.",
+ alias="pricePerSecond",
+ )
+ currency: Optional[StrictStr] = Field(
+ default=None, description="The currency in which the price is expressed."
+ )
+ __properties: ClassVar[List[str]] = ["pricePerSecond", "currency"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsPrice from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsPrice from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "pricePerSecond": obj.get("pricePerSecond"),
+ "currency": obj.get("currency"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_provider.py b/infobip_api_client/models/calls_provider.py
new file mode 100644
index 0000000..711e41b
--- /dev/null
+++ b/infobip_api_client/models/calls_provider.py
@@ -0,0 +1,144 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from importlib import import_module
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from infobip_api_client.models.calls_provider_trunk_type import CallsProviderTrunkType
+from typing import Optional, Set
+from typing_extensions import Self
+
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from infobip_api_client.models.calls_cisco_webex_provider import (
+ CallsCiscoWebexProvider,
+ )
+ from infobip_api_client.models.calls_freshworks_provider import (
+ CallsFreshworksProvider,
+ )
+ from infobip_api_client.models.calls_genesys_cloud_provider import (
+ CallsGenesysCloudProvider,
+ )
+
+
+class CallsProvider(BaseModel):
+ """
+ CallsProvider
+ """ # noqa: E501
+
+ type: Optional[CallsProviderTrunkType] = None
+ __properties: ClassVar[List[str]] = ["type"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ # JSON field name that stores the object type
+ __discriminator_property_name: ClassVar[str] = "type"
+
+ # discriminator mappings
+ __discriminator_value_class_map: ClassVar[Dict[str, str]] = {
+ "CISCO_WEBEX": "CallsCiscoWebexProvider",
+ "FRESHWORKS": "CallsFreshworksProvider",
+ "GENESYS_CLOUD": "CallsGenesysCloudProvider",
+ }
+
+ @classmethod
+ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
+ """Returns the discriminator value (object type) of the data"""
+ discriminator_value = obj[cls.__discriminator_property_name]
+ if discriminator_value:
+ return cls.__discriminator_value_class_map.get(discriminator_value)
+ else:
+ return None
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(
+ cls, json_str: str
+ ) -> Optional[
+ Union[
+ CallsCiscoWebexProvider, CallsFreshworksProvider, CallsGenesysCloudProvider
+ ]
+ ]:
+ """Create an instance of CallsProvider from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(
+ cls, obj: Dict[str, Any]
+ ) -> Optional[
+ Union[
+ CallsCiscoWebexProvider, CallsFreshworksProvider, CallsGenesysCloudProvider
+ ]
+ ]:
+ """Create an instance of CallsProvider from a dict"""
+ # look up the object type based on discriminator mapping
+ object_type = cls.get_discriminator_value(obj)
+ if object_type == "CallsCiscoWebexProvider":
+ return import_module(
+ "infobip_api_client.models.calls_cisco_webex_provider"
+ ).CallsCiscoWebexProvider.from_dict(obj)
+ if object_type == "CallsFreshworksProvider":
+ return import_module(
+ "infobip_api_client.models.calls_freshworks_provider"
+ ).CallsFreshworksProvider.from_dict(obj)
+ if object_type == "CallsGenesysCloudProvider":
+ return import_module(
+ "infobip_api_client.models.calls_genesys_cloud_provider"
+ ).CallsGenesysCloudProvider.from_dict(obj)
+
+ raise ValueError(
+ "CallsProvider failed to lookup discriminator value from "
+ + json.dumps(obj)
+ + ". Discriminator property name: "
+ + cls.__discriminator_property_name
+ + ", mapping: "
+ + json.dumps(cls.__discriminator_value_class_map)
+ )
diff --git a/infobip_api_client/models/calls_provider_sip_trunk_request.py b/infobip_api_client/models/calls_provider_sip_trunk_request.py
index 15f6e08..f301581 100644
--- a/infobip_api_client/models/calls_provider_sip_trunk_request.py
+++ b/infobip_api_client/models/calls_provider_sip_trunk_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,12 +20,10 @@
from pydantic import ConfigDict
from typing import Any, ClassVar, Dict, List
from infobip_api_client.models.calls_billing_package import CallsBillingPackage
-from infobip_api_client.models.calls_pegasus_provider import CallsPegasusProvider
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
+from infobip_api_client.models.calls_provider import CallsProvider
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
from infobip_api_client.models.calls_sip_trunk_request import CallsSipTrunkRequest
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
@@ -36,11 +33,12 @@ class CallsProviderSipTrunkRequest(CallsSipTrunkRequest):
CallsProviderSipTrunkRequest
""" # noqa: E501
- provider: CallsPegasusProvider
+ provider: CallsProvider
__properties: ClassVar[List[str]] = [
"type",
"name",
"location",
+ "tls",
"internationalCallsAllowed",
"channelLimit",
"billingPackage",
@@ -106,6 +104,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"type": obj.get("type"),
"name": obj.get("name"),
"location": obj.get("location"),
+ "tls": obj.get("tls") if obj.get("tls") is not None else False,
"internationalCallsAllowed": obj.get("internationalCallsAllowed")
if obj.get("internationalCallsAllowed") is not None
else False,
@@ -113,7 +112,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"billingPackage": CallsBillingPackage.from_dict(obj["billingPackage"])
if obj.get("billingPackage") is not None
else None,
- "provider": CallsPegasusProvider.from_dict(obj["provider"])
+ "provider": CallsProvider.from_dict(obj["provider"])
if obj.get("provider") is not None
else None,
}
diff --git a/infobip_api_client/models/calls_provider_sip_trunk_response.py b/infobip_api_client/models/calls_provider_sip_trunk_response.py
new file mode 100644
index 0000000..97bb2c0
--- /dev/null
+++ b/infobip_api_client/models/calls_provider_sip_trunk_response.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_anonymization_type import CallsAnonymizationType
+from infobip_api_client.models.calls_audio_codec import CallsAudioCodec
+from infobip_api_client.models.calls_billing_package import CallsBillingPackage
+from infobip_api_client.models.calls_dtmf_type import CallsDtmfType
+from infobip_api_client.models.calls_fax_type import CallsFaxType
+from infobip_api_client.models.calls_number_presentation_format import (
+ CallsNumberPresentationFormat,
+)
+from infobip_api_client.models.calls_provider import CallsProvider
+from infobip_api_client.models.calls_sbc_hosts import CallsSbcHosts
+from infobip_api_client.models.calls_sip_options import CallsSipOptions
+from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
+from infobip_api_client.models.calls_sip_trunk_response import CallsSipTrunkResponse
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsProviderSipTrunkResponse(CallsSipTrunkResponse):
+ """
+ CallsProviderSipTrunkResponse
+ """ # noqa: E501
+
+ provider: Optional[CallsProvider] = None
+ __properties: ClassVar[List[str]] = [
+ "id",
+ "type",
+ "name",
+ "location",
+ "tls",
+ "codecs",
+ "dtmf",
+ "fax",
+ "numberFormat",
+ "internationalCallsAllowed",
+ "channelLimit",
+ "anonymization",
+ "billingPackage",
+ "sbcHosts",
+ "sipOptions",
+ "provider",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsProviderSipTrunkResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of billing_package
+ if self.billing_package:
+ _dict["billingPackage"] = self.billing_package.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of sbc_hosts
+ if self.sbc_hosts:
+ _dict["sbcHosts"] = self.sbc_hosts.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of sip_options
+ if self.sip_options:
+ _dict["sipOptions"] = self.sip_options.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of provider
+ if self.provider:
+ _dict["provider"] = self.provider.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsProviderSipTrunkResponse 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"),
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "location": obj.get("location"),
+ "tls": obj.get("tls"),
+ "codecs": obj.get("codecs"),
+ "dtmf": obj.get("dtmf"),
+ "fax": obj.get("fax"),
+ "numberFormat": obj.get("numberFormat"),
+ "internationalCallsAllowed": obj.get("internationalCallsAllowed"),
+ "channelLimit": obj.get("channelLimit"),
+ "anonymization": obj.get("anonymization"),
+ "billingPackage": CallsBillingPackage.from_dict(obj["billingPackage"])
+ if obj.get("billingPackage") is not None
+ else None,
+ "sbcHosts": CallsSbcHosts.from_dict(obj["sbcHosts"])
+ if obj.get("sbcHosts") is not None
+ else None,
+ "sipOptions": CallsSipOptions.from_dict(obj["sipOptions"])
+ if obj.get("sipOptions") is not None
+ else None,
+ "provider": CallsProvider.from_dict(obj["provider"])
+ if obj.get("provider") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_provider_sip_trunk_update_request.py b/infobip_api_client/models/calls_provider_sip_trunk_update_request.py
new file mode 100644
index 0000000..73cd271
--- /dev/null
+++ b/infobip_api_client/models/calls_provider_sip_trunk_update_request.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import ConfigDict
+from typing import Any, ClassVar, Dict, List
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
+from infobip_api_client.models.calls_sip_trunk_update_request import (
+ CallsSipTrunkUpdateRequest,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsProviderSipTrunkUpdateRequest(CallsSipTrunkUpdateRequest):
+ """
+ CallsProviderSipTrunkUpdateRequest
+ """ # noqa: E501
+
+ __properties: ClassVar[List[str]] = [
+ "type",
+ "name",
+ "internationalCallsAllowed",
+ "channelLimit",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsProviderSipTrunkUpdateRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsProviderSipTrunkUpdateRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "type": obj.get("type"),
+ "name": obj.get("name"),
+ "internationalCallsAllowed": obj.get("internationalCallsAllowed")
+ if obj.get("internationalCallsAllowed") is not None
+ else False,
+ "channelLimit": obj.get("channelLimit"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_pegasus_provider_trunk_type.py b/infobip_api_client/models/calls_provider_trunk_type.py
similarity index 78%
rename from infobip_api_client/models/calls_pegasus_provider_trunk_type.py
rename to infobip_api_client/models/calls_provider_trunk_type.py
index 403551d..4fbed49 100644
--- a/infobip_api_client/models/calls_pegasus_provider_trunk_type.py
+++ b/infobip_api_client/models/calls_provider_trunk_type.py
@@ -12,14 +12,13 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
-class CallsPegasusProviderTrunkType(str, Enum):
+class CallsProviderTrunkType(str, Enum):
"""
Provider type.
"""
@@ -28,8 +27,10 @@ class CallsPegasusProviderTrunkType(str, Enum):
allowed enum values
"""
FRESHWORKS = "FRESHWORKS"
+ GENESYS_CLOUD = "GENESYS_CLOUD"
+ CISCO_WEBEX = "CISCO_WEBEX"
@classmethod
def from_json(cls, json_str: str) -> Self:
- """Create an instance of CallsPegasusProviderTrunkType from a JSON string"""
+ """Create an instance of CallsProviderTrunkType from a JSON string"""
return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_public_call_recording.py b/infobip_api_client/models/calls_public_call_recording.py
deleted file mode 100644
index 40ecf90..0000000
--- a/infobip_api_client/models/calls_public_call_recording.py
+++ /dev/null
@@ -1,161 +0,0 @@
-# coding: utf-8
-
-"""
- Infobip Client API Libraries OpenAPI Specification
-
- OpenAPI specification containing public endpoints supported in client API libraries.
-
- The version of the OpenAPI document: 1.0.0
- Contact: support@infobip.com
- Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictStr
-from typing import Any, ClassVar, Dict, List, Optional
-from typing_extensions import Annotated
-from infobip_api_client.models.call_direction import CallDirection
-from infobip_api_client.models.call_endpoint import CallEndpoint
-from infobip_api_client.models.calls_public_recording_file import (
- CallsPublicRecordingFile,
-)
-from infobip_api_client.models.calls_recording_status import CallsRecordingStatus
-from typing import Optional, Set
-from typing_extensions import Self
-
-
-class CallsPublicCallRecording(BaseModel):
- """
- CallsPublicCallRecording
- """ # noqa: E501
-
- call_id: Optional[Annotated[str, Field(strict=True, max_length=128)]] = Field(
- default=None, description="Call ID.", alias="callId"
- )
- endpoint: CallEndpoint
- direction: Optional[CallDirection] = None
- files: Optional[List[CallsPublicRecordingFile]] = Field(
- default=None, description="Call recording files."
- )
- status: Optional[CallsRecordingStatus] = None
- reason: Optional[StrictStr] = Field(
- default=None, description="Reason for recording failure."
- )
- calls_configuration_id: Optional[StrictStr] = Field(
- default=None,
- description="Calls Configuration ID.",
- alias="callsConfigurationId",
- )
- application_id: Optional[StrictStr] = Field(
- default=None, description="Application ID.", alias="applicationId"
- )
- start_time: Optional[datetime] = Field(
- default=None,
- description="Date and time when the (first) call recording started.",
- alias="startTime",
- )
- end_time: Optional[datetime] = Field(
- default=None,
- description="Date and time when the (last) call recording ended.",
- alias="endTime",
- )
- __properties: ClassVar[List[str]] = [
- "callId",
- "endpoint",
- "direction",
- "files",
- "status",
- "reason",
- "callsConfigurationId",
- "applicationId",
- "startTime",
- "endTime",
- ]
-
- model_config = ConfigDict(
- populate_by_name=True,
- validate_assignment=True,
- protected_namespaces=(),
- )
-
- def to_str(self) -> str:
- """Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
-
- def to_json(self) -> str:
- """Returns the JSON representation of the model using alias"""
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
- return json.dumps(self.to_dict())
-
- @classmethod
- def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of CallsPublicCallRecording from a JSON string"""
- return cls.from_dict(json.loads(json_str))
-
- def to_dict(self) -> Dict[str, Any]:
- """Return the dictionary representation of the model using alias.
-
- This has the following differences from calling pydantic's
- `self.model_dump(by_alias=True)`:
-
- * `None` is only added to the output dict for nullable fields that
- were set at model initialization. Other fields with value `None`
- are ignored.
- """
- excluded_fields: Set[str] = set([])
-
- _dict = self.model_dump(
- by_alias=True,
- exclude=excluded_fields,
- exclude_none=True,
- )
- # override the default output from pydantic by calling `to_dict()` of endpoint
- if self.endpoint:
- _dict["endpoint"] = self.endpoint.to_dict()
- # override the default output from pydantic by calling `to_dict()` of each item in files (list)
- _items = []
- if self.files:
- for _item in self.files:
- if _item:
- _items.append(_item.to_dict())
- _dict["files"] = _items
- return _dict
-
- @classmethod
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of CallsPublicCallRecording from a dict"""
- if obj is None:
- return None
-
- if not isinstance(obj, dict):
- return cls.model_validate(obj)
-
- _obj = cls.model_validate(
- {
- "callId": obj.get("callId"),
- "endpoint": CallEndpoint.from_dict(obj["endpoint"])
- if obj.get("endpoint") is not None
- else None,
- "direction": obj.get("direction"),
- "files": [
- CallsPublicRecordingFile.from_dict(_item) for _item in obj["files"]
- ]
- if obj.get("files") is not None
- else None,
- "status": obj.get("status"),
- "reason": obj.get("reason"),
- "callsConfigurationId": obj.get("callsConfigurationId"),
- "applicationId": obj.get("applicationId"),
- "startTime": obj.get("startTime"),
- "endTime": obj.get("endTime"),
- }
- )
- return _obj
diff --git a/infobip_api_client/models/calls_public_country.py b/infobip_api_client/models/calls_public_country.py
index b2db653..d8a7e82 100644
--- a/infobip_api_client/models/calls_public_country.py
+++ b/infobip_api_client/models/calls_public_country.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_public_region.py b/infobip_api_client/models/calls_public_region.py
index 382bb95..1a3e2c5 100644
--- a/infobip_api_client/models/calls_public_region.py
+++ b/infobip_api_client/models/calls_public_region.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_public_sip_trunk_service_address.py b/infobip_api_client/models/calls_public_sip_trunk_service_address.py
index ca12390..f1649e2 100644
--- a/infobip_api_client/models/calls_public_sip_trunk_service_address.py
+++ b/infobip_api_client/models/calls_public_sip_trunk_service_address.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_public_sip_trunk_service_address_request.py b/infobip_api_client/models/calls_public_sip_trunk_service_address_request.py
index 39a59c5..8469467 100644
--- a/infobip_api_client/models/calls_public_sip_trunk_service_address_request.py
+++ b/infobip_api_client/models/calls_public_sip_trunk_service_address_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_record.py b/infobip_api_client/models/calls_record.py
new file mode 100644
index 0000000..ba619fc
--- /dev/null
+++ b/infobip_api_client/models/calls_record.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_record_options import CallsRecordOptions
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsRecord(BaseModel):
+ """
+ Record action records a portion of the call. The recording starts at the moment where the Record action is added in the IVR.
+ """ # noqa: E501
+
+ record: StrictInt = Field(
+ description="The duration to record for in seconds; null for unlimited."
+ )
+ options: Optional[CallsRecordOptions] = None
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = ["record", "options", "actionId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsRecord from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of options
+ if self.options:
+ _dict["options"] = self.options.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsRecord from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "record": obj.get("record"),
+ "options": CallsRecordOptions.from_dict(obj["options"])
+ if obj.get("options") is not None
+ else None,
+ "actionId": obj.get("actionId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_record_options.py b/infobip_api_client/models/calls_record_options.py
new file mode 100644
index 0000000..8213d28
--- /dev/null
+++ b/infobip_api_client/models/calls_record_options.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsRecordOptions(BaseModel):
+ """
+ CallsRecordOptions
+ """ # noqa: E501
+
+ escape_digits: Optional[StrictStr] = Field(
+ default=None,
+ description="DTMF codes which should stop recording when input by the user.",
+ alias="escapeDigits",
+ )
+ beep: Optional[StrictBool] = Field(
+ default=None,
+ description="Flag indicating a beep sound should be played at the start of the recording.",
+ )
+ max_silence: Optional[StrictInt] = Field(
+ default=None,
+ description="The amount of silence to wait for before stopping the recording.",
+ alias="maxSilence",
+ )
+ identifier: Optional[StrictStr] = Field(
+ default=None,
+ description="The identifier for the recording. Identified recordings can be reused in Play from Recording. The parameter can be constructed using variables.",
+ )
+ __properties: ClassVar[List[str]] = [
+ "escapeDigits",
+ "beep",
+ "maxSilence",
+ "identifier",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsRecordOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsRecordOptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "escapeDigits": obj.get("escapeDigits"),
+ "beep": obj.get("beep"),
+ "maxSilence": obj.get("maxSilence"),
+ "identifier": obj.get("identifier"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_recorded_audio_files_response.py b/infobip_api_client/models/calls_recorded_audio_files_response.py
new file mode 100644
index 0000000..7456e09
--- /dev/null
+++ b/infobip_api_client/models/calls_recorded_audio_files_response.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_recorded_ivr_file import CallsRecordedIvrFile
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsRecordedAudioFilesResponse(BaseModel):
+ """
+ CallsRecordedAudioFilesResponse
+ """ # noqa: E501
+
+ files: Optional[List[CallsRecordedIvrFile]] = Field(
+ default=None,
+ description="Array of recorded files metadata, one for each recorded file.",
+ )
+ __properties: ClassVar[List[str]] = ["files"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsRecordedAudioFilesResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in files (list)
+ _items = []
+ if self.files:
+ for _item in self.files:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["files"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsRecordedAudioFilesResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "files": [
+ CallsRecordedIvrFile.from_dict(_item) for _item in obj["files"]
+ ]
+ if obj.get("files") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_recorded_ivr_file.py b/infobip_api_client/models/calls_recorded_ivr_file.py
new file mode 100644
index 0000000..d0e5526
--- /dev/null
+++ b/infobip_api_client/models/calls_recorded_ivr_file.py
@@ -0,0 +1,127 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsRecordedIvrFile(BaseModel):
+ """
+ Array of recorded files metadata, one for each recorded file.
+ """ # noqa: E501
+
+ message_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the sent message.",
+ alias="messageId",
+ )
+ var_from: Optional[StrictStr] = Field(
+ default=None, description="Numeric sender ID.", alias="from"
+ )
+ to: Optional[StrictStr] = Field(default=None, description="Destination address.")
+ scenario_id: Optional[StrictStr] = Field(
+ default=None, description="Scenario key.", alias="scenarioId"
+ )
+ group_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Differentiates recordings made by separate Record actions.",
+ alias="groupId",
+ )
+ url: Optional[StrictStr] = Field(
+ default=None,
+ description="Relative URL path to the recorded file. To download the audio, just perform a GET request using the relative URL of a specific file. The returned audio data is encoded as PCM 16bit 8kHz WAVE audio. The files are available on Infobip servers for 2 months.",
+ )
+ recorded_at: Optional[datetime] = Field(
+ default=None,
+ description="The time the recording took place.",
+ alias="recordedAt",
+ )
+ __properties: ClassVar[List[str]] = [
+ "messageId",
+ "from",
+ "to",
+ "scenarioId",
+ "groupId",
+ "url",
+ "recordedAt",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsRecordedIvrFile from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsRecordedIvrFile from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "messageId": obj.get("messageId"),
+ "from": obj.get("from"),
+ "to": obj.get("to"),
+ "scenarioId": obj.get("scenarioId"),
+ "groupId": obj.get("groupId"),
+ "url": obj.get("url"),
+ "recordedAt": obj.get("recordedAt"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_recording.py b/infobip_api_client/models/calls_recording.py
new file mode 100644
index 0000000..eb98807
--- /dev/null
+++ b/infobip_api_client/models/calls_recording.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsRecording(BaseModel):
+ """
+ Recording configuration of a Number Masking call.
+ """ # noqa: E501
+
+ enabled: Optional[StrictBool] = Field(
+ default=None,
+ description="Indicates whether call recording is enabled from the callee perspective.",
+ )
+ record_callee_announcement: Optional[StrictBool] = Field(
+ default=True,
+ description="Flag that indicates will callee announcement be included in recording file. If not set, it will be `true`.",
+ alias="recordCalleeAnnouncement",
+ )
+ __properties: ClassVar[List[str]] = ["enabled", "recordCalleeAnnouncement"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsRecording from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsRecording from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "enabled": obj.get("enabled"),
+ "recordCalleeAnnouncement": obj.get("recordCalleeAnnouncement")
+ if obj.get("recordCalleeAnnouncement") is not None
+ else True,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_recording_file.py b/infobip_api_client/models/calls_recording_file.py
index b161bee..ce57fd2 100644
--- a/infobip_api_client/models/calls_recording_file.py
+++ b/infobip_api_client/models/calls_recording_file.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,11 +20,11 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.calls_creation_method import CallsCreationMethod
from infobip_api_client.models.calls_file_format import CallsFileFormat
from infobip_api_client.models.calls_recording_file_location import (
CallsRecordingFileLocation,
)
+from infobip_api_client.models.calls_sftp_upload_status import CallsSftpUploadStatus
from typing import Optional, Set
from typing_extensions import Self
@@ -39,15 +38,9 @@ class CallsRecordingFile(BaseModel):
name: StrictStr = Field(description="File name.")
file_format: CallsFileFormat = Field(alias="fileFormat")
size: Optional[StrictInt] = Field(default=None, description="File size in bytes.")
- creation_method: Optional[CallsCreationMethod] = Field(
- default=None, alias="creationMethod"
- )
creation_time: Optional[datetime] = Field(
default=None, description="File creation time.", alias="creationTime"
)
- expiration_time: Optional[datetime] = Field(
- default=None, description="File expiration time.", alias="expirationTime"
- )
duration: Optional[StrictInt] = Field(
default=None, description="File duration in seconds."
)
@@ -62,18 +55,24 @@ class CallsRecordingFile(BaseModel):
alias="endTime",
)
location: Optional[CallsRecordingFileLocation] = None
+ sftp_upload_status: Optional[CallsSftpUploadStatus] = Field(
+ default=None, alias="sftpUploadStatus"
+ )
+ custom_data: Optional[Dict[str, StrictStr]] = Field(
+ default=None, description="Custom data.", alias="customData"
+ )
__properties: ClassVar[List[str]] = [
"id",
"name",
"fileFormat",
"size",
- "creationMethod",
"creationTime",
- "expirationTime",
"duration",
"startTime",
"endTime",
"location",
+ "sftpUploadStatus",
+ "customData",
]
model_config = ConfigDict(
@@ -130,13 +129,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"name": obj.get("name"),
"fileFormat": obj.get("fileFormat"),
"size": obj.get("size"),
- "creationMethod": obj.get("creationMethod"),
"creationTime": obj.get("creationTime"),
- "expirationTime": obj.get("expirationTime"),
"duration": obj.get("duration"),
"startTime": obj.get("startTime"),
"endTime": obj.get("endTime"),
"location": obj.get("location"),
+ "sftpUploadStatus": obj.get("sftpUploadStatus"),
+ "customData": obj.get("customData"),
}
)
return _obj
diff --git a/infobip_api_client/models/calls_recording_file_location.py b/infobip_api_client/models/calls_recording_file_location.py
index 83563e9..c988887 100644
--- a/infobip_api_client/models/calls_recording_file_location.py
+++ b/infobip_api_client/models/calls_recording_file_location.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_recording_location.py b/infobip_api_client/models/calls_recording_location.py
new file mode 100644
index 0000000..b45f956
--- /dev/null
+++ b/infobip_api_client/models/calls_recording_location.py
@@ -0,0 +1,50 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallsRecordingLocation(str, Enum):
+ """
+ CallsRecordingLocation
+ """
+
+ """
+ allowed enum values
+ """
+ SAO_PAULO = "SAO_PAULO"
+ BOGOTA = "BOGOTA"
+ FRANKFURT = "FRANKFURT"
+ JOHANNESBURG = "JOHANNESBURG"
+ JOHANNESBURG_1 = "JOHANNESBURG_1"
+ NEW_YORK = "NEW_YORK"
+ PORTLAND = "PORTLAND"
+ MOSCOW = "MOSCOW"
+ SINGAPORE = "SINGAPORE"
+ ISTANBUL = "ISTANBUL"
+ KUALA_LUMPUR = "KUALA_LUMPUR"
+ JAKARTA = "JAKARTA"
+ MUMBAI = "MUMBAI"
+ HONG_KONG_1 = "HONG_KONG_1"
+ HONG_KONG = "HONG_KONG"
+ RIYADH = "RIYADH"
+ CHENNAI = "CHENNAI"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallsRecordingLocation from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_recording_play_content.py b/infobip_api_client/models/calls_recording_play_content.py
index 8626a76..9ff94bd 100644
--- a/infobip_api_client/models/calls_recording_play_content.py
+++ b/infobip_api_client/models/calls_recording_play_content.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,6 +20,7 @@
from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from infobip_api_client.models.calls_play_content import CallsPlayContent
+from infobip_api_client.models.calls_play_content_type import CallsPlayContentType
from typing import Optional, Set
from typing_extensions import Self
diff --git a/infobip_api_client/models/calls_recording_request.py b/infobip_api_client/models/calls_recording_request.py
index 7a4b11e..0a3f6ff 100644
--- a/infobip_api_client/models/calls_recording_request.py
+++ b/infobip_api_client/models/calls_recording_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -33,7 +32,7 @@ class CallsRecordingRequest(BaseModel):
recording_type: CallsRecordingType = Field(alias="recordingType")
max_silence: Optional[StrictInt] = Field(
default=None,
- description="Silence duration, in seconds, before the recording stops.",
+ description="Silence duration, in seconds, before the recording stops. (If this field is set the recording can't be stopped by the [stop recording endpoint](#call-stop-recording).)",
alias="maxSilence",
)
beep: Optional[StrictBool] = Field(
@@ -42,7 +41,7 @@ class CallsRecordingRequest(BaseModel):
)
max_duration: Optional[StrictInt] = Field(
default=None,
- description="Maximum recording duration in seconds.",
+ description="Maximum recording duration in seconds. (If this field is set the recording can't be stopped by the [stop recording endpoint](#call-stop-recording).)",
alias="maxDuration",
)
custom_data: Optional[Dict[str, StrictStr]] = Field(
diff --git a/infobip_api_client/models/calls_recording_start_request.py b/infobip_api_client/models/calls_recording_start_request.py
index cd37d65..d5407cb 100644
--- a/infobip_api_client/models/calls_recording_start_request.py
+++ b/infobip_api_client/models/calls_recording_start_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_recording_status.py b/infobip_api_client/models/calls_recording_status.py
index 2fa0bda..8414ad3 100644
--- a/infobip_api_client/models/calls_recording_status.py
+++ b/infobip_api_client/models/calls_recording_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_recording_type.py b/infobip_api_client/models/calls_recording_type.py
index 6333055..63d24af 100644
--- a/infobip_api_client/models/calls_recording_type.py
+++ b/infobip_api_client/models/calls_recording_type.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_region_list.py b/infobip_api_client/models/calls_region_list.py
index cfc9356..80d9899 100644
--- a/infobip_api_client/models/calls_region_list.py
+++ b/infobip_api_client/models/calls_region_list.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_registered_sip_trunk_request.py b/infobip_api_client/models/calls_registered_sip_trunk_request.py
index bb0a203..6013ea1 100644
--- a/infobip_api_client/models/calls_registered_sip_trunk_request.py
+++ b/infobip_api_client/models/calls_registered_sip_trunk_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -28,11 +27,9 @@
from infobip_api_client.models.calls_number_presentation_format import (
CallsNumberPresentationFormat,
)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
from infobip_api_client.models.calls_sip_trunk_request import CallsSipTrunkRequest
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
@@ -42,10 +39,6 @@ class CallsRegisteredSipTrunkRequest(CallsSipTrunkRequest):
CallsRegisteredSipTrunkRequest
""" # noqa: E501
- tls: Optional[StrictBool] = Field(
- default=False,
- description="Indicates whether communication is secured by the TLS protocol.",
- )
codecs: Optional[List[CallsAudioCodec]] = Field(
default=None, description="List of audio codecs supported by a SIP trunk."
)
@@ -64,10 +57,10 @@ class CallsRegisteredSipTrunkRequest(CallsSipTrunkRequest):
"type",
"name",
"location",
+ "tls",
"internationalCallsAllowed",
"channelLimit",
"billingPackage",
- "tls",
"codecs",
"dtmf",
"fax",
@@ -132,6 +125,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"type": obj.get("type"),
"name": obj.get("name"),
"location": obj.get("location"),
+ "tls": obj.get("tls") if obj.get("tls") is not None else False,
"internationalCallsAllowed": obj.get("internationalCallsAllowed")
if obj.get("internationalCallsAllowed") is not None
else False,
@@ -139,7 +133,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"billingPackage": CallsBillingPackage.from_dict(obj["billingPackage"])
if obj.get("billingPackage") is not None
else None,
- "tls": obj.get("tls") if obj.get("tls") is not None else False,
"codecs": obj.get("codecs"),
"dtmf": obj.get("dtmf"),
"fax": obj.get("fax"),
diff --git a/infobip_api_client/models/calls_registered_sip_trunk_response.py b/infobip_api_client/models/calls_registered_sip_trunk_response.py
index 519237b..3e7544c 100644
--- a/infobip_api_client/models/calls_registered_sip_trunk_response.py
+++ b/infobip_api_client/models/calls_registered_sip_trunk_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -28,13 +27,11 @@
from infobip_api_client.models.calls_number_presentation_format import (
CallsNumberPresentationFormat,
)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
from infobip_api_client.models.calls_sbc_hosts import CallsSbcHosts
from infobip_api_client.models.calls_sip_options import CallsSipOptions
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
from infobip_api_client.models.calls_sip_trunk_response import CallsSipTrunkResponse
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
diff --git a/infobip_api_client/models/calls_registered_sip_trunk_update_request.py b/infobip_api_client/models/calls_registered_sip_trunk_update_request.py
index 6a245ef..30e2db8 100644
--- a/infobip_api_client/models/calls_registered_sip_trunk_update_request.py
+++ b/infobip_api_client/models/calls_registered_sip_trunk_update_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -27,9 +26,7 @@
from infobip_api_client.models.calls_number_presentation_format import (
CallsNumberPresentationFormat,
)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from infobip_api_client.models.calls_sip_trunk_update_request import (
CallsSipTrunkUpdateRequest,
)
@@ -47,17 +44,26 @@ class CallsRegisteredSipTrunkUpdateRequest(CallsSipTrunkUpdateRequest):
description="Enables an authentication challenge for each call.",
alias="inviteAuthentication",
)
+ codecs: Optional[List[CallsAudioCodec]] = Field(
+ default=None, description="List of audio codecs supported by a SIP trunk."
+ )
+ dtmf: Optional[CallsDtmfType] = None
+ fax: Optional[CallsFaxType] = None
+ anonymization: Optional[CallsAnonymizationType] = None
+ number_format: Optional[CallsNumberPresentationFormat] = Field(
+ default=None, alias="numberFormat"
+ )
__properties: ClassVar[List[str]] = [
"type",
"name",
+ "internationalCallsAllowed",
+ "channelLimit",
+ "inviteAuthentication",
"codecs",
"dtmf",
"fax",
- "numberFormat",
- "internationalCallsAllowed",
- "channelLimit",
"anonymization",
- "inviteAuthentication",
+ "numberFormat",
]
model_config = ConfigDict(
@@ -112,16 +118,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"type": obj.get("type"),
"name": obj.get("name"),
- "codecs": obj.get("codecs"),
- "dtmf": obj.get("dtmf"),
- "fax": obj.get("fax"),
- "numberFormat": obj.get("numberFormat"),
"internationalCallsAllowed": obj.get("internationalCallsAllowed")
if obj.get("internationalCallsAllowed") is not None
else False,
"channelLimit": obj.get("channelLimit"),
- "anonymization": obj.get("anonymization"),
"inviteAuthentication": obj.get("inviteAuthentication"),
+ "codecs": obj.get("codecs"),
+ "dtmf": obj.get("dtmf"),
+ "fax": obj.get("fax"),
+ "anonymization": obj.get("anonymization"),
+ "numberFormat": obj.get("numberFormat"),
}
)
return _obj
diff --git a/infobip_api_client/models/calls_repeat_until.py b/infobip_api_client/models/calls_repeat_until.py
new file mode 100644
index 0000000..47fae5e
--- /dev/null
+++ b/infobip_api_client/models/calls_repeat_until.py
@@ -0,0 +1,86 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsRepeatUntil(BaseModel):
+ """
+ This action is deprecated and should not be used, as it leads to incorrect behaviour and it will not be supported in the future. Please, use repeat-while loop instead.
+ """ # noqa: E501
+
+ repeat: List[Dict[str, Any]] = Field(description="Array of actions to execute.")
+ until: StrictStr = Field(description="The expression to evaluate.")
+ __properties: ClassVar[List[str]] = ["repeat", "until"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsRepeatUntil from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsRepeatUntil from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"repeat": obj.get("repeat"), "until": obj.get("until")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_repeat_while.py b/infobip_api_client/models/calls_repeat_while.py
new file mode 100644
index 0000000..aa02904
--- /dev/null
+++ b/infobip_api_client/models/calls_repeat_while.py
@@ -0,0 +1,88 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsRepeatWhile(BaseModel):
+ """
+ Repeat-While action is a control flow statement that repeatedly executes a block of code, as long as the boolean condition in the while field is true. Comparison is done using equal (==) or not equal (!=) operators. Make sure not to provide a condition that causes an infinite loop.
+ """ # noqa: E501
+
+ repeat: List[Dict[str, Any]] = Field(description="Array of actions to execute.")
+ var_while: StrictStr = Field(
+ description="The expression to evaluate.", alias="while"
+ )
+ __properties: ClassVar[List[str]] = ["repeat", "while"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsRepeatWhile from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsRepeatWhile from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"repeat": obj.get("repeat"), "while": obj.get("while")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_report.py b/infobip_api_client/models/calls_report.py
new file mode 100644
index 0000000..33055ff
--- /dev/null
+++ b/infobip_api_client/models/calls_report.py
@@ -0,0 +1,169 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_price import CallsPrice
+from infobip_api_client.models.calls_single_message_status import (
+ CallsSingleMessageStatus,
+)
+from infobip_api_client.models.calls_voice_data import CallsVoiceData
+from infobip_api_client.models.calls_voice_error import CallsVoiceError
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsReport(BaseModel):
+ """
+ Arrays of delivery reports, one object for every message.
+ """ # noqa: E501
+
+ bulk_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the bulk of messages.",
+ alias="bulkId",
+ )
+ message_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the message sent.",
+ alias="messageId",
+ )
+ var_from: Optional[StrictStr] = Field(
+ default=None,
+ description="The sender ID which can be alphanumeric or numeric.",
+ alias="from",
+ )
+ to: Optional[StrictStr] = Field(
+ default=None, description="Destination address of the voice message."
+ )
+ sent_at: Optional[StrictStr] = Field(
+ default=None,
+ description="Date and time when the voice message was initiated. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.",
+ alias="sentAt",
+ )
+ mcc_mnc: Optional[StrictStr] = Field(
+ default=None, description="Mobile country and network codes.", alias="mccMnc"
+ )
+ callback_data: Optional[StrictStr] = Field(
+ default=None,
+ description="Custom data sent over to the notifyUrl.",
+ alias="callbackData",
+ )
+ voice_call: Optional[CallsVoiceData] = Field(default=None, alias="voiceCall")
+ price: Optional[CallsPrice] = None
+ status: Optional[CallsSingleMessageStatus] = None
+ error: Optional[CallsVoiceError] = None
+ __properties: ClassVar[List[str]] = [
+ "bulkId",
+ "messageId",
+ "from",
+ "to",
+ "sentAt",
+ "mccMnc",
+ "callbackData",
+ "voiceCall",
+ "price",
+ "status",
+ "error",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsReport from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of voice_call
+ if self.voice_call:
+ _dict["voiceCall"] = self.voice_call.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of price
+ if self.price:
+ _dict["price"] = self.price.to_dict()
+ # 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 error
+ if self.error:
+ _dict["error"] = self.error.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsReport from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "bulkId": obj.get("bulkId"),
+ "messageId": obj.get("messageId"),
+ "from": obj.get("from"),
+ "to": obj.get("to"),
+ "sentAt": obj.get("sentAt"),
+ "mccMnc": obj.get("mccMnc"),
+ "callbackData": obj.get("callbackData"),
+ "voiceCall": CallsVoiceData.from_dict(obj["voiceCall"])
+ if obj.get("voiceCall") is not None
+ else None,
+ "price": CallsPrice.from_dict(obj["price"])
+ if obj.get("price") is not None
+ else None,
+ "status": CallsSingleMessageStatus.from_dict(obj["status"])
+ if obj.get("status") is not None
+ else None,
+ "error": CallsVoiceError.from_dict(obj["error"])
+ if obj.get("error") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_report_response.py b/infobip_api_client/models/calls_report_response.py
new file mode 100644
index 0000000..09c328b
--- /dev/null
+++ b/infobip_api_client/models/calls_report_response.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_report import CallsReport
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsReportResponse(BaseModel):
+ """
+ CallsReportResponse
+ """ # noqa: E501
+
+ results: Optional[List[CallsReport]] = Field(
+ default=None,
+ description="Arrays of delivery reports, one object for every message.",
+ )
+ __properties: ClassVar[List[str]] = ["results"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsReportResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # 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: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsReportResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "results": [CallsReport.from_dict(_item) for _item in obj["results"]]
+ if obj.get("results") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_reschedule_request.py b/infobip_api_client/models/calls_reschedule_request.py
index ec99a90..b725c69 100644
--- a/infobip_api_client/models/calls_reschedule_request.py
+++ b/infobip_api_client/models/calls_reschedule_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_retry.py b/infobip_api_client/models/calls_retry.py
index 2413269..293480c 100644
--- a/infobip_api_client/models/calls_retry.py
+++ b/infobip_api_client/models/calls_retry.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_retry_options.py b/infobip_api_client/models/calls_retry_options.py
index 1a802d0..f193fa9 100644
--- a/infobip_api_client/models/calls_retry_options.py
+++ b/infobip_api_client/models/calls_retry_options.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_say.py b/infobip_api_client/models/calls_say.py
new file mode 100644
index 0000000..afff9c5
--- /dev/null
+++ b/infobip_api_client/models/calls_say.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_say_options import CallsSayOptions
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsSay(BaseModel):
+ """
+ Say action converts provided text into an audio file which is played during the call based on the provided parameters. Message text can be up to 1400 characters long.
+ """ # noqa: E501
+
+ say: StrictStr = Field(
+ description="Message text. SSML (_Speech Synthesis Markup Language_) is supported and can be used to fully customize pronunciation of the provided text."
+ )
+ options: Optional[CallsSayOptions] = None
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = ["say", "options", "actionId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsSay from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of options
+ if self.options:
+ _dict["options"] = self.options.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsSay from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "say": obj.get("say"),
+ "options": CallsSayOptions.from_dict(obj["options"])
+ if obj.get("options") is not None
+ else None,
+ "actionId": obj.get("actionId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_say_options.py b/infobip_api_client/models/calls_say_options.py
new file mode 100644
index 0000000..49c9170
--- /dev/null
+++ b/infobip_api_client/models/calls_say_options.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing_extensions import Annotated
+from infobip_api_client.models.calls_voice_options import CallsVoiceOptions
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsSayOptions(BaseModel):
+ """
+ CallsSayOptions
+ """ # noqa: E501
+
+ language: Optional[StrictStr] = Field(
+ default=None, description="Must be defined for correct pronunciation."
+ )
+ voice: Optional[CallsVoiceOptions] = None
+ speech_rate: Optional[
+ Union[
+ Annotated[float, Field(le=2.0, strict=True, ge=0.5)],
+ Annotated[int, Field(le=2, strict=True, ge=1)],
+ ]
+ ] = Field(
+ default=None,
+ description="Must be within [0.5 - 2.0] range, default value is 1.",
+ alias="speechRate",
+ )
+ __properties: ClassVar[List[str]] = ["language", "voice", "speechRate"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsSayOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of voice
+ if self.voice:
+ _dict["voice"] = self.voice.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsSayOptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "language": obj.get("language"),
+ "voice": CallsVoiceOptions.from_dict(obj["voice"])
+ if obj.get("voice") is not None
+ else None,
+ "speechRate": obj.get("speechRate"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_say_request.py b/infobip_api_client/models/calls_say_request.py
index dab6f60..7d43418 100644
--- a/infobip_api_client/models/calls_say_request.py
+++ b/infobip_api_client/models/calls_say_request.py
@@ -12,16 +12,15 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
-from typing_extensions import Annotated
from infobip_api_client.models.calls_language import CallsLanguage
+from infobip_api_client.models.calls_termination import CallsTermination
from infobip_api_client.models.calls_voice_preferences import CallsVoicePreferences
from typing import Optional, Set
from typing_extensions import Self
@@ -29,17 +28,14 @@
class CallsSayRequest(BaseModel):
"""
- CallsSayRequest
+ Call say request.
""" # noqa: E501
- text: StrictStr = Field(description="Text to read.")
+ text: StrictStr = Field(
+ description="Text to read. Use the Speech Synthesis Markup Language (SSML) in a request to fine-tune your output."
+ )
language: CallsLanguage
- speech_rate: Optional[
- Union[
- Annotated[float, Field(le=2.0, strict=True, ge=0.5)],
- Annotated[int, Field(le=2, strict=True, ge=1)],
- ]
- ] = Field(
+ speech_rate: Optional[Union[StrictFloat, StrictInt]] = Field(
default=None,
description="Speech rate. Must be within `[0.5 - 2.0]` range, default value is `1`.",
alias="speechRate",
@@ -48,12 +44,20 @@ class CallsSayRequest(BaseModel):
default=None, description="Number of times to read the text.", alias="loopCount"
)
preferences: Optional[CallsVoicePreferences] = None
+ stop_on: Optional[CallsTermination] = Field(default=None, alias="stopOn")
+ custom_data: Optional[Dict[str, StrictStr]] = Field(
+ default=None,
+ description="Optional parameter to update a call's custom data.",
+ alias="customData",
+ )
__properties: ClassVar[List[str]] = [
"text",
"language",
"speechRate",
"loopCount",
"preferences",
+ "stopOn",
+ "customData",
]
model_config = ConfigDict(
@@ -96,6 +100,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of preferences
if self.preferences:
_dict["preferences"] = self.preferences.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of stop_on
+ if self.stop_on:
+ _dict["stopOn"] = self.stop_on.to_dict()
return _dict
@classmethod
@@ -116,6 +123,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"preferences": CallsVoicePreferences.from_dict(obj["preferences"])
if obj.get("preferences") is not None
else None,
+ "stopOn": CallsTermination.from_dict(obj["stopOn"])
+ if obj.get("stopOn") is not None
+ else None,
+ "customData": obj.get("customData"),
}
)
return _obj
diff --git a/infobip_api_client/models/calls_sbc_hosts.py b/infobip_api_client/models/calls_sbc_hosts.py
index 9b86c94..3e162b4 100644
--- a/infobip_api_client/models/calls_sbc_hosts.py
+++ b/infobip_api_client/models/calls_sbc_hosts.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_scheduling_options.py b/infobip_api_client/models/calls_scheduling_options.py
index a13588b..044757f 100644
--- a/infobip_api_client/models/calls_scheduling_options.py
+++ b/infobip_api_client/models/calls_scheduling_options.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,7 +20,7 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.calls_time_window import CallsTimeWindow
+from infobip_api_client.models.delivery_time_window import DeliveryTimeWindow
from typing import Optional, Set
from typing_extensions import Self
@@ -34,7 +33,7 @@ class CallsSchedulingOptions(BaseModel):
start_time: Optional[datetime] = Field(
default=None, description="Scheduling start date and time.", alias="startTime"
)
- calling_time_window: Optional[CallsTimeWindow] = Field(
+ calling_time_window: Optional[DeliveryTimeWindow] = Field(
default=None, alias="callingTimeWindow"
)
__properties: ClassVar[List[str]] = ["startTime", "callingTimeWindow"]
@@ -93,7 +92,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"startTime": obj.get("startTime"),
- "callingTimeWindow": CallsTimeWindow.from_dict(obj["callingTimeWindow"])
+ "callingTimeWindow": DeliveryTimeWindow.from_dict(
+ obj["callingTimeWindow"]
+ )
if obj.get("callingTimeWindow") is not None
else None,
}
diff --git a/infobip_api_client/models/calls_script_inner.py b/infobip_api_client/models/calls_script_inner.py
new file mode 100644
index 0000000..1fc0f94
--- /dev/null
+++ b/infobip_api_client/models/calls_script_inner.py
@@ -0,0 +1,596 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import (
+ BaseModel,
+ ConfigDict,
+ Field,
+ StrictStr,
+ ValidationError,
+ field_validator,
+)
+from typing import Any, List, Optional
+from infobip_api_client.models.calls_call_api import CallsCallApi
+from infobip_api_client.models.calls_capture import CallsCapture
+from infobip_api_client.models.calls_collect import CallsCollect
+from infobip_api_client.models.calls_dial import CallsDial
+from infobip_api_client.models.calls_dial_to_conversations import (
+ CallsDialToConversations,
+)
+from infobip_api_client.models.calls_dial_to_many import CallsDialToMany
+from infobip_api_client.models.calls_dial_to_web_rtc import CallsDialToWebRTC
+from infobip_api_client.models.calls_for_each import CallsForEach
+from infobip_api_client.models.calls_go_to import CallsGoTo
+from infobip_api_client.models.calls_hangup import CallsHangup
+from infobip_api_client.models.calls_if_then_else import CallsIfThenElse
+from infobip_api_client.models.calls_machine_detection import CallsMachineDetection
+from infobip_api_client.models.calls_pause import CallsPause
+from infobip_api_client.models.calls_play import CallsPlay
+from infobip_api_client.models.calls_play_from_recording import CallsPlayFromRecording
+from infobip_api_client.models.calls_record import CallsRecord
+from infobip_api_client.models.calls_repeat_until import CallsRepeatUntil
+from infobip_api_client.models.calls_repeat_while import CallsRepeatWhile
+from infobip_api_client.models.calls_say import CallsSay
+from infobip_api_client.models.calls_send_sms import CallsSendSms
+from infobip_api_client.models.calls_set_variable import CallsSetVariable
+from infobip_api_client.models.calls_switch_case import CallsSwitchCase
+from infobip_api_client.models.calls_while_do import CallsWhileDo
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+CALLSSCRIPTINNER_ONE_OF_SCHEMAS = [
+ "CallsCallApi",
+ "CallsCapture",
+ "CallsCollect",
+ "CallsDial",
+ "CallsDialToConversations",
+ "CallsDialToMany",
+ "CallsDialToWebRTC",
+ "CallsForEach",
+ "CallsGoTo",
+ "CallsHangup",
+ "CallsIfThenElse",
+ "CallsMachineDetection",
+ "CallsPause",
+ "CallsPlay",
+ "CallsPlayFromRecording",
+ "CallsRecord",
+ "CallsRepeatUntil",
+ "CallsRepeatWhile",
+ "CallsSay",
+ "CallsSendSms",
+ "CallsSetVariable",
+ "CallsSwitchCase",
+ "CallsWhileDo",
+]
+
+
+class CallsScriptInner(BaseModel):
+ """
+ CallsScriptInner
+ """
+
+ # data type: CallsCallApi
+ oneof_schema_1_validator: Optional[CallsCallApi] = None
+ # data type: CallsCapture
+ oneof_schema_2_validator: Optional[CallsCapture] = None
+ # data type: CallsCollect
+ oneof_schema_3_validator: Optional[CallsCollect] = None
+ # data type: CallsDial
+ oneof_schema_4_validator: Optional[CallsDial] = None
+ # data type: CallsDialToMany
+ oneof_schema_5_validator: Optional[CallsDialToMany] = None
+ # data type: CallsDialToWebRTC
+ oneof_schema_6_validator: Optional[CallsDialToWebRTC] = None
+ # data type: CallsDialToConversations
+ oneof_schema_7_validator: Optional[CallsDialToConversations] = None
+ # data type: CallsForEach
+ oneof_schema_8_validator: Optional[CallsForEach] = None
+ # data type: CallsGoTo
+ oneof_schema_9_validator: Optional[CallsGoTo] = None
+ # data type: CallsHangup
+ oneof_schema_10_validator: Optional[CallsHangup] = None
+ # data type: CallsIfThenElse
+ oneof_schema_11_validator: Optional[CallsIfThenElse] = None
+ # data type: CallsMachineDetection
+ oneof_schema_12_validator: Optional[CallsMachineDetection] = None
+ # data type: CallsPause
+ oneof_schema_13_validator: Optional[CallsPause] = None
+ # data type: CallsPlay
+ oneof_schema_14_validator: Optional[CallsPlay] = None
+ # data type: CallsPlayFromRecording
+ oneof_schema_15_validator: Optional[CallsPlayFromRecording] = None
+ # data type: CallsRecord
+ oneof_schema_16_validator: Optional[CallsRecord] = None
+ # data type: CallsRepeatUntil
+ oneof_schema_17_validator: Optional[CallsRepeatUntil] = None
+ # data type: CallsRepeatWhile
+ oneof_schema_18_validator: Optional[CallsRepeatWhile] = None
+ # data type: CallsSay
+ oneof_schema_19_validator: Optional[CallsSay] = None
+ # data type: CallsSendSms
+ oneof_schema_20_validator: Optional[CallsSendSms] = None
+ # data type: CallsSetVariable
+ oneof_schema_21_validator: Optional[CallsSetVariable] = None
+ # data type: CallsSwitchCase
+ oneof_schema_22_validator: Optional[CallsSwitchCase] = None
+ # data type: CallsWhileDo
+ oneof_schema_23_validator: Optional[CallsWhileDo] = None
+ actual_instance: Optional[
+ Union[
+ CallsCallApi,
+ CallsCapture,
+ CallsCollect,
+ CallsDial,
+ CallsDialToConversations,
+ CallsDialToMany,
+ CallsDialToWebRTC,
+ CallsForEach,
+ CallsGoTo,
+ CallsHangup,
+ CallsIfThenElse,
+ CallsMachineDetection,
+ CallsPause,
+ CallsPlay,
+ CallsPlayFromRecording,
+ CallsRecord,
+ CallsRepeatUntil,
+ CallsRepeatWhile,
+ CallsSay,
+ CallsSendSms,
+ CallsSetVariable,
+ CallsSwitchCase,
+ CallsWhileDo,
+ ]
+ ] = None
+ one_of_schemas: Set[str] = Field(
+ default_factory=lambda: {
+ "CallsCallApi",
+ "CallsCapture",
+ "CallsCollect",
+ "CallsDial",
+ "CallsDialToConversations",
+ "CallsDialToMany",
+ "CallsDialToWebRTC",
+ "CallsForEach",
+ "CallsGoTo",
+ "CallsHangup",
+ "CallsIfThenElse",
+ "CallsMachineDetection",
+ "CallsPause",
+ "CallsPlay",
+ "CallsPlayFromRecording",
+ "CallsRecord",
+ "CallsRepeatUntil",
+ "CallsRepeatWhile",
+ "CallsSay",
+ "CallsSendSms",
+ "CallsSetVariable",
+ "CallsSwitchCase",
+ "CallsWhileDo",
+ }
+ )
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError(
+ "If a position argument is used, only 1 is allowed to set `actual_instance`"
+ )
+ if kwargs:
+ raise ValueError(
+ "If a position argument is used, keyword arguments cannot be used."
+ )
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator("actual_instance")
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = CallsScriptInner.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: CallsCallApi
+ if not isinstance(v, CallsCallApi):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsCallApi`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsCapture
+ if not isinstance(v, CallsCapture):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsCapture`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsCollect
+ if not isinstance(v, CallsCollect):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsCollect`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsDial
+ if not isinstance(v, CallsDial):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CallsDial`")
+ else:
+ match += 1
+ # validate data type: CallsDialToMany
+ if not isinstance(v, CallsDialToMany):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsDialToMany`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsDialToWebRTC
+ if not isinstance(v, CallsDialToWebRTC):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsDialToWebRTC`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsDialToConversations
+ if not isinstance(v, CallsDialToConversations):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsDialToConversations`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsForEach
+ if not isinstance(v, CallsForEach):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsForEach`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsGoTo
+ if not isinstance(v, CallsGoTo):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CallsGoTo`")
+ else:
+ match += 1
+ # validate data type: CallsHangup
+ if not isinstance(v, CallsHangup):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CallsHangup`")
+ else:
+ match += 1
+ # validate data type: CallsIfThenElse
+ if not isinstance(v, CallsIfThenElse):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsIfThenElse`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsMachineDetection
+ if not isinstance(v, CallsMachineDetection):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsMachineDetection`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsPause
+ if not isinstance(v, CallsPause):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CallsPause`")
+ else:
+ match += 1
+ # validate data type: CallsPlay
+ if not isinstance(v, CallsPlay):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CallsPlay`")
+ else:
+ match += 1
+ # validate data type: CallsPlayFromRecording
+ if not isinstance(v, CallsPlayFromRecording):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsPlayFromRecording`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsRecord
+ if not isinstance(v, CallsRecord):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CallsRecord`")
+ else:
+ match += 1
+ # validate data type: CallsRepeatUntil
+ if not isinstance(v, CallsRepeatUntil):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsRepeatUntil`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsRepeatWhile
+ if not isinstance(v, CallsRepeatWhile):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsRepeatWhile`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsSay
+ if not isinstance(v, CallsSay):
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CallsSay`")
+ else:
+ match += 1
+ # validate data type: CallsSendSms
+ if not isinstance(v, CallsSendSms):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsSendSms`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsSetVariable
+ if not isinstance(v, CallsSetVariable):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsSetVariable`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsSwitchCase
+ if not isinstance(v, CallsSwitchCase):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsSwitchCase`"
+ )
+ else:
+ match += 1
+ # validate data type: CallsWhileDo
+ if not isinstance(v, CallsWhileDo):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `CallsWhileDo`"
+ )
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError(
+ "Multiple matches found when setting `actual_instance` in CallsScriptInner with oneOf schemas: CallsCallApi, CallsCapture, CallsCollect, CallsDial, CallsDialToConversations, CallsDialToMany, CallsDialToWebRTC, CallsForEach, CallsGoTo, CallsHangup, CallsIfThenElse, CallsMachineDetection, CallsPause, CallsPlay, CallsPlayFromRecording, CallsRecord, CallsRepeatUntil, CallsRepeatWhile, CallsSay, CallsSendSms, CallsSetVariable, CallsSwitchCase, CallsWhileDo. Details: "
+ + ", ".join(error_messages)
+ )
+ elif match == 0:
+ # no match
+ raise ValueError(
+ "No match found when setting `actual_instance` in CallsScriptInner with oneOf schemas: CallsCallApi, CallsCapture, CallsCollect, CallsDial, CallsDialToConversations, CallsDialToMany, CallsDialToWebRTC, CallsForEach, CallsGoTo, CallsHangup, CallsIfThenElse, CallsMachineDetection, CallsPause, CallsPlay, CallsPlayFromRecording, CallsRecord, CallsRepeatUntil, CallsRepeatWhile, CallsSay, CallsSendSms, CallsSetVariable, CallsSwitchCase, CallsWhileDo. Details: "
+ + ", ".join(error_messages)
+ )
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into CallsCallApi
+ try:
+ instance.actual_instance = CallsCallApi.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsCapture
+ try:
+ instance.actual_instance = CallsCapture.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsCollect
+ try:
+ instance.actual_instance = CallsCollect.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsDial
+ try:
+ instance.actual_instance = CallsDial.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsDialToMany
+ try:
+ instance.actual_instance = CallsDialToMany.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsDialToWebRTC
+ try:
+ instance.actual_instance = CallsDialToWebRTC.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsDialToConversations
+ try:
+ instance.actual_instance = CallsDialToConversations.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsForEach
+ try:
+ instance.actual_instance = CallsForEach.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsGoTo
+ try:
+ instance.actual_instance = CallsGoTo.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsHangup
+ try:
+ instance.actual_instance = CallsHangup.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsIfThenElse
+ try:
+ instance.actual_instance = CallsIfThenElse.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsMachineDetection
+ try:
+ instance.actual_instance = CallsMachineDetection.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsPause
+ try:
+ instance.actual_instance = CallsPause.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsPlay
+ try:
+ instance.actual_instance = CallsPlay.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsPlayFromRecording
+ try:
+ instance.actual_instance = CallsPlayFromRecording.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsRecord
+ try:
+ instance.actual_instance = CallsRecord.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsRepeatUntil
+ try:
+ instance.actual_instance = CallsRepeatUntil.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsRepeatWhile
+ try:
+ instance.actual_instance = CallsRepeatWhile.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsSay
+ try:
+ instance.actual_instance = CallsSay.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsSendSms
+ try:
+ instance.actual_instance = CallsSendSms.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsSetVariable
+ try:
+ instance.actual_instance = CallsSetVariable.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsSwitchCase
+ try:
+ instance.actual_instance = CallsSwitchCase.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into CallsWhileDo
+ try:
+ instance.actual_instance = CallsWhileDo.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError(
+ "Multiple matches found when deserializing the JSON string into CallsScriptInner with oneOf schemas: CallsCallApi, CallsCapture, CallsCollect, CallsDial, CallsDialToConversations, CallsDialToMany, CallsDialToWebRTC, CallsForEach, CallsGoTo, CallsHangup, CallsIfThenElse, CallsMachineDetection, CallsPause, CallsPlay, CallsPlayFromRecording, CallsRecord, CallsRepeatUntil, CallsRepeatWhile, CallsSay, CallsSendSms, CallsSetVariable, CallsSwitchCase, CallsWhileDo. Details: "
+ + ", ".join(error_messages)
+ )
+ elif match == 0:
+ # no match
+ raise ValueError(
+ "No match found when deserializing the JSON string into CallsScriptInner with oneOf schemas: CallsCallApi, CallsCapture, CallsCollect, CallsDial, CallsDialToConversations, CallsDialToMany, CallsDialToWebRTC, CallsForEach, CallsGoTo, CallsHangup, CallsIfThenElse, CallsMachineDetection, CallsPause, CallsPlay, CallsPlayFromRecording, CallsRecord, CallsRepeatUntil, CallsRepeatWhile, CallsSay, CallsSendSms, CallsSetVariable, CallsSwitchCase, CallsWhileDo. Details: "
+ + ", ".join(error_messages)
+ )
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(
+ self.actual_instance.to_json
+ ):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(
+ self,
+ ) -> Optional[
+ Union[
+ Dict[str, Any],
+ CallsCallApi,
+ CallsCapture,
+ CallsCollect,
+ CallsDial,
+ CallsDialToConversations,
+ CallsDialToMany,
+ CallsDialToWebRTC,
+ CallsForEach,
+ CallsGoTo,
+ CallsHangup,
+ CallsIfThenElse,
+ CallsMachineDetection,
+ CallsPause,
+ CallsPlay,
+ CallsPlayFromRecording,
+ CallsRecord,
+ CallsRepeatUntil,
+ CallsRepeatWhile,
+ CallsSay,
+ CallsSendSms,
+ CallsSetVariable,
+ CallsSwitchCase,
+ CallsWhileDo,
+ ]
+ ]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(
+ self.actual_instance.to_dict
+ ):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
diff --git a/infobip_api_client/models/calls_search_response.py b/infobip_api_client/models/calls_search_response.py
new file mode 100644
index 0000000..b740091
--- /dev/null
+++ b/infobip_api_client/models/calls_search_response.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsSearchResponse(BaseModel):
+ """
+ CallsSearchResponse
+ """ # noqa: E501
+
+ create_time: Optional[datetime] = Field(
+ default=None, description="Creation timestamp.", alias="createTime"
+ )
+ description: Optional[StrictStr] = Field(
+ default=None, description="Scenario description."
+ )
+ id: Optional[StrictStr] = Field(
+ default=None, description="Scenario key. It is used for launching IVR scenario."
+ )
+ name: Optional[StrictStr] = Field(default=None, description="Scenario name.")
+ script: Optional[Dict[str, Any]] = Field(
+ default=None, description="The list of scenario actions."
+ )
+ update_time: Optional[datetime] = Field(
+ default=None, description="Update timestamp", alias="updateTime"
+ )
+ last_usage_date: Optional[datetime] = Field(
+ default=None,
+ description="Last usage date. `null` for scenarios that are used last time before `2024-01-01`.",
+ alias="lastUsageDate",
+ )
+ __properties: ClassVar[List[str]] = [
+ "createTime",
+ "description",
+ "id",
+ "name",
+ "script",
+ "updateTime",
+ "lastUsageDate",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsSearchResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsSearchResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "createTime": obj.get("createTime"),
+ "description": obj.get("description"),
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "script": obj.get("script"),
+ "updateTime": obj.get("updateTime"),
+ "lastUsageDate": obj.get("lastUsageDate"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_selection_strategy.py b/infobip_api_client/models/calls_selection_strategy.py
index c1e97c8..8abe493 100644
--- a/infobip_api_client/models/calls_selection_strategy.py
+++ b/infobip_api_client/models/calls_selection_strategy.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_send_sms.py b/infobip_api_client/models/calls_send_sms.py
new file mode 100644
index 0000000..4354baf
--- /dev/null
+++ b/infobip_api_client/models/calls_send_sms.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_send_sms_data import CallsSendSmsData
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsSendSms(BaseModel):
+ """
+ Send SMS action creates and sends a text message from the scenario.
+ """ # noqa: E501
+
+ send_sms: CallsSendSmsData = Field(alias="sendSms")
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = ["sendSms", "actionId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsSendSms from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of send_sms
+ if self.send_sms:
+ _dict["sendSms"] = self.send_sms.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsSendSms from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "sendSms": CallsSendSmsData.from_dict(obj["sendSms"])
+ if obj.get("sendSms") is not None
+ else None,
+ "actionId": obj.get("actionId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_send_sms_data.py b/infobip_api_client/models/calls_send_sms_data.py
new file mode 100644
index 0000000..7a502a6
--- /dev/null
+++ b/infobip_api_client/models/calls_send_sms_data.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsSendSmsData(BaseModel):
+ """
+ CallsSendSmsData
+ """ # noqa: E501
+
+ text: StrictStr = Field(description="The text of the message that will be sent.")
+ var_from: Optional[StrictStr] = Field(
+ default=None,
+ description="Represents sender ID and it can be alphanumeric or numeric; alphanumeric sender ID length should be between 3 and 11 characters; numeric sender ID length should be between 3 and 14 characters; the parameter can be constructed using variables",
+ alias="from",
+ )
+ to: StrictStr = Field(
+ description="Must be a valid E164 MSISDN; the parameter can be constructed using variables"
+ )
+ __properties: ClassVar[List[str]] = ["text", "from", "to"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsSendSmsData from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsSendSmsData from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"text": obj.get("text"), "from": obj.get("from"), "to": obj.get("to")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_send_to_reports.py b/infobip_api_client/models/calls_send_to_reports.py
new file mode 100644
index 0000000..faaafba
--- /dev/null
+++ b/infobip_api_client/models/calls_send_to_reports.py
@@ -0,0 +1,36 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallsSendToReports(str, Enum):
+ """
+ Choose if you want to show DTMF inputs in Voice reports and logs. Options are: ALWAYS (always send - default value), MASKED (send masked - xxxx will be shown in reports and logs), NEVER (don't send - DTMF inputs will not be shown in reports and logs).
+ """
+
+ """
+ allowed enum values
+ """
+ ALWAYS = "ALWAYS"
+ MASKED = "MASKED"
+ NEVER = "NEVER"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallsSendToReports from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_sending_speed.py b/infobip_api_client/models/calls_sending_speed.py
index 614c06a..69ba301 100644
--- a/infobip_api_client/models/calls_sending_speed.py
+++ b/infobip_api_client/models/calls_sending_speed.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_set_variable.py b/infobip_api_client/models/calls_set_variable.py
new file mode 100644
index 0000000..c8c76c6
--- /dev/null
+++ b/infobip_api_client/models/calls_set_variable.py
@@ -0,0 +1,88 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsSetVariable(BaseModel):
+ """
+ Set variable action makes it possible to set a variable defined inside the IVR scenario to a specified value.
+ """ # noqa: E501
+
+ set_variable: StrictStr = Field(
+ description="Name of a variable.", alias="setVariable"
+ )
+ value: StrictStr = Field(description="Value to which the variable should be set.")
+ __properties: ClassVar[List[str]] = ["setVariable", "value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsSetVariable from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsSetVariable from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"setVariable": obj.get("setVariable"), "value": obj.get("value")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_sftp_upload_status.py b/infobip_api_client/models/calls_sftp_upload_status.py
new file mode 100644
index 0000000..72b3a0a
--- /dev/null
+++ b/infobip_api_client/models/calls_sftp_upload_status.py
@@ -0,0 +1,36 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallsSftpUploadStatus(str, Enum):
+ """
+ Indicates current status of the recording file being uploaded via SFTP.
+ """
+
+ """
+ allowed enum values
+ """
+ UPLOADING = "UPLOADING"
+ UPLOADED = "UPLOADED"
+ FAILED = "FAILED"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallsSftpUploadStatus from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_single_body.py b/infobip_api_client/models/calls_single_body.py
index 4f4917d..aba01b4 100644
--- a/infobip_api_client/models/calls_single_body.py
+++ b/infobip_api_client/models/calls_single_body.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_single_message_status.py b/infobip_api_client/models/calls_single_message_status.py
index 55f6542..f36a5c7 100644
--- a/infobip_api_client/models/calls_single_message_status.py
+++ b/infobip_api_client/models/calls_single_message_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_sip_endpoint.py b/infobip_api_client/models/calls_sip_endpoint.py
index 974ba9f..0c35691 100644
--- a/infobip_api_client/models/calls_sip_endpoint.py
+++ b/infobip_api_client/models/calls_sip_endpoint.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_sip_options.py b/infobip_api_client/models/calls_sip_options.py
index 72e3523..f50d678 100644
--- a/infobip_api_client/models/calls_sip_options.py
+++ b/infobip_api_client/models/calls_sip_options.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_sip_trunk_action_status.py b/infobip_api_client/models/calls_sip_trunk_action_status.py
index df7da2b..e155289 100644
--- a/infobip_api_client/models/calls_sip_trunk_action_status.py
+++ b/infobip_api_client/models/calls_sip_trunk_action_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_sip_trunk_action_status_response.py b/infobip_api_client/models/calls_sip_trunk_action_status_response.py
index 692c97c..61778c5 100644
--- a/infobip_api_client/models/calls_sip_trunk_action_status_response.py
+++ b/infobip_api_client/models/calls_sip_trunk_action_status_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_sip_trunk_admin_status.py b/infobip_api_client/models/calls_sip_trunk_admin_status.py
index 2ce896e..1751cf4 100644
--- a/infobip_api_client/models/calls_sip_trunk_admin_status.py
+++ b/infobip_api_client/models/calls_sip_trunk_admin_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_sip_trunk_location.py b/infobip_api_client/models/calls_sip_trunk_location.py
index ada04b2..d0049ba 100644
--- a/infobip_api_client/models/calls_sip_trunk_location.py
+++ b/infobip_api_client/models/calls_sip_trunk_location.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_sip_trunk_page.py b/infobip_api_client/models/calls_sip_trunk_page.py
index ab2948e..9c7502b 100644
--- a/infobip_api_client/models/calls_sip_trunk_page.py
+++ b/infobip_api_client/models/calls_sip_trunk_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_sip_trunk_registration_credentials.py b/infobip_api_client/models/calls_sip_trunk_registration_credentials.py
new file mode 100644
index 0000000..63559e6
--- /dev/null
+++ b/infobip_api_client/models/calls_sip_trunk_registration_credentials.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsSipTrunkRegistrationCredentials(BaseModel):
+ """
+ CallsSipTrunkRegistrationCredentials
+ """ # noqa: E501
+
+ username: Optional[StrictStr] = Field(
+ default=None, description="Registration username."
+ )
+ password: Optional[StrictStr] = Field(
+ default=None, description="New registration password."
+ )
+ __properties: ClassVar[List[str]] = ["username", "password"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsSipTrunkRegistrationCredentials from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsSipTrunkRegistrationCredentials from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"username": obj.get("username"), "password": obj.get("password")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_sip_trunk_registration_status.py b/infobip_api_client/models/calls_sip_trunk_registration_status.py
index ed1ccdf..0c43173 100644
--- a/infobip_api_client/models/calls_sip_trunk_registration_status.py
+++ b/infobip_api_client/models/calls_sip_trunk_registration_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_sip_trunk_request.py b/infobip_api_client/models/calls_sip_trunk_request.py
index 7f515a8..4fc9ed7 100644
--- a/infobip_api_client/models/calls_sip_trunk_request.py
+++ b/infobip_api_client/models/calls_sip_trunk_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -23,10 +22,8 @@
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing_extensions import Annotated
from infobip_api_client.models.calls_billing_package import CallsBillingPackage
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
@@ -49,11 +46,15 @@ class CallsSipTrunkRequest(BaseModel):
CallsSipTrunkRequest
""" # noqa: E501
- type: Optional[CallsPegasusSipTrunkType] = None
+ type: Optional[CallsSipTrunkType] = None
name: Annotated[str, Field(min_length=0, strict=True, max_length=128)] = Field(
description="SIP trunk name."
)
- location: CallsSipTrunkLocation
+ location: Optional[CallsSipTrunkLocation] = None
+ tls: Optional[StrictBool] = Field(
+ default=False,
+ description="Indicates whether communication is secured by the TLS protocol.",
+ )
international_calls_allowed: Optional[StrictBool] = Field(
default=False,
description="Indicates whether international calls should be allowed. Calls between different countries are considered international.",
@@ -67,6 +68,7 @@ class CallsSipTrunkRequest(BaseModel):
"type",
"name",
"location",
+ "tls",
"internationalCallsAllowed",
"channelLimit",
"billingPackage",
diff --git a/infobip_api_client/models/calls_sip_trunk_response.py b/infobip_api_client/models/calls_sip_trunk_response.py
index 936dce5..1aecc43 100644
--- a/infobip_api_client/models/calls_sip_trunk_response.py
+++ b/infobip_api_client/models/calls_sip_trunk_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -29,18 +28,19 @@
from infobip_api_client.models.calls_number_presentation_format import (
CallsNumberPresentationFormat,
)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
from infobip_api_client.models.calls_sbc_hosts import CallsSbcHosts
from infobip_api_client.models.calls_sip_options import CallsSipOptions
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
from typing import TYPE_CHECKING
if TYPE_CHECKING:
+ from infobip_api_client.models.calls_provider_sip_trunk_response import (
+ CallsProviderSipTrunkResponse,
+ )
from infobip_api_client.models.calls_registered_sip_trunk_response import (
CallsRegisteredSipTrunkResponse,
)
@@ -55,7 +55,7 @@ class CallsSipTrunkResponse(BaseModel):
""" # noqa: E501
id: Optional[StrictStr] = Field(default=None, description="SIP trunk ID.")
- type: Optional[CallsPegasusSipTrunkType] = None
+ type: Optional[CallsSipTrunkType] = None
name: Optional[StrictStr] = Field(default=None, description="SIP trunk name.")
location: Optional[CallsSipTrunkLocation] = None
tls: Optional[StrictBool] = Field(
@@ -115,6 +115,7 @@ class CallsSipTrunkResponse(BaseModel):
# discriminator mappings
__discriminator_value_class_map: ClassVar[Dict[str, str]] = {
+ "PROVIDER": "CallsProviderSipTrunkResponse",
"REGISTERED": "CallsRegisteredSipTrunkResponse",
"STATIC": "CallsStaticSipTrunkResponse",
}
@@ -140,7 +141,13 @@ def to_json(self) -> str:
@classmethod
def from_json(
cls, json_str: str
- ) -> Optional[Union[CallsRegisteredSipTrunkResponse, CallsStaticSipTrunkResponse]]:
+ ) -> Optional[
+ Union[
+ CallsProviderSipTrunkResponse,
+ CallsRegisteredSipTrunkResponse,
+ CallsStaticSipTrunkResponse,
+ ]
+ ]:
"""Create an instance of CallsSipTrunkResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
@@ -175,10 +182,20 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(
cls, obj: Dict[str, Any]
- ) -> Optional[Union[CallsRegisteredSipTrunkResponse, CallsStaticSipTrunkResponse]]:
+ ) -> Optional[
+ Union[
+ CallsProviderSipTrunkResponse,
+ CallsRegisteredSipTrunkResponse,
+ CallsStaticSipTrunkResponse,
+ ]
+ ]:
"""Create an instance of CallsSipTrunkResponse from a dict"""
# look up the object type based on discriminator mapping
object_type = cls.get_discriminator_value(obj)
+ if object_type == "CallsProviderSipTrunkResponse":
+ return import_module(
+ "infobip_api_client.models.calls_provider_sip_trunk_response"
+ ).CallsProviderSipTrunkResponse.from_dict(obj)
if object_type == "CallsRegisteredSipTrunkResponse":
return import_module(
"infobip_api_client.models.calls_registered_sip_trunk_response"
diff --git a/infobip_api_client/models/calls_sip_trunk_service_address_page.py b/infobip_api_client/models/calls_sip_trunk_service_address_page.py
index d56e401..b44c883 100644
--- a/infobip_api_client/models/calls_sip_trunk_service_address_page.py
+++ b/infobip_api_client/models/calls_sip_trunk_service_address_page.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_sip_trunk_status_request.py b/infobip_api_client/models/calls_sip_trunk_status_request.py
index d244a0b..e44340a 100644
--- a/infobip_api_client/models/calls_sip_trunk_status_request.py
+++ b/infobip_api_client/models/calls_sip_trunk_status_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_sip_trunk_status_response.py b/infobip_api_client/models/calls_sip_trunk_status_response.py
index 68042cf..7f27831 100644
--- a/infobip_api_client/models/calls_sip_trunk_status_response.py
+++ b/infobip_api_client/models/calls_sip_trunk_status_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_pegasus_sip_trunk_type.py b/infobip_api_client/models/calls_sip_trunk_type.py
similarity index 85%
rename from infobip_api_client/models/calls_pegasus_sip_trunk_type.py
rename to infobip_api_client/models/calls_sip_trunk_type.py
index 1356fce..faf5c74 100644
--- a/infobip_api_client/models/calls_pegasus_sip_trunk_type.py
+++ b/infobip_api_client/models/calls_sip_trunk_type.py
@@ -12,14 +12,13 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
-class CallsPegasusSipTrunkType(str, Enum):
+class CallsSipTrunkType(str, Enum):
"""
SIP trunk type.
"""
@@ -33,5 +32,5 @@ class CallsPegasusSipTrunkType(str, Enum):
@classmethod
def from_json(cls, json_str: str) -> Self:
- """Create an instance of CallsPegasusSipTrunkType from a JSON string"""
+ """Create an instance of CallsSipTrunkType from a JSON string"""
return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_sip_trunk_update_request.py b/infobip_api_client/models/calls_sip_trunk_update_request.py
index fc680df..9ab5ffa 100644
--- a/infobip_api_client/models/calls_sip_trunk_update_request.py
+++ b/infobip_api_client/models/calls_sip_trunk_update_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -22,22 +21,16 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing_extensions import Annotated
-from infobip_api_client.models.calls_anonymization_type import CallsAnonymizationType
-from infobip_api_client.models.calls_audio_codec import CallsAudioCodec
-from infobip_api_client.models.calls_dtmf_type import CallsDtmfType
-from infobip_api_client.models.calls_fax_type import CallsFaxType
-from infobip_api_client.models.calls_number_presentation_format import (
- CallsNumberPresentationFormat,
-)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
from typing import TYPE_CHECKING
if TYPE_CHECKING:
+ from infobip_api_client.models.calls_provider_sip_trunk_update_request import (
+ CallsProviderSipTrunkUpdateRequest,
+ )
from infobip_api_client.models.calls_registered_sip_trunk_update_request import (
CallsRegisteredSipTrunkUpdateRequest,
)
@@ -51,16 +44,8 @@ class CallsSipTrunkUpdateRequest(BaseModel):
CallsSipTrunkUpdateRequest
""" # noqa: E501
- type: Optional[CallsPegasusSipTrunkType] = None
+ type: Optional[CallsSipTrunkType] = None
name: StrictStr = Field(description="SIP trunk name.")
- codecs: Optional[List[CallsAudioCodec]] = Field(
- default=None, description="List of audio codecs supported by a SIP trunk."
- )
- dtmf: Optional[CallsDtmfType] = None
- fax: Optional[CallsFaxType] = None
- number_format: Optional[CallsNumberPresentationFormat] = Field(
- default=None, alias="numberFormat"
- )
international_calls_allowed: Optional[StrictBool] = Field(
default=False,
description="Indicates whether international calls should be allowed. Calls between different countries are considered international.",
@@ -71,17 +56,11 @@ class CallsSipTrunkUpdateRequest(BaseModel):
description="Maximum number of concurrent channels.",
alias="channelLimit",
)
- anonymization: Optional[CallsAnonymizationType] = None
__properties: ClassVar[List[str]] = [
"type",
"name",
- "codecs",
- "dtmf",
- "fax",
- "numberFormat",
"internationalCallsAllowed",
"channelLimit",
- "anonymization",
]
model_config = ConfigDict(
@@ -95,6 +74,7 @@ class CallsSipTrunkUpdateRequest(BaseModel):
# discriminator mappings
__discriminator_value_class_map: ClassVar[Dict[str, str]] = {
+ "PROVIDER": "CallsProviderSipTrunkUpdateRequest",
"REGISTERED": "CallsRegisteredSipTrunkUpdateRequest",
"STATIC": "CallsStaticSipTrunkUpdateRequest",
}
@@ -121,7 +101,11 @@ def to_json(self) -> str:
def from_json(
cls, json_str: str
) -> Optional[
- Union[CallsRegisteredSipTrunkUpdateRequest, CallsStaticSipTrunkUpdateRequest]
+ Union[
+ CallsProviderSipTrunkUpdateRequest,
+ CallsRegisteredSipTrunkUpdateRequest,
+ CallsStaticSipTrunkUpdateRequest,
+ ]
]:
"""Create an instance of CallsSipTrunkUpdateRequest from a JSON string"""
return cls.from_dict(json.loads(json_str))
@@ -149,11 +133,19 @@ def to_dict(self) -> Dict[str, Any]:
def from_dict(
cls, obj: Dict[str, Any]
) -> Optional[
- Union[CallsRegisteredSipTrunkUpdateRequest, CallsStaticSipTrunkUpdateRequest]
+ Union[
+ CallsProviderSipTrunkUpdateRequest,
+ CallsRegisteredSipTrunkUpdateRequest,
+ CallsStaticSipTrunkUpdateRequest,
+ ]
]:
"""Create an instance of CallsSipTrunkUpdateRequest from a dict"""
# look up the object type based on discriminator mapping
object_type = cls.get_discriminator_value(obj)
+ if object_type == "CallsProviderSipTrunkUpdateRequest":
+ return import_module(
+ "infobip_api_client.models.calls_provider_sip_trunk_update_request"
+ ).CallsProviderSipTrunkUpdateRequest.from_dict(obj)
if object_type == "CallsRegisteredSipTrunkUpdateRequest":
return import_module(
"infobip_api_client.models.calls_registered_sip_trunk_update_request"
diff --git a/infobip_api_client/models/calls_speech_capture_request.py b/infobip_api_client/models/calls_speech_capture_request.py
index 2e6a77f..83d9b21 100644
--- a/infobip_api_client/models/calls_speech_capture_request.py
+++ b/infobip_api_client/models/calls_speech_capture_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_speech_options.py b/infobip_api_client/models/calls_speech_options.py
new file mode 100644
index 0000000..f3cf548
--- /dev/null
+++ b/infobip_api_client/models/calls_speech_options.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsSpeechOptions(BaseModel):
+ """
+ CallsSpeechOptions
+ """ # noqa: E501
+
+ language: StrictStr = Field(
+ description="Language used in speech that needs to be captured. For full list of supported languages see [LINK](https://www.infobip.com/docs/voice-and-video/interactive-voice-response-ivr#speech-recognition-supported-languages-ivr-over-api)."
+ )
+ key_phrases: Optional[List[StrictStr]] = Field(
+ default=None,
+ description="Array of keyphrases used for matching capturing speech. If full captured text contains one of the specified phrases, that phrase will be set in variable specified in capture parameter. If keyphrases are not set or no matching is done, variable will be set to empty string. Every keyphrase can contain up to 5 words and number of keyphrases is not limited.",
+ alias="keyPhrases",
+ )
+ max_silence: Optional[Annotated[int, Field(le=5, strict=True, ge=1)]] = Field(
+ default=None,
+ description="If used, this parameter defines the number of seconds of silence that will stop capturing. For example value of 3 defines that capturing stops as soon as 3 seconds of silence is detected or when timeout expires, whichever happens first. Minimum value is 1 and maximum value is 5.",
+ alias="maxSilence",
+ )
+ __properties: ClassVar[List[str]] = ["language", "keyPhrases", "maxSilence"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsSpeechOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsSpeechOptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "language": obj.get("language"),
+ "keyPhrases": obj.get("keyPhrases"),
+ "maxSilence": obj.get("maxSilence"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_start_media_stream_request.py b/infobip_api_client/models/calls_start_media_stream_request.py
index 6312827..a488a70 100644
--- a/infobip_api_client/models/calls_start_media_stream_request.py
+++ b/infobip_api_client/models/calls_start_media_stream_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_start_transcription_request.py b/infobip_api_client/models/calls_start_transcription_request.py
new file mode 100644
index 0000000..caff3ca
--- /dev/null
+++ b/infobip_api_client/models/calls_start_transcription_request.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_transcription import CallsTranscription
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsStartTranscriptionRequest(BaseModel):
+ """
+ CallsStartTranscriptionRequest
+ """ # noqa: E501
+
+ transcription: Optional[CallsTranscription] = None
+ __properties: ClassVar[List[str]] = ["transcription"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsStartTranscriptionRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of transcription
+ if self.transcription:
+ _dict["transcription"] = self.transcription.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsStartTranscriptionRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "transcription": CallsTranscription.from_dict(obj["transcription"])
+ if obj.get("transcription") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_static_sip_trunk_request.py b/infobip_api_client/models/calls_static_sip_trunk_request.py
index 5c696c5..c01342c 100644
--- a/infobip_api_client/models/calls_static_sip_trunk_request.py
+++ b/infobip_api_client/models/calls_static_sip_trunk_request.py
@@ -12,13 +12,12 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import ConfigDict, Field, StrictBool, StrictStr
+from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.calls_anonymization_type import CallsAnonymizationType
from infobip_api_client.models.calls_audio_codec import CallsAudioCodec
@@ -28,13 +27,11 @@
from infobip_api_client.models.calls_number_presentation_format import (
CallsNumberPresentationFormat,
)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
from infobip_api_client.models.calls_selection_strategy import CallsSelectionStrategy
from infobip_api_client.models.calls_sip_options import CallsSipOptions
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
from infobip_api_client.models.calls_sip_trunk_request import CallsSipTrunkRequest
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
@@ -44,10 +41,6 @@ class CallsStaticSipTrunkRequest(CallsSipTrunkRequest):
CallsStaticSipTrunkRequest
""" # noqa: E501
- tls: Optional[StrictBool] = Field(
- default=False,
- description="Indicates whether communication is secured by the TLS protocol.",
- )
codecs: Optional[List[CallsAudioCodec]] = Field(
default=None, description="List of audio codecs supported by a SIP trunk."
)
@@ -59,7 +52,7 @@ class CallsStaticSipTrunkRequest(CallsSipTrunkRequest):
anonymization: Optional[CallsAnonymizationType] = None
source_hosts: Optional[List[StrictStr]] = Field(
default=None,
- description="List of SIP trunk source hosts. If empty, destination host list must not be empty. Source hosts can be send in 2 formats: IP address without port or domain without port.",
+ description="List of SIP trunk source hosts. If empty, destination host list must not be empty. Source hosts can be sent in 2 formats: IP address without port or domain without port.",
alias="sourceHosts",
)
destination_hosts: Optional[List[StrictStr]] = Field(
@@ -73,10 +66,10 @@ class CallsStaticSipTrunkRequest(CallsSipTrunkRequest):
"type",
"name",
"location",
+ "tls",
"internationalCallsAllowed",
"channelLimit",
"billingPackage",
- "tls",
"codecs",
"dtmf",
"fax",
@@ -147,6 +140,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"type": obj.get("type"),
"name": obj.get("name"),
"location": obj.get("location"),
+ "tls": obj.get("tls") if obj.get("tls") is not None else False,
"internationalCallsAllowed": obj.get("internationalCallsAllowed")
if obj.get("internationalCallsAllowed") is not None
else False,
@@ -154,7 +148,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"billingPackage": CallsBillingPackage.from_dict(obj["billingPackage"])
if obj.get("billingPackage") is not None
else None,
- "tls": obj.get("tls") if obj.get("tls") is not None else False,
"codecs": obj.get("codecs"),
"dtmf": obj.get("dtmf"),
"fax": obj.get("fax"),
diff --git a/infobip_api_client/models/calls_static_sip_trunk_response.py b/infobip_api_client/models/calls_static_sip_trunk_response.py
index 88598de..a23357c 100644
--- a/infobip_api_client/models/calls_static_sip_trunk_response.py
+++ b/infobip_api_client/models/calls_static_sip_trunk_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -28,14 +27,12 @@
from infobip_api_client.models.calls_number_presentation_format import (
CallsNumberPresentationFormat,
)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
from infobip_api_client.models.calls_sbc_hosts import CallsSbcHosts
from infobip_api_client.models.calls_selection_strategy import CallsSelectionStrategy
from infobip_api_client.models.calls_sip_options import CallsSipOptions
from infobip_api_client.models.calls_sip_trunk_location import CallsSipTrunkLocation
from infobip_api_client.models.calls_sip_trunk_response import CallsSipTrunkResponse
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from typing import Optional, Set
from typing_extensions import Self
diff --git a/infobip_api_client/models/calls_static_sip_trunk_update_request.py b/infobip_api_client/models/calls_static_sip_trunk_update_request.py
index c9d9a8a..01c98c4 100644
--- a/infobip_api_client/models/calls_static_sip_trunk_update_request.py
+++ b/infobip_api_client/models/calls_static_sip_trunk_update_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -27,11 +26,9 @@
from infobip_api_client.models.calls_number_presentation_format import (
CallsNumberPresentationFormat,
)
-from infobip_api_client.models.calls_pegasus_sip_trunk_type import (
- CallsPegasusSipTrunkType,
-)
from infobip_api_client.models.calls_selection_strategy import CallsSelectionStrategy
from infobip_api_client.models.calls_sip_options import CallsSipOptions
+from infobip_api_client.models.calls_sip_trunk_type import CallsSipTrunkType
from infobip_api_client.models.calls_sip_trunk_update_request import (
CallsSipTrunkUpdateRequest,
)
@@ -46,7 +43,7 @@ class CallsStaticSipTrunkUpdateRequest(CallsSipTrunkUpdateRequest):
source_hosts: Optional[List[StrictStr]] = Field(
default=None,
- description="List of SIP trunk source hosts. If empty, destination host list must not be empty. Source hosts can be send in 2 formats: IP address without port or domain without port.",
+ description="List of SIP trunk source hosts. If empty, destination host list must not be empty. Source hosts can be sent in 2 formats: IP address without port or domain without port.",
alias="sourceHosts",
)
destination_hosts: Optional[List[StrictStr]] = Field(
@@ -55,20 +52,29 @@ class CallsStaticSipTrunkUpdateRequest(CallsSipTrunkUpdateRequest):
alias="destinationHosts",
)
strategy: Optional[CallsSelectionStrategy] = None
+ codecs: Optional[List[CallsAudioCodec]] = Field(
+ default=None, description="List of audio codecs supported by a SIP trunk."
+ )
+ dtmf: Optional[CallsDtmfType] = None
+ fax: Optional[CallsFaxType] = None
+ anonymization: Optional[CallsAnonymizationType] = None
+ number_format: Optional[CallsNumberPresentationFormat] = Field(
+ default=None, alias="numberFormat"
+ )
sip_options: Optional[CallsSipOptions] = Field(default=None, alias="sipOptions")
__properties: ClassVar[List[str]] = [
"type",
"name",
- "codecs",
- "dtmf",
- "fax",
- "numberFormat",
"internationalCallsAllowed",
"channelLimit",
- "anonymization",
"sourceHosts",
"destinationHosts",
"strategy",
+ "codecs",
+ "dtmf",
+ "fax",
+ "anonymization",
+ "numberFormat",
"sipOptions",
]
@@ -127,18 +133,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"type": obj.get("type"),
"name": obj.get("name"),
- "codecs": obj.get("codecs"),
- "dtmf": obj.get("dtmf"),
- "fax": obj.get("fax"),
- "numberFormat": obj.get("numberFormat"),
"internationalCallsAllowed": obj.get("internationalCallsAllowed")
if obj.get("internationalCallsAllowed") is not None
else False,
"channelLimit": obj.get("channelLimit"),
- "anonymization": obj.get("anonymization"),
"sourceHosts": obj.get("sourceHosts"),
"destinationHosts": obj.get("destinationHosts"),
"strategy": obj.get("strategy"),
+ "codecs": obj.get("codecs"),
+ "dtmf": obj.get("dtmf"),
+ "fax": obj.get("fax"),
+ "anonymization": obj.get("anonymization"),
+ "numberFormat": obj.get("numberFormat"),
"sipOptions": CallsSipOptions.from_dict(obj["sipOptions"])
if obj.get("sipOptions") is not None
else None,
diff --git a/infobip_api_client/models/calls_status.py b/infobip_api_client/models/calls_status.py
index 3e224b0..d49de76 100644
--- a/infobip_api_client/models/calls_status.py
+++ b/infobip_api_client/models/calls_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_stop_play_request.py b/infobip_api_client/models/calls_stop_play_request.py
index 562cc2d..d0e4496 100644
--- a/infobip_api_client/models/calls_stop_play_request.py
+++ b/infobip_api_client/models/calls_stop_play_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_switch_case.py b/infobip_api_client/models/calls_switch_case.py
new file mode 100644
index 0000000..ae5df3c
--- /dev/null
+++ b/infobip_api_client/models/calls_switch_case.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_case_object import CallsCaseObject
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsSwitchCase(BaseModel):
+ """
+ Switch-Case action takes a saved variable (obtained via either a Collect, Call API action or scenario parameters) and performs flow control based on it. It works similarly to the switch case block, using case-sensitive comparison.
+ """ # noqa: E501
+
+ switch: StrictStr = Field(
+ description="Name of the variable whose value to inspect."
+ )
+ case: CallsCaseObject
+ action_id: Optional[StrictInt] = Field(
+ default=None,
+ description="User-defined ID of an action that can be used with go-to action.",
+ alias="actionId",
+ )
+ __properties: ClassVar[List[str]] = ["switch", "case", "actionId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsSwitchCase from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of case
+ if self.case:
+ _dict["case"] = self.case.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsSwitchCase from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "switch": obj.get("switch"),
+ "case": CallsCaseObject.from_dict(obj["case"])
+ if obj.get("case") is not None
+ else None,
+ "actionId": obj.get("actionId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_tag_identifier_type.py b/infobip_api_client/models/calls_tag_identifier_type.py
new file mode 100644
index 0000000..463e9a5
--- /dev/null
+++ b/infobip_api_client/models/calls_tag_identifier_type.py
@@ -0,0 +1,35 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallsTagIdentifierType(str, Enum):
+ """
+ Defines which identifier will be provided in the tags field. Possible values are ID and NAME. If not provided, default value of NAME is used.
+ """
+
+ """
+ allowed enum values
+ """
+ ID = "ID"
+ NAME = "NAME"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallsTagIdentifierType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_termination.py b/infobip_api_client/models/calls_termination.py
index 8349607..349757a 100644
--- a/infobip_api_client/models/calls_termination.py
+++ b/infobip_api_client/models/calls_termination.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_termination_type.py b/infobip_api_client/models/calls_termination_type.py
index db6a2f6..a92d746 100644
--- a/infobip_api_client/models/calls_termination_type.py
+++ b/infobip_api_client/models/calls_termination_type.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/calls_text_play_content.py b/infobip_api_client/models/calls_text_play_content.py
index 1befe75..14f8e50 100644
--- a/infobip_api_client/models/calls_text_play_content.py
+++ b/infobip_api_client/models/calls_text_play_content.py
@@ -12,16 +12,17 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import ConfigDict, Field, StrictStr, field_validator
+from pydantic import ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing_extensions import Annotated
+from infobip_api_client.models.calls_language import CallsLanguage
from infobip_api_client.models.calls_play_content import CallsPlayContent
+from infobip_api_client.models.calls_play_content_type import CallsPlayContentType
from infobip_api_client.models.calls_voice_preferences import CallsVoicePreferences
from typing import Optional, Set
from typing_extensions import Self
@@ -33,7 +34,7 @@ class CallsTextPlayContent(CallsPlayContent):
""" # noqa: E501
text: StrictStr
- language: StrictStr
+ language: CallsLanguage
speech_rate: Optional[
Union[
Annotated[float, Field(le=2.0, strict=True, ge=0.5)],
@@ -49,76 +50,6 @@ class CallsTextPlayContent(CallsPlayContent):
"preferences",
]
- @field_validator("language")
- def language_validate_enum(cls, value):
- """Validates the enum"""
- if value not in set(
- [
- "ar",
- "bn",
- "bg",
- "ca",
- "zh-cn",
- "zh-tw",
- "hr",
- "cs",
- "da",
- "nl",
- "en",
- "en-au",
- "en-gb",
- "en-ca",
- "en-in",
- "en-ie",
- "en-gb-wls",
- "epo",
- "fil-ph",
- "fi",
- "fr",
- "fr-ca",
- "fr-ch",
- "de",
- "de-at",
- "de-ch",
- "el",
- "gu",
- "he",
- "hi",
- "hu",
- "is",
- "id",
- "it",
- "ja",
- "kn",
- "ko",
- "ms",
- "ml",
- "no",
- "pl",
- "pt-pt",
- "pt-br",
- "ro",
- "ru",
- "sk",
- "sl",
- "es",
- "es-gl",
- "es-mx",
- "sv",
- "ta",
- "te",
- "th",
- "tr",
- "uk",
- "vi",
- "wls",
- ]
- ):
- raise ValueError(
- "must be one of enum values ('ar', 'bn', 'bg', 'ca', 'zh-cn', 'zh-tw', 'hr', 'cs', 'da', 'nl', 'en', 'en-au', 'en-gb', 'en-ca', 'en-in', 'en-ie', 'en-gb-wls', 'epo', 'fil-ph', 'fi', 'fr', 'fr-ca', 'fr-ch', 'de', 'de-at', 'de-ch', 'el', 'gu', 'he', 'hi', 'hu', 'is', 'id', 'it', 'ja', 'kn', 'ko', 'ms', 'ml', 'no', 'pl', 'pt-pt', 'pt-br', 'ro', 'ru', 'sk', 'sl', 'es', 'es-gl', 'es-mx', 'sv', 'ta', 'te', 'th', 'tr', 'uk', 'vi', 'wls')"
- )
- return value
-
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
diff --git a/infobip_api_client/models/calls_time_unit.py b/infobip_api_client/models/calls_time_unit.py
new file mode 100644
index 0000000..3786a42
--- /dev/null
+++ b/infobip_api_client/models/calls_time_unit.py
@@ -0,0 +1,37 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallsTimeUnit(str, Enum):
+ """
+ Defines a time unit used for calculating call creation rate.
+ """
+
+ """
+ allowed enum values
+ """
+ SECONDS = "SECONDS"
+ MINUTES = "MINUTES"
+ HOURS = "HOURS"
+ DAYS = "DAYS"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallsTimeUnit from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_transcription.py b/infobip_api_client/models/calls_transcription.py
new file mode 100644
index 0000000..9a204d7
--- /dev/null
+++ b/infobip_api_client/models/calls_transcription.py
@@ -0,0 +1,96 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_language import CallsLanguage
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsTranscription(BaseModel):
+ """
+ CallsTranscription
+ """ # noqa: E501
+
+ language: CallsLanguage
+ send_interim_results: Optional[StrictBool] = Field(
+ default=False,
+ description="Flag indicating whether interim transcription results should be sent.",
+ alias="sendInterimResults",
+ )
+ __properties: ClassVar[List[str]] = ["language", "sendInterimResults"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsTranscription from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsTranscription from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "language": obj.get("language"),
+ "sendInterimResults": obj.get("sendInterimResults")
+ if obj.get("sendInterimResults") is not None
+ else False,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_update_request.py b/infobip_api_client/models/calls_update_request.py
index 729af64..9979d29 100644
--- a/infobip_api_client/models/calls_update_request.py
+++ b/infobip_api_client/models/calls_update_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_update_scenario_request.py b/infobip_api_client/models/calls_update_scenario_request.py
new file mode 100644
index 0000000..19dd89c
--- /dev/null
+++ b/infobip_api_client/models/calls_update_scenario_request.py
@@ -0,0 +1,105 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.calls_script_inner import CallsScriptInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsUpdateScenarioRequest(BaseModel):
+ """
+ CallsUpdateScenarioRequest
+ """ # noqa: E501
+
+ name: StrictStr = Field(description="The name of IVR scenario.")
+ description: Optional[StrictStr] = Field(
+ default=None, description="Description of IVR scenario."
+ )
+ script: List[CallsScriptInner] = Field(
+ description="Array of IVR actions defining scenario. NOTE: Answering Machine Detection, Call Recording and Speech Recognition (used for Capture action) are add-on features. To enable these add-ons, please contact our [sales](https://www.infobip.com/contact) organisation."
+ )
+ __properties: ClassVar[List[str]] = ["name", "description", "script"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsUpdateScenarioRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in script (list)
+ _items = []
+ if self.script:
+ for _item in self.script:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["script"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsUpdateScenarioRequest 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"),
+ "description": obj.get("description"),
+ "script": [CallsScriptInner.from_dict(_item) for _item in obj["script"]]
+ if obj.get("script") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_update_scenario_response.py b/infobip_api_client/models/calls_update_scenario_response.py
new file mode 100644
index 0000000..cb67324
--- /dev/null
+++ b/infobip_api_client/models/calls_update_scenario_response.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsUpdateScenarioResponse(BaseModel):
+ """
+ CallsUpdateScenarioResponse
+ """ # noqa: E501
+
+ create_time: Optional[datetime] = Field(
+ default=None, description="Creation timestamp.", alias="createTime"
+ )
+ description: Optional[StrictStr] = Field(
+ default=None, description="Scenario description."
+ )
+ id: Optional[StrictStr] = Field(
+ default=None, description="Scenario key. It is used for launching IVR scenario."
+ )
+ name: Optional[StrictStr] = Field(default=None, description="Scenario name.")
+ script: Optional[Dict[str, Any]] = Field(
+ default=None, description="The list of scenario actions."
+ )
+ update_time: Optional[datetime] = Field(
+ default=None, description="Update timestamp.", alias="updateTime"
+ )
+ last_usage_date: Optional[datetime] = Field(
+ default=None,
+ description="Last usage date. `null` for scenarios that are used last time before `2024-01-01`.",
+ alias="lastUsageDate",
+ )
+ __properties: ClassVar[List[str]] = [
+ "createTime",
+ "description",
+ "id",
+ "name",
+ "script",
+ "updateTime",
+ "lastUsageDate",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsUpdateScenarioResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsUpdateScenarioResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "createTime": obj.get("createTime"),
+ "description": obj.get("description"),
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "script": obj.get("script"),
+ "updateTime": obj.get("updateTime"),
+ "lastUsageDate": obj.get("lastUsageDate"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_update_status_request.py b/infobip_api_client/models/calls_update_status_request.py
index 55405b6..15c4e4d 100644
--- a/infobip_api_client/models/calls_update_status_request.py
+++ b/infobip_api_client/models/calls_update_status_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_url_play_content.py b/infobip_api_client/models/calls_url_play_content.py
index bc0aba1..9449dbb 100644
--- a/infobip_api_client/models/calls_url_play_content.py
+++ b/infobip_api_client/models/calls_url_play_content.py
@@ -12,15 +12,16 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import ConfigDict, Field, StrictStr
-from typing import Any, ClassVar, Dict, List
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
from infobip_api_client.models.calls_play_content import CallsPlayContent
+from infobip_api_client.models.calls_play_content_type import CallsPlayContentType
from typing import Optional, Set
from typing_extensions import Self
@@ -31,7 +32,10 @@ class CallsUrlPlayContent(CallsPlayContent):
""" # noqa: E501
file_url: StrictStr = Field(alias="fileUrl")
- __properties: ClassVar[List[str]] = ["type", "fileUrl"]
+ cache_duration: Optional[Annotated[int, Field(le=86400, strict=True)]] = Field(
+ default=None, alias="cacheDuration"
+ )
+ __properties: ClassVar[List[str]] = ["type", "fileUrl", "cacheDuration"]
model_config = ConfigDict(
populate_by_name=True,
@@ -82,6 +86,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate(
- {"type": obj.get("type"), "fileUrl": obj.get("fileUrl")}
+ {
+ "type": obj.get("type"),
+ "fileUrl": obj.get("fileUrl"),
+ "cacheDuration": obj.get("cacheDuration"),
+ }
)
return _obj
diff --git a/infobip_api_client/models/calls_viber_endpoint.py b/infobip_api_client/models/calls_viber_endpoint.py
index c21c10e..cd2e1bb 100644
--- a/infobip_api_client/models/calls_viber_endpoint.py
+++ b/infobip_api_client/models/calls_viber_endpoint.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_video_media_properties.py b/infobip_api_client/models/calls_video_media_properties.py
index 72b491b..fda67f6 100644
--- a/infobip_api_client/models/calls_video_media_properties.py
+++ b/infobip_api_client/models/calls_video_media_properties.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_voice.py b/infobip_api_client/models/calls_voice.py
index ebaeb21..58fb1e7 100644
--- a/infobip_api_client/models/calls_voice.py
+++ b/infobip_api_client/models/calls_voice.py
@@ -12,13 +12,12 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -35,7 +34,32 @@ class CallsVoice(BaseModel):
gender: Optional[StrictStr] = Field(
default=None, description="Gender of the voice. Can be `male` or `female`."
)
- __properties: ClassVar[List[str]] = ["name", "gender"]
+ supplier: Optional[StrictStr] = Field(
+ default=None, description="Name of the supplier for text to speech synthesis."
+ )
+ ssml_supported: Optional[StrictBool] = Field(
+ default=None,
+ description="Indicates if SSML is supported.",
+ alias="ssmlSupported",
+ )
+ is_default: Optional[StrictBool] = Field(
+ default=None,
+ description="Indicates whether voice is default voice for a given language. If voice is not chosen for the language, then default voice will be used.",
+ alias="isDefault",
+ )
+ is_neural: Optional[StrictBool] = Field(
+ default=None,
+ description="Indicates whether voice is neural. Using neural voice will generate additional cost.",
+ alias="isNeural",
+ )
+ __properties: ClassVar[List[str]] = [
+ "name",
+ "gender",
+ "supplier",
+ "ssmlSupported",
+ "isDefault",
+ "isNeural",
+ ]
model_config = ConfigDict(
populate_by_name=True,
@@ -86,6 +110,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate(
- {"name": obj.get("name"), "gender": obj.get("gender")}
+ {
+ "name": obj.get("name"),
+ "gender": obj.get("gender"),
+ "supplier": obj.get("supplier"),
+ "ssmlSupported": obj.get("ssmlSupported"),
+ "isDefault": obj.get("isDefault"),
+ "isNeural": obj.get("isNeural"),
+ }
)
return _obj
diff --git a/infobip_api_client/models/calls_voice_data.py b/infobip_api_client/models/calls_voice_data.py
new file mode 100644
index 0000000..fa3baa0
--- /dev/null
+++ b/infobip_api_client/models/calls_voice_data.py
@@ -0,0 +1,147 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from infobip_api_client.models.calls_ivr_data import CallsIvrData
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsVoiceData(BaseModel):
+ """
+ Fields representing details specific for voice messages.
+ """ # noqa: E501
+
+ feature: Optional[StrictStr] = Field(
+ default=None, description="Name of the Infobip Voice service or feature."
+ )
+ start_time: Optional[StrictStr] = Field(
+ default=None,
+ description="Date and time when the voice message was established and started ringing. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.",
+ alias="startTime",
+ )
+ answer_time: Optional[StrictStr] = Field(
+ default=None,
+ description="Date and time when the voice message was answered. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.",
+ alias="answerTime",
+ )
+ end_time: Optional[StrictStr] = Field(
+ default=None,
+ description="Date and time when the voice message was ended. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.",
+ alias="endTime",
+ )
+ duration: Optional[StrictInt] = Field(
+ default=None, description="Duration of the voice message, in seconds."
+ )
+ charged_duration: Optional[StrictInt] = Field(
+ default=None,
+ description="Charged duration of the voice message, in seconds.",
+ alias="chargedDuration",
+ )
+ file_duration: Optional[Union[StrictFloat, StrictInt]] = Field(
+ default=None,
+ description="Duration of the voice message audio file, in seconds.",
+ alias="fileDuration",
+ )
+ dtmf_codes: Optional[StrictStr] = Field(
+ default=None,
+ description="DTMF code entered by user. Can be empty string, if user did not press anything, or `null` in case of IVR if user did not participate in Collect action.",
+ alias="dtmfCodes",
+ )
+ ivr: Optional[CallsIvrData] = None
+ __properties: ClassVar[List[str]] = [
+ "feature",
+ "startTime",
+ "answerTime",
+ "endTime",
+ "duration",
+ "chargedDuration",
+ "fileDuration",
+ "dtmfCodes",
+ "ivr",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsVoiceData from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of ivr
+ if self.ivr:
+ _dict["ivr"] = self.ivr.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsVoiceData from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "feature": obj.get("feature"),
+ "startTime": obj.get("startTime"),
+ "answerTime": obj.get("answerTime"),
+ "endTime": obj.get("endTime"),
+ "duration": obj.get("duration"),
+ "chargedDuration": obj.get("chargedDuration"),
+ "fileDuration": obj.get("fileDuration"),
+ "dtmfCodes": obj.get("dtmfCodes"),
+ "ivr": CallsIvrData.from_dict(obj["ivr"])
+ if obj.get("ivr") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_voice_error.py b/infobip_api_client/models/calls_voice_error.py
new file mode 100644
index 0000000..508761b
--- /dev/null
+++ b/infobip_api_client/models/calls_voice_error.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsVoiceError(BaseModel):
+ """
+ Indicates whether the error occurred during the query execution.
+ """ # noqa: E501
+
+ group_id: Optional[StrictInt] = Field(
+ default=None, description="Error group ID.", alias="groupId"
+ )
+ group_name: Optional[StrictStr] = Field(
+ default=None, description="Error group name.", alias="groupName"
+ )
+ id: Optional[StrictInt] = Field(default=None, description="Error ID.")
+ name: Optional[StrictStr] = Field(default=None, description="Error name.")
+ description: Optional[StrictStr] = Field(
+ default=None, description="Human-readable description of the error."
+ )
+ permanent: Optional[StrictBool] = Field(
+ default=None, description="Tells if the error is permanent."
+ )
+ __properties: ClassVar[List[str]] = [
+ "groupId",
+ "groupName",
+ "id",
+ "name",
+ "description",
+ "permanent",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsVoiceError from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsVoiceError from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "groupId": obj.get("groupId"),
+ "groupName": obj.get("groupName"),
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "permanent": obj.get("permanent"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_voice_options.py b/infobip_api_client/models/calls_voice_options.py
new file mode 100644
index 0000000..e801bfe
--- /dev/null
+++ b/infobip_api_client/models/calls_voice_options.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsVoiceOptions(BaseModel):
+ """
+ CallsVoiceOptions
+ """ # noqa: E501
+
+ name: Optional[StrictStr] = Field(
+ default=None,
+ description="Name of the voice in which the text would be synthesized.",
+ )
+ gender: Optional[StrictStr] = Field(
+ default=None, description="Gender in which the text would be synthesized."
+ )
+ __properties: ClassVar[List[str]] = ["name", "gender"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsVoiceOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsVoiceOptions 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"), "gender": obj.get("gender")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_voice_preferences.py b/infobip_api_client/models/calls_voice_preferences.py
index f034a13..a512b20 100644
--- a/infobip_api_client/models/calls_voice_preferences.py
+++ b/infobip_api_client/models/calls_voice_preferences.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_voice_response.py b/infobip_api_client/models/calls_voice_response.py
index ad2f2bb..4c533cd 100644
--- a/infobip_api_client/models/calls_voice_response.py
+++ b/infobip_api_client/models/calls_voice_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_voice_response_details.py b/infobip_api_client/models/calls_voice_response_details.py
index 9a85eb1..c6f4107 100644
--- a/infobip_api_client/models/calls_voice_response_details.py
+++ b/infobip_api_client/models/calls_voice_response_details.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_web_rtc_endpoint.py b/infobip_api_client/models/calls_web_rtc_endpoint.py
index 9bbb235..a70b2c2 100644
--- a/infobip_api_client/models/calls_web_rtc_endpoint.py
+++ b/infobip_api_client/models/calls_web_rtc_endpoint.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/calls_while_do.py b/infobip_api_client/models/calls_while_do.py
new file mode 100644
index 0000000..e6fa4d8
--- /dev/null
+++ b/infobip_api_client/models/calls_while_do.py
@@ -0,0 +1,88 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class CallsWhileDo(BaseModel):
+ """
+ While-Do action executes the do field block of code as long as a specified condition is true in the while field. As with Repeat-While, comparison is done using equal (==) or not equal (! =) operators. Make sure not to provide a condition that causes an infinite loop.
+ """ # noqa: E501
+
+ var_while: StrictStr = Field(
+ description="The expression to evaluate.", alias="while"
+ )
+ do: List[Dict[str, Any]] = Field(
+ description="Array of actions to execute if none of the conditions above are met."
+ )
+ __properties: ClassVar[List[str]] = ["while", "do"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of CallsWhileDo from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of CallsWhileDo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"while": obj.get("while"), "do": obj.get("do")})
+ return _obj
diff --git a/infobip_api_client/models/sms_delivery_day.py b/infobip_api_client/models/delivery_day.py
similarity index 90%
rename from infobip_api_client/models/sms_delivery_day.py
rename to infobip_api_client/models/delivery_day.py
index 11a501b..aa93fa2 100644
--- a/infobip_api_client/models/sms_delivery_day.py
+++ b/infobip_api_client/models/delivery_day.py
@@ -12,14 +12,13 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
-class SmsDeliveryDay(str, Enum):
+class DeliveryDay(str, Enum):
"""
Days of the week which are included in the delivery time window. At least one day must be provided. Separate multiple days with a comma.
"""
@@ -37,5 +36,5 @@ class SmsDeliveryDay(str, Enum):
@classmethod
def from_json(cls, json_str: str) -> Self:
- """Create an instance of SmsDeliveryDay from a JSON string"""
+ """Create an instance of DeliveryDay from a JSON string"""
return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/sms_delivery_time_to.py b/infobip_api_client/models/delivery_time.py
similarity index 88%
rename from infobip_api_client/models/sms_delivery_time_to.py
rename to infobip_api_client/models/delivery_time.py
index 7498d58..0eed03a 100644
--- a/infobip_api_client/models/sms_delivery_time_to.py
+++ b/infobip_api_client/models/delivery_time.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -25,9 +24,9 @@
from typing_extensions import Self
-class SmsDeliveryTimeTo(BaseModel):
+class DeliveryTime(BaseModel):
"""
- The exact time of day to end sending messages. Time is expressed in the UTC time zone. If set, use it together with the `from` property with minimum 1 hour difference.
+ The exact time of the day. The time is expressed in the UTC time zone.
""" # noqa: E501
hour: Annotated[int, Field(le=23, strict=True, ge=0)] = Field(
@@ -55,7 +54,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of SmsDeliveryTimeTo from a JSON string"""
+ """Create an instance of DeliveryTime from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -79,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of SmsDeliveryTimeTo from a dict"""
+ """Create an instance of DeliveryTime from a dict"""
if obj is None:
return None
diff --git a/infobip_api_client/models/sms_delivery_time_window.py b/infobip_api_client/models/delivery_time_window.py
similarity index 74%
rename from infobip_api_client/models/sms_delivery_time_window.py
rename to infobip_api_client/models/delivery_time_window.py
index b15d0a6..1a08cfe 100644
--- a/infobip_api_client/models/sms_delivery_time_window.py
+++ b/infobip_api_client/models/delivery_time_window.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,23 +19,22 @@
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.sms_delivery_day import SmsDeliveryDay
-from infobip_api_client.models.sms_delivery_time_from import SmsDeliveryTimeFrom
-from infobip_api_client.models.sms_delivery_time_to import SmsDeliveryTimeTo
+from infobip_api_client.models.delivery_day import DeliveryDay
+from infobip_api_client.models.delivery_time import DeliveryTime
from typing import Optional, Set
from typing_extensions import Self
-class SmsDeliveryTimeWindow(BaseModel):
+class DeliveryTimeWindow(BaseModel):
"""
- Sets specific SMS delivery window outside of which messages won't be delivered. Often, used when there are restrictions on when messages can be sent.
+ Sets specific message delivery window outside of which messages won't be delivered. Often, used when there are restrictions on when messages can be sent. The exact time of the day to start sending messages can be defined using the `from` property. The exact time of the day to end sending messages can be defined using the `to` property. Properties `from` and `to` should be both provided with the minimum 1 hour difference or omitted.
""" # noqa: E501
- days: List[SmsDeliveryDay] = Field(
+ days: List[DeliveryDay] = Field(
description="Days of the week which are included in the delivery time window. At least one day must be provided. Separate multiple days with a comma."
)
- var_from: Optional[SmsDeliveryTimeFrom] = Field(default=None, alias="from")
- to: Optional[SmsDeliveryTimeTo] = None
+ var_from: Optional[DeliveryTime] = Field(default=None, alias="from")
+ to: Optional[DeliveryTime] = None
__properties: ClassVar[List[str]] = ["days", "from", "to"]
model_config = ConfigDict(
@@ -56,7 +54,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of SmsDeliveryTimeWindow from a JSON string"""
+ """Create an instance of DeliveryTimeWindow from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -86,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of SmsDeliveryTimeWindow from a dict"""
+ """Create an instance of DeliveryTimeWindow from a dict"""
if obj is None:
return None
@@ -96,10 +94,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"days": obj.get("days"),
- "from": SmsDeliveryTimeFrom.from_dict(obj["from"])
+ "from": DeliveryTime.from_dict(obj["from"])
if obj.get("from") is not None
else None,
- "to": SmsDeliveryTimeTo.from_dict(obj["to"])
+ "to": DeliveryTime.from_dict(obj["to"])
if obj.get("to") is not None
else None,
}
diff --git a/infobip_api_client/models/email_add_delete_suppression_type.py b/infobip_api_client/models/email_add_delete_suppression_type.py
new file mode 100644
index 0000000..991e733
--- /dev/null
+++ b/infobip_api_client/models/email_add_delete_suppression_type.py
@@ -0,0 +1,35 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class EmailAddDeleteSuppressionType(str, Enum):
+ """
+ Type of suppression.
+ """
+
+ """
+ allowed enum values
+ """
+ BOUNCE = "BOUNCE"
+ COMPLAINT = "COMPLAINT"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailAddDeleteSuppressionType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/email_add_domain_request.py b/infobip_api_client/models/email_add_domain_request.py
new file mode 100644
index 0000000..74c59f2
--- /dev/null
+++ b/infobip_api_client/models/email_add_domain_request.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailAddDomainRequest(BaseModel):
+ """
+ EmailAddDomainRequest
+ """ # noqa: E501
+
+ domain_name: Annotated[
+ str, Field(min_length=0, strict=True, max_length=100)
+ ] = Field(description="Unique name for the domain.", alias="domainName")
+ dkim_key_length: Optional[StrictInt] = Field(
+ default=2048, description="Value for DKIM key length.", alias="dkimKeyLength"
+ )
+ targeted_daily_traffic: Annotated[int, Field(strict=True, ge=1)] = Field(
+ description="Targeted daily traffic.", alias="targetedDailyTraffic"
+ )
+ application_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Required for application use in a send request for outbound traffic. Returned in notification events.",
+ alias="applicationId",
+ )
+ entity_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Required for entity use in a send request for outbound traffic. Returned in notification events.",
+ alias="entityId",
+ )
+ return_path_address: Optional[
+ Annotated[str, Field(min_length=0, strict=True, max_length=100)]
+ ] = Field(
+ default=None,
+ description="Set a custom return path to customize the mailbox that tells receiving email servers where to route delayed bounces.",
+ alias="returnPathAddress",
+ )
+ __properties: ClassVar[List[str]] = [
+ "domainName",
+ "dkimKeyLength",
+ "targetedDailyTraffic",
+ "applicationId",
+ "entityId",
+ "returnPathAddress",
+ ]
+
+ @field_validator("dkim_key_length")
+ def dkim_key_length_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set([1024, 2048]):
+ raise ValueError("must be one of enum values (1024, 2048)")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailAddDomainRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailAddDomainRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "domainName": obj.get("domainName"),
+ "dkimKeyLength": obj.get("dkimKeyLength")
+ if obj.get("dkimKeyLength") is not None
+ else 2048,
+ "targetedDailyTraffic": obj.get("targetedDailyTraffic"),
+ "applicationId": obj.get("applicationId"),
+ "entityId": obj.get("entityId"),
+ "returnPathAddress": obj.get("returnPathAddress"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_add_suppression.py b/infobip_api_client/models/email_add_suppression.py
new file mode 100644
index 0000000..18dde84
--- /dev/null
+++ b/infobip_api_client/models/email_add_suppression.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from infobip_api_client.models.email_add_delete_suppression_type import (
+ EmailAddDeleteSuppressionType,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailAddSuppression(BaseModel):
+ """
+ Suppression.
+ """ # noqa: E501
+
+ domain_name: StrictStr = Field(
+ description="Domain name from which suppressions will be added.",
+ alias="domainName",
+ )
+ email_address: Annotated[
+ List[StrictStr], Field(min_length=1, max_length=1000)
+ ] = Field(
+ description="Email addresses to add to suppression list.", alias="emailAddress"
+ )
+ type: EmailAddDeleteSuppressionType
+ __properties: ClassVar[List[str]] = ["domainName", "emailAddress", "type"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailAddSuppression from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailAddSuppression from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "domainName": obj.get("domainName"),
+ "emailAddress": obj.get("emailAddress"),
+ "type": obj.get("type"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_add_suppression_request.py b/infobip_api_client/models/email_add_suppression_request.py
new file mode 100644
index 0000000..789b7b4
--- /dev/null
+++ b/infobip_api_client/models/email_add_suppression_request.py
@@ -0,0 +1,105 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from infobip_api_client.models.email_add_suppression import EmailAddSuppression
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailAddSuppressionRequest(BaseModel):
+ """
+ Suppressions request.
+ """ # noqa: E501
+
+ suppressions: Annotated[
+ List[EmailAddSuppression], Field(min_length=1, max_length=10)
+ ] = Field(
+ description="Email addresses to add to the suppression list. Number of destinations cannot exceed 10,000."
+ )
+ __properties: ClassVar[List[str]] = ["suppressions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailAddSuppressionRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in suppressions (list)
+ _items = []
+ if self.suppressions:
+ for _item in self.suppressions:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["suppressions"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailAddSuppressionRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "suppressions": [
+ EmailAddSuppression.from_dict(_item)
+ for _item in obj["suppressions"]
+ ]
+ if obj.get("suppressions") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_all_domains_response.py b/infobip_api_client/models/email_all_domains_response.py
new file mode 100644
index 0000000..60af73c
--- /dev/null
+++ b/infobip_api_client/models/email_all_domains_response.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.email_domain_response import EmailDomainResponse
+from infobip_api_client.models.email_paging import EmailPaging
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailAllDomainsResponse(BaseModel):
+ """
+ EmailAllDomainsResponse
+ """ # noqa: E501
+
+ paging: Optional[EmailPaging] = None
+ results: Optional[List[EmailDomainResponse]] = Field(
+ default=None, description="List of domains that belong to the account."
+ )
+ __properties: ClassVar[List[str]] = ["paging", "results"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailAllDomainsResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of paging
+ if self.paging:
+ _dict["paging"] = self.paging.to_dict()
+ # 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: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailAllDomainsResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "paging": EmailPaging.from_dict(obj["paging"])
+ if obj.get("paging") is not None
+ else None,
+ "results": [
+ EmailDomainResponse.from_dict(_item) for _item in obj["results"]
+ ]
+ if obj.get("results") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_bulk_info.py b/infobip_api_client/models/email_bulk_info.py
new file mode 100644
index 0000000..d826ebf
--- /dev/null
+++ b/infobip_api_client/models/email_bulk_info.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailBulkInfo(BaseModel):
+ """
+ EmailBulkInfo
+ """ # noqa: E501
+
+ bulk_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID uniquely identifies the sent email request.",
+ alias="bulkId",
+ )
+ send_at: Optional[datetime] = Field(
+ default=None,
+ description="Date and time when the email is to be sent. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.",
+ alias="sendAt",
+ )
+ __properties: ClassVar[List[str]] = ["bulkId", "sendAt"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailBulkInfo from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailBulkInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"bulkId": obj.get("bulkId"), "sendAt": obj.get("sendAt")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_bulk_reschedule_request.py b/infobip_api_client/models/email_bulk_reschedule_request.py
new file mode 100644
index 0000000..50892d4
--- /dev/null
+++ b/infobip_api_client/models/email_bulk_reschedule_request.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailBulkRescheduleRequest(BaseModel):
+ """
+ EmailBulkRescheduleRequest
+ """ # noqa: E501
+
+ send_at: datetime = Field(
+ description="Date and time when the email is to be sent. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.",
+ alias="sendAt",
+ )
+ __properties: ClassVar[List[str]] = ["sendAt"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailBulkRescheduleRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailBulkRescheduleRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"sendAt": obj.get("sendAt")})
+ return _obj
diff --git a/infobip_api_client/models/email_bulk_reschedule_response.py b/infobip_api_client/models/email_bulk_reschedule_response.py
new file mode 100644
index 0000000..0bd2c88
--- /dev/null
+++ b/infobip_api_client/models/email_bulk_reschedule_response.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailBulkRescheduleResponse(BaseModel):
+ """
+ EmailBulkRescheduleResponse
+ """ # noqa: E501
+
+ bulk_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID uniquely identifies the sent email request.",
+ alias="bulkId",
+ )
+ send_at: Optional[datetime] = Field(
+ default=None,
+ description="Date and time when the email is to be sent. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.",
+ alias="sendAt",
+ )
+ __properties: ClassVar[List[str]] = ["bulkId", "sendAt"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailBulkRescheduleResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailBulkRescheduleResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"bulkId": obj.get("bulkId"), "sendAt": obj.get("sendAt")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_bulk_schedule_response.py b/infobip_api_client/models/email_bulk_schedule_response.py
new file mode 100644
index 0000000..b81e0bb
--- /dev/null
+++ b/infobip_api_client/models/email_bulk_schedule_response.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.email_bulk_info import EmailBulkInfo
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailBulkScheduleResponse(BaseModel):
+ """
+ EmailBulkScheduleResponse
+ """ # noqa: E501
+
+ external_bulk_id: Optional[StrictStr] = Field(default=None, alias="externalBulkId")
+ bulks: Optional[List[EmailBulkInfo]] = None
+ __properties: ClassVar[List[str]] = ["externalBulkId", "bulks"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailBulkScheduleResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in bulks (list)
+ _items = []
+ if self.bulks:
+ for _item in self.bulks:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["bulks"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailBulkScheduleResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "externalBulkId": obj.get("externalBulkId"),
+ "bulks": [EmailBulkInfo.from_dict(_item) for _item in obj["bulks"]]
+ if obj.get("bulks") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_bulk_status.py b/infobip_api_client/models/email_bulk_status.py
new file mode 100644
index 0000000..cfc3d7d
--- /dev/null
+++ b/infobip_api_client/models/email_bulk_status.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class EmailBulkStatus(str, Enum):
+ """
+ EmailBulkStatus
+ """
+
+ """
+ allowed enum values
+ """
+ PENDING = "PENDING"
+ PAUSED = "PAUSED"
+ PROCESSING = "PROCESSING"
+ CANCELED = "CANCELED"
+ FINISHED = "FINISHED"
+ FAILED = "FAILED"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailBulkStatus from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/calls_time_window_point.py b/infobip_api_client/models/email_bulk_status_info.py
similarity index 78%
rename from infobip_api_client/models/calls_time_window_point.py
rename to infobip_api_client/models/email_bulk_status_info.py
index e4dcf6d..17a0da4 100644
--- a/infobip_api_client/models/calls_time_window_point.py
+++ b/infobip_api_client/models/email_bulk_status_info.py
@@ -12,26 +12,26 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.email_bulk_status import EmailBulkStatus
from typing import Optional, Set
from typing_extensions import Self
-class CallsTimeWindowPoint(BaseModel):
+class EmailBulkStatusInfo(BaseModel):
"""
- Call establishment attempt end time.
+ EmailBulkStatusInfo
""" # noqa: E501
- hour: Optional[StrictInt] = None
- minute: Optional[StrictInt] = None
- __properties: ClassVar[List[str]] = ["hour", "minute"]
+ bulk_id: Optional[StrictStr] = Field(default=None, alias="bulkId")
+ status: Optional[EmailBulkStatus] = None
+ __properties: ClassVar[List[str]] = ["bulkId", "status"]
model_config = ConfigDict(
populate_by_name=True,
@@ -50,7 +50,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of CallsTimeWindowPoint from a JSON string"""
+ """Create an instance of EmailBulkStatusInfo from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of CallsTimeWindowPoint from a dict"""
+ """Create an instance of EmailBulkStatusInfo from a dict"""
if obj is None:
return None
@@ -82,6 +82,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate(
- {"hour": obj.get("hour"), "minute": obj.get("minute")}
+ {"bulkId": obj.get("bulkId"), "status": obj.get("status")}
)
return _obj
diff --git a/infobip_api_client/models/email_bulk_status_response.py b/infobip_api_client/models/email_bulk_status_response.py
new file mode 100644
index 0000000..b2c3548
--- /dev/null
+++ b/infobip_api_client/models/email_bulk_status_response.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.email_bulk_status_info import EmailBulkStatusInfo
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailBulkStatusResponse(BaseModel):
+ """
+ EmailBulkStatusResponse
+ """ # noqa: E501
+
+ external_bulk_id: Optional[StrictStr] = Field(default=None, alias="externalBulkId")
+ bulks: Optional[List[EmailBulkStatusInfo]] = None
+ __properties: ClassVar[List[str]] = ["externalBulkId", "bulks"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailBulkStatusResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in bulks (list)
+ _items = []
+ if self.bulks:
+ for _item in self.bulks:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["bulks"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailBulkStatusResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "externalBulkId": obj.get("externalBulkId"),
+ "bulks": [
+ EmailBulkStatusInfo.from_dict(_item) for _item in obj["bulks"]
+ ]
+ if obj.get("bulks") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_bulk_update_status_request.py b/infobip_api_client/models/email_bulk_update_status_request.py
new file mode 100644
index 0000000..615deab
--- /dev/null
+++ b/infobip_api_client/models/email_bulk_update_status_request.py
@@ -0,0 +1,84 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List
+from infobip_api_client.models.email_bulk_status import EmailBulkStatus
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailBulkUpdateStatusRequest(BaseModel):
+ """
+ EmailBulkUpdateStatusRequest
+ """ # noqa: E501
+
+ status: EmailBulkStatus
+ __properties: ClassVar[List[str]] = ["status"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailBulkUpdateStatusRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailBulkUpdateStatusRequest 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")})
+ return _obj
diff --git a/infobip_api_client/models/email_bulk_update_status_response.py b/infobip_api_client/models/email_bulk_update_status_response.py
new file mode 100644
index 0000000..acf351f
--- /dev/null
+++ b/infobip_api_client/models/email_bulk_update_status_response.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.email_bulk_status import EmailBulkStatus
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailBulkUpdateStatusResponse(BaseModel):
+ """
+ EmailBulkUpdateStatusResponse
+ """ # noqa: E501
+
+ bulk_id: Optional[StrictStr] = Field(default=None, alias="bulkId")
+ status: Optional[EmailBulkStatus] = None
+ __properties: ClassVar[List[str]] = ["bulkId", "status"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailBulkUpdateStatusResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailBulkUpdateStatusResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"bulkId": obj.get("bulkId"), "status": obj.get("status")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_delete_suppression.py b/infobip_api_client/models/email_delete_suppression.py
new file mode 100644
index 0000000..7d580bb
--- /dev/null
+++ b/infobip_api_client/models/email_delete_suppression.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from infobip_api_client.models.email_add_delete_suppression_type import (
+ EmailAddDeleteSuppressionType,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailDeleteSuppression(BaseModel):
+ """
+ Suppression.
+ """ # noqa: E501
+
+ domain_name: StrictStr = Field(
+ description="Domain name from which suppressions will be deleted.",
+ alias="domainName",
+ )
+ email_address: Annotated[
+ List[StrictStr], Field(min_length=1, max_length=1000)
+ ] = Field(
+ description="Email addresses that need to be deleted.", alias="emailAddress"
+ )
+ type: EmailAddDeleteSuppressionType
+ __properties: ClassVar[List[str]] = ["domainName", "emailAddress", "type"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailDeleteSuppression from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailDeleteSuppression from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "domainName": obj.get("domainName"),
+ "emailAddress": obj.get("emailAddress"),
+ "type": obj.get("type"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_delete_suppression_request.py b/infobip_api_client/models/email_delete_suppression_request.py
new file mode 100644
index 0000000..fbc8bd3
--- /dev/null
+++ b/infobip_api_client/models/email_delete_suppression_request.py
@@ -0,0 +1,105 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from infobip_api_client.models.email_delete_suppression import EmailDeleteSuppression
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailDeleteSuppressionRequest(BaseModel):
+ """
+ Suppressions request.
+ """ # noqa: E501
+
+ suppressions: Annotated[
+ List[EmailDeleteSuppression], Field(min_length=1, max_length=10)
+ ] = Field(
+ description="Email addresses to delete from the suppression list. Number of destinations cannot exceed 10,000."
+ )
+ __properties: ClassVar[List[str]] = ["suppressions"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailDeleteSuppressionRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in suppressions (list)
+ _items = []
+ if self.suppressions:
+ for _item in self.suppressions:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["suppressions"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailDeleteSuppressionRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "suppressions": [
+ EmailDeleteSuppression.from_dict(_item)
+ for _item in obj["suppressions"]
+ ]
+ if obj.get("suppressions") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_dns_record_response.py b/infobip_api_client/models/email_dns_record_response.py
new file mode 100644
index 0000000..4fa5a08
--- /dev/null
+++ b/infobip_api_client/models/email_dns_record_response.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailDnsRecordResponse(BaseModel):
+ """
+ Records for the domain.
+ """ # noqa: E501
+
+ record_type: Optional[StrictStr] = Field(
+ default=None, description="Type of the record.", alias="recordType"
+ )
+ name: Optional[StrictStr] = Field(default=None, description="Name of the record.")
+ expected_value: Optional[StrictStr] = Field(
+ default=None,
+ description="Expected value to be set for the given record.",
+ alias="expectedValue",
+ )
+ verified: Optional[StrictBool] = Field(
+ default=None,
+ description="Boolean value representing if the record is verified or not.",
+ )
+ __properties: ClassVar[List[str]] = [
+ "recordType",
+ "name",
+ "expectedValue",
+ "verified",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailDnsRecordResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailDnsRecordResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "recordType": obj.get("recordType"),
+ "name": obj.get("name"),
+ "expectedValue": obj.get("expectedValue"),
+ "verified": obj.get("verified"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_domain_access.py b/infobip_api_client/models/email_domain_access.py
new file mode 100644
index 0000000..fa11eff
--- /dev/null
+++ b/infobip_api_client/models/email_domain_access.py
@@ -0,0 +1,35 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class EmailDomainAccess(str, Enum):
+ """
+ Represents the access level for the domain. Domain can be either owned or have granted permissions.
+ """
+
+ """
+ allowed enum values
+ """
+ OWNER = "OWNER"
+ GRANTED = "GRANTED"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailDomainAccess from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/email_domain_info.py b/infobip_api_client/models/email_domain_info.py
new file mode 100644
index 0000000..d8ab931
--- /dev/null
+++ b/infobip_api_client/models/email_domain_info.py
@@ -0,0 +1,130 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List
+from infobip_api_client.models.email_domain_access import EmailDomainAccess
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailDomainInfo(BaseModel):
+ """
+ Domain get response.
+ """ # noqa: E501
+
+ domain_name: StrictStr = Field(
+ description="Name of the requested domain.", alias="domainName"
+ )
+ data_access: EmailDomainAccess = Field(alias="dataAccess")
+ read_bounces: StrictBool = Field(
+ description="Read bounces permission.", alias="readBounces"
+ )
+ create_bounces: StrictBool = Field(
+ description="Create bounces permission.", alias="createBounces"
+ )
+ delete_bounces: StrictBool = Field(
+ description="Delete bounces permission.", alias="deleteBounces"
+ )
+ read_complaints: StrictBool = Field(
+ description="Read complaints permission.", alias="readComplaints"
+ )
+ create_complaints: StrictBool = Field(
+ description="Create complaints permission.", alias="createComplaints"
+ )
+ delete_complaints: StrictBool = Field(
+ description="Delete complaints permission.", alias="deleteComplaints"
+ )
+ read_overquotas: StrictBool = Field(
+ description="Read overquotas permission.", alias="readOverquotas"
+ )
+ __properties: ClassVar[List[str]] = [
+ "domainName",
+ "dataAccess",
+ "readBounces",
+ "createBounces",
+ "deleteBounces",
+ "readComplaints",
+ "createComplaints",
+ "deleteComplaints",
+ "readOverquotas",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailDomainInfo from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailDomainInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "domainName": obj.get("domainName"),
+ "dataAccess": obj.get("dataAccess"),
+ "readBounces": obj.get("readBounces"),
+ "createBounces": obj.get("createBounces"),
+ "deleteBounces": obj.get("deleteBounces"),
+ "readComplaints": obj.get("readComplaints"),
+ "createComplaints": obj.get("createComplaints"),
+ "deleteComplaints": obj.get("deleteComplaints"),
+ "readOverquotas": obj.get("readOverquotas"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_domain_info_page_response.py b/infobip_api_client/models/email_domain_info_page_response.py
new file mode 100644
index 0000000..68a4298
--- /dev/null
+++ b/infobip_api_client/models/email_domain_info_page_response.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List
+from infobip_api_client.models.email_domain_info import EmailDomainInfo
+from infobip_api_client.models.email_page_details import EmailPageDetails
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailDomainInfoPageResponse(BaseModel):
+ """
+ Domain get response.
+ """ # noqa: E501
+
+ results: List[EmailDomainInfo] = Field(
+ description="Domains for requested paging information."
+ )
+ paging: EmailPageDetails
+ __properties: ClassVar[List[str]] = ["results", "paging"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailDomainInfoPageResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # 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
+ # override the default output from pydantic by calling `to_dict()` of paging
+ if self.paging:
+ _dict["paging"] = self.paging.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailDomainInfoPageResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "results": [
+ EmailDomainInfo.from_dict(_item) for _item in obj["results"]
+ ]
+ if obj.get("results") is not None
+ else None,
+ "paging": EmailPageDetails.from_dict(obj["paging"])
+ if obj.get("paging") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_domain_ip.py b/infobip_api_client/models/email_domain_ip.py
new file mode 100644
index 0000000..174cf86
--- /dev/null
+++ b/infobip_api_client/models/email_domain_ip.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailDomainIp(BaseModel):
+ """
+ List of ip details.
+ """ # noqa: E501
+
+ ip_address: StrictStr = Field(description="Ip Address.", alias="ipAddress")
+ dedicated: StrictBool = Field(description="Is Dedicated Ip Address.")
+ assigned_domain_count: StrictInt = Field(
+ description="Ip Class.", alias="assignedDomainCount"
+ )
+ status: StrictStr = Field(description="Status of the IP Address.")
+ __properties: ClassVar[List[str]] = [
+ "ipAddress",
+ "dedicated",
+ "assignedDomainCount",
+ "status",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailDomainIp from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailDomainIp from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "ipAddress": obj.get("ipAddress"),
+ "dedicated": obj.get("dedicated"),
+ "assignedDomainCount": obj.get("assignedDomainCount"),
+ "status": obj.get("status"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_domain_ip_pool.py b/infobip_api_client/models/email_domain_ip_pool.py
new file mode 100644
index 0000000..b031399
--- /dev/null
+++ b/infobip_api_client/models/email_domain_ip_pool.py
@@ -0,0 +1,106 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from infobip_api_client.models.email_ip_response import EmailIpResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailDomainIpPool(BaseModel):
+ """
+ IP pools assigned to the domain. Assigned IP pools with the lowest priority value have the highest sending precedence.
+ """ # noqa: E501
+
+ id: StrictStr = Field(description="IP pool identifier.")
+ name: StrictStr = Field(description="IP pool name.")
+ priority: Annotated[int, Field(le=49, strict=True, ge=0)] = Field(
+ description="IP pool sending priority. Higher value will result in a lower sending precedence for the specified IP pool."
+ )
+ ips: Annotated[List[EmailIpResponse], Field(min_length=0)]
+ __properties: ClassVar[List[str]] = ["id", "name", "priority", "ips"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailDomainIpPool from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in ips (list)
+ _items = []
+ if self.ips:
+ for _item in self.ips:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["ips"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailDomainIpPool 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"),
+ "priority": obj.get("priority"),
+ "ips": [EmailIpResponse.from_dict(_item) for _item in obj["ips"]]
+ if obj.get("ips") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_domain_ip_pool_assign_request.py b/infobip_api_client/models/email_domain_ip_pool_assign_request.py
new file mode 100644
index 0000000..043a62c
--- /dev/null
+++ b/infobip_api_client/models/email_domain_ip_pool_assign_request.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailDomainIpPoolAssignRequest(BaseModel):
+ """
+ EmailDomainIpPoolAssignRequest
+ """ # noqa: E501
+
+ pool_id: StrictStr = Field(description="IP pool identifier.", alias="poolId")
+ priority: Annotated[int, Field(le=49, strict=True, ge=0)] = Field(
+ description="IP pool sending priority."
+ )
+ __properties: ClassVar[List[str]] = ["poolId", "priority"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailDomainIpPoolAssignRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailDomainIpPoolAssignRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"poolId": obj.get("poolId"), "priority": obj.get("priority")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/call_routing_allowed_time_from.py b/infobip_api_client/models/email_domain_ip_pool_update_request.py
similarity index 74%
rename from infobip_api_client/models/call_routing_allowed_time_from.py
rename to infobip_api_client/models/email_domain_ip_pool_update_request.py
index b670058..9c50031 100644
--- a/infobip_api_client/models/call_routing_allowed_time_from.py
+++ b/infobip_api_client/models/email_domain_ip_pool_update_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -25,18 +24,15 @@
from typing_extensions import Self
-class CallRoutingAllowedTimeFrom(BaseModel):
+class EmailDomainIpPoolUpdateRequest(BaseModel):
"""
- The exact time of day to enable call forwarding. Time is expressed in the `UTC` time zone. If not set, defaults to `00:00:00`.
+ EmailDomainIpPoolUpdateRequest
""" # noqa: E501
- hour: Annotated[int, Field(le=23, strict=True, ge=0)] = Field(
- description="Hour when the time window opens."
- )
- minute: Annotated[int, Field(le=59, strict=True, ge=0)] = Field(
- description="Minute when the time window opens."
+ priority: Annotated[int, Field(le=49, strict=True, ge=0)] = Field(
+ description="IP pool sending priority."
)
- __properties: ClassVar[List[str]] = ["hour", "minute"]
+ __properties: ClassVar[List[str]] = ["priority"]
model_config = ConfigDict(
populate_by_name=True,
@@ -55,7 +51,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of CallRoutingAllowedTimeFrom from a JSON string"""
+ """Create an instance of EmailDomainIpPoolUpdateRequest from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -79,14 +75,12 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of CallRoutingAllowedTimeFrom from a dict"""
+ """Create an instance of EmailDomainIpPoolUpdateRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
- _obj = cls.model_validate(
- {"hour": obj.get("hour"), "minute": obj.get("minute")}
- )
+ _obj = cls.model_validate({"priority": obj.get("priority")})
return _obj
diff --git a/infobip_api_client/models/email_domain_ip_request.py b/infobip_api_client/models/email_domain_ip_request.py
new file mode 100644
index 0000000..7bef3eb
--- /dev/null
+++ b/infobip_api_client/models/email_domain_ip_request.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailDomainIpRequest(BaseModel):
+ """
+ EmailDomainIpRequest
+ """ # noqa: E501
+
+ domain_name: StrictStr = Field(
+ description="Name of the domain.", alias="domainName"
+ )
+ ip_address: StrictStr = Field(
+ description="Dedicated ip address.", alias="ipAddress"
+ )
+ __properties: ClassVar[List[str]] = ["domainName", "ipAddress"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailDomainIpRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailDomainIpRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"domainName": obj.get("domainName"), "ipAddress": obj.get("ipAddress")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/sms_delivery_time_from.py b/infobip_api_client/models/email_domain_ip_response.py
similarity index 70%
rename from infobip_api_client/models/sms_delivery_time_from.py
rename to infobip_api_client/models/email_domain_ip_response.py
index 994c9ec..8f6d8fd 100644
--- a/infobip_api_client/models/sms_delivery_time_from.py
+++ b/infobip_api_client/models/email_domain_ip_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,23 +19,18 @@
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List
-from typing_extensions import Annotated
+from infobip_api_client.models.email_domain_ip import EmailDomainIp
from typing import Optional, Set
from typing_extensions import Self
-class SmsDeliveryTimeFrom(BaseModel):
+class EmailDomainIpResponse(BaseModel):
"""
- The exact time of day to start sending messages. Time is expressed in the UTC time zone. If set, use it together with the `to` property with minimum 1 hour difference.
+ EmailDomainIpResponse
""" # noqa: E501
- hour: Annotated[int, Field(le=23, strict=True, ge=0)] = Field(
- description="Hour when the time window opens when used in the `from` property or closes when used in the `to` property."
- )
- minute: Annotated[int, Field(le=59, strict=True, ge=0)] = Field(
- description="Minute when the time window opens when used in the `from` property or closes when used in the `to` property."
- )
- __properties: ClassVar[List[str]] = ["hour", "minute"]
+ result: List[EmailDomainIp] = Field(description="List of ip details.")
+ __properties: ClassVar[List[str]] = ["result"]
model_config = ConfigDict(
populate_by_name=True,
@@ -55,7 +49,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of SmsDeliveryTimeFrom from a JSON string"""
+ """Create an instance of EmailDomainIpResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -75,11 +69,18 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of each item in result (list)
+ _items = []
+ if self.result:
+ for _item in self.result:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["result"] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of SmsDeliveryTimeFrom from a dict"""
+ """Create an instance of EmailDomainIpResponse from a dict"""
if obj is None:
return None
@@ -87,6 +88,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate(
- {"hour": obj.get("hour"), "minute": obj.get("minute")}
+ {
+ "result": [EmailDomainIp.from_dict(_item) for _item in obj["result"]]
+ if obj.get("result") is not None
+ else None
+ }
)
return _obj
diff --git a/infobip_api_client/models/email_domain_response.py b/infobip_api_client/models/email_domain_response.py
new file mode 100644
index 0000000..d7c39ea
--- /dev/null
+++ b/infobip_api_client/models/email_domain_response.py
@@ -0,0 +1,146 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.email_dns_record_response import EmailDnsRecordResponse
+from infobip_api_client.models.email_tracking_response import EmailTrackingResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailDomainResponse(BaseModel):
+ """
+ Detailed domain information.
+ """ # noqa: E501
+
+ domain_id: Optional[StrictInt] = Field(
+ default=None, description="Id of the domain.", alias="domainId"
+ )
+ domain_name: Optional[StrictStr] = Field(
+ default=None, description="Name of the domain.", alias="domainName"
+ )
+ active: Optional[StrictBool] = Field(
+ default=None, description="Activation status of the domain."
+ )
+ tracking: Optional[EmailTrackingResponse] = None
+ dns_records: Optional[List[EmailDnsRecordResponse]] = Field(
+ default=None, description="DNS records for the domain.", alias="dnsRecords"
+ )
+ blocked: Optional[StrictBool] = Field(
+ default=None, description="Status if the domain is blocked."
+ )
+ created_at: Optional[datetime] = Field(
+ default=None,
+ description="Date the domain was created. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.",
+ alias="createdAt",
+ )
+ return_path_address: Optional[StrictStr] = Field(
+ default=None, description="Mailbox for return path.", alias="returnPathAddress"
+ )
+ __properties: ClassVar[List[str]] = [
+ "domainId",
+ "domainName",
+ "active",
+ "tracking",
+ "dnsRecords",
+ "blocked",
+ "createdAt",
+ "returnPathAddress",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailDomainResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of tracking
+ if self.tracking:
+ _dict["tracking"] = self.tracking.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in dns_records (list)
+ _items = []
+ if self.dns_records:
+ for _item in self.dns_records:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["dnsRecords"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailDomainResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "domainId": obj.get("domainId"),
+ "domainName": obj.get("domainName"),
+ "active": obj.get("active"),
+ "tracking": EmailTrackingResponse.from_dict(obj["tracking"])
+ if obj.get("tracking") is not None
+ else None,
+ "dnsRecords": [
+ EmailDnsRecordResponse.from_dict(_item)
+ for _item in obj["dnsRecords"]
+ ]
+ if obj.get("dnsRecords") is not None
+ else None,
+ "blocked": obj.get("blocked"),
+ "createdAt": obj.get("createdAt"),
+ "returnPathAddress": obj.get("returnPathAddress"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_get_suppression_type.py b/infobip_api_client/models/email_get_suppression_type.py
new file mode 100644
index 0000000..c5ace90
--- /dev/null
+++ b/infobip_api_client/models/email_get_suppression_type.py
@@ -0,0 +1,36 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class EmailGetSuppressionType(str, Enum):
+ """
+ EmailGetSuppressionType
+ """
+
+ """
+ allowed enum values
+ """
+ BOUNCE = "BOUNCE"
+ COMPLAINT = "COMPLAINT"
+ OVER_QUOTA = "OVER_QUOTA"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EmailGetSuppressionType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/email_ip_detail_response.py b/infobip_api_client/models/email_ip_detail_response.py
new file mode 100644
index 0000000..1068231
--- /dev/null
+++ b/infobip_api_client/models/email_ip_detail_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from infobip_api_client.models.email_ip_pool_response import EmailIpPoolResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailIpDetailResponse(BaseModel):
+ """
+ EmailIpDetailResponse
+ """ # noqa: E501
+
+ id: StrictStr = Field(description="Dedicated IP identifier.")
+ ip: StrictStr = Field(description="Dedicated IP address.")
+ pools: Annotated[List[EmailIpPoolResponse], Field(min_length=0)]
+ __properties: ClassVar[List[str]] = ["id", "ip", "pools"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailIpDetailResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in pools (list)
+ _items = []
+ if self.pools:
+ for _item in self.pools:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["pools"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailIpDetailResponse 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"),
+ "ip": obj.get("ip"),
+ "pools": [
+ EmailIpPoolResponse.from_dict(_item) for _item in obj["pools"]
+ ]
+ if obj.get("pools") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_ip_domain_response.py b/infobip_api_client/models/email_ip_domain_response.py
new file mode 100644
index 0000000..50ecc69
--- /dev/null
+++ b/infobip_api_client/models/email_ip_domain_response.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from infobip_api_client.models.email_domain_ip_pool import EmailDomainIpPool
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailIpDomainResponse(BaseModel):
+ """
+ EmailIpDomainResponse
+ """ # noqa: E501
+
+ id: Annotated[int, Field(strict=True, ge=1)] = Field(
+ description="Domain identifier."
+ )
+ name: StrictStr = Field(description="Domain name.")
+ pools: Annotated[List[EmailDomainIpPool], Field(min_length=0)]
+ __properties: ClassVar[List[str]] = ["id", "name", "pools"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailIpDomainResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in pools (list)
+ _items = []
+ if self.pools:
+ for _item in self.pools:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["pools"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailIpDomainResponse 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"),
+ "pools": [EmailDomainIpPool.from_dict(_item) for _item in obj["pools"]]
+ if obj.get("pools") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_ip_pool_assign_ip_request.py b/infobip_api_client/models/email_ip_pool_assign_ip_request.py
new file mode 100644
index 0000000..830def1
--- /dev/null
+++ b/infobip_api_client/models/email_ip_pool_assign_ip_request.py
@@ -0,0 +1,83 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailIpPoolAssignIpRequest(BaseModel):
+ """
+ EmailIpPoolAssignIpRequest
+ """ # noqa: E501
+
+ ip_id: StrictStr = Field(description="Dedicated IP identifier.", alias="ipId")
+ __properties: ClassVar[List[str]] = ["ipId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailIpPoolAssignIpRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailIpPoolAssignIpRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"ipId": obj.get("ipId")})
+ return _obj
diff --git a/infobip_api_client/models/call_routing_allowed_time_to.py b/infobip_api_client/models/email_ip_pool_create_request.py
similarity index 75%
rename from infobip_api_client/models/call_routing_allowed_time_to.py
rename to infobip_api_client/models/email_ip_pool_create_request.py
index f8875c6..26f2609 100644
--- a/infobip_api_client/models/call_routing_allowed_time_to.py
+++ b/infobip_api_client/models/email_ip_pool_create_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -25,18 +24,15 @@
from typing_extensions import Self
-class CallRoutingAllowedTimeTo(BaseModel):
+class EmailIpPoolCreateRequest(BaseModel):
"""
- The exact time of day to end call forwarding. Time is expressed in the `UTC` time zone. If not set, defaults to `23:59:59`.
+ EmailIpPoolCreateRequest
""" # noqa: E501
- hour: Annotated[int, Field(le=23, strict=True, ge=0)] = Field(
- description="Hour when the time window closes."
- )
- minute: Annotated[int, Field(le=59, strict=True, ge=0)] = Field(
- description="Minute when the time window closes."
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] = Field(
+ description="IP pool name."
)
- __properties: ClassVar[List[str]] = ["hour", "minute"]
+ __properties: ClassVar[List[str]] = ["name"]
model_config = ConfigDict(
populate_by_name=True,
@@ -55,7 +51,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of CallRoutingAllowedTimeTo from a JSON string"""
+ """Create an instance of EmailIpPoolCreateRequest from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -79,14 +75,12 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of CallRoutingAllowedTimeTo from a dict"""
+ """Create an instance of EmailIpPoolCreateRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
- _obj = cls.model_validate(
- {"hour": obj.get("hour"), "minute": obj.get("minute")}
- )
+ _obj = cls.model_validate({"name": obj.get("name")})
return _obj
diff --git a/infobip_api_client/models/email_ip_pool_detail_response.py b/infobip_api_client/models/email_ip_pool_detail_response.py
new file mode 100644
index 0000000..d19bc59
--- /dev/null
+++ b/infobip_api_client/models/email_ip_pool_detail_response.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from infobip_api_client.models.email_ip_response import EmailIpResponse
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailIpPoolDetailResponse(BaseModel):
+ """
+ EmailIpPoolDetailResponse
+ """ # noqa: E501
+
+ id: StrictStr = Field(description="IP pool identifier.")
+ name: StrictStr = Field(description="IP pool name.")
+ ips: Annotated[List[EmailIpResponse], Field(min_length=0)]
+ __properties: ClassVar[List[str]] = ["id", "name", "ips"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailIpPoolDetailResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in ips (list)
+ _items = []
+ if self.ips:
+ for _item in self.ips:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["ips"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailIpPoolDetailResponse 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"),
+ "ips": [EmailIpResponse.from_dict(_item) for _item in obj["ips"]]
+ if obj.get("ips") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_ip_pool_response.py b/infobip_api_client/models/email_ip_pool_response.py
new file mode 100644
index 0000000..9875e04
--- /dev/null
+++ b/infobip_api_client/models/email_ip_pool_response.py
@@ -0,0 +1,84 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailIpPoolResponse(BaseModel):
+ """
+ IP pools which have assigned the provided dedicated IP.
+ """ # noqa: E501
+
+ id: StrictStr = Field(description="IP pool identifier.")
+ name: StrictStr = Field(description="IP pool name.")
+ __properties: ClassVar[List[str]] = ["id", "name"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailIpPoolResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailIpPoolResponse 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")})
+ return _obj
diff --git a/infobip_api_client/models/email_ip_response.py b/infobip_api_client/models/email_ip_response.py
new file mode 100644
index 0000000..117808f
--- /dev/null
+++ b/infobip_api_client/models/email_ip_response.py
@@ -0,0 +1,84 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailIpResponse(BaseModel):
+ """
+ Dedicated IPs assigned to the IP pool.
+ """ # noqa: E501
+
+ id: StrictStr = Field(description="Dedicated IP identifier.")
+ ip: StrictStr = Field(description="Dedicated IP address.")
+ __properties: ClassVar[List[str]] = ["id", "ip"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailIpResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailIpResponse 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"), "ip": obj.get("ip")})
+ return _obj
diff --git a/infobip_api_client/models/email_log.py b/infobip_api_client/models/email_log.py
new file mode 100644
index 0000000..fb85d25
--- /dev/null
+++ b/infobip_api_client/models/email_log.py
@@ -0,0 +1,176 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.message_error import MessageError
+from infobip_api_client.models.message_price import MessagePrice
+from infobip_api_client.models.message_status import MessageStatus
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailLog(BaseModel):
+ """
+ Array of email logs, one object per each email request.
+ """ # noqa: E501
+
+ application_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The Application ID sent in the email request.",
+ alias="applicationId",
+ )
+ entity_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The Entity ID sent in the email request.",
+ alias="entityId",
+ )
+ bulk_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the request.",
+ alias="bulkId",
+ )
+ message_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the sent email request.",
+ alias="messageId",
+ )
+ to: Optional[StrictStr] = Field(
+ default=None, description="The recipient email address."
+ )
+ var_from: Optional[StrictStr] = Field(
+ default=None, description="From email address.", alias="from"
+ )
+ text: Optional[StrictStr] = Field(
+ default=None, description="The text from email body."
+ )
+ sent_at: Optional[datetime] = Field(
+ default=None,
+ description="Tells when the email was initiated. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. ",
+ alias="sentAt",
+ )
+ done_at: Optional[datetime] = Field(
+ default=None,
+ description="Date and time when the Infobip services finished processing the email (i.e. delivered to the destination, waiting for delivery, etc.). ",
+ alias="doneAt",
+ )
+ message_count: Optional[StrictInt] = Field(
+ default=None, description="Email request count.", alias="messageCount"
+ )
+ price: Optional[MessagePrice] = None
+ status: Optional[MessageStatus] = None
+ error: Optional[MessageError] = None
+ __properties: ClassVar[List[str]] = [
+ "applicationId",
+ "entityId",
+ "bulkId",
+ "messageId",
+ "to",
+ "from",
+ "text",
+ "sentAt",
+ "doneAt",
+ "messageCount",
+ "price",
+ "status",
+ "error",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailLog from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of price
+ if self.price:
+ _dict["price"] = self.price.to_dict()
+ # 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 error
+ if self.error:
+ _dict["error"] = self.error.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailLog from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "applicationId": obj.get("applicationId"),
+ "entityId": obj.get("entityId"),
+ "bulkId": obj.get("bulkId"),
+ "messageId": obj.get("messageId"),
+ "to": obj.get("to"),
+ "from": obj.get("from"),
+ "text": obj.get("text"),
+ "sentAt": obj.get("sentAt"),
+ "doneAt": obj.get("doneAt"),
+ "messageCount": obj.get("messageCount"),
+ "price": MessagePrice.from_dict(obj["price"])
+ if obj.get("price") is not None
+ else None,
+ "status": MessageStatus.from_dict(obj["status"])
+ if obj.get("status") is not None
+ else None,
+ "error": MessageError.from_dict(obj["error"])
+ if obj.get("error") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_logs_response.py b/infobip_api_client/models/email_logs_response.py
new file mode 100644
index 0000000..de49b13
--- /dev/null
+++ b/infobip_api_client/models/email_logs_response.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.email_log import EmailLog
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailLogsResponse(BaseModel):
+ """
+ EmailLogsResponse
+ """ # noqa: E501
+
+ results: Optional[List[EmailLog]] = Field(
+ default=None,
+ description="Array of email logs, one object per each email request.",
+ )
+ __properties: ClassVar[List[str]] = ["results"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailLogsResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # 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: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailLogsResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "results": [EmailLog.from_dict(_item) for _item in obj["results"]]
+ if obj.get("results") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_page_details.py b/infobip_api_client/models/email_page_details.py
new file mode 100644
index 0000000..0e1507a
--- /dev/null
+++ b/infobip_api_client/models/email_page_details.py
@@ -0,0 +1,84 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailPageDetails(BaseModel):
+ """
+ Paging response.
+ """ # noqa: E501
+
+ page: StrictInt = Field(description="Requested page number.")
+ size: StrictInt = Field(description="Requested page size.")
+ __properties: ClassVar[List[str]] = ["page", "size"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailPageDetails from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailPageDetails from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"page": obj.get("page"), "size": obj.get("size")})
+ return _obj
diff --git a/infobip_api_client/models/email_paging.py b/infobip_api_client/models/email_paging.py
new file mode 100644
index 0000000..37f2d80
--- /dev/null
+++ b/infobip_api_client/models/email_paging.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailPaging(BaseModel):
+ """
+ Pagination details like page number, page size,etc.
+ """ # noqa: E501
+
+ page: Optional[StrictInt] = None
+ size: Optional[StrictInt] = None
+ total_pages: Optional[StrictInt] = Field(default=None, alias="totalPages")
+ total_results: Optional[StrictInt] = Field(default=None, alias="totalResults")
+ __properties: ClassVar[List[str]] = ["page", "size", "totalPages", "totalResults"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailPaging from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailPaging from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "page": obj.get("page"),
+ "size": obj.get("size"),
+ "totalPages": obj.get("totalPages"),
+ "totalResults": obj.get("totalResults"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_report.py b/infobip_api_client/models/email_report.py
new file mode 100644
index 0000000..3572841
--- /dev/null
+++ b/infobip_api_client/models/email_report.py
@@ -0,0 +1,166 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.message_error import MessageError
+from infobip_api_client.models.message_price import MessagePrice
+from infobip_api_client.models.message_status import MessageStatus
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailReport(BaseModel):
+ """
+ EmailReport
+ """ # noqa: E501
+
+ application_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The Application ID sent in the email request.",
+ alias="applicationId",
+ )
+ entity_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The Entity ID sent in the email request.",
+ alias="entityId",
+ )
+ bulk_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies bulks of request.",
+ alias="bulkId",
+ )
+ message_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the sent email request.",
+ alias="messageId",
+ )
+ to: Optional[StrictStr] = Field(
+ default=None, description="The recipient email address."
+ )
+ sent_at: Optional[datetime] = Field(
+ default=None,
+ description="Tells when the email was initiated. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.",
+ alias="sentAt",
+ )
+ done_at: Optional[datetime] = Field(
+ default=None,
+ description="Tells when the email request was processed by Infobip.",
+ alias="doneAt",
+ )
+ message_count: Optional[StrictInt] = Field(
+ default=None, description="Email request count.", alias="messageCount"
+ )
+ price: Optional[MessagePrice] = None
+ status: Optional[MessageStatus] = None
+ error: Optional[MessageError] = None
+ __properties: ClassVar[List[str]] = [
+ "applicationId",
+ "entityId",
+ "bulkId",
+ "messageId",
+ "to",
+ "sentAt",
+ "doneAt",
+ "messageCount",
+ "price",
+ "status",
+ "error",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailReport from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of price
+ if self.price:
+ _dict["price"] = self.price.to_dict()
+ # 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 error
+ if self.error:
+ _dict["error"] = self.error.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailReport from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "applicationId": obj.get("applicationId"),
+ "entityId": obj.get("entityId"),
+ "bulkId": obj.get("bulkId"),
+ "messageId": obj.get("messageId"),
+ "to": obj.get("to"),
+ "sentAt": obj.get("sentAt"),
+ "doneAt": obj.get("doneAt"),
+ "messageCount": obj.get("messageCount"),
+ "price": MessagePrice.from_dict(obj["price"])
+ if obj.get("price") is not None
+ else None,
+ "status": MessageStatus.from_dict(obj["status"])
+ if obj.get("status") is not None
+ else None,
+ "error": MessageError.from_dict(obj["error"])
+ if obj.get("error") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_reports_result.py b/infobip_api_client/models/email_reports_result.py
new file mode 100644
index 0000000..ed4ed1f
--- /dev/null
+++ b/infobip_api_client/models/email_reports_result.py
@@ -0,0 +1,97 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.email_report import EmailReport
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailReportsResult(BaseModel):
+ """
+ EmailReportsResult
+ """ # noqa: E501
+
+ results: Optional[List[EmailReport]] = None
+ __properties: ClassVar[List[str]] = ["results"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailReportsResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # 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: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailReportsResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "results": [EmailReport.from_dict(_item) for _item in obj["results"]]
+ if obj.get("results") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_response_details.py b/infobip_api_client/models/email_response_details.py
new file mode 100644
index 0000000..4866740
--- /dev/null
+++ b/infobip_api_client/models/email_response_details.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.message_status import MessageStatus
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailResponseDetails(BaseModel):
+ """
+ List of message response details.
+ """ # noqa: E501
+
+ to: Optional[StrictStr] = Field(
+ default=None, description="The destination address of the message."
+ )
+ message_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies a message response.",
+ alias="messageId",
+ )
+ status: Optional[MessageStatus] = None
+ __properties: ClassVar[List[str]] = ["to", "messageId", "status"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailResponseDetails from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of status
+ if self.status:
+ _dict["status"] = self.status.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailResponseDetails from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "to": obj.get("to"),
+ "messageId": obj.get("messageId"),
+ "status": MessageStatus.from_dict(obj["status"])
+ if obj.get("status") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_return_path_address_request.py b/infobip_api_client/models/email_return_path_address_request.py
new file mode 100644
index 0000000..4225cbf
--- /dev/null
+++ b/infobip_api_client/models/email_return_path_address_request.py
@@ -0,0 +1,86 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailReturnPathAddressRequest(BaseModel):
+ """
+ EmailReturnPathAddressRequest
+ """ # noqa: E501
+
+ return_path_address: StrictStr = Field(
+ description="Mailbox for return path, this mailbox should be based on the same domain. If you want to disable custom return path and use our default return path address set the value to an empty string.",
+ alias="returnPathAddress",
+ )
+ __properties: ClassVar[List[str]] = ["returnPathAddress"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailReturnPathAddressRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailReturnPathAddressRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"returnPathAddress": obj.get("returnPathAddress")})
+ return _obj
diff --git a/infobip_api_client/models/email_send_response.py b/infobip_api_client/models/email_send_response.py
new file mode 100644
index 0000000..fc9b335
--- /dev/null
+++ b/infobip_api_client/models/email_send_response.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.email_response_details import EmailResponseDetails
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailSendResponse(BaseModel):
+ """
+ EmailSendResponse
+ """ # noqa: E501
+
+ bulk_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies a list of message responses.",
+ alias="bulkId",
+ )
+ messages: Optional[List[EmailResponseDetails]] = Field(
+ default=None, description="List of message response details."
+ )
+ __properties: ClassVar[List[str]] = ["bulkId", "messages"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailSendResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in messages (list)
+ _items = []
+ if self.messages:
+ for _item in self.messages:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["messages"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailSendResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "bulkId": obj.get("bulkId"),
+ "messages": [
+ EmailResponseDetails.from_dict(_item) for _item in obj["messages"]
+ ]
+ if obj.get("messages") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_simple_api_response.py b/infobip_api_client/models/email_simple_api_response.py
new file mode 100644
index 0000000..8b687c8
--- /dev/null
+++ b/infobip_api_client/models/email_simple_api_response.py
@@ -0,0 +1,83 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailSimpleApiResponse(BaseModel):
+ """
+ EmailSimpleApiResponse
+ """ # noqa: E501
+
+ result: StrictStr
+ __properties: ClassVar[List[str]] = ["result"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailSimpleApiResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailSimpleApiResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"result": obj.get("result")})
+ return _obj
diff --git a/infobip_api_client/models/email_suppression_info.py b/infobip_api_client/models/email_suppression_info.py
new file mode 100644
index 0000000..c61ac41
--- /dev/null
+++ b/infobip_api_client/models/email_suppression_info.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailSuppressionInfo(BaseModel):
+ """
+ Suppression get response.
+ """ # noqa: E501
+
+ domain_name: StrictStr = Field(
+ description="Name of the requested domain.", alias="domainName"
+ )
+ email_address: StrictStr = Field(
+ description="Email address that is suppressed.", alias="emailAddress"
+ )
+ type: StrictStr = Field(description="Type of suppression.")
+ created_date: StrictStr = Field(
+ description="Date and time when email address was suppressed.",
+ alias="createdDate",
+ )
+ reason: StrictStr = Field(description="Reason for suppression.")
+ __properties: ClassVar[List[str]] = [
+ "domainName",
+ "emailAddress",
+ "type",
+ "createdDate",
+ "reason",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailSuppressionInfo from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailSuppressionInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "domainName": obj.get("domainName"),
+ "emailAddress": obj.get("emailAddress"),
+ "type": obj.get("type"),
+ "createdDate": obj.get("createdDate"),
+ "reason": obj.get("reason"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_suppression_info_page_response.py b/infobip_api_client/models/email_suppression_info_page_response.py
new file mode 100644
index 0000000..7902d0f
--- /dev/null
+++ b/infobip_api_client/models/email_suppression_info_page_response.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List
+from infobip_api_client.models.email_page_details import EmailPageDetails
+from infobip_api_client.models.email_suppression_info import EmailSuppressionInfo
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailSuppressionInfoPageResponse(BaseModel):
+ """
+ Suppression get response.
+ """ # noqa: E501
+
+ results: List[EmailSuppressionInfo] = Field(
+ description="Suppressed addresses for requested paging information."
+ )
+ paging: EmailPageDetails
+ __properties: ClassVar[List[str]] = ["results", "paging"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailSuppressionInfoPageResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # 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
+ # override the default output from pydantic by calling `to_dict()` of paging
+ if self.paging:
+ _dict["paging"] = self.paging.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailSuppressionInfoPageResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "results": [
+ EmailSuppressionInfo.from_dict(_item) for _item in obj["results"]
+ ]
+ if obj.get("results") is not None
+ else None,
+ "paging": EmailPageDetails.from_dict(obj["paging"])
+ if obj.get("paging") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_tracking_event_request.py b/infobip_api_client/models/email_tracking_event_request.py
new file mode 100644
index 0000000..5556d11
--- /dev/null
+++ b/infobip_api_client/models/email_tracking_event_request.py
@@ -0,0 +1,100 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailTrackingEventRequest(BaseModel):
+ """
+ EmailTrackingEventRequest
+ """ # noqa: E501
+
+ open: Optional[StrictBool] = Field(
+ default=None,
+ description="Boolean value corresponding to whether opens for a message needs to be tracked or not.",
+ )
+ clicks: Optional[StrictBool] = Field(
+ default=None,
+ description="Boolean value corresponding to whether clicks for a message needs to be tracked or not.",
+ )
+ unsubscribe: Optional[StrictBool] = Field(
+ default=None,
+ description="Boolean value corresponding to whether unsubscribe for a message needs to be tracked or not.",
+ )
+ __properties: ClassVar[List[str]] = ["open", "clicks", "unsubscribe"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailTrackingEventRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailTrackingEventRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "open": obj.get("open"),
+ "clicks": obj.get("clicks"),
+ "unsubscribe": obj.get("unsubscribe"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_tracking_response.py b/infobip_api_client/models/email_tracking_response.py
new file mode 100644
index 0000000..93bba16
--- /dev/null
+++ b/infobip_api_client/models/email_tracking_response.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailTrackingResponse(BaseModel):
+ """
+ Tracking details of the domain.
+ """ # noqa: E501
+
+ clicks: Optional[StrictBool] = Field(
+ default=None, description="Indicates whether tracking of clicks is enabled."
+ )
+ opens: Optional[StrictBool] = Field(
+ default=None, description="Indicates whether tracking of opens is enabled."
+ )
+ unsubscribe: Optional[StrictBool] = Field(
+ default=None,
+ description="Indicates whether tracking of unsubscribes is enabled.",
+ )
+ __properties: ClassVar[List[str]] = ["clicks", "opens", "unsubscribe"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailTrackingResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailTrackingResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "clicks": obj.get("clicks"),
+ "opens": obj.get("opens"),
+ "unsubscribe": obj.get("unsubscribe"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_validation_request.py b/infobip_api_client/models/email_validation_request.py
new file mode 100644
index 0000000..4e55b46
--- /dev/null
+++ b/infobip_api_client/models/email_validation_request.py
@@ -0,0 +1,83 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailValidationRequest(BaseModel):
+ """
+ EmailValidationRequest
+ """ # noqa: E501
+
+ to: StrictStr = Field(description="Email address of the recipient.")
+ __properties: ClassVar[List[str]] = ["to"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailValidationRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailValidationRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"to": obj.get("to")})
+ return _obj
diff --git a/infobip_api_client/models/email_validation_response.py b/infobip_api_client/models/email_validation_response.py
new file mode 100644
index 0000000..72e5494
--- /dev/null
+++ b/infobip_api_client/models/email_validation_response.py
@@ -0,0 +1,144 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailValidationResponse(BaseModel):
+ """
+ EmailValidationResponse
+ """ # noqa: E501
+
+ to: Optional[StrictStr] = Field(
+ default=None, description="Email address of the recipient."
+ )
+ valid_mailbox: Optional[StrictStr] = Field(
+ default=None,
+ description="Represents status of recipient email address.",
+ alias="validMailbox",
+ )
+ valid_syntax: Optional[StrictBool] = Field(
+ default=None,
+ description="Represents syntax of recipient email address.",
+ alias="validSyntax",
+ )
+ catch_all: Optional[StrictBool] = Field(
+ default=None,
+ description="Denotes catch all status of recipient email address.",
+ alias="catchAll",
+ )
+ did_you_mean: Optional[StrictStr] = Field(
+ default=None,
+ description="Suggests alternate addresses that maybe valid.",
+ alias="didYouMean",
+ )
+ disposable: Optional[StrictBool] = None
+ role_based: Optional[StrictBool] = Field(default=None, alias="roleBased")
+ reason: Optional[StrictStr] = Field(
+ default=None,
+ description="Reason is provided when validMailbox status is unknown. 1. INBOX_FULL - The user quota exceeded / The user inbox is full / The user doesn't accept any more requests. 2. UNEXPECTED_FAILURE - The mail Server returned a temporary error. 3. THROTTLED - The mail server is not allowing us momentarily because of too many requests. 4. TIMED_OUT - The Mail Server took a longer time to respond / there was a delay in the network. 5. TEMP_REJECTION - Mail server temporarily rejected. 6. UNABLE_TO_CONNECT - Unable to connect to the Mail Server.",
+ )
+ detailed_reasons: Optional[StrictStr] = Field(
+ default=None,
+ description="Is provided when validMailbox is 'unknown' or 'false' and lists reasons clarifying why validMailbox has that status.",
+ alias="detailedReasons",
+ )
+ risk: Optional[StrictStr] = Field(
+ default=None,
+ description="Returns one of the following values: 'High', 'Medium', 'Low' or 'Unknown'. High risk addresses have very high chances of bouncing (and potentially damaging the sender's reputation), whereas low risk addresses have very low chances of bouncing and damaging the sender's reputation.",
+ )
+ __properties: ClassVar[List[str]] = [
+ "to",
+ "validMailbox",
+ "validSyntax",
+ "catchAll",
+ "didYouMean",
+ "disposable",
+ "roleBased",
+ "reason",
+ "detailedReasons",
+ "risk",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailValidationResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailValidationResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "to": obj.get("to"),
+ "validMailbox": obj.get("validMailbox"),
+ "validSyntax": obj.get("validSyntax"),
+ "catchAll": obj.get("catchAll"),
+ "didYouMean": obj.get("didYouMean"),
+ "disposable": obj.get("disposable"),
+ "roleBased": obj.get("roleBased"),
+ "reason": obj.get("reason"),
+ "detailedReasons": obj.get("detailedReasons"),
+ "risk": obj.get("risk"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_webhook_delivery_report.py b/infobip_api_client/models/email_webhook_delivery_report.py
new file mode 100644
index 0000000..a51ff37
--- /dev/null
+++ b/infobip_api_client/models/email_webhook_delivery_report.py
@@ -0,0 +1,171 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.message_error import MessageError
+from infobip_api_client.models.message_price import MessagePrice
+from infobip_api_client.models.message_status import MessageStatus
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailWebhookDeliveryReport(BaseModel):
+ """
+ EmailWebhookDeliveryReport
+ """ # noqa: E501
+
+ bulk_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies a list of email messages. This is either defined by user in the request or auto generated.",
+ alias="bulkId",
+ )
+ price: Optional[MessagePrice] = None
+ status: Optional[MessageStatus] = None
+ error: Optional[MessageError] = None
+ message_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the email sent to the recipient.",
+ alias="messageId",
+ )
+ done_at: Optional[datetime] = Field(
+ default=None, description="Delivery date and time.", alias="doneAt"
+ )
+ sms_count: Optional[StrictInt] = Field(
+ default=None, description="The number of emails sent.", alias="smsCount"
+ )
+ sent_at: Optional[datetime] = Field(
+ default=None,
+ description="Send date and time. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.",
+ alias="sentAt",
+ )
+ browser_link: Optional[StrictStr] = Field(
+ default=None,
+ description="Contains the link to the HTML sent to recipient. This will be present only if the _view in browser_ feature is used in the email. (Please note that this feature is not activated automatically for Email traffic sent over API. If you would like to utilize it please reach out to your Infobip person of contact.)",
+ alias="browserLink",
+ )
+ sending_ip: Optional[StrictStr] = Field(
+ default=None,
+ description="The IP address that was used to send out the email.",
+ alias="sendingIp",
+ )
+ callback_data: Optional[StrictStr] = Field(
+ default=None,
+ description="Callback data sent through `callbackData` field in fully featured email.",
+ alias="callbackData",
+ )
+ to: Optional[StrictStr] = Field(
+ default=None, description="Destination email address."
+ )
+ __properties: ClassVar[List[str]] = [
+ "bulkId",
+ "price",
+ "status",
+ "error",
+ "messageId",
+ "doneAt",
+ "smsCount",
+ "sentAt",
+ "browserLink",
+ "sendingIp",
+ "callbackData",
+ "to",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailWebhookDeliveryReport from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of price
+ if self.price:
+ _dict["price"] = self.price.to_dict()
+ # 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 error
+ if self.error:
+ _dict["error"] = self.error.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailWebhookDeliveryReport from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "bulkId": obj.get("bulkId"),
+ "price": MessagePrice.from_dict(obj["price"])
+ if obj.get("price") is not None
+ else None,
+ "status": MessageStatus.from_dict(obj["status"])
+ if obj.get("status") is not None
+ else None,
+ "error": MessageError.from_dict(obj["error"])
+ if obj.get("error") is not None
+ else None,
+ "messageId": obj.get("messageId"),
+ "doneAt": obj.get("doneAt"),
+ "smsCount": obj.get("smsCount"),
+ "sentAt": obj.get("sentAt"),
+ "browserLink": obj.get("browserLink"),
+ "sendingIp": obj.get("sendingIp"),
+ "callbackData": obj.get("callbackData"),
+ "to": obj.get("to"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_webhook_dlr_report_response.py b/infobip_api_client/models/email_webhook_dlr_report_response.py
new file mode 100644
index 0000000..df7f464
--- /dev/null
+++ b/infobip_api_client/models/email_webhook_dlr_report_response.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.email_webhook_delivery_report import (
+ EmailWebhookDeliveryReport,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailWebhookDLRReportResponse(BaseModel):
+ """
+ EmailWebhookDLRReportResponse
+ """ # noqa: E501
+
+ results: Optional[List[EmailWebhookDeliveryReport]] = None
+ __properties: ClassVar[List[str]] = ["results"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailWebhookDLRReportResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # 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: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailWebhookDLRReportResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "results": [
+ EmailWebhookDeliveryReport.from_dict(_item)
+ for _item in obj["results"]
+ ]
+ if obj.get("results") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_webhook_geo_location.py b/infobip_api_client/models/email_webhook_geo_location.py
new file mode 100644
index 0000000..815cc02
--- /dev/null
+++ b/infobip_api_client/models/email_webhook_geo_location.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailWebhookGeoLocation(BaseModel):
+ """
+ Geolocation data such as Country and City. This data will be available only for opens, clicks and unsubscribes.
+ """ # noqa: E501
+
+ country_name: Optional[StrictStr] = Field(
+ default=None,
+ description="Country where the user action is recorded.",
+ alias="countryName",
+ )
+ city: Optional[StrictStr] = Field(
+ default=None, description="City where the user action is recorded."
+ )
+ __properties: ClassVar[List[str]] = ["countryName", "city"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailWebhookGeoLocation from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailWebhookGeoLocation from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"countryName": obj.get("countryName"), "city": obj.get("city")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_webhook_recipient_info.py b/infobip_api_client/models/email_webhook_recipient_info.py
new file mode 100644
index 0000000..5853b59
--- /dev/null
+++ b/infobip_api_client/models/email_webhook_recipient_info.py
@@ -0,0 +1,102 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailWebhookRecipientInfo(BaseModel):
+ """
+ Recipient information such as device type, OS, device name.
+ """ # noqa: E501
+
+ device_type: Optional[StrictStr] = Field(
+ default=None,
+ description="The type of device used by the recipient to do the user action.",
+ alias="deviceType",
+ )
+ os: Optional[StrictStr] = Field(
+ default=None,
+ description="The type OS present in the device used by the recipient.",
+ )
+ device_name: Optional[StrictStr] = Field(
+ default=None,
+ description="Device name of the action originating device.",
+ alias="deviceName",
+ )
+ __properties: ClassVar[List[str]] = ["deviceType", "os", "deviceName"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailWebhookRecipientInfo from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailWebhookRecipientInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "deviceType": obj.get("deviceType"),
+ "os": obj.get("os"),
+ "deviceName": obj.get("deviceName"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_webhook_track_report.py b/infobip_api_client/models/email_webhook_track_report.py
new file mode 100644
index 0000000..5ccc98e
--- /dev/null
+++ b/infobip_api_client/models/email_webhook_track_report.py
@@ -0,0 +1,164 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from infobip_api_client.models.email_webhook_geo_location import EmailWebhookGeoLocation
+from infobip_api_client.models.email_webhook_recipient_info import (
+ EmailWebhookRecipientInfo,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailWebhookTrackReport(BaseModel):
+ """
+ EmailWebhookTrackReport
+ """ # noqa: E501
+
+ notification_type: Optional[StrictStr] = Field(
+ default=None,
+ description="Tells the type of user event that took place. Possible events: `OPENED`, `CLICKED`, `COMPLAINED`, `UNSUBSCRIBED`.",
+ alias="notificationType",
+ )
+ domain: Optional[StrictStr] = Field(
+ default=None,
+ description="The sending domain used to send the email to the recipient.",
+ )
+ recipient: Optional[StrictStr] = Field(
+ default=None, description="Recipient of the email."
+ )
+ url: Optional[StrictStr] = Field(
+ default=None,
+ description="The link the recipient has clicked. This attribute will only be present if the event is of the type `CLICKED`.",
+ )
+ send_date_time: Optional[Union[StrictFloat, StrictInt]] = Field(
+ default=None,
+ description="The time at which the email was sent. Time is in milliseconds.",
+ alias="sendDateTime",
+ )
+ message_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the message sent to the recipient.",
+ alias="messageId",
+ )
+ bulk_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies a list of email messages. This is either defined by user in the request or auto generated.",
+ alias="bulkId",
+ )
+ callback_data: Optional[StrictStr] = Field(
+ default=None,
+ description="The callback data sent through the callbackData field in your fully featured Email message.",
+ alias="callbackData",
+ )
+ recipient_info: Optional[EmailWebhookRecipientInfo] = Field(
+ default=None, alias="recipientInfo"
+ )
+ geo_location: Optional[EmailWebhookGeoLocation] = Field(
+ default=None, alias="geoLocation"
+ )
+ __properties: ClassVar[List[str]] = [
+ "notificationType",
+ "domain",
+ "recipient",
+ "url",
+ "sendDateTime",
+ "messageId",
+ "bulkId",
+ "callbackData",
+ "recipientInfo",
+ "geoLocation",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailWebhookTrackReport from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of recipient_info
+ if self.recipient_info:
+ _dict["recipientInfo"] = self.recipient_info.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of geo_location
+ if self.geo_location:
+ _dict["geoLocation"] = self.geo_location.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailWebhookTrackReport from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "notificationType": obj.get("notificationType"),
+ "domain": obj.get("domain"),
+ "recipient": obj.get("recipient"),
+ "url": obj.get("url"),
+ "sendDateTime": obj.get("sendDateTime"),
+ "messageId": obj.get("messageId"),
+ "bulkId": obj.get("bulkId"),
+ "callbackData": obj.get("callbackData"),
+ "recipientInfo": EmailWebhookRecipientInfo.from_dict(
+ obj["recipientInfo"]
+ )
+ if obj.get("recipientInfo") is not None
+ else None,
+ "geoLocation": EmailWebhookGeoLocation.from_dict(obj["geoLocation"])
+ if obj.get("geoLocation") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/email_webhook_track_response.py b/infobip_api_client/models/email_webhook_track_response.py
new file mode 100644
index 0000000..726481f
--- /dev/null
+++ b/infobip_api_client/models/email_webhook_track_response.py
@@ -0,0 +1,164 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from infobip_api_client.models.email_webhook_geo_location import EmailWebhookGeoLocation
+from infobip_api_client.models.email_webhook_recipient_info import (
+ EmailWebhookRecipientInfo,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class EmailWebhookTrackResponse(BaseModel):
+ """
+ EmailWebhookTrackResponse
+ """ # noqa: E501
+
+ notification_type: Optional[StrictStr] = Field(
+ default=None,
+ description="Tells the type of user event that took place. Possible events: `OPENED`, `CLICKED`, `COMPLAINED`, `UNSUBSCRIBED`.",
+ alias="notificationType",
+ )
+ domain: Optional[StrictStr] = Field(
+ default=None,
+ description="The sending domain used to send the email to the recipient.",
+ )
+ recipient: Optional[StrictStr] = Field(
+ default=None, description="Recipient of the email."
+ )
+ url: Optional[StrictStr] = Field(
+ default=None,
+ description="The link the recipient has clicked. This attribute will only be present if the event is of the type `CLICKED`.",
+ )
+ send_date_time: Optional[Union[StrictFloat, StrictInt]] = Field(
+ default=None,
+ description="The time at which the email was sent. Time is in milliseconds.",
+ alias="sendDateTime",
+ )
+ message_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies the message sent to the recipient.",
+ alias="messageId",
+ )
+ bulk_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The ID that uniquely identifies a list of email messages. This is either defined by user in the request or auto generated.",
+ alias="bulkId",
+ )
+ callback_data: Optional[StrictStr] = Field(
+ default=None,
+ description="The callback data sent through the callbackData field in your fully featured Email message.",
+ alias="callbackData",
+ )
+ recipient_info: Optional[EmailWebhookRecipientInfo] = Field(
+ default=None, alias="recipientInfo"
+ )
+ geo_location: Optional[EmailWebhookGeoLocation] = Field(
+ default=None, alias="geoLocation"
+ )
+ __properties: ClassVar[List[str]] = [
+ "notificationType",
+ "domain",
+ "recipient",
+ "url",
+ "sendDateTime",
+ "messageId",
+ "bulkId",
+ "callbackData",
+ "recipientInfo",
+ "geoLocation",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of EmailWebhookTrackResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of recipient_info
+ if self.recipient_info:
+ _dict["recipientInfo"] = self.recipient_info.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of geo_location
+ if self.geo_location:
+ _dict["geoLocation"] = self.geo_location.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of EmailWebhookTrackResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "notificationType": obj.get("notificationType"),
+ "domain": obj.get("domain"),
+ "recipient": obj.get("recipient"),
+ "url": obj.get("url"),
+ "sendDateTime": obj.get("sendDateTime"),
+ "messageId": obj.get("messageId"),
+ "bulkId": obj.get("bulkId"),
+ "callbackData": obj.get("callbackData"),
+ "recipientInfo": EmailWebhookRecipientInfo.from_dict(
+ obj["recipientInfo"]
+ )
+ if obj.get("recipientInfo") is not None
+ else None,
+ "geoLocation": EmailWebhookGeoLocation.from_dict(obj["geoLocation"])
+ if obj.get("geoLocation") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_add_flow_participant_result.py b/infobip_api_client/models/flow_add_flow_participant_result.py
new file mode 100644
index 0000000..abc89ba
--- /dev/null
+++ b/infobip_api_client/models/flow_add_flow_participant_result.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.flow_add_flow_participant_status import (
+ FlowAddFlowParticipantStatus,
+)
+from infobip_api_client.models.flow_error_status_reason import FlowErrorStatusReason
+from infobip_api_client.models.flow_person_unique_field import FlowPersonUniqueField
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowAddFlowParticipantResult(BaseModel):
+ """
+ Result of operation for the given participant.
+ """ # noqa: E501
+
+ identify_by: FlowPersonUniqueField = Field(alias="identifyBy")
+ status: FlowAddFlowParticipantStatus
+ error_reason: Optional[FlowErrorStatusReason] = Field(
+ default=None, alias="errorReason"
+ )
+ __properties: ClassVar[List[str]] = ["identifyBy", "status", "errorReason"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowAddFlowParticipantResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of identify_by
+ if self.identify_by:
+ _dict["identifyBy"] = self.identify_by.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowAddFlowParticipantResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "identifyBy": FlowPersonUniqueField.from_dict(obj["identifyBy"])
+ if obj.get("identifyBy") is not None
+ else None,
+ "status": obj.get("status"),
+ "errorReason": obj.get("errorReason"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_add_flow_participant_status.py b/infobip_api_client/models/flow_add_flow_participant_status.py
new file mode 100644
index 0000000..a2c7b03
--- /dev/null
+++ b/infobip_api_client/models/flow_add_flow_participant_status.py
@@ -0,0 +1,36 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class FlowAddFlowParticipantStatus(str, Enum):
+ """
+ Processing status of the participant.
+ """
+
+ """
+ allowed enum values
+ """
+ PENDING = "PENDING"
+ REJECTED = "REJECTED"
+ ACCEPTED = "ACCEPTED"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of FlowAddFlowParticipantStatus from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/flow_add_flow_participants_request.py b/infobip_api_client/models/flow_add_flow_participants_request.py
new file mode 100644
index 0000000..01c4b5c
--- /dev/null
+++ b/infobip_api_client/models/flow_add_flow_participants_request.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from infobip_api_client.models.flow_participant import FlowParticipant
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowAddFlowParticipantsRequest(BaseModel):
+ """
+ Request to add given participants to the Flow campaign.
+ """ # noqa: E501
+
+ participants: List[FlowParticipant] = Field(
+ description="Array of participants to add."
+ )
+ notify_url: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = Field(
+ default=None,
+ description="The URL on your callback server on which a report of operation results will be sent.",
+ alias="notifyUrl",
+ )
+ callback_data: Optional[
+ Annotated[str, Field(strict=True, max_length=2000)]
+ ] = Field(
+ default=None,
+ description="Additional data will be passed in the request to your callback server along with the operation results report.",
+ alias="callbackData",
+ )
+ __properties: ClassVar[List[str]] = ["participants", "notifyUrl", "callbackData"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowAddFlowParticipantsRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in participants (list)
+ _items = []
+ if self.participants:
+ for _item in self.participants:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["participants"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowAddFlowParticipantsRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "participants": [
+ FlowParticipant.from_dict(_item) for _item in obj["participants"]
+ ]
+ if obj.get("participants") is not None
+ else None,
+ "notifyUrl": obj.get("notifyUrl"),
+ "callbackData": obj.get("callbackData"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_add_flow_participants_response.py b/infobip_api_client/models/flow_add_flow_participants_response.py
new file mode 100644
index 0000000..b456412
--- /dev/null
+++ b/infobip_api_client/models/flow_add_flow_participants_response.py
@@ -0,0 +1,85 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowAddFlowParticipantsResponse(BaseModel):
+ """
+ FlowAddFlowParticipantsResponse
+ """ # noqa: E501
+
+ operation_id: StrictStr = Field(
+ description="Unique identifier of the operation.", alias="operationId"
+ )
+ __properties: ClassVar[List[str]] = ["operationId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowAddFlowParticipantsResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowAddFlowParticipantsResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"operationId": obj.get("operationId")})
+ return _obj
diff --git a/infobip_api_client/models/flow_api_exception.py b/infobip_api_client/models/flow_api_exception.py
new file mode 100644
index 0000000..d8546a4
--- /dev/null
+++ b/infobip_api_client/models/flow_api_exception.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.flow_api_request_error import FlowApiRequestError
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowApiException(BaseModel):
+ """
+ FlowApiException
+ """ # noqa: E501
+
+ request_error: Optional[FlowApiRequestError] = Field(
+ default=None, alias="requestError"
+ )
+ __properties: ClassVar[List[str]] = ["requestError"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowApiException from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of request_error
+ if self.request_error:
+ _dict["requestError"] = self.request_error.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowApiException from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "requestError": FlowApiRequestError.from_dict(obj["requestError"])
+ if obj.get("requestError") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_api_request_error.py b/infobip_api_client/models/flow_api_request_error.py
new file mode 100644
index 0000000..18ad8c5
--- /dev/null
+++ b/infobip_api_client/models/flow_api_request_error.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.flow_api_request_error_details import (
+ FlowApiRequestErrorDetails,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowApiRequestError(BaseModel):
+ """
+ FlowApiRequestError
+ """ # noqa: E501
+
+ service_exception: Optional[FlowApiRequestErrorDetails] = Field(
+ default=None, alias="serviceException"
+ )
+ __properties: ClassVar[List[str]] = ["serviceException"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowApiRequestError from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of service_exception
+ if self.service_exception:
+ _dict["serviceException"] = self.service_exception.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowApiRequestError from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "serviceException": FlowApiRequestErrorDetails.from_dict(
+ obj["serviceException"]
+ )
+ if obj.get("serviceException") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_api_request_error_details.py b/infobip_api_client/models/flow_api_request_error_details.py
new file mode 100644
index 0000000..bd6d118
--- /dev/null
+++ b/infobip_api_client/models/flow_api_request_error_details.py
@@ -0,0 +1,97 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowApiRequestErrorDetails(BaseModel):
+ """
+ FlowApiRequestErrorDetails
+ """ # noqa: E501
+
+ message_id: Optional[StrictStr] = Field(
+ default=None, description="Identifier of the error.", alias="messageId"
+ )
+ text: Optional[StrictStr] = Field(
+ default=None, description="Detailed error description."
+ )
+ validation_errors: Optional[Dict[str, List[StrictStr]]] = Field(
+ default=None, description="Validation errors.", alias="validationErrors"
+ )
+ __properties: ClassVar[List[str]] = ["messageId", "text", "validationErrors"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowApiRequestErrorDetails from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowApiRequestErrorDetails from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "messageId": obj.get("messageId"),
+ "text": obj.get("text"),
+ "validationErrors": obj.get("validationErrors"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_common_ott_contact.py b/infobip_api_client/models/flow_common_ott_contact.py
new file mode 100644
index 0000000..6b6e05a
--- /dev/null
+++ b/infobip_api_client/models/flow_common_ott_contact.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowCommonOttContact(BaseModel):
+ """
+ A list of person's Kakao Sangdam destinations.
+ """ # noqa: E501
+
+ application_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Application Id on which the user is subscribed.",
+ alias="applicationId",
+ )
+ user_id: Optional[StrictStr] = Field(
+ default=None, description="Unique user ID for a person.", alias="userId"
+ )
+ system_data: Optional[Dict[str, Any]] = Field(
+ default=None,
+ description="System data collected from the user's profile.",
+ alias="systemData",
+ )
+ __properties: ClassVar[List[str]] = ["applicationId", "userId", "systemData"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowCommonOttContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowCommonOttContact from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "applicationId": obj.get("applicationId"),
+ "userId": obj.get("userId"),
+ "systemData": obj.get("systemData"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_common_push_contact.py b/infobip_api_client/models/flow_common_push_contact.py
new file mode 100644
index 0000000..5fb3863
--- /dev/null
+++ b/infobip_api_client/models/flow_common_push_contact.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowCommonPushContact(BaseModel):
+ """
+ A list of person's web push destinations.
+ """ # noqa: E501
+
+ application_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Application Id on which the user is subscribed.",
+ alias="applicationId",
+ )
+ registration_id: Optional[StrictStr] = Field(
+ default=None, description="Push registration ID.", alias="registrationId"
+ )
+ additional_data: Optional[Dict[str, Any]] = Field(
+ default=None, description="Unique user ID for a person.", alias="additionalData"
+ )
+ system_data: Optional[Dict[str, Any]] = Field(
+ default=None,
+ description="System data collected from the user's profile.",
+ alias="systemData",
+ )
+ __properties: ClassVar[List[str]] = [
+ "applicationId",
+ "registrationId",
+ "additionalData",
+ "systemData",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowCommonPushContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowCommonPushContact from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "applicationId": obj.get("applicationId"),
+ "registrationId": obj.get("registrationId"),
+ "additionalData": obj.get("additionalData"),
+ "systemData": obj.get("systemData"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_email_contact.py b/infobip_api_client/models/flow_email_contact.py
new file mode 100644
index 0000000..14df50a
--- /dev/null
+++ b/infobip_api_client/models/flow_email_contact.py
@@ -0,0 +1,86 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowEmailContact(BaseModel):
+ """
+ A list of person's email addresses. Max 100 emails per person.
+ """ # noqa: E501
+
+ address: Optional[StrictStr] = Field(
+ default=None,
+ description="Person's email address. Must comply with the [email format](https://tools.ietf.org/html/rfc2822) and cannot exceed 255 characters. One person can have up to 100 email addresses.",
+ )
+ __properties: ClassVar[List[str]] = ["address"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowEmailContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowEmailContact 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")})
+ return _obj
diff --git a/infobip_api_client/models/flow_error_status_reason.py b/infobip_api_client/models/flow_error_status_reason.py
new file mode 100644
index 0000000..20bc7c1
--- /dev/null
+++ b/infobip_api_client/models/flow_error_status_reason.py
@@ -0,0 +1,40 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class FlowErrorStatusReason(str, Enum):
+ """
+ Detailed reason for the REJECTED status: * `REJECTED_INVALID_CONTACT` - Person started to be processed but has been rejected as the contact is not recognized. * `REJECTED_ATTRIBUTE_MISSED` - One of the person's attributes specified in the request does not exist or has spelling error. * `REJECTED_PERSON_ALREADY_IN_FLOW` - Person is already in flow. * `REJECTED_PERSON_NOT_ALLOWED_TO_REENTER` - Person is not allowed to re-enter flow now. * `REJECTED_FLOW_ERROR_UNKNOWN` - Generic flow error. * `REJECTED_NOT_ENOUGH_CREDITS` - Your account is out of credits for further submission. Top up your account. For further assistance in topping up or applying for an online account top-up service, you may contact your Account Manager.
+ """
+
+ """
+ allowed enum values
+ """
+ REJECTED_INVALID_CONTACT = "REJECTED_INVALID_CONTACT"
+ REJECTED_ATTRIBUTE_MISSED = "REJECTED_ATTRIBUTE_MISSED"
+ REJECTED_PERSON_IN_FLOW = "REJECTED_PERSON_IN_FLOW"
+ REJECTED_PERSON_NOT_ALLOWED_TO_REENTER = "REJECTED_PERSON_NOT_ALLOWED_TO_REENTER"
+ REJECTED_FLOW_ERROR_UNKNOWN = "REJECTED_FLOW_ERROR_UNKNOWN"
+ REJECTED_NOT_ENOUGH_CREDITS = "REJECTED_NOT_ENOUGH_CREDITS"
+ REJECTED_CDP_ERROR_UNKNOWN = "REJECTED_CDP_ERROR_UNKNOWN"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of FlowErrorStatusReason from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/flow_exception_response.py b/infobip_api_client/models/flow_exception_response.py
new file mode 100644
index 0000000..29e4551
--- /dev/null
+++ b/infobip_api_client/models/flow_exception_response.py
@@ -0,0 +1,86 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowExceptionResponse(BaseModel):
+ """
+ Response error codes
Error | ErrorCode | HTTP status |
---|---|---|
Bad request | 40001 | 400 |
Duplicate person | 40002 | 400 |
Person manipulation failed | 40003 | 400 |
Person already in flow | 40004 | 400 |
Flow inactive | 40005 | 400 |
Person is not in the flow | 40006 | 400 |
Flow not found | 40401 | 404 |
Person not found | 40402 | 404 |
Action not found | 40403 | 404 |
Internal server error | 50001 | 500 |
externalId
or contactInformation
already exists in the People, the persons will be automatically merged. See endpoint description for more info.
+ """ # noqa: E501
+
+ created_at: Optional[StrictStr] = Field(
+ default=None,
+ description="Date and time of creation. Has the following format: yyyy-MM-dd'T'HH:mm:ss.",
+ alias="createdAt",
+ )
+ modified_at: Optional[StrictStr] = Field(
+ default=None,
+ description="Date and time of last modification. Has the following format: yyyy-MM-dd'T'HH:mm:ss.",
+ alias="modifiedAt",
+ )
+ id: Optional[StrictInt] = Field(
+ default=None, description="Unique id of the entity."
+ )
+ external_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Unique ID for a person from your or another external system, 256 characters max.",
+ alias="externalId",
+ )
+ first_name: Optional[StrictStr] = Field(
+ default=None,
+ description="Person's first name, 255 characters max.",
+ alias="firstName",
+ )
+ last_name: Optional[StrictStr] = Field(
+ default=None,
+ description="Person's last name, 255 characters max.",
+ alias="lastName",
+ )
+ type: Optional[FlowType] = None
+ address: Optional[StrictStr] = Field(
+ default=None, description="Person's title, 50 characters max."
+ )
+ city: Optional[StrictStr] = Field(
+ default=None, description="Person's city, 50 characters max."
+ )
+ country: Optional[StrictStr] = Field(
+ default=None, description="Person's country, 50 characters max."
+ )
+ gender: Optional[FlowGender] = None
+ birth_date: Optional[StrictStr] = Field(
+ default=None,
+ description="Person's date of birth, format `YYYY-MM-DD`.",
+ alias="birthDate",
+ )
+ middle_name: Optional[StrictStr] = Field(
+ default=None,
+ description="Person's middle name, 50 characters max.",
+ alias="middleName",
+ )
+ preferred_language: Optional[StrictStr] = Field(
+ default=None,
+ description="Person's preferred language. Must be in two letter ISO (xx) or language-region BCP-47 (xx-YY) format.",
+ alias="preferredLanguage",
+ )
+ profile_picture: Optional[StrictStr] = Field(
+ default=None,
+ description="URL for the person's profile picture, 2083 characters max.",
+ alias="profilePicture",
+ )
+ origin: Optional[FlowOrigin] = None
+ modified_from: Optional[FlowOrigin] = Field(default=None, alias="modifiedFrom")
+ tags: Optional[List[StrictStr]] = Field(
+ default=None, description="List of tags that this person has."
+ )
+ custom_attributes: Optional[Dict[str, Any]] = Field(
+ default=None,
+ description="List of custom attributes for the person, 4096 characters max per value.",
+ alias="customAttributes",
+ )
+ contact_information: Optional[FlowPersonContacts] = Field(
+ default=None, alias="contactInformation"
+ )
+ integrations: Optional[FlowIntegrations] = None
+ computed_attributes: Optional[Dict[str, Any]] = Field(
+ default=None,
+ description="Person's computed attributes grouped by type.",
+ alias="computedAttributes",
+ )
+ __properties: ClassVar[List[str]] = [
+ "createdAt",
+ "modifiedAt",
+ "id",
+ "externalId",
+ "firstName",
+ "lastName",
+ "type",
+ "address",
+ "city",
+ "country",
+ "gender",
+ "birthDate",
+ "middleName",
+ "preferredLanguage",
+ "profilePicture",
+ "origin",
+ "modifiedFrom",
+ "tags",
+ "customAttributes",
+ "contactInformation",
+ "integrations",
+ "computedAttributes",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowPerson from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of contact_information
+ if self.contact_information:
+ _dict["contactInformation"] = self.contact_information.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of integrations
+ if self.integrations:
+ _dict["integrations"] = self.integrations.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowPerson from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "createdAt": obj.get("createdAt"),
+ "modifiedAt": obj.get("modifiedAt"),
+ "id": obj.get("id"),
+ "externalId": obj.get("externalId"),
+ "firstName": obj.get("firstName"),
+ "lastName": obj.get("lastName"),
+ "type": obj.get("type"),
+ "address": obj.get("address"),
+ "city": obj.get("city"),
+ "country": obj.get("country"),
+ "gender": obj.get("gender"),
+ "birthDate": obj.get("birthDate"),
+ "middleName": obj.get("middleName"),
+ "preferredLanguage": obj.get("preferredLanguage"),
+ "profilePicture": obj.get("profilePicture"),
+ "origin": obj.get("origin"),
+ "modifiedFrom": obj.get("modifiedFrom"),
+ "tags": obj.get("tags"),
+ "customAttributes": obj.get("customAttributes"),
+ "contactInformation": FlowPersonContacts.from_dict(
+ obj["contactInformation"]
+ )
+ if obj.get("contactInformation") is not None
+ else None,
+ "integrations": FlowIntegrations.from_dict(obj["integrations"])
+ if obj.get("integrations") is not None
+ else None,
+ "computedAttributes": obj.get("computedAttributes"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_person_contacts.py b/infobip_api_client/models/flow_person_contacts.py
new file mode 100644
index 0000000..b700a8f
--- /dev/null
+++ b/infobip_api_client/models/flow_person_contacts.py
@@ -0,0 +1,306 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.flow_common_ott_contact import FlowCommonOttContact
+from infobip_api_client.models.flow_common_push_contact import FlowCommonPushContact
+from infobip_api_client.models.flow_email_contact import FlowEmailContact
+from infobip_api_client.models.flow_phone_contact import FlowPhoneContact
+from infobip_api_client.models.flow_push_contact import FlowPushContact
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowPersonContacts(BaseModel):
+ """
+ List of phones, emails and other information how a person can be contacted.
+ """ # noqa: E501
+
+ phone: Optional[List[FlowPhoneContact]] = Field(
+ default=None,
+ description="A list of person's phone numbers. Max 100 numbers per person.",
+ )
+ email: Optional[List[FlowEmailContact]] = Field(
+ default=None,
+ description="A list of person's email addresses. Max 100 emails per person.",
+ )
+ push: Optional[List[FlowPushContact]] = Field(
+ default=None, description="List of person's push registrations."
+ )
+ facebook: Optional[List[FlowCommonOttContact]] = Field(
+ default=None, description="A list of person's Messenger destinations."
+ )
+ line: Optional[List[FlowCommonOttContact]] = Field(
+ default=None, description="A list of person's Line destinations."
+ )
+ viber_bots: Optional[List[FlowCommonOttContact]] = Field(
+ default=None,
+ description="A list of person's Viber Bots destinations.",
+ alias="viberBots",
+ )
+ live_chat: Optional[List[FlowCommonOttContact]] = Field(
+ default=None,
+ description="A list of person's Live Chat destinations.",
+ alias="liveChat",
+ )
+ instagram: Optional[List[FlowCommonOttContact]] = Field(
+ default=None, description="A list of person's Instagram destinations."
+ )
+ telegram: Optional[List[FlowCommonOttContact]] = Field(
+ default=None, description="A list of person's Telegram destinations."
+ )
+ apple_business_chat: Optional[List[FlowCommonOttContact]] = Field(
+ default=None,
+ description="A list of person's Apple Business Chat destinations.",
+ alias="appleBusinessChat",
+ )
+ webpush: Optional[List[FlowCommonPushContact]] = Field(
+ default=None, description="A list of person's web push destinations."
+ )
+ instagram_dm: Optional[List[FlowCommonOttContact]] = Field(
+ default=None,
+ description="A list of person's Instagram DM destinations.",
+ alias="instagramDm",
+ )
+ kakao_sangdam: Optional[List[FlowCommonOttContact]] = Field(
+ default=None,
+ description="A list of person's Kakao Sangdam destinations.",
+ alias="kakaoSangdam",
+ )
+ __properties: ClassVar[List[str]] = [
+ "phone",
+ "email",
+ "push",
+ "facebook",
+ "line",
+ "viberBots",
+ "liveChat",
+ "instagram",
+ "telegram",
+ "appleBusinessChat",
+ "webpush",
+ "instagramDm",
+ "kakaoSangdam",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowPersonContacts from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in phone (list)
+ _items = []
+ if self.phone:
+ for _item in self.phone:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["phone"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in email (list)
+ _items = []
+ if self.email:
+ for _item in self.email:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["email"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in push (list)
+ _items = []
+ if self.push:
+ for _item in self.push:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["push"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in facebook (list)
+ _items = []
+ if self.facebook:
+ for _item in self.facebook:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["facebook"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in line (list)
+ _items = []
+ if self.line:
+ for _item in self.line:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["line"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in viber_bots (list)
+ _items = []
+ if self.viber_bots:
+ for _item in self.viber_bots:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["viberBots"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in live_chat (list)
+ _items = []
+ if self.live_chat:
+ for _item in self.live_chat:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["liveChat"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in instagram (list)
+ _items = []
+ if self.instagram:
+ for _item in self.instagram:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["instagram"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in telegram (list)
+ _items = []
+ if self.telegram:
+ for _item in self.telegram:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["telegram"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in apple_business_chat (list)
+ _items = []
+ if self.apple_business_chat:
+ for _item in self.apple_business_chat:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["appleBusinessChat"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in webpush (list)
+ _items = []
+ if self.webpush:
+ for _item in self.webpush:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["webpush"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in instagram_dm (list)
+ _items = []
+ if self.instagram_dm:
+ for _item in self.instagram_dm:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["instagramDm"] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in kakao_sangdam (list)
+ _items = []
+ if self.kakao_sangdam:
+ for _item in self.kakao_sangdam:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["kakaoSangdam"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowPersonContacts from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "phone": [FlowPhoneContact.from_dict(_item) for _item in obj["phone"]]
+ if obj.get("phone") is not None
+ else None,
+ "email": [FlowEmailContact.from_dict(_item) for _item in obj["email"]]
+ if obj.get("email") is not None
+ else None,
+ "push": [FlowPushContact.from_dict(_item) for _item in obj["push"]]
+ if obj.get("push") is not None
+ else None,
+ "facebook": [
+ FlowCommonOttContact.from_dict(_item) for _item in obj["facebook"]
+ ]
+ if obj.get("facebook") is not None
+ else None,
+ "line": [FlowCommonOttContact.from_dict(_item) for _item in obj["line"]]
+ if obj.get("line") is not None
+ else None,
+ "viberBots": [
+ FlowCommonOttContact.from_dict(_item) for _item in obj["viberBots"]
+ ]
+ if obj.get("viberBots") is not None
+ else None,
+ "liveChat": [
+ FlowCommonOttContact.from_dict(_item) for _item in obj["liveChat"]
+ ]
+ if obj.get("liveChat") is not None
+ else None,
+ "instagram": [
+ FlowCommonOttContact.from_dict(_item) for _item in obj["instagram"]
+ ]
+ if obj.get("instagram") is not None
+ else None,
+ "telegram": [
+ FlowCommonOttContact.from_dict(_item) for _item in obj["telegram"]
+ ]
+ if obj.get("telegram") is not None
+ else None,
+ "appleBusinessChat": [
+ FlowCommonOttContact.from_dict(_item)
+ for _item in obj["appleBusinessChat"]
+ ]
+ if obj.get("appleBusinessChat") is not None
+ else None,
+ "webpush": [
+ FlowCommonPushContact.from_dict(_item) for _item in obj["webpush"]
+ ]
+ if obj.get("webpush") is not None
+ else None,
+ "instagramDm": [
+ FlowCommonOttContact.from_dict(_item)
+ for _item in obj["instagramDm"]
+ ]
+ if obj.get("instagramDm") is not None
+ else None,
+ "kakaoSangdam": [
+ FlowCommonOttContact.from_dict(_item)
+ for _item in obj["kakaoSangdam"]
+ ]
+ if obj.get("kakaoSangdam") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_person_unique_field.py b/infobip_api_client/models/flow_person_unique_field.py
new file mode 100644
index 0000000..df64079
--- /dev/null
+++ b/infobip_api_client/models/flow_person_unique_field.py
@@ -0,0 +1,97 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.flow_person_unique_field_type import (
+ FlowPersonUniqueFieldType,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowPersonUniqueField(BaseModel):
+ """
+ Unique identifier of the participant.
+ """ # noqa: E501
+
+ identifier: StrictStr = Field(description="Unique ID for a person")
+ type: FlowPersonUniqueFieldType
+ sender: Optional[StrictStr] = Field(
+ default=None,
+ description="Sender or application ID.`sender` is required for all identifier types except `PHONE`, `EMAIL`",
+ )
+ __properties: ClassVar[List[str]] = ["identifier", "type", "sender"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowPersonUniqueField from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowPersonUniqueField from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "identifier": obj.get("identifier"),
+ "type": obj.get("type"),
+ "sender": obj.get("sender"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_person_unique_field_type.py b/infobip_api_client/models/flow_person_unique_field_type.py
new file mode 100644
index 0000000..549d640
--- /dev/null
+++ b/infobip_api_client/models/flow_person_unique_field_type.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class FlowPersonUniqueFieldType(str, Enum):
+ """
+ Type of unique ID
+ """
+
+ """
+ allowed enum values
+ """
+ EMAIL = "EMAIL"
+ PHONE = "PHONE"
+ FACEBOOK = "FACEBOOK"
+ LINE = "LINE"
+ APPLE_BUSINESS_CHAT = "APPLE_BUSINESS_CHAT"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of FlowPersonUniqueFieldType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/flow_phone_contact.py b/infobip_api_client/models/flow_phone_contact.py
new file mode 100644
index 0000000..ec8a738
--- /dev/null
+++ b/infobip_api_client/models/flow_phone_contact.py
@@ -0,0 +1,86 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowPhoneContact(BaseModel):
+ """
+ A list of person's phone numbers. Max 100 numbers per person.
+ """ # noqa: E501
+
+ number: Optional[StrictStr] = Field(
+ default=None,
+ description="Person's phone number. Must be in [international format](https://en.wikipedia.org/wiki/E.164) and cannot exceed 50 characters. One person can have up to 100 phone numbers.",
+ )
+ __properties: ClassVar[List[str]] = ["number"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowPhoneContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowPhoneContact from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"number": obj.get("number")})
+ return _obj
diff --git a/infobip_api_client/models/flow_push_contact.py b/infobip_api_client/models/flow_push_contact.py
new file mode 100644
index 0000000..7a971a1
--- /dev/null
+++ b/infobip_api_client/models/flow_push_contact.py
@@ -0,0 +1,117 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowPushContact(BaseModel):
+ """
+ List of person's push registrations.
+ """ # noqa: E501
+
+ application_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Application Id on which the user is subscribed.",
+ alias="applicationId",
+ )
+ registration_id: Optional[StrictStr] = Field(
+ default=None, description="Push registration ID.", alias="registrationId"
+ )
+ additional_data: Optional[Dict[str, Any]] = Field(
+ default=None, description="Unique user ID for a person.", alias="additionalData"
+ )
+ system_data: Optional[Dict[str, Any]] = Field(
+ default=None,
+ description="System data collected from the user's profile.",
+ alias="systemData",
+ )
+ is_primary: Optional[StrictBool] = Field(
+ default=None,
+ description="Set to true if this device is a primary device of a user among other devices.",
+ alias="isPrimary",
+ )
+ __properties: ClassVar[List[str]] = [
+ "applicationId",
+ "registrationId",
+ "additionalData",
+ "systemData",
+ "isPrimary",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowPushContact from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowPushContact from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "applicationId": obj.get("applicationId"),
+ "registrationId": obj.get("registrationId"),
+ "additionalData": obj.get("additionalData"),
+ "systemData": obj.get("systemData"),
+ "isPrimary": obj.get("isPrimary"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_salesforce.py b/infobip_api_client/models/flow_salesforce.py
new file mode 100644
index 0000000..c301757
--- /dev/null
+++ b/infobip_api_client/models/flow_salesforce.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FlowSalesforce(BaseModel):
+ """
+ Salesforce integration.
+ """ # noqa: E501
+
+ lead_id: Optional[StrictStr] = Field(
+ default=None, description="Salesforce lead id.", alias="leadId"
+ )
+ contact_id: Optional[StrictStr] = Field(
+ default=None, description="Salesforce contact id.", alias="contactId"
+ )
+ __properties: ClassVar[List[str]] = ["leadId", "contactId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FlowSalesforce from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FlowSalesforce from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"leadId": obj.get("leadId"), "contactId": obj.get("contactId")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/flow_type.py b/infobip_api_client/models/flow_type.py
new file mode 100644
index 0000000..3a3325b
--- /dev/null
+++ b/infobip_api_client/models/flow_type.py
@@ -0,0 +1,35 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class FlowType(str, Enum):
+ """
+ Person's type, default type is CUSTOMER.
+ """
+
+ """
+ allowed enum values
+ """
+ CUSTOMER = "CUSTOMER"
+ LEAD = "LEAD"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of FlowType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/forms_action_after_submission.py b/infobip_api_client/models/forms_action_after_submission.py
new file mode 100644
index 0000000..0fec6f7
--- /dev/null
+++ b/infobip_api_client/models/forms_action_after_submission.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List
+from infobip_api_client.models.forms_action_after_submission_type import (
+ FormsActionAfterSubmissionType,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FormsActionAfterSubmission(BaseModel):
+ """
+ Action after the submission
+ """ # noqa: E501
+
+ type: FormsActionAfterSubmissionType
+ value: StrictStr
+ __properties: ClassVar[List[str]] = ["type", "value"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FormsActionAfterSubmission from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FormsActionAfterSubmission from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"type": obj.get("type"), "value": obj.get("value")})
+ return _obj
diff --git a/infobip_api_client/models/forms_action_after_submission_type.py b/infobip_api_client/models/forms_action_after_submission_type.py
new file mode 100644
index 0000000..77a4b69
--- /dev/null
+++ b/infobip_api_client/models/forms_action_after_submission_type.py
@@ -0,0 +1,35 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class FormsActionAfterSubmissionType(str, Enum):
+ """
+ FormsActionAfterSubmissionType
+ """
+
+ """
+ allowed enum values
+ """
+ REDIRECT = "REDIRECT"
+ MESSAGE = "MESSAGE"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of FormsActionAfterSubmissionType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/forms_component_type.py b/infobip_api_client/models/forms_component_type.py
new file mode 100644
index 0000000..183b2d9
--- /dev/null
+++ b/infobip_api_client/models/forms_component_type.py
@@ -0,0 +1,53 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class FormsComponentType(str, Enum):
+ """
+ FormsComponentType
+ """
+
+ """
+ allowed enum values
+ """
+ TEXT = "TEXT"
+ TEXTAREA = "TEXTAREA"
+ NUMBER = "NUMBER"
+ DROPDOWN = "DROPDOWN"
+ CHECKBOX = "CHECKBOX"
+ CHECKBOX_GROUP = "CHECKBOX_GROUP"
+ RADIOBUTTON = "RADIOBUTTON"
+ DATE = "DATE"
+ DATETIME = "DATETIME"
+ EMAIL = "EMAIL"
+ MSISDN = "MSISDN"
+ SUBMIT_BUTTON = "SUBMIT_BUTTON"
+ TITLE = "TITLE"
+ DESCRIPTION = "DESCRIPTION"
+ APPLE_SPLASH = "APPLE_SPLASH"
+ APPLE_BOOLEAN = "APPLE_BOOLEAN"
+ WHATSAPP_SCREEN = "WHATSAPP_SCREEN"
+ WHATSAPP_HEADING = "WHATSAPP_HEADING"
+ WHATSAPP_SUBHEADING = "WHATSAPP_SUBHEADING"
+ WHATSAPP_BODY = "WHATSAPP_BODY"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of FormsComponentType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/forms_element.py b/infobip_api_client/models/forms_element.py
new file mode 100644
index 0000000..5c30cd5
--- /dev/null
+++ b/infobip_api_client/models/forms_element.py
@@ -0,0 +1,152 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.forms_component_type import FormsComponentType
+from infobip_api_client.models.forms_element_option import FormsElementOption
+from infobip_api_client.models.forms_validation_rules import FormsValidationRules
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FormsElement(BaseModel):
+ """
+ List of form fields
+ """ # noqa: E501
+
+ component: FormsComponentType
+ field_id: Optional[StrictStr] = Field(default=None, alias="fieldId")
+ person_field: Optional[StrictStr] = Field(default=None, alias="personField")
+ label: Optional[StrictStr] = None
+ is_required: Optional[StrictBool] = Field(default=None, alias="isRequired")
+ is_hidden: Optional[StrictBool] = Field(default=None, alias="isHidden")
+ additional_configuration: Optional[Dict[str, StrictStr]] = Field(
+ default=None, alias="additionalConfiguration"
+ )
+ text_content: Optional[StrictStr] = Field(default=None, alias="textContent")
+ options: Optional[List[FormsElementOption]] = None
+ validation_rules: Optional[FormsValidationRules] = Field(
+ default=None, alias="validationRules"
+ )
+ placeholder: Optional[StrictStr] = None
+ checkbox_text: Optional[StrictStr] = Field(default=None, alias="checkboxText")
+ validation_messages: Optional[Dict[str, StrictStr]] = Field(
+ default=None, alias="validationMessages"
+ )
+ __properties: ClassVar[List[str]] = [
+ "component",
+ "fieldId",
+ "personField",
+ "label",
+ "isRequired",
+ "isHidden",
+ "additionalConfiguration",
+ "textContent",
+ "options",
+ "validationRules",
+ "placeholder",
+ "checkboxText",
+ "validationMessages",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FormsElement from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in options (list)
+ _items = []
+ if self.options:
+ for _item in self.options:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["options"] = _items
+ # override the default output from pydantic by calling `to_dict()` of validation_rules
+ if self.validation_rules:
+ _dict["validationRules"] = self.validation_rules.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FormsElement from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "component": obj.get("component"),
+ "fieldId": obj.get("fieldId"),
+ "personField": obj.get("personField"),
+ "label": obj.get("label"),
+ "isRequired": obj.get("isRequired"),
+ "isHidden": obj.get("isHidden"),
+ "additionalConfiguration": obj.get("additionalConfiguration"),
+ "textContent": obj.get("textContent"),
+ "options": [
+ FormsElementOption.from_dict(_item) for _item in obj["options"]
+ ]
+ if obj.get("options") is not None
+ else None,
+ "validationRules": FormsValidationRules.from_dict(
+ obj["validationRules"]
+ )
+ if obj.get("validationRules") is not None
+ else None,
+ "placeholder": obj.get("placeholder"),
+ "checkboxText": obj.get("checkboxText"),
+ "validationMessages": obj.get("validationMessages"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/forms_element_option.py b/infobip_api_client/models/forms_element_option.py
new file mode 100644
index 0000000..9a64429
--- /dev/null
+++ b/infobip_api_client/models/forms_element_option.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FormsElementOption(BaseModel):
+ """
+ FormsElementOption
+ """ # noqa: E501
+
+ name: StrictStr
+ value: StrictStr
+ additional_configuration: Optional[Dict[str, StrictStr]] = Field(
+ default=None, alias="additionalConfiguration"
+ )
+ __properties: ClassVar[List[str]] = ["name", "value", "additionalConfiguration"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FormsElementOption from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FormsElementOption 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"),
+ "value": obj.get("value"),
+ "additionalConfiguration": obj.get("additionalConfiguration"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/forms_exception.py b/infobip_api_client/models/forms_exception.py
new file mode 100644
index 0000000..1e11e82
--- /dev/null
+++ b/infobip_api_client/models/forms_exception.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.forms_request_error import FormsRequestError
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FormsException(BaseModel):
+ """
+ FormsException
+ """ # noqa: E501
+
+ request_error: Optional[FormsRequestError] = Field(
+ default=None, alias="requestError"
+ )
+ __properties: ClassVar[List[str]] = ["requestError"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FormsException from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of request_error
+ if self.request_error:
+ _dict["requestError"] = self.request_error.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FormsException from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "requestError": FormsRequestError.from_dict(obj["requestError"])
+ if obj.get("requestError") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/forms_request_error.py b/infobip_api_client/models/forms_request_error.py
new file mode 100644
index 0000000..a021afe
--- /dev/null
+++ b/infobip_api_client/models/forms_request_error.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.forms_request_error_details import (
+ FormsRequestErrorDetails,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FormsRequestError(BaseModel):
+ """
+ FormsRequestError
+ """ # noqa: E501
+
+ service_exception: Optional[FormsRequestErrorDetails] = Field(
+ default=None, alias="serviceException"
+ )
+ __properties: ClassVar[List[str]] = ["serviceException"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FormsRequestError from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of service_exception
+ if self.service_exception:
+ _dict["serviceException"] = self.service_exception.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FormsRequestError from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "serviceException": FormsRequestErrorDetails.from_dict(
+ obj["serviceException"]
+ )
+ if obj.get("serviceException") is not None
+ else None
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/forms_request_error_details.py b/infobip_api_client/models/forms_request_error_details.py
new file mode 100644
index 0000000..035ca16
--- /dev/null
+++ b/infobip_api_client/models/forms_request_error_details.py
@@ -0,0 +1,97 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FormsRequestErrorDetails(BaseModel):
+ """
+ FormsRequestErrorDetails
+ """ # noqa: E501
+
+ message_id: Optional[StrictStr] = Field(
+ default=None, description="Identifier of the error.", alias="messageId"
+ )
+ text: Optional[StrictStr] = Field(
+ default=None, description="Detailed error description."
+ )
+ validation_errors: Optional[Dict[str, List[StrictStr]]] = Field(
+ default=None, description="Validation errors.", alias="validationErrors"
+ )
+ __properties: ClassVar[List[str]] = ["messageId", "text", "validationErrors"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FormsRequestErrorDetails from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FormsRequestErrorDetails from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "messageId": obj.get("messageId"),
+ "text": obj.get("text"),
+ "validationErrors": obj.get("validationErrors"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/forms_response.py b/infobip_api_client/models/forms_response.py
new file mode 100644
index 0000000..bb8e542
--- /dev/null
+++ b/infobip_api_client/models/forms_response.py
@@ -0,0 +1,111 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.forms_response_content import FormsResponseContent
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FormsResponse(BaseModel):
+ """
+ FormsResponse
+ """ # noqa: E501
+
+ forms: List[FormsResponseContent] = Field(description="Forms list")
+ offset: Optional[StrictInt] = Field(
+ default=None, description="Offset from beginning of list of available forms"
+ )
+ limit: Optional[StrictInt] = Field(
+ default=None, description="Number of returned forms"
+ )
+ total: Optional[StrictInt] = Field(
+ default=None, description="Total number of available forms"
+ )
+ __properties: ClassVar[List[str]] = ["forms", "offset", "limit", "total"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FormsResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in forms (list)
+ _items = []
+ if self.forms:
+ for _item in self.forms:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["forms"] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FormsResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "forms": [
+ FormsResponseContent.from_dict(_item) for _item in obj["forms"]
+ ]
+ if obj.get("forms") is not None
+ else None,
+ "offset": obj.get("offset"),
+ "limit": obj.get("limit"),
+ "total": obj.get("total"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/forms_response_content.py b/infobip_api_client/models/forms_response_content.py
new file mode 100644
index 0000000..14e09d4
--- /dev/null
+++ b/infobip_api_client/models/forms_response_content.py
@@ -0,0 +1,146 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.forms_action_after_submission import (
+ FormsActionAfterSubmission,
+)
+from infobip_api_client.models.forms_element import FormsElement
+from infobip_api_client.models.forms_status import FormsStatus
+from infobip_api_client.models.forms_type import FormsType
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FormsResponseContent(BaseModel):
+ """
+ FormsResponseContent
+ """ # noqa: E501
+
+ id: StrictStr = Field(description="Form identifier")
+ name: StrictStr = Field(description="Form name")
+ elements: List[FormsElement] = Field(description="List of form fields")
+ created_at: Optional[datetime] = Field(
+ default=None, description="Time when form was created", alias="createdAt"
+ )
+ updated_at: Optional[datetime] = Field(
+ default=None,
+ description="Time when form was update last time",
+ alias="updatedAt",
+ )
+ action_after_submission: Optional[FormsActionAfterSubmission] = Field(
+ default=None, alias="actionAfterSubmission"
+ )
+ resubmit_enabled: StrictBool = Field(
+ description="Can resubmit multiple times", alias="resubmitEnabled"
+ )
+ form_type: FormsType = Field(alias="formType")
+ form_status: FormsStatus = Field(alias="formStatus")
+ __properties: ClassVar[List[str]] = [
+ "id",
+ "name",
+ "elements",
+ "createdAt",
+ "updatedAt",
+ "actionAfterSubmission",
+ "resubmitEnabled",
+ "formType",
+ "formStatus",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FormsResponseContent from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in elements (list)
+ _items = []
+ if self.elements:
+ for _item in self.elements:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["elements"] = _items
+ # override the default output from pydantic by calling `to_dict()` of action_after_submission
+ if self.action_after_submission:
+ _dict["actionAfterSubmission"] = self.action_after_submission.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FormsResponseContent 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"),
+ "elements": [FormsElement.from_dict(_item) for _item in obj["elements"]]
+ if obj.get("elements") is not None
+ else None,
+ "createdAt": obj.get("createdAt"),
+ "updatedAt": obj.get("updatedAt"),
+ "actionAfterSubmission": FormsActionAfterSubmission.from_dict(
+ obj["actionAfterSubmission"]
+ )
+ if obj.get("actionAfterSubmission") is not None
+ else None,
+ "resubmitEnabled": obj.get("resubmitEnabled"),
+ "formType": obj.get("formType"),
+ "formStatus": obj.get("formStatus"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/forms_status.py b/infobip_api_client/models/forms_status.py
new file mode 100644
index 0000000..1306798
--- /dev/null
+++ b/infobip_api_client/models/forms_status.py
@@ -0,0 +1,36 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class FormsStatus(str, Enum):
+ """
+ Form status
+ """
+
+ """
+ allowed enum values
+ """
+ ACTIVE = "ACTIVE"
+ DISABLED = "DISABLED"
+ DRAFT = "DRAFT"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of FormsStatus from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/forms_status_response.py b/infobip_api_client/models/forms_status_response.py
new file mode 100644
index 0000000..a633c5c
--- /dev/null
+++ b/infobip_api_client/models/forms_status_response.py
@@ -0,0 +1,83 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FormsStatusResponse(BaseModel):
+ """
+ FormsStatusResponse
+ """ # noqa: E501
+
+ status: StrictStr
+ __properties: ClassVar[List[str]] = ["status"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FormsStatusResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FormsStatusResponse 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")})
+ return _obj
diff --git a/infobip_api_client/models/forms_type.py b/infobip_api_client/models/forms_type.py
new file mode 100644
index 0000000..c072cac
--- /dev/null
+++ b/infobip_api_client/models/forms_type.py
@@ -0,0 +1,40 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class FormsType(str, Enum):
+ """
+ Form type
+ """
+
+ """
+ allowed enum values
+ """
+ OPT_IN = "OPT_IN"
+ OPT_OUT = "OPT_OUT"
+ FACEBOOK = "FACEBOOK"
+ LIVECHAT = "LIVECHAT"
+ APPLE = "APPLE"
+ CSAT = "CSAT"
+ WA_FLOW = "WA_FLOW"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of FormsType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/forms_validation_rules.py b/infobip_api_client/models/forms_validation_rules.py
new file mode 100644
index 0000000..4fddc0e
--- /dev/null
+++ b/infobip_api_client/models/forms_validation_rules.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class FormsValidationRules(BaseModel):
+ """
+ FormsValidationRules
+ """ # noqa: E501
+
+ date_pattern: Optional[StrictStr] = Field(default=None, alias="datePattern")
+ max_length: Optional[StrictInt] = Field(default=None, alias="maxLength")
+ max_value: Optional[StrictStr] = Field(default=None, alias="maxValue")
+ min_value: Optional[StrictStr] = Field(default=None, alias="minValue")
+ pattern: Optional[StrictStr] = None
+ sample: Optional[StrictStr] = None
+ forbidden_symbols: Optional[List[StrictStr]] = Field(
+ default=None, alias="forbiddenSymbols"
+ )
+ __properties: ClassVar[List[str]] = [
+ "datePattern",
+ "maxLength",
+ "maxValue",
+ "minValue",
+ "pattern",
+ "sample",
+ "forbiddenSymbols",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of FormsValidationRules from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of FormsValidationRules from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "datePattern": obj.get("datePattern"),
+ "maxLength": obj.get("maxLength"),
+ "maxValue": obj.get("maxValue"),
+ "minValue": obj.get("minValue"),
+ "pattern": obj.get("pattern"),
+ "sample": obj.get("sample"),
+ "forbiddenSymbols": obj.get("forbiddenSymbols"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/call_routing_allowed_day.py b/infobip_api_client/models/hmac_algorithm.py
similarity index 67%
rename from infobip_api_client/models/call_routing_allowed_day.py
rename to infobip_api_client/models/hmac_algorithm.py
index 61c013a..b419eb6 100644
--- a/infobip_api_client/models/call_routing_allowed_day.py
+++ b/infobip_api_client/models/hmac_algorithm.py
@@ -12,30 +12,28 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
-class CallRoutingAllowedDay(str, Enum):
+class HmacAlgorithm(str, Enum):
"""
- Allowed day.
+ HMAC algorithm.
"""
"""
allowed enum values
"""
- MONDAY = "MONDAY"
- TUESDAY = "TUESDAY"
- WEDNESDAY = "WEDNESDAY"
- THURSDAY = "THURSDAY"
- FRIDAY = "FRIDAY"
- SATURDAY = "SATURDAY"
- SUNDAY = "SUNDAY"
+ HMAC_MD5 = "HMAC_MD5"
+ HMAC_SHA_1 = "HMAC_SHA_1"
+ HMAC_SHA_224 = "HMAC_SHA_224"
+ HMAC_SHA_256 = "HMAC_SHA_256"
+ HMAC_SHA_384 = "HMAC_SHA_384"
+ HMAC_SHA_512 = "HMAC_SHA_512"
@classmethod
def from_json(cls, json_str: str) -> Self:
- """Create an instance of CallRoutingAllowedDay from a JSON string"""
+ """Create an instance of HmacAlgorithm from a JSON string"""
return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/hmac_security_config.py b/infobip_api_client/models/hmac_security_config.py
new file mode 100644
index 0000000..67227bd
--- /dev/null
+++ b/infobip_api_client/models/hmac_security_config.py
@@ -0,0 +1,93 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from infobip_api_client.models.hmac_algorithm import HmacAlgorithm
+from infobip_api_client.models.security_config import SecurityConfig
+from infobip_api_client.models.url_security_config_type import UrlSecurityConfigType
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class HmacSecurityConfig(SecurityConfig):
+ """
+ HmacSecurityConfig
+ """ # noqa: E501
+
+ secret_key: StrictStr = Field(description="Secret key.", alias="secretKey")
+ algorithm: HmacAlgorithm
+ __properties: ClassVar[List[str]] = ["type", "secretKey", "algorithm"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of HmacSecurityConfig from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of HmacSecurityConfig from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "type": obj.get("type"),
+ "secretKey": obj.get("secretKey"),
+ "algorithm": obj.get("algorithm"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/iys_recipient_type.py b/infobip_api_client/models/iys_recipient_type.py
new file mode 100644
index 0000000..0d47fe8
--- /dev/null
+++ b/infobip_api_client/models/iys_recipient_type.py
@@ -0,0 +1,35 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class IysRecipientType(str, Enum):
+ """
+ Recipient Type must be `TACIR` or `BIREYSEL`.
+ """
+
+ """
+ allowed enum values
+ """
+ BIREYSEL = "BIREYSEL"
+ TACIR = "TACIR"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of IysRecipientType from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/message_error.py b/infobip_api_client/models/message_error.py
index ce8d97c..e049a71 100644
--- a/infobip_api_client/models/message_error.py
+++ b/infobip_api_client/models/message_error.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -26,23 +25,15 @@
class MessageError(BaseModel):
"""
- Indicates whether the error occurred during the query execution.
+ MessageError
""" # noqa: E501
- group_id: Optional[StrictInt] = Field(
- default=None, description="Error group ID.", alias="groupId"
- )
- group_name: Optional[StrictStr] = Field(
- default=None, description="Error group name.", alias="groupName"
- )
- id: Optional[StrictInt] = Field(default=None, description="Error ID.")
- name: Optional[StrictStr] = Field(default=None, description="Error name.")
- description: Optional[StrictStr] = Field(
- default=None, description="Human-readable description of the error."
- )
- permanent: Optional[StrictBool] = Field(
- default=None, description="Indicator of whether the error is permanent."
- )
+ group_id: Optional[StrictInt] = Field(default=None, alias="groupId")
+ group_name: Optional[StrictStr] = Field(default=None, alias="groupName")
+ id: Optional[StrictInt] = None
+ name: Optional[StrictStr] = None
+ description: Optional[StrictStr] = None
+ permanent: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = [
"groupId",
"groupName",
diff --git a/infobip_api_client/models/message_general_status.py b/infobip_api_client/models/message_general_status.py
new file mode 100644
index 0000000..691b21d
--- /dev/null
+++ b/infobip_api_client/models/message_general_status.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class MessageGeneralStatus(str, Enum):
+ """
+ Status group name that describes which category the status code belongs to, i.e., [PENDING](https://www.infobip.com/docs/essentials/response-status-and-error-codes#pending-general-status-codes), [UNDELIVERABLE](https://www.infobip.com/docs/essentials/response-status-and-error-codes#undeliverable-general-status-codes), [DELIVERED](https://www.infobip.com/docs/essentials/response-status-and-error-codes#delivered-general-status-codes), [EXPIRED](https://www.infobip.com/docs/essentials/response-status-and-error-codes#expired-general-status-codes), [REJECTED](https://www.infobip.com/docs/essentials/response-status-and-error-codes#rejected-general-status-codes).
+ """
+
+ """
+ allowed enum values
+ """
+ ACCEPTED = "ACCEPTED"
+ PENDING = "PENDING"
+ UNDELIVERABLE = "UNDELIVERABLE"
+ DELIVERED = "DELIVERED"
+ EXPIRED = "EXPIRED"
+ REJECTED = "REJECTED"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of MessageGeneralStatus from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/message_price.py b/infobip_api_client/models/message_price.py
index 403944e..51ad976 100644
--- a/infobip_api_client/models/message_price.py
+++ b/infobip_api_client/models/message_price.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -26,13 +25,11 @@
class MessagePrice(BaseModel):
"""
- Sent email price.
+ Sent message price.
""" # noqa: E501
price_per_message: Optional[Union[StrictFloat, StrictInt]] = Field(
- default=None,
- description="Price per one email request.",
- alias="pricePerMessage",
+ default=None, description="Price per one message.", alias="pricePerMessage"
)
currency: Optional[StrictStr] = Field(
default=None, description="The currency in which the price is expressed."
diff --git a/infobip_api_client/models/message_status.py b/infobip_api_client/models/message_status.py
index 326d1a5..6529cfc 100644
--- a/infobip_api_client/models/message_status.py
+++ b/infobip_api_client/models/message_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/number_masking_callback_request.py b/infobip_api_client/models/number_masking_callback_request.py
new file mode 100644
index 0000000..1334e9d
--- /dev/null
+++ b/infobip_api_client/models/number_masking_callback_request.py
@@ -0,0 +1,115 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class NumberMaskingCallbackRequest(BaseModel):
+ """
+ Callback request.
+ """ # noqa: E501
+
+ var_from: Optional[StrictStr] = Field(
+ default=None, description="Caller phone number.", alias="from"
+ )
+ to: Optional[StrictStr] = Field(default=None, description="Called phone number.")
+ correlation_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Unique identifier of the call record, available for both Callback and Status requests.",
+ alias="correlationId",
+ )
+ nm_correlation_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Unique identifier for correlation with inbound call, available in Callback and Status requests.",
+ alias="nmCorrelationId",
+ )
+ dtmf_captured: Optional[StrictBool] = Field(
+ default=None,
+ description="Indicates that this callback request is initiated after the `captureDtmf` command is executed. Not present in the first callback request for the call.",
+ alias="dtmfCaptured",
+ )
+ __properties: ClassVar[List[str]] = [
+ "from",
+ "to",
+ "correlationId",
+ "nmCorrelationId",
+ "dtmfCaptured",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of NumberMaskingCallbackRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of NumberMaskingCallbackRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "from": obj.get("from"),
+ "to": obj.get("to"),
+ "correlationId": obj.get("correlationId"),
+ "nmCorrelationId": obj.get("nmCorrelationId"),
+ "dtmfCaptured": obj.get("dtmfCaptured"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/number_masking_credentials_body.py b/infobip_api_client/models/number_masking_credentials_body.py
new file mode 100644
index 0000000..e11c1f4
--- /dev/null
+++ b/infobip_api_client/models/number_masking_credentials_body.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class NumberMaskingCredentialsBody(BaseModel):
+ """
+ NumberMaskingCredentialsBody
+ """ # noqa: E501
+
+ api_id: Annotated[str, Field(strict=True)] = Field(
+ description="The first part of the generate Authorization header.",
+ alias="apiId",
+ )
+ key: Annotated[str, Field(strict=True)] = Field(
+ description="Used to generate the second part of the Authorization header."
+ )
+ __properties: ClassVar[List[str]] = ["apiId", "key"]
+
+ @field_validator("api_id")
+ def api_id_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"[a-zA-Z0-9-]+", value):
+ raise ValueError(r"must validate the regular expression /[a-zA-Z0-9-]+/")
+ return value
+
+ @field_validator("key")
+ def key_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"[a-zA-Z0-9-]+", value):
+ raise ValueError(r"must validate the regular expression /[a-zA-Z0-9-]+/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of NumberMaskingCredentialsBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of NumberMaskingCredentialsBody from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"apiId": obj.get("apiId"), "key": obj.get("key")})
+ return _obj
diff --git a/infobip_api_client/models/number_masking_credentials_response.py b/infobip_api_client/models/number_masking_credentials_response.py
new file mode 100644
index 0000000..6188a52
--- /dev/null
+++ b/infobip_api_client/models/number_masking_credentials_response.py
@@ -0,0 +1,91 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class NumberMaskingCredentialsResponse(BaseModel):
+ """
+ NumberMaskingCredentialsResponse
+ """ # noqa: E501
+
+ api_id: Optional[StrictStr] = Field(
+ default=None,
+ description="The first part of the generate Authorization header.",
+ alias="apiId",
+ )
+ key: Optional[StrictStr] = Field(
+ default=None,
+ description="Used to generate the second part of the Authorization header.",
+ )
+ __properties: ClassVar[List[str]] = ["apiId", "key"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of NumberMaskingCredentialsResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of NumberMaskingCredentialsResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"apiId": obj.get("apiId"), "key": obj.get("key")})
+ return _obj
diff --git a/infobip_api_client/models/number_masking_recording_status.py b/infobip_api_client/models/number_masking_recording_status.py
new file mode 100644
index 0000000..9f6b87d
--- /dev/null
+++ b/infobip_api_client/models/number_masking_recording_status.py
@@ -0,0 +1,36 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class NumberMaskingRecordingStatus(str, Enum):
+ """
+ Recording status provided if recording was attempted.
+ """
+
+ """
+ allowed enum values
+ """
+ HOSTED = "HOSTED"
+ SFTP = "SFTP"
+ FAILED = "FAILED"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of NumberMaskingRecordingStatus from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/number_masking_setup_body.py b/infobip_api_client/models/number_masking_setup_body.py
new file mode 100644
index 0000000..4978ef8
--- /dev/null
+++ b/infobip_api_client/models/number_masking_setup_body.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class NumberMaskingSetupBody(BaseModel):
+ """
+ NumberMaskingSetupBody
+ """ # noqa: E501
+
+ name: Annotated[str, Field(strict=True)] = Field(
+ description="Unique configuration name. Alphanumeric, max length 100."
+ )
+ callback_url: StrictStr = Field(
+ description="Client's URL that will be called on each inbound call to related Number masking Voice number in order to get instructions of how to handle incoming calls. Instructions are a result of mapping logic implemented on your side according to your business case.",
+ alias="callbackUrl",
+ )
+ status_url: Optional[StrictStr] = Field(
+ default=None,
+ description="Client's URL for status report delivery after the call is finished.",
+ alias="statusUrl",
+ )
+ backup_callback_url: Optional[StrictStr] = Field(
+ default=None,
+ description="If callbackUrl is unavailable this one will be called instead.",
+ alias="backupCallbackUrl",
+ )
+ backup_status_url: Optional[StrictStr] = Field(
+ default=None,
+ description="If statusUrl is unavailable this one will be called instead.",
+ alias="backupStatusUrl",
+ )
+ description: Optional[Annotated[str, Field(strict=True)]] = Field(
+ default=None, description="Masking configuration description"
+ )
+ __properties: ClassVar[List[str]] = [
+ "name",
+ "callbackUrl",
+ "statusUrl",
+ "backupCallbackUrl",
+ "backupStatusUrl",
+ "description",
+ ]
+
+ @field_validator("name")
+ def name_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if not re.match(r"[a-zA-Z0-9 ]+", value):
+ raise ValueError(r"must validate the regular expression /[a-zA-Z0-9 ]+/")
+ return value
+
+ @field_validator("description")
+ def description_validate_regular_expression(cls, value):
+ """Validates the regular expression"""
+ if value is None:
+ return value
+
+ if not re.match(r"[a-zA-Z0-9 ]*", value):
+ raise ValueError(r"must validate the regular expression /[a-zA-Z0-9 ]*/")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of NumberMaskingSetupBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of NumberMaskingSetupBody 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"),
+ "callbackUrl": obj.get("callbackUrl"),
+ "statusUrl": obj.get("statusUrl"),
+ "backupCallbackUrl": obj.get("backupCallbackUrl"),
+ "backupStatusUrl": obj.get("backupStatusUrl"),
+ "description": obj.get("description"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/number_masking_setup_response.py b/infobip_api_client/models/number_masking_setup_response.py
new file mode 100644
index 0000000..e7ce67f
--- /dev/null
+++ b/infobip_api_client/models/number_masking_setup_response.py
@@ -0,0 +1,146 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class NumberMaskingSetupResponse(BaseModel):
+ """
+ NumberMaskingSetupResponse
+ """ # noqa: E501
+
+ key: Optional[StrictStr] = Field(
+ default=None,
+ description="Use to connect masking configuration with Voice-enabled number.",
+ )
+ name: Optional[StrictStr] = Field(
+ default=None,
+ description="Unique configuration name. Alphanumeric, max length 100.",
+ )
+ callback_url: Optional[StrictStr] = Field(
+ default=None,
+ description="Client's URL that will be called on each inbound call to related Number masking Voice number in order to get instructions of how to handle incoming calls. Instructions are a result of mapping logic implemented on your side according to your business case.",
+ alias="callbackUrl",
+ )
+ status_url: Optional[StrictStr] = Field(
+ default=None,
+ description="Client's URL for status report delivery after the call is finished.",
+ alias="statusUrl",
+ )
+ backup_callback_url: Optional[StrictStr] = Field(
+ default=None,
+ description="If callbackUrl is unavailable this one will be called instead.",
+ alias="backupCallbackUrl",
+ )
+ backup_status_url: Optional[StrictStr] = Field(
+ default=None,
+ description="If statusUrl is unavailable this one will be called instead.",
+ alias="backupStatusUrl",
+ )
+ description: Optional[StrictStr] = Field(
+ default=None, description="Masking configuration description"
+ )
+ insert_date_time: Optional[datetime] = Field(
+ default=None,
+ description="Date and time when masking configuration is created.",
+ alias="insertDateTime",
+ )
+ update_date_time: Optional[datetime] = Field(
+ default=None,
+ description="Date and time when masking configuration was last modified.",
+ alias="updateDateTime",
+ )
+ __properties: ClassVar[List[str]] = [
+ "key",
+ "name",
+ "callbackUrl",
+ "statusUrl",
+ "backupCallbackUrl",
+ "backupStatusUrl",
+ "description",
+ "insertDateTime",
+ "updateDateTime",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of NumberMaskingSetupResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of NumberMaskingSetupResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "key": obj.get("key"),
+ "name": obj.get("name"),
+ "callbackUrl": obj.get("callbackUrl"),
+ "statusUrl": obj.get("statusUrl"),
+ "backupCallbackUrl": obj.get("backupCallbackUrl"),
+ "backupStatusUrl": obj.get("backupStatusUrl"),
+ "description": obj.get("description"),
+ "insertDateTime": obj.get("insertDateTime"),
+ "updateDateTime": obj.get("updateDateTime"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/number_masking_status_request.py b/infobip_api_client/models/number_masking_status_request.py
new file mode 100644
index 0000000..c272ced
--- /dev/null
+++ b/infobip_api_client/models/number_masking_status_request.py
@@ -0,0 +1,222 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import (
+ BaseModel,
+ ConfigDict,
+ Field,
+ StrictBool,
+ StrictFloat,
+ StrictInt,
+ StrictStr,
+)
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from infobip_api_client.models.number_masking_recording_status import (
+ NumberMaskingRecordingStatus,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class NumberMaskingStatusRequest(BaseModel):
+ """
+ Status request.
+ """ # noqa: E501
+
+ action: Optional[StrictStr] = Field(
+ default=None, description="Requested action (dial, audio, captureDtmf)."
+ )
+ var_from: Optional[StrictStr] = Field(
+ default=None, description="Caller phone number.", alias="from"
+ )
+ to: Optional[StrictStr] = Field(default=None, description="Called phone number.")
+ transfer_to: Optional[StrictStr] = Field(
+ default=None,
+ description="Called party phone number that the call is transferred to.",
+ alias="transferTo",
+ )
+ duration: Optional[StrictInt] = Field(
+ default=None, description="Duration of the outbound call shown in seconds"
+ )
+ status: Optional[StrictStr] = Field(
+ default=None,
+ description="Call status which can be: answered, busy, no answer, failed or congestion",
+ )
+ nm_correlation_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Unique identifier for correlation with inbound call, available in Callback and Status requests.",
+ alias="nmCorrelationId",
+ )
+ file_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Identifier of the file played to the caller.",
+ alias="fileID",
+ )
+ file_url: Optional[StrictStr] = Field(
+ default=None,
+ description="The URL of the file played to the caller.",
+ alias="fileUrl",
+ )
+ ringing_time: Optional[StrictStr] = Field(
+ default=None,
+ description="Date and time when ringing started.",
+ alias="ringingTime",
+ )
+ answered_time: Optional[StrictStr] = Field(
+ default=None,
+ description="Date and time when the call was answered.",
+ alias="answeredTime",
+ )
+ correlation_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Unique identifier of the call record, available for both Callback and Status requests.",
+ alias="correlationId",
+ )
+ inbound_duration: Optional[StrictInt] = Field(
+ default=None,
+ description="Duration of the inbound call shown in seconds.",
+ alias="inboundDuration",
+ )
+ calculated_duration: Optional[StrictInt] = Field(
+ default=None,
+ description="The duration of the outbound part of the number masking session, where the voice billing model (1/1, 15/15,...) has been applied to the calculatedDuration.",
+ alias="calculatedDuration",
+ )
+ price_per_second: Optional[Union[StrictFloat, StrictInt]] = Field(
+ default=None,
+ description="This is the price per second for the outbound part of the number masking session, with the price being expressed in cents per second.",
+ alias="pricePerSecond",
+ )
+ currency: Optional[StrictStr] = Field(
+ default=None, description="The currency in which the price is expressed."
+ )
+ recording_file_id: Optional[StrictStr] = Field(
+ default=None,
+ description="ID of a recording file of a call.",
+ alias="recordingFileId",
+ )
+ record_callee_announcement: Optional[StrictBool] = Field(
+ default=None,
+ description="Flag that indicates if callee announcement is included in recording file.",
+ alias="recordCalleeAnnouncement",
+ )
+ recording_status: Optional[NumberMaskingRecordingStatus] = Field(
+ default=None, alias="recordingStatus"
+ )
+ client_reference_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Client-defined ID of a valid file name. Used to correlate a call with this reference. If recording is enabled and files are stored in the SFTP server, that ID will be used as a file name instead.",
+ alias="clientReferenceId",
+ )
+ __properties: ClassVar[List[str]] = [
+ "action",
+ "from",
+ "to",
+ "transferTo",
+ "duration",
+ "status",
+ "nmCorrelationId",
+ "fileID",
+ "fileUrl",
+ "ringingTime",
+ "answeredTime",
+ "correlationId",
+ "inboundDuration",
+ "calculatedDuration",
+ "pricePerSecond",
+ "currency",
+ "recordingFileId",
+ "recordCalleeAnnouncement",
+ "recordingStatus",
+ "clientReferenceId",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of NumberMaskingStatusRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of NumberMaskingStatusRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "action": obj.get("action"),
+ "from": obj.get("from"),
+ "to": obj.get("to"),
+ "transferTo": obj.get("transferTo"),
+ "duration": obj.get("duration"),
+ "status": obj.get("status"),
+ "nmCorrelationId": obj.get("nmCorrelationId"),
+ "fileID": obj.get("fileID"),
+ "fileUrl": obj.get("fileUrl"),
+ "ringingTime": obj.get("ringingTime"),
+ "answeredTime": obj.get("answeredTime"),
+ "correlationId": obj.get("correlationId"),
+ "inboundDuration": obj.get("inboundDuration"),
+ "calculatedDuration": obj.get("calculatedDuration"),
+ "pricePerSecond": obj.get("pricePerSecond"),
+ "currency": obj.get("currency"),
+ "recordingFileId": obj.get("recordingFileId"),
+ "recordCalleeAnnouncement": obj.get("recordCalleeAnnouncement"),
+ "recordingStatus": obj.get("recordingStatus"),
+ "clientReferenceId": obj.get("clientReferenceId"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/number_masking_upload_body.py b/infobip_api_client/models/number_masking_upload_body.py
new file mode 100644
index 0000000..5a0c986
--- /dev/null
+++ b/infobip_api_client/models/number_masking_upload_body.py
@@ -0,0 +1,92 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class NumberMaskingUploadBody(BaseModel):
+ """
+ NumberMaskingUploadBody
+ """ # noqa: E501
+
+ url: Optional[StrictStr] = Field(
+ default=None,
+ description="URL of your voice file location. Max size of the file is 4MB. The acceptable file format is mp3.",
+ )
+ content: Optional[List[Union[StrictBytes, StrictStr]]] = Field(
+ default=None,
+ description="Encoded (Base64) value of mp3 file can be included instead of the file location URL.",
+ )
+ __properties: ClassVar[List[str]] = ["url", "content"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of NumberMaskingUploadBody from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of NumberMaskingUploadBody 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"), "content": obj.get("content")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/calls_delivery_time.py b/infobip_api_client/models/number_masking_upload_response.py
similarity index 79%
rename from infobip_api_client/models/calls_delivery_time.py
rename to infobip_api_client/models/number_masking_upload_response.py
index bfb1fb7..3015484 100644
--- a/infobip_api_client/models/calls_delivery_time.py
+++ b/infobip_api_client/models/number_masking_upload_response.py
@@ -12,26 +12,26 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, StrictInt
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
-class CallsDeliveryTime(BaseModel):
+class NumberMaskingUploadResponse(BaseModel):
"""
- CallsDeliveryTime
+ NumberMaskingUploadResponse
""" # noqa: E501
- hour: Optional[StrictInt] = None
- minute: Optional[StrictInt] = None
- __properties: ClassVar[List[str]] = ["hour", "minute"]
+ file_id: Optional[StrictStr] = Field(
+ default=None, description="Id of the uploaded audio file.", alias="fileId"
+ )
+ __properties: ClassVar[List[str]] = ["fileId"]
model_config = ConfigDict(
populate_by_name=True,
@@ -50,7 +50,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of CallsDeliveryTime from a JSON string"""
+ """Create an instance of NumberMaskingUploadResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -74,14 +74,12 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of CallsDeliveryTime from a dict"""
+ """Create an instance of NumberMaskingUploadResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
- _obj = cls.model_validate(
- {"hour": obj.get("hour"), "minute": obj.get("minute")}
- )
+ _obj = cls.model_validate({"fileId": obj.get("fileId")})
return _obj
diff --git a/infobip_api_client/models/page_info.py b/infobip_api_client/models/page_info.py
index 8cc6043..55e3d09 100644
--- a/infobip_api_client/models/page_info.py
+++ b/infobip_api_client/models/page_info.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/platform.py b/infobip_api_client/models/platform.py
new file mode 100644
index 0000000..fc47c14
--- /dev/null
+++ b/infobip_api_client/models/platform.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class Platform(BaseModel):
+ """
+ Platform options. For more details, see [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
+ """ # noqa: E501
+
+ entity_id: Optional[
+ Annotated[str, Field(min_length=0, strict=True, max_length=255)]
+ ] = Field(
+ default=None,
+ description="Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).",
+ alias="entityId",
+ )
+ application_id: Optional[
+ Annotated[str, Field(min_length=0, strict=True, max_length=255)]
+ ] = Field(
+ default=None,
+ description="Used when specifying an application in outbound send requests. It is also returned in notification events. For detailed usage, refer to the [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).",
+ alias="applicationId",
+ )
+ __properties: ClassVar[List[str]] = ["entityId", "applicationId"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of Platform from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Platform from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"entityId": obj.get("entityId"), "applicationId": obj.get("applicationId")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/ringback_generation.py b/infobip_api_client/models/ringback_generation.py
new file mode 100644
index 0000000..0de92b7
--- /dev/null
+++ b/infobip_api_client/models/ringback_generation.py
@@ -0,0 +1,88 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class RingbackGeneration(BaseModel):
+ """
+ Option to generate a consistent local ringback tone, overriding remote ringing tones. If enabled, the ringback will be generated for the existing call, provided it joins the conference before the remote ringback of the new call starts.
+ """ # noqa: E501
+
+ enabled: Optional[StrictBool] = Field(
+ default=False,
+ description="Flag indicating whether ringback generation is enabled. Cannot be `true` when `connectOnEarlyMedia` is `true`.",
+ )
+ __properties: ClassVar[List[str]] = ["enabled"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of RingbackGeneration from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of RingbackGeneration from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"enabled": obj.get("enabled") if obj.get("enabled") is not None else False}
+ )
+ return _obj
diff --git a/infobip_api_client/models/security_config.py b/infobip_api_client/models/security_config.py
index 179bbd8..52b972e 100644
--- a/infobip_api_client/models/security_config.py
+++ b/infobip_api_client/models/security_config.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,7 +20,7 @@
from importlib import import_module
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional, Union
-from infobip_api_client.models.security_config_type import SecurityConfigType
+from infobip_api_client.models.url_security_config_type import UrlSecurityConfigType
from typing import Optional, Set
from typing_extensions import Self
@@ -34,10 +33,10 @@
class SecurityConfig(BaseModel):
"""
- Security settings object holding the authentication settings necessary to access your webhook.
+ Webhook security config.
""" # noqa: E501
- type: Optional[SecurityConfigType] = None
+ type: Optional[UrlSecurityConfigType] = None
__properties: ClassVar[List[str]] = ["type"]
model_config = ConfigDict(
diff --git a/infobip_api_client/models/sms_binary_content.py b/infobip_api_client/models/sms_binary_content.py
index ef411ce..fe6a58b 100644
--- a/infobip_api_client/models/sms_binary_content.py
+++ b/infobip_api_client/models/sms_binary_content.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -30,17 +29,17 @@ class SmsBinaryContent(BaseModel):
""" # noqa: E501
data_coding: Optional[StrictInt] = Field(
- default=None,
+ default=0,
description="Binary content data coding. The default value is (`0`) for GSM7. Example: (`8`) for Unicode data.",
alias="dataCoding",
)
esm_class: Optional[StrictInt] = Field(
- default=None,
+ default=0,
description="“Esm_class” parameter. Indicate special message attributes associated with the SMS. Default value is (`0`).",
alias="esmClass",
)
hex: StrictStr = Field(
- description="Hexadecimal string. This is the representation of your binary data. Two hex digits represent one byte. They should be separated by the space character (Example: `0f c2 4a bf 34 13 ba`)."
+ description="Hexadecimal string. This is the representation of your binary data. Two hex digits represent one byte. They should be separated by the space character."
)
__properties: ClassVar[List[str]] = ["dataCoding", "esmClass", "hex"]
@@ -94,8 +93,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
- "dataCoding": obj.get("dataCoding"),
- "esmClass": obj.get("esmClass"),
+ "dataCoding": obj.get("dataCoding")
+ if obj.get("dataCoding") is not None
+ else 0,
+ "esmClass": obj.get("esmClass")
+ if obj.get("esmClass") is not None
+ else 0,
"hex": obj.get("hex"),
}
)
diff --git a/infobip_api_client/models/sms_binary_message.py b/infobip_api_client/models/sms_binary_message.py
deleted file mode 100644
index 13ed56b..0000000
--- a/infobip_api_client/models/sms_binary_message.py
+++ /dev/null
@@ -1,212 +0,0 @@
-# coding: utf-8
-
-"""
- Infobip Client API Libraries OpenAPI Specification
-
- OpenAPI specification containing public endpoints supported in client API libraries.
-
- The version of the OpenAPI document: 1.0.0
- Contact: support@infobip.com
- Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
-from typing import Any, ClassVar, Dict, List, Optional
-from typing_extensions import Annotated
-from infobip_api_client.models.sms_binary_content import SmsBinaryContent
-from infobip_api_client.models.sms_delivery_time_window import SmsDeliveryTimeWindow
-from infobip_api_client.models.sms_destination import SmsDestination
-from infobip_api_client.models.sms_regional_options import SmsRegionalOptions
-from typing import Optional, Set
-from typing_extensions import Self
-
-
-class SmsBinaryMessage(BaseModel):
- """
- An array of message objects of a single message or multiple messages sent under one bulk ID.
- """ # noqa: E501
-
- binary: Optional[SmsBinaryContent] = None
- callback_data: Optional[
- Annotated[str, Field(min_length=0, strict=True, max_length=4000)]
- ] = Field(
- default=None,
- description="Additional client data that will be sent on the notifyUrl. The maximum value is 4000 characters.",
- alias="callbackData",
- )
- delivery_time_window: Optional[SmsDeliveryTimeWindow] = Field(
- default=None, alias="deliveryTimeWindow"
- )
- destinations: List[SmsDestination] = Field(
- description="An array of destination objects for where messages are being sent. A valid destination is required."
- )
- flash: Optional[StrictBool] = Field(
- default=None,
- description="Allows for sending a [flash SMS](https://www.infobip.com/docs/sms/message-types#flash-sms) to automatically appear on recipient devices without interaction. Set to `true` to enable flash SMS, or leave the default value, `false` to send a standard SMS.",
- )
- var_from: Optional[StrictStr] = Field(
- default=None,
- description="The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`). Make sure you don't exceed [character limit](https://www.infobip.com/docs/sms/get-started#sender-names).",
- alias="from",
- )
- intermediate_report: Optional[StrictBool] = Field(
- default=None,
- description="The [real-time intermediate delivery report](https://www.infobip.com/docs/api#channels/sms/receive-outbound-sms-message-report) containing GSM error codes, messages status, pricing, network and country codes, etc., which will be sent on your callback server. Defaults to `false`.",
- alias="intermediateReport",
- )
- notify_content_type: Optional[StrictStr] = Field(
- default=None,
- description="Preferred delivery report content type, `application/json` or `application/xml`.",
- alias="notifyContentType",
- )
- notify_url: Optional[StrictStr] = Field(
- default=None,
- description="The URL on your call back server on which the Delivery report will be sent.",
- alias="notifyUrl",
- )
- regional: Optional[SmsRegionalOptions] = None
- send_at: Optional[datetime] = Field(
- default=None,
- description="Date and time when the message is to be sent. Used for [scheduled SMS](https://www.infobip.com/docs/api#channels/sms/get-scheduled-sms-messages). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, and can only be scheduled for no later than 180 days in advance.",
- alias="sendAt",
- )
- validity_period: Optional[StrictInt] = Field(
- default=None,
- description="The message validity period in minutes. When the period expires, it will not be allowed for the message to be sent. Validity period longer than 48h is not supported (in this case, it will be automatically set to 48h).",
- alias="validityPeriod",
- )
- entity_id: Optional[
- Annotated[str, Field(min_length=0, strict=True, max_length=66)]
- ] = Field(
- default=None,
- description="Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).",
- alias="entityId",
- )
- application_id: Optional[
- Annotated[str, Field(min_length=0, strict=True, max_length=66)]
- ] = Field(
- default=None,
- description="Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).",
- alias="applicationId",
- )
- __properties: ClassVar[List[str]] = [
- "binary",
- "callbackData",
- "deliveryTimeWindow",
- "destinations",
- "flash",
- "from",
- "intermediateReport",
- "notifyContentType",
- "notifyUrl",
- "regional",
- "sendAt",
- "validityPeriod",
- "entityId",
- "applicationId",
- ]
-
- model_config = ConfigDict(
- populate_by_name=True,
- validate_assignment=True,
- protected_namespaces=(),
- )
-
- def to_str(self) -> str:
- """Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
-
- def to_json(self) -> str:
- """Returns the JSON representation of the model using alias"""
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
- return json.dumps(self.to_dict())
-
- @classmethod
- def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of SmsBinaryMessage from a JSON string"""
- return cls.from_dict(json.loads(json_str))
-
- def to_dict(self) -> Dict[str, Any]:
- """Return the dictionary representation of the model using alias.
-
- This has the following differences from calling pydantic's
- `self.model_dump(by_alias=True)`:
-
- * `None` is only added to the output dict for nullable fields that
- were set at model initialization. Other fields with value `None`
- are ignored.
- """
- excluded_fields: Set[str] = set([])
-
- _dict = self.model_dump(
- by_alias=True,
- exclude=excluded_fields,
- exclude_none=True,
- )
- # override the default output from pydantic by calling `to_dict()` of binary
- if self.binary:
- _dict["binary"] = self.binary.to_dict()
- # override the default output from pydantic by calling `to_dict()` of delivery_time_window
- if self.delivery_time_window:
- _dict["deliveryTimeWindow"] = self.delivery_time_window.to_dict()
- # override the default output from pydantic by calling `to_dict()` of each item in destinations (list)
- _items = []
- if self.destinations:
- for _item in self.destinations:
- if _item:
- _items.append(_item.to_dict())
- _dict["destinations"] = _items
- # override the default output from pydantic by calling `to_dict()` of regional
- if self.regional:
- _dict["regional"] = self.regional.to_dict()
- return _dict
-
- @classmethod
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of SmsBinaryMessage from a dict"""
- if obj is None:
- return None
-
- if not isinstance(obj, dict):
- return cls.model_validate(obj)
-
- _obj = cls.model_validate(
- {
- "binary": SmsBinaryContent.from_dict(obj["binary"])
- if obj.get("binary") is not None
- else None,
- "callbackData": obj.get("callbackData"),
- "deliveryTimeWindow": SmsDeliveryTimeWindow.from_dict(
- obj["deliveryTimeWindow"]
- )
- if obj.get("deliveryTimeWindow") is not None
- else None,
- "destinations": [
- SmsDestination.from_dict(_item) for _item in obj["destinations"]
- ]
- if obj.get("destinations") is not None
- else None,
- "flash": obj.get("flash"),
- "from": obj.get("from"),
- "intermediateReport": obj.get("intermediateReport"),
- "notifyContentType": obj.get("notifyContentType"),
- "notifyUrl": obj.get("notifyUrl"),
- "regional": SmsRegionalOptions.from_dict(obj["regional"])
- if obj.get("regional") is not None
- else None,
- "sendAt": obj.get("sendAt"),
- "validityPeriod": obj.get("validityPeriod"),
- "entityId": obj.get("entityId"),
- "applicationId": obj.get("applicationId"),
- }
- )
- return _obj
diff --git a/infobip_api_client/models/sms_bulk_request.py b/infobip_api_client/models/sms_bulk_request.py
index e3f0c7d..f52f7f8 100644
--- a/infobip_api_client/models/sms_bulk_request.py
+++ b/infobip_api_client/models/sms_bulk_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/sms_bulk_response.py b/infobip_api_client/models/sms_bulk_response.py
index 62ef71d..559132a 100644
--- a/infobip_api_client/models/sms_bulk_response.py
+++ b/infobip_api_client/models/sms_bulk_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/sms_bulk_status.py b/infobip_api_client/models/sms_bulk_status.py
index 5615892..e25e24c 100644
--- a/infobip_api_client/models/sms_bulk_status.py
+++ b/infobip_api_client/models/sms_bulk_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/sms_bulk_status_response.py b/infobip_api_client/models/sms_bulk_status_response.py
index 6d8cf3c..a91241a 100644
--- a/infobip_api_client/models/sms_bulk_status_response.py
+++ b/infobip_api_client/models/sms_bulk_status_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/sms_report.py b/infobip_api_client/models/sms_delivery_report.py
similarity index 71%
rename from infobip_api_client/models/sms_report.py
rename to infobip_api_client/models/sms_delivery_report.py
index 5352262..bb2e514 100644
--- a/infobip_api_client/models/sms_report.py
+++ b/infobip_api_client/models/sms_delivery_report.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,16 +20,17 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.message_error import MessageError
from infobip_api_client.models.message_price import MessagePrice
-from infobip_api_client.models.message_status import MessageStatus
+from infobip_api_client.models.platform import Platform
+from infobip_api_client.models.sms_message_error import SmsMessageError
+from infobip_api_client.models.sms_message_status import SmsMessageStatus
from typing import Optional, Set
from typing_extensions import Self
-class SmsReport(BaseModel):
+class SmsDeliveryReport(BaseModel):
"""
- SmsReport
+ Collection of reports, one per every message.
""" # noqa: E501
bulk_id: Optional[StrictStr] = Field(
@@ -38,68 +38,61 @@ class SmsReport(BaseModel):
description="Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request.",
alias="bulkId",
)
+ price: Optional[MessagePrice] = None
+ status: Optional[SmsMessageStatus] = None
+ error: Optional[SmsMessageError] = None
message_id: Optional[StrictStr] = Field(
default=None, description="Unique message ID.", alias="messageId"
)
to: Optional[StrictStr] = Field(
default=None, description="Message destination address."
)
- var_from: Optional[StrictStr] = Field(
+ sender: Optional[StrictStr] = Field(
default=None,
description="The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`).",
- alias="from",
)
sent_at: Optional[datetime] = Field(
default=None,
- description="Date and time when the message was [scheduled](#channels/sms/get-scheduled-sms-messages) to be sent. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.",
+ description="Date and time when the message was sent. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.",
alias="sentAt",
)
done_at: Optional[datetime] = Field(
default=None,
- description="Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, delivered to the destination network, etc.). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.",
+ description="Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, network, etc.). Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.",
alias="doneAt",
)
- sms_count: Optional[StrictInt] = Field(
- default=None,
- description="The number of parts the message content was split into.",
- alias="smsCount",
+ message_count: Optional[StrictInt] = Field(
+ default=None, description="The number of sent messages.", alias="messageCount"
)
mcc_mnc: Optional[StrictStr] = Field(
default=None, description="Mobile country and network codes.", alias="mccMnc"
)
callback_data: Optional[StrictStr] = Field(
default=None,
- description="Custom data sent over to the `notifyUrl`.",
+ description="Callback data sent through ‛callbackData‛ field when sending message.",
alias="callbackData",
)
- price: Optional[MessagePrice] = None
- status: Optional[MessageStatus] = None
- error: Optional[MessageError] = None
- entity_id: Optional[StrictStr] = Field(
+ platform: Optional[Platform] = None
+ campaign_reference_id: Optional[StrictStr] = Field(
default=None,
- description="The entity used when sending the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).",
- alias="entityId",
- )
- application_id: Optional[StrictStr] = Field(
- default=None,
- description="The application used when sending the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).",
- alias="applicationId",
+ description="ID of a campaign that was sent in the message.",
+ alias="campaignReferenceId",
)
__properties: ClassVar[List[str]] = [
"bulkId",
+ "price",
+ "status",
+ "error",
"messageId",
"to",
- "from",
+ "sender",
"sentAt",
"doneAt",
- "smsCount",
+ "messageCount",
"mccMnc",
"callbackData",
- "price",
- "status",
- "error",
- "entityId",
- "applicationId",
+ "platform",
+ "campaignReferenceId",
]
model_config = ConfigDict(
@@ -119,7 +112,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of SmsReport from a JSON string"""
+ """Create an instance of SmsDeliveryReport from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -148,11 +141,14 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of error
if self.error:
_dict["error"] = self.error.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of SmsReport from a dict"""
+ """Create an instance of SmsDeliveryReport from a dict"""
if obj is None:
return None
@@ -162,25 +158,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"bulkId": obj.get("bulkId"),
- "messageId": obj.get("messageId"),
- "to": obj.get("to"),
- "from": obj.get("from"),
- "sentAt": obj.get("sentAt"),
- "doneAt": obj.get("doneAt"),
- "smsCount": obj.get("smsCount"),
- "mccMnc": obj.get("mccMnc"),
- "callbackData": obj.get("callbackData"),
"price": MessagePrice.from_dict(obj["price"])
if obj.get("price") is not None
else None,
- "status": MessageStatus.from_dict(obj["status"])
+ "status": SmsMessageStatus.from_dict(obj["status"])
if obj.get("status") is not None
else None,
- "error": MessageError.from_dict(obj["error"])
+ "error": SmsMessageError.from_dict(obj["error"])
if obj.get("error") is not None
else None,
- "entityId": obj.get("entityId"),
- "applicationId": obj.get("applicationId"),
+ "messageId": obj.get("messageId"),
+ "to": obj.get("to"),
+ "sender": obj.get("sender"),
+ "sentAt": obj.get("sentAt"),
+ "doneAt": obj.get("doneAt"),
+ "messageCount": obj.get("messageCount"),
+ "mccMnc": obj.get("mccMnc"),
+ "callbackData": obj.get("callbackData"),
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
+ "campaignReferenceId": obj.get("campaignReferenceId"),
}
)
return _obj
diff --git a/infobip_api_client/models/sms_delivery_result.py b/infobip_api_client/models/sms_delivery_result.py
index 1c31264..0947297 100644
--- a/infobip_api_client/models/sms_delivery_result.py
+++ b/infobip_api_client/models/sms_delivery_result.py
@@ -12,15 +12,14 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict
+from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.sms_report import SmsReport
+from infobip_api_client.models.sms_delivery_report import SmsDeliveryReport
from typing import Optional, Set
from typing_extensions import Self
@@ -30,7 +29,9 @@ class SmsDeliveryResult(BaseModel):
SmsDeliveryResult
""" # noqa: E501
- results: Optional[List[SmsReport]] = None
+ results: Optional[List[SmsDeliveryReport]] = Field(
+ default=None, description="Collection of reports, one per every message."
+ )
__properties: ClassVar[List[str]] = ["results"]
model_config = ConfigDict(
@@ -90,7 +91,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
- "results": [SmsReport.from_dict(_item) for _item in obj["results"]]
+ "results": [
+ SmsDeliveryReport.from_dict(_item) for _item in obj["results"]
+ ]
if obj.get("results") is not None
else None
}
diff --git a/infobip_api_client/models/sms_destination.py b/infobip_api_client/models/sms_destination.py
index 2b1c4f9..83fc109 100644
--- a/infobip_api_client/models/sms_destination.py
+++ b/infobip_api_client/models/sms_destination.py
@@ -12,13 +12,12 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
@@ -30,15 +29,20 @@ class SmsDestination(BaseModel):
An array of destination objects for where messages are being sent. A valid destination is required.
""" # noqa: E501
+ to: Annotated[str, Field(min_length=0, strict=True, max_length=64)] = Field(
+ description="The destination address of the message."
+ )
message_id: Optional[StrictStr] = Field(
default=None,
description="The ID that uniquely identifies the message sent.",
alias="messageId",
)
- to: Annotated[str, Field(min_length=0, strict=True, max_length=50)] = Field(
- description="Message destination address. Addresses must be in international format (Example: `41793026727`)."
+ network_id: Optional[StrictInt] = Field(
+ default=None,
+ description="Available in US and Canada only if networkId is known for Network Operator of the destination. Returned in [SMS message delivery reports](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports) and [Inbound SMS](https://www.infobip.com/docs/api/channels/sms/sms-messaging/inbound-sms); contact Infobip Support to enable.",
+ alias="networkId",
)
- __properties: ClassVar[List[str]] = ["messageId", "to"]
+ __properties: ClassVar[List[str]] = ["to", "messageId", "networkId"]
model_config = ConfigDict(
populate_by_name=True,
@@ -89,6 +93,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate(
- {"messageId": obj.get("messageId"), "to": obj.get("to")}
+ {
+ "to": obj.get("to"),
+ "messageId": obj.get("messageId"),
+ "networkId": obj.get("networkId"),
+ }
)
return _obj
diff --git a/infobip_api_client/models/sms_inbound_message.py b/infobip_api_client/models/sms_inbound_message.py
index 34b508b..c120d16 100644
--- a/infobip_api_client/models/sms_inbound_message.py
+++ b/infobip_api_client/models/sms_inbound_message.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -41,6 +40,11 @@ class SmsInboundMessage(BaseModel):
description="Custom callback data sent over the notifyUrl.",
alias="callbackData",
)
+ campaign_reference_id: Optional[StrictStr] = Field(
+ default=None,
+ description="ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel.",
+ alias="campaignReferenceId",
+ )
clean_text: Optional[StrictStr] = Field(
default=None,
description="Content of the message without a keyword (if a keyword was sent).",
@@ -82,6 +86,7 @@ class SmsInboundMessage(BaseModel):
__properties: ClassVar[List[str]] = [
"applicationId",
"callbackData",
+ "campaignReferenceId",
"cleanText",
"entityId",
"from",
@@ -149,6 +154,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"applicationId": obj.get("applicationId"),
"callbackData": obj.get("callbackData"),
+ "campaignReferenceId": obj.get("campaignReferenceId"),
"cleanText": obj.get("cleanText"),
"entityId": obj.get("entityId"),
"from": obj.get("from"),
diff --git a/infobip_api_client/models/sms_inbound_message_result.py b/infobip_api_client/models/sms_inbound_message_result.py
index e2d6436..3445555 100644
--- a/infobip_api_client/models/sms_inbound_message_result.py
+++ b/infobip_api_client/models/sms_inbound_message_result.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/sms_india_dlt_options.py b/infobip_api_client/models/sms_india_dlt_options.py
index d664c46..b69815d 100644
--- a/infobip_api_client/models/sms_india_dlt_options.py
+++ b/infobip_api_client/models/sms_india_dlt_options.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -37,7 +36,16 @@ class SmsIndiaDltOptions(BaseModel):
principal_entity_id: StrictStr = Field(
description="Your assigned DLT principal entity ID.", alias="principalEntityId"
)
- __properties: ClassVar[List[str]] = ["contentTemplateId", "principalEntityId"]
+ telemarketer_id: Optional[StrictStr] = Field(
+ default=None,
+ description="Your assigned Telemarketer ID. (required for Aggregators)",
+ alias="telemarketerId",
+ )
+ __properties: ClassVar[List[str]] = [
+ "contentTemplateId",
+ "principalEntityId",
+ "telemarketerId",
+ ]
model_config = ConfigDict(
populate_by_name=True,
@@ -91,6 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"contentTemplateId": obj.get("contentTemplateId"),
"principalEntityId": obj.get("principalEntityId"),
+ "telemarketerId": obj.get("telemarketerId"),
}
)
return _obj
diff --git a/infobip_api_client/models/sms_language.py b/infobip_api_client/models/sms_language.py
index a7ee87a..ef940e5 100644
--- a/infobip_api_client/models/sms_language.py
+++ b/infobip_api_client/models/sms_language.py
@@ -12,29 +12,35 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.sms_language_code import SmsLanguageCode
from typing import Optional, Set
from typing_extensions import Self
class SmsLanguage(BaseModel):
"""
- SmsLanguage
+ Sets the language parameters for the message being sent.
""" # noqa: E501
- language_code: Optional[StrictStr] = Field(
- default=None,
- description="Language code for the correct character set. Possible values: `TR` for Turkish, `ES` for Spanish, `PT` for Portuguese, or `AUTODETECT` to let platform select the character set based on message content.",
- alias="languageCode",
+ language_code: Optional[SmsLanguageCode] = Field(default=None, alias="languageCode")
+ single_shift: Optional[StrictBool] = Field(
+ default=False,
+ description="Uses a single shift table which enhances only the extension table of the GSM default alphabet. Allows you to selectively improve character support without altering the entire message.",
+ alias="singleShift",
+ )
+ locking_shift: Optional[StrictBool] = Field(
+ default=False,
+ description="Uses a locking shift table which allows you to represent characters beyond the standard GSM default alphabet. This flexibility enables better language support.",
+ alias="lockingShift",
)
- __properties: ClassVar[List[str]] = ["languageCode"]
+ __properties: ClassVar[List[str]] = ["languageCode", "singleShift", "lockingShift"]
model_config = ConfigDict(
populate_by_name=True,
@@ -84,5 +90,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if not isinstance(obj, dict):
return cls.model_validate(obj)
- _obj = cls.model_validate({"languageCode": obj.get("languageCode")})
+ _obj = cls.model_validate(
+ {
+ "languageCode": obj.get("languageCode"),
+ "singleShift": obj.get("singleShift")
+ if obj.get("singleShift") is not None
+ else False,
+ "lockingShift": obj.get("lockingShift")
+ if obj.get("lockingShift") is not None
+ else False,
+ }
+ )
return _obj
diff --git a/infobip_api_client/models/sms_language_code.py b/infobip_api_client/models/sms_language_code.py
new file mode 100644
index 0000000..c618058
--- /dev/null
+++ b/infobip_api_client/models/sms_language_code.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class SmsLanguageCode(str, Enum):
+ """
+ Language code for the correct character set. Possible values: `TR` for Turkish, `ES` for Spanish, `PT` for Portuguese, or `AUTODETECT` to let platform select the character set based on message content.
+ """
+
+ """
+ allowed enum values
+ """
+ NONE = "NONE"
+ TR = "TR"
+ ES = "ES"
+ PT = "PT"
+ AUTODETECT = "AUTODETECT"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SmsLanguageCode from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/sms_language_configuration.py b/infobip_api_client/models/sms_language_configuration.py
index dc08205..c25cd5d 100644
--- a/infobip_api_client/models/sms_language_configuration.py
+++ b/infobip_api_client/models/sms_language_configuration.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,7 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.sms_language import SmsLanguage
+from infobip_api_client.models.sms_preview_language import SmsPreviewLanguage
from typing import Optional, Set
from typing_extensions import Self
@@ -30,7 +29,7 @@ class SmsLanguageConfiguration(BaseModel):
Sets up additional configuration that changes the original message content you can preview with this call.
""" # noqa: E501
- language: Optional[SmsLanguage] = None
+ language: Optional[SmsPreviewLanguage] = None
transliteration: Optional[StrictStr] = Field(
default=None,
description="Conversion of a message text from one script to another. Possible values: `TURKISH`, `GREEK`, `CYRILLIC`, `SERBIAN_CYRILLIC`, `BULGARIAN_CYRILLIC`, `CENTRAL_EUROPEAN`, `BALTIC` and `NON_UNICODE`.",
@@ -90,7 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
- "language": SmsLanguage.from_dict(obj["language"])
+ "language": SmsPreviewLanguage.from_dict(obj["language"])
if obj.get("language") is not None
else None,
"transliteration": obj.get("transliteration"),
diff --git a/infobip_api_client/models/sms_log.py b/infobip_api_client/models/sms_log.py
index 6bb1c5c..a5e100a 100644
--- a/infobip_api_client/models/sms_log.py
+++ b/infobip_api_client/models/sms_log.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -21,83 +20,79 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.message_error import MessageError
from infobip_api_client.models.message_price import MessagePrice
-from infobip_api_client.models.message_status import MessageStatus
+from infobip_api_client.models.platform import Platform
+from infobip_api_client.models.sms_message_content import SmsMessageContent
+from infobip_api_client.models.sms_message_error import SmsMessageError
+from infobip_api_client.models.sms_message_status import SmsMessageStatus
from typing import Optional, Set
from typing_extensions import Self
class SmsLog(BaseModel):
"""
- SmsLog
+ An array of message log results, one object per each message log entry.
""" # noqa: E501
- application_id: Optional[StrictStr] = Field(
- default=None,
- description="Application id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).",
- alias="applicationId",
+ sender: Optional[StrictStr] = Field(
+ default=None, description="The sender ID which can be alphanumeric or numeric."
+ )
+ destination: Optional[StrictStr] = Field(
+ default=None, description="Message destination address."
)
bulk_id: Optional[StrictStr] = Field(
default=None,
description="Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request.",
alias="bulkId",
)
- done_at: Optional[datetime] = Field(
+ message_id: Optional[StrictStr] = Field(
default=None,
- description="Date and time when the Infobip services finished processing the message (i.e. delivered to the destination, delivered to the destination network, etc.). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.",
- alias="doneAt",
+ description="Unique message ID for which a log is requested.",
+ alias="messageId",
)
- entity_id: Optional[StrictStr] = Field(
+ sent_at: Optional[datetime] = Field(
default=None,
- description="Entity id used to send the message. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).",
- alias="entityId",
+ description="Date and time when the message was sent. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.",
+ alias="sentAt",
)
- error: Optional[MessageError] = None
- var_from: Optional[StrictStr] = Field(
+ done_at: Optional[datetime] = Field(
default=None,
- description="Sender ID that can be alphanumeric or numeric.",
- alias="from",
- )
- mcc_mnc: Optional[StrictStr] = Field(
- default=None, description="Mobile country and network codes.", alias="mccMnc"
- )
- message_id: Optional[StrictStr] = Field(
- default=None, description="Unique message ID.", alias="messageId"
+ description="Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, network, etc.). Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.",
+ alias="doneAt",
)
- price: Optional[MessagePrice] = None
- sent_at: Optional[datetime] = Field(
+ message_count: Optional[StrictInt] = Field(
default=None,
- description="Date and time when the message was [scheduled](https://www.infobip.com/docs/api#channels/sms/get-scheduled-sms-messages) to be sent. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.",
- alias="sentAt",
+ description="The number of messages content was split to.",
+ alias="messageCount",
)
- sms_count: Optional[StrictInt] = Field(
+ price: Optional[MessagePrice] = None
+ status: Optional[SmsMessageStatus] = None
+ error: Optional[SmsMessageError] = None
+ platform: Optional[Platform] = None
+ content: Optional[SmsMessageContent] = None
+ campaign_reference_id: Optional[StrictStr] = Field(
default=None,
- description="The number of parts the message content was split into.",
- alias="smsCount",
- )
- status: Optional[MessageStatus] = None
- text: Optional[StrictStr] = Field(
- default=None, description="Content of the message being sent."
+ description="ID of a campaign that was sent in the message.",
+ alias="campaignReferenceId",
)
- to: Optional[StrictStr] = Field(
- default=None, description="The destination address of the message."
+ mcc_mnc: Optional[StrictStr] = Field(
+ default=None, description="Mobile country and network codes.", alias="mccMnc"
)
__properties: ClassVar[List[str]] = [
- "applicationId",
+ "sender",
+ "destination",
"bulkId",
- "doneAt",
- "entityId",
- "error",
- "from",
- "mccMnc",
"messageId",
- "price",
"sentAt",
- "smsCount",
+ "doneAt",
+ "messageCount",
+ "price",
"status",
- "text",
- "to",
+ "error",
+ "platform",
+ "content",
+ "campaignReferenceId",
+ "mccMnc",
]
model_config = ConfigDict(
@@ -137,15 +132,21 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
- # override the default output from pydantic by calling `to_dict()` of error
- if self.error:
- _dict["error"] = self.error.to_dict()
# override the default output from pydantic by calling `to_dict()` of price
if self.price:
_dict["price"] = self.price.to_dict()
# 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 error
+ if self.error:
+ _dict["error"] = self.error.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of content
+ if self.content:
+ _dict["content"] = self.content.to_dict()
return _dict
@classmethod
@@ -159,26 +160,30 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
- "applicationId": obj.get("applicationId"),
+ "sender": obj.get("sender"),
+ "destination": obj.get("destination"),
"bulkId": obj.get("bulkId"),
- "doneAt": obj.get("doneAt"),
- "entityId": obj.get("entityId"),
- "error": MessageError.from_dict(obj["error"])
- if obj.get("error") is not None
- else None,
- "from": obj.get("from"),
- "mccMnc": obj.get("mccMnc"),
"messageId": obj.get("messageId"),
+ "sentAt": obj.get("sentAt"),
+ "doneAt": obj.get("doneAt"),
+ "messageCount": obj.get("messageCount"),
"price": MessagePrice.from_dict(obj["price"])
if obj.get("price") is not None
else None,
- "sentAt": obj.get("sentAt"),
- "smsCount": obj.get("smsCount"),
- "status": MessageStatus.from_dict(obj["status"])
+ "status": SmsMessageStatus.from_dict(obj["status"])
if obj.get("status") is not None
else None,
- "text": obj.get("text"),
- "to": obj.get("to"),
+ "error": SmsMessageError.from_dict(obj["error"])
+ if obj.get("error") is not None
+ else None,
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
+ "content": SmsMessageContent.from_dict(obj["content"])
+ if obj.get("content") is not None
+ else None,
+ "campaignReferenceId": obj.get("campaignReferenceId"),
+ "mccMnc": obj.get("mccMnc"),
}
)
return _obj
diff --git a/infobip_api_client/models/sms_logs_response.py b/infobip_api_client/models/sms_logs_response.py
index 736188a..5e67536 100644
--- a/infobip_api_client/models/sms_logs_response.py
+++ b/infobip_api_client/models/sms_logs_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -31,7 +30,8 @@ class SmsLogsResponse(BaseModel):
""" # noqa: E501
results: Optional[List[SmsLog]] = Field(
- default=None, description="Collection of logs."
+ default=None,
+ description="An array of message log results, one object per each message log entry.",
)
__properties: ClassVar[List[str]] = ["results"]
diff --git a/infobip_api_client/models/sms_message.py b/infobip_api_client/models/sms_message.py
new file mode 100644
index 0000000..fd2aacf
--- /dev/null
+++ b/infobip_api_client/models/sms_message.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.sms_destination import SmsDestination
+from infobip_api_client.models.sms_message_content import SmsMessageContent
+from infobip_api_client.models.sms_message_options import SmsMessageOptions
+from infobip_api_client.models.sms_webhooks import SmsWebhooks
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class SmsMessage(BaseModel):
+ """
+ An array of message objects of a single message or multiple messages sent under one bulk ID.
+ """ # noqa: E501
+
+ sender: Optional[StrictStr] = Field(
+ default=None,
+ description="The sender ID. It can be alphanumeric or numeric (e.g., `CompanyName`). Make sure you don't exceed [character limit](https://www.infobip.com/docs/sms/get-started#sender-names).",
+ )
+ destinations: List[SmsDestination] = Field(
+ description="An array of destination objects for where messages are being sent. A valid destination is required."
+ )
+ content: SmsMessageContent
+ options: Optional[SmsMessageOptions] = None
+ webhooks: Optional[SmsWebhooks] = None
+ __properties: ClassVar[List[str]] = [
+ "sender",
+ "destinations",
+ "content",
+ "options",
+ "webhooks",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of SmsMessage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in destinations (list)
+ _items = []
+ if self.destinations:
+ for _item in self.destinations:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["destinations"] = _items
+ # override the default output from pydantic by calling `to_dict()` of content
+ if self.content:
+ _dict["content"] = self.content.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of options
+ if self.options:
+ _dict["options"] = self.options.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of webhooks
+ if self.webhooks:
+ _dict["webhooks"] = self.webhooks.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SmsMessage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "sender": obj.get("sender"),
+ "destinations": [
+ SmsDestination.from_dict(_item) for _item in obj["destinations"]
+ ]
+ if obj.get("destinations") is not None
+ else None,
+ "content": SmsMessageContent.from_dict(obj["content"])
+ if obj.get("content") is not None
+ else None,
+ "options": SmsMessageOptions.from_dict(obj["options"])
+ if obj.get("options") is not None
+ else None,
+ "webhooks": SmsWebhooks.from_dict(obj["webhooks"])
+ if obj.get("webhooks") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/sms_message_content.py b/infobip_api_client/models/sms_message_content.py
new file mode 100644
index 0000000..42174c7
--- /dev/null
+++ b/infobip_api_client/models/sms_message_content.py
@@ -0,0 +1,171 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+import pprint
+from pydantic import (
+ BaseModel,
+ ConfigDict,
+ Field,
+ StrictStr,
+ ValidationError,
+ field_validator,
+)
+from typing import Any, List, Optional
+from infobip_api_client.models.sms_binary_content import SmsBinaryContent
+from infobip_api_client.models.sms_text_content import SmsTextContent
+from pydantic import StrictStr, Field
+from typing import Union, List, Set, Optional, Dict
+from typing_extensions import Literal, Self
+
+SMSLOGCONTENT_ONE_OF_SCHEMAS = ["SmsBinaryContent", "SmsTextContent"]
+
+
+class SmsMessageContent(BaseModel):
+ """
+ SmsLogContent
+ """
+
+ # data type: SmsBinaryContent
+ oneof_schema_1_validator: Optional[SmsBinaryContent] = None
+ # data type: SmsTextContent
+ oneof_schema_2_validator: Optional[SmsTextContent] = None
+ actual_instance: Optional[Union[SmsBinaryContent, SmsTextContent]] = None
+ one_of_schemas: Set[str] = Field(
+ default_factory=lambda: {"SmsBinaryContent", "SmsTextContent"}
+ )
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError(
+ "If a position argument is used, only 1 is allowed to set `actual_instance`"
+ )
+ if kwargs:
+ raise ValueError(
+ "If a position argument is used, keyword arguments cannot be used."
+ )
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator("actual_instance")
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = SmsMessageContent.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: SmsBinaryContent
+ if not isinstance(v, SmsBinaryContent):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `SmsBinaryContent`"
+ )
+ else:
+ match += 1
+ # validate data type: SmsTextContent
+ if not isinstance(v, SmsTextContent):
+ error_messages.append(
+ f"Error! Input type `{type(v)}` is not `SmsTextContent`"
+ )
+ else:
+ match += 1
+ if match > 1:
+ # more than 1 match
+ raise ValueError(
+ "Multiple matches found when setting `actual_instance` in SmsLogContent with oneOf schemas: SmsBinaryContent, SmsTextContent. Details: "
+ + ", ".join(error_messages)
+ )
+ elif match == 0:
+ # no match
+ raise ValueError(
+ "No match found when setting `actual_instance` in SmsLogContent with oneOf schemas: SmsBinaryContent, SmsTextContent. Details: "
+ + ", ".join(error_messages)
+ )
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into SmsBinaryContent
+ try:
+ instance.actual_instance = SmsBinaryContent.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into SmsTextContent
+ try:
+ instance.actual_instance = SmsTextContent.from_json(json_str)
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError(
+ "Multiple matches found when deserializing the JSON string into SmsLogContent with oneOf schemas: SmsBinaryContent, SmsTextContent. Details: "
+ + ", ".join(error_messages)
+ )
+ elif match == 0:
+ # no match
+ raise ValueError(
+ "No match found when deserializing the JSON string into SmsLogContent with oneOf schemas: SmsBinaryContent, SmsTextContent. Details: "
+ + ", ".join(error_messages)
+ )
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(
+ self.actual_instance.to_json
+ ):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(
+ self,
+ ) -> Optional[Union[Dict[str, Any], SmsBinaryContent, SmsTextContent]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(
+ self.actual_instance.to_dict
+ ):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
diff --git a/infobip_api_client/models/sms_message_delivery_reporting.py b/infobip_api_client/models/sms_message_delivery_reporting.py
new file mode 100644
index 0000000..a50b897
--- /dev/null
+++ b/infobip_api_client/models/sms_message_delivery_reporting.py
@@ -0,0 +1,101 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class SmsMessageDeliveryReporting(BaseModel):
+ """
+ Provides options for configuring the delivery report behavior.
+ """ # noqa: E501
+
+ url: Optional[StrictStr] = Field(
+ default=None,
+ description="The URL on your call back server where a delivery report will be sent. If your URL becomes unavailable then the [retry cycle](https://www.infobip.com/docs/sms/api#notify-url) uses the following formula: `1min + (1min * retryNumber * retryNumber)`.",
+ )
+ intermediate_report: Optional[StrictBool] = Field(
+ default=None,
+ description="The real-time intermediate delivery report containing GSM error codes, messages status, pricing, network and country codes, etc., which will be sent on your callback server. Defaults to `false`.",
+ alias="intermediateReport",
+ )
+ notify: Optional[StrictBool] = Field(
+ default=None,
+ description="Notify enables you to specify your preferences for receiving DLRs. If set to false, no DLR will be sent. Note: When no webhook is specified in the request and notify is set to 'true' or not defined, your Subscription settings will apply.",
+ )
+ __properties: ClassVar[List[str]] = ["url", "intermediateReport", "notify"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of SmsMessageDeliveryReporting from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SmsMessageDeliveryReporting 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"),
+ "intermediateReport": obj.get("intermediateReport"),
+ "notify": obj.get("notify"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/sms_message_error.py b/infobip_api_client/models/sms_message_error.py
new file mode 100644
index 0000000..2501b06
--- /dev/null
+++ b/infobip_api_client/models/sms_message_error.py
@@ -0,0 +1,114 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.sms_message_error_group import SmsMessageErrorGroup
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class SmsMessageError(BaseModel):
+ """
+ Indicates whether an [error](https://www.infobip.com/docs/essentials/response-status-and-error-codes#error-codes) occurred during the query execution.
+ """ # noqa: E501
+
+ group_id: Optional[StrictInt] = Field(
+ default=None, description="Error group ID.", alias="groupId"
+ )
+ group_name: Optional[SmsMessageErrorGroup] = Field(default=None, alias="groupName")
+ id: Optional[StrictInt] = Field(default=None, description="Error ID.")
+ name: Optional[StrictStr] = Field(
+ default=None,
+ description="[Error name](https://www.infobip.com/docs/essentials/response-status-and-error-codes#error-codes).",
+ )
+ description: Optional[StrictStr] = Field(
+ default=None, description="Human-readable description of the error."
+ )
+ permanent: Optional[StrictBool] = Field(
+ default=None, description="Indicates whether the error is recoverable or not."
+ )
+ __properties: ClassVar[List[str]] = [
+ "groupId",
+ "groupName",
+ "id",
+ "name",
+ "description",
+ "permanent",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of SmsMessageError from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SmsMessageError from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "groupId": obj.get("groupId"),
+ "groupName": obj.get("groupName"),
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "permanent": obj.get("permanent"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/sms_message_error_group.py b/infobip_api_client/models/sms_message_error_group.py
new file mode 100644
index 0000000..71590f4
--- /dev/null
+++ b/infobip_api_client/models/sms_message_error_group.py
@@ -0,0 +1,37 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class SmsMessageErrorGroup(str, Enum):
+ """
+ Error group name that describes which category the error code belongs to.
+ """
+
+ """
+ allowed enum values
+ """
+ OK = "OK"
+ HANDSET_ERRORS = "HANDSET_ERRORS"
+ USER_ERRORS = "USER_ERRORS"
+ OPERATOR_ERRORS = "OPERATOR_ERRORS"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SmsMessageErrorGroup from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/sms_message_options.py b/infobip_api_client/models/sms_message_options.py
new file mode 100644
index 0000000..7d215e1
--- /dev/null
+++ b/infobip_api_client/models/sms_message_options.py
@@ -0,0 +1,144 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from infobip_api_client.models.delivery_time_window import DeliveryTimeWindow
+from infobip_api_client.models.platform import Platform
+from infobip_api_client.models.sms_regional_options import SmsRegionalOptions
+from infobip_api_client.models.validity_period import ValidityPeriod
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class SmsMessageOptions(BaseModel):
+ """
+ Message options.
+ """ # noqa: E501
+
+ platform: Optional[Platform] = None
+ validity_period: Optional[ValidityPeriod] = Field(
+ default=None, alias="validityPeriod"
+ )
+ delivery_time_window: Optional[DeliveryTimeWindow] = Field(
+ default=None, alias="deliveryTimeWindow"
+ )
+ campaign_reference_id: Optional[
+ Annotated[str, Field(min_length=0, strict=True, max_length=255)]
+ ] = Field(
+ default=None,
+ description="ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel.",
+ alias="campaignReferenceId",
+ )
+ regional: Optional[SmsRegionalOptions] = None
+ flash: Optional[StrictBool] = Field(
+ default=None,
+ description="Allows for sending a [flash SMS](https://www.infobip.com/docs/sms/message-types#flash-sms) to automatically appear on recipient devices without interaction. Set to `true` to enable flash SMS, or leave the default value, `false` to send a standard SMS.",
+ )
+ __properties: ClassVar[List[str]] = [
+ "platform",
+ "validityPeriod",
+ "deliveryTimeWindow",
+ "campaignReferenceId",
+ "regional",
+ "flash",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of SmsMessageOptions from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of platform
+ if self.platform:
+ _dict["platform"] = self.platform.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of validity_period
+ if self.validity_period:
+ _dict["validityPeriod"] = self.validity_period.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of delivery_time_window
+ if self.delivery_time_window:
+ _dict["deliveryTimeWindow"] = self.delivery_time_window.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of regional
+ if self.regional:
+ _dict["regional"] = self.regional.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SmsMessageOptions from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "platform": Platform.from_dict(obj["platform"])
+ if obj.get("platform") is not None
+ else None,
+ "validityPeriod": ValidityPeriod.from_dict(obj["validityPeriod"])
+ if obj.get("validityPeriod") is not None
+ else None,
+ "deliveryTimeWindow": DeliveryTimeWindow.from_dict(
+ obj["deliveryTimeWindow"]
+ )
+ if obj.get("deliveryTimeWindow") is not None
+ else None,
+ "campaignReferenceId": obj.get("campaignReferenceId"),
+ "regional": SmsRegionalOptions.from_dict(obj["regional"])
+ if obj.get("regional") is not None
+ else None,
+ "flash": obj.get("flash"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/sms_advanced_textual_request.py b/infobip_api_client/models/sms_message_request_options.py
similarity index 51%
rename from infobip_api_client/models/sms_advanced_textual_request.py
rename to infobip_api_client/models/sms_message_request_options.py
index 6576caf..ff4e52a 100644
--- a/infobip_api_client/models/sms_advanced_textual_request.py
+++ b/infobip_api_client/models/sms_message_request_options.py
@@ -12,52 +12,42 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.sms_sending_speed_limit import SmsSendingSpeedLimit
-from infobip_api_client.models.sms_textual_message import SmsTextualMessage
+from infobip_api_client.models.sms_request_scheduling_settings import (
+ SmsRequestSchedulingSettings,
+)
from infobip_api_client.models.sms_tracking import SmsTracking
-from infobip_api_client.models.sms_url_options import SmsUrlOptions
+from infobip_api_client.models.url_options import UrlOptions
from typing import Optional, Set
from typing_extensions import Self
-class SmsAdvancedTextualRequest(BaseModel):
+class SmsMessageRequestOptions(BaseModel):
"""
- SmsAdvancedTextualRequest
+ Options applicable to all messages in the request.
""" # noqa: E501
- bulk_id: Optional[StrictStr] = Field(
- default=None,
- description="Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. If not provided, it will be auto-generated and returned in the API response. Typically, used to fetch [delivery reports](#channels/sms/get-outbound-sms-message-delivery-reports) and [message logs](#channels/sms/get-outbound-sms-message-logs).",
- alias="bulkId",
- )
- messages: List[SmsTextualMessage] = Field(
- description="An array of message objects of a single message or multiple messages sent under one bulk ID."
- )
- sending_speed_limit: Optional[SmsSendingSpeedLimit] = Field(
- default=None, alias="sendingSpeedLimit"
- )
- url_options: Optional[SmsUrlOptions] = Field(default=None, alias="urlOptions")
- tracking: Optional[SmsTracking] = None
+ schedule: Optional[SmsRequestSchedulingSettings] = None
+ tracking: Optional[UrlOptions] = None
include_sms_count_in_response: Optional[StrictBool] = Field(
default=False,
- description="Set to true to return smsCount in the response. Default is false. smsCount is the total count of SMS submitted in the request. SMS messages have a character limit and messages longer than that limit will be split into multiple SMS and reflected in the total count of SMS submitted. ",
+ description="Set to true to return smsCount in the response. Default is false. smsCount is the total count of SMS submitted in the request. SMS messages have a character limit and messages longer than that limit will be split into multiple SMS and reflected in the total count of SMS submitted. ",
alias="includeSmsCountInResponse",
)
+ conversion_tracking: Optional[SmsTracking] = Field(
+ default=None, alias="conversionTracking"
+ )
__properties: ClassVar[List[str]] = [
- "bulkId",
- "messages",
- "sendingSpeedLimit",
- "urlOptions",
+ "schedule",
"tracking",
"includeSmsCountInResponse",
+ "conversionTracking",
]
model_config = ConfigDict(
@@ -77,7 +67,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of SmsAdvancedTextualRequest from a JSON string"""
+ """Create an instance of SmsMessageRequestOptions from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -97,27 +87,20 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
- # override the default output from pydantic by calling `to_dict()` of each item in messages (list)
- _items = []
- if self.messages:
- for _item in self.messages:
- if _item:
- _items.append(_item.to_dict())
- _dict["messages"] = _items
- # override the default output from pydantic by calling `to_dict()` of sending_speed_limit
- if self.sending_speed_limit:
- _dict["sendingSpeedLimit"] = self.sending_speed_limit.to_dict()
- # override the default output from pydantic by calling `to_dict()` of url_options
- if self.url_options:
- _dict["urlOptions"] = self.url_options.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of schedule
+ if self.schedule:
+ _dict["schedule"] = self.schedule.to_dict()
# override the default output from pydantic by calling `to_dict()` of tracking
if self.tracking:
_dict["tracking"] = self.tracking.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of conversion_tracking
+ if self.conversion_tracking:
+ _dict["conversionTracking"] = self.conversion_tracking.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of SmsAdvancedTextualRequest from a dict"""
+ """Create an instance of SmsMessageRequestOptions from a dict"""
if obj is None:
return None
@@ -126,26 +109,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
- "bulkId": obj.get("bulkId"),
- "messages": [
- SmsTextualMessage.from_dict(_item) for _item in obj["messages"]
- ]
- if obj.get("messages") is not None
- else None,
- "sendingSpeedLimit": SmsSendingSpeedLimit.from_dict(
- obj["sendingSpeedLimit"]
- )
- if obj.get("sendingSpeedLimit") is not None
+ "schedule": SmsRequestSchedulingSettings.from_dict(obj["schedule"])
+ if obj.get("schedule") is not None
else None,
- "urlOptions": SmsUrlOptions.from_dict(obj["urlOptions"])
- if obj.get("urlOptions") is not None
- else None,
- "tracking": SmsTracking.from_dict(obj["tracking"])
+ "tracking": UrlOptions.from_dict(obj["tracking"])
if obj.get("tracking") is not None
else None,
"includeSmsCountInResponse": obj.get("includeSmsCountInResponse")
if obj.get("includeSmsCountInResponse") is not None
else False,
+ "conversionTracking": SmsTracking.from_dict(obj["conversionTracking"])
+ if obj.get("conversionTracking") is not None
+ else None,
}
)
return _obj
diff --git a/infobip_api_client/models/sms_message_response_details.py b/infobip_api_client/models/sms_message_response_details.py
new file mode 100644
index 0000000..2ec8d0d
--- /dev/null
+++ b/infobip_api_client/models/sms_message_response_details.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class SmsMessageResponseDetails(BaseModel):
+ """
+ Other details of the message.
+ """ # noqa: E501
+
+ message_count: Optional[StrictInt] = Field(
+ default=None,
+ description="Number of SMS message parts required to deliver the message.",
+ alias="messageCount",
+ )
+ __properties: ClassVar[List[str]] = ["messageCount"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of SmsMessageResponseDetails from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SmsMessageResponseDetails from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"messageCount": obj.get("messageCount")})
+ return _obj
diff --git a/infobip_api_client/models/sms_message_status.py b/infobip_api_client/models/sms_message_status.py
new file mode 100644
index 0000000..b34a971
--- /dev/null
+++ b/infobip_api_client/models/sms_message_status.py
@@ -0,0 +1,114 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.message_general_status import MessageGeneralStatus
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class SmsMessageStatus(BaseModel):
+ """
+ Indicates the [status](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes) of the message and how to recover from an error should there be any.
+ """ # noqa: E501
+
+ group_id: Optional[StrictInt] = Field(
+ default=None, description="Status group ID.", alias="groupId"
+ )
+ group_name: Optional[MessageGeneralStatus] = Field(default=None, alias="groupName")
+ id: Optional[StrictInt] = Field(default=None, description="Status code ID.")
+ name: Optional[StrictStr] = Field(
+ default=None,
+ description="[Status code](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes) name.",
+ )
+ description: Optional[StrictStr] = Field(
+ default=None, description="Human-readable description of the status."
+ )
+ action: Optional[StrictStr] = Field(
+ default=None, description="Action to take to recover from the error."
+ )
+ __properties: ClassVar[List[str]] = [
+ "groupId",
+ "groupName",
+ "id",
+ "name",
+ "description",
+ "action",
+ ]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of SmsMessageStatus from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SmsMessageStatus from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "groupId": obj.get("groupId"),
+ "groupName": obj.get("groupName"),
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "action": obj.get("action"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/sms_preview.py b/infobip_api_client/models/sms_preview.py
index 4534142..45ab69f 100644
--- a/infobip_api_client/models/sms_preview.py
+++ b/infobip_api_client/models/sms_preview.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/sms_preview_language.py b/infobip_api_client/models/sms_preview_language.py
new file mode 100644
index 0000000..66831a6
--- /dev/null
+++ b/infobip_api_client/models/sms_preview_language.py
@@ -0,0 +1,87 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class SmsPreviewLanguage(BaseModel):
+ """
+ SmsPreviewLanguage
+ """ # noqa: E501
+
+ language_code: Optional[StrictStr] = Field(
+ default=None,
+ description="Language code for the correct character set. Possible values: `TR` for Turkish, `ES` for Spanish, `PT` for Portuguese, or `AUTODETECT` to let platform select the character set based on message content.",
+ alias="languageCode",
+ )
+ __properties: ClassVar[List[str]] = ["languageCode"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of SmsPreviewLanguage from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SmsPreviewLanguage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({"languageCode": obj.get("languageCode")})
+ return _obj
diff --git a/infobip_api_client/models/sms_preview_request.py b/infobip_api_client/models/sms_preview_request.py
index 66e482c..3085307 100644
--- a/infobip_api_client/models/sms_preview_request.py
+++ b/infobip_api_client/models/sms_preview_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/sms_preview_response.py b/infobip_api_client/models/sms_preview_response.py
index 5baab6c..4d1168a 100644
--- a/infobip_api_client/models/sms_preview_response.py
+++ b/infobip_api_client/models/sms_preview_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/sms_regional_options.py b/infobip_api_client/models/sms_regional_options.py
index e7cac2b..9232fa3 100644
--- a/infobip_api_client/models/sms_regional_options.py
+++ b/infobip_api_client/models/sms_regional_options.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -22,7 +21,7 @@
from typing import Any, ClassVar, Dict, List, Optional
from infobip_api_client.models.sms_india_dlt_options import SmsIndiaDltOptions
from infobip_api_client.models.sms_south_korea_options import SmsSouthKoreaOptions
-from infobip_api_client.models.sms_turkey_iys_options import SmsTurkeyIysOptions
+from infobip_api_client.models.turkey_iys_options import TurkeyIysOptions
from typing import Optional, Set
from typing_extensions import Self
@@ -33,7 +32,7 @@ class SmsRegionalOptions(BaseModel):
""" # noqa: E501
india_dlt: Optional[SmsIndiaDltOptions] = Field(default=None, alias="indiaDlt")
- turkey_iys: Optional[SmsTurkeyIysOptions] = Field(default=None, alias="turkeyIys")
+ turkey_iys: Optional[TurkeyIysOptions] = Field(default=None, alias="turkeyIys")
south_korea: Optional[SmsSouthKoreaOptions] = Field(
default=None, alias="southKorea"
)
@@ -101,7 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"indiaDlt": SmsIndiaDltOptions.from_dict(obj["indiaDlt"])
if obj.get("indiaDlt") is not None
else None,
- "turkeyIys": SmsTurkeyIysOptions.from_dict(obj["turkeyIys"])
+ "turkeyIys": TurkeyIysOptions.from_dict(obj["turkeyIys"])
if obj.get("turkeyIys") is not None
else None,
"southKorea": SmsSouthKoreaOptions.from_dict(obj["southKorea"])
diff --git a/infobip_api_client/models/sms_request.py b/infobip_api_client/models/sms_request.py
new file mode 100644
index 0000000..d57cae0
--- /dev/null
+++ b/infobip_api_client/models/sms_request.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.sms_message import SmsMessage
+from infobip_api_client.models.sms_message_request_options import (
+ SmsMessageRequestOptions,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class SmsRequest(BaseModel):
+ """
+ SmsRequest
+ """ # noqa: E501
+
+ messages: List[SmsMessage] = Field(
+ description="An array of message objects of a single message or multiple messages sent under one bulk ID."
+ )
+ options: Optional[SmsMessageRequestOptions] = None
+ __properties: ClassVar[List[str]] = ["messages", "options"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of SmsRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in messages (list)
+ _items = []
+ if self.messages:
+ for _item in self.messages:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict["messages"] = _items
+ # override the default output from pydantic by calling `to_dict()` of options
+ if self.options:
+ _dict["options"] = self.options.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SmsRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "messages": [SmsMessage.from_dict(_item) for _item in obj["messages"]]
+ if obj.get("messages") is not None
+ else None,
+ "options": SmsMessageRequestOptions.from_dict(obj["options"])
+ if obj.get("options") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/sms_advanced_binary_request.py b/infobip_api_client/models/sms_request_scheduling_settings.py
similarity index 72%
rename from infobip_api_client/models/sms_advanced_binary_request.py
rename to infobip_api_client/models/sms_request_scheduling_settings.py
index 92f6078..b2d0e0a 100644
--- a/infobip_api_client/models/sms_advanced_binary_request.py
+++ b/infobip_api_client/models/sms_request_scheduling_settings.py
@@ -12,37 +12,38 @@
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 pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.sms_binary_message import SmsBinaryMessage
from infobip_api_client.models.sms_sending_speed_limit import SmsSendingSpeedLimit
from typing import Optional, Set
from typing_extensions import Self
-class SmsAdvancedBinaryRequest(BaseModel):
+class SmsRequestSchedulingSettings(BaseModel):
"""
- SmsAdvancedBinaryRequest
+ Options for scheduling a message.
""" # noqa: E501
bulk_id: Optional[StrictStr] = Field(
default=None,
- description="Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. If not provided, it will be auto-generated and returned in the API response. Typically, used to fetch [delivery reports](#channels/sms/get-outbound-sms-message-delivery-reports) and [message logs](#channels/sms/get-outbound-sms-message-logs).",
+ description="Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. If not provided, it will be auto-generated and returned in the API response.",
alias="bulkId",
)
- messages: List[SmsBinaryMessage] = Field(
- description="An array of message objects of a single message or multiple messages sent under one bulk ID."
+ send_at: Optional[datetime] = Field(
+ default=None,
+ description="Date and time when the message is to be sent. Used for scheduled messages. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, and can only be scheduled for no later than 180 days in advance.",
+ alias="sendAt",
)
sending_speed_limit: Optional[SmsSendingSpeedLimit] = Field(
default=None, alias="sendingSpeedLimit"
)
- __properties: ClassVar[List[str]] = ["bulkId", "messages", "sendingSpeedLimit"]
+ __properties: ClassVar[List[str]] = ["bulkId", "sendAt", "sendingSpeedLimit"]
model_config = ConfigDict(
populate_by_name=True,
@@ -61,7 +62,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of SmsAdvancedBinaryRequest from a JSON string"""
+ """Create an instance of SmsRequestSchedulingSettings from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -81,13 +82,6 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
- # override the default output from pydantic by calling `to_dict()` of each item in messages (list)
- _items = []
- if self.messages:
- for _item in self.messages:
- if _item:
- _items.append(_item.to_dict())
- _dict["messages"] = _items
# override the default output from pydantic by calling `to_dict()` of sending_speed_limit
if self.sending_speed_limit:
_dict["sendingSpeedLimit"] = self.sending_speed_limit.to_dict()
@@ -95,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of SmsAdvancedBinaryRequest from a dict"""
+ """Create an instance of SmsRequestSchedulingSettings from a dict"""
if obj is None:
return None
@@ -105,11 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"bulkId": obj.get("bulkId"),
- "messages": [
- SmsBinaryMessage.from_dict(_item) for _item in obj["messages"]
- ]
- if obj.get("messages") is not None
- else None,
+ "sendAt": obj.get("sendAt"),
"sendingSpeedLimit": SmsSendingSpeedLimit.from_dict(
obj["sendingSpeedLimit"]
)
diff --git a/infobip_api_client/models/sms_response.py b/infobip_api_client/models/sms_response.py
index b75a53c..f8618cf 100644
--- a/infobip_api_client/models/sms_response.py
+++ b/infobip_api_client/models/sms_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -32,12 +31,11 @@ class SmsResponse(BaseModel):
bulk_id: Optional[StrictStr] = Field(
default=None,
- description="Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. Typically, used to fetch [delivery reports](#channels/sms/get-outbound-sms-message-delivery-reports) and [message logs](#channels/sms/get-outbound-sms-message-logs).",
+ description="Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. If not provided, it will be auto-generated and returned in the API response. Typically used for fetching delivery reports and message logs.",
alias="bulkId",
)
- messages: Optional[List[SmsResponseDetails]] = Field(
- default=None,
- description="An array of message objects of a single message or multiple messages sent under one bulk ID.",
+ messages: List[SmsResponseDetails] = Field(
+ description="An array of message objects of a single message or multiple messages sent under one bulk ID."
)
__properties: ClassVar[List[str]] = ["bulkId", "messages"]
diff --git a/infobip_api_client/models/sms_response_details.py b/infobip_api_client/models/sms_response_details.py
index 4079d99..f1ef4c5 100644
--- a/infobip_api_client/models/sms_response_details.py
+++ b/infobip_api_client/models/sms_response_details.py
@@ -12,15 +12,17 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.message_status import MessageStatus
+from infobip_api_client.models.sms_message_response_details import (
+ SmsMessageResponseDetails,
+)
+from infobip_api_client.models.sms_message_status import SmsMessageStatus
from typing import Optional, Set
from typing_extensions import Self
@@ -32,19 +34,21 @@ class SmsResponseDetails(BaseModel):
message_id: Optional[StrictStr] = Field(
default=None,
- description="Unique message ID. If not passed, it will be automatically generated and returned in a response.",
+ description="Unique message ID. If not provided, it will be auto-generated and returned in the API response.",
alias="messageId",
)
- status: Optional[MessageStatus] = None
- to: Optional[StrictStr] = Field(
- default=None, description="The destination address of the message."
- )
- sms_count: Optional[StrictInt] = Field(
+ status: Optional[SmsMessageStatus] = None
+ destination: Optional[StrictStr] = Field(
default=None,
- description="This is the total count of SMS submitted in the request. SMS messages have a character limit and messages longer than that limit will be split into multiple SMS and reflected in the total count of SMS submitted.",
- alias="smsCount",
+ description="The destination address of the message, i.e., its recipient.",
)
- __properties: ClassVar[List[str]] = ["messageId", "status", "to", "smsCount"]
+ details: Optional[SmsMessageResponseDetails] = None
+ __properties: ClassVar[List[str]] = [
+ "messageId",
+ "status",
+ "destination",
+ "details",
+ ]
model_config = ConfigDict(
populate_by_name=True,
@@ -86,6 +90,9 @@ def to_dict(self) -> Dict[str, Any]:
# 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 details
+ if self.details:
+ _dict["details"] = self.details.to_dict()
return _dict
@classmethod
@@ -100,11 +107,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"messageId": obj.get("messageId"),
- "status": MessageStatus.from_dict(obj["status"])
+ "status": SmsMessageStatus.from_dict(obj["status"])
if obj.get("status") is not None
else None,
- "to": obj.get("to"),
- "smsCount": obj.get("smsCount"),
+ "destination": obj.get("destination"),
+ "details": SmsMessageResponseDetails.from_dict(obj["details"])
+ if obj.get("details") is not None
+ else None,
}
)
return _obj
diff --git a/infobip_api_client/models/sms_sending_speed_limit.py b/infobip_api_client/models/sms_sending_speed_limit.py
index 718486a..4cc5ab0 100644
--- a/infobip_api_client/models/sms_sending_speed_limit.py
+++ b/infobip_api_client/models/sms_sending_speed_limit.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,7 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
-from infobip_api_client.models.sms_speed_limit_time_unit import SmsSpeedLimitTimeUnit
+from infobip_api_client.models.speed_limit_time_unit import SpeedLimitTimeUnit
from typing import Optional, Set
from typing_extensions import Self
@@ -33,7 +32,7 @@ class SmsSendingSpeedLimit(BaseModel):
amount: StrictInt = Field(
description="The number of messages to be sent per timeUnit. By default, the system sends messages as fast as the infrastructure allows. Use this parameter to adapt sending capacity to your needs. The system is only able to work against its maximum capacity for ambitious message batches."
)
- time_unit: Optional[SmsSpeedLimitTimeUnit] = Field(default=None, alias="timeUnit")
+ time_unit: Optional[SpeedLimitTimeUnit] = Field(default=None, alias="timeUnit")
__properties: ClassVar[List[str]] = ["amount", "timeUnit"]
model_config = ConfigDict(
diff --git a/infobip_api_client/models/sms_south_korea_options.py b/infobip_api_client/models/sms_south_korea_options.py
index e5491b0..68b7aa3 100644
--- a/infobip_api_client/models/sms_south_korea_options.py
+++ b/infobip_api_client/models/sms_south_korea_options.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -20,6 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@@ -29,12 +29,15 @@ class SmsSouthKoreaOptions(BaseModel):
Use case dependent parameters for sending SMS to phone numbers registered in South Korea.
""" # noqa: E501
+ title: Optional[
+ Annotated[str, Field(min_length=0, strict=True, max_length=66)]
+ ] = Field(default=None, description="Title of the message.")
reseller_code: Optional[StrictInt] = Field(
default=None,
description="Reseller identification code: 9-digit registration number in the business registration certificate for South Korea. Resellers should submit this when sending.",
alias="resellerCode",
)
- __properties: ClassVar[List[str]] = ["resellerCode"]
+ __properties: ClassVar[List[str]] = ["title", "resellerCode"]
model_config = ConfigDict(
populate_by_name=True,
@@ -84,5 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if not isinstance(obj, dict):
return cls.model_validate(obj)
- _obj = cls.model_validate({"resellerCode": obj.get("resellerCode")})
+ _obj = cls.model_validate(
+ {"title": obj.get("title"), "resellerCode": obj.get("resellerCode")}
+ )
return _obj
diff --git a/infobip_api_client/models/sms_text_content.py b/infobip_api_client/models/sms_text_content.py
new file mode 100644
index 0000000..d7af54c
--- /dev/null
+++ b/infobip_api_client/models/sms_text_content.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.sms_language import SmsLanguage
+from infobip_api_client.models.sms_transliteration_code import SmsTransliterationCode
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class SmsTextContent(BaseModel):
+ """
+ SmsTextContent
+ """ # noqa: E501
+
+ text: StrictStr = Field(description="Content of the message being sent.")
+ transliteration: Optional[SmsTransliterationCode] = None
+ language: Optional[SmsLanguage] = None
+ __properties: ClassVar[List[str]] = ["text", "transliteration", "language"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of SmsTextContent from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of language
+ if self.language:
+ _dict["language"] = self.language.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SmsTextContent from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "text": obj.get("text"),
+ "transliteration": obj.get("transliteration"),
+ "language": SmsLanguage.from_dict(obj["language"])
+ if obj.get("language") is not None
+ else None,
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/sms_textual_message.py b/infobip_api_client/models/sms_textual_message.py
deleted file mode 100644
index 9cf6593..0000000
--- a/infobip_api_client/models/sms_textual_message.py
+++ /dev/null
@@ -1,223 +0,0 @@
-# coding: utf-8
-
-"""
- Infobip Client API Libraries OpenAPI Specification
-
- OpenAPI specification containing public endpoints supported in client API libraries.
-
- The version of the OpenAPI document: 1.0.0
- Contact: support@infobip.com
- Generated by OpenAPI Generator (https://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 pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
-from typing import Any, ClassVar, Dict, List, Optional
-from typing_extensions import Annotated
-from infobip_api_client.models.sms_delivery_time_window import SmsDeliveryTimeWindow
-from infobip_api_client.models.sms_destination import SmsDestination
-from infobip_api_client.models.sms_language import SmsLanguage
-from infobip_api_client.models.sms_regional_options import SmsRegionalOptions
-from typing import Optional, Set
-from typing_extensions import Self
-
-
-class SmsTextualMessage(BaseModel):
- """
- An array of message objects of a single message or multiple messages sent under one bulk ID.
- """ # noqa: E501
-
- callback_data: Optional[
- Annotated[str, Field(min_length=0, strict=True, max_length=4000)]
- ] = Field(
- default=None,
- description="Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message [Delivery Report](#channels/sms/get-outbound-sms-message-delivery-reports). The maximum value is 4000 characters and any overhead may be truncated.",
- alias="callbackData",
- )
- delivery_time_window: Optional[SmsDeliveryTimeWindow] = Field(
- default=None, alias="deliveryTimeWindow"
- )
- destinations: List[SmsDestination] = Field(
- description="An array of destination objects for where messages are being sent. A valid destination is required."
- )
- flash: Optional[StrictBool] = Field(
- default=False,
- description="Allows for sending a [flash SMS](https://www.infobip.com/docs/sms/message-types#flash-sms) to automatically appear on recipient devices without interaction. Set to `true` to enable flash SMS, or leave the default value, `false` to send a standard SMS.",
- )
- var_from: Optional[StrictStr] = Field(
- default=None,
- description="The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`). Make sure you don't exceed [character limit](https://www.infobip.com/docs/sms/get-started#sender-names).",
- alias="from",
- )
- intermediate_report: Optional[StrictBool] = Field(
- default=None,
- description="The [real-time intermediate delivery report](#channels/sms/receive-outbound-sms-message-report) containing GSM error codes, messages status, pricing, network and country codes, etc., which will be sent on your callback server. Defaults to `false`.",
- alias="intermediateReport",
- )
- language: Optional[SmsLanguage] = None
- notify_content_type: Optional[StrictStr] = Field(
- default=None,
- description="Preferred delivery report content type, `application/json` or `application/xml`.",
- alias="notifyContentType",
- )
- notify_url: Optional[StrictStr] = Field(
- default=None,
- description="The URL on your call back server on to which a delivery report will be sent. The [retry cycle](https://www.infobip.com/docs/sms/api#notify-url) for when your URL becomes unavailable uses the following formula: `1min + (1min * retryNumber * retryNumber)`.",
- alias="notifyUrl",
- )
- regional: Optional[SmsRegionalOptions] = None
- send_at: Optional[datetime] = Field(
- default=None,
- description="Date and time when the message is to be sent. Used for [scheduled SMS](#channels/sms/get-scheduled-sms-messages). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, and can only be scheduled for no later than 180 days in advance.",
- alias="sendAt",
- )
- text: Optional[StrictStr] = Field(
- default=None, description="Content of the message being sent."
- )
- transliteration: Optional[StrictStr] = Field(
- default=None,
- description="The transliteration of your sent message from one script to another. Transliteration is used to replace characters which are not recognized as part of your defaulted alphabet. Possible values: `TURKISH`, `GREEK`, `CYRILLIC`, `SERBIAN_CYRILLIC`, `BULGARIAN_CYRILLIC`, `CENTRAL_EUROPEAN`, `BALTIC`, `PORTUGUESE`, `COLOMBIAN`, and `NON_UNICODE`.",
- )
- validity_period: Optional[StrictInt] = Field(
- default=None,
- description="The message validity period in minutes. When the period expires, it will not be allowed for the message to be sent. Validity period longer than 48h is not supported. Any bigger value will automatically default back to `2880`.",
- alias="validityPeriod",
- )
- entity_id: Optional[
- Annotated[str, Field(min_length=0, strict=True, max_length=50)]
- ] = Field(
- default=None,
- description="Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).",
- alias="entityId",
- )
- application_id: Optional[
- Annotated[str, Field(min_length=0, strict=True, max_length=50)]
- ] = Field(
- default=None,
- description="Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).",
- alias="applicationId",
- )
- __properties: ClassVar[List[str]] = [
- "callbackData",
- "deliveryTimeWindow",
- "destinations",
- "flash",
- "from",
- "intermediateReport",
- "language",
- "notifyContentType",
- "notifyUrl",
- "regional",
- "sendAt",
- "text",
- "transliteration",
- "validityPeriod",
- "entityId",
- "applicationId",
- ]
-
- model_config = ConfigDict(
- populate_by_name=True,
- validate_assignment=True,
- protected_namespaces=(),
- )
-
- def to_str(self) -> str:
- """Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
-
- def to_json(self) -> str:
- """Returns the JSON representation of the model using alias"""
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
- return json.dumps(self.to_dict())
-
- @classmethod
- def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of SmsTextualMessage from a JSON string"""
- return cls.from_dict(json.loads(json_str))
-
- def to_dict(self) -> Dict[str, Any]:
- """Return the dictionary representation of the model using alias.
-
- This has the following differences from calling pydantic's
- `self.model_dump(by_alias=True)`:
-
- * `None` is only added to the output dict for nullable fields that
- were set at model initialization. Other fields with value `None`
- are ignored.
- """
- excluded_fields: Set[str] = set([])
-
- _dict = self.model_dump(
- by_alias=True,
- exclude=excluded_fields,
- exclude_none=True,
- )
- # override the default output from pydantic by calling `to_dict()` of delivery_time_window
- if self.delivery_time_window:
- _dict["deliveryTimeWindow"] = self.delivery_time_window.to_dict()
- # override the default output from pydantic by calling `to_dict()` of each item in destinations (list)
- _items = []
- if self.destinations:
- for _item in self.destinations:
- if _item:
- _items.append(_item.to_dict())
- _dict["destinations"] = _items
- # override the default output from pydantic by calling `to_dict()` of language
- if self.language:
- _dict["language"] = self.language.to_dict()
- # override the default output from pydantic by calling `to_dict()` of regional
- if self.regional:
- _dict["regional"] = self.regional.to_dict()
- return _dict
-
- @classmethod
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of SmsTextualMessage from a dict"""
- if obj is None:
- return None
-
- if not isinstance(obj, dict):
- return cls.model_validate(obj)
-
- _obj = cls.model_validate(
- {
- "callbackData": obj.get("callbackData"),
- "deliveryTimeWindow": SmsDeliveryTimeWindow.from_dict(
- obj["deliveryTimeWindow"]
- )
- if obj.get("deliveryTimeWindow") is not None
- else None,
- "destinations": [
- SmsDestination.from_dict(_item) for _item in obj["destinations"]
- ]
- if obj.get("destinations") is not None
- else None,
- "flash": obj.get("flash") if obj.get("flash") is not None else False,
- "from": obj.get("from"),
- "intermediateReport": obj.get("intermediateReport"),
- "language": SmsLanguage.from_dict(obj["language"])
- if obj.get("language") is not None
- else None,
- "notifyContentType": obj.get("notifyContentType"),
- "notifyUrl": obj.get("notifyUrl"),
- "regional": SmsRegionalOptions.from_dict(obj["regional"])
- if obj.get("regional") is not None
- else None,
- "sendAt": obj.get("sendAt"),
- "text": obj.get("text"),
- "transliteration": obj.get("transliteration"),
- "validityPeriod": obj.get("validityPeriod"),
- "entityId": obj.get("entityId"),
- "applicationId": obj.get("applicationId"),
- }
- )
- return _obj
diff --git a/infobip_api_client/models/sms_tracking.py b/infobip_api_client/models/sms_tracking.py
index c443d5b..eb3b02e 100644
--- a/infobip_api_client/models/sms_tracking.py
+++ b/infobip_api_client/models/sms_tracking.py
@@ -12,13 +12,12 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -26,28 +25,23 @@
class SmsTracking(BaseModel):
"""
- Sets up tracking parameters to track conversion metrics and type.
+ Allows you to set up tracking parameters to track conversion metrics. For more details on SMS Conversion, see: [Track Conversion](https://www.infobip.com/docs/sms/api#track-conversion).
""" # noqa: E501
- base_url: Optional[StrictStr] = Field(
- default=None,
- description="Custom base URL for shortened links in messages when tracking URL conversions. Legacy - use `urlOptions` instead.",
- alias="baseUrl",
- )
- process_key: Optional[StrictStr] = Field(
- default=None,
- description="The process key which uniquely identifies conversion tracking.",
- alias="processKey",
- )
- track: Optional[StrictStr] = Field(
+ use_conversion_tracking: Optional[StrictBool] = Field(
default=None,
- description="Indicates if a message has to be tracked for conversion rates. Values are: `SMS` and `URL`. `URL` is a legacy value. Use `urlOptions` instead. For more details on SMS Conversion, see: [Track Conversion](https://www.infobip.com/docs/sms/api#track-conversion).",
+ description='Indicates if a message has to be tracked for conversion rates. Default "false".',
+ alias="useConversionTracking",
)
- type: Optional[StrictStr] = Field(
+ conversion_tracking_name: Optional[StrictStr] = Field(
default=None,
description="Sets a custom conversion type naming convention, e.g. `ONE_TIME_PIN` or `SOCIAL_INVITES`.",
+ alias="conversionTrackingName",
)
- __properties: ClassVar[List[str]] = ["baseUrl", "processKey", "track", "type"]
+ __properties: ClassVar[List[str]] = [
+ "useConversionTracking",
+ "conversionTrackingName",
+ ]
model_config = ConfigDict(
populate_by_name=True,
@@ -99,10 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
- "baseUrl": obj.get("baseUrl"),
- "processKey": obj.get("processKey"),
- "track": obj.get("track"),
- "type": obj.get("type"),
+ "useConversionTracking": obj.get("useConversionTracking"),
+ "conversionTrackingName": obj.get("conversionTrackingName"),
}
)
return _obj
diff --git a/infobip_api_client/models/sms_transliteration_code.py b/infobip_api_client/models/sms_transliteration_code.py
new file mode 100644
index 0000000..fff7616
--- /dev/null
+++ b/infobip_api_client/models/sms_transliteration_code.py
@@ -0,0 +1,45 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class SmsTransliterationCode(str, Enum):
+ """
+ The transliteration of your sent message from one script to another. Transliteration is used to replace characters which are not recognized as part of your defaulted alphabet. Possible values: `TURKISH`, `GREEK`, `CYRILLIC`, `SERBIAN_CYRILLIC`, `BULGARIAN_CYRILLIC`, `CENTRAL_EUROPEAN`, `BALTIC`, `PORTUGUESE`, `COLOMBIAN`, and `NON_UNICODE`.
+ """
+
+ """
+ allowed enum values
+ """
+ NONE = "NONE"
+ TURKISH = "TURKISH"
+ GREEK = "GREEK"
+ CYRILLIC = "CYRILLIC"
+ SERBIAN_CYRILLIC = "SERBIAN_CYRILLIC"
+ CENTRAL_EUROPEAN = "CENTRAL_EUROPEAN"
+ BALTIC = "BALTIC"
+ NON_UNICODE = "NON_UNICODE"
+ PORTUGUESE = "PORTUGUESE"
+ COLOMBIAN = "COLOMBIAN"
+ BULGARIAN_CYRILLIC = "BULGARIAN_CYRILLIC"
+ ALL = "ALL"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SmsTransliterationCode from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/sms_update_status_request.py b/infobip_api_client/models/sms_update_status_request.py
index 9bb7388..445329d 100644
--- a/infobip_api_client/models/sms_update_status_request.py
+++ b/infobip_api_client/models/sms_update_status_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/sms_webhook_inbound_report.py b/infobip_api_client/models/sms_webhook_inbound_report.py
index 3868827..0a25e3e 100644
--- a/infobip_api_client/models/sms_webhook_inbound_report.py
+++ b/infobip_api_client/models/sms_webhook_inbound_report.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/sms_webhook_inbound_report_response.py b/infobip_api_client/models/sms_webhook_inbound_report_response.py
index ed49b2f..1f07880 100644
--- a/infobip_api_client/models/sms_webhook_inbound_report_response.py
+++ b/infobip_api_client/models/sms_webhook_inbound_report_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/sms_webhooks.py b/infobip_api_client/models/sms_webhooks.py
new file mode 100644
index 0000000..75353e0
--- /dev/null
+++ b/infobip_api_client/models/sms_webhooks.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing_extensions import Annotated
+from infobip_api_client.models.sms_message_delivery_reporting import (
+ SmsMessageDeliveryReporting,
+)
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class SmsWebhooks(BaseModel):
+ """
+ Provides options for configuring message webhooks.
+ """ # noqa: E501
+
+ delivery: Optional[SmsMessageDeliveryReporting] = None
+ content_type: Optional[StrictStr] = Field(
+ default=None,
+ description="Preferred delivery report content type, `application/json` or `application/xml`.",
+ alias="contentType",
+ )
+ callback_data: Optional[
+ Annotated[str, Field(min_length=0, strict=True, max_length=4000)]
+ ] = Field(
+ default=None,
+ description="Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message Delivery Report. The maximum value is 4000 characters.",
+ alias="callbackData",
+ )
+ __properties: ClassVar[List[str]] = ["delivery", "contentType", "callbackData"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of SmsWebhooks from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of delivery
+ if self.delivery:
+ _dict["delivery"] = self.delivery.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SmsWebhooks from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "delivery": SmsMessageDeliveryReporting.from_dict(obj["delivery"])
+ if obj.get("delivery") is not None
+ else None,
+ "contentType": obj.get("contentType"),
+ "callbackData": obj.get("callbackData"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/models/sms_speed_limit_time_unit.py b/infobip_api_client/models/speed_limit_time_unit.py
similarity index 86%
rename from infobip_api_client/models/sms_speed_limit_time_unit.py
rename to infobip_api_client/models/speed_limit_time_unit.py
index d5f5948..fb7a1dd 100644
--- a/infobip_api_client/models/sms_speed_limit_time_unit.py
+++ b/infobip_api_client/models/speed_limit_time_unit.py
@@ -12,14 +12,13 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
-class SmsSpeedLimitTimeUnit(str, Enum):
+class SpeedLimitTimeUnit(str, Enum):
"""
The time unit to define when setting a messaging speed limit. Defaults to `MINUTE`.
"""
@@ -33,5 +32,5 @@ class SmsSpeedLimitTimeUnit(str, Enum):
@classmethod
def from_json(cls, json_str: str) -> Self:
- """Create an instance of SmsSpeedLimitTimeUnit from a JSON string"""
+ """Create an instance of SpeedLimitTimeUnit from a JSON string"""
return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/tfa_application_configuration.py b/infobip_api_client/models/tfa_application_configuration.py
index 467d546..c7b90dc 100644
--- a/infobip_api_client/models/tfa_application_configuration.py
+++ b/infobip_api_client/models/tfa_application_configuration.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -44,17 +43,17 @@ class TfaApplicationConfiguration(BaseModel):
)
send_pin_per_application_limit: Optional[StrictStr] = Field(
default="10000/1d",
- description="Overall number of requests over a specififed time period for generating a PIN and sending an SMS using a single application. Required format: `{attempts}/{timeLength}{timeUnit}`. `attempts` is mandatory and `timeLength` is optional with a default value of 1. `timeUnit` is one of: `ms`, `s`, `m`, `h` or `d` representing milliseconds, seconds, minutes, hours, and days respectively. Must not exceed one year, although much lower value is recommended.",
+ description="Overall number of requests over a specififed time period for generating a PIN and sending an SMS using a single application. Required format: `{attempts}/{timeLength}{timeUnit}`. `attempts` and `timeunit` are mandatory and `timeLength` is optional with a default value of 1. `timeUnit` is one of: `ms`, `s`, `m`, `h` or `d` representing milliseconds, seconds, minutes, hours, and days respectively. Must not exceed one year, although much lower value is recommended.",
alias="sendPinPerApplicationLimit",
)
send_pin_per_phone_number_limit: Optional[StrictStr] = Field(
default="3/1d",
- description="Number of requests over a specififed time period for generating a PIN and sending an SMS to one phone number (MSISDN). Required format: `{attempts}/{timeLength}{timeUnit}`. `attempts` is mandatory and `timeLength` is optional with a default value of 1. `timeUnit` is one of: `ms`, `s`, `m`, `h` or `d` representing milliseconds, seconds, minutes, hours, and days respectively. Must not exceed one year, although much lower value is recommended.",
+ description="Number of requests over a specififed time period for generating a PIN and sending an SMS to one phone number (MSISDN). Required format: `{attempts}/{timeLength}{timeUnit}`. `attempts` and `timeunit` are mandatory and `timeLength` is optional with a default value of 1. `timeUnit` is one of: `ms`, `s`, `m`, `h` or `d` representing milliseconds, seconds, minutes, hours, and days respectively. Must not exceed one year, although much lower value is recommended.",
alias="sendPinPerPhoneNumberLimit",
)
verify_pin_limit: Optional[StrictStr] = Field(
default="1/3s",
- description="The number of PIN verification requests over a specififed time period from one phone number (MSISDN). Required format: `{attempts}/{timeLength}{timeUnit}`. `attempts` is mandatory and `timeLength` is optional with a default value of 1. `timeUnit` is one of: `ms`, `s`, `m`, `h` or `d` representing milliseconds, seconds, minutes, hours, and days respectively. Must not exceed one day, although much lower value is recommended.",
+ description="The number of PIN verification requests over a specififed time period from one phone number (MSISDN). Required format: `{attempts}/{timeLength}{timeUnit}`. `attempts` and `timeunit` are mandatory and `timeLength` is optional with a default value of 1. `timeUnit` is one of: `ms`, `s`, `m`, `h` or `d` representing milliseconds, seconds, minutes, hours, and days respectively. Must not exceed one day, although much lower value is recommended.",
alias="verifyPinLimit",
)
__properties: ClassVar[List[str]] = [
diff --git a/infobip_api_client/models/tfa_application_request.py b/infobip_api_client/models/tfa_application_request.py
index 1c414df..2eeabf2 100644
--- a/infobip_api_client/models/tfa_application_request.py
+++ b/infobip_api_client/models/tfa_application_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_application_response.py b/infobip_api_client/models/tfa_application_response.py
index b6a8ac0..7dcf621 100644
--- a/infobip_api_client/models/tfa_application_response.py
+++ b/infobip_api_client/models/tfa_application_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_create_email_message_request.py b/infobip_api_client/models/tfa_create_email_message_request.py
index dae4349..6ea7356 100644
--- a/infobip_api_client/models/tfa_create_email_message_request.py
+++ b/infobip_api_client/models/tfa_create_email_message_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_create_message_request.py b/infobip_api_client/models/tfa_create_message_request.py
index 1e7829e..28cc608 100644
--- a/infobip_api_client/models/tfa_create_message_request.py
+++ b/infobip_api_client/models/tfa_create_message_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -57,6 +56,11 @@ class TfaCreateMessageRequest(BaseModel):
description="The speed of narration for messages sent as voice. Supported range is from `0.5` to `2`.",
alias="speechRate",
)
+ voice_name: Optional[StrictStr] = Field(
+ default=None,
+ description="Defines the voice that will be used for the chosen language (example: Joanna). For each supported language, we may offer different voices (learn more [here](https://www.infobip.com/docs/voice-and-video/reference#text-to-speech-languages)). You can use this [method](https://www.infobip.com/docs/api/channels/voice/voice-message/get-voices) to retrieve all voices for the given language. If not defined, it will default to the standard voice for the selected language (if available). If the standard voice is not available, the request will fail. To avoid that, you can choose one of the neural voices (charges will apply).",
+ alias="voiceName",
+ )
__properties: ClassVar[List[str]] = [
"language",
"messageText",
@@ -66,6 +70,7 @@ class TfaCreateMessageRequest(BaseModel):
"repeatDTMF",
"senderId",
"speechRate",
+ "voiceName",
]
model_config = ConfigDict(
@@ -131,6 +136,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"repeatDTMF": obj.get("repeatDTMF"),
"senderId": obj.get("senderId"),
"speechRate": obj.get("speechRate"),
+ "voiceName": obj.get("voiceName"),
}
)
return _obj
diff --git a/infobip_api_client/models/tfa_email_message.py b/infobip_api_client/models/tfa_email_message.py
index dd214ba..30247a1 100644
--- a/infobip_api_client/models/tfa_email_message.py
+++ b/infobip_api_client/models/tfa_email_message.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_email_status.py b/infobip_api_client/models/tfa_email_status.py
index 52567c9..3573b06 100644
--- a/infobip_api_client/models/tfa_email_status.py
+++ b/infobip_api_client/models/tfa_email_status.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_india_dlt_options.py b/infobip_api_client/models/tfa_india_dlt_options.py
index 0d3dcb2..f472b64 100644
--- a/infobip_api_client/models/tfa_india_dlt_options.py
+++ b/infobip_api_client/models/tfa_india_dlt_options.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -42,7 +41,18 @@ class TfaIndiaDltOptions(BaseModel):
] = Field(
description="Your assigned DLT principal entity ID.", alias="principalEntityId"
)
- __properties: ClassVar[List[str]] = ["contentTemplateId", "principalEntityId"]
+ tele_marketer_id: Optional[
+ Annotated[str, Field(min_length=0, strict=True, max_length=255)]
+ ] = Field(
+ default=None,
+ description="Your assigned Telemarketer ID (required for Aggregators).",
+ alias="teleMarketerId",
+ )
+ __properties: ClassVar[List[str]] = [
+ "contentTemplateId",
+ "principalEntityId",
+ "teleMarketerId",
+ ]
model_config = ConfigDict(
populate_by_name=True,
@@ -96,6 +106,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"contentTemplateId": obj.get("contentTemplateId"),
"principalEntityId": obj.get("principalEntityId"),
+ "teleMarketerId": obj.get("teleMarketerId"),
}
)
return _obj
diff --git a/infobip_api_client/models/tfa_language.py b/infobip_api_client/models/tfa_language.py
index c0f3433..7736f45 100644
--- a/infobip_api_client/models/tfa_language.py
+++ b/infobip_api_client/models/tfa_language.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/tfa_message.py b/infobip_api_client/models/tfa_message.py
index e8c7a57..bf0708f 100644
--- a/infobip_api_client/models/tfa_message.py
+++ b/infobip_api_client/models/tfa_message.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -83,6 +82,11 @@ class TfaMessage(BaseModel):
description="In case PIN message is sent by Voice, the speed of speech can be set for the message. Supported range is from `0.5` to `2`.",
alias="speechRate",
)
+ voice_name: Optional[StrictStr] = Field(
+ default=None,
+ description="Defines the voice that will be used for the chosen language (example: Joanna). For each supported language, we may offer different voices (learn more [here](https://www.infobip.com/docs/voice-and-video/reference#text-to-speech-languages)). You can use this [method](https://www.infobip.com/docs/api/channels/voice/voice-message/get-voices) to retrieve all voices for the given language. If not defined, it will default to the standard voice for the selected language (if available). If the standard voice is not available, the request will fail. To avoid that, you can choose one of the neural voices (charges will apply).",
+ alias="voiceName",
+ )
__properties: ClassVar[List[str]] = [
"applicationId",
"emailTemplateId",
@@ -97,6 +101,7 @@ class TfaMessage(BaseModel):
"repeatDTMF",
"senderId",
"speechRate",
+ "voiceName",
]
model_config = ConfigDict(
@@ -167,6 +172,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"repeatDTMF": obj.get("repeatDTMF"),
"senderId": obj.get("senderId"),
"speechRate": obj.get("speechRate"),
+ "voiceName": obj.get("voiceName"),
}
)
return _obj
diff --git a/infobip_api_client/models/tfa_pin_type.py b/infobip_api_client/models/tfa_pin_type.py
index e5caf27..1301306 100644
--- a/infobip_api_client/models/tfa_pin_type.py
+++ b/infobip_api_client/models/tfa_pin_type.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
diff --git a/infobip_api_client/models/tfa_regional_options.py b/infobip_api_client/models/tfa_regional_options.py
index 3c07d23..4adbdda 100644
--- a/infobip_api_client/models/tfa_regional_options.py
+++ b/infobip_api_client/models/tfa_regional_options.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_resend_pin_request.py b/infobip_api_client/models/tfa_resend_pin_request.py
index 45750a7..b935527 100644
--- a/infobip_api_client/models/tfa_resend_pin_request.py
+++ b/infobip_api_client/models/tfa_resend_pin_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_start_authentication_request.py b/infobip_api_client/models/tfa_start_authentication_request.py
index ecd3e41..34b7c12 100644
--- a/infobip_api_client/models/tfa_start_authentication_request.py
+++ b/infobip_api_client/models/tfa_start_authentication_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_start_authentication_response.py b/infobip_api_client/models/tfa_start_authentication_response.py
index c0da336..8381755 100644
--- a/infobip_api_client/models/tfa_start_authentication_response.py
+++ b/infobip_api_client/models/tfa_start_authentication_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_start_email_authentication_request.py b/infobip_api_client/models/tfa_start_email_authentication_request.py
index 4f581ca..bbe7a35 100644
--- a/infobip_api_client/models/tfa_start_email_authentication_request.py
+++ b/infobip_api_client/models/tfa_start_email_authentication_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_start_email_authentication_response.py b/infobip_api_client/models/tfa_start_email_authentication_response.py
index 63f1732..bf51a34 100644
--- a/infobip_api_client/models/tfa_start_email_authentication_response.py
+++ b/infobip_api_client/models/tfa_start_email_authentication_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_update_email_message_request.py b/infobip_api_client/models/tfa_update_email_message_request.py
index 5bf6184..7edf5f7 100644
--- a/infobip_api_client/models/tfa_update_email_message_request.py
+++ b/infobip_api_client/models/tfa_update_email_message_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_update_message_request.py b/infobip_api_client/models/tfa_update_message_request.py
index e6c1dcf..617b143 100644
--- a/infobip_api_client/models/tfa_update_message_request.py
+++ b/infobip_api_client/models/tfa_update_message_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -58,6 +57,11 @@ class TfaUpdateMessageRequest(BaseModel):
description="The speed of narration for messages sent as voice. Supported range is from `0.5` to `2`.",
alias="speechRate",
)
+ voice_name: Optional[StrictStr] = Field(
+ default=None,
+ description="Defines the voice that will be used for the chosen language (example: Joanna). For each supported language, we may offer different voices (learn more [here](https://www.infobip.com/docs/voice-and-video/reference#text-to-speech-languages)). You can use this [method](https://www.infobip.com/docs/api/channels/voice/voice-message/get-voices) to retrieve all voices for the given language. If not defined, it will default to the standard voice for the selected language (if available). If the standard voice is not available, the request will fail. To avoid that, you can choose one of the neural voices (charges will apply).",
+ alias="voiceName",
+ )
__properties: ClassVar[List[str]] = [
"language",
"messageText",
@@ -67,6 +71,7 @@ class TfaUpdateMessageRequest(BaseModel):
"repeatDTMF",
"senderId",
"speechRate",
+ "voiceName",
]
model_config = ConfigDict(
@@ -132,6 +137,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"repeatDTMF": obj.get("repeatDTMF"),
"senderId": obj.get("senderId"),
"speechRate": obj.get("speechRate"),
+ "voiceName": obj.get("voiceName"),
}
)
return _obj
diff --git a/infobip_api_client/models/tfa_verification.py b/infobip_api_client/models/tfa_verification.py
index a9058a1..193476e 100644
--- a/infobip_api_client/models/tfa_verification.py
+++ b/infobip_api_client/models/tfa_verification.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_verification_response.py b/infobip_api_client/models/tfa_verification_response.py
index 1f115d0..a11effa 100644
--- a/infobip_api_client/models/tfa_verification_response.py
+++ b/infobip_api_client/models/tfa_verification_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_verify_pin_request.py b/infobip_api_client/models/tfa_verify_pin_request.py
index 391d397..a913cb7 100644
--- a/infobip_api_client/models/tfa_verify_pin_request.py
+++ b/infobip_api_client/models/tfa_verify_pin_request.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/tfa_verify_pin_response.py b/infobip_api_client/models/tfa_verify_pin_response.py
index 8f648a5..9ab84e9 100644
--- a/infobip_api_client/models/tfa_verify_pin_response.py
+++ b/infobip_api_client/models/tfa_verify_pin_response.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
diff --git a/infobip_api_client/models/sms_turkey_iys_options.py b/infobip_api_client/models/turkey_iys_options.py
similarity index 80%
rename from infobip_api_client/models/sms_turkey_iys_options.py
rename to infobip_api_client/models/turkey_iys_options.py
index c184e23..c62d143 100644
--- a/infobip_api_client/models/sms_turkey_iys_options.py
+++ b/infobip_api_client/models/turkey_iys_options.py
@@ -12,19 +12,19 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.iys_recipient_type import IysRecipientType
from typing import Optional, Set
from typing_extensions import Self
-class SmsTurkeyIysOptions(BaseModel):
+class TurkeyIysOptions(BaseModel):
"""
IYS regulations specific parameters required for sending promotional SMS to phone numbers registered in Turkey.
""" # noqa: E501
@@ -34,19 +34,9 @@ class SmsTurkeyIysOptions(BaseModel):
description="Brand code is an ID of the company based on a company VAT number. If not provided in request, default value is used from your Infobip account.",
alias="brandCode",
)
- recipient_type: StrictStr = Field(
- description="Recipient Type must be `TACIR` or `BIREYSEL`.",
- alias="recipientType",
- )
+ recipient_type: IysRecipientType = Field(alias="recipientType")
__properties: ClassVar[List[str]] = ["brandCode", "recipientType"]
- @field_validator("recipient_type")
- def recipient_type_validate_enum(cls, value):
- """Validates the enum"""
- if value not in set(["BIREYSEL", "TACIR"]):
- raise ValueError("must be one of enum values ('BIREYSEL', 'TACIR')")
- return value
-
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
@@ -64,7 +54,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of SmsTurkeyIysOptions from a JSON string"""
+ """Create an instance of TurkeyIysOptions from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -88,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of SmsTurkeyIysOptions from a dict"""
+ """Create an instance of TurkeyIysOptions from a dict"""
if obj is None:
return None
diff --git a/infobip_api_client/models/sms_url_options.py b/infobip_api_client/models/url_options.py
similarity index 94%
rename from infobip_api_client/models/sms_url_options.py
rename to infobip_api_client/models/url_options.py
index 7e9fcab..f7ce714 100644
--- a/infobip_api_client/models/sms_url_options.py
+++ b/infobip_api_client/models/url_options.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import pprint
import re # noqa: F401
@@ -24,9 +23,9 @@
from typing_extensions import Self
-class SmsUrlOptions(BaseModel):
+class UrlOptions(BaseModel):
"""
- Sets up [URL shortening](https://www.infobip.com/docs/url-shortening) and tracking feature. Not compatible with old tracking feature.
+ Sets up [URL shortening](https://www.infobip.com/docs/url-shortening) and tracking feature.
""" # noqa: E501
shorten_url: Optional[StrictBool] = Field(
@@ -79,7 +78,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of SmsUrlOptions from a JSON string"""
+ """Create an instance of UrlOptions from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -103,7 +102,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of SmsUrlOptions from a dict"""
+ """Create an instance of UrlOptions from a dict"""
if obj is None:
return None
diff --git a/infobip_api_client/models/security_config_type.py b/infobip_api_client/models/url_security_config_type.py
similarity index 82%
rename from infobip_api_client/models/security_config_type.py
rename to infobip_api_client/models/url_security_config_type.py
index 1d7ce38..6f4ea89 100644
--- a/infobip_api_client/models/security_config_type.py
+++ b/infobip_api_client/models/url_security_config_type.py
@@ -12,16 +12,15 @@
Do not edit the class manually.
""" # noqa: E501
-
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
-class SecurityConfigType(str, Enum):
+class UrlSecurityConfigType(str, Enum):
"""
- SecurityConfigType
+ UrlSecurityConfigType
"""
"""
@@ -32,5 +31,5 @@ class SecurityConfigType(str, Enum):
@classmethod
def from_json(cls, json_str: str) -> Self:
- """Create an instance of SecurityConfigType from a JSON string"""
+ """Create an instance of UrlSecurityConfigType from a JSON string"""
return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/validity_period.py b/infobip_api_client/models/validity_period.py
new file mode 100644
index 0000000..6daac8f
--- /dev/null
+++ b/infobip_api_client/models/validity_period.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from infobip_api_client.models.validity_period_time_unit import ValidityPeriodTimeUnit
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class ValidityPeriod(BaseModel):
+ """
+ Message validity period. Once expired, the message won't be sent. Validity period longer than 48h is not supported. If exceeded, it will be automatically set to 48h.
+ """ # noqa: E501
+
+ amount: StrictInt = Field(
+ description="Message validity period's value. If `timeUnit` is not set, it will default to `MINUTES`."
+ )
+ time_unit: Optional[ValidityPeriodTimeUnit] = Field(default=None, alias="timeUnit")
+ __properties: ClassVar[List[str]] = ["amount", "timeUnit"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of ValidityPeriod from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ValidityPeriod from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {"amount": obj.get("amount"), "timeUnit": obj.get("timeUnit")}
+ )
+ return _obj
diff --git a/infobip_api_client/models/validity_period_time_unit.py b/infobip_api_client/models/validity_period_time_unit.py
new file mode 100644
index 0000000..130f196
--- /dev/null
+++ b/infobip_api_client/models/validity_period_time_unit.py
@@ -0,0 +1,36 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class ValidityPeriodTimeUnit(str, Enum):
+ """
+ Message validity period time unit.
+ """
+
+ """
+ allowed enum values
+ """
+ SECONDS = "SECONDS"
+ MINUTES = "MINUTES"
+ HOURS = "HOURS"
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ValidityPeriodTimeUnit from a JSON string"""
+ return cls(json.loads(json_str))
diff --git a/infobip_api_client/models/webhook_message_count.py b/infobip_api_client/models/webhook_message_count.py
new file mode 100644
index 0000000..edc474c
--- /dev/null
+++ b/infobip_api_client/models/webhook_message_count.py
@@ -0,0 +1,97 @@
+# coding: utf-8
+
+"""
+ Infobip Client API Libraries OpenAPI Specification
+
+ OpenAPI specification containing public endpoints supported in client API libraries.
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: support@infobip.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+
+class WebhookMessageCount(BaseModel):
+ """
+ WebhookMessageCount
+ """ # noqa: E501
+
+ message_count: Optional[StrictInt] = Field(
+ default=None,
+ description="Number of returned messages in this request.",
+ alias="messageCount",
+ )
+ pending_message_count: Optional[StrictInt] = Field(
+ default=None,
+ description="Number of remaining new messages on Infobip servers ready to be returned in the next request.",
+ alias="pendingMessageCount",
+ )
+ __properties: ClassVar[List[str]] = ["messageCount", "pendingMessageCount"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of WebhookMessageCount from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of WebhookMessageCount from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate(
+ {
+ "messageCount": obj.get("messageCount"),
+ "pendingMessageCount": obj.get("pendingMessageCount"),
+ }
+ )
+ return _obj
diff --git a/infobip_api_client/rest.py b/infobip_api_client/rest.py
index 976d68c..1cf15e4 100644
--- a/infobip_api_client/rest.py
+++ b/infobip_api_client/rest.py
@@ -12,7 +12,6 @@
Do not edit the class manually.
""" # noqa: E501
-
import io
import json
import re
diff --git a/infobip_api_client/tests/test_calls_api.py b/infobip_api_client/tests/test_calls_api.py
index 4778f03..baeeb93 100644
--- a/infobip_api_client/tests/test_calls_api.py
+++ b/infobip_api_client/tests/test_calls_api.py
@@ -1,6 +1,8 @@
import tempfile
+import datetime
import pytest
+from dateutil.tz import tzoffset
from pytest_httpserver import HTTPServer
from infobip_api_client import (
@@ -62,9 +64,6 @@
CallRecordingPage,
CallRecording,
CallsRecordingFile,
- CallsPublicCallRecording,
- CallsPublicConferenceRecording,
- CallsPublicRecordingFile,
CallsConferenceRecordingPage,
CallsOnDemandComposition,
CallBulkRequest,
@@ -75,6 +74,21 @@
CallBulkResponse,
CallBulkStatus,
CallsRescheduleRequest,
+ CallsConferenceRecording,
+ Platform,
+ CallState,
+ CallDirection,
+ CallsDetectionResult,
+ CallsBulkEndpointType,
+ CallsLanguage,
+ CallsGender,
+ CallVoice,
+ CallsFileFormat,
+ CallsRecordingFileLocation,
+ CallsRecordingStatus,
+ CallsPlayContentType,
+ CallsConferencePlayRequest,
+ CallsParticipantState,
)
CALLS = "/calls/1/calls"
@@ -217,7 +231,7 @@ def test_should_get_calls(httpserver: HTTPServer, get_api_client):
"parentCallId": given_parent_call_id,
"machineDetection": {"detectionResult": given_detection_result},
"ringDuration": given_ring_duration,
- "applicationId": given_application_id,
+ "platform": {"applicationId": given_application_id},
"conferenceId": given_conference_id,
"customData": {"key1": given_key1, "key2": given_key2},
}
@@ -263,7 +277,7 @@ def test_should_get_calls(httpserver: HTTPServer, get_api_client):
detection_result=given_detection_result
),
ring_duration=given_ring_duration,
- application_id=given_application_id,
+ platform=Platform(application_id=given_application_id),
conference_id=given_conference_id,
custom_data={"key1": given_key1, "key2": given_key2},
)
@@ -280,36 +294,35 @@ def test_should_get_calls(httpserver: HTTPServer, get_api_client):
def test_should_create_call(httpserver: HTTPServer, get_api_client):
- givenPhoneNumber = "41792030000"
+ givenPhoneNumber = "41792036727"
givenType = "PHONE"
- givenFrom = "44790123456"
- givenMaxDuration = 28800
+ givenFrom = "41793026834"
givenApplicationId = "61c060db2675060027d8c7a6"
- givenParentCallId = "3ad8805e-d401-424e-9b03-e02a2016a5e2"
+ givenCallsConfigurationId = "dc5942707c704551a00cd2ea"
+ givenMaxDuration = 28800
givenRequest = {
"endpoint": {
+ "type": givenType,
"phoneNumber": givenPhoneNumber,
},
"from": givenFrom,
+ "callsConfigurationId": givenCallsConfigurationId,
"maxDuration": givenMaxDuration,
- "applicationId": givenApplicationId,
+ "platform": {"applicationId": givenApplicationId},
}
- givenCallId = "string"
- givenTo = "44790987654"
- givenDirection = "INBOUND"
+ givenCallId = "d8d84155-3831-43fb-91c9-bb897149a79d"
+ givenTo = "44790123456"
+ givenDirection = "OUTBOUND"
givenCallState = "CALLING"
- givenMuted = True
- givenUserMuted = True
- givenDeaf = True
- givenCamera = True
- givenScreenShare = True
- givenStartTime = "2022-05-01T14:25:45.125Z"
- givenAnswerTime = "2022-05-01T14:25:55.123Z"
- givenEndTime = "2022-05-01T14:27:40.235Z"
- givenDetectionResult = "HUMAN"
- givenRingDuration = 3
+ givenMuted = False
+ givenDeaf = False
+ givenCamera = False
+ givenScreenShare = False
+ givenStartTime = "2022-01-01T00:00:00.100+0000"
+ givenAnswerTime = "2022-01-01T00:00:02.100+0000"
+ givenRingDuration = 2
givenConferenceId = "034e622a-cc7e-456d-8a10-0ba43b11aa5e"
givenKey1 = "value1"
givenKey2 = "value2"
@@ -317,8 +330,8 @@ def test_should_create_call(httpserver: HTTPServer, get_api_client):
given_response = {
"id": givenCallId,
"endpoint": {
- "phoneNumber": givenPhoneNumber,
"type": givenType,
+ "phoneNumber": givenTo,
},
"from": givenFrom,
"to": givenTo,
@@ -327,18 +340,16 @@ def test_should_create_call(httpserver: HTTPServer, get_api_client):
"media": {
"audio": {
"muted": givenMuted,
- "userMuted": givenUserMuted,
"deaf": givenDeaf,
},
- "video": {"camera": givenCamera, "screenShare": givenScreenShare},
+ "video": {
+ "camera": givenCamera,
+ "screenShare": givenScreenShare,
+ },
},
- "startTime": givenStartTime,
- "answerTime": givenAnswerTime,
- "endTime": givenEndTime,
- "parentCallId": givenParentCallId,
- "machineDetection": {"detectionResult": givenDetectionResult},
"ringDuration": givenRingDuration,
- "applicationId": givenApplicationId,
+ "callsConfigurationId": givenCallsConfigurationId,
+ "platform": {"applicationId": givenApplicationId},
"conferenceId": givenConferenceId,
"customData": {"key1": givenKey1, "key2": givenKey2},
}
@@ -348,39 +359,32 @@ def test_should_create_call(httpserver: HTTPServer, get_api_client):
setup_request(httpserver, CALLS, given_response, "POST", 201, givenRequest)
request: CallRequest = CallRequest(
- endpoint=CallsPhoneEndpoint(phone_number=givenPhoneNumber),
+ endpoint=CallsPhoneEndpoint(
+ type=CallEndpointType.PHONE, phone_number=givenPhoneNumber
+ ),
var_from=givenFrom,
- application_id=givenApplicationId,
+ calls_configuration_id=givenCallsConfigurationId,
+ platform=Platform(application_id=givenApplicationId),
)
api_response = api_instance.create_call(call_request=request)
expected_response = Call(
id=givenCallId,
- endpoint=CallsPhoneEndpoint(
- phone_number=givenPhoneNumber, type=CallEndpointType.PHONE
- ),
+ endpoint=CallsPhoneEndpoint(type=CallEndpointType.PHONE, phone_number=givenTo),
var_from=givenFrom,
to=givenTo,
- direction=givenDirection,
- state=givenCallState,
+ direction=CallDirection.OUTBOUND,
+ state=CallState.CALLING,
media=CallsMediaProperties(
- audio=CallsAudioMediaProperties(
- muted=givenMuted, user_muted=givenUserMuted, deaf=givenDeaf
- ),
+ audio=CallsAudioMediaProperties(muted=givenMuted, deaf=givenDeaf),
video=CallsVideoMediaProperties(
camera=givenCamera, screen_share=givenScreenShare
),
),
- start_time=givenStartTime,
- end_time=givenEndTime,
- answer_time=givenAnswerTime,
- parent_call_id=givenParentCallId,
- machine_detection=CallsMachineDetectionProperties(
- detection_result=givenDetectionResult
- ),
ring_duration=givenRingDuration,
- application_id=givenApplicationId,
+ calls_configuration_id=givenCallsConfigurationId,
+ platform=Platform(application_id=givenApplicationId),
conference_id=givenConferenceId,
custom_data={"key1": givenKey1, "key2": givenKey2},
)
@@ -437,7 +441,9 @@ def test_should_get_a_call(httpserver: HTTPServer, get_api_client):
"parentCallId": givenParentCallId,
"machineDetection": {"detectionResult": givenDetectionResult},
"ringDuration": givenRingDuration,
- "applicationId": givenApplicationId,
+ "platform": {
+ "applicationId": givenApplicationId,
+ },
"conferenceId": givenConferenceId,
"customData": {"key1": givenKey1, "key2": givenKey2},
}
@@ -474,7 +480,7 @@ def test_should_get_a_call(httpserver: HTTPServer, get_api_client):
detection_result=givenDetectionResult
),
ring_duration=givenRingDuration,
- application_id=givenApplicationId,
+ platform=Platform(application_id=givenApplicationId),
conference_id=givenConferenceId,
custom_data={"key1": givenKey1, "key2": givenKey2},
)
@@ -542,7 +548,9 @@ def test_should_get_a_call_history(httpserver: HTTPServer, get_api_client):
"endTime": given_end_time,
"parentCallId": given_parent_call_id,
"machineDetection": {"detectionResult": given_detection_result},
- "applicationIds": [given_application_id],
+ "platform": {
+ "applicationId": given_application_id,
+ },
"conferenceIds": [given_conference_id],
"duration": given_duration,
"hasCameraVideo": given_has_camera_video,
@@ -587,7 +595,7 @@ def test_should_get_a_call_history(httpserver: HTTPServer, get_api_client):
machine_detection=CallsMachineDetectionProperties(
detection_result=given_detection_result
),
- application_ids=[given_application_id],
+ platform=Platform(application_id=given_application_id),
conference_ids=[given_conference_id],
duration=given_duration,
has_camera_video=given_has_camera_video,
@@ -664,7 +672,9 @@ def test_should_get_call_history(httpserver: HTTPServer, get_api_client):
"endTime": given_end_time,
"parentCallId": given_parent_call_id,
"machineDetection": {"detectionResult": given_detection_result},
- "applicationIds": [given_application_id],
+ "platform": {
+ "applicationId": given_application_id,
+ },
"conferenceIds": [given_conference_id],
"duration": given_duration,
"hasCameraVideo": given_has_camera_video,
@@ -698,7 +708,7 @@ def test_should_get_call_history(httpserver: HTTPServer, get_api_client):
machine_detection=CallsMachineDetectionProperties(
detection_result=given_detection_result
),
- application_ids=[given_application_id],
+ platform=Platform(application_id=given_application_id),
conference_ids=[given_conference_id],
duration=given_duration,
has_camera_video=given_has_camera_video,
@@ -764,7 +774,7 @@ def test_should_connect_calls(httpserver: HTTPServer, get_api_client):
"id": given_id,
"name": given_name,
"participants": participants,
- "applicationId": given_application_id,
+ "platform": {"applicationId": given_application_id},
}
expected_request = {"callIds": [given_call_id1, given_call_id2]}
@@ -817,7 +827,7 @@ def test_should_connect_calls(httpserver: HTTPServer, get_api_client):
),
),
],
- application_id=given_application_id,
+ platform=Platform(application_id=given_application_id),
)
assert api_response == expected_response
@@ -900,7 +910,7 @@ def test_should_connect_with_new_call(httpserver: HTTPServer, get_api_client):
"endTime": given_end_time,
"parentCallId": given_parent_call_id,
"machineDetection": {"detectionResult": given_detection_result},
- "applicationId": given_application_id,
+ "platform": {"applicationId": given_application_id},
"conferenceId": given_conference_id,
"customData": {"key1": given_key1, "key2": given_key2},
},
@@ -984,7 +994,7 @@ def test_should_connect_with_new_call(httpserver: HTTPServer, get_api_client):
machine_detection=CallsMachineDetectionProperties(
detection_result=given_detection_result
),
- application_id=given_application_id,
+ platform=Platform(application_id=given_application_id),
conference_id=given_conference_id,
custom_data={"key1": given_key1, "key2": given_key2},
),
@@ -1108,7 +1118,9 @@ def test_should_hangup(httpserver: HTTPServer, get_api_client):
"startTime": givenStartTime,
"answerTime": givenAnswerTime,
"ringDuration": givenRingDuration,
- "applicationId": givenApplicationId,
+ "platform": {
+ "applicationId": givenApplicationId,
+ },
"conferenceId": givenConferenceId,
"customData": {"key2": givenKey2, "key1": givenKey1},
}
@@ -1143,7 +1155,7 @@ def test_should_hangup(httpserver: HTTPServer, get_api_client):
start_time=givenStartTime,
answer_time=givenAnswerTime,
ring_duration=givenRingDuration,
- application_id=givenApplicationId,
+ platform=Platform(application_id=givenApplicationId),
conference_id=givenConferenceId,
custom_data={"key2": givenKey2, "key1": givenKey1},
)
@@ -1471,7 +1483,7 @@ def test_should_request_application_transfer(httpserver: HTTPServer, get_api_cli
given_timeout = 20
given_request = {
- "destinationApplicationId": given_destination_application_id,
+ "destinationCallsConfigurationId": given_destination_application_id,
"timeout": given_timeout,
}
@@ -1488,7 +1500,7 @@ def test_should_request_application_transfer(httpserver: HTTPServer, get_api_cli
api_instance = CallsApi(get_api_client)
request: CallsApplicationTransferRequest = CallsApplicationTransferRequest(
- destination_application_id=given_destination_application_id,
+ destination_calls_configuration_id=given_destination_application_id,
timeout=given_timeout,
)
@@ -1618,7 +1630,9 @@ def test_should_get_conferences(httpserver: HTTPServer, get_api_client):
},
},
],
- "applicationId": given_application_id,
+ "platform": {
+ "applicationId": given_application_id,
+ },
}
],
"paging": {
@@ -1680,7 +1694,9 @@ def test_should_get_conferences(httpserver: HTTPServer, get_api_client):
),
),
],
- application_id=given_application_id,
+ platform=Platform(
+ application_id=given_application_id,
+ ),
)
],
paging=PageInfo(
@@ -1709,6 +1725,7 @@ def test_should_create_conference(httpserver: HTTPServer, get_api_client):
given_video_camera = True
given_video_screen_share = True
given_application_id = "61c060db2675060027d8c7a6"
+ given_calls_configuration_id = "dc5942707c704551a00cd2ea"
given_response = {
"id": given_id,
@@ -1749,7 +1766,9 @@ def test_should_create_conference(httpserver: HTTPServer, get_api_client):
},
},
],
- "applicationId": given_application_id,
+ "platform": {
+ "applicationId": given_application_id,
+ },
}
setup_request(httpserver, CONFERENCES, given_response, "POST", 201, None)
@@ -1757,7 +1776,9 @@ def test_should_create_conference(httpserver: HTTPServer, get_api_client):
api_instance = CallsApi(get_api_client)
request: CallsConferenceRequest = CallsConferenceRequest(
- name=given_name, application_id=given_application_id
+ name=given_name,
+ calls_configuration_id=given_calls_configuration_id,
+ platform=Platform(application_id=given_application_id),
)
api_response = api_instance.create_conference(calls_conference_request=request)
@@ -1803,7 +1824,9 @@ def test_should_create_conference(httpserver: HTTPServer, get_api_client):
),
),
],
- application_id=given_application_id,
+ platform=Platform(
+ application_id=given_application_id,
+ ),
)
assert api_response == expected_response
@@ -1864,7 +1887,9 @@ def test_should_get_conference(httpserver: HTTPServer, get_api_client):
},
},
],
- "applicationId": given_application_id,
+ "platform": {
+ "applicationId": given_application_id,
+ },
}
given_conference_id = "123"
@@ -1917,7 +1942,9 @@ def test_should_get_conference(httpserver: HTTPServer, get_api_client):
),
),
],
- application_id=given_application_id,
+ platform=Platform(
+ application_id=given_application_id,
+ ),
)
assert api_response == expected_response
@@ -1928,7 +1955,7 @@ def test_update_all_calls(httpserver: HTTPServer, get_api_client):
given_request = {"muted": given_muted}
- given_status = "PENDING"
+ given_status = CallsActionStatus.PENDING
given_response = {"status": given_status}
@@ -1992,7 +2019,7 @@ def test_should_add_new_call(httpserver: HTTPServer, get_api_client):
given_answer_time = "2022-05-01T14:25:55.0+0000"
given_end_time = "2022-05-01T14:27:40.0+0000"
given_parent_call_id = "3ad8805e-d401-424e-9b03-e02a2016a5e2"
- given_detection_result = "HUMAN"
+ given_detection_result = CallsDetectionResult.HUMAN
given_conference_id = "034e622a-cc7e-456d-8a10-0ba43b11aa5e"
given_key1 = "value1"
given_key2 = "value2"
@@ -2059,7 +2086,9 @@ def test_should_add_new_call(httpserver: HTTPServer, get_api_client):
"endTime": given_end_time,
"parentCallId": given_parent_call_id,
"machineDetection": {"detectionResult": given_detection_result},
- "applicationId": given_application_id,
+ "platform": {
+ "applicationId": given_application_id,
+ },
"conferenceId": given_conference_id,
"customData": {"key1": given_key1, "key2": given_key2},
},
@@ -2155,7 +2184,9 @@ def test_should_add_new_call(httpserver: HTTPServer, get_api_client):
machine_detection=CallsMachineDetectionProperties(
detection_result=given_detection_result
),
- application_id=given_application_id,
+ platform=Platform(
+ application_id=given_application_id,
+ ),
conference_id=given_conference_id,
custom_data={"key1": given_key1, "key2": given_key2},
),
@@ -2175,7 +2206,7 @@ def test_should_add_existing_call(httpserver: HTTPServer, get_api_client):
given_name = "Example conference"
given_call_id = "string"
given_phone_number = "41792030000"
- given_type = "PHONE"
+ given_type = CallEndpointType.PHONE
given_state = "JOINING"
given_join_time = "2022-05-01T14:25:45.0Z"
given_audio_muted = True
@@ -2241,7 +2272,7 @@ def test_should_add_existing_call(httpserver: HTTPServer, get_api_client):
},
},
],
- "applicationId": given_application_id,
+ "platform": {"applicationId": given_application_id},
}
endpoint = CONFERENCE_CALL.replace("{conferenceId}", given_conference_id).replace(
@@ -2303,14 +2334,14 @@ def test_should_add_existing_call(httpserver: HTTPServer, get_api_client):
),
),
],
- application_id=given_application_id,
+ platform=Platform(application_id=given_application_id),
)
assert api_response == expected_response
def test_should_conference_remove_call(httpserver: HTTPServer, get_api_client):
- given_status = "PENDING"
+ given_status = CallsActionStatus.PENDING
given_response = {"status": given_status}
@@ -2339,7 +2370,7 @@ def test_should_conference_update_call(httpserver: HTTPServer, get_api_client):
given_request = {"muted": given_muted}
- given_status = "PENDING"
+ given_status = CallsActionStatus.PENDING
given_response = {"status": given_status}
@@ -2372,8 +2403,8 @@ def test_should_hangup_conference(httpserver: HTTPServer, get_api_client):
given_name = "Example conference"
given_call_id = "string"
given_phone_number = "41792030000"
- given_type = "PHONE"
- given_state = "JOINING"
+ given_type = CallEndpointType.PHONE
+ given_state = CallsParticipantState.JOINING
given_join_time = "2022-05-01T14:25:45.134Z"
given_audio_muted = True
given_audio_user_muted = True
@@ -2404,7 +2435,9 @@ def test_should_hangup_conference(httpserver: HTTPServer, get_api_client):
},
}
],
- "applicationId": given_application_id,
+ "platform": {
+ "applicationId": given_application_id,
+ },
}
given_conference_id = "123"
@@ -2440,18 +2473,20 @@ def test_should_hangup_conference(httpserver: HTTPServer, get_api_client):
),
)
],
- application_id=given_application_id,
+ platform=Platform(
+ application_id=given_application_id,
+ ),
)
assert api_response == expected_response
def test_should_conference_play_file(httpserver: HTTPServer, get_api_client):
given_loop_count = 0
- given_type = "FILE"
+ given_type = CallsPlayContentType.FILE
given_request = {"loopCount": given_loop_count, "content": {"type": given_type}}
- given_status = "PENDING"
+ given_status = CallsActionStatus.PENDING
given_response = {"status": given_status}
@@ -2463,12 +2498,12 @@ def test_should_conference_play_file(httpserver: HTTPServer, get_api_client):
api_instance = CallsApi(get_api_client)
- request: CallsPlayRequest = CallsPlayRequest(
+ request: CallsConferencePlayRequest = CallsConferencePlayRequest(
loop_count=given_loop_count, content=CallsPlayContent(type=given_type)
)
api_response = api_instance.conference_play_file(
- calls_play_request=request, conference_id=given_conference_id
+ calls_conference_play_request=request, conference_id=given_conference_id
)
expected_response = CallsActionResponse(status=given_status)
@@ -2477,7 +2512,7 @@ def test_should_conference_play_file(httpserver: HTTPServer, get_api_client):
def test_should_conference_stop_file(httpserver: HTTPServer, get_api_client):
- given_status = "PENDING"
+ given_status = CallsActionStatus.PENDING
given_response = {"status": given_status}
@@ -2503,11 +2538,11 @@ def test_should_conference_stop_file(httpserver: HTTPServer, get_api_client):
def test_should_get_calls_recordings(httpserver: HTTPServer, get_api_client):
given_id = "d8d84155-3831-43fb-91c9-bb897149a79d"
given_phone_number = "41792030000"
- given_type = "PHONE"
- given_direction = "INBOUND"
+ given_type = CallEndpointType.PHONE
+ given_direction = CallDirection.INBOUND
given_file_id = "218eceba-c044-430d-9f26-8f1a7f0g2d03"
given_name = "Example file"
- given_file_format = "WAV"
+ given_file_format = CallsFileFormat.WAV
given_size = 292190
given_creation_method = "RECORDED"
given_creation_time = "2022-05-01T14:25:45.143Z"
@@ -2515,8 +2550,8 @@ def test_should_get_calls_recordings(httpserver: HTTPServer, get_api_client):
given_duration = 3
given_start_time = "2022-05-01T14:25:45.134Z"
given_end_time = "2022-05-01T14:35:45.154Z"
- given_location = "SFTP"
- given_status = "SUCCESSFUL"
+ given_location = CallsRecordingFileLocation.SFTP
+ given_status = CallsRecordingStatus.SUCCESSFUL
given_reason = "string"
given_page = 0
given_page_size = 1
@@ -2576,9 +2611,7 @@ def test_should_get_calls_recordings(httpserver: HTTPServer, get_api_client):
name=given_name,
file_format=given_file_format,
size=given_size,
- creation_method=given_creation_method,
creation_time=given_creation_time,
- expiration_time=given_expiration_time,
duration=given_duration,
start_time=given_start_time,
end_time=given_end_time,
@@ -2603,19 +2636,19 @@ def test_should_get_calls_recordings(httpserver: HTTPServer, get_api_client):
def test_should_get_call_recordings(httpserver: HTTPServer, get_api_client):
given_id = "d8d84155-3831-43fb-91c9-bb897149a79d"
given_phone_number = "41792030000"
- given_type = "PHONE"
- given_direction = "INBOUND"
+ given_type = CallEndpointType.PHONE
+ given_direction = CallDirection.INBOUND
given_file_id = "218eceba-c044-430d-9f26-8f1a7f0g2d03"
given_name = "Example file"
- given_file_format = "WAV"
+ given_file_format = CallsFileFormat.WAV
given_size = 292190
given_creation_time = "2022-05-01T14:25:45.143Z"
given_expiration_time = "2022-06-01T14:25:45.143Z"
given_duration = 3
given_start_time = "2022-05-01T14:25:45.134Z"
given_end_time = "2022-05-01T14:35:45.154Z"
- given_location = "SFTP"
- given_status = "SUCCESSFUL"
+ given_location = CallsRecordingFileLocation.SFTP
+ given_status = CallsRecordingStatus.SUCCESSFUL
given_response = {
"callId": given_id,
@@ -2646,18 +2679,17 @@ def test_should_get_call_recordings(httpserver: HTTPServer, get_api_client):
api_response = api_instance.get_call_recordings(call_id=given_id)
- expected_response = CallsPublicCallRecording(
+ expected_response = CallRecording(
call_id=given_id,
endpoint=CallsPhoneEndpoint(type=given_type, phone_number=given_phone_number),
direction=given_direction,
files=[
- CallsPublicRecordingFile(
+ CallsRecordingFile(
id=given_file_id,
name=given_name,
file_format=given_file_format,
size=given_size,
creation_time=given_creation_time,
- expiration_time=given_expiration_time,
duration=given_duration,
start_time=given_start_time,
end_time=given_end_time,
@@ -2718,12 +2750,12 @@ def test_should_delete_call_recordings(httpserver: HTTPServer, get_api_client):
api_response = api_instance.delete_call_recordings(call_id=given_id)
- expected_response = CallsPublicCallRecording(
+ expected_response = CallRecording(
call_id=given_id,
endpoint=CallsPhoneEndpoint(type=given_type, phone_number=given_phone_number),
direction=given_direction,
files=[
- CallsPublicRecordingFile(
+ CallsRecordingFile(
id=given_file_id,
name=given_name,
file_format=given_file_format,
@@ -2747,7 +2779,7 @@ def test_should_get_conferences_recordings(httpserver: HTTPServer, get_api_clien
given_application_id = "string"
given_file_id = "218eceba-c044-430d-9f26-8f1a7f0g2d03"
given_name = "Example file"
- given_file_format = "WAV"
+ given_file_format = CallsFileFormat.WAV
given_size = 292190
given_creation_method = "RECORDED"
given_creation_time = "2022-05-01T14:25:45.143Z"
@@ -2755,12 +2787,12 @@ def test_should_get_conferences_recordings(httpserver: HTTPServer, get_api_clien
given_duration = 3
given_start_time = "2022-05-01T14:25:45.134Z"
given_end_time = "2022-05-01T14:35:45.154Z"
- given_location = "SFTP"
+ given_location = CallsRecordingFileLocation.SFTP
given_id = "d8d84155-3831-43fb-91c9-bb897149a79d"
given_phone_number = "41792030000"
given_type = "PHONE"
- given_direction = "INBOUND"
- given_status = "SUCCESSFUL"
+ given_direction = CallDirection.INBOUND
+ given_status = CallsRecordingStatus.SUCCESSFUL
given_reason = "string"
given_page = 0
given_page_size = 1
@@ -2772,7 +2804,7 @@ def test_should_get_conferences_recordings(httpserver: HTTPServer, get_api_clien
{
"conferenceId": given_conference_id,
"conferenceName": given_conference_name,
- "applicationId": given_application_id,
+ "platform": {"applicationId": given_application_id},
"composedFiles": [
{
"id": given_file_id,
@@ -2832,12 +2864,14 @@ def test_should_get_conferences_recordings(httpserver: HTTPServer, get_api_clien
expected_response = CallsConferenceRecordingPage(
results=[
- CallsPublicConferenceRecording(
+ CallsConferenceRecording(
conference_id=given_conference_id,
conference_name=given_conference_name,
- application_id=given_application_id,
+ platform=Platform(
+ application_id=given_application_id,
+ ),
composed_files=[
- CallsPublicRecordingFile(
+ CallsRecordingFile(
id=given_file_id,
name=given_name,
file_format=given_file_format,
@@ -2850,21 +2884,19 @@ def test_should_get_conferences_recordings(httpserver: HTTPServer, get_api_clien
)
],
call_recordings=[
- CallsPublicCallRecording(
+ CallRecording(
call_id=given_id,
endpoint=CallsPhoneEndpoint(
type=CallEndpointType.PHONE, phone_number=given_phone_number
),
direction=given_direction,
files=[
- CallsPublicRecordingFile(
+ CallsRecordingFile(
id=given_file_id,
name=given_name,
file_format=given_file_format,
size=given_size,
- creation_method=given_creation_method,
creation_time=given_creation_time,
- expiration_time=given_expiration_time,
duration=given_duration,
start_time=given_start_time,
end_time=given_end_time,
@@ -2893,7 +2925,7 @@ def test_should_get_conference_recordings(httpserver: HTTPServer, get_api_client
given_application_id = "string"
given_file_id = "218eceba-c044-430d-9f26-8f1a7f0g2d03"
given_name = "Example file"
- given_file_format = "WAV"
+ given_file_format = CallsFileFormat.WAV
given_size = 292190
given_creation_method = "RECORDED"
given_creation_time = "2022-05-01T14:25:45.143Z"
@@ -2901,7 +2933,7 @@ def test_should_get_conference_recordings(httpserver: HTTPServer, get_api_client
given_duration = 3
given_start_time = "2022-05-01T14:25:45.134Z"
given_end_time = "2022-05-01T14:35:45.154Z"
- given_location = "SFTP"
+ given_location = CallsRecordingFileLocation.SFTP
given_id = "d8d84155-3831-43fb-91c9-bb897149a79d"
given_phone_number = "41792030000"
given_type = "PHONE"
@@ -2911,7 +2943,7 @@ def test_should_get_conference_recordings(httpserver: HTTPServer, get_api_client
given_response = {
"conferenceId": given_conference_id,
"conferenceName": given_conference_name,
- "applicationId": given_application_id,
+ "platform": {"applicationId": given_application_id},
"composedFiles": [
{
"id": given_file_id,
@@ -2962,12 +2994,14 @@ def test_should_get_conference_recordings(httpserver: HTTPServer, get_api_client
conference_id=given_conference_id
)
- expected_response = CallsPublicConferenceRecording(
+ expected_response = CallsConferenceRecording(
conference_id=given_conference_id,
conference_name=given_conference_name,
- application_id=given_application_id,
+ platform=Platform(
+ application_id=given_application_id,
+ ),
composed_files=[
- CallsPublicRecordingFile(
+ CallsRecordingFile(
id=given_file_id,
name=given_name,
file_format=given_file_format,
@@ -2980,21 +3014,19 @@ def test_should_get_conference_recordings(httpserver: HTTPServer, get_api_client
)
],
call_recordings=[
- CallsPublicCallRecording(
+ CallRecording(
call_id=given_id,
endpoint=CallsPhoneEndpoint(
type=CallEndpointType.PHONE, phone_number=given_phone_number
),
direction=given_direction,
files=[
- CallsPublicRecordingFile(
+ CallsRecordingFile(
id=given_file_id,
name=given_name,
file_format=given_file_format,
size=given_size,
- creation_method=given_creation_method,
creation_time=given_creation_time,
- expiration_time=given_expiration_time,
duration=given_duration,
start_time=given_start_time,
end_time=given_end_time,
@@ -3015,7 +3047,7 @@ def test_should_delete_conference_recordings(httpserver: HTTPServer, get_api_cli
given_application_id = "string"
given_file_id = "218eceba-c044-430d-9f26-8f1a7f0g2d03"
given_name = "Example file"
- given_file_format = "WAV"
+ given_file_format = CallsFileFormat.WAV
given_size = 292190
given_creation_method = "RECORDED"
given_creation_time = "2022-05-01T14:25:45.143Z"
@@ -3023,7 +3055,7 @@ def test_should_delete_conference_recordings(httpserver: HTTPServer, get_api_cli
given_duration = 3
given_start_time = "2022-05-01T14:25:45.134Z"
given_end_time = "2022-05-01T14:35:45.154Z"
- given_location = "SFTP"
+ given_location = CallsRecordingFileLocation.SFTP
given_id = "d8d84155-3831-43fb-91c9-bb897149a79d"
given_phone_number = "41792030000"
given_type = "PHONE"
@@ -3033,7 +3065,7 @@ def test_should_delete_conference_recordings(httpserver: HTTPServer, get_api_cli
given_response = {
"conferenceId": given_conference_id,
"conferenceName": given_conference_name,
- "applicationId": given_application_id,
+ "platform": {"applicationId": given_application_id},
"composedFiles": [
{
"id": given_file_id,
@@ -3084,12 +3116,12 @@ def test_should_delete_conference_recordings(httpserver: HTTPServer, get_api_cli
conference_id=given_conference_id
)
- expected_response = CallsPublicConferenceRecording(
+ expected_response = CallsConferenceRecording(
conference_id=given_conference_id,
conference_name=given_conference_name,
- application_id=given_application_id,
+ platform=Platform(application_id=given_application_id),
composed_files=[
- CallsPublicRecordingFile(
+ CallsRecordingFile(
id=given_file_id,
name=given_name,
file_format=given_file_format,
@@ -3102,14 +3134,14 @@ def test_should_delete_conference_recordings(httpserver: HTTPServer, get_api_cli
)
],
call_recordings=[
- CallsPublicCallRecording(
+ CallRecording(
call_id=given_id,
endpoint=CallsPhoneEndpoint(
type=CallEndpointType.PHONE, phone_number=given_phone_number
),
direction=given_direction,
files=[
- CallsPublicRecordingFile(
+ CallsRecordingFile(
id=given_file_id,
name=given_name,
file_format=given_file_format,
@@ -3197,7 +3229,7 @@ def test_should_delete_recording_file(httpserver: HTTPServer, get_api_client):
api_response = api_instance.delete_recording_file(file_id=given_id)
- expected_response: CallsPublicRecordingFile = CallsPublicRecordingFile(
+ expected_response: CallsRecordingFile = CallsRecordingFile(
id=given_id,
name=given_name,
file_format=given_file_format,
@@ -3214,11 +3246,11 @@ def test_should_delete_recording_file(httpserver: HTTPServer, get_api_client):
def test_should_conference_say_text(httpserver: HTTPServer, get_api_client):
given_text = "string"
- given_language = "ar"
+ given_language = CallsLanguage.AR
given_speech_rate = 0.5
given_loop_count = 0
- given_voice_gender = "FEMALE"
- given_voice_name = "Hoda"
+ given_voice_gender = CallsGender.FEMALE
+ given_voice_name = CallVoice.HANS
given_request = {
"text": given_text,
@@ -3231,7 +3263,7 @@ def test_should_conference_say_text(httpserver: HTTPServer, get_api_client):
},
}
- given_status = "PENDING"
+ given_status = CallsActionStatus.PENDING
given_response = {"status": given_status}
@@ -3717,10 +3749,11 @@ def test_should_delete_media_stream_config(httpserver: HTTPServer, get_api_clien
def test_should_create_bulk_of_calls(httpserver: HTTPServer, get_api_client):
+ given_calls_configuration_id = "dc5942707c704551a00cd2ea"
given_application_id = "61c060db2675060027d8c7a6"
given_from = "41793026834"
given_phone_number = "41792036727"
- given_type = "PHONE"
+ given_type = CallsBulkEndpointType.PHONE
given_bulk_id = "bulk"
given_call_id = "call"
given_external_id = "external"
@@ -3730,7 +3763,9 @@ def test_should_create_bulk_of_calls(httpserver: HTTPServer, get_api_client):
"bulkId": given_bulk_id,
"calls": [
{
- "applicationId": given_application_id,
+ "platform": {
+ "applicationId": given_application_id,
+ },
"callId": given_call_id,
"externalId": given_external_id,
"from": given_from,
@@ -3738,7 +3773,9 @@ def test_should_create_bulk_of_calls(httpserver: HTTPServer, get_api_client):
"status": given_status,
},
{
- "applicationId": given_application_id,
+ "platform": {
+ "applicationId": given_application_id,
+ },
"callId": given_call_id,
"externalId": given_external_id,
"from": given_from,
@@ -3746,7 +3783,9 @@ def test_should_create_bulk_of_calls(httpserver: HTTPServer, get_api_client):
"status": given_status,
},
{
- "applicationId": given_application_id,
+ "platform": {
+ "applicationId": given_application_id,
+ },
"callId": given_call_id,
"externalId": given_external_id,
"from": given_from,
@@ -3761,7 +3800,10 @@ def test_should_create_bulk_of_calls(httpserver: HTTPServer, get_api_client):
api_instance = CallsApi(get_api_client)
request: CallBulkRequest = CallBulkRequest(
- application_id=given_application_id,
+ calls_configuration_id=given_calls_configuration_id,
+ platform=Platform(
+ application_id=given_application_id,
+ ),
items=[
CallsBulkItem(
var_from=given_from,
@@ -3792,34 +3834,34 @@ def test_should_create_bulk_of_calls(httpserver: HTTPServer, get_api_client):
bulk_id="bulk",
calls=[
CallsBulkCall(
- application_id=given_application_id,
+ platform=Platform(application_id=given_application_id),
call_id=given_call_id,
external_id=given_external_id,
var_from=given_from,
endpoint=CallsBulkPhoneEndpoint(
type=given_type, phone_number=given_phone_number
),
- status="PENDING",
+ status=CallsActionStatus.PENDING,
),
CallsBulkCall(
- application_id=given_application_id,
+ platform=Platform(application_id=given_application_id),
call_id=given_call_id,
external_id=given_external_id,
var_from=given_from,
endpoint=CallsBulkPhoneEndpoint(
type=given_type, phone_number=given_phone_number
),
- status="PENDING",
+ status=CallsActionStatus.PENDING,
),
CallsBulkCall(
- application_id=given_application_id,
+ platform=Platform(application_id=given_application_id),
call_id=given_call_id,
external_id=given_external_id,
var_from=given_from,
endpoint=CallsBulkPhoneEndpoint(
type=given_type, phone_number=given_phone_number
),
- status="PENDING",
+ status=CallsActionStatus.PENDING,
),
],
)
diff --git a/infobip_api_client/tests/test_click_to_call_api.py b/infobip_api_client/tests/test_click_to_call_api.py
index a9f1b31..bbac4ab 100644
--- a/infobip_api_client/tests/test_click_to_call_api.py
+++ b/infobip_api_client/tests/test_click_to_call_api.py
@@ -12,9 +12,9 @@
from infobip_api_client.models.calls_click_to_call_message_body import (
CallsClickToCallMessageBody,
)
-from infobip_api_client.models.calls_delivery_day import CallsDeliveryDay
-from infobip_api_client.models.calls_delivery_time import CallsDeliveryTime
-from infobip_api_client.models.calls_delivery_time_window import CallsDeliveryTimeWindow
+from infobip_api_client.models.delivery_day import DeliveryDay
+from infobip_api_client.models.delivery_time import DeliveryTime
+from infobip_api_client.models.delivery_time_window import DeliveryTimeWindow
from infobip_api_client.models.calls_retry import CallsRetry
from infobip_api_client.models.calls_voice import CallsVoice
@@ -148,19 +148,19 @@ def test_should_send_click_to_call_message(httpserver: HTTPServer, get_api_clien
max_count=given_max_count,
),
machine_detection=given_machine_detection,
- delivery_time_window=CallsDeliveryTimeWindow(
- var_from=CallsDeliveryTime(
+ delivery_time_window=DeliveryTimeWindow(
+ var_from=DeliveryTime(
hour=given_from_hour, minute=given_from_minute
),
- to=CallsDeliveryTime(hour=given_to_hour, minute=given_to_minute),
+ to=DeliveryTime(hour=given_to_hour, minute=given_to_minute),
days=[
- CallsDeliveryDay.MONDAY,
- CallsDeliveryDay.TUESDAY,
- CallsDeliveryDay.WEDNESDAY,
- CallsDeliveryDay.THURSDAY,
- CallsDeliveryDay.FRIDAY,
- CallsDeliveryDay.SATURDAY,
- CallsDeliveryDay.SUNDAY,
+ DeliveryDay.MONDAY,
+ DeliveryDay.TUESDAY,
+ DeliveryDay.WEDNESDAY,
+ DeliveryDay.THURSDAY,
+ DeliveryDay.FRIDAY,
+ DeliveryDay.SATURDAY,
+ DeliveryDay.SUNDAY,
],
),
)
diff --git a/infobip_api_client/tests/test_email_api.py b/infobip_api_client/tests/test_email_api.py
new file mode 100644
index 0000000..7d75fa8
--- /dev/null
+++ b/infobip_api_client/tests/test_email_api.py
@@ -0,0 +1,1253 @@
+import datetime
+import os
+import pytest
+from pathlib import Path
+from pytest_httpserver import HTTPServer
+
+from infobip_api_client import (
+ ApiClient,
+ Configuration,
+ EmailApi,
+ EmailDomainIpRequest,
+ EmailDomainIpResponse,
+ EmailDomainIp,
+ EmailSimpleApiResponse,
+ EmailAddDomainRequest,
+ EmailDomainResponse,
+ EmailTrackingResponse,
+ EmailDnsRecordResponse,
+ EmailAllDomainsResponse,
+ EmailPaging,
+ EmailValidationRequest,
+ EmailValidationResponse,
+ EmailBulkRescheduleResponse,
+ EmailBulkScheduleResponse,
+ EmailBulkInfo,
+ EmailBulkStatusResponse,
+ EmailBulkStatusInfo,
+ EmailBulkStatus,
+ EmailBulkRescheduleRequest,
+ EmailBulkUpdateStatusRequest,
+ EmailBulkUpdateStatusResponse,
+ EmailReportsResult,
+ EmailReport,
+ MessageStatus,
+ MessagePrice,
+ MessageError,
+ EmailReturnPathAddressRequest,
+ EmailGetSuppressionType,
+ EmailSuppressionInfoPageResponse,
+ EmailSuppressionInfo,
+ EmailPageDetails,
+ EmailAddDeleteSuppressionType,
+ EmailAddSuppressionRequest,
+ EmailAddSuppression,
+ EmailDeleteSuppressionRequest,
+ EmailDeleteSuppression,
+ EmailDomainAccess,
+ EmailDomainInfoPageResponse,
+ EmailDomainInfo, EmailIpResponse, EmailIpDetailResponse, EmailIpPoolResponse, EmailIpPoolCreateRequest,
+)
+
+DOMAIN_IPS = "/email/1/domain-ips"
+DOMAINS = "/email/1/domains"
+DOMAIN = "/email/1/domains/{domainName}"
+DOMAIN_VERIFY = "/email/1/domains/{domainName}/verify"
+IPS = "/email/1/ips"
+VALIDATION = "/email/2/validation"
+BULKS = "/email/1/bulks"
+BULKS_STATUS = "/email/1/bulks/status"
+EMAIL_SEND = "/email/3/send"
+REPORTS = "/email/1/reports"
+RETURN_PATH = "/email/1/domains/{domainName}/return-path"
+EMAIL_SUPPRESSION = "/email/1/suppressions"
+EMAIL_SUPPRESSION_DOMAINS = "/email/1/suppressions/domains"
+EMAIL_MANAGEMENT_IPS = "/email/1/ip-management/ips"
+EMAIL_MANAGEMENT_IP = "/email/1/ip-management/ips/{ipId}"
+EMAIL_MANAGEMENT_POOLS = "/email/1/ip-management/pools"
+EMAIL_MANAGEMENT_POOL = "/email/1/ip-management/pools/{poolId}"
+
+TEMP_FILE_PATH = Path(os.path.dirname(__file__)) / "temp"
+
+
+def test_should_get_all_domain_ips(httpserver: HTTPServer, get_api_client):
+ given_domain_name = "example.com"
+ given_ip_address = "given_ip"
+ given_dedicated = True
+ given_assigned_domain_count = 1
+ given_status = "ASSIGNABLE"
+
+ given_response = {
+ "result": [
+ {
+ "ipAddress": given_ip_address,
+ "dedicated": given_dedicated,
+ "assignedDomainCount": given_assigned_domain_count,
+ "status": given_status,
+ }
+ ]
+ }
+
+ setup_request(httpserver, DOMAIN_IPS, given_response)
+
+ api_instance = EmailApi(get_api_client)
+ api_response = api_instance.get_all_domain_ips(given_domain_name)
+
+ expected_response = EmailDomainIpResponse(
+ result=[
+ EmailDomainIp(
+ ip_address=given_ip_address,
+ dedicated=given_dedicated,
+ assigned_domain_count=given_assigned_domain_count,
+ status=given_status,
+ )
+ ]
+ )
+
+ assert api_response == expected_response
+
+
+def test_should_assign_ip_to_domain(httpserver: HTTPServer, get_api_client):
+ given_result = "OK"
+ given_domain_name = "example.com"
+ given_ip_address = "given_ip"
+
+ given_response = {"result": given_result}
+
+ expected_request = {"domainName": given_domain_name, "ipAddress": given_ip_address}
+
+ setup_request(
+ httpserver, DOMAIN_IPS, given_response, "POST", request_body=expected_request
+ )
+
+ api_instance = EmailApi(get_api_client)
+ request = EmailDomainIpRequest(
+ domain_name=given_domain_name, ip_address=given_ip_address
+ )
+ api_response = api_instance.assign_ip_to_domain(request)
+
+ expected_response = EmailSimpleApiResponse(result=given_result)
+
+ assert api_response == expected_response
+
+
+def test_should_remove_ip_from_domain(httpserver: HTTPServer, get_api_client):
+ given_result = "OK"
+ given_domain_name = "example.com"
+ given_ip_address = "given_ip"
+
+ given_response = {"result": given_result}
+
+ setup_request(httpserver, DOMAIN_IPS, given_response, "DELETE")
+
+ api_instance = EmailApi(get_api_client)
+ api_response = api_instance.remove_ip_from_domain(
+ given_domain_name, given_ip_address
+ )
+
+ expected_response = EmailSimpleApiResponse(result=given_result)
+
+ assert api_response == expected_response
+
+
+def test_should_add_domain(httpserver: HTTPServer, get_api_client):
+ given_domain_name = "example.com"
+ given_dkim_key_length = 1024
+ given_domain_id = 1
+ given_active = False
+ given_tracking = True
+ given_dns_records = "string"
+ given_verified = True
+ given_blocked = False
+ given_created_at = "2023-08-01T16:10:00+05:30"
+ given_created_at_datetime = datetime.datetime(
+ 2023,
+ 8,
+ 1,
+ 16,
+ 10,
+ 0,
+ tzinfo=datetime.timezone(datetime.timedelta(hours=5, minutes=30)),
+ )
+ given_return_path_address = "pathAddress"
+ given_target_daily_traffic = 10000
+
+ given_response = {
+ "domainId": given_domain_id,
+ "domainName": given_domain_name,
+ "active": given_active,
+ "tracking": {
+ "clicks": given_tracking,
+ "opens": given_tracking,
+ "unsubscribe": given_tracking,
+ },
+ "dnsRecords": [
+ {
+ "recordType": given_dns_records,
+ "name": given_dns_records,
+ "expectedValue": given_dns_records,
+ "verified": given_verified,
+ }
+ ],
+ "blocked": given_blocked,
+ "createdAt": given_created_at,
+ "returnPathAddress": given_return_path_address,
+ }
+
+ expected_request = {
+ "domainName": given_domain_name,
+ "dkimKeyLength": given_dkim_key_length,
+ "returnPathAddress": given_return_path_address,
+ "targetedDailyTraffic": given_target_daily_traffic,
+ }
+
+ setup_request(
+ httpserver, DOMAINS, given_response, "POST", request_body=expected_request
+ )
+
+ api_instance = EmailApi(get_api_client)
+ request = EmailAddDomainRequest(
+ domain_name=given_domain_name,
+ dkim_key_length=given_dkim_key_length,
+ return_path_address=given_return_path_address,
+ targeted_daily_traffic=given_target_daily_traffic,
+ )
+ api_response = api_instance.add_domain(request)
+
+ expected_response = EmailDomainResponse(
+ domain_id=given_domain_id,
+ domain_name=given_domain_name,
+ active=given_active,
+ tracking=EmailTrackingResponse(
+ clicks=given_tracking, opens=given_tracking, unsubscribe=given_tracking
+ ),
+ dns_records=[
+ EmailDnsRecordResponse(
+ record_type=given_dns_records,
+ name=given_dns_records,
+ expected_value=given_dns_records,
+ verified=given_verified,
+ )
+ ],
+ blocked=given_blocked,
+ created_at=given_created_at_datetime,
+ return_path_address=given_return_path_address,
+ )
+
+ assert api_response == expected_response
+
+
+def test_should_get_all_domains(httpserver: HTTPServer, get_api_client):
+ given_domain_name = "example.com"
+ given_paging = 0
+ given_domain_id = 1
+ given_active = False
+ given_tracking = True
+ given_dns_records = "string"
+ given_verified = True
+ given_blocked = False
+ given_created_at = "2022-05-05T17:32:28.777+01:00"
+ given_created_at_offset = datetime.datetime(
+ 2022,
+ 5,
+ 5,
+ 17,
+ 32,
+ 28,
+ 777000,
+ tzinfo=datetime.timezone(datetime.timedelta(hours=1, minutes=0)),
+ )
+
+ given_response = {
+ "paging": {
+ "page": given_paging,
+ "size": given_paging,
+ "totalPages": given_paging,
+ "totalResults": given_paging,
+ },
+ "results": [
+ {
+ "domainId": given_domain_id,
+ "domainName": given_domain_name,
+ "active": given_active,
+ "tracking": {
+ "clicks": given_tracking,
+ "opens": given_tracking,
+ "unsubscribe": given_tracking,
+ },
+ "dnsRecords": [
+ {
+ "recordType": given_dns_records,
+ "name": given_dns_records,
+ "expectedValue": given_dns_records,
+ "verified": given_verified,
+ }
+ ],
+ "blocked": given_blocked,
+ "createdAt": given_created_at,
+ }
+ ],
+ }
+
+ setup_request(httpserver, DOMAINS, given_response)
+
+ api_instance = EmailApi(get_api_client)
+ api_response = api_instance.get_all_domains()
+
+ expected_response = EmailAllDomainsResponse(
+ results=[
+ EmailDomainResponse(
+ domain_id=given_domain_id,
+ domain_name=given_domain_name,
+ active=given_active,
+ tracking=EmailTrackingResponse(
+ clicks=given_tracking,
+ opens=given_tracking,
+ unsubscribe=given_tracking,
+ ),
+ dns_records=[
+ EmailDnsRecordResponse(
+ record_type=given_dns_records,
+ name=given_dns_records,
+ expected_value=given_dns_records,
+ verified=given_verified,
+ )
+ ],
+ blocked=given_blocked,
+ created_at=given_created_at_offset,
+ )
+ ],
+ paging=EmailPaging(
+ page=given_paging,
+ size=given_paging,
+ total_pages=given_paging,
+ total_results=given_paging,
+ ),
+ )
+
+ assert api_response == expected_response
+
+
+def test_should_get_domain_details(httpserver: HTTPServer, get_api_client):
+ given_domain_name = "example.com"
+ given_domain_id = 1
+ given_active = False
+ given_tracking = True
+ given_dns_records = "string"
+ given_verified = True
+ given_blocked = False
+ given_created_at = "2022-05-05T17:32:28.777+01:00"
+ given_created_at_offset = datetime.datetime(
+ 2022,
+ 5,
+ 5,
+ 17,
+ 32,
+ 28,
+ 777000,
+ tzinfo=datetime.timezone(datetime.timedelta(hours=1, minutes=0)),
+ )
+
+ given_response = {
+ "domainId": given_domain_id,
+ "domainName": given_domain_name,
+ "active": given_active,
+ "tracking": {
+ "clicks": given_tracking,
+ "opens": given_tracking,
+ "unsubscribe": given_tracking,
+ },
+ "dnsRecords": [
+ {
+ "recordType": given_dns_records,
+ "name": given_dns_records,
+ "expectedValue": given_dns_records,
+ "verified": given_verified,
+ }
+ ],
+ "blocked": given_blocked,
+ "createdAt": given_created_at,
+ }
+
+ setup_request(
+ httpserver, DOMAIN.replace("{domainName}", given_domain_name), given_response
+ )
+
+ api_instance = EmailApi(get_api_client)
+ api_response = api_instance.get_domain_details(given_domain_name)
+
+ expected_response = EmailDomainResponse(
+ domain_id=given_domain_id,
+ domain_name=given_domain_name,
+ active=given_active,
+ tracking=EmailTrackingResponse(
+ clicks=given_tracking, opens=given_tracking, unsubscribe=given_tracking
+ ),
+ dns_records=[
+ EmailDnsRecordResponse(
+ record_type=given_dns_records,
+ name=given_dns_records,
+ expected_value=given_dns_records,
+ verified=given_verified,
+ )
+ ],
+ blocked=given_blocked,
+ created_at=given_created_at_offset,
+ )
+
+ assert api_response == expected_response
+
+
+def test_should_verify_domain(httpserver: HTTPServer, get_api_client):
+ given_domain_name = "example.com"
+ given_status_code = 202
+
+ setup_request(
+ httpserver,
+ DOMAIN_VERIFY.replace("{domainName}", given_domain_name),
+ None,
+ "POST",
+ status_code=given_status_code,
+ )
+
+ api_instance = EmailApi(get_api_client)
+ api_response = api_instance.verify_domain(given_domain_name)
+
+ assert api_response == None
+
+
+def test_should_get_all_ips(httpserver: HTTPServer, get_api_client):
+ given_ip_address = "given_ip"
+ given_dedicated = True
+ given_assigned_domain_count = 1
+ given_status = "ASSIGNABLE"
+
+ given_response = {
+ "result": [
+ {
+ "ipAddress": given_ip_address,
+ "dedicated": given_dedicated,
+ "assignedDomainCount": given_assigned_domain_count,
+ "status": given_status,
+ }
+ ]
+ }
+
+ setup_request(httpserver, IPS, given_response)
+
+ api_instance = EmailApi(get_api_client)
+ api_response = api_instance.get_all_ips()
+
+ expected_response = EmailDomainIpResponse(
+ result=[
+ EmailDomainIp(
+ ip_address=given_ip_address,
+ dedicated=given_dedicated,
+ assigned_domain_count=given_assigned_domain_count,
+ status=given_status,
+ )
+ ]
+ )
+
+ assert api_response == expected_response
+
+
+def test_should_validate_email(httpserver: HTTPServer, get_api_client):
+ given_to = "john.smith@example.com"
+ given_valid_syntax = True
+ given_did_you_mean = None
+
+ expected_request = {"to": given_to}
+
+ given_response = {
+ "to": given_to,
+ "validMailbox": "true",
+ "validSyntax": given_valid_syntax,
+ "catchAll": False,
+ "didYouMean": given_did_you_mean,
+ "disposable": False,
+ "roleBased": True,
+ }
+
+ setup_request(
+ httpserver, VALIDATION, given_response, "POST", request_body=expected_request
+ )
+
+ api_instance = EmailApi(get_api_client)
+ request = EmailValidationRequest(to=given_to)
+ api_response = api_instance.validate_email_addresses(request)
+
+ expected_response = EmailValidationResponse(
+ to=given_to,
+ valid_syntax=given_valid_syntax,
+ did_you_mean=given_did_you_mean,
+ valid_mailbox="true",
+ catch_all=False,
+ disposable=False,
+ role_based=True,
+ )
+
+ assert api_response == expected_response
+
+
+def test_should_get_scheduled_emails(httpserver: HTTPServer, get_api_client):
+ given_bulk_id = "BULK-ID-123-xyz"
+ given_external_bulk_id = "SOME_USER_DEFINE_BULK_123"
+
+ given_response = {
+ "externalBulkId": given_external_bulk_id,
+ "bulks": [{"bulkId": given_bulk_id, "sendAt": "2021-08-25T16:00:00.000+0000"}],
+ }
+
+ setup_request(httpserver, BULKS, given_response, "GET")
+
+ api_instance = EmailApi(get_api_client)
+ api_response = api_instance.get_scheduled_emails(given_external_bulk_id)
+
+ expected_response = EmailBulkScheduleResponse(
+ external_bulk_id=given_external_bulk_id,
+ bulks=[
+ EmailBulkInfo(
+ bulk_id=given_bulk_id,
+ send_at=datetime.datetime(
+ 2021, 8, 25, 16, 0, 0, 0, tzinfo=datetime.timezone.utc
+ ),
+ )
+ ],
+ )
+
+ assert api_response == expected_response
+
+
+def test_should_get_scheduled_emails_statuses(httpserver: HTTPServer, get_api_client):
+ given_bulk_id = "BULK-ID-123-xyz"
+ given_external_bulk_id = "SOME_USER_DEFINE_BULK_123"
+ given_status = EmailBulkStatus.PENDING
+
+ given_response = {
+ "externalBulkId": given_external_bulk_id,
+ "bulks": [{"bulkId": given_bulk_id, "status": given_status}],
+ }
+
+ setup_request(httpserver, BULKS_STATUS, given_response, "GET")
+
+ api_instance = EmailApi(get_api_client)
+ api_response = api_instance.get_scheduled_email_statuses(given_external_bulk_id)
+
+ expected_response = EmailBulkStatusResponse(
+ external_bulk_id=given_external_bulk_id,
+ bulks=[EmailBulkStatusInfo(bulk_id=given_bulk_id, status=given_status)],
+ )
+
+ assert api_response == expected_response
+
+
+def test_should_reschedule_emails(httpserver: HTTPServer, get_api_client):
+ given_bulk_id = "BULK-ID-123-xyz"
+ given_send_at = "2023-08-01T16:10:00+05:30"
+ given_send_at_datetime = datetime.datetime(
+ 2023,
+ 8,
+ 1,
+ 16,
+ 10,
+ 0,
+ tzinfo=datetime.timezone(datetime.timedelta(hours=5, minutes=30)),
+ )
+ given_request = {"sendAt": given_send_at}
+
+ given_response = {"bulkId": given_bulk_id, "sendAt": given_send_at}
+
+ setup_request(httpserver, BULKS, given_response, "PUT", request_body=given_request)
+
+ api_instance = EmailApi(get_api_client)
+ request = EmailBulkRescheduleRequest(send_at=given_send_at_datetime)
+ api_response = api_instance.reschedule_emails(given_bulk_id, request)
+
+ expected_response = EmailBulkRescheduleResponse(
+ bulk_id=given_bulk_id, send_at=given_send_at_datetime
+ )
+
+ assert api_response == expected_response
+
+
+def test_should_update_scheduled_email_statuses(httpserver: HTTPServer, get_api_client):
+ given_bulk_id = "string"
+ given_status = EmailBulkStatus.PENDING
+
+ given_response = {"bulkId": given_bulk_id, "status": given_status}
+ expected_request = {"status": given_status}
+
+ setup_request(
+ httpserver, BULKS_STATUS, given_response, "PUT", request_body=expected_request
+ )
+
+ api_instance = EmailApi(get_api_client)
+ request = EmailBulkUpdateStatusRequest(status=given_status)
+ api_response = api_instance.update_scheduled_email_statuses(given_bulk_id, request)
+
+ expected_response = EmailBulkUpdateStatusResponse(
+ bulk_id=given_bulk_id, status=given_status
+ )
+
+ assert api_response == expected_response
+
+
+def test_should_send_fully_featured_email(httpserver: HTTPServer, get_api_client):
+ given_to = "john.smith@example.com"
+ given_another_to = "alice.grey@example.com"
+ given_bulk_id = "snxemd8u52v7v84iiu69"
+ given_group_id = 1
+ given_group_name = "PENDING"
+ given_id = 1
+ given_name = "PENDING_ACCEPTED"
+ given_description = "Message accepted, pending for delivery."
+ given_attachment_text = "Test file text"
+ given_message_id = "somExternalMessageId0"
+ given_another_message_id = "someExternalMessageId1"
+ given_from = "Jane Smith Rich HTML message body.
" + intermediate_report = True + given_notify_url = "https://www.example.com/email/advanced" + given_notify_content_type = "application/json" + given_callback_data = "DLR callback data" + + given_response = { + "bulkId": given_bulk_id, + "messages": [ + { + "to": given_to, + "messageId": given_message_id, + "status": { + "groupId": given_group_id, + "groupName": given_group_name, + "id": given_id, + "name": given_name, + "description": given_description, + }, + }, + { + "to": given_another_to, + "messageId": given_another_message_id, + "status": { + "groupId": given_group_id, + "groupName": given_group_name, + "id": given_id, + "name": given_name, + "description": given_description, + }, + }, + ], + } + + setup_multipart_request(httpserver, EMAIL_SEND, given_response, 200) + + temp_path = Path(TEMP_FILE_PATH) + temp_path.mkdir(parents=True, exist_ok=True) + attachment_file_path = create_temp_file_with_content(temp_path, "attachment.txt", given_attachment_text) + + try: + api_instance = EmailApi(get_api_client) + api_response = api_instance.send_email( + to=[given_to, given_another_to], + var_from=given_from, + subject=given_subject, + reply_to=given_reply_to, + html=given_html, + text=given_text, + attachment=[read_temp_file(attachment_file_path)], + intermediate_report=intermediate_report, + notify_url=given_notify_url, + notify_content_type=given_notify_content_type, + callback_data=given_callback_data, + ) + finally: + attachment_file_path.unlink() + temp_path.rmdir() + + assert api_response.bulk_id == given_bulk_id + + +def test_should_get_email_delivery_reports(httpserver: HTTPServer, get_api_client): + given_sent_at = "2022-05-05T17:32:28.777+01:00" + given_sent_at_offset = datetime.datetime( + 2022, + 5, + 5, + 17, + 32, + 28, + 777000, + tzinfo=datetime.timezone(datetime.timedelta(hours=1, minutes=0)), + ) + + given_done_at = "2022-05-05T17:32:28.777+01:00" + given_done_at_offset = datetime.datetime( + 2022, + 5, + 5, + 17, + 32, + 28, + 777000, + tzinfo=datetime.timezone(datetime.timedelta(hours=1, minutes=0)), + ) + + given_bulk_id = "csdstgteet4fath2pclbq" + given_message_id = "45653761-3a88-4060-869e-ae372adc7a51" + given_to = "john.doe@example.com" + + given_response = { + "results": [ + { + "bulkId": given_bulk_id, + "messageId": given_message_id, + "to": given_to, + "sentAt": given_sent_at, + "doneAt": given_done_at, + "messageCount": 1, + "price": {"pricePerMessage": 0, "currency": "UNKNOWN"}, + "status": { + "groupId": 3, + "groupName": "DELIVERED", + "id": 5, + "name": "DELIVERED_TO_HANDSET", + "description": "Message delivered to handset", + }, + "error": { + "groupId": 0, + "groupName": "OK", + "id": 0, + "name": "NO_ERROR", + "description": "No Error", + "permanent": False, + }, + } + ] + } + + setup_request(httpserver, REPORTS, given_response, "GET") + + api_instance = EmailApi(get_api_client) + + api_response = api_instance.get_email_delivery_reports( + bulk_id=given_bulk_id, message_id=given_message_id, limit=1 + ) + + expected_response = EmailReportsResult( + results=[ + EmailReport( + bulk_id=given_bulk_id, + message_id=given_message_id, + to=given_to, + sent_at=given_sent_at_offset, + done_at=given_done_at_offset, + message_count=1, + price=MessagePrice(price_per_message=0, currency="UNKNOWN"), + status=MessageStatus( + group_id=3, + group_name="DELIVERED", + id=5, + name="DELIVERED_TO_HANDSET", + description="Message delivered to handset", + ), + error=MessageError( + group_id=0, + group_name="OK", + id=0, + name="NO_ERROR", + description="No Error", + permanent=False, + ), + ) + ] + ) + + assert api_response == expected_response + + +def test_should_update_return_path(httpserver: HTTPServer, get_api_client): + given_domain_id = 1 + given_domain_name = "example.com" + given_active = False + given_tracking = True + given_opens = True + given_unsubscribe = True + given_record_type = "string" + given_name = "string" + given_expected_value = "string" + given_verified = True + given_blocked = False + given_created_at = "2022-05-05T17:32:28.777+01:00" + given_created_at_offset = datetime.datetime( + 2022, + 5, + 5, + 17, + 32, + 28, + 777000, + tzinfo=datetime.timezone(datetime.timedelta(hours=1, minutes=0)), + ) + given_return_path_address = "returnpath@example.com" + + given_response = { + "domainId": given_domain_id, + "domainName": given_domain_name, + "active": given_active, + "tracking": { + "clicks": given_tracking, + "opens": given_opens, + "unsubscribe": given_unsubscribe, + }, + "dnsRecords": [ + { + "recordType": given_record_type, + "name": given_name, + "expectedValue": given_expected_value, + "verified": given_verified, + } + ], + "blocked": given_blocked, + "createdAt": given_created_at, + "returnPathAddress": given_return_path_address, + } + + expected_request = {"returnPathAddress": given_return_path_address} + + setup_request( + httpserver, + RETURN_PATH.replace("{domainName}", given_domain_name), + given_response, + "PUT", + request_body=expected_request, + ) + + api_instance = EmailApi(get_api_client) + request = EmailReturnPathAddressRequest( + return_path_address=given_return_path_address + ) + api_response = api_instance.update_return_path(given_domain_name, request) + + expected_response = EmailDomainResponse( + domain_id=given_domain_id, + domain_name=given_domain_name, + active=given_active, + tracking=EmailTrackingResponse( + clicks=given_tracking, opens=given_opens, unsubscribe=given_unsubscribe + ), + dns_records=[ + EmailDnsRecordResponse( + record_type=given_record_type, + name=given_name, + expected_value=given_expected_value, + verified=given_verified, + ) + ], + blocked=given_blocked, + created_at=given_created_at_offset, + return_path_address=given_return_path_address, + ) + + assert api_response == expected_response + + +def test_should_get_email_suppressions(httpserver: HTTPServer, get_api_client): + given_domain_name = "example.com" + given_email_address = "jane.smith@example.com" + given_type = EmailGetSuppressionType.BOUNCE + given_created_date = "2024-08-14T14:02:17.366" + given_reason = "550 5.1.1