ultracart-rest-sdk 4.1.39__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_client.py +1 -1
- ultracart/configuration.py +1 -1
- ultracart/model/conversation_agent_profile.py +15 -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/models/__init__.py +6 -0
- {ultracart_rest_sdk-4.1.39.dist-info → ultracart_rest_sdk-4.1.41.dist-info}/METADATA +1 -1
- {ultracart_rest_sdk-4.1.39.dist-info → ultracart_rest_sdk-4.1.41.dist-info}/RECORD +18 -12
- {ultracart_rest_sdk-4.1.39.dist-info → ultracart_rest_sdk-4.1.41.dist-info}/LICENSE +0 -0
- {ultracart_rest_sdk-4.1.39.dist-info → ultracart_rest_sdk-4.1.41.dist-info}/WHEEL +0 -0
- {ultracart_rest_sdk-4.1.39.dist-info → ultracart_rest_sdk-4.1.41.dist-info}/top_level.txt +0 -0
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):
|
|
@@ -60,6 +60,13 @@ class ConversationAgentProfile(ModelNormal):
|
|
|
60
60
|
"""
|
|
61
61
|
|
|
62
62
|
allowed_values = {
|
|
63
|
+
('ai_voice_personality',): {
|
|
64
|
+
'ARA': "Ara",
|
|
65
|
+
'REX': "Rex",
|
|
66
|
+
'SAL': "Sal",
|
|
67
|
+
'EVE': "Eve",
|
|
68
|
+
'LEO': "Leo",
|
|
69
|
+
},
|
|
63
70
|
('default_status',): {
|
|
64
71
|
'AVAILABLE': "available",
|
|
65
72
|
'BUSY': "busy",
|
|
@@ -99,6 +106,8 @@ class ConversationAgentProfile(ModelNormal):
|
|
|
99
106
|
'ai_persona': (str,), # noqa: E501
|
|
100
107
|
'ai_sms_instructions': (str,), # noqa: E501
|
|
101
108
|
'ai_ticket_instructions': (str,), # noqa: E501
|
|
109
|
+
'ai_voice_instructions': (str,), # noqa: E501
|
|
110
|
+
'ai_voice_personality': (str,), # noqa: E501
|
|
102
111
|
'chat_limit': (int,), # noqa: E501
|
|
103
112
|
'default_language_iso_code': (str,), # noqa: E501
|
|
104
113
|
'default_status': (str,), # noqa: E501
|
|
@@ -123,6 +132,8 @@ class ConversationAgentProfile(ModelNormal):
|
|
|
123
132
|
'ai_persona': 'ai_persona', # noqa: E501
|
|
124
133
|
'ai_sms_instructions': 'ai_sms_instructions', # noqa: E501
|
|
125
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
|
|
126
137
|
'chat_limit': 'chat_limit', # noqa: E501
|
|
127
138
|
'default_language_iso_code': 'default_language_iso_code', # noqa: E501
|
|
128
139
|
'default_status': 'default_status', # noqa: E501
|
|
@@ -182,6 +193,8 @@ class ConversationAgentProfile(ModelNormal):
|
|
|
182
193
|
ai_persona (str): Persona of this AI agent. [optional] # noqa: E501
|
|
183
194
|
ai_sms_instructions (str): Additional instructions for this AI when handle SMS messages. [optional] # noqa: E501
|
|
184
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
|
|
185
198
|
chat_limit (int): The number of engagement chats that can be pushed on them at any given time.. [optional] # noqa: E501
|
|
186
199
|
default_language_iso_code (str): The default language the agent is chatting in. [optional] # noqa: E501
|
|
187
200
|
default_status (str): Default status when the agent loads conversations app.. [optional] # noqa: E501
|
|
@@ -283,6 +296,8 @@ class ConversationAgentProfile(ModelNormal):
|
|
|
283
296
|
ai_persona (str): Persona of this AI agent. [optional] # noqa: E501
|
|
284
297
|
ai_sms_instructions (str): Additional instructions for this AI when handle SMS messages. [optional] # noqa: E501
|
|
285
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
|
|
286
301
|
chat_limit (int): The number of engagement chats that can be pushed on them at any given time.. [optional] # noqa: E501
|
|
287
302
|
default_language_iso_code (str): The default language the agent is chatting in. [optional] # noqa: E501
|
|
288
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.")
|