Skip to content

Commit a6803de

Browse files
authored
Merge pull request #24 from infobip/ib-tjuhasz/python-v5-release
5.0.0 release
2 parents 0c297b0 + f50ef4a commit a6803de

File tree

522 files changed

+53673
-7966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

522 files changed

+53673
-7966
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
10+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1111
steps:
1212
- uses: actions/checkout@v4
1313
- name: Set up Python ${{ matrix.python-version }}

CHANGELOG.md

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,48 @@ All notable changes to the library will be documented in this file.
55
The format of the file is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this library adheres to [Semantic Versioning](http://semver.org/) as mentioned in [README.md][readme] file.
77

8-
## [Unreleased]
8+
## [ [5.0.0](https://github.com/infobip/infobip-api-python-client/releases/tag/5.0.0) ] - 2024-12-23
99

10-
⚠ 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.
10+
🎉 **NEW Major Version of `infobip-api-python-client`.**
11+
12+
⚠️ **IMPORTANT NOTE:** This release contains compile time breaking changes.
13+
All changes, including breaking changes, are addressed and explained in the list bellow.
14+
If you find out that something was not addressed properly, please submit an issue.
15+
16+
From this point onward Python 3.7 is no longer supported. The minimum supported version is Python 3.8 due to dependency updates.
1117

1218
### Added
13-
- `calls.md` which contains examples and explanations for the Calls API.
14-
- `build.yml` workflow to ensure project build and test integrity.
15-
- `snyk.yml` workflow, which serves the purpose of identifying and addressing dependency vulnerabilities in the project.
16-
- `sonar.yml` workflow to analyze the source code, enhancing code quality and maintainability.
19+
* Most recent feature set for:
20+
* [Infobip SMS API](https://www.infobip.com/docs/api/channels/sms)
21+
* Introduced `/sms/3/messages (V3)` replacing the `/sms/2/text/advanced (V2)` and `/sms/2/binary/advanced (V2)` endpoints.
22+
* Introduced `/sms/3/reports (V3)` replacing `/sms/1/reports (V1)` endpoint.
23+
* Introduced `/sms/3/logs (V3)` replacing `/sms/1/logs (V1)` endpoint.
24+
* [Infobip 2FA](https://www.infobip.com/docs/api/platform/2fa)
25+
* [Infobip Voice API](https://www.infobip.com/docs/api/channels/voice)
26+
* Support for:
27+
* [Infobip Moments API](https://www.infobip.com/docs/api/customer-engagement/moments).
28+
* [Infobip Email API](https://www.infobip.com/docs/api/channels/email)
29+
* `calls.md` which contains examples and explanations for the Calls API.
30+
* `build.yml` workflow to ensure project build and test integrity.
31+
* `snyk.yml` workflow, which serves the purpose of identifying and addressing dependency vulnerabilities in the project.
32+
* `sonar.yml` workflow to analyze the source code, enhancing code quality and maintainability.
33+
34+
### Changed
35+
* **Fixes and changes**
36+
* 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.
37+
* 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.
38+
* 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.
39+
* 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.
40+
* Consolidated sending functions: use `send_sms_messages` instead of the `send_sms_message` and `send_binary_sms_message` functions.
41+
* 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)
42+
* 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)
43+
* Removed URL options configuration class (`sms_url_options`) in favor of a unified class: [url_options](infobip_api_client/models/url_options.py)
44+
* 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)
45+
* 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)
46+
* 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)
47+
* Renamed class from `calls_public_conference_recording` to `calls_conference_recording`.
48+
* Renamed class from `calls_pegasus_provider` to `calls_provider`.
49+
* Renamed class from `calls_pegasus_provider_trunk_type` to `calls_provider_trunk_type`.
1750

1851
### Security
1952
- Bumped werkzeug dependency from `2.1.2` to `3.0.3`.

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from infobip_api_client import SmsMessageContent
2+
13
# Infobip API Python Client
24

35
<img src="https://cdn-web.infobip.com/uploads/2023/01/Infobip-logo.svg" height="93px" alt="Infobip" />
@@ -24,19 +26,17 @@ We use [OpenAPI Generator](https://openapi-generator.tech/) to generate the pack
2426
Detailed documentation about Infobip API can be found here. The current version of this library includes this subset of Infobip products:
2527

2628
* [SMS](https://www.infobip.com/docs/api/channels/sms)
27-
* [SMS Messaging](https://www.infobip.com/docs/api/channels/sms/sms-messaging)
28-
* [2FA](https://www.infobip.com/docs/api/channels/sms/2fa)
29+
* [2FA](https://www.infobip.com/docs/api/platform/2fa)
2930
* [Voice](https://www.infobip.com/docs/api/channels/voice)
30-
* [Calls](https://www.infobip.com/docs/api/channels/voice/calls)
31-
* [Click To Call](https://www.infobip.com/docs/api/channels/voice/click-to-call)
32-
* [Call Routing](https://www.infobip.com/docs/api/channels/voice/routing)
31+
* [Moments](https://www.infobip.com/docs/api/customer-engagement/moments).
32+
* [Email](https://www.infobip.com/docs/api/channels/email)
3333

3434
## General Info
3535
For `infobip-api-python-client` versioning we use [Semantic Versioning][semver] scheme.
3636

3737
Published under [MIT License][license].
3838

39-
Python 3.7 is minimum supported version by this library.
39+
Python 3.8 is minimum supported version by this library.
4040

4141
## Installation
4242
Pull the library by using the following command:
@@ -78,23 +78,23 @@ Here's a basic example of sending the SMS message.
7878
from infobip_api_client.models import SmsAdvancedTextualRequest, SmsTextualMessage, SmsDestination, SmsResponse
7979
from infobip_api_client.api.sms_api import SmsApi
8080

81-
sms_request = SmsAdvancedTextualRequest(
81+
sms_request = SmsRequest(
8282
messages=[
83-
SmsTextualMessage(
83+
SmsMessage(
8484
destinations=[
8585
SmsDestination(
8686
to="41793026727",
8787
),
8888
],
89-
_from="SMSInfo",
90-
text="This is a dummy SMS message sent using Python library",
89+
sender="InfoSMS",
90+
content=SmsMessageContent(actual_instance=SmsTextContent(text="This is a dummy SMS message sent using Python library"))
9191
)
9292
]
9393
)
9494

9595
api_instance = SmsApi(api_client)
9696

97-
api_response: SmsResponse = api_instance.send_sms_message(sms_advanced_textual_request=sms_request)
97+
api_response: SmsResponse = api_instance.send_sms_messages(sms_request=sms_request)
9898
print(api_response)
9999
```
100100

@@ -103,15 +103,15 @@ To make your code more robust send the message in try block and handle the `ApiE
103103
from infobip_api_client.exceptions import ApiException
104104

105105
try:
106-
api_response: SmsResponse = api_instance.send_sms_message(sms_advanced_textual_request=sms_request)
106+
api_response: SmsResponse = api_instance.send_sms_messages(sms_request=sms_request)
107107
except ApiException as ex:
108108
print("Error occurred while trying to send SMS message.")
109109
```
110110

111111
In case of failure you can inspect the `ApiException` for more information.
112112
```python
113113
try:
114-
api_response: SmsResponse = api_instance.send_sms_message(sms_advanced_textual_request=sms_request)
114+
api_response: SmsResponse = api_instance.send_sms_messages(sms_request=sms_request)
115115
except ApiException as ex:
116116
print("Error occurred while trying to send SMS message.")
117117
print("Error status: %s\n" % ex.status)
@@ -198,12 +198,14 @@ For Calls quick start guide please check [these_examples](calls.md)
198198

199199
## Ask for help
200200

201-
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.
201+
Feel free to open issues on the repository for any encountered problem or feature request.
202+
203+
If you want to contribute to this library in any way, please follow the guidelines in [CONTRIBUTING][contributing] file.
202204

203-
If it's something that requires our imminent attention feel free to contact us @ [support@infobip.com](mailto:support@infobip.com).
205+
For anything that requires our imminent attention, contact us @ [support@infobip.com](mailto:support@infobip.com).
204206

205207
[apidocs]: https://www.infobip.com/docs/api
206-
[freetrial]: https://www.infobip.com/docs/freetrial
208+
[freetrial]: https://www.infobip.com/docs/essentials/getting-started/free-trial
207209
[signup]: https://www.infobip.com/signup
208210
[semver]: https://semver.org
209211
[license]: LICENSE

0 commit comments

Comments
 (0)