Skip to content

Commit

Permalink
Merge pull request #134 from livechat/add-get-license-info-to-agent-a…
Browse files Browse the repository at this point in the history
…pi-v35

LC-2382: Add get_license_info to agent-api v3.5
  • Loading branch information
skamieniarz authored Aug 2, 2024
2 parents e4ef0bf + 7f30902 commit f9b4673
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
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)

0 comments on commit f9b4673

Please sign in to comment.