Skip to content
Draft
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ Class | Method | HTTP request | Description
*CallsApi* | [**hold_channel**](docs/CallsApi.md#hold_channel) | **POST** /calls/{callId}/channels/{channelId}/_hold | Hold channel
*CallsApi* | [**merge**](docs/CallsApi.md#merge) | **POST** /calls/{callId}/_merge | Merge two calls
*CallsApi* | [**mute_channel**](docs/CallsApi.md#mute_channel) | **POST** /calls/{callId}/channels/{channelId}/_mute | Mute channel
*CallsApi* | [**request_callback**](docs/CallsApi.md#request_callback) | **POST** /calls/{callId}/_request_callback | Requests callback on the call
*CallsApi* | [**stop_ring**](docs/CallsApi.md#stop_ring) | **POST** /calls/{callId}/_stopRing | Stop ringing of call
*CallsApi* | [**unhold_channel**](docs/CallsApi.md#unhold_channel) | **POST** /calls/{callId}/channels/{channelId}/_unhold | Unhold channel
*CallsApi* | [**unmute_channel**](docs/CallsApi.md#unmute_channel) | **POST** /calls/{callId}/channels/{channelId}/_unmute | Unmute channel
Expand Down Expand Up @@ -249,6 +250,7 @@ Class | Method | HTTP request | Description
*PhonesApi* | [**remove_phone**](docs/PhonesApi.md#remove_phone) | **DELETE** /phones/{phoneId} | Remove phone
*PhonesApi* | [**update_phone**](docs/PhonesApi.md#update_phone) | **PUT** /phones/{phoneId} | Update phone
*PhonesApi* | [**update_phone_params**](docs/PhonesApi.md#update_phone_params) | **PUT** /phones/{phoneId}/_updateParams | Update phone params
*PhonesApi* | [**update_reg_status**](docs/PhonesApi.md#update_reg_status) | **PUT** /phones/{phoneId}/_updateRegStatus | Update registration status
*PingApi* | [**ping**](docs/PingApi.md#ping) | **GET** /ping | Check that API is responding
*PredefinedAnswersApi* | [**create_predefined_answer**](docs/PredefinedAnswersApi.md#create_predefined_answer) | **POST** /predefined_answers | Create predefined answer
*PredefinedAnswersApi* | [**delete_predefined_answer**](docs/PredefinedAnswersApi.md#delete_predefined_answer) | **DELETE** /predefined_answers/{predefinedAnswerId} | Predefined answer
Expand Down
56 changes: 56 additions & 0 deletions docs/CallsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Method | HTTP request | Description
[**hold_channel**](CallsApi.md#hold_channel) | **POST** /calls/{callId}/channels/{channelId}/_hold | Hold channel
[**merge**](CallsApi.md#merge) | **POST** /calls/{callId}/_merge | Merge two calls
[**mute_channel**](CallsApi.md#mute_channel) | **POST** /calls/{callId}/channels/{channelId}/_mute | Mute channel
[**request_callback**](CallsApi.md#request_callback) | **POST** /calls/{callId}/_request_callback | Requests callback on the call
[**stop_ring**](CallsApi.md#stop_ring) | **POST** /calls/{callId}/_stopRing | Stop ringing of call
[**unhold_channel**](CallsApi.md#unhold_channel) | **POST** /calls/{callId}/channels/{channelId}/_unhold | Unhold channel
[**unmute_channel**](CallsApi.md#unmute_channel) | **POST** /calls/{callId}/channels/{channelId}/_unmute | Unmute channel
Expand Down Expand Up @@ -1559,6 +1560,61 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **request_callback**
> OkResponse request_callback(call_id)

Requests callback on the call

### Example
```python
from __future__ import print_function
import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: apikey
configuration = liveagent_api.Configuration()
configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'
# Configure OAuth2 access token for authorization: privileges
configuration = liveagent_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = liveagent_api.CallsApi(liveagent_api.ApiClient(configuration))
call_id = 'call_id_example' # str |

try:
# Requests callback on the call
api_response = api_instance.request_callback(call_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CallsApi->request_callback: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**call_id** | **str**| |

### Return type

[**OkResponse**](OkResponse.md)

### Authorization

[apikey](../README.md#apikey), [privileges](../README.md#privileges)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **stop_ring**
> OkResponse stop_ring(call_id)

Expand Down
2 changes: 1 addition & 1 deletion docs/MessageGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Name | Type | Description | Notes
**parent_id** | **str** | | [optional]
**userid** | **str** | | [optional]
**user_full_name** | **str** | | [optional]
**type** | **str** | M - OFFLINE_LEGACY C - CHAT P - CALL V - OUTGOING_CALL 1 - INTERNAL_CALL I - INTERNAL U - INTERNAL_OFFLINE Z - INTERNAL_COLLAPSED S - STARTINFO T - TRANSFER R - RESOLVE J - POSTPONE X - DELETE B - SPAM G - TAG F - FACEBOOK W - TWITTER Y - RETWEET A - KNOWLEDGEBASE_START K - KNOWLEDGEBASE O - FORWARD Q - FORWARD_REPLY L - SPLITTED 2 - MERGED 3 - INCOMING_EMAIL 4 - OUTGOING_EMAIL 5 - OFFLINE | [optional]
**type** | **str** | M - OFFLINE_LEGACY C - CHAT P - CALL V - OUTGOING_CALL 1 - INTERNAL_CALL I - INTERNAL U - INTERNAL_OFFLINE Z - INTERNAL_COLLAPSED S - STARTINFO T - TRANSFER R - RESOLVE J - POSTPONE X - DELETE B - SPAM G - TAG F - FACEBOOK W - TWITTER Y - RETWEET A - KNOWLEDGEBASE_START K - KNOWLEDGEBASE O - FORWARD Q - FORWARD_REPLY L - SPLITTED 2 - MERGED 3 - INCOMING_EMAIL 4 - OUTGOING_EMAIL 5 - OFFLINE 6 - TYPE_WHATSAPP 7 - TYPE_RECEIVED_ANSWER | [optional]
**status** | **str** | D - DELETED P - PROMOTED V - VISIBLE S - SPLITTED M - MERGED I - INITIALIZING R - CONNECTING C - CALLING | [optional]
**datecreated** | **datetime** | | [optional]
**datefinished** | **datetime** | | [optional]
Expand Down
58 changes: 58 additions & 0 deletions docs/PhonesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Method | HTTP request | Description
[**remove_phone**](PhonesApi.md#remove_phone) | **DELETE** /phones/{phoneId} | Remove phone
[**update_phone**](PhonesApi.md#update_phone) | **PUT** /phones/{phoneId} | Update phone
[**update_phone_params**](PhonesApi.md#update_phone_params) | **PUT** /phones/{phoneId}/_updateParams | Update phone params
[**update_reg_status**](PhonesApi.md#update_reg_status) | **PUT** /phones/{phoneId}/_updateRegStatus | Update registration status


# **create_phone**
Expand Down Expand Up @@ -374,3 +375,60 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **update_reg_status**
> OkResponse update_reg_status(phone_id, reg_status)

Update registration status

### Example
```python
from __future__ import print_function
import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: apikey
configuration = liveagent_api.Configuration()
configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'
# Configure OAuth2 access token for authorization: privileges
configuration = liveagent_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = liveagent_api.PhonesApi(liveagent_api.ApiClient(configuration))
phone_id = 'phone_id_example' # str |
reg_status = 'reg_status_example' # str | F - Phone is not registered (offline). N - Phone is registered (online).

try:
# Update registration status
api_response = api_instance.update_reg_status(phone_id, reg_status)
pprint(api_response)
except ApiException as e:
print("Exception when calling PhonesApi->update_reg_status: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**phone_id** | **str**| |
**reg_status** | **str**| F - Phone is not registered (offline). N - Phone is registered (online). |

### Return type

[**OkResponse**](OkResponse.md)

### Authorization

[apikey](../README.md#apikey), [privileges](../README.md#privileges)

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

97 changes: 97 additions & 0 deletions liveagent_api/api/calls_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2783,6 +2783,103 @@ def mute_channel_with_http_info(self, call_id, channel_id, **kwargs): # noqa: E
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def request_callback(self, call_id, **kwargs): # noqa: E501
"""Requests callback on the call # noqa: E501

This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.request_callback(call_id, async_req=True)
>>> result = thread.get()

:param async_req bool
:param str call_id: (required)
:return: OkResponse
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.request_callback_with_http_info(call_id, **kwargs) # noqa: E501
else:
(data) = self.request_callback_with_http_info(call_id, **kwargs) # noqa: E501
return data

def request_callback_with_http_info(self, call_id, **kwargs): # noqa: E501
"""Requests callback on the call # noqa: E501

This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.request_callback_with_http_info(call_id, async_req=True)
>>> result = thread.get()

:param async_req bool
:param str call_id: (required)
:return: OkResponse
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['call_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method request_callback" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'call_id' is set
if ('call_id' not in params or
params['call_id'] is None):
raise ValueError("Missing the required parameter `call_id` when calling `request_callback`") # noqa: E501

collection_formats = {}

path_params = {}
if 'call_id' in params:
path_params['callId'] = params['call_id'] # noqa: E501

query_params = []

header_params = {}

form_params = []
local_var_files = {}

body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501

# Authentication setting
auth_settings = ['apikey', 'privileges'] # noqa: E501

return self.api_client.call_api(
'/calls/{callId}/_request_callback', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='OkResponse', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def stop_ring(self, call_id, **kwargs): # noqa: E501
"""Stop ringing of call # noqa: E501

Expand Down
105 changes: 105 additions & 0 deletions liveagent_api/api/phones_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,3 +678,108 @@ def update_phone_params_with_http_info(self, phone_id, params, **kwargs): # noq
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def update_reg_status(self, phone_id, reg_status, **kwargs): # noqa: E501
"""Update registration status # noqa: E501

This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_reg_status(phone_id, reg_status, async_req=True)
>>> result = thread.get()

:param async_req bool
:param str phone_id: (required)
:param str reg_status: F - Phone is not registered (offline). N - Phone is registered (online). (required)
:return: OkResponse
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_reg_status_with_http_info(phone_id, reg_status, **kwargs) # noqa: E501
else:
(data) = self.update_reg_status_with_http_info(phone_id, reg_status, **kwargs) # noqa: E501
return data

def update_reg_status_with_http_info(self, phone_id, reg_status, **kwargs): # noqa: E501
"""Update registration status # noqa: E501

This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_reg_status_with_http_info(phone_id, reg_status, async_req=True)
>>> result = thread.get()

:param async_req bool
:param str phone_id: (required)
:param str reg_status: F - Phone is not registered (offline). N - Phone is registered (online). (required)
:return: OkResponse
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['phone_id', 'reg_status'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_reg_status" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'phone_id' is set
if ('phone_id' not in params or
params['phone_id'] is None):
raise ValueError("Missing the required parameter `phone_id` when calling `update_reg_status`") # noqa: E501
# verify the required parameter 'reg_status' is set
if ('reg_status' not in params or
params['reg_status'] is None):
raise ValueError("Missing the required parameter `reg_status` when calling `update_reg_status`") # noqa: E501

collection_formats = {}

path_params = {}
if 'phone_id' in params:
path_params['phoneId'] = params['phone_id'] # noqa: E501

query_params = []
if 'reg_status' in params:
query_params.append(('reg_status', params['reg_status'])) # noqa: E501

header_params = {}

form_params = []
local_var_files = {}

body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/x-www-form-urlencoded']) # noqa: E501

# Authentication setting
auth_settings = ['apikey', 'privileges'] # noqa: E501

return self.api_client.call_api(
'/phones/{phoneId}/_updateRegStatus', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='OkResponse', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
Loading