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
|
@@ -0,0 +1,302 @@
|
|
|
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 ConversationPbxPhoneNumberPurchaseRequest(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
|
+
('action',): {
|
|
60
|
+
'TIME_BASED': "time based",
|
|
61
|
+
'MENU': "menu",
|
|
62
|
+
'QUEUE': "queue",
|
|
63
|
+
'VOICEMAIL': "voicemail",
|
|
64
|
+
'AGENT': "agent",
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
validations = {
|
|
69
|
+
('action',): {
|
|
70
|
+
'max_length': 30,
|
|
71
|
+
},
|
|
72
|
+
('action_target',): {
|
|
73
|
+
'max_length': 50,
|
|
74
|
+
},
|
|
75
|
+
('address_sid',): {
|
|
76
|
+
'max_length': 50,
|
|
77
|
+
},
|
|
78
|
+
('friendly_name',): {
|
|
79
|
+
'max_length': 64,
|
|
80
|
+
},
|
|
81
|
+
('phone_number',): {
|
|
82
|
+
'max_length': 50,
|
|
83
|
+
},
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@cached_property
|
|
87
|
+
def additional_properties_type():
|
|
88
|
+
"""
|
|
89
|
+
This must be a method because a model may have properties that are
|
|
90
|
+
of type self, this must run after the class is loaded
|
|
91
|
+
"""
|
|
92
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
93
|
+
|
|
94
|
+
_nullable = False
|
|
95
|
+
|
|
96
|
+
@cached_property
|
|
97
|
+
def openapi_types():
|
|
98
|
+
"""
|
|
99
|
+
This must be a method because a model may have properties that are
|
|
100
|
+
of type self, this must run after the class is loaded
|
|
101
|
+
|
|
102
|
+
Returns
|
|
103
|
+
openapi_types (dict): The key is attribute name
|
|
104
|
+
and the value is attribute type.
|
|
105
|
+
"""
|
|
106
|
+
return {
|
|
107
|
+
'action': (str,), # noqa: E501
|
|
108
|
+
'action_target': (str,), # noqa: E501
|
|
109
|
+
'address_sid': (str,), # noqa: E501
|
|
110
|
+
'friendly_name': (str,), # noqa: E501
|
|
111
|
+
'phone_number': (str,), # noqa: E501
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@cached_property
|
|
115
|
+
def discriminator():
|
|
116
|
+
return None
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
attribute_map = {
|
|
120
|
+
'action': 'action', # noqa: E501
|
|
121
|
+
'action_target': 'action_target', # noqa: E501
|
|
122
|
+
'address_sid': 'address_sid', # noqa: E501
|
|
123
|
+
'friendly_name': 'friendly_name', # noqa: E501
|
|
124
|
+
'phone_number': 'phone_number', # noqa: E501
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
read_only_vars = {
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
_composed_schemas = {}
|
|
131
|
+
|
|
132
|
+
@classmethod
|
|
133
|
+
@convert_js_args_to_python_args
|
|
134
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
135
|
+
"""ConversationPbxPhoneNumberPurchaseRequest - a model defined in OpenAPI
|
|
136
|
+
|
|
137
|
+
Keyword Args:
|
|
138
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
139
|
+
will be type checked and a TypeError will be
|
|
140
|
+
raised if the wrong type is input.
|
|
141
|
+
Defaults to True
|
|
142
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
143
|
+
drill down to the model in received_data
|
|
144
|
+
when deserializing a response
|
|
145
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
146
|
+
are serialized names, as specified in the OpenAPI document.
|
|
147
|
+
False if the variable names in the input data
|
|
148
|
+
are pythonic names, e.g. snake case (default)
|
|
149
|
+
_configuration (Configuration): the instance to use when
|
|
150
|
+
deserializing a file_type parameter.
|
|
151
|
+
If passed, type conversion is attempted
|
|
152
|
+
If omitted no type conversion is done.
|
|
153
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
154
|
+
classes that we have traveled through so that
|
|
155
|
+
if we see that class again we will not use its
|
|
156
|
+
discriminator again.
|
|
157
|
+
When traveling through a discriminator, the
|
|
158
|
+
composed schema that is
|
|
159
|
+
is traveled through is added to this set.
|
|
160
|
+
For example if Animal has a discriminator
|
|
161
|
+
petType and we pass in "Dog", and the class Dog
|
|
162
|
+
allOf includes Animal, we move through Animal
|
|
163
|
+
once using the discriminator, and pick Dog.
|
|
164
|
+
Then in Dog, we will make an instance of the
|
|
165
|
+
Animal class but this time we won't travel
|
|
166
|
+
through its discriminator because we passed in
|
|
167
|
+
_visited_composed_classes = (Animal,)
|
|
168
|
+
action (str): Initial action for incoming calls. [optional] # noqa: E501
|
|
169
|
+
action_target (str): Initial action target UUID. [optional] # noqa: E501
|
|
170
|
+
address_sid (str): Address SID if required for regulatory compliance. [optional] # noqa: E501
|
|
171
|
+
friendly_name (str): Friendly name for the phone number. [optional] # noqa: E501
|
|
172
|
+
phone_number (str): Phone number to purchase in E.164 format (from search results). [optional] # noqa: E501
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
176
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
177
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
178
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
179
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
180
|
+
|
|
181
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
182
|
+
|
|
183
|
+
if args:
|
|
184
|
+
for arg in args:
|
|
185
|
+
if isinstance(arg, dict):
|
|
186
|
+
kwargs.update(arg)
|
|
187
|
+
else:
|
|
188
|
+
raise ApiTypeError(
|
|
189
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
190
|
+
args,
|
|
191
|
+
self.__class__.__name__,
|
|
192
|
+
),
|
|
193
|
+
path_to_item=_path_to_item,
|
|
194
|
+
valid_classes=(self.__class__,),
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
self._data_store = {}
|
|
198
|
+
self._check_type = _check_type
|
|
199
|
+
self._spec_property_naming = _spec_property_naming
|
|
200
|
+
self._path_to_item = _path_to_item
|
|
201
|
+
self._configuration = _configuration
|
|
202
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
203
|
+
|
|
204
|
+
for var_name, var_value in kwargs.items():
|
|
205
|
+
if var_name not in self.attribute_map and \
|
|
206
|
+
self._configuration is not None and \
|
|
207
|
+
self._configuration.discard_unknown_keys and \
|
|
208
|
+
self.additional_properties_type is None:
|
|
209
|
+
# discard variable.
|
|
210
|
+
continue
|
|
211
|
+
setattr(self, var_name, var_value)
|
|
212
|
+
return self
|
|
213
|
+
|
|
214
|
+
required_properties = set([
|
|
215
|
+
'_data_store',
|
|
216
|
+
'_check_type',
|
|
217
|
+
'_spec_property_naming',
|
|
218
|
+
'_path_to_item',
|
|
219
|
+
'_configuration',
|
|
220
|
+
'_visited_composed_classes',
|
|
221
|
+
])
|
|
222
|
+
|
|
223
|
+
@convert_js_args_to_python_args
|
|
224
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
225
|
+
"""ConversationPbxPhoneNumberPurchaseRequest - a model defined in OpenAPI
|
|
226
|
+
|
|
227
|
+
Keyword Args:
|
|
228
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
229
|
+
will be type checked and a TypeError will be
|
|
230
|
+
raised if the wrong type is input.
|
|
231
|
+
Defaults to True
|
|
232
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
233
|
+
drill down to the model in received_data
|
|
234
|
+
when deserializing a response
|
|
235
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
236
|
+
are serialized names, as specified in the OpenAPI document.
|
|
237
|
+
False if the variable names in the input data
|
|
238
|
+
are pythonic names, e.g. snake case (default)
|
|
239
|
+
_configuration (Configuration): the instance to use when
|
|
240
|
+
deserializing a file_type parameter.
|
|
241
|
+
If passed, type conversion is attempted
|
|
242
|
+
If omitted no type conversion is done.
|
|
243
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
244
|
+
classes that we have traveled through so that
|
|
245
|
+
if we see that class again we will not use its
|
|
246
|
+
discriminator again.
|
|
247
|
+
When traveling through a discriminator, the
|
|
248
|
+
composed schema that is
|
|
249
|
+
is traveled through is added to this set.
|
|
250
|
+
For example if Animal has a discriminator
|
|
251
|
+
petType and we pass in "Dog", and the class Dog
|
|
252
|
+
allOf includes Animal, we move through Animal
|
|
253
|
+
once using the discriminator, and pick Dog.
|
|
254
|
+
Then in Dog, we will make an instance of the
|
|
255
|
+
Animal class but this time we won't travel
|
|
256
|
+
through its discriminator because we passed in
|
|
257
|
+
_visited_composed_classes = (Animal,)
|
|
258
|
+
action (str): Initial action for incoming calls. [optional] # noqa: E501
|
|
259
|
+
action_target (str): Initial action target UUID. [optional] # noqa: E501
|
|
260
|
+
address_sid (str): Address SID if required for regulatory compliance. [optional] # noqa: E501
|
|
261
|
+
friendly_name (str): Friendly name for the phone number. [optional] # noqa: E501
|
|
262
|
+
phone_number (str): Phone number to purchase in E.164 format (from search results). [optional] # noqa: E501
|
|
263
|
+
"""
|
|
264
|
+
|
|
265
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
266
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
267
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
268
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
269
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
270
|
+
|
|
271
|
+
if args:
|
|
272
|
+
for arg in args:
|
|
273
|
+
if isinstance(arg, dict):
|
|
274
|
+
kwargs.update(arg)
|
|
275
|
+
else:
|
|
276
|
+
raise ApiTypeError(
|
|
277
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
278
|
+
args,
|
|
279
|
+
self.__class__.__name__,
|
|
280
|
+
),
|
|
281
|
+
path_to_item=_path_to_item,
|
|
282
|
+
valid_classes=(self.__class__,),
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
self._data_store = {}
|
|
286
|
+
self._check_type = _check_type
|
|
287
|
+
self._spec_property_naming = _spec_property_naming
|
|
288
|
+
self._path_to_item = _path_to_item
|
|
289
|
+
self._configuration = _configuration
|
|
290
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
291
|
+
|
|
292
|
+
for var_name, var_value in kwargs.items():
|
|
293
|
+
if var_name not in self.attribute_map and \
|
|
294
|
+
self._configuration is not None and \
|
|
295
|
+
self._configuration.discard_unknown_keys and \
|
|
296
|
+
self.additional_properties_type is None:
|
|
297
|
+
# discard variable.
|
|
298
|
+
continue
|
|
299
|
+
setattr(self, var_name, var_value)
|
|
300
|
+
if var_name in self.read_only_vars:
|
|
301
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
302
|
+
f"class with read only attributes.")
|
|
@@ -60,6 +60,11 @@ class ConversationPbxQueue(ModelNormal):
|
|
|
60
60
|
"""
|
|
61
61
|
|
|
62
62
|
allowed_values = {
|
|
63
|
+
('ai_priority',): {
|
|
64
|
+
'NEUTRAL': "neutral",
|
|
65
|
+
'FIRST': "first",
|
|
66
|
+
'BACKUP': "backup",
|
|
67
|
+
},
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
validations = {
|
|
@@ -118,6 +123,8 @@ class ConversationPbxQueue(ModelNormal):
|
|
|
118
123
|
"""
|
|
119
124
|
lazy_import()
|
|
120
125
|
return {
|
|
126
|
+
'ai_priority': (str,), # noqa: E501
|
|
127
|
+
'ai_timeout_seconds': (int,), # noqa: E501
|
|
121
128
|
'announce_queue_position': (bool,), # noqa: E501
|
|
122
129
|
'conversation_pbx_queue_uuid': (str,), # noqa: E501
|
|
123
130
|
'conversation_voicemail_mailbox_uuid': (str,), # noqa: E501
|
|
@@ -147,6 +154,8 @@ class ConversationPbxQueue(ModelNormal):
|
|
|
147
154
|
|
|
148
155
|
|
|
149
156
|
attribute_map = {
|
|
157
|
+
'ai_priority': 'ai_priority', # noqa: E501
|
|
158
|
+
'ai_timeout_seconds': 'ai_timeout_seconds', # noqa: E501
|
|
150
159
|
'announce_queue_position': 'announce_queue_position', # noqa: E501
|
|
151
160
|
'conversation_pbx_queue_uuid': 'conversation_pbx_queue_uuid', # noqa: E501
|
|
152
161
|
'conversation_voicemail_mailbox_uuid': 'conversation_voicemail_mailbox_uuid', # noqa: E501
|
|
@@ -211,6 +220,8 @@ class ConversationPbxQueue(ModelNormal):
|
|
|
211
220
|
Animal class but this time we won't travel
|
|
212
221
|
through its discriminator because we passed in
|
|
213
222
|
_visited_composed_classes = (Animal,)
|
|
223
|
+
ai_priority (str): AI Agent Priority compared to human agents. [optional] # noqa: E501
|
|
224
|
+
ai_timeout_seconds (int): AI timeout seconds. [optional] # noqa: E501
|
|
214
225
|
announce_queue_position (bool): If true, the customer is told their queue position upon entering the queue. [optional] # noqa: E501
|
|
215
226
|
conversation_pbx_queue_uuid (str): Conversation Pbx Queue unique identifier. [optional] # noqa: E501
|
|
216
227
|
conversation_voicemail_mailbox_uuid (str): The voicemail mailbox associated with this queue. [optional] # noqa: E501
|
|
@@ -317,6 +328,8 @@ class ConversationPbxQueue(ModelNormal):
|
|
|
317
328
|
Animal class but this time we won't travel
|
|
318
329
|
through its discriminator because we passed in
|
|
319
330
|
_visited_composed_classes = (Animal,)
|
|
331
|
+
ai_priority (str): AI Agent Priority compared to human agents. [optional] # noqa: E501
|
|
332
|
+
ai_timeout_seconds (int): AI timeout seconds. [optional] # noqa: E501
|
|
320
333
|
announce_queue_position (bool): If true, the customer is told their queue position upon entering the queue. [optional] # noqa: E501
|
|
321
334
|
conversation_pbx_queue_uuid (str): Conversation Pbx Queue unique identifier. [optional] # noqa: E501
|
|
322
335
|
conversation_voicemail_mailbox_uuid (str): The voicemail mailbox associated with this queue. [optional] # noqa: E501
|
|
@@ -0,0 +1,272 @@
|
|
|
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 ItemInventoryUpdate(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
|
+
'distribution_center_code': (str,), # noqa: E501
|
|
86
|
+
'inventory_level': (float,), # noqa: E501
|
|
87
|
+
'merchant_item_id': (str,), # noqa: E501
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@cached_property
|
|
91
|
+
def discriminator():
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
attribute_map = {
|
|
96
|
+
'distribution_center_code': 'distribution_center_code', # noqa: E501
|
|
97
|
+
'inventory_level': 'inventory_level', # noqa: E501
|
|
98
|
+
'merchant_item_id': 'merchant_item_id', # noqa: E501
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
read_only_vars = {
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
_composed_schemas = {}
|
|
105
|
+
|
|
106
|
+
@classmethod
|
|
107
|
+
@convert_js_args_to_python_args
|
|
108
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
109
|
+
"""ItemInventoryUpdate - a model defined in OpenAPI
|
|
110
|
+
|
|
111
|
+
Keyword Args:
|
|
112
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
113
|
+
will be type checked and a TypeError will be
|
|
114
|
+
raised if the wrong type is input.
|
|
115
|
+
Defaults to True
|
|
116
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
117
|
+
drill down to the model in received_data
|
|
118
|
+
when deserializing a response
|
|
119
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
120
|
+
are serialized names, as specified in the OpenAPI document.
|
|
121
|
+
False if the variable names in the input data
|
|
122
|
+
are pythonic names, e.g. snake case (default)
|
|
123
|
+
_configuration (Configuration): the instance to use when
|
|
124
|
+
deserializing a file_type parameter.
|
|
125
|
+
If passed, type conversion is attempted
|
|
126
|
+
If omitted no type conversion is done.
|
|
127
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
128
|
+
classes that we have traveled through so that
|
|
129
|
+
if we see that class again we will not use its
|
|
130
|
+
discriminator again.
|
|
131
|
+
When traveling through a discriminator, the
|
|
132
|
+
composed schema that is
|
|
133
|
+
is traveled through is added to this set.
|
|
134
|
+
For example if Animal has a discriminator
|
|
135
|
+
petType and we pass in "Dog", and the class Dog
|
|
136
|
+
allOf includes Animal, we move through Animal
|
|
137
|
+
once using the discriminator, and pick Dog.
|
|
138
|
+
Then in Dog, we will make an instance of the
|
|
139
|
+
Animal class but this time we won't travel
|
|
140
|
+
through its discriminator because we passed in
|
|
141
|
+
_visited_composed_classes = (Animal,)
|
|
142
|
+
distribution_center_code (str): Distribution center code. [optional] # noqa: E501
|
|
143
|
+
inventory_level (float): Inventory level. [optional] # noqa: E501
|
|
144
|
+
merchant_item_id (str): Merchant Item ID. [optional] # noqa: E501
|
|
145
|
+
"""
|
|
146
|
+
|
|
147
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
148
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
149
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
150
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
151
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
152
|
+
|
|
153
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
154
|
+
|
|
155
|
+
if args:
|
|
156
|
+
for arg in args:
|
|
157
|
+
if isinstance(arg, dict):
|
|
158
|
+
kwargs.update(arg)
|
|
159
|
+
else:
|
|
160
|
+
raise ApiTypeError(
|
|
161
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
162
|
+
args,
|
|
163
|
+
self.__class__.__name__,
|
|
164
|
+
),
|
|
165
|
+
path_to_item=_path_to_item,
|
|
166
|
+
valid_classes=(self.__class__,),
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
self._data_store = {}
|
|
170
|
+
self._check_type = _check_type
|
|
171
|
+
self._spec_property_naming = _spec_property_naming
|
|
172
|
+
self._path_to_item = _path_to_item
|
|
173
|
+
self._configuration = _configuration
|
|
174
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
175
|
+
|
|
176
|
+
for var_name, var_value in kwargs.items():
|
|
177
|
+
if var_name not in self.attribute_map and \
|
|
178
|
+
self._configuration is not None and \
|
|
179
|
+
self._configuration.discard_unknown_keys and \
|
|
180
|
+
self.additional_properties_type is None:
|
|
181
|
+
# discard variable.
|
|
182
|
+
continue
|
|
183
|
+
setattr(self, var_name, var_value)
|
|
184
|
+
return self
|
|
185
|
+
|
|
186
|
+
required_properties = set([
|
|
187
|
+
'_data_store',
|
|
188
|
+
'_check_type',
|
|
189
|
+
'_spec_property_naming',
|
|
190
|
+
'_path_to_item',
|
|
191
|
+
'_configuration',
|
|
192
|
+
'_visited_composed_classes',
|
|
193
|
+
])
|
|
194
|
+
|
|
195
|
+
@convert_js_args_to_python_args
|
|
196
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
197
|
+
"""ItemInventoryUpdate - a model defined in OpenAPI
|
|
198
|
+
|
|
199
|
+
Keyword Args:
|
|
200
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
201
|
+
will be type checked and a TypeError will be
|
|
202
|
+
raised if the wrong type is input.
|
|
203
|
+
Defaults to True
|
|
204
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
205
|
+
drill down to the model in received_data
|
|
206
|
+
when deserializing a response
|
|
207
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
208
|
+
are serialized names, as specified in the OpenAPI document.
|
|
209
|
+
False if the variable names in the input data
|
|
210
|
+
are pythonic names, e.g. snake case (default)
|
|
211
|
+
_configuration (Configuration): the instance to use when
|
|
212
|
+
deserializing a file_type parameter.
|
|
213
|
+
If passed, type conversion is attempted
|
|
214
|
+
If omitted no type conversion is done.
|
|
215
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
216
|
+
classes that we have traveled through so that
|
|
217
|
+
if we see that class again we will not use its
|
|
218
|
+
discriminator again.
|
|
219
|
+
When traveling through a discriminator, the
|
|
220
|
+
composed schema that is
|
|
221
|
+
is traveled through is added to this set.
|
|
222
|
+
For example if Animal has a discriminator
|
|
223
|
+
petType and we pass in "Dog", and the class Dog
|
|
224
|
+
allOf includes Animal, we move through Animal
|
|
225
|
+
once using the discriminator, and pick Dog.
|
|
226
|
+
Then in Dog, we will make an instance of the
|
|
227
|
+
Animal class but this time we won't travel
|
|
228
|
+
through its discriminator because we passed in
|
|
229
|
+
_visited_composed_classes = (Animal,)
|
|
230
|
+
distribution_center_code (str): Distribution center code. [optional] # noqa: E501
|
|
231
|
+
inventory_level (float): Inventory level. [optional] # noqa: E501
|
|
232
|
+
merchant_item_id (str): Merchant Item ID. [optional] # noqa: E501
|
|
233
|
+
"""
|
|
234
|
+
|
|
235
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
236
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
237
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
238
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
239
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
240
|
+
|
|
241
|
+
if args:
|
|
242
|
+
for arg in args:
|
|
243
|
+
if isinstance(arg, dict):
|
|
244
|
+
kwargs.update(arg)
|
|
245
|
+
else:
|
|
246
|
+
raise ApiTypeError(
|
|
247
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
248
|
+
args,
|
|
249
|
+
self.__class__.__name__,
|
|
250
|
+
),
|
|
251
|
+
path_to_item=_path_to_item,
|
|
252
|
+
valid_classes=(self.__class__,),
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
self._data_store = {}
|
|
256
|
+
self._check_type = _check_type
|
|
257
|
+
self._spec_property_naming = _spec_property_naming
|
|
258
|
+
self._path_to_item = _path_to_item
|
|
259
|
+
self._configuration = _configuration
|
|
260
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
261
|
+
|
|
262
|
+
for var_name, var_value in kwargs.items():
|
|
263
|
+
if var_name not in self.attribute_map and \
|
|
264
|
+
self._configuration is not None and \
|
|
265
|
+
self._configuration.discard_unknown_keys and \
|
|
266
|
+
self.additional_properties_type is None:
|
|
267
|
+
# discard variable.
|
|
268
|
+
continue
|
|
269
|
+
setattr(self, var_name, var_value)
|
|
270
|
+
if var_name in self.read_only_vars:
|
|
271
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
272
|
+
f"class with read only attributes.")
|