ultracart-rest-sdk 4.0.200__py3-none-any.whl → 4.0.201__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.email_sms_order import EmailSmsOrder
35
+ from ultracart.model.error import Error
36
+ from ultracart.model.response_metadata import ResponseMetadata
37
+ from ultracart.model.warning import Warning
38
+ globals()['EmailSmsOrder'] = EmailSmsOrder
39
+ globals()['Error'] = Error
40
+ globals()['ResponseMetadata'] = ResponseMetadata
41
+ globals()['Warning'] = Warning
42
+
43
+
44
+ class EmailSmsOrdersResponse(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
+ 'error': (Error,), # noqa: E501
98
+ 'metadata': (ResponseMetadata,), # noqa: E501
99
+ 'orders': ([EmailSmsOrder],), # 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
+ 'error': 'error', # noqa: E501
111
+ 'metadata': 'metadata', # noqa: E501
112
+ 'orders': 'orders', # 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
+ """EmailSmsOrdersResponse - a model defined in OpenAPI
126
+
127
+ Keyword Args:
128
+ _check_type (bool): if True, values for parameters in openapi_types
129
+ will be type checked and a TypeError will be
130
+ raised if the wrong type is input.
131
+ Defaults to True
132
+ _path_to_item (tuple/list): This is a list of keys or values to
133
+ drill down to the model in received_data
134
+ when deserializing a response
135
+ _spec_property_naming (bool): True if the variable names in the input data
136
+ are serialized names, as specified in the OpenAPI document.
137
+ False if the variable names in the input data
138
+ are pythonic names, e.g. snake case (default)
139
+ _configuration (Configuration): the instance to use when
140
+ deserializing a file_type parameter.
141
+ If passed, type conversion is attempted
142
+ If omitted no type conversion is done.
143
+ _visited_composed_classes (tuple): This stores a tuple of
144
+ classes that we have traveled through so that
145
+ if we see that class again we will not use its
146
+ discriminator again.
147
+ When traveling through a discriminator, the
148
+ composed schema that is
149
+ is traveled through is added to this set.
150
+ For example if Animal has a discriminator
151
+ petType and we pass in "Dog", and the class Dog
152
+ allOf includes Animal, we move through Animal
153
+ once using the discriminator, and pick Dog.
154
+ Then in Dog, we will make an instance of the
155
+ Animal class but this time we won't travel
156
+ through its discriminator because we passed in
157
+ _visited_composed_classes = (Animal,)
158
+ error (Error): [optional] # noqa: E501
159
+ metadata (ResponseMetadata): [optional] # noqa: E501
160
+ orders ([EmailSmsOrder]): [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
+ """EmailSmsOrdersResponse - 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
+ error (Error): [optional] # noqa: E501
249
+ metadata (ResponseMetadata): [optional] # noqa: E501
250
+ orders ([EmailSmsOrder]): [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,380 @@
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 EmailSmsStat(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
+ 'click_count': (int,), # noqa: E501
86
+ 'click_count_formatted': (str,), # noqa: E501
87
+ 'conversion_count': (int,), # noqa: E501
88
+ 'conversion_count_formatted': (str,), # noqa: E501
89
+ 'deleted': (bool,), # noqa: E501
90
+ 'delivered_count': (int,), # noqa: E501
91
+ 'delivered_count_formatted': (str,), # noqa: E501
92
+ 'merchant_id': (str,), # noqa: E501
93
+ 'name': (str,), # noqa: E501
94
+ 'order_count': (int,), # noqa: E501
95
+ 'order_count_formatted': (str,), # noqa: E501
96
+ 'profit': (float,), # noqa: E501
97
+ 'profit_formatted': (str,), # noqa: E501
98
+ 'revenue': (float,), # noqa: E501
99
+ 'revenue_formatted': (str,), # noqa: E501
100
+ 'send_count': (int,), # noqa: E501
101
+ 'send_count_formatted': (str,), # noqa: E501
102
+ 'skipped_count': (int,), # noqa: E501
103
+ 'skipped_count_formatted': (str,), # noqa: E501
104
+ 'stat_type': (str,), # noqa: E501
105
+ 'status': (str,), # noqa: E501
106
+ 'status_dts': (str,), # noqa: E501
107
+ 'step_uuid': (str,), # noqa: E501
108
+ 'steps': ([EmailSmsStat],), # noqa: E501
109
+ 'storefront_oid': (int,), # noqa: E501
110
+ 'unsubscribe_count': (int,), # noqa: E501
111
+ 'unsubscribe_count_formatted': (str,), # noqa: E501
112
+ 'uuid': (str,), # noqa: E501
113
+ 'view_count': (int,), # noqa: E501
114
+ 'view_count_formatted': (str,), # noqa: E501
115
+ }
116
+
117
+ @cached_property
118
+ def discriminator():
119
+ return None
120
+
121
+
122
+ attribute_map = {
123
+ 'click_count': 'click_count', # noqa: E501
124
+ 'click_count_formatted': 'click_count_formatted', # noqa: E501
125
+ 'conversion_count': 'conversion_count', # noqa: E501
126
+ 'conversion_count_formatted': 'conversion_count_formatted', # noqa: E501
127
+ 'deleted': 'deleted', # noqa: E501
128
+ 'delivered_count': 'delivered_count', # noqa: E501
129
+ 'delivered_count_formatted': 'delivered_count_formatted', # noqa: E501
130
+ 'merchant_id': 'merchant_id', # noqa: E501
131
+ 'name': 'name', # noqa: E501
132
+ 'order_count': 'order_count', # noqa: E501
133
+ 'order_count_formatted': 'order_count_formatted', # noqa: E501
134
+ 'profit': 'profit', # noqa: E501
135
+ 'profit_formatted': 'profit_formatted', # noqa: E501
136
+ 'revenue': 'revenue', # noqa: E501
137
+ 'revenue_formatted': 'revenue_formatted', # noqa: E501
138
+ 'send_count': 'send_count', # noqa: E501
139
+ 'send_count_formatted': 'send_count_formatted', # noqa: E501
140
+ 'skipped_count': 'skipped_count', # noqa: E501
141
+ 'skipped_count_formatted': 'skipped_count_formatted', # noqa: E501
142
+ 'stat_type': 'stat_type', # noqa: E501
143
+ 'status': 'status', # noqa: E501
144
+ 'status_dts': 'status_dts', # noqa: E501
145
+ 'step_uuid': 'step_uuid', # noqa: E501
146
+ 'steps': 'steps', # noqa: E501
147
+ 'storefront_oid': 'storefront_oid', # noqa: E501
148
+ 'unsubscribe_count': 'unsubscribe_count', # noqa: E501
149
+ 'unsubscribe_count_formatted': 'unsubscribe_count_formatted', # noqa: E501
150
+ 'uuid': 'uuid', # noqa: E501
151
+ 'view_count': 'view_count', # noqa: E501
152
+ 'view_count_formatted': 'view_count_formatted', # noqa: E501
153
+ }
154
+
155
+ read_only_vars = {
156
+ }
157
+
158
+ _composed_schemas = {}
159
+
160
+ @classmethod
161
+ @convert_js_args_to_python_args
162
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
163
+ """EmailSmsStat - a model defined in OpenAPI
164
+
165
+ Keyword Args:
166
+ _check_type (bool): if True, values for parameters in openapi_types
167
+ will be type checked and a TypeError will be
168
+ raised if the wrong type is input.
169
+ Defaults to True
170
+ _path_to_item (tuple/list): This is a list of keys or values to
171
+ drill down to the model in received_data
172
+ when deserializing a response
173
+ _spec_property_naming (bool): True if the variable names in the input data
174
+ are serialized names, as specified in the OpenAPI document.
175
+ False if the variable names in the input data
176
+ are pythonic names, e.g. snake case (default)
177
+ _configuration (Configuration): the instance to use when
178
+ deserializing a file_type parameter.
179
+ If passed, type conversion is attempted
180
+ If omitted no type conversion is done.
181
+ _visited_composed_classes (tuple): This stores a tuple of
182
+ classes that we have traveled through so that
183
+ if we see that class again we will not use its
184
+ discriminator again.
185
+ When traveling through a discriminator, the
186
+ composed schema that is
187
+ is traveled through is added to this set.
188
+ For example if Animal has a discriminator
189
+ petType and we pass in "Dog", and the class Dog
190
+ allOf includes Animal, we move through Animal
191
+ once using the discriminator, and pick Dog.
192
+ Then in Dog, we will make an instance of the
193
+ Animal class but this time we won't travel
194
+ through its discriminator because we passed in
195
+ _visited_composed_classes = (Animal,)
196
+ click_count (int): Count of clicked emails. [optional] # noqa: E501
197
+ click_count_formatted (str): Count of clicked emails, formatted. [optional] # noqa: E501
198
+ conversion_count (int): Count of conversions. [optional] # noqa: E501
199
+ conversion_count_formatted (str): Count of conversions, formatted. [optional] # noqa: E501
200
+ deleted (bool): True if campaign/flow has been archived. [optional] # noqa: E501
201
+ delivered_count (int): Count of delivered emails. [optional] # noqa: E501
202
+ delivered_count_formatted (str): Count of delivered emails, formatted. [optional] # noqa: E501
203
+ merchant_id (str): Merchant ID. [optional] # noqa: E501
204
+ name (str): List or segment name. [optional] # noqa: E501
205
+ order_count (int): Count of orders. [optional] # noqa: E501
206
+ order_count_formatted (str): Count of orders, formatted. [optional] # noqa: E501
207
+ profit (float): Profit. [optional] # noqa: E501
208
+ profit_formatted (str): Profit, formatted. [optional] # noqa: E501
209
+ revenue (float): Revenue. [optional] # noqa: E501
210
+ revenue_formatted (str): Revenue, formatted. [optional] # noqa: E501
211
+ send_count (int): Count of emails sent. [optional] # noqa: E501
212
+ send_count_formatted (str): Count of emails sent, formatted. [optional] # noqa: E501
213
+ skipped_count (int): Count of skipped emails. [optional] # noqa: E501
214
+ skipped_count_formatted (str): Count of skipped emails, formatted. [optional] # noqa: E501
215
+ stat_type (str): Campaign, Flow or None (for anything else). [optional] # noqa: E501
216
+ status (str): Status of campaign or flow. [optional] # noqa: E501
217
+ status_dts (str): Status dts of campaign or flow. [optional] # noqa: E501
218
+ step_uuid (str): Step UUID if the statistics are at the step/email level. [optional] # noqa: E501
219
+ steps ([EmailSmsStat]): [optional] # noqa: E501
220
+ storefront_oid (int): Storefront oid. [optional] # noqa: E501
221
+ unsubscribe_count (int): Count of emails classified as unsubscribe. [optional] # noqa: E501
222
+ unsubscribe_count_formatted (str): Count of emails classified as unsubscribe, formatted. [optional] # noqa: E501
223
+ uuid (str): List/Segment uuid, or Flow/Campaign uuid depending on level of stat aggregation.. [optional] # noqa: E501
224
+ view_count (int): Count of views. [optional] # noqa: E501
225
+ view_count_formatted (str): Count of views, formatted. [optional] # noqa: E501
226
+ """
227
+
228
+ _check_type = kwargs.pop('_check_type', True)
229
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
230
+ _path_to_item = kwargs.pop('_path_to_item', ())
231
+ _configuration = kwargs.pop('_configuration', None)
232
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
233
+
234
+ self = super(OpenApiModel, cls).__new__(cls)
235
+
236
+ if args:
237
+ for arg in args:
238
+ if isinstance(arg, dict):
239
+ kwargs.update(arg)
240
+ else:
241
+ raise ApiTypeError(
242
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
243
+ args,
244
+ self.__class__.__name__,
245
+ ),
246
+ path_to_item=_path_to_item,
247
+ valid_classes=(self.__class__,),
248
+ )
249
+
250
+ self._data_store = {}
251
+ self._check_type = _check_type
252
+ self._spec_property_naming = _spec_property_naming
253
+ self._path_to_item = _path_to_item
254
+ self._configuration = _configuration
255
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
256
+
257
+ for var_name, var_value in kwargs.items():
258
+ if var_name not in self.attribute_map and \
259
+ self._configuration is not None and \
260
+ self._configuration.discard_unknown_keys and \
261
+ self.additional_properties_type is None:
262
+ # discard variable.
263
+ continue
264
+ setattr(self, var_name, var_value)
265
+ return self
266
+
267
+ required_properties = set([
268
+ '_data_store',
269
+ '_check_type',
270
+ '_spec_property_naming',
271
+ '_path_to_item',
272
+ '_configuration',
273
+ '_visited_composed_classes',
274
+ ])
275
+
276
+ @convert_js_args_to_python_args
277
+ def __init__(self, *args, **kwargs): # noqa: E501
278
+ """EmailSmsStat - a model defined in OpenAPI
279
+
280
+ Keyword Args:
281
+ _check_type (bool): if True, values for parameters in openapi_types
282
+ will be type checked and a TypeError will be
283
+ raised if the wrong type is input.
284
+ Defaults to True
285
+ _path_to_item (tuple/list): This is a list of keys or values to
286
+ drill down to the model in received_data
287
+ when deserializing a response
288
+ _spec_property_naming (bool): True if the variable names in the input data
289
+ are serialized names, as specified in the OpenAPI document.
290
+ False if the variable names in the input data
291
+ are pythonic names, e.g. snake case (default)
292
+ _configuration (Configuration): the instance to use when
293
+ deserializing a file_type parameter.
294
+ If passed, type conversion is attempted
295
+ If omitted no type conversion is done.
296
+ _visited_composed_classes (tuple): This stores a tuple of
297
+ classes that we have traveled through so that
298
+ if we see that class again we will not use its
299
+ discriminator again.
300
+ When traveling through a discriminator, the
301
+ composed schema that is
302
+ is traveled through is added to this set.
303
+ For example if Animal has a discriminator
304
+ petType and we pass in "Dog", and the class Dog
305
+ allOf includes Animal, we move through Animal
306
+ once using the discriminator, and pick Dog.
307
+ Then in Dog, we will make an instance of the
308
+ Animal class but this time we won't travel
309
+ through its discriminator because we passed in
310
+ _visited_composed_classes = (Animal,)
311
+ click_count (int): Count of clicked emails. [optional] # noqa: E501
312
+ click_count_formatted (str): Count of clicked emails, formatted. [optional] # noqa: E501
313
+ conversion_count (int): Count of conversions. [optional] # noqa: E501
314
+ conversion_count_formatted (str): Count of conversions, formatted. [optional] # noqa: E501
315
+ deleted (bool): True if campaign/flow has been archived. [optional] # noqa: E501
316
+ delivered_count (int): Count of delivered emails. [optional] # noqa: E501
317
+ delivered_count_formatted (str): Count of delivered emails, formatted. [optional] # noqa: E501
318
+ merchant_id (str): Merchant ID. [optional] # noqa: E501
319
+ name (str): List or segment name. [optional] # noqa: E501
320
+ order_count (int): Count of orders. [optional] # noqa: E501
321
+ order_count_formatted (str): Count of orders, formatted. [optional] # noqa: E501
322
+ profit (float): Profit. [optional] # noqa: E501
323
+ profit_formatted (str): Profit, formatted. [optional] # noqa: E501
324
+ revenue (float): Revenue. [optional] # noqa: E501
325
+ revenue_formatted (str): Revenue, formatted. [optional] # noqa: E501
326
+ send_count (int): Count of emails sent. [optional] # noqa: E501
327
+ send_count_formatted (str): Count of emails sent, formatted. [optional] # noqa: E501
328
+ skipped_count (int): Count of skipped emails. [optional] # noqa: E501
329
+ skipped_count_formatted (str): Count of skipped emails, formatted. [optional] # noqa: E501
330
+ stat_type (str): Campaign, Flow or None (for anything else). [optional] # noqa: E501
331
+ status (str): Status of campaign or flow. [optional] # noqa: E501
332
+ status_dts (str): Status dts of campaign or flow. [optional] # noqa: E501
333
+ step_uuid (str): Step UUID if the statistics are at the step/email level. [optional] # noqa: E501
334
+ steps ([EmailSmsStat]): [optional] # noqa: E501
335
+ storefront_oid (int): Storefront oid. [optional] # noqa: E501
336
+ unsubscribe_count (int): Count of emails classified as unsubscribe. [optional] # noqa: E501
337
+ unsubscribe_count_formatted (str): Count of emails classified as unsubscribe, formatted. [optional] # noqa: E501
338
+ uuid (str): List/Segment uuid, or Flow/Campaign uuid depending on level of stat aggregation.. [optional] # noqa: E501
339
+ view_count (int): Count of views. [optional] # noqa: E501
340
+ view_count_formatted (str): Count of views, formatted. [optional] # noqa: E501
341
+ """
342
+
343
+ _check_type = kwargs.pop('_check_type', True)
344
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
345
+ _path_to_item = kwargs.pop('_path_to_item', ())
346
+ _configuration = kwargs.pop('_configuration', None)
347
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
348
+
349
+ if args:
350
+ for arg in args:
351
+ if isinstance(arg, dict):
352
+ kwargs.update(arg)
353
+ else:
354
+ raise ApiTypeError(
355
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
356
+ args,
357
+ self.__class__.__name__,
358
+ ),
359
+ path_to_item=_path_to_item,
360
+ valid_classes=(self.__class__,),
361
+ )
362
+
363
+ self._data_store = {}
364
+ self._check_type = _check_type
365
+ self._spec_property_naming = _spec_property_naming
366
+ self._path_to_item = _path_to_item
367
+ self._configuration = _configuration
368
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
369
+
370
+ for var_name, var_value in kwargs.items():
371
+ if var_name not in self.attribute_map and \
372
+ self._configuration is not None and \
373
+ self._configuration.discard_unknown_keys and \
374
+ self.additional_properties_type is None:
375
+ # discard variable.
376
+ continue
377
+ setattr(self, var_name, var_value)
378
+ if var_name in self.read_only_vars:
379
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
380
+ f"class with read only attributes.")