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