ultracart-rest-sdk 4.1.20__py3-none-any.whl → 4.1.22__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/datawarehouse_api.py +284 -0
- ultracart/api/order_api.py +153 -0
- ultracart/api_client.py +1 -1
- ultracart/configuration.py +1 -1
- ultracart/model/custom_report_account_config.py +4 -0
- ultracart/model/custom_report_analysis_request.py +268 -0
- ultracart/model/custom_report_analysis_response.py +290 -0
- ultracart/model/custom_report_chart_png_upload_response.py +294 -0
- ultracart/model/customer.py +7 -0
- ultracart/model/item_shipping_method.py +4 -0
- ultracart/model/item_tag.py +2 -2
- ultracart/model/order_payment.py +1 -0
- ultracart/model/replace_order_item_id_request.py +282 -0
- ultracart/models/__init__.py +4 -0
- {ultracart_rest_sdk-4.1.20.dist-info → ultracart_rest_sdk-4.1.22.dist-info}/METADATA +1 -1
- {ultracart_rest_sdk-4.1.20.dist-info → ultracart_rest_sdk-4.1.22.dist-info}/RECORD +20 -16
- {ultracart_rest_sdk-4.1.20.dist-info → ultracart_rest_sdk-4.1.22.dist-info}/LICENSE +0 -0
- {ultracart_rest_sdk-4.1.20.dist-info → ultracart_rest_sdk-4.1.22.dist-info}/WHEEL +0 -0
- {ultracart_rest_sdk-4.1.20.dist-info → ultracart_rest_sdk-4.1.22.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"""
|
|
2
|
+
UltraCart Rest API V2
|
|
3
|
+
|
|
4
|
+
UltraCart REST API Version 2 # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
Contact: support@ultracart.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import re # noqa: F401
|
|
13
|
+
import sys # noqa: F401
|
|
14
|
+
|
|
15
|
+
from ultracart.model_utils import ( # noqa: F401
|
|
16
|
+
ApiTypeError,
|
|
17
|
+
ModelComposed,
|
|
18
|
+
ModelNormal,
|
|
19
|
+
ModelSimple,
|
|
20
|
+
cached_property,
|
|
21
|
+
change_keys_js_to_python,
|
|
22
|
+
convert_js_args_to_python_args,
|
|
23
|
+
date,
|
|
24
|
+
datetime,
|
|
25
|
+
file_type,
|
|
26
|
+
none_type,
|
|
27
|
+
validate_get_composed_info,
|
|
28
|
+
OpenApiModel
|
|
29
|
+
)
|
|
30
|
+
from ultracart.exceptions import ApiAttributeError
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def lazy_import():
|
|
34
|
+
from ultracart.model.error import Error
|
|
35
|
+
from ultracart.model.response_metadata import ResponseMetadata
|
|
36
|
+
from ultracart.model.warning import Warning
|
|
37
|
+
globals()['Error'] = Error
|
|
38
|
+
globals()['ResponseMetadata'] = ResponseMetadata
|
|
39
|
+
globals()['Warning'] = Warning
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class CustomReportChartPngUploadResponse(ModelNormal):
|
|
43
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
44
|
+
Ref: https://openapi-generator.tech
|
|
45
|
+
|
|
46
|
+
Do not edit the class manually.
|
|
47
|
+
|
|
48
|
+
Attributes:
|
|
49
|
+
allowed_values (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
|
+
with a capitalized key describing the allowed value and an allowed
|
|
52
|
+
value. These dicts store the allowed enum values.
|
|
53
|
+
attribute_map (dict): The key is attribute name
|
|
54
|
+
and the value is json key in definition.
|
|
55
|
+
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
56
|
+
variable value to the discriminator class name.
|
|
57
|
+
validations (dict): The key is the tuple path to the attribute
|
|
58
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
59
|
+
that stores validations for max_length, min_length, max_items,
|
|
60
|
+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
61
|
+
inclusive_minimum, and regex.
|
|
62
|
+
additional_properties_type (tuple): A tuple of classes accepted
|
|
63
|
+
as additional properties values.
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
allowed_values = {
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
validations = {
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@cached_property
|
|
73
|
+
def additional_properties_type():
|
|
74
|
+
"""
|
|
75
|
+
This must be a method because a model may have properties that are
|
|
76
|
+
of type self, this must run after the class is loaded
|
|
77
|
+
"""
|
|
78
|
+
lazy_import()
|
|
79
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
80
|
+
|
|
81
|
+
_nullable = False
|
|
82
|
+
|
|
83
|
+
@cached_property
|
|
84
|
+
def openapi_types():
|
|
85
|
+
"""
|
|
86
|
+
This must be a method because a model may have properties that are
|
|
87
|
+
of type self, this must run after the class is loaded
|
|
88
|
+
|
|
89
|
+
Returns
|
|
90
|
+
openapi_types (dict): The key is attribute name
|
|
91
|
+
and the value is attribute type.
|
|
92
|
+
"""
|
|
93
|
+
lazy_import()
|
|
94
|
+
return {
|
|
95
|
+
'error': (Error,), # noqa: E501
|
|
96
|
+
'metadata': (ResponseMetadata,), # noqa: E501
|
|
97
|
+
'signed_download_url': (str,), # noqa: E501
|
|
98
|
+
'signed_upload_url': (str,), # noqa: E501
|
|
99
|
+
'success': (bool,), # noqa: E501
|
|
100
|
+
'warning': (Warning,), # noqa: E501
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@cached_property
|
|
104
|
+
def discriminator():
|
|
105
|
+
return None
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
attribute_map = {
|
|
109
|
+
'error': 'error', # noqa: E501
|
|
110
|
+
'metadata': 'metadata', # noqa: E501
|
|
111
|
+
'signed_download_url': 'signed_download_url', # noqa: E501
|
|
112
|
+
'signed_upload_url': 'signed_upload_url', # noqa: E501
|
|
113
|
+
'success': 'success', # noqa: E501
|
|
114
|
+
'warning': 'warning', # noqa: E501
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
read_only_vars = {
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
_composed_schemas = {}
|
|
121
|
+
|
|
122
|
+
@classmethod
|
|
123
|
+
@convert_js_args_to_python_args
|
|
124
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
125
|
+
"""CustomReportChartPngUploadResponse - a model defined in OpenAPI
|
|
126
|
+
|
|
127
|
+
Keyword Args:
|
|
128
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
129
|
+
will be type checked and a TypeError will be
|
|
130
|
+
raised if the wrong type is input.
|
|
131
|
+
Defaults to True
|
|
132
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
133
|
+
drill down to the model in received_data
|
|
134
|
+
when deserializing a response
|
|
135
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
136
|
+
are serialized names, as specified in the OpenAPI document.
|
|
137
|
+
False if the variable names in the input data
|
|
138
|
+
are pythonic names, e.g. snake case (default)
|
|
139
|
+
_configuration (Configuration): the instance to use when
|
|
140
|
+
deserializing a file_type parameter.
|
|
141
|
+
If passed, type conversion is attempted
|
|
142
|
+
If omitted no type conversion is done.
|
|
143
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
144
|
+
classes that we have traveled through so that
|
|
145
|
+
if we see that class again we will not use its
|
|
146
|
+
discriminator again.
|
|
147
|
+
When traveling through a discriminator, the
|
|
148
|
+
composed schema that is
|
|
149
|
+
is traveled through is added to this set.
|
|
150
|
+
For example if Animal has a discriminator
|
|
151
|
+
petType and we pass in "Dog", and the class Dog
|
|
152
|
+
allOf includes Animal, we move through Animal
|
|
153
|
+
once using the discriminator, and pick Dog.
|
|
154
|
+
Then in Dog, we will make an instance of the
|
|
155
|
+
Animal class but this time we won't travel
|
|
156
|
+
through its discriminator because we passed in
|
|
157
|
+
_visited_composed_classes = (Animal,)
|
|
158
|
+
error (Error): [optional] # noqa: E501
|
|
159
|
+
metadata (ResponseMetadata): [optional] # noqa: E501
|
|
160
|
+
signed_download_url (str): [optional] # noqa: E501
|
|
161
|
+
signed_upload_url (str): [optional] # noqa: E501
|
|
162
|
+
success (bool): Indicates if API call was successful. [optional] # noqa: E501
|
|
163
|
+
warning (Warning): [optional] # noqa: E501
|
|
164
|
+
"""
|
|
165
|
+
|
|
166
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
167
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
168
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
169
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
170
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
171
|
+
|
|
172
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
173
|
+
|
|
174
|
+
if args:
|
|
175
|
+
for arg in args:
|
|
176
|
+
if isinstance(arg, dict):
|
|
177
|
+
kwargs.update(arg)
|
|
178
|
+
else:
|
|
179
|
+
raise ApiTypeError(
|
|
180
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
181
|
+
args,
|
|
182
|
+
self.__class__.__name__,
|
|
183
|
+
),
|
|
184
|
+
path_to_item=_path_to_item,
|
|
185
|
+
valid_classes=(self.__class__,),
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
self._data_store = {}
|
|
189
|
+
self._check_type = _check_type
|
|
190
|
+
self._spec_property_naming = _spec_property_naming
|
|
191
|
+
self._path_to_item = _path_to_item
|
|
192
|
+
self._configuration = _configuration
|
|
193
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
194
|
+
|
|
195
|
+
for var_name, var_value in kwargs.items():
|
|
196
|
+
if var_name not in self.attribute_map and \
|
|
197
|
+
self._configuration is not None and \
|
|
198
|
+
self._configuration.discard_unknown_keys and \
|
|
199
|
+
self.additional_properties_type is None:
|
|
200
|
+
# discard variable.
|
|
201
|
+
continue
|
|
202
|
+
setattr(self, var_name, var_value)
|
|
203
|
+
return self
|
|
204
|
+
|
|
205
|
+
required_properties = set([
|
|
206
|
+
'_data_store',
|
|
207
|
+
'_check_type',
|
|
208
|
+
'_spec_property_naming',
|
|
209
|
+
'_path_to_item',
|
|
210
|
+
'_configuration',
|
|
211
|
+
'_visited_composed_classes',
|
|
212
|
+
])
|
|
213
|
+
|
|
214
|
+
@convert_js_args_to_python_args
|
|
215
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
216
|
+
"""CustomReportChartPngUploadResponse - a model defined in OpenAPI
|
|
217
|
+
|
|
218
|
+
Keyword Args:
|
|
219
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
220
|
+
will be type checked and a TypeError will be
|
|
221
|
+
raised if the wrong type is input.
|
|
222
|
+
Defaults to True
|
|
223
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
224
|
+
drill down to the model in received_data
|
|
225
|
+
when deserializing a response
|
|
226
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
227
|
+
are serialized names, as specified in the OpenAPI document.
|
|
228
|
+
False if the variable names in the input data
|
|
229
|
+
are pythonic names, e.g. snake case (default)
|
|
230
|
+
_configuration (Configuration): the instance to use when
|
|
231
|
+
deserializing a file_type parameter.
|
|
232
|
+
If passed, type conversion is attempted
|
|
233
|
+
If omitted no type conversion is done.
|
|
234
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
235
|
+
classes that we have traveled through so that
|
|
236
|
+
if we see that class again we will not use its
|
|
237
|
+
discriminator again.
|
|
238
|
+
When traveling through a discriminator, the
|
|
239
|
+
composed schema that is
|
|
240
|
+
is traveled through is added to this set.
|
|
241
|
+
For example if Animal has a discriminator
|
|
242
|
+
petType and we pass in "Dog", and the class Dog
|
|
243
|
+
allOf includes Animal, we move through Animal
|
|
244
|
+
once using the discriminator, and pick Dog.
|
|
245
|
+
Then in Dog, we will make an instance of the
|
|
246
|
+
Animal class but this time we won't travel
|
|
247
|
+
through its discriminator because we passed in
|
|
248
|
+
_visited_composed_classes = (Animal,)
|
|
249
|
+
error (Error): [optional] # noqa: E501
|
|
250
|
+
metadata (ResponseMetadata): [optional] # noqa: E501
|
|
251
|
+
signed_download_url (str): [optional] # noqa: E501
|
|
252
|
+
signed_upload_url (str): [optional] # noqa: E501
|
|
253
|
+
success (bool): Indicates if API call was successful. [optional] # noqa: E501
|
|
254
|
+
warning (Warning): [optional] # noqa: E501
|
|
255
|
+
"""
|
|
256
|
+
|
|
257
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
258
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
259
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
260
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
261
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
262
|
+
|
|
263
|
+
if args:
|
|
264
|
+
for arg in args:
|
|
265
|
+
if isinstance(arg, dict):
|
|
266
|
+
kwargs.update(arg)
|
|
267
|
+
else:
|
|
268
|
+
raise ApiTypeError(
|
|
269
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
270
|
+
args,
|
|
271
|
+
self.__class__.__name__,
|
|
272
|
+
),
|
|
273
|
+
path_to_item=_path_to_item,
|
|
274
|
+
valid_classes=(self.__class__,),
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
self._data_store = {}
|
|
278
|
+
self._check_type = _check_type
|
|
279
|
+
self._spec_property_naming = _spec_property_naming
|
|
280
|
+
self._path_to_item = _path_to_item
|
|
281
|
+
self._configuration = _configuration
|
|
282
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
283
|
+
|
|
284
|
+
for var_name, var_value in kwargs.items():
|
|
285
|
+
if var_name not in self.attribute_map and \
|
|
286
|
+
self._configuration is not None and \
|
|
287
|
+
self._configuration.discard_unknown_keys and \
|
|
288
|
+
self.additional_properties_type is None:
|
|
289
|
+
# discard variable.
|
|
290
|
+
continue
|
|
291
|
+
setattr(self, var_name, var_value)
|
|
292
|
+
if var_name in self.read_only_vars:
|
|
293
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
294
|
+
f"class with read only attributes.")
|
ultracart/model/customer.py
CHANGED
|
@@ -106,6 +106,9 @@ class Customer(ModelNormal):
|
|
|
106
106
|
('dhl_duty_account_number',): {
|
|
107
107
|
'max_length': 20,
|
|
108
108
|
},
|
|
109
|
+
('fax',): {
|
|
110
|
+
'max_length': 32,
|
|
111
|
+
},
|
|
109
112
|
('fedex_account_number',): {
|
|
110
113
|
'max_length': 20,
|
|
111
114
|
},
|
|
@@ -178,6 +181,7 @@ class Customer(ModelNormal):
|
|
|
178
181
|
'edi': (CustomerEDI,), # noqa: E501
|
|
179
182
|
'email': (str,), # noqa: E501
|
|
180
183
|
'exempt_shipping_handling_charge': (bool,), # noqa: E501
|
|
184
|
+
'fax': (str,), # noqa: E501
|
|
181
185
|
'fedex_account_number': (str,), # noqa: E501
|
|
182
186
|
'free_shipping': (bool,), # noqa: E501
|
|
183
187
|
'free_shipping_minimum': (float,), # noqa: E501
|
|
@@ -250,6 +254,7 @@ class Customer(ModelNormal):
|
|
|
250
254
|
'edi': 'edi', # noqa: E501
|
|
251
255
|
'email': 'email', # noqa: E501
|
|
252
256
|
'exempt_shipping_handling_charge': 'exempt_shipping_handling_charge', # noqa: E501
|
|
257
|
+
'fax': 'fax', # noqa: E501
|
|
253
258
|
'fedex_account_number': 'fedex_account_number', # noqa: E501
|
|
254
259
|
'free_shipping': 'free_shipping', # noqa: E501
|
|
255
260
|
'free_shipping_minimum': 'free_shipping_minimum', # noqa: E501
|
|
@@ -357,6 +362,7 @@ class Customer(ModelNormal):
|
|
|
357
362
|
edi (CustomerEDI): [optional] # noqa: E501
|
|
358
363
|
email (str): Email address of this customer profile. [optional] # noqa: E501
|
|
359
364
|
exempt_shipping_handling_charge (bool): Exempt shipping handling charge. [optional] # noqa: E501
|
|
365
|
+
fax (str): Fax Number. [optional] # noqa: E501
|
|
360
366
|
fedex_account_number (str): FedEx account number. [optional] # noqa: E501
|
|
361
367
|
free_shipping (bool): This customer always receives free shipping. [optional] # noqa: E501
|
|
362
368
|
free_shipping_minimum (float): If free_shipping is true, this is the minimum subtotal required for free shipping. [optional] # noqa: E501
|
|
@@ -506,6 +512,7 @@ class Customer(ModelNormal):
|
|
|
506
512
|
edi (CustomerEDI): [optional] # noqa: E501
|
|
507
513
|
email (str): Email address of this customer profile. [optional] # noqa: E501
|
|
508
514
|
exempt_shipping_handling_charge (bool): Exempt shipping handling charge. [optional] # noqa: E501
|
|
515
|
+
fax (str): Fax Number. [optional] # noqa: E501
|
|
509
516
|
fedex_account_number (str): FedEx account number. [optional] # noqa: E501
|
|
510
517
|
free_shipping (bool): This customer always receives free shipping. [optional] # noqa: E501
|
|
511
518
|
free_shipping_minimum (float): If free_shipping is true, this is the minimum subtotal required for free shipping. [optional] # noqa: E501
|
|
@@ -101,6 +101,7 @@ class ItemShippingMethod(ModelNormal):
|
|
|
101
101
|
'shipping_method': (str,), # noqa: E501
|
|
102
102
|
'shipping_method_oid': (int,), # noqa: E501
|
|
103
103
|
'shipping_method_validity': (str,), # noqa: E501
|
|
104
|
+
'ships_separately': (bool,), # noqa: E501
|
|
104
105
|
'signature_required': (bool,), # noqa: E501
|
|
105
106
|
}
|
|
106
107
|
|
|
@@ -124,6 +125,7 @@ class ItemShippingMethod(ModelNormal):
|
|
|
124
125
|
'shipping_method': 'shipping_method', # noqa: E501
|
|
125
126
|
'shipping_method_oid': 'shipping_method_oid', # noqa: E501
|
|
126
127
|
'shipping_method_validity': 'shipping_method_validity', # noqa: E501
|
|
128
|
+
'ships_separately': 'ships_separately', # noqa: E501
|
|
127
129
|
'signature_required': 'signature_required', # noqa: E501
|
|
128
130
|
}
|
|
129
131
|
|
|
@@ -182,6 +184,7 @@ class ItemShippingMethod(ModelNormal):
|
|
|
182
184
|
shipping_method (str): Shipping method name. [optional] # noqa: E501
|
|
183
185
|
shipping_method_oid (int): Shipping method object identifier. [optional] # noqa: E501
|
|
184
186
|
shipping_method_validity (str): Shipping method validity. [optional] # noqa: E501
|
|
187
|
+
ships_separately (bool): Ships separately. [optional] # noqa: E501
|
|
185
188
|
signature_required (bool): Signature required. [optional] # noqa: E501
|
|
186
189
|
"""
|
|
187
190
|
|
|
@@ -282,6 +285,7 @@ class ItemShippingMethod(ModelNormal):
|
|
|
282
285
|
shipping_method (str): Shipping method name. [optional] # noqa: E501
|
|
283
286
|
shipping_method_oid (int): Shipping method object identifier. [optional] # noqa: E501
|
|
284
287
|
shipping_method_validity (str): Shipping method validity. [optional] # noqa: E501
|
|
288
|
+
ships_separately (bool): Ships separately. [optional] # noqa: E501
|
|
285
289
|
signature_required (bool): Signature required. [optional] # noqa: E501
|
|
286
290
|
"""
|
|
287
291
|
|
ultracart/model/item_tag.py
CHANGED
|
@@ -145,7 +145,7 @@ class ItemTag(ModelNormal):
|
|
|
145
145
|
Animal class but this time we won't travel
|
|
146
146
|
through its discriminator because we passed in
|
|
147
147
|
_visited_composed_classes = (Animal,)
|
|
148
|
-
tag_type (str):
|
|
148
|
+
tag_type (str): tag_type. [optional] # noqa: E501
|
|
149
149
|
tag_value (str): tag_value. [optional] # noqa: E501
|
|
150
150
|
"""
|
|
151
151
|
|
|
@@ -232,7 +232,7 @@ class ItemTag(ModelNormal):
|
|
|
232
232
|
Animal class but this time we won't travel
|
|
233
233
|
through its discriminator because we passed in
|
|
234
234
|
_visited_composed_classes = (Animal,)
|
|
235
|
-
tag_type (str):
|
|
235
|
+
tag_type (str): tag_type. [optional] # noqa: E501
|
|
236
236
|
tag_value (str): tag_value. [optional] # noqa: E501
|
|
237
237
|
"""
|
|
238
238
|
|
ultracart/model/order_payment.py
CHANGED
|
@@ -0,0 +1,282 @@
|
|
|
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 ReplaceOrderItemIdRequest(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
|
+
('merchant_item_id',): {
|
|
63
|
+
'max_length': 20,
|
|
64
|
+
},
|
|
65
|
+
('replacement_merchant_item_id',): {
|
|
66
|
+
'max_length': 20,
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@cached_property
|
|
71
|
+
def additional_properties_type():
|
|
72
|
+
"""
|
|
73
|
+
This must be a method because a model may have properties that are
|
|
74
|
+
of type self, this must run after the class is loaded
|
|
75
|
+
"""
|
|
76
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
77
|
+
|
|
78
|
+
_nullable = False
|
|
79
|
+
|
|
80
|
+
@cached_property
|
|
81
|
+
def openapi_types():
|
|
82
|
+
"""
|
|
83
|
+
This must be a method because a model may have properties that are
|
|
84
|
+
of type self, this must run after the class is loaded
|
|
85
|
+
|
|
86
|
+
Returns
|
|
87
|
+
openapi_types (dict): The key is attribute name
|
|
88
|
+
and the value is attribute type.
|
|
89
|
+
"""
|
|
90
|
+
return {
|
|
91
|
+
'item_index': (int,), # noqa: E501
|
|
92
|
+
'merchant_item_id': (str,), # noqa: E501
|
|
93
|
+
'order_id': (str,), # noqa: E501
|
|
94
|
+
'replacement_merchant_item_id': (str,), # noqa: E501
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@cached_property
|
|
98
|
+
def discriminator():
|
|
99
|
+
return None
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
attribute_map = {
|
|
103
|
+
'item_index': 'item_index', # noqa: E501
|
|
104
|
+
'merchant_item_id': 'merchant_item_id', # noqa: E501
|
|
105
|
+
'order_id': 'order_id', # noqa: E501
|
|
106
|
+
'replacement_merchant_item_id': 'replacement_merchant_item_id', # 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
|
+
"""ReplaceOrderItemIdRequest - 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
|
+
item_index (int): Index of the item on the order. Must match order.items[].item_index. [optional] # noqa: E501
|
|
151
|
+
merchant_item_id (str): Item ID. [optional] # noqa: E501
|
|
152
|
+
order_id (str): Order ID. [optional] # noqa: E501
|
|
153
|
+
replacement_merchant_item_id (str): Replacement Item ID. [optional] # noqa: E501
|
|
154
|
+
"""
|
|
155
|
+
|
|
156
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
157
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
158
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
159
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
160
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
161
|
+
|
|
162
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
163
|
+
|
|
164
|
+
if args:
|
|
165
|
+
for arg in args:
|
|
166
|
+
if isinstance(arg, dict):
|
|
167
|
+
kwargs.update(arg)
|
|
168
|
+
else:
|
|
169
|
+
raise ApiTypeError(
|
|
170
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
171
|
+
args,
|
|
172
|
+
self.__class__.__name__,
|
|
173
|
+
),
|
|
174
|
+
path_to_item=_path_to_item,
|
|
175
|
+
valid_classes=(self.__class__,),
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
self._data_store = {}
|
|
179
|
+
self._check_type = _check_type
|
|
180
|
+
self._spec_property_naming = _spec_property_naming
|
|
181
|
+
self._path_to_item = _path_to_item
|
|
182
|
+
self._configuration = _configuration
|
|
183
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
184
|
+
|
|
185
|
+
for var_name, var_value in kwargs.items():
|
|
186
|
+
if var_name not in self.attribute_map and \
|
|
187
|
+
self._configuration is not None and \
|
|
188
|
+
self._configuration.discard_unknown_keys and \
|
|
189
|
+
self.additional_properties_type is None:
|
|
190
|
+
# discard variable.
|
|
191
|
+
continue
|
|
192
|
+
setattr(self, var_name, var_value)
|
|
193
|
+
return self
|
|
194
|
+
|
|
195
|
+
required_properties = set([
|
|
196
|
+
'_data_store',
|
|
197
|
+
'_check_type',
|
|
198
|
+
'_spec_property_naming',
|
|
199
|
+
'_path_to_item',
|
|
200
|
+
'_configuration',
|
|
201
|
+
'_visited_composed_classes',
|
|
202
|
+
])
|
|
203
|
+
|
|
204
|
+
@convert_js_args_to_python_args
|
|
205
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
206
|
+
"""ReplaceOrderItemIdRequest - a model defined in OpenAPI
|
|
207
|
+
|
|
208
|
+
Keyword Args:
|
|
209
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
210
|
+
will be type checked and a TypeError will be
|
|
211
|
+
raised if the wrong type is input.
|
|
212
|
+
Defaults to True
|
|
213
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
214
|
+
drill down to the model in received_data
|
|
215
|
+
when deserializing a response
|
|
216
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
217
|
+
are serialized names, as specified in the OpenAPI document.
|
|
218
|
+
False if the variable names in the input data
|
|
219
|
+
are pythonic names, e.g. snake case (default)
|
|
220
|
+
_configuration (Configuration): the instance to use when
|
|
221
|
+
deserializing a file_type parameter.
|
|
222
|
+
If passed, type conversion is attempted
|
|
223
|
+
If omitted no type conversion is done.
|
|
224
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
225
|
+
classes that we have traveled through so that
|
|
226
|
+
if we see that class again we will not use its
|
|
227
|
+
discriminator again.
|
|
228
|
+
When traveling through a discriminator, the
|
|
229
|
+
composed schema that is
|
|
230
|
+
is traveled through is added to this set.
|
|
231
|
+
For example if Animal has a discriminator
|
|
232
|
+
petType and we pass in "Dog", and the class Dog
|
|
233
|
+
allOf includes Animal, we move through Animal
|
|
234
|
+
once using the discriminator, and pick Dog.
|
|
235
|
+
Then in Dog, we will make an instance of the
|
|
236
|
+
Animal class but this time we won't travel
|
|
237
|
+
through its discriminator because we passed in
|
|
238
|
+
_visited_composed_classes = (Animal,)
|
|
239
|
+
item_index (int): Index of the item on the order. Must match order.items[].item_index. [optional] # noqa: E501
|
|
240
|
+
merchant_item_id (str): Item ID. [optional] # noqa: E501
|
|
241
|
+
order_id (str): Order ID. [optional] # noqa: E501
|
|
242
|
+
replacement_merchant_item_id (str): Replacement Item ID. [optional] # noqa: E501
|
|
243
|
+
"""
|
|
244
|
+
|
|
245
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
246
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
247
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
248
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
249
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
250
|
+
|
|
251
|
+
if args:
|
|
252
|
+
for arg in args:
|
|
253
|
+
if isinstance(arg, dict):
|
|
254
|
+
kwargs.update(arg)
|
|
255
|
+
else:
|
|
256
|
+
raise ApiTypeError(
|
|
257
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
258
|
+
args,
|
|
259
|
+
self.__class__.__name__,
|
|
260
|
+
),
|
|
261
|
+
path_to_item=_path_to_item,
|
|
262
|
+
valid_classes=(self.__class__,),
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
self._data_store = {}
|
|
266
|
+
self._check_type = _check_type
|
|
267
|
+
self._spec_property_naming = _spec_property_naming
|
|
268
|
+
self._path_to_item = _path_to_item
|
|
269
|
+
self._configuration = _configuration
|
|
270
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
271
|
+
|
|
272
|
+
for var_name, var_value in kwargs.items():
|
|
273
|
+
if var_name not in self.attribute_map and \
|
|
274
|
+
self._configuration is not None and \
|
|
275
|
+
self._configuration.discard_unknown_keys and \
|
|
276
|
+
self.additional_properties_type is None:
|
|
277
|
+
# discard variable.
|
|
278
|
+
continue
|
|
279
|
+
setattr(self, var_name, var_value)
|
|
280
|
+
if var_name in self.read_only_vars:
|
|
281
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
282
|
+
f"class with read only attributes.")
|