Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LC-2382: Add get_license_info to agent-api v3.5 #134

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
### Added
- New `get_company_details` method in configuration-api v3.6.
- Added `response_timeout` parameter in `open_connection` methods.
- New `get_license_info` method in agent-api v3.5.

### Changed
- Updated outdated packages.
Expand Down
21 changes: 21 additions & 0 deletions livechat/agent/web/api/v35.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,3 +1071,24 @@ def list_agents_for_transfer(self,
return self.session.post(f'{self.api_url}/list_agents_for_transfer',
json=payload,
headers=headers)

def get_license_info(self,
payload: dict = None,
headers: dict = None) -> httpx.Response:
''' Returns basic license information.

Args:
payload (dict): Custom payload to be used as request's data.
It overrides all other parameters provided for the method.
headers (dict): Custom headers to be used with session headers.
They will be merged with session-level values that are set,
however, these method-level parameters will not be persisted across requests.

Returns:
httpx.Response: The Response object from `httpx` library,
which contains a server’s response to an HTTP request. '''
if payload is None:
payload = prepare_payload(locals())
return self.session.post(f'{self.api_url}/get_license_info',
json=payload,
headers=headers)
Loading