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.
Files changed (33) hide show
  1. ultracart/__init__.py +1 -1
  2. ultracart/api/conversation_api.py +292 -0
  3. ultracart/api_client.py +1 -1
  4. ultracart/configuration.py +1 -1
  5. ultracart/model/conversation_pbx_agent.py +21 -4
  6. ultracart/model/conversation_pbx_call.py +370 -0
  7. ultracart/model/conversation_pbx_call_agent.py +296 -0
  8. ultracart/model/conversation_pbx_call_ai_cost.py +276 -0
  9. ultracart/model/conversation_pbx_call_ai_engagement.py +314 -0
  10. ultracart/model/conversation_pbx_call_ai_tool_call.py +296 -0
  11. ultracart/model/conversation_pbx_call_ai_whisper.py +276 -0
  12. ultracart/model/conversation_pbx_call_caller.py +280 -0
  13. ultracart/model/conversation_pbx_call_financial.py +288 -0
  14. ultracart/model/conversation_pbx_call_hold.py +276 -0
  15. ultracart/model/conversation_pbx_call_queue.py +284 -0
  16. ultracart/model/conversation_pbx_call_recording.py +294 -0
  17. ultracart/model/conversation_pbx_call_response.py +292 -0
  18. ultracart/model/conversation_pbx_call_routing.py +278 -0
  19. ultracart/model/conversation_pbx_call_search_request.py +324 -0
  20. ultracart/model/conversation_pbx_call_search_response.py +292 -0
  21. ultracart/model/conversation_pbx_call_timeline.py +284 -0
  22. ultracart/model/conversation_pbx_call_transcript.py +294 -0
  23. ultracart/model/conversation_pbx_call_transcript_segment.py +292 -0
  24. ultracart/model/conversation_pbx_call_transfer.py +280 -0
  25. ultracart/model/conversation_pbx_hardware_phone.py +21 -2
  26. ultracart/model/conversation_pbx_phone_number.py +4 -0
  27. ultracart/model/conversation_pbx_queue.py +4 -0
  28. ultracart/models/__init__.py +19 -0
  29. {ultracart_rest_sdk-4.1.49.dist-info → ultracart_rest_sdk-4.1.55.dist-info}/METADATA +1 -1
  30. {ultracart_rest_sdk-4.1.49.dist-info → ultracart_rest_sdk-4.1.55.dist-info}/RECORD +33 -14
  31. {ultracart_rest_sdk-4.1.49.dist-info → ultracart_rest_sdk-4.1.55.dist-info}/LICENSE +0 -0
  32. {ultracart_rest_sdk-4.1.49.dist-info → ultracart_rest_sdk-4.1.55.dist-info}/WHEEL +0 -0
  33. {ultracart_rest_sdk-4.1.49.dist-info → ultracart_rest_sdk-4.1.55.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,280 @@
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 ConversationPbxCallCaller(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
+ 'caller_id': (str,), # noqa: E501
86
+ 'city': (str,), # noqa: E501
87
+ 'country': (str,), # noqa: E501
88
+ 'phone_number': (str,), # noqa: E501
89
+ 'state': (str,), # noqa: E501
90
+ }
91
+
92
+ @cached_property
93
+ def discriminator():
94
+ return None
95
+
96
+
97
+ attribute_map = {
98
+ 'caller_id': 'caller_id', # noqa: E501
99
+ 'city': 'city', # noqa: E501
100
+ 'country': 'country', # noqa: E501
101
+ 'phone_number': 'phone_number', # noqa: E501
102
+ 'state': 'state', # noqa: E501
103
+ }
104
+
105
+ read_only_vars = {
106
+ }
107
+
108
+ _composed_schemas = {}
109
+
110
+ @classmethod
111
+ @convert_js_args_to_python_args
112
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
113
+ """ConversationPbxCallCaller - a model defined in OpenAPI
114
+
115
+ Keyword Args:
116
+ _check_type (bool): if True, values for parameters in openapi_types
117
+ will be type checked and a TypeError will be
118
+ raised if the wrong type is input.
119
+ Defaults to True
120
+ _path_to_item (tuple/list): This is a list of keys or values to
121
+ drill down to the model in received_data
122
+ when deserializing a response
123
+ _spec_property_naming (bool): True if the variable names in the input data
124
+ are serialized names, as specified in the OpenAPI document.
125
+ False if the variable names in the input data
126
+ are pythonic names, e.g. snake case (default)
127
+ _configuration (Configuration): the instance to use when
128
+ deserializing a file_type parameter.
129
+ If passed, type conversion is attempted
130
+ If omitted no type conversion is done.
131
+ _visited_composed_classes (tuple): This stores a tuple of
132
+ classes that we have traveled through so that
133
+ if we see that class again we will not use its
134
+ discriminator again.
135
+ When traveling through a discriminator, the
136
+ composed schema that is
137
+ is traveled through is added to this set.
138
+ For example if Animal has a discriminator
139
+ petType and we pass in "Dog", and the class Dog
140
+ allOf includes Animal, we move through Animal
141
+ once using the discriminator, and pick Dog.
142
+ Then in Dog, we will make an instance of the
143
+ Animal class but this time we won't travel
144
+ through its discriminator because we passed in
145
+ _visited_composed_classes = (Animal,)
146
+ caller_id (str): Caller ID name if available. [optional] # noqa: E501
147
+ city (str): City associated with the phone number. [optional] # noqa: E501
148
+ country (str): Country associated with the phone number (ISO 3166-1 alpha-2). [optional] # noqa: E501
149
+ phone_number (str): Phone number in E.164 format. [optional] # noqa: E501
150
+ state (str): State or province associated with the phone number. [optional] # noqa: E501
151
+ """
152
+
153
+ _check_type = kwargs.pop('_check_type', True)
154
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
155
+ _path_to_item = kwargs.pop('_path_to_item', ())
156
+ _configuration = kwargs.pop('_configuration', None)
157
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
158
+
159
+ self = super(OpenApiModel, cls).__new__(cls)
160
+
161
+ if args:
162
+ for arg in args:
163
+ if isinstance(arg, dict):
164
+ kwargs.update(arg)
165
+ else:
166
+ raise ApiTypeError(
167
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
168
+ args,
169
+ self.__class__.__name__,
170
+ ),
171
+ path_to_item=_path_to_item,
172
+ valid_classes=(self.__class__,),
173
+ )
174
+
175
+ self._data_store = {}
176
+ self._check_type = _check_type
177
+ self._spec_property_naming = _spec_property_naming
178
+ self._path_to_item = _path_to_item
179
+ self._configuration = _configuration
180
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
181
+
182
+ for var_name, var_value in kwargs.items():
183
+ if var_name not in self.attribute_map and \
184
+ self._configuration is not None and \
185
+ self._configuration.discard_unknown_keys and \
186
+ self.additional_properties_type is None:
187
+ # discard variable.
188
+ continue
189
+ setattr(self, var_name, var_value)
190
+ return self
191
+
192
+ required_properties = set([
193
+ '_data_store',
194
+ '_check_type',
195
+ '_spec_property_naming',
196
+ '_path_to_item',
197
+ '_configuration',
198
+ '_visited_composed_classes',
199
+ ])
200
+
201
+ @convert_js_args_to_python_args
202
+ def __init__(self, *args, **kwargs): # noqa: E501
203
+ """ConversationPbxCallCaller - a model defined in OpenAPI
204
+
205
+ Keyword Args:
206
+ _check_type (bool): if True, values for parameters in openapi_types
207
+ will be type checked and a TypeError will be
208
+ raised if the wrong type is input.
209
+ Defaults to True
210
+ _path_to_item (tuple/list): This is a list of keys or values to
211
+ drill down to the model in received_data
212
+ when deserializing a response
213
+ _spec_property_naming (bool): True if the variable names in the input data
214
+ are serialized names, as specified in the OpenAPI document.
215
+ False if the variable names in the input data
216
+ are pythonic names, e.g. snake case (default)
217
+ _configuration (Configuration): the instance to use when
218
+ deserializing a file_type parameter.
219
+ If passed, type conversion is attempted
220
+ If omitted no type conversion is done.
221
+ _visited_composed_classes (tuple): This stores a tuple of
222
+ classes that we have traveled through so that
223
+ if we see that class again we will not use its
224
+ discriminator again.
225
+ When traveling through a discriminator, the
226
+ composed schema that is
227
+ is traveled through is added to this set.
228
+ For example if Animal has a discriminator
229
+ petType and we pass in "Dog", and the class Dog
230
+ allOf includes Animal, we move through Animal
231
+ once using the discriminator, and pick Dog.
232
+ Then in Dog, we will make an instance of the
233
+ Animal class but this time we won't travel
234
+ through its discriminator because we passed in
235
+ _visited_composed_classes = (Animal,)
236
+ caller_id (str): Caller ID name if available. [optional] # noqa: E501
237
+ city (str): City associated with the phone number. [optional] # noqa: E501
238
+ country (str): Country associated with the phone number (ISO 3166-1 alpha-2). [optional] # noqa: E501
239
+ phone_number (str): Phone number in E.164 format. [optional] # noqa: E501
240
+ state (str): State or province associated with the phone number. [optional] # noqa: E501
241
+ """
242
+
243
+ _check_type = kwargs.pop('_check_type', True)
244
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
245
+ _path_to_item = kwargs.pop('_path_to_item', ())
246
+ _configuration = kwargs.pop('_configuration', None)
247
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
248
+
249
+ if args:
250
+ for arg in args:
251
+ if isinstance(arg, dict):
252
+ kwargs.update(arg)
253
+ else:
254
+ raise ApiTypeError(
255
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
256
+ args,
257
+ self.__class__.__name__,
258
+ ),
259
+ path_to_item=_path_to_item,
260
+ valid_classes=(self.__class__,),
261
+ )
262
+
263
+ self._data_store = {}
264
+ self._check_type = _check_type
265
+ self._spec_property_naming = _spec_property_naming
266
+ self._path_to_item = _path_to_item
267
+ self._configuration = _configuration
268
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
269
+
270
+ for var_name, var_value in kwargs.items():
271
+ if var_name not in self.attribute_map and \
272
+ self._configuration is not None and \
273
+ self._configuration.discard_unknown_keys and \
274
+ self.additional_properties_type is None:
275
+ # discard variable.
276
+ continue
277
+ setattr(self, var_name, var_value)
278
+ if var_name in self.read_only_vars:
279
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
280
+ f"class with read only attributes.")
@@ -0,0 +1,288 @@
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 ConversationPbxCallFinancial(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
+ 'ai_agent_billed_minutes': (float,), # noqa: E501
86
+ 'ai_agent_cost': (float,), # noqa: E501
87
+ 'ai_agent_cost_currency': (str,), # noqa: E501
88
+ 'call_currency': (str,), # noqa: E501
89
+ 'call_price': (float,), # noqa: E501
90
+ 'call_price_estimated': (bool,), # noqa: E501
91
+ 'transcription_cost': (float,), # noqa: E501
92
+ }
93
+
94
+ @cached_property
95
+ def discriminator():
96
+ return None
97
+
98
+
99
+ attribute_map = {
100
+ 'ai_agent_billed_minutes': 'ai_agent_billed_minutes', # noqa: E501
101
+ 'ai_agent_cost': 'ai_agent_cost', # noqa: E501
102
+ 'ai_agent_cost_currency': 'ai_agent_cost_currency', # noqa: E501
103
+ 'call_currency': 'call_currency', # noqa: E501
104
+ 'call_price': 'call_price', # noqa: E501
105
+ 'call_price_estimated': 'call_price_estimated', # noqa: E501
106
+ 'transcription_cost': 'transcription_cost', # noqa: E501
107
+ }
108
+
109
+ read_only_vars = {
110
+ }
111
+
112
+ _composed_schemas = {}
113
+
114
+ @classmethod
115
+ @convert_js_args_to_python_args
116
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
117
+ """ConversationPbxCallFinancial - a model defined in OpenAPI
118
+
119
+ Keyword Args:
120
+ _check_type (bool): if True, values for parameters in openapi_types
121
+ will be type checked and a TypeError will be
122
+ raised if the wrong type is input.
123
+ Defaults to True
124
+ _path_to_item (tuple/list): This is a list of keys or values to
125
+ drill down to the model in received_data
126
+ when deserializing a response
127
+ _spec_property_naming (bool): True if the variable names in the input data
128
+ are serialized names, as specified in the OpenAPI document.
129
+ False if the variable names in the input data
130
+ are pythonic names, e.g. snake case (default)
131
+ _configuration (Configuration): the instance to use when
132
+ deserializing a file_type parameter.
133
+ If passed, type conversion is attempted
134
+ If omitted no type conversion is done.
135
+ _visited_composed_classes (tuple): This stores a tuple of
136
+ classes that we have traveled through so that
137
+ if we see that class again we will not use its
138
+ discriminator again.
139
+ When traveling through a discriminator, the
140
+ composed schema that is
141
+ is traveled through is added to this set.
142
+ For example if Animal has a discriminator
143
+ petType and we pass in "Dog", and the class Dog
144
+ allOf includes Animal, we move through Animal
145
+ once using the discriminator, and pick Dog.
146
+ Then in Dog, we will make an instance of the
147
+ Animal class but this time we won't travel
148
+ through its discriminator because we passed in
149
+ _visited_composed_classes = (Animal,)
150
+ ai_agent_billed_minutes (float): Total AI agent billed minutes for this call. [optional] # noqa: E501
151
+ ai_agent_cost (float): Total AI agent cost for this call. [optional] # noqa: E501
152
+ ai_agent_cost_currency (str): Currency for AI agent cost. [optional] # noqa: E501
153
+ call_currency (str): Currency for call price (default USD). [optional] # noqa: E501
154
+ call_price (float): Twilio call cost. [optional] # noqa: E501
155
+ call_price_estimated (bool): True if call price is a fallback-rate estimate, false if Twilio-confirmed. [optional] # noqa: E501
156
+ transcription_cost (float): AWS Transcribe transcription cost. [optional] # noqa: E501
157
+ """
158
+
159
+ _check_type = kwargs.pop('_check_type', True)
160
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
161
+ _path_to_item = kwargs.pop('_path_to_item', ())
162
+ _configuration = kwargs.pop('_configuration', None)
163
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
164
+
165
+ self = super(OpenApiModel, cls).__new__(cls)
166
+
167
+ if args:
168
+ for arg in args:
169
+ if isinstance(arg, dict):
170
+ kwargs.update(arg)
171
+ else:
172
+ raise ApiTypeError(
173
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
174
+ args,
175
+ self.__class__.__name__,
176
+ ),
177
+ path_to_item=_path_to_item,
178
+ valid_classes=(self.__class__,),
179
+ )
180
+
181
+ self._data_store = {}
182
+ self._check_type = _check_type
183
+ self._spec_property_naming = _spec_property_naming
184
+ self._path_to_item = _path_to_item
185
+ self._configuration = _configuration
186
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
187
+
188
+ for var_name, var_value in kwargs.items():
189
+ if var_name not in self.attribute_map and \
190
+ self._configuration is not None and \
191
+ self._configuration.discard_unknown_keys and \
192
+ self.additional_properties_type is None:
193
+ # discard variable.
194
+ continue
195
+ setattr(self, var_name, var_value)
196
+ return self
197
+
198
+ required_properties = set([
199
+ '_data_store',
200
+ '_check_type',
201
+ '_spec_property_naming',
202
+ '_path_to_item',
203
+ '_configuration',
204
+ '_visited_composed_classes',
205
+ ])
206
+
207
+ @convert_js_args_to_python_args
208
+ def __init__(self, *args, **kwargs): # noqa: E501
209
+ """ConversationPbxCallFinancial - a model defined in OpenAPI
210
+
211
+ Keyword Args:
212
+ _check_type (bool): if True, values for parameters in openapi_types
213
+ will be type checked and a TypeError will be
214
+ raised if the wrong type is input.
215
+ Defaults to True
216
+ _path_to_item (tuple/list): This is a list of keys or values to
217
+ drill down to the model in received_data
218
+ when deserializing a response
219
+ _spec_property_naming (bool): True if the variable names in the input data
220
+ are serialized names, as specified in the OpenAPI document.
221
+ False if the variable names in the input data
222
+ are pythonic names, e.g. snake case (default)
223
+ _configuration (Configuration): the instance to use when
224
+ deserializing a file_type parameter.
225
+ If passed, type conversion is attempted
226
+ If omitted no type conversion is done.
227
+ _visited_composed_classes (tuple): This stores a tuple of
228
+ classes that we have traveled through so that
229
+ if we see that class again we will not use its
230
+ discriminator again.
231
+ When traveling through a discriminator, the
232
+ composed schema that is
233
+ is traveled through is added to this set.
234
+ For example if Animal has a discriminator
235
+ petType and we pass in "Dog", and the class Dog
236
+ allOf includes Animal, we move through Animal
237
+ once using the discriminator, and pick Dog.
238
+ Then in Dog, we will make an instance of the
239
+ Animal class but this time we won't travel
240
+ through its discriminator because we passed in
241
+ _visited_composed_classes = (Animal,)
242
+ ai_agent_billed_minutes (float): Total AI agent billed minutes for this call. [optional] # noqa: E501
243
+ ai_agent_cost (float): Total AI agent cost for this call. [optional] # noqa: E501
244
+ ai_agent_cost_currency (str): Currency for AI agent cost. [optional] # noqa: E501
245
+ call_currency (str): Currency for call price (default USD). [optional] # noqa: E501
246
+ call_price (float): Twilio call cost. [optional] # noqa: E501
247
+ call_price_estimated (bool): True if call price is a fallback-rate estimate, false if Twilio-confirmed. [optional] # noqa: E501
248
+ transcription_cost (float): AWS Transcribe transcription cost. [optional] # noqa: E501
249
+ """
250
+
251
+ _check_type = kwargs.pop('_check_type', True)
252
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
253
+ _path_to_item = kwargs.pop('_path_to_item', ())
254
+ _configuration = kwargs.pop('_configuration', None)
255
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
256
+
257
+ if args:
258
+ for arg in args:
259
+ if isinstance(arg, dict):
260
+ kwargs.update(arg)
261
+ else:
262
+ raise ApiTypeError(
263
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
264
+ args,
265
+ self.__class__.__name__,
266
+ ),
267
+ path_to_item=_path_to_item,
268
+ valid_classes=(self.__class__,),
269
+ )
270
+
271
+ self._data_store = {}
272
+ self._check_type = _check_type
273
+ self._spec_property_naming = _spec_property_naming
274
+ self._path_to_item = _path_to_item
275
+ self._configuration = _configuration
276
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
277
+
278
+ for var_name, var_value in kwargs.items():
279
+ if var_name not in self.attribute_map and \
280
+ self._configuration is not None and \
281
+ self._configuration.discard_unknown_keys and \
282
+ self.additional_properties_type is None:
283
+ # discard variable.
284
+ continue
285
+ setattr(self, var_name, var_value)
286
+ if var_name in self.read_only_vars:
287
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
288
+ f"class with read only attributes.")