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