ultracart-rest-sdk 4.1.21__py3-none-any.whl → 4.1.23__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 +576 -0
- ultracart/api/customer_api.py +2 -2
- ultracart/api_client.py +1 -1
- ultracart/configuration.py +1 -1
- ultracart/model/conversation_delete_knowledge_base_document_response.py +290 -0
- ultracart/model/conversation_insert_knowledge_base_document_request.py +264 -0
- ultracart/model/conversation_insert_knowledge_base_document_response.py +298 -0
- ultracart/model/conversation_knowledge_base_document.py +288 -0
- ultracart/model/conversation_knowledge_base_document_upload_url.py +268 -0
- ultracart/model/conversation_knowledge_base_document_upload_url_response.py +292 -0
- ultracart/model/conversation_knowledge_base_documents_response.py +292 -0
- ultracart/model/custom_report_account_config.py +10 -0
- ultracart/model/custom_report_usage_breakdown.py +268 -0
- ultracart/model/customer.py +7 -0
- ultracart/model/item_shipping_method.py +4 -0
- ultracart/model/order_payment.py +1 -0
- ultracart/model/replace_order_item_id_request.py +2 -2
- ultracart/models/__init__.py +8 -0
- {ultracart_rest_sdk-4.1.21.dist-info → ultracart_rest_sdk-4.1.23.dist-info}/METADATA +1 -1
- {ultracart_rest_sdk-4.1.21.dist-info → ultracart_rest_sdk-4.1.23.dist-info}/RECORD +24 -16
- {ultracart_rest_sdk-4.1.21.dist-info → ultracart_rest_sdk-4.1.23.dist-info}/LICENSE +0 -0
- {ultracart_rest_sdk-4.1.21.dist-info → ultracart_rest_sdk-4.1.23.dist-info}/WHEEL +0 -0
- {ultracart_rest_sdk-4.1.21.dist-info → ultracart_rest_sdk-4.1.23.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,292 @@
|
|
|
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.conversation_knowledge_base_document import ConversationKnowledgeBaseDocument
|
|
35
|
+
from ultracart.model.error import Error
|
|
36
|
+
from ultracart.model.response_metadata import ResponseMetadata
|
|
37
|
+
from ultracart.model.warning import Warning
|
|
38
|
+
globals()['ConversationKnowledgeBaseDocument'] = ConversationKnowledgeBaseDocument
|
|
39
|
+
globals()['Error'] = Error
|
|
40
|
+
globals()['ResponseMetadata'] = ResponseMetadata
|
|
41
|
+
globals()['Warning'] = Warning
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class ConversationKnowledgeBaseDocumentsResponse(ModelNormal):
|
|
45
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
46
|
+
Ref: https://openapi-generator.tech
|
|
47
|
+
|
|
48
|
+
Do not edit the class manually.
|
|
49
|
+
|
|
50
|
+
Attributes:
|
|
51
|
+
allowed_values (dict): The key is the tuple path to the attribute
|
|
52
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
53
|
+
with a capitalized key describing the allowed value and an allowed
|
|
54
|
+
value. These dicts store the allowed enum values.
|
|
55
|
+
attribute_map (dict): The key is attribute name
|
|
56
|
+
and the value is json key in definition.
|
|
57
|
+
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
58
|
+
variable value to the discriminator class name.
|
|
59
|
+
validations (dict): The key is the tuple path to the attribute
|
|
60
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
61
|
+
that stores validations for max_length, min_length, max_items,
|
|
62
|
+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
63
|
+
inclusive_minimum, and regex.
|
|
64
|
+
additional_properties_type (tuple): A tuple of classes accepted
|
|
65
|
+
as additional properties values.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
allowed_values = {
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
validations = {
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@cached_property
|
|
75
|
+
def additional_properties_type():
|
|
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
|
+
lazy_import()
|
|
81
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
82
|
+
|
|
83
|
+
_nullable = False
|
|
84
|
+
|
|
85
|
+
@cached_property
|
|
86
|
+
def openapi_types():
|
|
87
|
+
"""
|
|
88
|
+
This must be a method because a model may have properties that are
|
|
89
|
+
of type self, this must run after the class is loaded
|
|
90
|
+
|
|
91
|
+
Returns
|
|
92
|
+
openapi_types (dict): The key is attribute name
|
|
93
|
+
and the value is attribute type.
|
|
94
|
+
"""
|
|
95
|
+
lazy_import()
|
|
96
|
+
return {
|
|
97
|
+
'documents': ([ConversationKnowledgeBaseDocument],), # noqa: E501
|
|
98
|
+
'error': (Error,), # noqa: E501
|
|
99
|
+
'metadata': (ResponseMetadata,), # noqa: E501
|
|
100
|
+
'success': (bool,), # noqa: E501
|
|
101
|
+
'warning': (Warning,), # noqa: E501
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@cached_property
|
|
105
|
+
def discriminator():
|
|
106
|
+
return None
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
attribute_map = {
|
|
110
|
+
'documents': 'documents', # noqa: E501
|
|
111
|
+
'error': 'error', # noqa: E501
|
|
112
|
+
'metadata': 'metadata', # 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
|
+
"""ConversationKnowledgeBaseDocumentsResponse - 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
|
+
documents ([ConversationKnowledgeBaseDocument]): documents. [optional] # noqa: E501
|
|
159
|
+
error (Error): [optional] # noqa: E501
|
|
160
|
+
metadata (ResponseMetadata): [optional] # noqa: E501
|
|
161
|
+
success (bool): Indicates if API call was successful. [optional] # noqa: E501
|
|
162
|
+
warning (Warning): [optional] # noqa: E501
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
166
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
167
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
168
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
169
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
170
|
+
|
|
171
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
172
|
+
|
|
173
|
+
if args:
|
|
174
|
+
for arg in args:
|
|
175
|
+
if isinstance(arg, dict):
|
|
176
|
+
kwargs.update(arg)
|
|
177
|
+
else:
|
|
178
|
+
raise ApiTypeError(
|
|
179
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
180
|
+
args,
|
|
181
|
+
self.__class__.__name__,
|
|
182
|
+
),
|
|
183
|
+
path_to_item=_path_to_item,
|
|
184
|
+
valid_classes=(self.__class__,),
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
self._data_store = {}
|
|
188
|
+
self._check_type = _check_type
|
|
189
|
+
self._spec_property_naming = _spec_property_naming
|
|
190
|
+
self._path_to_item = _path_to_item
|
|
191
|
+
self._configuration = _configuration
|
|
192
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
193
|
+
|
|
194
|
+
for var_name, var_value in kwargs.items():
|
|
195
|
+
if var_name not in self.attribute_map and \
|
|
196
|
+
self._configuration is not None and \
|
|
197
|
+
self._configuration.discard_unknown_keys and \
|
|
198
|
+
self.additional_properties_type is None:
|
|
199
|
+
# discard variable.
|
|
200
|
+
continue
|
|
201
|
+
setattr(self, var_name, var_value)
|
|
202
|
+
return self
|
|
203
|
+
|
|
204
|
+
required_properties = set([
|
|
205
|
+
'_data_store',
|
|
206
|
+
'_check_type',
|
|
207
|
+
'_spec_property_naming',
|
|
208
|
+
'_path_to_item',
|
|
209
|
+
'_configuration',
|
|
210
|
+
'_visited_composed_classes',
|
|
211
|
+
])
|
|
212
|
+
|
|
213
|
+
@convert_js_args_to_python_args
|
|
214
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
215
|
+
"""ConversationKnowledgeBaseDocumentsResponse - a model defined in OpenAPI
|
|
216
|
+
|
|
217
|
+
Keyword Args:
|
|
218
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
219
|
+
will be type checked and a TypeError will be
|
|
220
|
+
raised if the wrong type is input.
|
|
221
|
+
Defaults to True
|
|
222
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
223
|
+
drill down to the model in received_data
|
|
224
|
+
when deserializing a response
|
|
225
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
226
|
+
are serialized names, as specified in the OpenAPI document.
|
|
227
|
+
False if the variable names in the input data
|
|
228
|
+
are pythonic names, e.g. snake case (default)
|
|
229
|
+
_configuration (Configuration): the instance to use when
|
|
230
|
+
deserializing a file_type parameter.
|
|
231
|
+
If passed, type conversion is attempted
|
|
232
|
+
If omitted no type conversion is done.
|
|
233
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
234
|
+
classes that we have traveled through so that
|
|
235
|
+
if we see that class again we will not use its
|
|
236
|
+
discriminator again.
|
|
237
|
+
When traveling through a discriminator, the
|
|
238
|
+
composed schema that is
|
|
239
|
+
is traveled through is added to this set.
|
|
240
|
+
For example if Animal has a discriminator
|
|
241
|
+
petType and we pass in "Dog", and the class Dog
|
|
242
|
+
allOf includes Animal, we move through Animal
|
|
243
|
+
once using the discriminator, and pick Dog.
|
|
244
|
+
Then in Dog, we will make an instance of the
|
|
245
|
+
Animal class but this time we won't travel
|
|
246
|
+
through its discriminator because we passed in
|
|
247
|
+
_visited_composed_classes = (Animal,)
|
|
248
|
+
documents ([ConversationKnowledgeBaseDocument]): documents. [optional] # noqa: E501
|
|
249
|
+
error (Error): [optional] # noqa: E501
|
|
250
|
+
metadata (ResponseMetadata): [optional] # noqa: E501
|
|
251
|
+
success (bool): Indicates if API call was successful. [optional] # noqa: E501
|
|
252
|
+
warning (Warning): [optional] # noqa: E501
|
|
253
|
+
"""
|
|
254
|
+
|
|
255
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
256
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
257
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
258
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
259
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
260
|
+
|
|
261
|
+
if args:
|
|
262
|
+
for arg in args:
|
|
263
|
+
if isinstance(arg, dict):
|
|
264
|
+
kwargs.update(arg)
|
|
265
|
+
else:
|
|
266
|
+
raise ApiTypeError(
|
|
267
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
268
|
+
args,
|
|
269
|
+
self.__class__.__name__,
|
|
270
|
+
),
|
|
271
|
+
path_to_item=_path_to_item,
|
|
272
|
+
valid_classes=(self.__class__,),
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
self._data_store = {}
|
|
276
|
+
self._check_type = _check_type
|
|
277
|
+
self._spec_property_naming = _spec_property_naming
|
|
278
|
+
self._path_to_item = _path_to_item
|
|
279
|
+
self._configuration = _configuration
|
|
280
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
281
|
+
|
|
282
|
+
for var_name, var_value in kwargs.items():
|
|
283
|
+
if var_name not in self.attribute_map and \
|
|
284
|
+
self._configuration is not None and \
|
|
285
|
+
self._configuration.discard_unknown_keys and \
|
|
286
|
+
self.additional_properties_type is None:
|
|
287
|
+
# discard variable.
|
|
288
|
+
continue
|
|
289
|
+
setattr(self, var_name, var_value)
|
|
290
|
+
if var_name in self.read_only_vars:
|
|
291
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
292
|
+
f"class with read only attributes.")
|
|
@@ -30,6 +30,10 @@ from ultracart.model_utils import ( # noqa: F401
|
|
|
30
30
|
from ultracart.exceptions import ApiAttributeError
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
def lazy_import():
|
|
34
|
+
from ultracart.model.custom_report_usage_breakdown import CustomReportUsageBreakdown
|
|
35
|
+
globals()['CustomReportUsageBreakdown'] = CustomReportUsageBreakdown
|
|
36
|
+
|
|
33
37
|
|
|
34
38
|
class CustomReportAccountConfig(ModelNormal):
|
|
35
39
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
@@ -67,6 +71,7 @@ class CustomReportAccountConfig(ModelNormal):
|
|
|
67
71
|
This must be a method because a model may have properties that are
|
|
68
72
|
of type self, this must run after the class is loaded
|
|
69
73
|
"""
|
|
74
|
+
lazy_import()
|
|
70
75
|
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
71
76
|
|
|
72
77
|
_nullable = False
|
|
@@ -81,9 +86,11 @@ class CustomReportAccountConfig(ModelNormal):
|
|
|
81
86
|
openapi_types (dict): The key is attribute name
|
|
82
87
|
and the value is attribute type.
|
|
83
88
|
"""
|
|
89
|
+
lazy_import()
|
|
84
90
|
return {
|
|
85
91
|
'ai_budget': (float,), # noqa: E501
|
|
86
92
|
'ai_usage': (float,), # noqa: E501
|
|
93
|
+
'ai_usage_breakdowns': ([CustomReportUsageBreakdown],), # noqa: E501
|
|
87
94
|
'merchant_id': (str,), # noqa: E501
|
|
88
95
|
'novice_sql_comments': (bool,), # noqa: E501
|
|
89
96
|
'opt_in': (bool,), # noqa: E501
|
|
@@ -102,6 +109,7 @@ class CustomReportAccountConfig(ModelNormal):
|
|
|
102
109
|
attribute_map = {
|
|
103
110
|
'ai_budget': 'ai_budget', # noqa: E501
|
|
104
111
|
'ai_usage': 'ai_usage', # noqa: E501
|
|
112
|
+
'ai_usage_breakdowns': 'ai_usage_breakdowns', # noqa: E501
|
|
105
113
|
'merchant_id': 'merchant_id', # noqa: E501
|
|
106
114
|
'novice_sql_comments': 'novice_sql_comments', # noqa: E501
|
|
107
115
|
'opt_in': 'opt_in', # noqa: E501
|
|
@@ -155,6 +163,7 @@ class CustomReportAccountConfig(ModelNormal):
|
|
|
155
163
|
_visited_composed_classes = (Animal,)
|
|
156
164
|
ai_budget (float): [optional] # noqa: E501
|
|
157
165
|
ai_usage (float): Current AI usage creating reports. [optional] # noqa: E501
|
|
166
|
+
ai_usage_breakdowns ([CustomReportUsageBreakdown]): [optional] # noqa: E501
|
|
158
167
|
merchant_id (str): Current BigQuery SQL usage running reports. [optional] # noqa: E501
|
|
159
168
|
novice_sql_comments (bool): [optional] # noqa: E501
|
|
160
169
|
opt_in (bool): True if they have opted into custom reports. [optional] # noqa: E501
|
|
@@ -250,6 +259,7 @@ class CustomReportAccountConfig(ModelNormal):
|
|
|
250
259
|
_visited_composed_classes = (Animal,)
|
|
251
260
|
ai_budget (float): [optional] # noqa: E501
|
|
252
261
|
ai_usage (float): Current AI usage creating reports. [optional] # noqa: E501
|
|
262
|
+
ai_usage_breakdowns ([CustomReportUsageBreakdown]): [optional] # noqa: E501
|
|
253
263
|
merchant_id (str): Current BigQuery SQL usage running reports. [optional] # noqa: E501
|
|
254
264
|
novice_sql_comments (bool): [optional] # noqa: E501
|
|
255
265
|
opt_in (bool): True if they have opted into custom reports. [optional] # noqa: E501
|
|
@@ -0,0 +1,268 @@
|
|
|
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 CustomReportUsageBreakdown(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
|
+
'usage': (float,), # noqa: E501
|
|
86
|
+
'usage_date': (str,), # noqa: E501
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@cached_property
|
|
90
|
+
def discriminator():
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
attribute_map = {
|
|
95
|
+
'usage': 'usage', # noqa: E501
|
|
96
|
+
'usage_date': 'usage_date', # noqa: E501
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
read_only_vars = {
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
_composed_schemas = {}
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
@convert_js_args_to_python_args
|
|
106
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
107
|
+
"""CustomReportUsageBreakdown - a model defined in OpenAPI
|
|
108
|
+
|
|
109
|
+
Keyword Args:
|
|
110
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
111
|
+
will be type checked and a TypeError will be
|
|
112
|
+
raised if the wrong type is input.
|
|
113
|
+
Defaults to True
|
|
114
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
115
|
+
drill down to the model in received_data
|
|
116
|
+
when deserializing a response
|
|
117
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
118
|
+
are serialized names, as specified in the OpenAPI document.
|
|
119
|
+
False if the variable names in the input data
|
|
120
|
+
are pythonic names, e.g. snake case (default)
|
|
121
|
+
_configuration (Configuration): the instance to use when
|
|
122
|
+
deserializing a file_type parameter.
|
|
123
|
+
If passed, type conversion is attempted
|
|
124
|
+
If omitted no type conversion is done.
|
|
125
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
126
|
+
classes that we have traveled through so that
|
|
127
|
+
if we see that class again we will not use its
|
|
128
|
+
discriminator again.
|
|
129
|
+
When traveling through a discriminator, the
|
|
130
|
+
composed schema that is
|
|
131
|
+
is traveled through is added to this set.
|
|
132
|
+
For example if Animal has a discriminator
|
|
133
|
+
petType and we pass in "Dog", and the class Dog
|
|
134
|
+
allOf includes Animal, we move through Animal
|
|
135
|
+
once using the discriminator, and pick Dog.
|
|
136
|
+
Then in Dog, we will make an instance of the
|
|
137
|
+
Animal class but this time we won't travel
|
|
138
|
+
through its discriminator because we passed in
|
|
139
|
+
_visited_composed_classes = (Animal,)
|
|
140
|
+
usage (float): [optional] # noqa: E501
|
|
141
|
+
usage_date (str): Date/time that usage occurred. [optional] # noqa: E501
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
145
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
146
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
147
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
148
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
149
|
+
|
|
150
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
151
|
+
|
|
152
|
+
if args:
|
|
153
|
+
for arg in args:
|
|
154
|
+
if isinstance(arg, dict):
|
|
155
|
+
kwargs.update(arg)
|
|
156
|
+
else:
|
|
157
|
+
raise ApiTypeError(
|
|
158
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
159
|
+
args,
|
|
160
|
+
self.__class__.__name__,
|
|
161
|
+
),
|
|
162
|
+
path_to_item=_path_to_item,
|
|
163
|
+
valid_classes=(self.__class__,),
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
self._data_store = {}
|
|
167
|
+
self._check_type = _check_type
|
|
168
|
+
self._spec_property_naming = _spec_property_naming
|
|
169
|
+
self._path_to_item = _path_to_item
|
|
170
|
+
self._configuration = _configuration
|
|
171
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
172
|
+
|
|
173
|
+
for var_name, var_value in kwargs.items():
|
|
174
|
+
if var_name not in self.attribute_map and \
|
|
175
|
+
self._configuration is not None and \
|
|
176
|
+
self._configuration.discard_unknown_keys and \
|
|
177
|
+
self.additional_properties_type is None:
|
|
178
|
+
# discard variable.
|
|
179
|
+
continue
|
|
180
|
+
setattr(self, var_name, var_value)
|
|
181
|
+
return self
|
|
182
|
+
|
|
183
|
+
required_properties = set([
|
|
184
|
+
'_data_store',
|
|
185
|
+
'_check_type',
|
|
186
|
+
'_spec_property_naming',
|
|
187
|
+
'_path_to_item',
|
|
188
|
+
'_configuration',
|
|
189
|
+
'_visited_composed_classes',
|
|
190
|
+
])
|
|
191
|
+
|
|
192
|
+
@convert_js_args_to_python_args
|
|
193
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
194
|
+
"""CustomReportUsageBreakdown - a model defined in OpenAPI
|
|
195
|
+
|
|
196
|
+
Keyword Args:
|
|
197
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
198
|
+
will be type checked and a TypeError will be
|
|
199
|
+
raised if the wrong type is input.
|
|
200
|
+
Defaults to True
|
|
201
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
202
|
+
drill down to the model in received_data
|
|
203
|
+
when deserializing a response
|
|
204
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
205
|
+
are serialized names, as specified in the OpenAPI document.
|
|
206
|
+
False if the variable names in the input data
|
|
207
|
+
are pythonic names, e.g. snake case (default)
|
|
208
|
+
_configuration (Configuration): the instance to use when
|
|
209
|
+
deserializing a file_type parameter.
|
|
210
|
+
If passed, type conversion is attempted
|
|
211
|
+
If omitted no type conversion is done.
|
|
212
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
213
|
+
classes that we have traveled through so that
|
|
214
|
+
if we see that class again we will not use its
|
|
215
|
+
discriminator again.
|
|
216
|
+
When traveling through a discriminator, the
|
|
217
|
+
composed schema that is
|
|
218
|
+
is traveled through is added to this set.
|
|
219
|
+
For example if Animal has a discriminator
|
|
220
|
+
petType and we pass in "Dog", and the class Dog
|
|
221
|
+
allOf includes Animal, we move through Animal
|
|
222
|
+
once using the discriminator, and pick Dog.
|
|
223
|
+
Then in Dog, we will make an instance of the
|
|
224
|
+
Animal class but this time we won't travel
|
|
225
|
+
through its discriminator because we passed in
|
|
226
|
+
_visited_composed_classes = (Animal,)
|
|
227
|
+
usage (float): [optional] # noqa: E501
|
|
228
|
+
usage_date (str): Date/time that usage occurred. [optional] # noqa: E501
|
|
229
|
+
"""
|
|
230
|
+
|
|
231
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
232
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
233
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
234
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
235
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
236
|
+
|
|
237
|
+
if args:
|
|
238
|
+
for arg in args:
|
|
239
|
+
if isinstance(arg, dict):
|
|
240
|
+
kwargs.update(arg)
|
|
241
|
+
else:
|
|
242
|
+
raise ApiTypeError(
|
|
243
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
244
|
+
args,
|
|
245
|
+
self.__class__.__name__,
|
|
246
|
+
),
|
|
247
|
+
path_to_item=_path_to_item,
|
|
248
|
+
valid_classes=(self.__class__,),
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
self._data_store = {}
|
|
252
|
+
self._check_type = _check_type
|
|
253
|
+
self._spec_property_naming = _spec_property_naming
|
|
254
|
+
self._path_to_item = _path_to_item
|
|
255
|
+
self._configuration = _configuration
|
|
256
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
257
|
+
|
|
258
|
+
for var_name, var_value in kwargs.items():
|
|
259
|
+
if var_name not in self.attribute_map and \
|
|
260
|
+
self._configuration is not None and \
|
|
261
|
+
self._configuration.discard_unknown_keys and \
|
|
262
|
+
self.additional_properties_type is None:
|
|
263
|
+
# discard variable.
|
|
264
|
+
continue
|
|
265
|
+
setattr(self, var_name, var_value)
|
|
266
|
+
if var_name in self.read_only_vars:
|
|
267
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
268
|
+
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
|