Skip to content

Commit a7d6dfe

Browse files
authored
Merge pull request #165 from livechat/Removed_support_for_create_customer
Support for create_customer method removed in agent-api v3.6 and later
2 parents 9eb6599 + 2d48e84 commit a7d6dfe

File tree

9 files changed

+1
-584
lines changed

9 files changed

+1
-584
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file.
1818

1919
### Removed
2020
- Removed support for billing-api.
21+
- Support for `create_customer` method removed in agent-api v3.6 and later.
2122

2223
## [0.4.1] - 2025-04-23
2324

docs/agent/rtm/api/v36.html

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -651,31 +651,6 @@ <h1 class="title">Module <code>livechat.agent.rtm.api.v36</code></h1>
651651
payload = prepare_payload(locals())
652652
return self.ws.send({&#39;action&#39;: &#39;get_customer&#39;, &#39;payload&#39;: payload})
653653

654-
def create_customer(self,
655-
name: str = None,
656-
email: str = None,
657-
avatar: str = None,
658-
session_fields: list = None,
659-
payload: dict = None) -&gt; RtmResponse:
660-
&#39;&#39;&#39; Creates a new Customer user type.
661-
662-
Args:
663-
name (str): Customer&#39;s name.
664-
email (str): Customer&#39;s email.
665-
avatar (str): URL of the Customer&#39;s avatar.
666-
session_fields (list): An array of custom object-enclosed key:value pairs.
667-
Respects the order of items.
668-
payload (dict): Custom payload to be used as request&#39;s data.
669-
It overrides all other parameters provided for the method.
670-
671-
Returns:
672-
RtmResponse: RTM response structure (`request_id`, `action`,
673-
`type`, `success` and `payload` properties)
674-
&#39;&#39;&#39;
675-
if payload is None:
676-
payload = prepare_payload(locals())
677-
return self.ws.send({&#39;action&#39;: &#39;create_customer&#39;, &#39;payload&#39;: payload})
678-
679654
def update_customer(self,
680655
id: str = None,
681656
name: str = None,
@@ -1709,31 +1684,6 @@ <h2 class="section-title" id="header-classes">Classes</h2>
17091684
payload = prepare_payload(locals())
17101685
return self.ws.send({&#39;action&#39;: &#39;get_customer&#39;, &#39;payload&#39;: payload})
17111686

1712-
def create_customer(self,
1713-
name: str = None,
1714-
email: str = None,
1715-
avatar: str = None,
1716-
session_fields: list = None,
1717-
payload: dict = None) -&gt; RtmResponse:
1718-
&#39;&#39;&#39; Creates a new Customer user type.
1719-
1720-
Args:
1721-
name (str): Customer&#39;s name.
1722-
email (str): Customer&#39;s email.
1723-
avatar (str): URL of the Customer&#39;s avatar.
1724-
session_fields (list): An array of custom object-enclosed key:value pairs.
1725-
Respects the order of items.
1726-
payload (dict): Custom payload to be used as request&#39;s data.
1727-
It overrides all other parameters provided for the method.
1728-
1729-
Returns:
1730-
RtmResponse: RTM response structure (`request_id`, `action`,
1731-
`type`, `success` and `payload` properties)
1732-
&#39;&#39;&#39;
1733-
if payload is None:
1734-
payload = prepare_payload(locals())
1735-
return self.ws.send({&#39;action&#39;: &#39;create_customer&#39;, &#39;payload&#39;: payload})
1736-
17371687
def update_customer(self,
17381688
id: str = None,
17391689
name: str = None,
@@ -2317,62 +2267,6 @@ <h2 id="returns">Returns</h2>
23172267
self.ws.close()</code></pre>
23182268
</details>
23192269
</dd>
2320-
<dt id="livechat.agent.rtm.api.v36.AgentRtmV36.create_customer"><code class="name flex">
2321-
<span>def <span class="ident">create_customer</span></span>(<span>self, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse</span>
2322-
</code></dt>
2323-
<dd>
2324-
<div class="desc"><p>Creates a new Customer user type.</p>
2325-
<h2 id="args">Args</h2>
2326-
<dl>
2327-
<dt><strong><code>name</code></strong> :&ensp;<code>str</code></dt>
2328-
<dd>Customer's name.</dd>
2329-
<dt><strong><code>email</code></strong> :&ensp;<code>str</code></dt>
2330-
<dd>Customer's email.</dd>
2331-
<dt><strong><code>avatar</code></strong> :&ensp;<code>str</code></dt>
2332-
<dd>URL of the Customer's avatar.</dd>
2333-
<dt><strong><code>session_fields</code></strong> :&ensp;<code>list</code></dt>
2334-
<dd>An array of custom object-enclosed key:value pairs.
2335-
Respects the order of items.</dd>
2336-
<dt><strong><code>payload</code></strong> :&ensp;<code>dict</code></dt>
2337-
<dd>Custom payload to be used as request's data.
2338-
It overrides all other parameters provided for the method.</dd>
2339-
</dl>
2340-
<h2 id="returns">Returns</h2>
2341-
<dl>
2342-
<dt><code>RtmResponse</code></dt>
2343-
<dd>RTM response structure (<code>request_id</code>, <code>action</code>,
2344-
<code>type</code>, <code>success</code> and <code>payload</code> properties)</dd>
2345-
</dl></div>
2346-
<details class="source">
2347-
<summary>
2348-
<span>Expand source code</span>
2349-
</summary>
2350-
<pre><code class="python">def create_customer(self,
2351-
name: str = None,
2352-
email: str = None,
2353-
avatar: str = None,
2354-
session_fields: list = None,
2355-
payload: dict = None) -&gt; RtmResponse:
2356-
&#39;&#39;&#39; Creates a new Customer user type.
2357-
2358-
Args:
2359-
name (str): Customer&#39;s name.
2360-
email (str): Customer&#39;s email.
2361-
avatar (str): URL of the Customer&#39;s avatar.
2362-
session_fields (list): An array of custom object-enclosed key:value pairs.
2363-
Respects the order of items.
2364-
payload (dict): Custom payload to be used as request&#39;s data.
2365-
It overrides all other parameters provided for the method.
2366-
2367-
Returns:
2368-
RtmResponse: RTM response structure (`request_id`, `action`,
2369-
`type`, `success` and `payload` properties)
2370-
&#39;&#39;&#39;
2371-
if payload is None:
2372-
payload = prepare_payload(locals())
2373-
return self.ws.send({&#39;action&#39;: &#39;create_customer&#39;, &#39;payload&#39;: payload})</code></pre>
2374-
</details>
2375-
</dd>
23762270
<dt id="livechat.agent.rtm.api.v36.AgentRtmV36.deactivate_chat"><code class="name flex">
23772271
<span>def <span class="ident">deactivate_chat</span></span>(<span>self, id: str = None, ignore_requester_presence: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse</span>
23782272
</code></dt>
@@ -4373,7 +4267,6 @@ <h4><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36" href="#livechat.agen
43734267
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.ban_customer" href="#livechat.agent.rtm.api.v36.AgentRtmV36.ban_customer">ban_customer</a></code></li>
43744268
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.change_push_notifications" href="#livechat.agent.rtm.api.v36.AgentRtmV36.change_push_notifications">change_push_notifications</a></code></li>
43754269
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.close_connection" href="#livechat.agent.rtm.api.v36.AgentRtmV36.close_connection">close_connection</a></code></li>
4376-
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.create_customer" href="#livechat.agent.rtm.api.v36.AgentRtmV36.create_customer">create_customer</a></code></li>
43774270
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.deactivate_chat" href="#livechat.agent.rtm.api.v36.AgentRtmV36.deactivate_chat">deactivate_chat</a></code></li>
43784271
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.delete_chat_properties" href="#livechat.agent.rtm.api.v36.AgentRtmV36.delete_chat_properties">delete_chat_properties</a></code></li>
43794272
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.delete_event_properties" href="#livechat.agent.rtm.api.v36.AgentRtmV36.delete_event_properties">delete_event_properties</a></code></li>

docs/agent/rtm/api/v37.html

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -651,31 +651,6 @@ <h1 class="title">Module <code>livechat.agent.rtm.api.v37</code></h1>
651651
payload = prepare_payload(locals())
652652
return self.ws.send({&#39;action&#39;: &#39;get_customer&#39;, &#39;payload&#39;: payload})
653653

654-
def create_customer(self,
655-
name: str = None,
656-
email: str = None,
657-
avatar: str = None,
658-
session_fields: list = None,
659-
payload: dict = None) -&gt; RtmResponse:
660-
&#39;&#39;&#39; Creates a new Customer user type.
661-
662-
Args:
663-
name (str): Customer&#39;s name.
664-
email (str): Customer&#39;s email.
665-
avatar (str): URL of the Customer&#39;s avatar.
666-
session_fields (list): An array of custom object-enclosed key:value pairs.
667-
Respects the order of items.
668-
payload (dict): Custom payload to be used as request&#39;s data.
669-
It overrides all other parameters provided for the method.
670-
671-
Returns:
672-
RtmResponse: RTM response structure (`request_id`, `action`,
673-
`type`, `success` and `payload` properties)
674-
&#39;&#39;&#39;
675-
if payload is None:
676-
payload = prepare_payload(locals())
677-
return self.ws.send({&#39;action&#39;: &#39;create_customer&#39;, &#39;payload&#39;: payload})
678-
679654
def update_customer(self,
680655
id: str = None,
681656
name: str = None,
@@ -1709,31 +1684,6 @@ <h2 class="section-title" id="header-classes">Classes</h2>
17091684
payload = prepare_payload(locals())
17101685
return self.ws.send({&#39;action&#39;: &#39;get_customer&#39;, &#39;payload&#39;: payload})
17111686

1712-
def create_customer(self,
1713-
name: str = None,
1714-
email: str = None,
1715-
avatar: str = None,
1716-
session_fields: list = None,
1717-
payload: dict = None) -&gt; RtmResponse:
1718-
&#39;&#39;&#39; Creates a new Customer user type.
1719-
1720-
Args:
1721-
name (str): Customer&#39;s name.
1722-
email (str): Customer&#39;s email.
1723-
avatar (str): URL of the Customer&#39;s avatar.
1724-
session_fields (list): An array of custom object-enclosed key:value pairs.
1725-
Respects the order of items.
1726-
payload (dict): Custom payload to be used as request&#39;s data.
1727-
It overrides all other parameters provided for the method.
1728-
1729-
Returns:
1730-
RtmResponse: RTM response structure (`request_id`, `action`,
1731-
`type`, `success` and `payload` properties)
1732-
&#39;&#39;&#39;
1733-
if payload is None:
1734-
payload = prepare_payload(locals())
1735-
return self.ws.send({&#39;action&#39;: &#39;create_customer&#39;, &#39;payload&#39;: payload})
1736-
17371687
def update_customer(self,
17381688
id: str = None,
17391689
name: str = None,
@@ -2317,62 +2267,6 @@ <h2 id="returns">Returns</h2>
23172267
self.ws.close()</code></pre>
23182268
</details>
23192269
</dd>
2320-
<dt id="livechat.agent.rtm.api.v37.AgentRtmV37.create_customer"><code class="name flex">
2321-
<span>def <span class="ident">create_customer</span></span>(<span>self, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse</span>
2322-
</code></dt>
2323-
<dd>
2324-
<div class="desc"><p>Creates a new Customer user type.</p>
2325-
<h2 id="args">Args</h2>
2326-
<dl>
2327-
<dt><strong><code>name</code></strong> :&ensp;<code>str</code></dt>
2328-
<dd>Customer's name.</dd>
2329-
<dt><strong><code>email</code></strong> :&ensp;<code>str</code></dt>
2330-
<dd>Customer's email.</dd>
2331-
<dt><strong><code>avatar</code></strong> :&ensp;<code>str</code></dt>
2332-
<dd>URL of the Customer's avatar.</dd>
2333-
<dt><strong><code>session_fields</code></strong> :&ensp;<code>list</code></dt>
2334-
<dd>An array of custom object-enclosed key:value pairs.
2335-
Respects the order of items.</dd>
2336-
<dt><strong><code>payload</code></strong> :&ensp;<code>dict</code></dt>
2337-
<dd>Custom payload to be used as request's data.
2338-
It overrides all other parameters provided for the method.</dd>
2339-
</dl>
2340-
<h2 id="returns">Returns</h2>
2341-
<dl>
2342-
<dt><code>RtmResponse</code></dt>
2343-
<dd>RTM response structure (<code>request_id</code>, <code>action</code>,
2344-
<code>type</code>, <code>success</code> and <code>payload</code> properties)</dd>
2345-
</dl></div>
2346-
<details class="source">
2347-
<summary>
2348-
<span>Expand source code</span>
2349-
</summary>
2350-
<pre><code class="python">def create_customer(self,
2351-
name: str = None,
2352-
email: str = None,
2353-
avatar: str = None,
2354-
session_fields: list = None,
2355-
payload: dict = None) -&gt; RtmResponse:
2356-
&#39;&#39;&#39; Creates a new Customer user type.
2357-
2358-
Args:
2359-
name (str): Customer&#39;s name.
2360-
email (str): Customer&#39;s email.
2361-
avatar (str): URL of the Customer&#39;s avatar.
2362-
session_fields (list): An array of custom object-enclosed key:value pairs.
2363-
Respects the order of items.
2364-
payload (dict): Custom payload to be used as request&#39;s data.
2365-
It overrides all other parameters provided for the method.
2366-
2367-
Returns:
2368-
RtmResponse: RTM response structure (`request_id`, `action`,
2369-
`type`, `success` and `payload` properties)
2370-
&#39;&#39;&#39;
2371-
if payload is None:
2372-
payload = prepare_payload(locals())
2373-
return self.ws.send({&#39;action&#39;: &#39;create_customer&#39;, &#39;payload&#39;: payload})</code></pre>
2374-
</details>
2375-
</dd>
23762270
<dt id="livechat.agent.rtm.api.v37.AgentRtmV37.deactivate_chat"><code class="name flex">
23772271
<span>def <span class="ident">deactivate_chat</span></span>(<span>self, id: str = None, ignore_requester_presence: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse</span>
23782272
</code></dt>
@@ -4373,7 +4267,6 @@ <h4><code><a title="livechat.agent.rtm.api.v37.AgentRtmV37" href="#livechat.agen
43734267
<li><code><a title="livechat.agent.rtm.api.v37.AgentRtmV37.ban_customer" href="#livechat.agent.rtm.api.v37.AgentRtmV37.ban_customer">ban_customer</a></code></li>
43744268
<li><code><a title="livechat.agent.rtm.api.v37.AgentRtmV37.change_push_notifications" href="#livechat.agent.rtm.api.v37.AgentRtmV37.change_push_notifications">change_push_notifications</a></code></li>
43754269
<li><code><a title="livechat.agent.rtm.api.v37.AgentRtmV37.close_connection" href="#livechat.agent.rtm.api.v37.AgentRtmV37.close_connection">close_connection</a></code></li>
4376-
<li><code><a title="livechat.agent.rtm.api.v37.AgentRtmV37.create_customer" href="#livechat.agent.rtm.api.v37.AgentRtmV37.create_customer">create_customer</a></code></li>
43774270
<li><code><a title="livechat.agent.rtm.api.v37.AgentRtmV37.deactivate_chat" href="#livechat.agent.rtm.api.v37.AgentRtmV37.deactivate_chat">deactivate_chat</a></code></li>
43784271
<li><code><a title="livechat.agent.rtm.api.v37.AgentRtmV37.delete_chat_properties" href="#livechat.agent.rtm.api.v37.AgentRtmV37.delete_chat_properties">delete_chat_properties</a></code></li>
43794272
<li><code><a title="livechat.agent.rtm.api.v37.AgentRtmV37.delete_event_properties" href="#livechat.agent.rtm.api.v37.AgentRtmV37.delete_event_properties">delete_event_properties</a></code></li>

0 commit comments

Comments
 (0)