Skip to content

Commit

Permalink
Merge pull request #120 from livechat/Fix_customer_api_ver_36
Browse files Browse the repository at this point in the history
Added support for CustomerRtmV36 in the get_client method for API ver…
  • Loading branch information
marcindebski authored Dec 1, 2023
2 parents eef9476 + 601e3d9 commit 10b1aad
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Change Log
All notable changes to this project will be documented in this file.

## [0.3.9] - XXX

### Bugfixes
- Enabled instantiation for `CustomerRtmV36` within the 3.6 version of the Customer RTM API.
- Adjusted the return types in `get_client` method across RTM and WEB clients.

## [0.3.8] - 2023-11-30

### Added
Expand Down
2 changes: 1 addition & 1 deletion livechat/agent/rtm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AgentRTM:
def get_client(
version: str = stable_version,
base_url: str = api_url
) -> Union[AgentRtmV33, AgentRtmV34, AgentRtmV35]:
) -> Union[AgentRtmV33, AgentRtmV34, AgentRtmV35, AgentRtmV36]:
''' Returns client for specific Agent RTM version.
Args:
Expand Down
2 changes: 1 addition & 1 deletion livechat/agent/web/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_client(
proxies: dict = None,
verify: bool = True,
disable_logging: bool = False,
) -> Union[AgentWebV33, AgentWebV34, AgentWebV35]:
) -> Union[AgentWebV33, AgentWebV34, AgentWebV35, AgentWebV36]:
''' Returns client for specific API version.
Args:
Expand Down
3 changes: 2 additions & 1 deletion livechat/configuration/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def get_client(
proxies: dict = None,
verify: bool = True,
disable_logging: bool = False,
) -> Union[ConfigurationApiV33, ConfigurationApiV34, ConfigurationApiV35]:
) -> Union[ConfigurationApiV33, ConfigurationApiV34, ConfigurationApiV35,
ConfigurationApiV36]:
''' Returns client for specific Configuration API version.
Args:
Expand Down
5 changes: 3 additions & 2 deletions livechat/customer/rtm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from livechat.customer.rtm.api.v33 import CustomerRtmV33
from livechat.customer.rtm.api.v34 import CustomerRtmV34
from livechat.customer.rtm.api.v35 import CustomerRtmV35
from livechat.customer.rtm.api.v36 import CustomerRtmV36

stable_version = CONFIG.get('stable')
api_url = CONFIG.get('url')
Expand All @@ -21,7 +22,7 @@ def get_client(
base_url: str = api_url,
license_id: int = None,
organization_id: str = None
) -> Union[CustomerRtmV33, CustomerRtmV34, CustomerRtmV35]:
) -> Union[CustomerRtmV33, CustomerRtmV34, CustomerRtmV35, CustomerRtmV36]:
''' Returns client for specific Customer RTM version.
Args:
Expand All @@ -40,7 +41,7 @@ def get_client(
'3.3': CustomerRtmV33,
'3.4': CustomerRtmV34,
'3.5': CustomerRtmV35,
'3.6': CustomerRtmV35,
'3.6': CustomerRtmV36,
}.get(version)
client_kwargs = {
'3.3': {
Expand Down
2 changes: 1 addition & 1 deletion livechat/customer/web/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_client(
verify: bool = True,
organization_id: str = None,
disable_logging: bool = False,
) -> Union[CustomerWebV33, CustomerWebV34, CustomerWebV35]:
) -> Union[CustomerWebV33, CustomerWebV34, CustomerWebV35, CustomerWebV36]:
''' Returns client for specific API version.
Args:
Expand Down
2 changes: 1 addition & 1 deletion livechat/reports/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_client(
proxies: dict = None,
verify: bool = True,
disable_logging: bool = False,
) -> Union[ReportsApiV33, ReportsApiV34, ReportsApiV35]:
) -> Union[ReportsApiV33, ReportsApiV34, ReportsApiV35, ReportsApiV36]:
''' Returns client for specific Reports API version.
Args:
Expand Down

0 comments on commit 10b1aad

Please sign in to comment.