ultracart-rest-sdk 4.1.15__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,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.custom_dashboard import CustomDashboard
35
+ from ultracart.model.error import Error
36
+ from ultracart.model.response_metadata import ResponseMetadata
37
+ from ultracart.model.warning import Warning
38
+ globals()['CustomDashboard'] = CustomDashboard
39
+ globals()['Error'] = Error
40
+ globals()['ResponseMetadata'] = ResponseMetadata
41
+ globals()['Warning'] = Warning
42
+
43
+
44
+ class CustomDashboardsResponse(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
+ 'dashboards': ([CustomDashboard],), # 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
+ 'dashboards': 'dashboards', # 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
+ """CustomDashboardsResponse - 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
+ dashboards ([CustomDashboard]): reports. [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
+ """CustomDashboardsResponse - 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
+ dashboards ([CustomDashboard]): reports. [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.")
@@ -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.")