ultracart-rest-sdk 4.1.37__py3-none-any.whl → 4.1.41__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 +1382 -125
- ultracart/api/item_api.py +137 -0
- ultracart/api_client.py +1 -1
- ultracart/configuration.py +1 -1
- ultracart/model/conversation_agent_profile.py +25 -0
- ultracart/model/conversation_pbx_address.py +338 -0
- ultracart/model/conversation_pbx_address_response.py +292 -0
- ultracart/model/conversation_pbx_addresses_response.py +270 -0
- ultracart/model/conversation_pbx_available_phone_number.py +317 -0
- ultracart/model/conversation_pbx_available_phone_numbers_response.py +292 -0
- ultracart/model/conversation_pbx_phone_number.py +4 -0
- ultracart/model/conversation_pbx_phone_number_purchase_request.py +302 -0
- ultracart/model/conversation_pbx_queue.py +13 -0
- ultracart/model/item_inventory_update.py +272 -0
- ultracart/model/item_inventory_update_request.py +270 -0
- ultracart/models/__init__.py +8 -0
- {ultracart_rest_sdk-4.1.37.dist-info → ultracart_rest_sdk-4.1.41.dist-info}/METADATA +1 -1
- {ultracart_rest_sdk-4.1.37.dist-info → ultracart_rest_sdk-4.1.41.dist-info}/RECORD +22 -14
- {ultracart_rest_sdk-4.1.37.dist-info → ultracart_rest_sdk-4.1.41.dist-info}/LICENSE +0 -0
- {ultracart_rest_sdk-4.1.37.dist-info → ultracart_rest_sdk-4.1.41.dist-info}/WHEEL +0 -0
- {ultracart_rest_sdk-4.1.37.dist-info → ultracart_rest_sdk-4.1.41.dist-info}/top_level.txt +0 -0
ultracart/api/item_api.py
CHANGED
|
@@ -29,6 +29,7 @@ from ultracart.model.item_digital_item import ItemDigitalItem
|
|
|
29
29
|
from ultracart.model.item_digital_item_response import ItemDigitalItemResponse
|
|
30
30
|
from ultracart.model.item_digital_items_response import ItemDigitalItemsResponse
|
|
31
31
|
from ultracart.model.item_inventory_snapshot_response import ItemInventorySnapshotResponse
|
|
32
|
+
from ultracart.model.item_inventory_update_request import ItemInventoryUpdateRequest
|
|
32
33
|
from ultracart.model.item_response import ItemResponse
|
|
33
34
|
from ultracart.model.item_review import ItemReview
|
|
34
35
|
from ultracart.model.item_review_response import ItemReviewResponse
|
|
@@ -1323,6 +1324,59 @@ class ItemApi(object):
|
|
|
1323
1324
|
},
|
|
1324
1325
|
api_client=api_client
|
|
1325
1326
|
)
|
|
1327
|
+
self.update_item_inventories_endpoint = _Endpoint(
|
|
1328
|
+
settings={
|
|
1329
|
+
'response_type': None,
|
|
1330
|
+
'auth': [
|
|
1331
|
+
'ultraCartOauth',
|
|
1332
|
+
'ultraCartSimpleApiKey'
|
|
1333
|
+
],
|
|
1334
|
+
'endpoint_path': '/item/items/update_item_inventories',
|
|
1335
|
+
'operation_id': 'update_item_inventories',
|
|
1336
|
+
'http_method': 'PUT',
|
|
1337
|
+
'servers': None,
|
|
1338
|
+
},
|
|
1339
|
+
params_map={
|
|
1340
|
+
'all': [
|
|
1341
|
+
'item_inventory_update_request',
|
|
1342
|
+
],
|
|
1343
|
+
'required': [
|
|
1344
|
+
'item_inventory_update_request',
|
|
1345
|
+
],
|
|
1346
|
+
'nullable': [
|
|
1347
|
+
],
|
|
1348
|
+
'enum': [
|
|
1349
|
+
],
|
|
1350
|
+
'validation': [
|
|
1351
|
+
]
|
|
1352
|
+
},
|
|
1353
|
+
root_map={
|
|
1354
|
+
'validations': {
|
|
1355
|
+
},
|
|
1356
|
+
'allowed_values': {
|
|
1357
|
+
},
|
|
1358
|
+
'openapi_types': {
|
|
1359
|
+
'item_inventory_update_request':
|
|
1360
|
+
(ItemInventoryUpdateRequest,),
|
|
1361
|
+
},
|
|
1362
|
+
'attribute_map': {
|
|
1363
|
+
},
|
|
1364
|
+
'location_map': {
|
|
1365
|
+
'item_inventory_update_request': 'body',
|
|
1366
|
+
},
|
|
1367
|
+
'collection_format_map': {
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
headers_map={
|
|
1371
|
+
'accept': [
|
|
1372
|
+
'application/json'
|
|
1373
|
+
],
|
|
1374
|
+
'content_type': [
|
|
1375
|
+
'application/json; charset=UTF-8'
|
|
1376
|
+
]
|
|
1377
|
+
},
|
|
1378
|
+
api_client=api_client
|
|
1379
|
+
)
|
|
1326
1380
|
self.update_item_shipping_distribution_center_by_code_endpoint = _Endpoint(
|
|
1327
1381
|
settings={
|
|
1328
1382
|
'response_type': None,
|
|
@@ -3353,6 +3407,89 @@ class ItemApi(object):
|
|
|
3353
3407
|
item
|
|
3354
3408
|
return self.update_item_endpoint.call_with_http_info(**kwargs)
|
|
3355
3409
|
|
|
3410
|
+
def update_item_inventories(
|
|
3411
|
+
self,
|
|
3412
|
+
item_inventory_update_request,
|
|
3413
|
+
**kwargs
|
|
3414
|
+
):
|
|
3415
|
+
"""Update item inventories for a distribution center # noqa: E501
|
|
3416
|
+
|
|
3417
|
+
Update item inventories for a distribution center # noqa: E501
|
|
3418
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
3419
|
+
asynchronous HTTP request, please pass async_req=True
|
|
3420
|
+
|
|
3421
|
+
>>> thread = api.update_item_inventories(item_inventory_update_request, async_req=True)
|
|
3422
|
+
>>> result = thread.get()
|
|
3423
|
+
|
|
3424
|
+
Args:
|
|
3425
|
+
item_inventory_update_request (ItemInventoryUpdateRequest): Item inventory updates
|
|
3426
|
+
|
|
3427
|
+
Keyword Args:
|
|
3428
|
+
_return_http_data_only (bool): response data without head status
|
|
3429
|
+
code and headers. Default is True.
|
|
3430
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
3431
|
+
will be returned without reading/decoding response data.
|
|
3432
|
+
Default is True.
|
|
3433
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
3434
|
+
one number provided, it will be total request timeout. It can also
|
|
3435
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
3436
|
+
Default is None.
|
|
3437
|
+
_check_input_type (bool): specifies if type checking
|
|
3438
|
+
should be done one the data sent to the server.
|
|
3439
|
+
Default is True.
|
|
3440
|
+
_check_return_type (bool): specifies if type checking
|
|
3441
|
+
should be done one the data received from the server.
|
|
3442
|
+
Default is True.
|
|
3443
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
3444
|
+
are serialized names, as specified in the OpenAPI document.
|
|
3445
|
+
False if the variable names in the input data
|
|
3446
|
+
are pythonic names, e.g. snake case (default)
|
|
3447
|
+
_content_type (str/None): force body content-type.
|
|
3448
|
+
Default is None and content-type will be predicted by allowed
|
|
3449
|
+
content-types and body.
|
|
3450
|
+
_host_index (int/None): specifies the index of the server
|
|
3451
|
+
that we want to use.
|
|
3452
|
+
Default is read from the configuration.
|
|
3453
|
+
_request_auths (list): set to override the auth_settings for an a single
|
|
3454
|
+
request; this effectively ignores the authentication
|
|
3455
|
+
in the spec for a single request.
|
|
3456
|
+
Default is None
|
|
3457
|
+
async_req (bool): execute request asynchronously
|
|
3458
|
+
|
|
3459
|
+
Returns:
|
|
3460
|
+
None
|
|
3461
|
+
If the method is called asynchronously, returns the request
|
|
3462
|
+
thread.
|
|
3463
|
+
"""
|
|
3464
|
+
kwargs['async_req'] = kwargs.get(
|
|
3465
|
+
'async_req', False
|
|
3466
|
+
)
|
|
3467
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
3468
|
+
'_return_http_data_only', True
|
|
3469
|
+
)
|
|
3470
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
3471
|
+
'_preload_content', True
|
|
3472
|
+
)
|
|
3473
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
3474
|
+
'_request_timeout', None
|
|
3475
|
+
)
|
|
3476
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
3477
|
+
'_check_input_type', True
|
|
3478
|
+
)
|
|
3479
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
3480
|
+
'_check_return_type', True
|
|
3481
|
+
)
|
|
3482
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
3483
|
+
'_spec_property_naming', False
|
|
3484
|
+
)
|
|
3485
|
+
kwargs['_content_type'] = kwargs.get(
|
|
3486
|
+
'_content_type')
|
|
3487
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
3488
|
+
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
3489
|
+
kwargs['item_inventory_update_request'] = \
|
|
3490
|
+
item_inventory_update_request
|
|
3491
|
+
return self.update_item_inventories_endpoint.call_with_http_info(**kwargs)
|
|
3492
|
+
|
|
3356
3493
|
def update_item_shipping_distribution_center_by_code(
|
|
3357
3494
|
self,
|
|
3358
3495
|
merchant_item_oid,
|
ultracart/api_client.py
CHANGED
|
@@ -77,7 +77,7 @@ class ApiClient(object):
|
|
|
77
77
|
self.default_headers[header_name] = header_value
|
|
78
78
|
self.cookie = cookie
|
|
79
79
|
# Set default User-Agent.
|
|
80
|
-
self.user_agent = 'OpenAPI-Generator/4.1.
|
|
80
|
+
self.user_agent = 'OpenAPI-Generator/4.1.41/python'
|
|
81
81
|
|
|
82
82
|
def __enter__(self):
|
|
83
83
|
return self
|
ultracart/configuration.py
CHANGED
|
@@ -422,7 +422,7 @@ conf = ultracart.Configuration(
|
|
|
422
422
|
"OS: {env}\n"\
|
|
423
423
|
"Python Version: {pyversion}\n"\
|
|
424
424
|
"Version of the API: 2.0.0\n"\
|
|
425
|
-
"SDK Package Version: 4.1.
|
|
425
|
+
"SDK Package Version: 4.1.41".\
|
|
426
426
|
format(env=sys.platform, pyversion=sys.version)
|
|
427
427
|
|
|
428
428
|
def get_host_settings(self):
|
|
@@ -30,6 +30,10 @@ from ultracart.model_utils import ( # noqa: F401
|
|
|
30
30
|
from ultracart.exceptions import ApiAttributeError
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
def lazy_import():
|
|
34
|
+
from ultracart.model.conversation_virtual_agent_capabilities import ConversationVirtualAgentCapabilities
|
|
35
|
+
globals()['ConversationVirtualAgentCapabilities'] = ConversationVirtualAgentCapabilities
|
|
36
|
+
|
|
33
37
|
|
|
34
38
|
class ConversationAgentProfile(ModelNormal):
|
|
35
39
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
@@ -56,6 +60,13 @@ class ConversationAgentProfile(ModelNormal):
|
|
|
56
60
|
"""
|
|
57
61
|
|
|
58
62
|
allowed_values = {
|
|
63
|
+
('ai_voice_personality',): {
|
|
64
|
+
'ARA': "Ara",
|
|
65
|
+
'REX': "Rex",
|
|
66
|
+
'SAL': "Sal",
|
|
67
|
+
'EVE': "Eve",
|
|
68
|
+
'LEO': "Leo",
|
|
69
|
+
},
|
|
59
70
|
('default_status',): {
|
|
60
71
|
'AVAILABLE': "available",
|
|
61
72
|
'BUSY': "busy",
|
|
@@ -72,6 +83,7 @@ class ConversationAgentProfile(ModelNormal):
|
|
|
72
83
|
This must be a method because a model may have properties that are
|
|
73
84
|
of type self, this must run after the class is loaded
|
|
74
85
|
"""
|
|
86
|
+
lazy_import()
|
|
75
87
|
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
76
88
|
|
|
77
89
|
_nullable = False
|
|
@@ -86,12 +98,16 @@ class ConversationAgentProfile(ModelNormal):
|
|
|
86
98
|
openapi_types (dict): The key is attribute name
|
|
87
99
|
and the value is attribute type.
|
|
88
100
|
"""
|
|
101
|
+
lazy_import()
|
|
89
102
|
return {
|
|
90
103
|
'ai': (bool,), # noqa: E501
|
|
104
|
+
'ai_capabilities': (ConversationVirtualAgentCapabilities,), # noqa: E501
|
|
91
105
|
'ai_chat_instructions': (str,), # noqa: E501
|
|
92
106
|
'ai_persona': (str,), # noqa: E501
|
|
93
107
|
'ai_sms_instructions': (str,), # noqa: E501
|
|
94
108
|
'ai_ticket_instructions': (str,), # noqa: E501
|
|
109
|
+
'ai_voice_instructions': (str,), # noqa: E501
|
|
110
|
+
'ai_voice_personality': (str,), # noqa: E501
|
|
95
111
|
'chat_limit': (int,), # noqa: E501
|
|
96
112
|
'default_language_iso_code': (str,), # noqa: E501
|
|
97
113
|
'default_status': (str,), # noqa: E501
|
|
@@ -111,10 +127,13 @@ class ConversationAgentProfile(ModelNormal):
|
|
|
111
127
|
|
|
112
128
|
attribute_map = {
|
|
113
129
|
'ai': 'ai', # noqa: E501
|
|
130
|
+
'ai_capabilities': 'ai_capabilities', # noqa: E501
|
|
114
131
|
'ai_chat_instructions': 'ai_chat_instructions', # noqa: E501
|
|
115
132
|
'ai_persona': 'ai_persona', # noqa: E501
|
|
116
133
|
'ai_sms_instructions': 'ai_sms_instructions', # noqa: E501
|
|
117
134
|
'ai_ticket_instructions': 'ai_ticket_instructions', # noqa: E501
|
|
135
|
+
'ai_voice_instructions': 'ai_voice_instructions', # noqa: E501
|
|
136
|
+
'ai_voice_personality': 'ai_voice_personality', # noqa: E501
|
|
118
137
|
'chat_limit': 'chat_limit', # noqa: E501
|
|
119
138
|
'default_language_iso_code': 'default_language_iso_code', # noqa: E501
|
|
120
139
|
'default_status': 'default_status', # noqa: E501
|
|
@@ -169,10 +188,13 @@ class ConversationAgentProfile(ModelNormal):
|
|
|
169
188
|
through its discriminator because we passed in
|
|
170
189
|
_visited_composed_classes = (Animal,)
|
|
171
190
|
ai (bool): AI powered chat bot. [optional] # noqa: E501
|
|
191
|
+
ai_capabilities (ConversationVirtualAgentCapabilities): [optional] # noqa: E501
|
|
172
192
|
ai_chat_instructions (str): Additional instructions for this AI when handle web chats. [optional] # noqa: E501
|
|
173
193
|
ai_persona (str): Persona of this AI agent. [optional] # noqa: E501
|
|
174
194
|
ai_sms_instructions (str): Additional instructions for this AI when handle SMS messages. [optional] # noqa: E501
|
|
175
195
|
ai_ticket_instructions (str): Additional instructions for this AI when handling ticket draft replies. [optional] # noqa: E501
|
|
196
|
+
ai_voice_instructions (str): Additional voice instructions for this AI when handling voice calls. [optional] # noqa: E501
|
|
197
|
+
ai_voice_personality (str): Which AI voice personality to use when handling the call.. [optional] # noqa: E501
|
|
176
198
|
chat_limit (int): The number of engagement chats that can be pushed on them at any given time.. [optional] # noqa: E501
|
|
177
199
|
default_language_iso_code (str): The default language the agent is chatting in. [optional] # noqa: E501
|
|
178
200
|
default_status (str): Default status when the agent loads conversations app.. [optional] # noqa: E501
|
|
@@ -269,10 +291,13 @@ class ConversationAgentProfile(ModelNormal):
|
|
|
269
291
|
through its discriminator because we passed in
|
|
270
292
|
_visited_composed_classes = (Animal,)
|
|
271
293
|
ai (bool): AI powered chat bot. [optional] # noqa: E501
|
|
294
|
+
ai_capabilities (ConversationVirtualAgentCapabilities): [optional] # noqa: E501
|
|
272
295
|
ai_chat_instructions (str): Additional instructions for this AI when handle web chats. [optional] # noqa: E501
|
|
273
296
|
ai_persona (str): Persona of this AI agent. [optional] # noqa: E501
|
|
274
297
|
ai_sms_instructions (str): Additional instructions for this AI when handle SMS messages. [optional] # noqa: E501
|
|
275
298
|
ai_ticket_instructions (str): Additional instructions for this AI when handling ticket draft replies. [optional] # noqa: E501
|
|
299
|
+
ai_voice_instructions (str): Additional voice instructions for this AI when handling voice calls. [optional] # noqa: E501
|
|
300
|
+
ai_voice_personality (str): Which AI voice personality to use when handling the call.. [optional] # noqa: E501
|
|
276
301
|
chat_limit (int): The number of engagement chats that can be pushed on them at any given time.. [optional] # noqa: E501
|
|
277
302
|
default_language_iso_code (str): The default language the agent is chatting in. [optional] # noqa: E501
|
|
278
303
|
default_status (str): Default status when the agent loads conversations app.. [optional] # noqa: E501
|
|
@@ -0,0 +1,338 @@
|
|
|
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 ConversationPbxAddress(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
|
+
('address_sid',): {
|
|
63
|
+
'max_length': 50,
|
|
64
|
+
},
|
|
65
|
+
('city',): {
|
|
66
|
+
'max_length': 100,
|
|
67
|
+
},
|
|
68
|
+
('conversation_pbx_address_uuid',): {
|
|
69
|
+
'max_length': 50,
|
|
70
|
+
},
|
|
71
|
+
('country_code',): {
|
|
72
|
+
'max_length': 2,
|
|
73
|
+
},
|
|
74
|
+
('customer_name',): {
|
|
75
|
+
'max_length': 100,
|
|
76
|
+
},
|
|
77
|
+
('friendly_name',): {
|
|
78
|
+
'max_length': 100,
|
|
79
|
+
},
|
|
80
|
+
('merchant_id',): {
|
|
81
|
+
'max_length': 5,
|
|
82
|
+
},
|
|
83
|
+
('postal_code',): {
|
|
84
|
+
'max_length': 20,
|
|
85
|
+
},
|
|
86
|
+
('region',): {
|
|
87
|
+
'max_length': 50,
|
|
88
|
+
},
|
|
89
|
+
('street',): {
|
|
90
|
+
'max_length': 200,
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@cached_property
|
|
95
|
+
def additional_properties_type():
|
|
96
|
+
"""
|
|
97
|
+
This must be a method because a model may have properties that are
|
|
98
|
+
of type self, this must run after the class is loaded
|
|
99
|
+
"""
|
|
100
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
101
|
+
|
|
102
|
+
_nullable = False
|
|
103
|
+
|
|
104
|
+
@cached_property
|
|
105
|
+
def openapi_types():
|
|
106
|
+
"""
|
|
107
|
+
This must be a method because a model may have properties that are
|
|
108
|
+
of type self, this must run after the class is loaded
|
|
109
|
+
|
|
110
|
+
Returns
|
|
111
|
+
openapi_types (dict): The key is attribute name
|
|
112
|
+
and the value is attribute type.
|
|
113
|
+
"""
|
|
114
|
+
return {
|
|
115
|
+
'address_sid': (str,), # noqa: E501
|
|
116
|
+
'city': (str,), # noqa: E501
|
|
117
|
+
'conversation_pbx_address_uuid': (str,), # noqa: E501
|
|
118
|
+
'country_code': (str,), # noqa: E501
|
|
119
|
+
'customer_name': (str,), # noqa: E501
|
|
120
|
+
'friendly_name': (str,), # noqa: E501
|
|
121
|
+
'merchant_id': (str,), # noqa: E501
|
|
122
|
+
'postal_code': (str,), # noqa: E501
|
|
123
|
+
'region': (str,), # noqa: E501
|
|
124
|
+
'street': (str,), # noqa: E501
|
|
125
|
+
'validated': (bool,), # noqa: E501
|
|
126
|
+
'verified': (bool,), # noqa: E501
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@cached_property
|
|
130
|
+
def discriminator():
|
|
131
|
+
return None
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
attribute_map = {
|
|
135
|
+
'address_sid': 'address_sid', # noqa: E501
|
|
136
|
+
'city': 'city', # noqa: E501
|
|
137
|
+
'conversation_pbx_address_uuid': 'conversation_pbx_address_uuid', # noqa: E501
|
|
138
|
+
'country_code': 'country_code', # noqa: E501
|
|
139
|
+
'customer_name': 'customer_name', # noqa: E501
|
|
140
|
+
'friendly_name': 'friendly_name', # noqa: E501
|
|
141
|
+
'merchant_id': 'merchant_id', # noqa: E501
|
|
142
|
+
'postal_code': 'postal_code', # noqa: E501
|
|
143
|
+
'region': 'region', # noqa: E501
|
|
144
|
+
'street': 'street', # noqa: E501
|
|
145
|
+
'validated': 'validated', # noqa: E501
|
|
146
|
+
'verified': 'verified', # noqa: E501
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
read_only_vars = {
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
_composed_schemas = {}
|
|
153
|
+
|
|
154
|
+
@classmethod
|
|
155
|
+
@convert_js_args_to_python_args
|
|
156
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
157
|
+
"""ConversationPbxAddress - a model defined in OpenAPI
|
|
158
|
+
|
|
159
|
+
Keyword Args:
|
|
160
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
161
|
+
will be type checked and a TypeError will be
|
|
162
|
+
raised if the wrong type is input.
|
|
163
|
+
Defaults to True
|
|
164
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
165
|
+
drill down to the model in received_data
|
|
166
|
+
when deserializing a response
|
|
167
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
168
|
+
are serialized names, as specified in the OpenAPI document.
|
|
169
|
+
False if the variable names in the input data
|
|
170
|
+
are pythonic names, e.g. snake case (default)
|
|
171
|
+
_configuration (Configuration): the instance to use when
|
|
172
|
+
deserializing a file_type parameter.
|
|
173
|
+
If passed, type conversion is attempted
|
|
174
|
+
If omitted no type conversion is done.
|
|
175
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
176
|
+
classes that we have traveled through so that
|
|
177
|
+
if we see that class again we will not use its
|
|
178
|
+
discriminator again.
|
|
179
|
+
When traveling through a discriminator, the
|
|
180
|
+
composed schema that is
|
|
181
|
+
is traveled through is added to this set.
|
|
182
|
+
For example if Animal has a discriminator
|
|
183
|
+
petType and we pass in "Dog", and the class Dog
|
|
184
|
+
allOf includes Animal, we move through Animal
|
|
185
|
+
once using the discriminator, and pick Dog.
|
|
186
|
+
Then in Dog, we will make an instance of the
|
|
187
|
+
Animal class but this time we won't travel
|
|
188
|
+
through its discriminator because we passed in
|
|
189
|
+
_visited_composed_classes = (Animal,)
|
|
190
|
+
address_sid (str): Twilio Address SID. [optional] # noqa: E501
|
|
191
|
+
city (str): City. [optional] # noqa: E501
|
|
192
|
+
conversation_pbx_address_uuid (str): Conversation Pbx Address UUID. [optional] # noqa: E501
|
|
193
|
+
country_code (str): ISO country code (2 characters). [optional] # noqa: E501
|
|
194
|
+
customer_name (str): Customer name. [optional] # noqa: E501
|
|
195
|
+
friendly_name (str): Friendly name for the address. [optional] # noqa: E501
|
|
196
|
+
merchant_id (str): Merchant Id. [optional] # noqa: E501
|
|
197
|
+
postal_code (str): Postal code. [optional] # noqa: E501
|
|
198
|
+
region (str): State/Province/Region. [optional] # noqa: E501
|
|
199
|
+
street (str): Street address. [optional] # noqa: E501
|
|
200
|
+
validated (bool): Whether the address has been validated by Twilio. [optional] # noqa: E501
|
|
201
|
+
verified (bool): Whether the address has been verified by Twilio. [optional] # noqa: E501
|
|
202
|
+
"""
|
|
203
|
+
|
|
204
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
205
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
206
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
207
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
208
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
209
|
+
|
|
210
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
211
|
+
|
|
212
|
+
if args:
|
|
213
|
+
for arg in args:
|
|
214
|
+
if isinstance(arg, dict):
|
|
215
|
+
kwargs.update(arg)
|
|
216
|
+
else:
|
|
217
|
+
raise ApiTypeError(
|
|
218
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
219
|
+
args,
|
|
220
|
+
self.__class__.__name__,
|
|
221
|
+
),
|
|
222
|
+
path_to_item=_path_to_item,
|
|
223
|
+
valid_classes=(self.__class__,),
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
self._data_store = {}
|
|
227
|
+
self._check_type = _check_type
|
|
228
|
+
self._spec_property_naming = _spec_property_naming
|
|
229
|
+
self._path_to_item = _path_to_item
|
|
230
|
+
self._configuration = _configuration
|
|
231
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
232
|
+
|
|
233
|
+
for var_name, var_value in kwargs.items():
|
|
234
|
+
if var_name not in self.attribute_map and \
|
|
235
|
+
self._configuration is not None and \
|
|
236
|
+
self._configuration.discard_unknown_keys and \
|
|
237
|
+
self.additional_properties_type is None:
|
|
238
|
+
# discard variable.
|
|
239
|
+
continue
|
|
240
|
+
setattr(self, var_name, var_value)
|
|
241
|
+
return self
|
|
242
|
+
|
|
243
|
+
required_properties = set([
|
|
244
|
+
'_data_store',
|
|
245
|
+
'_check_type',
|
|
246
|
+
'_spec_property_naming',
|
|
247
|
+
'_path_to_item',
|
|
248
|
+
'_configuration',
|
|
249
|
+
'_visited_composed_classes',
|
|
250
|
+
])
|
|
251
|
+
|
|
252
|
+
@convert_js_args_to_python_args
|
|
253
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
254
|
+
"""ConversationPbxAddress - a model defined in OpenAPI
|
|
255
|
+
|
|
256
|
+
Keyword Args:
|
|
257
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
258
|
+
will be type checked and a TypeError will be
|
|
259
|
+
raised if the wrong type is input.
|
|
260
|
+
Defaults to True
|
|
261
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
262
|
+
drill down to the model in received_data
|
|
263
|
+
when deserializing a response
|
|
264
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
265
|
+
are serialized names, as specified in the OpenAPI document.
|
|
266
|
+
False if the variable names in the input data
|
|
267
|
+
are pythonic names, e.g. snake case (default)
|
|
268
|
+
_configuration (Configuration): the instance to use when
|
|
269
|
+
deserializing a file_type parameter.
|
|
270
|
+
If passed, type conversion is attempted
|
|
271
|
+
If omitted no type conversion is done.
|
|
272
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
273
|
+
classes that we have traveled through so that
|
|
274
|
+
if we see that class again we will not use its
|
|
275
|
+
discriminator again.
|
|
276
|
+
When traveling through a discriminator, the
|
|
277
|
+
composed schema that is
|
|
278
|
+
is traveled through is added to this set.
|
|
279
|
+
For example if Animal has a discriminator
|
|
280
|
+
petType and we pass in "Dog", and the class Dog
|
|
281
|
+
allOf includes Animal, we move through Animal
|
|
282
|
+
once using the discriminator, and pick Dog.
|
|
283
|
+
Then in Dog, we will make an instance of the
|
|
284
|
+
Animal class but this time we won't travel
|
|
285
|
+
through its discriminator because we passed in
|
|
286
|
+
_visited_composed_classes = (Animal,)
|
|
287
|
+
address_sid (str): Twilio Address SID. [optional] # noqa: E501
|
|
288
|
+
city (str): City. [optional] # noqa: E501
|
|
289
|
+
conversation_pbx_address_uuid (str): Conversation Pbx Address UUID. [optional] # noqa: E501
|
|
290
|
+
country_code (str): ISO country code (2 characters). [optional] # noqa: E501
|
|
291
|
+
customer_name (str): Customer name. [optional] # noqa: E501
|
|
292
|
+
friendly_name (str): Friendly name for the address. [optional] # noqa: E501
|
|
293
|
+
merchant_id (str): Merchant Id. [optional] # noqa: E501
|
|
294
|
+
postal_code (str): Postal code. [optional] # noqa: E501
|
|
295
|
+
region (str): State/Province/Region. [optional] # noqa: E501
|
|
296
|
+
street (str): Street address. [optional] # noqa: E501
|
|
297
|
+
validated (bool): Whether the address has been validated by Twilio. [optional] # noqa: E501
|
|
298
|
+
verified (bool): Whether the address has been verified by Twilio. [optional] # noqa: E501
|
|
299
|
+
"""
|
|
300
|
+
|
|
301
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
302
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
303
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
304
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
305
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
306
|
+
|
|
307
|
+
if args:
|
|
308
|
+
for arg in args:
|
|
309
|
+
if isinstance(arg, dict):
|
|
310
|
+
kwargs.update(arg)
|
|
311
|
+
else:
|
|
312
|
+
raise ApiTypeError(
|
|
313
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
314
|
+
args,
|
|
315
|
+
self.__class__.__name__,
|
|
316
|
+
),
|
|
317
|
+
path_to_item=_path_to_item,
|
|
318
|
+
valid_classes=(self.__class__,),
|
|
319
|
+
)
|
|
320
|
+
|
|
321
|
+
self._data_store = {}
|
|
322
|
+
self._check_type = _check_type
|
|
323
|
+
self._spec_property_naming = _spec_property_naming
|
|
324
|
+
self._path_to_item = _path_to_item
|
|
325
|
+
self._configuration = _configuration
|
|
326
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
327
|
+
|
|
328
|
+
for var_name, var_value in kwargs.items():
|
|
329
|
+
if var_name not in self.attribute_map and \
|
|
330
|
+
self._configuration is not None and \
|
|
331
|
+
self._configuration.discard_unknown_keys and \
|
|
332
|
+
self.additional_properties_type is None:
|
|
333
|
+
# discard variable.
|
|
334
|
+
continue
|
|
335
|
+
setattr(self, var_name, var_value)
|
|
336
|
+
if var_name in self.read_only_vars:
|
|
337
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
338
|
+
f"class with read only attributes.")
|