ultracart-rest-sdk 4.1.49__py3-none-any.whl → 4.1.55__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ultracart/__init__.py +1 -1
- ultracart/api/conversation_api.py +292 -0
- ultracart/api_client.py +1 -1
- ultracart/configuration.py +1 -1
- ultracart/model/conversation_pbx_agent.py +21 -4
- ultracart/model/conversation_pbx_call.py +370 -0
- ultracart/model/conversation_pbx_call_agent.py +296 -0
- ultracart/model/conversation_pbx_call_ai_cost.py +276 -0
- ultracart/model/conversation_pbx_call_ai_engagement.py +314 -0
- ultracart/model/conversation_pbx_call_ai_tool_call.py +296 -0
- ultracart/model/conversation_pbx_call_ai_whisper.py +276 -0
- ultracart/model/conversation_pbx_call_caller.py +280 -0
- ultracart/model/conversation_pbx_call_financial.py +288 -0
- ultracart/model/conversation_pbx_call_hold.py +276 -0
- ultracart/model/conversation_pbx_call_queue.py +284 -0
- ultracart/model/conversation_pbx_call_recording.py +294 -0
- ultracart/model/conversation_pbx_call_response.py +292 -0
- ultracart/model/conversation_pbx_call_routing.py +278 -0
- ultracart/model/conversation_pbx_call_search_request.py +324 -0
- ultracart/model/conversation_pbx_call_search_response.py +292 -0
- ultracart/model/conversation_pbx_call_timeline.py +284 -0
- ultracart/model/conversation_pbx_call_transcript.py +294 -0
- ultracart/model/conversation_pbx_call_transcript_segment.py +292 -0
- ultracart/model/conversation_pbx_call_transfer.py +280 -0
- ultracart/model/conversation_pbx_hardware_phone.py +21 -2
- ultracart/model/conversation_pbx_phone_number.py +4 -0
- ultracart/model/conversation_pbx_queue.py +4 -0
- ultracart/models/__init__.py +19 -0
- {ultracart_rest_sdk-4.1.49.dist-info → ultracart_rest_sdk-4.1.55.dist-info}/METADATA +1 -1
- {ultracart_rest_sdk-4.1.49.dist-info → ultracart_rest_sdk-4.1.55.dist-info}/RECORD +33 -14
- {ultracart_rest_sdk-4.1.49.dist-info → ultracart_rest_sdk-4.1.55.dist-info}/LICENSE +0 -0
- {ultracart_rest_sdk-4.1.49.dist-info → ultracart_rest_sdk-4.1.55.dist-info}/WHEEL +0 -0
- {ultracart_rest_sdk-4.1.49.dist-info → ultracart_rest_sdk-4.1.55.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
"""
|
|
2
|
+
UltraCart Rest API V2
|
|
3
|
+
|
|
4
|
+
UltraCart REST API Version 2 # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
Contact: support@ultracart.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import re # noqa: F401
|
|
13
|
+
import sys # noqa: F401
|
|
14
|
+
|
|
15
|
+
from ultracart.model_utils import ( # noqa: F401
|
|
16
|
+
ApiTypeError,
|
|
17
|
+
ModelComposed,
|
|
18
|
+
ModelNormal,
|
|
19
|
+
ModelSimple,
|
|
20
|
+
cached_property,
|
|
21
|
+
change_keys_js_to_python,
|
|
22
|
+
convert_js_args_to_python_args,
|
|
23
|
+
date,
|
|
24
|
+
datetime,
|
|
25
|
+
file_type,
|
|
26
|
+
none_type,
|
|
27
|
+
validate_get_composed_info,
|
|
28
|
+
OpenApiModel
|
|
29
|
+
)
|
|
30
|
+
from ultracart.exceptions import ApiAttributeError
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def lazy_import():
|
|
34
|
+
from ultracart.model.conversation_pbx_call_agent import ConversationPbxCallAgent
|
|
35
|
+
from ultracart.model.conversation_pbx_call_ai_engagement import ConversationPbxCallAiEngagement
|
|
36
|
+
from ultracart.model.conversation_pbx_call_caller import ConversationPbxCallCaller
|
|
37
|
+
from ultracart.model.conversation_pbx_call_financial import ConversationPbxCallFinancial
|
|
38
|
+
from ultracart.model.conversation_pbx_call_hold import ConversationPbxCallHold
|
|
39
|
+
from ultracart.model.conversation_pbx_call_recording import ConversationPbxCallRecording
|
|
40
|
+
from ultracart.model.conversation_pbx_call_routing import ConversationPbxCallRouting
|
|
41
|
+
from ultracart.model.conversation_pbx_call_timeline import ConversationPbxCallTimeline
|
|
42
|
+
from ultracart.model.conversation_pbx_call_transfer import ConversationPbxCallTransfer
|
|
43
|
+
globals()['ConversationPbxCallAgent'] = ConversationPbxCallAgent
|
|
44
|
+
globals()['ConversationPbxCallAiEngagement'] = ConversationPbxCallAiEngagement
|
|
45
|
+
globals()['ConversationPbxCallCaller'] = ConversationPbxCallCaller
|
|
46
|
+
globals()['ConversationPbxCallFinancial'] = ConversationPbxCallFinancial
|
|
47
|
+
globals()['ConversationPbxCallHold'] = ConversationPbxCallHold
|
|
48
|
+
globals()['ConversationPbxCallRecording'] = ConversationPbxCallRecording
|
|
49
|
+
globals()['ConversationPbxCallRouting'] = ConversationPbxCallRouting
|
|
50
|
+
globals()['ConversationPbxCallTimeline'] = ConversationPbxCallTimeline
|
|
51
|
+
globals()['ConversationPbxCallTransfer'] = ConversationPbxCallTransfer
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class ConversationPbxCall(ModelNormal):
|
|
55
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
56
|
+
Ref: https://openapi-generator.tech
|
|
57
|
+
|
|
58
|
+
Do not edit the class manually.
|
|
59
|
+
|
|
60
|
+
Attributes:
|
|
61
|
+
allowed_values (dict): The key is the tuple path to the attribute
|
|
62
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
63
|
+
with a capitalized key describing the allowed value and an allowed
|
|
64
|
+
value. These dicts store the allowed enum values.
|
|
65
|
+
attribute_map (dict): The key is attribute name
|
|
66
|
+
and the value is json key in definition.
|
|
67
|
+
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
68
|
+
variable value to the discriminator class name.
|
|
69
|
+
validations (dict): The key is the tuple path to the attribute
|
|
70
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
71
|
+
that stores validations for max_length, min_length, max_items,
|
|
72
|
+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
73
|
+
inclusive_minimum, and regex.
|
|
74
|
+
additional_properties_type (tuple): A tuple of classes accepted
|
|
75
|
+
as additional properties values.
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
allowed_values = {
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
validations = {
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@cached_property
|
|
85
|
+
def additional_properties_type():
|
|
86
|
+
"""
|
|
87
|
+
This must be a method because a model may have properties that are
|
|
88
|
+
of type self, this must run after the class is loaded
|
|
89
|
+
"""
|
|
90
|
+
lazy_import()
|
|
91
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
92
|
+
|
|
93
|
+
_nullable = False
|
|
94
|
+
|
|
95
|
+
@cached_property
|
|
96
|
+
def openapi_types():
|
|
97
|
+
"""
|
|
98
|
+
This must be a method because a model may have properties that are
|
|
99
|
+
of type self, this must run after the class is loaded
|
|
100
|
+
|
|
101
|
+
Returns
|
|
102
|
+
openapi_types (dict): The key is attribute name
|
|
103
|
+
and the value is attribute type.
|
|
104
|
+
"""
|
|
105
|
+
lazy_import()
|
|
106
|
+
return {
|
|
107
|
+
'account_sid': (str,), # noqa: E501
|
|
108
|
+
'agents': ([ConversationPbxCallAgent],), # noqa: E501
|
|
109
|
+
'ai_agent_engagements': ([ConversationPbxCallAiEngagement],), # noqa: E501
|
|
110
|
+
'call_sid': (str,), # noqa: E501
|
|
111
|
+
'call_uuid': (str,), # noqa: E501
|
|
112
|
+
'caller': (ConversationPbxCallCaller,), # noqa: E501
|
|
113
|
+
'conference_sid': (str,), # noqa: E501
|
|
114
|
+
'created_at_dts': (str,), # noqa: E501
|
|
115
|
+
'customer_name': (str,), # noqa: E501
|
|
116
|
+
'customer_profile_oid': (str,), # noqa: E501
|
|
117
|
+
'disposition': (str,), # noqa: E501
|
|
118
|
+
'email': (str,), # noqa: E501
|
|
119
|
+
'financial': (ConversationPbxCallFinancial,), # noqa: E501
|
|
120
|
+
'holds': ([ConversationPbxCallHold],), # noqa: E501
|
|
121
|
+
'merchant_id': (str,), # noqa: E501
|
|
122
|
+
'recording_sids': ([str],), # noqa: E501
|
|
123
|
+
'recordings': ([ConversationPbxCallRecording],), # noqa: E501
|
|
124
|
+
'routing': (ConversationPbxCallRouting,), # noqa: E501
|
|
125
|
+
'status': (str,), # noqa: E501
|
|
126
|
+
'timeline': (ConversationPbxCallTimeline,), # noqa: E501
|
|
127
|
+
'transfers': ([ConversationPbxCallTransfer],), # noqa: E501
|
|
128
|
+
'updated_at_dts': (str,), # noqa: E501
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@cached_property
|
|
132
|
+
def discriminator():
|
|
133
|
+
return None
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
attribute_map = {
|
|
137
|
+
'account_sid': 'account_sid', # noqa: E501
|
|
138
|
+
'agents': 'agents', # noqa: E501
|
|
139
|
+
'ai_agent_engagements': 'ai_agent_engagements', # noqa: E501
|
|
140
|
+
'call_sid': 'call_sid', # noqa: E501
|
|
141
|
+
'call_uuid': 'call_uuid', # noqa: E501
|
|
142
|
+
'caller': 'caller', # noqa: E501
|
|
143
|
+
'conference_sid': 'conference_sid', # noqa: E501
|
|
144
|
+
'created_at_dts': 'created_at_dts', # noqa: E501
|
|
145
|
+
'customer_name': 'customer_name', # noqa: E501
|
|
146
|
+
'customer_profile_oid': 'customer_profile_oid', # noqa: E501
|
|
147
|
+
'disposition': 'disposition', # noqa: E501
|
|
148
|
+
'email': 'email', # noqa: E501
|
|
149
|
+
'financial': 'financial', # noqa: E501
|
|
150
|
+
'holds': 'holds', # noqa: E501
|
|
151
|
+
'merchant_id': 'merchant_id', # noqa: E501
|
|
152
|
+
'recording_sids': 'recording_sids', # noqa: E501
|
|
153
|
+
'recordings': 'recordings', # noqa: E501
|
|
154
|
+
'routing': 'routing', # noqa: E501
|
|
155
|
+
'status': 'status', # noqa: E501
|
|
156
|
+
'timeline': 'timeline', # noqa: E501
|
|
157
|
+
'transfers': 'transfers', # noqa: E501
|
|
158
|
+
'updated_at_dts': 'updated_at_dts', # noqa: E501
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
read_only_vars = {
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
_composed_schemas = {}
|
|
165
|
+
|
|
166
|
+
@classmethod
|
|
167
|
+
@convert_js_args_to_python_args
|
|
168
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
169
|
+
"""ConversationPbxCall - a model defined in OpenAPI
|
|
170
|
+
|
|
171
|
+
Keyword Args:
|
|
172
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
173
|
+
will be type checked and a TypeError will be
|
|
174
|
+
raised if the wrong type is input.
|
|
175
|
+
Defaults to True
|
|
176
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
177
|
+
drill down to the model in received_data
|
|
178
|
+
when deserializing a response
|
|
179
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
180
|
+
are serialized names, as specified in the OpenAPI document.
|
|
181
|
+
False if the variable names in the input data
|
|
182
|
+
are pythonic names, e.g. snake case (default)
|
|
183
|
+
_configuration (Configuration): the instance to use when
|
|
184
|
+
deserializing a file_type parameter.
|
|
185
|
+
If passed, type conversion is attempted
|
|
186
|
+
If omitted no type conversion is done.
|
|
187
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
188
|
+
classes that we have traveled through so that
|
|
189
|
+
if we see that class again we will not use its
|
|
190
|
+
discriminator again.
|
|
191
|
+
When traveling through a discriminator, the
|
|
192
|
+
composed schema that is
|
|
193
|
+
is traveled through is added to this set.
|
|
194
|
+
For example if Animal has a discriminator
|
|
195
|
+
petType and we pass in "Dog", and the class Dog
|
|
196
|
+
allOf includes Animal, we move through Animal
|
|
197
|
+
once using the discriminator, and pick Dog.
|
|
198
|
+
Then in Dog, we will make an instance of the
|
|
199
|
+
Animal class but this time we won't travel
|
|
200
|
+
through its discriminator because we passed in
|
|
201
|
+
_visited_composed_classes = (Animal,)
|
|
202
|
+
account_sid (str): Twilio account SID. [optional] # noqa: E501
|
|
203
|
+
agents ([ConversationPbxCallAgent]): List of agents who participated in this call. [optional] # noqa: E501
|
|
204
|
+
ai_agent_engagements ([ConversationPbxCallAiEngagement]): List of AI agent engagements during the call. [optional] # noqa: E501
|
|
205
|
+
call_sid (str): Twilio call SID for the primary (customer) call leg. [optional] # noqa: E501
|
|
206
|
+
call_uuid (str): Unique identifier for this call record. [optional] # noqa: E501
|
|
207
|
+
caller (ConversationPbxCallCaller): [optional] # noqa: E501
|
|
208
|
+
conference_sid (str): Twilio conference SID if this call used conferencing. [optional] # noqa: E501
|
|
209
|
+
created_at_dts (str): Timestamp when the call record was created. [optional] # noqa: E501
|
|
210
|
+
customer_name (str): Customer name associated with this call. [optional] # noqa: E501
|
|
211
|
+
customer_profile_oid (str): UltraCart customer profile OID if the caller was matched to a customer. [optional] # noqa: E501
|
|
212
|
+
disposition (str): Call disposition describing how the call ended. [optional] # noqa: E501
|
|
213
|
+
email (str): Email address of the caller if known. [optional] # noqa: E501
|
|
214
|
+
financial (ConversationPbxCallFinancial): [optional] # noqa: E501
|
|
215
|
+
holds ([ConversationPbxCallHold]): List of hold events during the call. [optional] # noqa: E501
|
|
216
|
+
merchant_id (str): Merchant identifier. [optional] # noqa: E501
|
|
217
|
+
recording_sids ([str]): List of all Twilio recording SIDs associated with this call. [optional] # noqa: E501
|
|
218
|
+
recordings ([ConversationPbxCallRecording]): List of recordings made during the call. [optional] # noqa: E501
|
|
219
|
+
routing (ConversationPbxCallRouting): [optional] # noqa: E501
|
|
220
|
+
status (str): Final status of the call. [optional] # noqa: E501
|
|
221
|
+
timeline (ConversationPbxCallTimeline): [optional] # noqa: E501
|
|
222
|
+
transfers ([ConversationPbxCallTransfer]): List of transfer events during the call. [optional] # noqa: E501
|
|
223
|
+
updated_at_dts (str): Timestamp when the call record was last updated. [optional] # noqa: E501
|
|
224
|
+
"""
|
|
225
|
+
|
|
226
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
227
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
228
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
229
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
230
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
231
|
+
|
|
232
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
233
|
+
|
|
234
|
+
if args:
|
|
235
|
+
for arg in args:
|
|
236
|
+
if isinstance(arg, dict):
|
|
237
|
+
kwargs.update(arg)
|
|
238
|
+
else:
|
|
239
|
+
raise ApiTypeError(
|
|
240
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
241
|
+
args,
|
|
242
|
+
self.__class__.__name__,
|
|
243
|
+
),
|
|
244
|
+
path_to_item=_path_to_item,
|
|
245
|
+
valid_classes=(self.__class__,),
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
self._data_store = {}
|
|
249
|
+
self._check_type = _check_type
|
|
250
|
+
self._spec_property_naming = _spec_property_naming
|
|
251
|
+
self._path_to_item = _path_to_item
|
|
252
|
+
self._configuration = _configuration
|
|
253
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
254
|
+
|
|
255
|
+
for var_name, var_value in kwargs.items():
|
|
256
|
+
if var_name not in self.attribute_map and \
|
|
257
|
+
self._configuration is not None and \
|
|
258
|
+
self._configuration.discard_unknown_keys and \
|
|
259
|
+
self.additional_properties_type is None:
|
|
260
|
+
# discard variable.
|
|
261
|
+
continue
|
|
262
|
+
setattr(self, var_name, var_value)
|
|
263
|
+
return self
|
|
264
|
+
|
|
265
|
+
required_properties = set([
|
|
266
|
+
'_data_store',
|
|
267
|
+
'_check_type',
|
|
268
|
+
'_spec_property_naming',
|
|
269
|
+
'_path_to_item',
|
|
270
|
+
'_configuration',
|
|
271
|
+
'_visited_composed_classes',
|
|
272
|
+
])
|
|
273
|
+
|
|
274
|
+
@convert_js_args_to_python_args
|
|
275
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
276
|
+
"""ConversationPbxCall - a model defined in OpenAPI
|
|
277
|
+
|
|
278
|
+
Keyword Args:
|
|
279
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
280
|
+
will be type checked and a TypeError will be
|
|
281
|
+
raised if the wrong type is input.
|
|
282
|
+
Defaults to True
|
|
283
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
284
|
+
drill down to the model in received_data
|
|
285
|
+
when deserializing a response
|
|
286
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
287
|
+
are serialized names, as specified in the OpenAPI document.
|
|
288
|
+
False if the variable names in the input data
|
|
289
|
+
are pythonic names, e.g. snake case (default)
|
|
290
|
+
_configuration (Configuration): the instance to use when
|
|
291
|
+
deserializing a file_type parameter.
|
|
292
|
+
If passed, type conversion is attempted
|
|
293
|
+
If omitted no type conversion is done.
|
|
294
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
295
|
+
classes that we have traveled through so that
|
|
296
|
+
if we see that class again we will not use its
|
|
297
|
+
discriminator again.
|
|
298
|
+
When traveling through a discriminator, the
|
|
299
|
+
composed schema that is
|
|
300
|
+
is traveled through is added to this set.
|
|
301
|
+
For example if Animal has a discriminator
|
|
302
|
+
petType and we pass in "Dog", and the class Dog
|
|
303
|
+
allOf includes Animal, we move through Animal
|
|
304
|
+
once using the discriminator, and pick Dog.
|
|
305
|
+
Then in Dog, we will make an instance of the
|
|
306
|
+
Animal class but this time we won't travel
|
|
307
|
+
through its discriminator because we passed in
|
|
308
|
+
_visited_composed_classes = (Animal,)
|
|
309
|
+
account_sid (str): Twilio account SID. [optional] # noqa: E501
|
|
310
|
+
agents ([ConversationPbxCallAgent]): List of agents who participated in this call. [optional] # noqa: E501
|
|
311
|
+
ai_agent_engagements ([ConversationPbxCallAiEngagement]): List of AI agent engagements during the call. [optional] # noqa: E501
|
|
312
|
+
call_sid (str): Twilio call SID for the primary (customer) call leg. [optional] # noqa: E501
|
|
313
|
+
call_uuid (str): Unique identifier for this call record. [optional] # noqa: E501
|
|
314
|
+
caller (ConversationPbxCallCaller): [optional] # noqa: E501
|
|
315
|
+
conference_sid (str): Twilio conference SID if this call used conferencing. [optional] # noqa: E501
|
|
316
|
+
created_at_dts (str): Timestamp when the call record was created. [optional] # noqa: E501
|
|
317
|
+
customer_name (str): Customer name associated with this call. [optional] # noqa: E501
|
|
318
|
+
customer_profile_oid (str): UltraCart customer profile OID if the caller was matched to a customer. [optional] # noqa: E501
|
|
319
|
+
disposition (str): Call disposition describing how the call ended. [optional] # noqa: E501
|
|
320
|
+
email (str): Email address of the caller if known. [optional] # noqa: E501
|
|
321
|
+
financial (ConversationPbxCallFinancial): [optional] # noqa: E501
|
|
322
|
+
holds ([ConversationPbxCallHold]): List of hold events during the call. [optional] # noqa: E501
|
|
323
|
+
merchant_id (str): Merchant identifier. [optional] # noqa: E501
|
|
324
|
+
recording_sids ([str]): List of all Twilio recording SIDs associated with this call. [optional] # noqa: E501
|
|
325
|
+
recordings ([ConversationPbxCallRecording]): List of recordings made during the call. [optional] # noqa: E501
|
|
326
|
+
routing (ConversationPbxCallRouting): [optional] # noqa: E501
|
|
327
|
+
status (str): Final status of the call. [optional] # noqa: E501
|
|
328
|
+
timeline (ConversationPbxCallTimeline): [optional] # noqa: E501
|
|
329
|
+
transfers ([ConversationPbxCallTransfer]): List of transfer events during the call. [optional] # noqa: E501
|
|
330
|
+
updated_at_dts (str): Timestamp when the call record was last updated. [optional] # noqa: E501
|
|
331
|
+
"""
|
|
332
|
+
|
|
333
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
334
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
335
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
336
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
337
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
338
|
+
|
|
339
|
+
if args:
|
|
340
|
+
for arg in args:
|
|
341
|
+
if isinstance(arg, dict):
|
|
342
|
+
kwargs.update(arg)
|
|
343
|
+
else:
|
|
344
|
+
raise ApiTypeError(
|
|
345
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
346
|
+
args,
|
|
347
|
+
self.__class__.__name__,
|
|
348
|
+
),
|
|
349
|
+
path_to_item=_path_to_item,
|
|
350
|
+
valid_classes=(self.__class__,),
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
self._data_store = {}
|
|
354
|
+
self._check_type = _check_type
|
|
355
|
+
self._spec_property_naming = _spec_property_naming
|
|
356
|
+
self._path_to_item = _path_to_item
|
|
357
|
+
self._configuration = _configuration
|
|
358
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
359
|
+
|
|
360
|
+
for var_name, var_value in kwargs.items():
|
|
361
|
+
if var_name not in self.attribute_map and \
|
|
362
|
+
self._configuration is not None and \
|
|
363
|
+
self._configuration.discard_unknown_keys and \
|
|
364
|
+
self.additional_properties_type is None:
|
|
365
|
+
# discard variable.
|
|
366
|
+
continue
|
|
367
|
+
setattr(self, var_name, var_value)
|
|
368
|
+
if var_name in self.read_only_vars:
|
|
369
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
370
|
+
f"class with read only attributes.")
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
"""
|
|
2
|
+
UltraCart Rest API V2
|
|
3
|
+
|
|
4
|
+
UltraCart REST API Version 2 # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
Contact: support@ultracart.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import re # noqa: F401
|
|
13
|
+
import sys # noqa: F401
|
|
14
|
+
|
|
15
|
+
from ultracart.model_utils import ( # noqa: F401
|
|
16
|
+
ApiTypeError,
|
|
17
|
+
ModelComposed,
|
|
18
|
+
ModelNormal,
|
|
19
|
+
ModelSimple,
|
|
20
|
+
cached_property,
|
|
21
|
+
change_keys_js_to_python,
|
|
22
|
+
convert_js_args_to_python_args,
|
|
23
|
+
date,
|
|
24
|
+
datetime,
|
|
25
|
+
file_type,
|
|
26
|
+
none_type,
|
|
27
|
+
validate_get_composed_info,
|
|
28
|
+
OpenApiModel
|
|
29
|
+
)
|
|
30
|
+
from ultracart.exceptions import ApiAttributeError
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ConversationPbxCallAgent(ModelNormal):
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
|
|
40
|
+
Attributes:
|
|
41
|
+
allowed_values (dict): The key is the tuple path to the attribute
|
|
42
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
43
|
+
with a capitalized key describing the allowed value and an allowed
|
|
44
|
+
value. These dicts store the allowed enum values.
|
|
45
|
+
attribute_map (dict): The key is attribute name
|
|
46
|
+
and the value is json key in definition.
|
|
47
|
+
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
48
|
+
variable value to the discriminator class name.
|
|
49
|
+
validations (dict): The key is the tuple path to the attribute
|
|
50
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
51
|
+
that stores validations for max_length, min_length, max_items,
|
|
52
|
+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
53
|
+
inclusive_minimum, and regex.
|
|
54
|
+
additional_properties_type (tuple): A tuple of classes accepted
|
|
55
|
+
as additional properties values.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
allowed_values = {
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
validations = {
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@cached_property
|
|
65
|
+
def additional_properties_type():
|
|
66
|
+
"""
|
|
67
|
+
This must be a method because a model may have properties that are
|
|
68
|
+
of type self, this must run after the class is loaded
|
|
69
|
+
"""
|
|
70
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
71
|
+
|
|
72
|
+
_nullable = False
|
|
73
|
+
|
|
74
|
+
@cached_property
|
|
75
|
+
def openapi_types():
|
|
76
|
+
"""
|
|
77
|
+
This must be a method because a model may have properties that are
|
|
78
|
+
of type self, this must run after the class is loaded
|
|
79
|
+
|
|
80
|
+
Returns
|
|
81
|
+
openapi_types (dict): The key is attribute name
|
|
82
|
+
and the value is attribute type.
|
|
83
|
+
"""
|
|
84
|
+
return {
|
|
85
|
+
'agent_extension': (str,), # noqa: E501
|
|
86
|
+
'agent_id': (str,), # noqa: E501
|
|
87
|
+
'agent_name': (str,), # noqa: E501
|
|
88
|
+
'answered': (bool,), # noqa: E501
|
|
89
|
+
'call_sid': (str,), # noqa: E501
|
|
90
|
+
'joined_at_dts': (str,), # noqa: E501
|
|
91
|
+
'left_at_dts': (str,), # noqa: E501
|
|
92
|
+
'role': (str,), # noqa: E501
|
|
93
|
+
'worker_sid': (str,), # noqa: E501
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@cached_property
|
|
97
|
+
def discriminator():
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
attribute_map = {
|
|
102
|
+
'agent_extension': 'agent_extension', # noqa: E501
|
|
103
|
+
'agent_id': 'agent_id', # noqa: E501
|
|
104
|
+
'agent_name': 'agent_name', # noqa: E501
|
|
105
|
+
'answered': 'answered', # noqa: E501
|
|
106
|
+
'call_sid': 'call_sid', # noqa: E501
|
|
107
|
+
'joined_at_dts': 'joined_at_dts', # noqa: E501
|
|
108
|
+
'left_at_dts': 'left_at_dts', # noqa: E501
|
|
109
|
+
'role': 'role', # noqa: E501
|
|
110
|
+
'worker_sid': 'worker_sid', # noqa: E501
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
read_only_vars = {
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
_composed_schemas = {}
|
|
117
|
+
|
|
118
|
+
@classmethod
|
|
119
|
+
@convert_js_args_to_python_args
|
|
120
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
121
|
+
"""ConversationPbxCallAgent - a model defined in OpenAPI
|
|
122
|
+
|
|
123
|
+
Keyword Args:
|
|
124
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
125
|
+
will be type checked and a TypeError will be
|
|
126
|
+
raised if the wrong type is input.
|
|
127
|
+
Defaults to True
|
|
128
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
129
|
+
drill down to the model in received_data
|
|
130
|
+
when deserializing a response
|
|
131
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
132
|
+
are serialized names, as specified in the OpenAPI document.
|
|
133
|
+
False if the variable names in the input data
|
|
134
|
+
are pythonic names, e.g. snake case (default)
|
|
135
|
+
_configuration (Configuration): the instance to use when
|
|
136
|
+
deserializing a file_type parameter.
|
|
137
|
+
If passed, type conversion is attempted
|
|
138
|
+
If omitted no type conversion is done.
|
|
139
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
140
|
+
classes that we have traveled through so that
|
|
141
|
+
if we see that class again we will not use its
|
|
142
|
+
discriminator again.
|
|
143
|
+
When traveling through a discriminator, the
|
|
144
|
+
composed schema that is
|
|
145
|
+
is traveled through is added to this set.
|
|
146
|
+
For example if Animal has a discriminator
|
|
147
|
+
petType and we pass in "Dog", and the class Dog
|
|
148
|
+
allOf includes Animal, we move through Animal
|
|
149
|
+
once using the discriminator, and pick Dog.
|
|
150
|
+
Then in Dog, we will make an instance of the
|
|
151
|
+
Animal class but this time we won't travel
|
|
152
|
+
through its discriminator because we passed in
|
|
153
|
+
_visited_composed_classes = (Animal,)
|
|
154
|
+
agent_extension (str): Agent's phone extension. [optional] # noqa: E501
|
|
155
|
+
agent_id (str): Unique identifier for the agent. [optional] # noqa: E501
|
|
156
|
+
agent_name (str): Display name of the agent. [optional] # noqa: E501
|
|
157
|
+
answered (bool): Whether the agent answered the call. [optional] # noqa: E501
|
|
158
|
+
call_sid (str): Twilio call SID for the agent's call leg. [optional] # noqa: E501
|
|
159
|
+
joined_at_dts (str): Timestamp when the agent joined the call. [optional] # noqa: E501
|
|
160
|
+
left_at_dts (str): Timestamp when the agent left the call. [optional] # noqa: E501
|
|
161
|
+
role (str): Role of the agent in the call. [optional] # noqa: E501
|
|
162
|
+
worker_sid (str): Twilio TaskRouter worker SID. [optional] # noqa: E501
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
166
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
167
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
168
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
169
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
170
|
+
|
|
171
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
172
|
+
|
|
173
|
+
if args:
|
|
174
|
+
for arg in args:
|
|
175
|
+
if isinstance(arg, dict):
|
|
176
|
+
kwargs.update(arg)
|
|
177
|
+
else:
|
|
178
|
+
raise ApiTypeError(
|
|
179
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
180
|
+
args,
|
|
181
|
+
self.__class__.__name__,
|
|
182
|
+
),
|
|
183
|
+
path_to_item=_path_to_item,
|
|
184
|
+
valid_classes=(self.__class__,),
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
self._data_store = {}
|
|
188
|
+
self._check_type = _check_type
|
|
189
|
+
self._spec_property_naming = _spec_property_naming
|
|
190
|
+
self._path_to_item = _path_to_item
|
|
191
|
+
self._configuration = _configuration
|
|
192
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
193
|
+
|
|
194
|
+
for var_name, var_value in kwargs.items():
|
|
195
|
+
if var_name not in self.attribute_map and \
|
|
196
|
+
self._configuration is not None and \
|
|
197
|
+
self._configuration.discard_unknown_keys and \
|
|
198
|
+
self.additional_properties_type is None:
|
|
199
|
+
# discard variable.
|
|
200
|
+
continue
|
|
201
|
+
setattr(self, var_name, var_value)
|
|
202
|
+
return self
|
|
203
|
+
|
|
204
|
+
required_properties = set([
|
|
205
|
+
'_data_store',
|
|
206
|
+
'_check_type',
|
|
207
|
+
'_spec_property_naming',
|
|
208
|
+
'_path_to_item',
|
|
209
|
+
'_configuration',
|
|
210
|
+
'_visited_composed_classes',
|
|
211
|
+
])
|
|
212
|
+
|
|
213
|
+
@convert_js_args_to_python_args
|
|
214
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
215
|
+
"""ConversationPbxCallAgent - a model defined in OpenAPI
|
|
216
|
+
|
|
217
|
+
Keyword Args:
|
|
218
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
219
|
+
will be type checked and a TypeError will be
|
|
220
|
+
raised if the wrong type is input.
|
|
221
|
+
Defaults to True
|
|
222
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
223
|
+
drill down to the model in received_data
|
|
224
|
+
when deserializing a response
|
|
225
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
226
|
+
are serialized names, as specified in the OpenAPI document.
|
|
227
|
+
False if the variable names in the input data
|
|
228
|
+
are pythonic names, e.g. snake case (default)
|
|
229
|
+
_configuration (Configuration): the instance to use when
|
|
230
|
+
deserializing a file_type parameter.
|
|
231
|
+
If passed, type conversion is attempted
|
|
232
|
+
If omitted no type conversion is done.
|
|
233
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
234
|
+
classes that we have traveled through so that
|
|
235
|
+
if we see that class again we will not use its
|
|
236
|
+
discriminator again.
|
|
237
|
+
When traveling through a discriminator, the
|
|
238
|
+
composed schema that is
|
|
239
|
+
is traveled through is added to this set.
|
|
240
|
+
For example if Animal has a discriminator
|
|
241
|
+
petType and we pass in "Dog", and the class Dog
|
|
242
|
+
allOf includes Animal, we move through Animal
|
|
243
|
+
once using the discriminator, and pick Dog.
|
|
244
|
+
Then in Dog, we will make an instance of the
|
|
245
|
+
Animal class but this time we won't travel
|
|
246
|
+
through its discriminator because we passed in
|
|
247
|
+
_visited_composed_classes = (Animal,)
|
|
248
|
+
agent_extension (str): Agent's phone extension. [optional] # noqa: E501
|
|
249
|
+
agent_id (str): Unique identifier for the agent. [optional] # noqa: E501
|
|
250
|
+
agent_name (str): Display name of the agent. [optional] # noqa: E501
|
|
251
|
+
answered (bool): Whether the agent answered the call. [optional] # noqa: E501
|
|
252
|
+
call_sid (str): Twilio call SID for the agent's call leg. [optional] # noqa: E501
|
|
253
|
+
joined_at_dts (str): Timestamp when the agent joined the call. [optional] # noqa: E501
|
|
254
|
+
left_at_dts (str): Timestamp when the agent left the call. [optional] # noqa: E501
|
|
255
|
+
role (str): Role of the agent in the call. [optional] # noqa: E501
|
|
256
|
+
worker_sid (str): Twilio TaskRouter worker SID. [optional] # noqa: E501
|
|
257
|
+
"""
|
|
258
|
+
|
|
259
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
260
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
261
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
262
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
263
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
264
|
+
|
|
265
|
+
if args:
|
|
266
|
+
for arg in args:
|
|
267
|
+
if isinstance(arg, dict):
|
|
268
|
+
kwargs.update(arg)
|
|
269
|
+
else:
|
|
270
|
+
raise ApiTypeError(
|
|
271
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
272
|
+
args,
|
|
273
|
+
self.__class__.__name__,
|
|
274
|
+
),
|
|
275
|
+
path_to_item=_path_to_item,
|
|
276
|
+
valid_classes=(self.__class__,),
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
self._data_store = {}
|
|
280
|
+
self._check_type = _check_type
|
|
281
|
+
self._spec_property_naming = _spec_property_naming
|
|
282
|
+
self._path_to_item = _path_to_item
|
|
283
|
+
self._configuration = _configuration
|
|
284
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
285
|
+
|
|
286
|
+
for var_name, var_value in kwargs.items():
|
|
287
|
+
if var_name not in self.attribute_map and \
|
|
288
|
+
self._configuration is not None and \
|
|
289
|
+
self._configuration.discard_unknown_keys and \
|
|
290
|
+
self.additional_properties_type is None:
|
|
291
|
+
# discard variable.
|
|
292
|
+
continue
|
|
293
|
+
setattr(self, var_name, var_value)
|
|
294
|
+
if var_name in self.read_only_vars:
|
|
295
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
296
|
+
f"class with read only attributes.")
|