Skip to content

Commit 561c132

Browse files
author
skamieniarz
committed
API-11765: Remove support for list_customers method in agent-api v3.6 classes
1 parent 05b0f56 commit 561c132

File tree

3 files changed

+4
-63
lines changed

3 files changed

+4
-63
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ All notable changes to this project will be documented in this file.
66
### Bugfixes
77
- Fix `customer_monitoring_level` parameter in `login` method in agent-api v3.3/v3.4/v3.5 classes.
88

9+
### Removed
10+
11+
- Support for `list_customers` method in agent-api v3.6 classes.
12+
913
## [0.3.5] - 2022-11-25
1014

1115
### Added

livechat/agent/rtm/api/v36.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -586,34 +586,6 @@ def get_customer(self,
586586
payload = prepare_payload(locals())
587587
return self.ws.send({'action': 'get_customer', 'payload': payload})
588588

589-
def list_customers(self,
590-
page_id: str = None,
591-
limit: int = None,
592-
sort_order: str = None,
593-
sort_by: str = None,
594-
filters: dict = None,
595-
payload: dict = None) -> RtmResponse:
596-
''' Returns the list of Customers.
597-
598-
Args:
599-
page_id (str): Page ID.
600-
limit (int): Customers limit. Default: 10, maximum: 100.
601-
sort_order (str): Possible values: asc, desc (default). Customers are sorted
602-
by the creation date.
603-
sort_by (str): Possible values: created_at (default), threads_count, visits_count,
604-
agent_last_event or customer_last_event.
605-
filters (dict): Filters object.
606-
payload (dict): Custom payload to be used as request's data.
607-
It overrides all other parameters provided for the method.
608-
609-
Returns:
610-
RtmResponse: RTM response structure (`request_id`, `action`,
611-
`type`, `success` and `payload` properties)
612-
'''
613-
if payload is None:
614-
payload = prepare_payload(locals())
615-
return self.ws.send({'action': 'list_customers', 'payload': payload})
616-
617589
def create_customer(self,
618590
name: str = None,
619591
email: str = None,

livechat/agent/web/api/v36.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -728,41 +728,6 @@ def get_customer(self,
728728
json=payload,
729729
headers=headers)
730730

731-
def list_customers(self,
732-
page_id: str = None,
733-
limit: str = None,
734-
sort_order: str = None,
735-
sort_by: str = None,
736-
filters: dict = None,
737-
payload: dict = None,
738-
headers: dict = None) -> httpx.Response:
739-
''' Returns the list of Customers.
740-
741-
Args:
742-
page_id (str): ID of the page with paginated results.
743-
limit (str): Limit of results per page. Default: 10, maximum: 100.
744-
sort_order (str): Possible values: asc, desc (default).
745-
sort_by (str): When sorting by fields other than created_at, the entries
746-
with identical values will be additionally sorted by their
747-
creation time. Possible values: created_at (default),
748-
threads_count, visits_count, agent_last_event, customer_last_event.
749-
filters (dict): Possible request filters.
750-
payload (dict): Custom payload to be used as request's data.
751-
It overrides all other parameters provided for the method.
752-
headers (dict): Custom headers to be used with session headers.
753-
They will be merged with session-level values that are set,
754-
however, these method-level parameters will not be persisted across requests.
755-
756-
Returns:
757-
httpx.Response: The Response object from `httpx` library,
758-
which contains a server’s response to an HTTP request.
759-
'''
760-
if payload is None:
761-
payload = prepare_payload(locals())
762-
return self.session.post(f'{self.api_url}/list_customers',
763-
json=payload,
764-
headers=headers)
765-
766731
def create_customer(self,
767732
name: str = None,
768733
email: str = None,

0 commit comments

Comments
 (0)