diff --git a/README.md b/README.md index 2be4c91..c50ffb6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This Python package is automatically generated by the [Swagger Codegen](https:// - API version: 3.0.0 - Package version: 1.0.0 -- Build date: 2017-11-29T13:18:25.520+01:00 +- Build date: 2017-12-07T11:31:06.863+01:00 - Build package: class io.swagger.codegen.languages.PythonClientCodegen ## Requirements. @@ -103,14 +103,17 @@ Class | Method | HTTP request | Description *CallsApi* | [**call_answer**](docs/CallsApi.md#call_answer) | **POST** /calls/{callId}/_answer | Set call as answered by agent *CallsApi* | [**call_change_channel_status**](docs/CallsApi.md#call_change_channel_status) | **PUT** /calls/{callId}/channels/{channelId}/_status | Change channel status *CallsApi* | [**call_create**](docs/CallsApi.md#call_create) | **POST** /calls/{callId} | Create new call +*CallsApi* | [**call_fetch_ivr**](docs/CallsApi.md#call_fetch_ivr) | **POST** /calls/{callId}/_fetchIvr | Fetches IVR for the call from external URL *CallsApi* | [**call_get_status**](docs/CallsApi.md#call_get_status) | **GET** /calls/{callId}/status | Return the status of call *CallsApi* | [**call_move_channel**](docs/CallsApi.md#call_move_channel) | **POST** /calls/{callId}/channels/{channelId}/_move | Moves existing channel to target call *CallsApi* | [**call_remove_channel**](docs/CallsApi.md#call_remove_channel) | **DELETE** /calls/{callId}/channels/{channelId} | Removes channel from the call *CallsApi* | [**call_reroute**](docs/CallsApi.md#call_reroute) | **POST** /calls/{callId}/_reroute | Let the call ring to another agent *CallsApi* | [**call_ring**](docs/CallsApi.md#call_ring) | **POST** /calls/{callId}/_ring | Let the call ring *CallsApi* | [**call_start**](docs/CallsApi.md#call_start) | **POST** /call/_start | Starts new outcoming / internal call +*CallsApi* | [**call_start_canceled**](docs/CallsApi.md#call_start_canceled) | **POST** /call/_startCanceled | Callback that starting call canceled *CallsApi* | [**call_start_failed**](docs/CallsApi.md#call_start_failed) | **POST** /call/_startFailed | Callback that starting call failed *CallsApi* | [**call_stop**](docs/CallsApi.md#call_stop) | **POST** /calls/{callId}/_stop | Stops the call +*CallsApi* | [**call_transfer**](docs/CallsApi.md#call_transfer) | **POST** /calls/{callId}/_transfer | Transfers call to different department / agent *CallsApi* | [**confirm_ring**](docs/CallsApi.md#confirm_ring) | **POST** /calls/{callId}/_confirmRing | Confirm that call is ringing *CallsApi* | [**get_calls_list**](docs/CallsApi.md#get_calls_list) | **GET** /calls | Gets list of calls *CallsApi* | [**merge**](docs/CallsApi.md#merge) | **POST** /calls/{callId}/_merge | Merge two calls @@ -189,6 +192,7 @@ Class | Method | HTTP request | Description *TagsApi* | [**get_tag_by_id**](docs/TagsApi.md#get_tag_by_id) | **GET** /tags/{tagId} | Get tag by tag id *TagsApi* | [**get_tags_list**](docs/TagsApi.md#get_tags_list) | **GET** /tags | Gets list of tags *TagsApi* | [**update_tag**](docs/TagsApi.md#update_tag) | **PUT** /tags/{tagId} | Update tag +*TicketsApi* | [**create_ticket**](docs/TicketsApi.md#create_ticket) | **POST** /tickets | Create ticket *TicketsApi* | [**delete_ticket**](docs/TicketsApi.md#delete_ticket) | **DELETE** /tickets/{ticketId} | Deletes ticket *TicketsApi* | [**get_ticket**](docs/TicketsApi.md#get_ticket) | **GET** /tickets/{ticketId} | Gets ticket *TicketsApi* | [**get_ticket_attribute**](docs/TicketsApi.md#get_ticket_attribute) | **GET** /tickets/{ticketId}/attributes/{attributeName} | Gets ticket attribute @@ -221,6 +225,7 @@ Class | Method | HTTP request | Description - [CallListItem](docs/CallListItem.md) - [CallMessage](docs/CallMessage.md) - [CallStatus](docs/CallStatus.md) + - [CallTransferResult](docs/CallTransferResult.md) - [CannedMessage](docs/CannedMessage.md) - [Company](docs/Company.md) - [CompanyListItem](docs/CompanyListItem.md) @@ -239,8 +244,11 @@ Class | Method | HTTP request | Description - [HostingInfo](docs/HostingInfo.md) - [Invoice](docs/Invoice.md) - [InvoiceItem](docs/InvoiceItem.md) + - [InvoiceList](docs/InvoiceList.md) - [Ivr](docs/Ivr.md) - [IvrChoice](docs/IvrChoice.md) + - [IvrFetch](docs/IvrFetch.md) + - [IvrFetchParam](docs/IvrFetchParam.md) - [IvrStep](docs/IvrStep.md) - [OkResponse](docs/OkResponse.md) - [PaymentInfo](docs/PaymentInfo.md) @@ -258,6 +266,8 @@ Class | Method | HTTP request | Description - [Tag](docs/Tag.md) - [Ticket](docs/Ticket.md) - [TicketAttribute](docs/TicketAttribute.md) + - [TicketInformation](docs/TicketInformation.md) + - [TicketListItem](docs/TicketListItem.md) - [TicketPostpone](docs/TicketPostpone.md) - [TicketSla](docs/TicketSla.md) - [TicketUpdatable](docs/TicketUpdatable.md) diff --git a/docs/CallTransferResult.md b/docs/CallTransferResult.md new file mode 100644 index 0000000..e5a6860 --- /dev/null +++ b/docs/CallTransferResult.md @@ -0,0 +1,10 @@ +# CallTransferResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callee_status** | **str** | O - online, F - offline | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CallsApi.md b/docs/CallsApi.md index 69f7849..40ea3a4 100644 --- a/docs/CallsApi.md +++ b/docs/CallsApi.md @@ -9,14 +9,17 @@ Method | HTTP request | Description [**call_answer**](CallsApi.md#call_answer) | **POST** /calls/{callId}/_answer | Set call as answered by agent [**call_change_channel_status**](CallsApi.md#call_change_channel_status) | **PUT** /calls/{callId}/channels/{channelId}/_status | Change channel status [**call_create**](CallsApi.md#call_create) | **POST** /calls/{callId} | Create new call +[**call_fetch_ivr**](CallsApi.md#call_fetch_ivr) | **POST** /calls/{callId}/_fetchIvr | Fetches IVR for the call from external URL [**call_get_status**](CallsApi.md#call_get_status) | **GET** /calls/{callId}/status | Return the status of call [**call_move_channel**](CallsApi.md#call_move_channel) | **POST** /calls/{callId}/channels/{channelId}/_move | Moves existing channel to target call [**call_remove_channel**](CallsApi.md#call_remove_channel) | **DELETE** /calls/{callId}/channels/{channelId} | Removes channel from the call [**call_reroute**](CallsApi.md#call_reroute) | **POST** /calls/{callId}/_reroute | Let the call ring to another agent [**call_ring**](CallsApi.md#call_ring) | **POST** /calls/{callId}/_ring | Let the call ring [**call_start**](CallsApi.md#call_start) | **POST** /call/_start | Starts new outcoming / internal call +[**call_start_canceled**](CallsApi.md#call_start_canceled) | **POST** /call/_startCanceled | Callback that starting call canceled [**call_start_failed**](CallsApi.md#call_start_failed) | **POST** /call/_startFailed | Callback that starting call failed [**call_stop**](CallsApi.md#call_stop) | **POST** /calls/{callId}/_stop | Stops the call +[**call_transfer**](CallsApi.md#call_transfer) | **POST** /calls/{callId}/_transfer | Transfers call to different department / agent [**confirm_ring**](CallsApi.md#confirm_ring) | **POST** /calls/{callId}/_confirmRing | Confirm that call is ringing [**get_calls_list**](CallsApi.md#get_calls_list) | **GET** /calls | Gets list of calls [**merge**](CallsApi.md#merge) | **POST** /calls/{callId}/_merge | Merge two calls @@ -304,6 +307,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) +# **call_fetch_ivr** +> list[Ivr] call_fetch_ivr(call_id, fetch) + +Fetches IVR for the call from external URL + +### Example +```python +import time +import liveagent_api +from liveagent_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: privileges +liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN' +# Configure API key authorization: apikey +liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed +# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER' + +# create an instance of the API class +api_instance = liveagent_api.CallsApi() +call_id = 'call_id_example' # str | +fetch = liveagent_api.IvrFetch() # IvrFetch | + +try: + # Fetches IVR for the call from external URL + api_response = api_instance.call_fetch_ivr(call_id, fetch) + pprint(api_response) +except ApiException as e: + print "Exception when calling CallsApi->call_fetch_ivr: %s\n" % e +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **call_id** | **str**| | + **fetch** | [**IvrFetch**](IvrFetch.md)| | + +### Return type + +[**list[Ivr]**](Ivr.md) + +### Authorization + +[privileges](../README.md#privileges), [apikey](../README.md#apikey) + +### 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) + # **call_get_status** > CallStatus call_get_status(call_id) @@ -573,7 +630,7 @@ 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) # **call_start** -> OkResponse call_start(to_number, from_number, ticket_id=ticket_id) +> OkResponse call_start(to_number, from_number, via_number, ticket_id) Starts new outcoming / internal call @@ -593,11 +650,12 @@ liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = liveagent_api.CallsApi() to_number = 'to_number_example' # str | callee number from_number = 'from_number_example' # str | caller number -ticket_id = 'ticket_id_example' # str | ticket id or code (optional) +via_number = 'via_number_example' # str | trunk number via which call was made +ticket_id = 'ticket_id_example' # str | ticket id or code try: # Starts new outcoming / internal call - api_response = api_instance.call_start(to_number, from_number, ticket_id=ticket_id) + api_response = api_instance.call_start(to_number, from_number, via_number, ticket_id) pprint(api_response) except ApiException as e: print "Exception when calling CallsApi->call_start: %s\n" % e @@ -609,7 +667,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **to_number** | **str**| callee number | **from_number** | **str**| caller number | - **ticket_id** | **str**| ticket id or code | [optional] + **via_number** | **str**| trunk number via which call was made | + **ticket_id** | **str**| ticket id or code | ### Return type @@ -626,12 +685,62 @@ 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) +# **call_start_canceled** +> OkResponse call_start_canceled(call_id) + +Callback that starting call canceled + +Callback is delivered only of HW phones + +### Example +```python +import time +import liveagent_api +from liveagent_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: privileges +liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = liveagent_api.CallsApi() +call_id = 'call_id_example' # str | Call ID + +try: + # Callback that starting call canceled + api_response = api_instance.call_start_canceled(call_id) + pprint(api_response) +except ApiException as e: + print "Exception when calling CallsApi->call_start_canceled: %s\n" % e +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **call_id** | **str**| Call ID | + +### Return type + +[**OkResponse**](OkResponse.md) + +### Authorization + +[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) + # **call_start_failed** > OkResponse call_start_failed(call_id) Callback that starting call failed -Callback is delivered only of HW phones\n +Callback is delivered only of HW phones ### Example ```python @@ -645,7 +754,7 @@ liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = liveagent_api.CallsApi() -call_id = 'call_id_example' # str | Call ID. +call_id = 'call_id_example' # str | Call ID try: # Callback that starting call failed @@ -659,7 +768,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **call_id** | **str**| Call ID. | + **call_id** | **str**| Call ID | ### Return type @@ -730,6 +839,62 @@ 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) +# **call_transfer** +> CallTransferResult call_transfer(call_id, to=to) + +Transfers call to different department / agent + +Transfer can be called on incoming calls before they start ringing to agents + +### Example +```python +import time +import liveagent_api +from liveagent_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: privileges +liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN' +# Configure API key authorization: apikey +liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed +# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER' + +# create an instance of the API class +api_instance = liveagent_api.CallsApi() +call_id = 'call_id_example' # str | +to = 'to_example' # str | Department ID or extension (optional) + +try: + # Transfers call to different department / agent + api_response = api_instance.call_transfer(call_id, to=to) + pprint(api_response) +except ApiException as e: + print "Exception when calling CallsApi->call_transfer: %s\n" % e +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **call_id** | **str**| | + **to** | **str**| Department ID or extension | [optional] + +### Return type + +[**CallTransferResult**](CallTransferResult.md) + +### Authorization + +[privileges](../README.md#privileges), [apikey](../README.md#apikey) + +### 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) + # **confirm_ring** > OkResponse confirm_ring(call_id, to_number=to_number, channel_id=channel_id) diff --git a/docs/InvoiceList.md b/docs/InvoiceList.md new file mode 100644 index 0000000..d00f562 --- /dev/null +++ b/docs/InvoiceList.md @@ -0,0 +1,11 @@ +# InvoiceList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**size** | **int** | | [optional] +**items** | [**list[Invoice]**](Invoice.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IvrFetch.md b/docs/IvrFetch.md new file mode 100644 index 0000000..6730a63 --- /dev/null +++ b/docs/IvrFetch.md @@ -0,0 +1,14 @@ +# IvrFetch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | +**prefix** | **str** | | [optional] +**on_error** | **str** | | [optional] +**params** | [**list[IvrFetchParam]**](IvrFetchParam.md) | | [optional] +**ivrs** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IvrFetchParam.md b/docs/IvrFetchParam.md new file mode 100644 index 0000000..313f2e6 --- /dev/null +++ b/docs/IvrFetchParam.md @@ -0,0 +1,11 @@ +# IvrFetchParam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**value** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IvrStep.md b/docs/IvrStep.md index 19b8491..482b851 100644 --- a/docs/IvrStep.md +++ b/docs/IvrStep.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | P - play message (URL in params), R - ring to agent (optional departmentId in params), V - redirect to voicemail, D - choice (message URL in params, choices) G - goto (IVR name in params) | +**type** | **str** | P - play message (URL in params), R - ring to agent (optional departmentId in params), V - redirect to voicemail, D - choice (choices), G - goto (IVR name in params), T - transfer (optional ivr settings in choices {\"1\":\"online\",\"0\":\"offline\",\"9\":\"queue\"}), F - fetch next IVR steps from URL in params | **params** | **str** | | [optional] **choices** | [**list[IvrChoice]**](IvrChoice.md) | | [optional] diff --git a/docs/PhoneNumber.md b/docs/PhoneNumber.md index 32ac8e5..a1c65a0 100644 --- a/docs/PhoneNumber.md +++ b/docs/PhoneNumber.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **id** | **str** | | **type** | **str** | A - API controlled number, T - Twilio number, T-O - Twilio outgoing number, D - Digitale, S - Asterisk | [optional] **dial_out_prefix** | **int** | Prefix needed to orifinate call using this number | [optional] +**record_call** | **bool** | | [optional] **number** | **str** | | **name** | **str** | | [optional] **departmentid** | **str** | | [optional] diff --git a/docs/PhonenumbersApi.md b/docs/PhonenumbersApi.md index 0b69a66..e32b924 100644 --- a/docs/PhonenumbersApi.md +++ b/docs/PhonenumbersApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **add_number** -> PhoneNumber add_number(type, number, status, dial_out_prefix=dial_out_prefix, name=name, departmentid=departmentid, host_settings=host_settings, host=host, port=port, user=user, password=password, providerid=providerid, ivr=ivr) +> PhoneNumber add_number(type, number, status, dial_out_prefix=dial_out_prefix, record_call=record_call, name=name, departmentid=departmentid, host_settings=host_settings, host=host, port=port, user=user, password=password, providerid=providerid, ivr=ivr) Add new number @@ -36,7 +36,8 @@ api_instance = liveagent_api.PhonenumbersApi() type = 'type_example' # str | A - API controlled number, T - Twilio number, T-O - Twilio outgoing number, D - Digitale, S - Asterisk number = 'number_example' # str | status = 'status_example' # str | A - Active, I - Inactive -dial_out_prefix = 56 # int | Prefix needed to orifinate call using this number (optional) +dial_out_prefix = 56 # int | Prefix needed to originate call using this number (optional) +record_call = true # bool | (optional) name = 'name_example' # str | (optional) departmentid = 'departmentid_example' # str | (optional) host_settings = 'host_settings_example' # str | json encoded host settings (optional) @@ -49,7 +50,7 @@ ivr = 'ivr_example' # str | (optional) try: # Add new number - api_response = api_instance.add_number(type, number, status, dial_out_prefix=dial_out_prefix, name=name, departmentid=departmentid, host_settings=host_settings, host=host, port=port, user=user, password=password, providerid=providerid, ivr=ivr) + api_response = api_instance.add_number(type, number, status, dial_out_prefix=dial_out_prefix, record_call=record_call, name=name, departmentid=departmentid, host_settings=host_settings, host=host, port=port, user=user, password=password, providerid=providerid, ivr=ivr) pprint(api_response) except ApiException as e: print "Exception when calling PhonenumbersApi->add_number: %s\n" % e @@ -62,7 +63,8 @@ Name | Type | Description | Notes **type** | **str**| A - API controlled number, T - Twilio number, T-O - Twilio outgoing number, D - Digitale, S - Asterisk | **number** | **str**| | **status** | **str**| A - Active, I - Inactive | - **dial_out_prefix** | **int**| Prefix needed to orifinate call using this number | [optional] + **dial_out_prefix** | **int**| Prefix needed to originate call using this number | [optional] + **record_call** | **bool**| | [optional] **name** | **str**| | [optional] **departmentid** | **str**| | [optional] **host_settings** | **str**| json encoded host settings | [optional] diff --git a/docs/SubscriptionsApi.md b/docs/SubscriptionsApi.md index d004949..95712dd 100644 --- a/docs/SubscriptionsApi.md +++ b/docs/SubscriptionsApi.md @@ -685,7 +685,7 @@ 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) # **get_subscription_invoices** -> list[Invoice] get_subscription_invoices(subscription_id, page=page, per_page=per_page, sort_dir=sort_dir, sort_field=sort_field, filters=filters, _from=_from, to=to) +> InvoiceList get_subscription_invoices(subscription_id, page=page, per_page=per_page, sort_dir=sort_dir, sort_field=sort_field, filters=filters, _from=_from, to=to) Subscription invoice list @@ -739,7 +739,7 @@ Name | Type | Description | Notes ### Return type -[**list[Invoice]**](Invoice.md) +[**InvoiceList**](InvoiceList.md) ### Authorization diff --git a/docs/TicketInformation.md b/docs/TicketInformation.md new file mode 100644 index 0000000..dd9d72c --- /dev/null +++ b/docs/TicketInformation.md @@ -0,0 +1,22 @@ +# TicketInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**ownerid** | **str** | | [optional] +**owner_contactid** | **str** | | [optional] +**departmentid** | **str** | | [optional] +**agentid** | **str** | | [optional] +**status** | **str** | | [optional] +**tags** | **str** | | [optional] +**code** | **str** | | [optional] +**channel_type** | **str** | | [optional] +**date_created** | **str** | | [optional] +**public_access_urlcode** | **str** | | [optional] +**subject** | **str** | | [optional] +**custom_fields** | [**list[CustomFields]**](CustomFields.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TicketListItem.md b/docs/TicketListItem.md new file mode 100644 index 0000000..fc40fab --- /dev/null +++ b/docs/TicketListItem.md @@ -0,0 +1,24 @@ +# TicketListItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**useridentifier** | **str** | | +**subject** | **str** | | +**departmentid** | **str** | | +**recipient** | **str** | | +**message** | **str** | | +**recipient_name** | **str** | | [optional] +**carbon_copy** | **str** | | [optional] +**status** | **str** | <br> I - init<br> N - new<br> T - chatting<br> P - calling<br> R - resolved<br> X - deleted<br> B - spam<br> A - answered<br> C - open<br> W - postponed | [optional] [default to 'N'] +**mail_message_id** | **str** | | [optional] +**do_not_send_mail** | **str** | Y - yes, N - no | [optional] [default to 'N'] +**use_template** | **str** | Y - yes, N - no | [optional] [default to 'Y'] +**is_html_message** | **str** | Y - yes, N - no | [optional] [default to 'N'] +**custom_fields** | [**list[CustomFields]**](CustomFields.md) | | [optional] +**tags** | **list[str]** | array of tags id | [optional] +**attachments** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TicketsApi.md b/docs/TicketsApi.md index 59a4b5a..92d00d8 100644 --- a/docs/TicketsApi.md +++ b/docs/TicketsApi.md @@ -4,6 +4,7 @@ All URIs are relative to *http://localhost/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- +[**create_ticket**](TicketsApi.md#create_ticket) | **POST** /tickets | Create ticket [**delete_ticket**](TicketsApi.md#delete_ticket) | **DELETE** /tickets/{ticketId} | Deletes ticket [**get_ticket**](TicketsApi.md#get_ticket) | **GET** /tickets/{ticketId} | Gets ticket [**get_ticket_attribute**](TicketsApi.md#get_ticket_attribute) | **GET** /tickets/{ticketId}/attributes/{attributeName} | Gets ticket attribute @@ -14,6 +15,60 @@ Method | HTTP request | Description [**update_ticket**](TicketsApi.md#update_ticket) | **PUT** /tickets/{ticketId} | Updates ticket +# **create_ticket** +> TicketInformation create_ticket(ticket=ticket) + +Create ticket + +Create new ticket + +### Example +```python +import time +import liveagent_api +from liveagent_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: privileges +liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN' +# Configure API key authorization: apikey +liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed +# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER' + +# create an instance of the API class +api_instance = liveagent_api.TicketsApi() +ticket = liveagent_api.TicketListItem() # TicketListItem | (optional) + +try: + # Create ticket + api_response = api_instance.create_ticket(ticket=ticket) + pprint(api_response) +except ApiException as e: + print "Exception when calling TicketsApi->create_ticket: %s\n" % e +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ticket** | [**TicketListItem**](TicketListItem.md)| | [optional] + +### Return type + +[**TicketInformation**](TicketInformation.md) + +### Authorization + +[privileges](../README.md#privileges), [apikey](../README.md#apikey) + +### 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) + # **delete_ticket** > OkResponse delete_ticket(ticket_id) diff --git a/liveagent_api/__init__.py b/liveagent_api/__init__.py index 35d9f71..d15af04 100644 --- a/liveagent_api/__init__.py +++ b/liveagent_api/__init__.py @@ -19,6 +19,7 @@ from .models.call_list_item import CallListItem from .models.call_message import CallMessage from .models.call_status import CallStatus +from .models.call_transfer_result import CallTransferResult from .models.canned_message import CannedMessage from .models.company import Company from .models.company_list_item import CompanyListItem @@ -37,8 +38,11 @@ from .models.hosting_info import HostingInfo from .models.invoice import Invoice from .models.invoice_item import InvoiceItem +from .models.invoice_list import InvoiceList from .models.ivr import Ivr from .models.ivr_choice import IvrChoice +from .models.ivr_fetch import IvrFetch +from .models.ivr_fetch_param import IvrFetchParam from .models.ivr_step import IvrStep from .models.ok_response import OkResponse from .models.payment_info import PaymentInfo @@ -56,6 +60,8 @@ from .models.tag import Tag from .models.ticket import Ticket from .models.ticket_attribute import TicketAttribute +from .models.ticket_information import TicketInformation +from .models.ticket_list_item import TicketListItem from .models.ticket_postpone import TicketPostpone from .models.ticket_sla import TicketSla from .models.ticket_updatable import TicketUpdatable diff --git a/liveagent_api/apis/calls_api.py b/liveagent_api/apis/calls_api.py index 8e0aeda..ac99c24 100644 --- a/liveagent_api/apis/calls_api.py +++ b/liveagent_api/apis/calls_api.py @@ -481,6 +481,89 @@ def call_create(self, call_id, to_number, from_number, **kwargs): callback=params.get('callback')) return response + def call_fetch_ivr(self, call_id, fetch, **kwargs): + """ + Fetches IVR for the call from external URL + + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.call_fetch_ivr(call_id, fetch, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str call_id: (required) + :param IvrFetch fetch: (required) + :return: list[Ivr] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['call_id', 'fetch'] + all_params.append('callback') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method call_fetch_ivr" % 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 `call_fetch_ivr`") + # verify the required parameter 'fetch' is set + if ('fetch' not in params) or (params['fetch'] is None): + raise ValueError("Missing the required parameter `fetch` when calling `call_fetch_ivr`") + + resource_path = '/calls/{callId}/_fetchIvr'.replace('{format}', 'json') + path_params = {} + if 'call_id' in params: + path_params['callId'] = params['call_id'] + + query_params = {} + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'fetch' in params: + body_params = params['fetch'] + + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + if not header_params['Accept']: + del header_params['Accept'] + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = ['privileges', 'apikey'] + + response = self.api_client.call_api(resource_path, 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Ivr]', + auth_settings=auth_settings, + callback=params.get('callback')) + return response + def call_get_status(self, call_id, **kwargs): """ Return the status of call @@ -893,7 +976,7 @@ def call_ring(self, call_id, **kwargs): callback=params.get('callback')) return response - def call_start(self, to_number, from_number, **kwargs): + def call_start(self, to_number, from_number, via_number, ticket_id, **kwargs): """ Starts new outcoming / internal call Starts new call by ringing agent device and the dialing customer after agent has picked up his phone\n @@ -904,19 +987,20 @@ def call_start(self, to_number, from_number, **kwargs): >>> def callback_function(response): >>> pprint(response) >>> - >>> thread = api.call_start(to_number, from_number, callback=callback_function) + >>> thread = api.call_start(to_number, from_number, via_number, ticket_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str to_number: callee number (required) :param str from_number: caller number (required) - :param str ticket_id: ticket id or code + :param str via_number: trunk number via which call was made (required) + :param str ticket_id: ticket id or code (required) :return: OkResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['to_number', 'from_number', 'ticket_id'] + all_params = ['to_number', 'from_number', 'via_number', 'ticket_id'] all_params.append('callback') params = locals() @@ -935,6 +1019,12 @@ def call_start(self, to_number, from_number, **kwargs): # verify the required parameter 'from_number' is set if ('from_number' not in params) or (params['from_number'] is None): raise ValueError("Missing the required parameter `from_number` when calling `call_start`") + # verify the required parameter 'via_number' is set + if ('via_number' not in params) or (params['via_number'] is None): + raise ValueError("Missing the required parameter `via_number` when calling `call_start`") + # verify the required parameter 'ticket_id' is set + if ('ticket_id' not in params) or (params['ticket_id'] is None): + raise ValueError("Missing the required parameter `ticket_id` when calling `call_start`") resource_path = '/call/_start'.replace('{format}', 'json') path_params = {} @@ -944,6 +1034,8 @@ def call_start(self, to_number, from_number, **kwargs): query_params['to_number'] = params['to_number'] if 'from_number' in params: query_params['from_number'] = params['from_number'] + if 'via_number' in params: + query_params['via_number'] = params['via_number'] if 'ticket_id' in params: query_params['ticketId'] = params['ticket_id'] @@ -979,10 +1071,87 @@ def call_start(self, to_number, from_number, **kwargs): callback=params.get('callback')) return response + def call_start_canceled(self, call_id, **kwargs): + """ + Callback that starting call canceled + Callback is delivered only of HW phones + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.call_start_canceled(call_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str call_id: Call ID (required) + :return: OkResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['call_id'] + all_params.append('callback') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method call_start_canceled" % 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 `call_start_canceled`") + + resource_path = '/call/_startCanceled'.replace('{format}', 'json') + path_params = {} + + query_params = {} + if 'call_id' in params: + query_params['callId'] = params['call_id'] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + if not header_params['Accept']: + del header_params['Accept'] + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = ['privileges'] + + response = self.api_client.call_api(resource_path, 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OkResponse', + auth_settings=auth_settings, + callback=params.get('callback')) + return response + def call_start_failed(self, call_id, **kwargs): """ Callback that starting call failed - Callback is delivered only of HW phones\n + Callback is delivered only of HW phones This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function @@ -994,7 +1163,7 @@ def call_start_failed(self, call_id, **kwargs): :param callback function: The callback function for asynchronous request. (optional) - :param str call_id: Call ID. (required) + :param str call_id: Call ID (required) :return: OkResponse If the method is called asynchronously, returns the request thread. @@ -1136,6 +1305,86 @@ def call_stop(self, call_id, **kwargs): callback=params.get('callback')) return response + def call_transfer(self, call_id, **kwargs): + """ + Transfers call to different department / agent + Transfer can be called on incoming calls before they start ringing to agents + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.call_transfer(call_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str call_id: (required) + :param str to: Department ID or extension + :return: CallTransferResult + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['call_id', 'to'] + all_params.append('callback') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method call_transfer" % 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 `call_transfer`") + + resource_path = '/calls/{callId}/_transfer'.replace('{format}', 'json') + path_params = {} + if 'call_id' in params: + path_params['callId'] = params['call_id'] + + query_params = {} + if 'to' in params: + query_params['to'] = params['to'] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + if not header_params['Accept']: + del header_params['Accept'] + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = ['privileges', 'apikey'] + + response = self.api_client.call_api(resource_path, 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CallTransferResult', + auth_settings=auth_settings, + callback=params.get('callback')) + return response + def confirm_ring(self, call_id, **kwargs): """ Confirm that call is ringing diff --git a/liveagent_api/apis/phonenumbers_api.py b/liveagent_api/apis/phonenumbers_api.py index 64e1d28..2d88210 100644 --- a/liveagent_api/apis/phonenumbers_api.py +++ b/liveagent_api/apis/phonenumbers_api.py @@ -63,7 +63,8 @@ def add_number(self, type, number, status, **kwargs): :param str type: A - API controlled number, T - Twilio number, T-O - Twilio outgoing number, D - Digitale, S - Asterisk (required) :param str number: (required) :param str status: A - Active, I - Inactive (required) - :param int dial_out_prefix: Prefix needed to orifinate call using this number + :param int dial_out_prefix: Prefix needed to originate call using this number + :param bool record_call: :param str name: :param str departmentid: :param str host_settings: json encoded host settings @@ -78,7 +79,7 @@ def add_number(self, type, number, status, **kwargs): returns the request thread. """ - all_params = ['type', 'number', 'status', 'dial_out_prefix', 'name', 'departmentid', 'host_settings', 'host', 'port', 'user', 'password', 'providerid', 'ivr'] + all_params = ['type', 'number', 'status', 'dial_out_prefix', 'record_call', 'name', 'departmentid', 'host_settings', 'host', 'port', 'user', 'password', 'providerid', 'ivr'] all_params.append('callback') params = locals() @@ -114,6 +115,8 @@ def add_number(self, type, number, status, **kwargs): form_params.append(('type', params['type'])) if 'dial_out_prefix' in params: form_params.append(('dial_out_prefix', params['dial_out_prefix'])) + if 'record_call' in params: + form_params.append(('record_call', params['record_call'])) if 'number' in params: form_params.append(('number', params['number'])) if 'status' in params: diff --git a/liveagent_api/apis/subscriptions_api.py b/liveagent_api/apis/subscriptions_api.py index f390ad3..45baff5 100644 --- a/liveagent_api/apis/subscriptions_api.py +++ b/liveagent_api/apis/subscriptions_api.py @@ -1007,7 +1007,7 @@ def get_subscription_invoices(self, subscription_id, **kwargs): :param str filters: Filters (json object {column:value, ...}) :param int _from: Result set start. Takes precedence over _page. :param int to: Result set end. Used only if _from is used. - :return: list[Invoice] + :return: InvoiceList If the method is called asynchronously, returns the request thread. """ @@ -1077,7 +1077,7 @@ def get_subscription_invoices(self, subscription_id, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Invoice]', + response_type='InvoiceList', auth_settings=auth_settings, callback=params.get('callback')) return response diff --git a/liveagent_api/apis/tickets_api.py b/liveagent_api/apis/tickets_api.py index 6779c23..c8a447c 100644 --- a/liveagent_api/apis/tickets_api.py +++ b/liveagent_api/apis/tickets_api.py @@ -45,6 +45,80 @@ def __init__(self, api_client=None): config.api_client = ApiClient() self.api_client = config.api_client + def create_ticket(self, **kwargs): + """ + Create ticket + Create new ticket + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.create_ticket(callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param TicketListItem ticket: + :return: TicketInformation + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ticket'] + all_params.append('callback') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_ticket" % key + ) + params[key] = val + del params['kwargs'] + + + resource_path = '/tickets'.replace('{format}', 'json') + path_params = {} + + query_params = {} + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'ticket' in params: + body_params = params['ticket'] + + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + if not header_params['Accept']: + del header_params['Accept'] + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = ['privileges', 'apikey'] + + response = self.api_client.call_api(resource_path, 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TicketInformation', + auth_settings=auth_settings, + callback=params.get('callback')) + return response + def delete_ticket(self, ticket_id, **kwargs): """ Deletes ticket diff --git a/liveagent_api/models/__init__.py b/liveagent_api/models/__init__.py index 0beeb0d..3690fdd 100644 --- a/liveagent_api/models/__init__.py +++ b/liveagent_api/models/__init__.py @@ -19,6 +19,7 @@ from .call_list_item import CallListItem from .call_message import CallMessage from .call_status import CallStatus +from .call_transfer_result import CallTransferResult from .canned_message import CannedMessage from .company import Company from .company_list_item import CompanyListItem @@ -37,8 +38,11 @@ from .hosting_info import HostingInfo from .invoice import Invoice from .invoice_item import InvoiceItem +from .invoice_list import InvoiceList from .ivr import Ivr from .ivr_choice import IvrChoice +from .ivr_fetch import IvrFetch +from .ivr_fetch_param import IvrFetchParam from .ivr_step import IvrStep from .ok_response import OkResponse from .payment_info import PaymentInfo @@ -56,6 +60,8 @@ from .tag import Tag from .ticket import Ticket from .ticket_attribute import TicketAttribute +from .ticket_information import TicketInformation +from .ticket_list_item import TicketListItem from .ticket_postpone import TicketPostpone from .ticket_sla import TicketSla from .ticket_updatable import TicketUpdatable diff --git a/liveagent_api/models/call_transfer_result.py b/liveagent_api/models/call_transfer_result.py new file mode 100644 index 0000000..67ade9c --- /dev/null +++ b/liveagent_api/models/call_transfer_result.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ref: https://github.com/swagger-api/swagger-codegen +""" + +from pprint import pformat +from six import iteritems + + +class CallTransferResult(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + CallTransferResult - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + 'callee_status': 'str' + } + + self.attribute_map = { + 'callee_status': 'callee_status' + } + + self._callee_status = None + + @property + def callee_status(self): + """ + Gets the callee_status of this CallTransferResult. + O - online, F - offline + + :return: The callee_status of this CallTransferResult. + :rtype: str + """ + return self._callee_status + + @callee_status.setter + def callee_status(self, callee_status): + """ + Sets the callee_status of this CallTransferResult. + O - online, F - offline + + :param callee_status: The callee_status of this CallTransferResult. + :type: str + """ + allowed_values = ["O", "F"] + if callee_status not in allowed_values: + raise ValueError( + "Invalid value for `callee_status`, must be one of {0}" + .format(allowed_values) + ) + self._callee_status = callee_status + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other + diff --git a/liveagent_api/models/invoice_list.py b/liveagent_api/models/invoice_list.py new file mode 100644 index 0000000..85312e5 --- /dev/null +++ b/liveagent_api/models/invoice_list.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ref: https://github.com/swagger-api/swagger-codegen +""" + +from pprint import pformat +from six import iteritems + + +class InvoiceList(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + InvoiceList - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + 'size': 'int', + 'items': 'list[Invoice]' + } + + self.attribute_map = { + 'size': 'size', + 'items': 'items' + } + + self._size = None + self._items = None + + @property + def size(self): + """ + Gets the size of this InvoiceList. + + + :return: The size of this InvoiceList. + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """ + Sets the size of this InvoiceList. + + + :param size: The size of this InvoiceList. + :type: int + """ + self._size = size + + @property + def items(self): + """ + Gets the items of this InvoiceList. + + + :return: The items of this InvoiceList. + :rtype: list[Invoice] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this InvoiceList. + + + :param items: The items of this InvoiceList. + :type: list[Invoice] + """ + self._items = items + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other + diff --git a/liveagent_api/models/ivr_fetch.py b/liveagent_api/models/ivr_fetch.py new file mode 100644 index 0000000..f05f30d --- /dev/null +++ b/liveagent_api/models/ivr_fetch.py @@ -0,0 +1,220 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ref: https://github.com/swagger-api/swagger-codegen +""" + +from pprint import pformat +from six import iteritems + + +class IvrFetch(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + IvrFetch - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + 'url': 'str', + 'prefix': 'str', + 'on_error': 'str', + 'params': 'list[IvrFetchParam]', + 'ivrs': 'list[str]' + } + + self.attribute_map = { + 'url': 'url', + 'prefix': 'prefix', + 'on_error': 'onError', + 'params': 'params', + 'ivrs': 'ivrs' + } + + self._url = None + self._prefix = None + self._on_error = None + self._params = None + self._ivrs = None + + @property + def url(self): + """ + Gets the url of this IvrFetch. + + + :return: The url of this IvrFetch. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """ + Sets the url of this IvrFetch. + + + :param url: The url of this IvrFetch. + :type: str + """ + self._url = url + + @property + def prefix(self): + """ + Gets the prefix of this IvrFetch. + + + :return: The prefix of this IvrFetch. + :rtype: str + """ + return self._prefix + + @prefix.setter + def prefix(self, prefix): + """ + Sets the prefix of this IvrFetch. + + + :param prefix: The prefix of this IvrFetch. + :type: str + """ + self._prefix = prefix + + @property + def on_error(self): + """ + Gets the on_error of this IvrFetch. + + + :return: The on_error of this IvrFetch. + :rtype: str + """ + return self._on_error + + @on_error.setter + def on_error(self, on_error): + """ + Sets the on_error of this IvrFetch. + + + :param on_error: The on_error of this IvrFetch. + :type: str + """ + self._on_error = on_error + + @property + def params(self): + """ + Gets the params of this IvrFetch. + + + :return: The params of this IvrFetch. + :rtype: list[IvrFetchParam] + """ + return self._params + + @params.setter + def params(self, params): + """ + Sets the params of this IvrFetch. + + + :param params: The params of this IvrFetch. + :type: list[IvrFetchParam] + """ + self._params = params + + @property + def ivrs(self): + """ + Gets the ivrs of this IvrFetch. + + + :return: The ivrs of this IvrFetch. + :rtype: list[str] + """ + return self._ivrs + + @ivrs.setter + def ivrs(self, ivrs): + """ + Sets the ivrs of this IvrFetch. + + + :param ivrs: The ivrs of this IvrFetch. + :type: list[str] + """ + self._ivrs = ivrs + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other + diff --git a/liveagent_api/models/ivr_fetch_param.py b/liveagent_api/models/ivr_fetch_param.py new file mode 100644 index 0000000..63f4ab4 --- /dev/null +++ b/liveagent_api/models/ivr_fetch_param.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ref: https://github.com/swagger-api/swagger-codegen +""" + +from pprint import pformat +from six import iteritems + + +class IvrFetchParam(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + IvrFetchParam - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + 'name': 'str', + 'value': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'value': 'value' + } + + self._name = None + self._value = None + + @property + def name(self): + """ + Gets the name of this IvrFetchParam. + + + :return: The name of this IvrFetchParam. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this IvrFetchParam. + + + :param name: The name of this IvrFetchParam. + :type: str + """ + self._name = name + + @property + def value(self): + """ + Gets the value of this IvrFetchParam. + + + :return: The value of this IvrFetchParam. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this IvrFetchParam. + + + :param value: The value of this IvrFetchParam. + :type: str + """ + self._value = value + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other + diff --git a/liveagent_api/models/ivr_step.py b/liveagent_api/models/ivr_step.py index 696b041..d890b6a 100644 --- a/liveagent_api/models/ivr_step.py +++ b/liveagent_api/models/ivr_step.py @@ -56,7 +56,7 @@ def __init__(self): def type(self): """ Gets the type of this IvrStep. - P - play message (URL in params), R - ring to agent (optional departmentId in params), V - redirect to voicemail, D - choice (message URL in params, choices) G - goto (IVR name in params) + P - play message (URL in params), R - ring to agent (optional departmentId in params), V - redirect to voicemail, D - choice (choices), G - goto (IVR name in params), T - transfer (optional ivr settings in choices {\"1\":\"online\",\"0\":\"offline\",\"9\":\"queue\"}), F - fetch next IVR steps from URL in params :return: The type of this IvrStep. :rtype: str @@ -67,12 +67,12 @@ def type(self): def type(self, type): """ Sets the type of this IvrStep. - P - play message (URL in params), R - ring to agent (optional departmentId in params), V - redirect to voicemail, D - choice (message URL in params, choices) G - goto (IVR name in params) + P - play message (URL in params), R - ring to agent (optional departmentId in params), V - redirect to voicemail, D - choice (choices), G - goto (IVR name in params), T - transfer (optional ivr settings in choices {\"1\":\"online\",\"0\":\"offline\",\"9\":\"queue\"}), F - fetch next IVR steps from URL in params :param type: The type of this IvrStep. :type: str """ - allowed_values = ["P", "R", "V", "D", "G"] + allowed_values = ["P", "R", "V", "D", "G", "T", "F"] if type not in allowed_values: raise ValueError( "Invalid value for `type`, must be one of {0}" diff --git a/liveagent_api/models/phone_number.py b/liveagent_api/models/phone_number.py index b212aff..12f0374 100644 --- a/liveagent_api/models/phone_number.py +++ b/liveagent_api/models/phone_number.py @@ -40,6 +40,7 @@ def __init__(self): 'id': 'str', 'type': 'str', 'dial_out_prefix': 'int', + 'record_call': 'bool', 'number': 'str', 'name': 'str', 'departmentid': 'str', @@ -58,6 +59,7 @@ def __init__(self): 'id': 'id', 'type': 'type', 'dial_out_prefix': 'dial_out_prefix', + 'record_call': 'record_call', 'number': 'number', 'name': 'name', 'departmentid': 'departmentid', @@ -75,6 +77,7 @@ def __init__(self): self._id = None self._type = None self._dial_out_prefix = None + self._record_call = None self._number = None self._name = None self._departmentid = None @@ -160,6 +163,28 @@ def dial_out_prefix(self, dial_out_prefix): """ self._dial_out_prefix = dial_out_prefix + @property + def record_call(self): + """ + Gets the record_call of this PhoneNumber. + + + :return: The record_call of this PhoneNumber. + :rtype: bool + """ + return self._record_call + + @record_call.setter + def record_call(self, record_call): + """ + Sets the record_call of this PhoneNumber. + + + :param record_call: The record_call of this PhoneNumber. + :type: bool + """ + self._record_call = record_call + @property def number(self): """ diff --git a/liveagent_api/models/ticket_information.py b/liveagent_api/models/ticket_information.py new file mode 100644 index 0000000..da4735a --- /dev/null +++ b/liveagent_api/models/ticket_information.py @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ref: https://github.com/swagger-api/swagger-codegen +""" + +from pprint import pformat +from six import iteritems + + +class TicketInformation(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + TicketInformation - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + 'id': 'str', + 'ownerid': 'str', + 'owner_contactid': 'str', + 'departmentid': 'str', + 'agentid': 'str', + 'status': 'str', + 'tags': 'str', + 'code': 'str', + 'channel_type': 'str', + 'date_created': 'str', + 'public_access_urlcode': 'str', + 'subject': 'str', + 'custom_fields': 'list[CustomFields]' + } + + self.attribute_map = { + 'id': 'id', + 'ownerid': 'ownerid', + 'owner_contactid': 'owner_contactid', + 'departmentid': 'departmentid', + 'agentid': 'agentid', + 'status': 'status', + 'tags': 'tags', + 'code': 'code', + 'channel_type': 'channel_type', + 'date_created': 'date_created', + 'public_access_urlcode': 'public_access_urlcode', + 'subject': 'subject', + 'custom_fields': 'custom_fields' + } + + self._id = None + self._ownerid = None + self._owner_contactid = None + self._departmentid = None + self._agentid = None + self._status = None + self._tags = None + self._code = None + self._channel_type = None + self._date_created = None + self._public_access_urlcode = None + self._subject = None + self._custom_fields = None + + @property + def id(self): + """ + Gets the id of this TicketInformation. + + + :return: The id of this TicketInformation. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this TicketInformation. + + + :param id: The id of this TicketInformation. + :type: str + """ + self._id = id + + @property + def ownerid(self): + """ + Gets the ownerid of this TicketInformation. + + + :return: The ownerid of this TicketInformation. + :rtype: str + """ + return self._ownerid + + @ownerid.setter + def ownerid(self, ownerid): + """ + Sets the ownerid of this TicketInformation. + + + :param ownerid: The ownerid of this TicketInformation. + :type: str + """ + self._ownerid = ownerid + + @property + def owner_contactid(self): + """ + Gets the owner_contactid of this TicketInformation. + + + :return: The owner_contactid of this TicketInformation. + :rtype: str + """ + return self._owner_contactid + + @owner_contactid.setter + def owner_contactid(self, owner_contactid): + """ + Sets the owner_contactid of this TicketInformation. + + + :param owner_contactid: The owner_contactid of this TicketInformation. + :type: str + """ + self._owner_contactid = owner_contactid + + @property + def departmentid(self): + """ + Gets the departmentid of this TicketInformation. + + + :return: The departmentid of this TicketInformation. + :rtype: str + """ + return self._departmentid + + @departmentid.setter + def departmentid(self, departmentid): + """ + Sets the departmentid of this TicketInformation. + + + :param departmentid: The departmentid of this TicketInformation. + :type: str + """ + self._departmentid = departmentid + + @property + def agentid(self): + """ + Gets the agentid of this TicketInformation. + + + :return: The agentid of this TicketInformation. + :rtype: str + """ + return self._agentid + + @agentid.setter + def agentid(self, agentid): + """ + Sets the agentid of this TicketInformation. + + + :param agentid: The agentid of this TicketInformation. + :type: str + """ + self._agentid = agentid + + @property + def status(self): + """ + Gets the status of this TicketInformation. + + + :return: The status of this TicketInformation. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this TicketInformation. + + + :param status: The status of this TicketInformation. + :type: str + """ + self._status = status + + @property + def tags(self): + """ + Gets the tags of this TicketInformation. + + + :return: The tags of this TicketInformation. + :rtype: str + """ + return self._tags + + @tags.setter + def tags(self, tags): + """ + Sets the tags of this TicketInformation. + + + :param tags: The tags of this TicketInformation. + :type: str + """ + self._tags = tags + + @property + def code(self): + """ + Gets the code of this TicketInformation. + + + :return: The code of this TicketInformation. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """ + Sets the code of this TicketInformation. + + + :param code: The code of this TicketInformation. + :type: str + """ + self._code = code + + @property + def channel_type(self): + """ + Gets the channel_type of this TicketInformation. + + + :return: The channel_type of this TicketInformation. + :rtype: str + """ + return self._channel_type + + @channel_type.setter + def channel_type(self, channel_type): + """ + Sets the channel_type of this TicketInformation. + + + :param channel_type: The channel_type of this TicketInformation. + :type: str + """ + self._channel_type = channel_type + + @property + def date_created(self): + """ + Gets the date_created of this TicketInformation. + + + :return: The date_created of this TicketInformation. + :rtype: str + """ + return self._date_created + + @date_created.setter + def date_created(self, date_created): + """ + Sets the date_created of this TicketInformation. + + + :param date_created: The date_created of this TicketInformation. + :type: str + """ + self._date_created = date_created + + @property + def public_access_urlcode(self): + """ + Gets the public_access_urlcode of this TicketInformation. + + + :return: The public_access_urlcode of this TicketInformation. + :rtype: str + """ + return self._public_access_urlcode + + @public_access_urlcode.setter + def public_access_urlcode(self, public_access_urlcode): + """ + Sets the public_access_urlcode of this TicketInformation. + + + :param public_access_urlcode: The public_access_urlcode of this TicketInformation. + :type: str + """ + self._public_access_urlcode = public_access_urlcode + + @property + def subject(self): + """ + Gets the subject of this TicketInformation. + + + :return: The subject of this TicketInformation. + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """ + Sets the subject of this TicketInformation. + + + :param subject: The subject of this TicketInformation. + :type: str + """ + self._subject = subject + + @property + def custom_fields(self): + """ + Gets the custom_fields of this TicketInformation. + + + :return: The custom_fields of this TicketInformation. + :rtype: list[CustomFields] + """ + return self._custom_fields + + @custom_fields.setter + def custom_fields(self, custom_fields): + """ + Sets the custom_fields of this TicketInformation. + + + :param custom_fields: The custom_fields of this TicketInformation. + :type: list[CustomFields] + """ + self._custom_fields = custom_fields + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other + diff --git a/liveagent_api/models/ticket_list_item.py b/liveagent_api/models/ticket_list_item.py new file mode 100644 index 0000000..97290b3 --- /dev/null +++ b/liveagent_api/models/ticket_list_item.py @@ -0,0 +1,494 @@ +# coding: utf-8 + +""" +Copyright 2016 SmartBear Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ref: https://github.com/swagger-api/swagger-codegen +""" + +from pprint import pformat +from six import iteritems + + +class TicketListItem(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + TicketListItem - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + 'useridentifier': 'str', + 'subject': 'str', + 'departmentid': 'str', + 'recipient': 'str', + 'message': 'str', + 'recipient_name': 'str', + 'carbon_copy': 'str', + 'status': 'str', + 'mail_message_id': 'str', + 'do_not_send_mail': 'str', + 'use_template': 'str', + 'is_html_message': 'str', + 'custom_fields': 'list[CustomFields]', + 'tags': 'list[str]', + 'attachments': 'str' + } + + self.attribute_map = { + 'useridentifier': 'useridentifier', + 'subject': 'subject', + 'departmentid': 'departmentid', + 'recipient': 'recipient', + 'message': 'message', + 'recipient_name': 'recipient_name', + 'carbon_copy': 'carbon_copy', + 'status': 'status', + 'mail_message_id': 'mail_message_id', + 'do_not_send_mail': 'do_not_send_mail', + 'use_template': 'use_template', + 'is_html_message': 'is_html_message', + 'custom_fields': 'custom_fields', + 'tags': 'tags', + 'attachments': 'attachments' + } + + self._useridentifier = None + self._subject = None + self._departmentid = None + self._recipient = None + self._message = None + self._recipient_name = None + self._carbon_copy = None + self._status = 'N' + self._mail_message_id = None + self._do_not_send_mail = 'N' + self._use_template = 'Y' + self._is_html_message = 'N' + self._custom_fields = None + self._tags = None + self._attachments = None + + @property + def useridentifier(self): + """ + Gets the useridentifier of this TicketListItem. + + + :return: The useridentifier of this TicketListItem. + :rtype: str + """ + return self._useridentifier + + @useridentifier.setter + def useridentifier(self, useridentifier): + """ + Sets the useridentifier of this TicketListItem. + + + :param useridentifier: The useridentifier of this TicketListItem. + :type: str + """ + self._useridentifier = useridentifier + + @property + def subject(self): + """ + Gets the subject of this TicketListItem. + + + :return: The subject of this TicketListItem. + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """ + Sets the subject of this TicketListItem. + + + :param subject: The subject of this TicketListItem. + :type: str + """ + self._subject = subject + + @property + def departmentid(self): + """ + Gets the departmentid of this TicketListItem. + + + :return: The departmentid of this TicketListItem. + :rtype: str + """ + return self._departmentid + + @departmentid.setter + def departmentid(self, departmentid): + """ + Sets the departmentid of this TicketListItem. + + + :param departmentid: The departmentid of this TicketListItem. + :type: str + """ + self._departmentid = departmentid + + @property + def recipient(self): + """ + Gets the recipient of this TicketListItem. + + + :return: The recipient of this TicketListItem. + :rtype: str + """ + return self._recipient + + @recipient.setter + def recipient(self, recipient): + """ + Sets the recipient of this TicketListItem. + + + :param recipient: The recipient of this TicketListItem. + :type: str + """ + self._recipient = recipient + + @property + def message(self): + """ + Gets the message of this TicketListItem. + + + :return: The message of this TicketListItem. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this TicketListItem. + + + :param message: The message of this TicketListItem. + :type: str + """ + self._message = message + + @property + def recipient_name(self): + """ + Gets the recipient_name of this TicketListItem. + + + :return: The recipient_name of this TicketListItem. + :rtype: str + """ + return self._recipient_name + + @recipient_name.setter + def recipient_name(self, recipient_name): + """ + Sets the recipient_name of this TicketListItem. + + + :param recipient_name: The recipient_name of this TicketListItem. + :type: str + """ + self._recipient_name = recipient_name + + @property + def carbon_copy(self): + """ + Gets the carbon_copy of this TicketListItem. + + + :return: The carbon_copy of this TicketListItem. + :rtype: str + """ + return self._carbon_copy + + @carbon_copy.setter + def carbon_copy(self, carbon_copy): + """ + Sets the carbon_copy of this TicketListItem. + + + :param carbon_copy: The carbon_copy of this TicketListItem. + :type: str + """ + self._carbon_copy = carbon_copy + + @property + def status(self): + """ + Gets the status of this TicketListItem. +
I - init
N - new
T - chatting
P - calling
R - resolved
X - deleted
B - spam
A - answered
C - open
W - postponed + + :return: The status of this TicketListItem. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this TicketListItem. +
I - init
N - new
T - chatting
P - calling
R - resolved
X - deleted
B - spam
A - answered
C - open
W - postponed + + :param status: The status of this TicketListItem. + :type: str + """ + allowed_values = ["I", "N", "T", "P", "R", "X", "B", "A", "C", "W"] + if status not in allowed_values: + raise ValueError( + "Invalid value for `status`, must be one of {0}" + .format(allowed_values) + ) + self._status = status + + @property + def mail_message_id(self): + """ + Gets the mail_message_id of this TicketListItem. + + + :return: The mail_message_id of this TicketListItem. + :rtype: str + """ + return self._mail_message_id + + @mail_message_id.setter + def mail_message_id(self, mail_message_id): + """ + Sets the mail_message_id of this TicketListItem. + + + :param mail_message_id: The mail_message_id of this TicketListItem. + :type: str + """ + self._mail_message_id = mail_message_id + + @property + def do_not_send_mail(self): + """ + Gets the do_not_send_mail of this TicketListItem. + Y - yes, N - no + + :return: The do_not_send_mail of this TicketListItem. + :rtype: str + """ + return self._do_not_send_mail + + @do_not_send_mail.setter + def do_not_send_mail(self, do_not_send_mail): + """ + Sets the do_not_send_mail of this TicketListItem. + Y - yes, N - no + + :param do_not_send_mail: The do_not_send_mail of this TicketListItem. + :type: str + """ + allowed_values = ["Y", "N"] + if do_not_send_mail not in allowed_values: + raise ValueError( + "Invalid value for `do_not_send_mail`, must be one of {0}" + .format(allowed_values) + ) + self._do_not_send_mail = do_not_send_mail + + @property + def use_template(self): + """ + Gets the use_template of this TicketListItem. + Y - yes, N - no + + :return: The use_template of this TicketListItem. + :rtype: str + """ + return self._use_template + + @use_template.setter + def use_template(self, use_template): + """ + Sets the use_template of this TicketListItem. + Y - yes, N - no + + :param use_template: The use_template of this TicketListItem. + :type: str + """ + allowed_values = ["Y", "N"] + if use_template not in allowed_values: + raise ValueError( + "Invalid value for `use_template`, must be one of {0}" + .format(allowed_values) + ) + self._use_template = use_template + + @property + def is_html_message(self): + """ + Gets the is_html_message of this TicketListItem. + Y - yes, N - no + + :return: The is_html_message of this TicketListItem. + :rtype: str + """ + return self._is_html_message + + @is_html_message.setter + def is_html_message(self, is_html_message): + """ + Sets the is_html_message of this TicketListItem. + Y - yes, N - no + + :param is_html_message: The is_html_message of this TicketListItem. + :type: str + """ + allowed_values = ["Y", "N"] + if is_html_message not in allowed_values: + raise ValueError( + "Invalid value for `is_html_message`, must be one of {0}" + .format(allowed_values) + ) + self._is_html_message = is_html_message + + @property + def custom_fields(self): + """ + Gets the custom_fields of this TicketListItem. + + + :return: The custom_fields of this TicketListItem. + :rtype: list[CustomFields] + """ + return self._custom_fields + + @custom_fields.setter + def custom_fields(self, custom_fields): + """ + Sets the custom_fields of this TicketListItem. + + + :param custom_fields: The custom_fields of this TicketListItem. + :type: list[CustomFields] + """ + self._custom_fields = custom_fields + + @property + def tags(self): + """ + Gets the tags of this TicketListItem. + array of tags id + + :return: The tags of this TicketListItem. + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """ + Sets the tags of this TicketListItem. + array of tags id + + :param tags: The tags of this TicketListItem. + :type: list[str] + """ + self._tags = tags + + @property + def attachments(self): + """ + Gets the attachments of this TicketListItem. + + + :return: The attachments of this TicketListItem. + :rtype: str + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """ + Sets the attachments of this TicketListItem. + + + :param attachments: The attachments of this TicketListItem. + :type: str + """ + self._attachments = attachments + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def __repr__(self): + """ + For `print` and `pprint` + """ + return self.to_str() + + def __eq__(self, other): + """ + Returns true if both objects are equal + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other +