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.
@@ -65,6 +65,7 @@ from ultracart.model.email_dashboard_activity_response import EmailDashboardActi
65
65
  from ultracart.model.email_dashboard_stats_response import EmailDashboardStatsResponse
66
66
  from ultracart.model.email_domain import EmailDomain
67
67
  from ultracart.model.email_editor_token_response import EmailEditorTokenResponse
68
+ from ultracart.model.email_editor_values_response import EmailEditorValuesResponse
68
69
  from ultracart.model.email_flow import EmailFlow
69
70
  from ultracart.model.email_flow_back_populate_request import EmailFlowBackPopulateRequest
70
71
  from ultracart.model.email_flow_back_populate_response import EmailFlowBackPopulateResponse
@@ -2503,6 +2504,59 @@ class StorefrontApi(object):
2503
2504
  },
2504
2505
  api_client=api_client
2505
2506
  )
2507
+ self.get_email_commseq_editor_values_endpoint = _Endpoint(
2508
+ settings={
2509
+ 'response_type': (EmailEditorValuesResponse,),
2510
+ 'auth': [
2511
+ 'ultraCartBrowserApiKey',
2512
+ 'ultraCartOauth',
2513
+ 'ultraCartSimpleApiKey'
2514
+ ],
2515
+ 'endpoint_path': '/storefront/{storefront_oid}/email/commseqs/editorValues',
2516
+ 'operation_id': 'get_email_commseq_editor_values',
2517
+ 'http_method': 'GET',
2518
+ 'servers': None,
2519
+ },
2520
+ params_map={
2521
+ 'all': [
2522
+ 'storefront_oid',
2523
+ ],
2524
+ 'required': [
2525
+ 'storefront_oid',
2526
+ ],
2527
+ 'nullable': [
2528
+ ],
2529
+ 'enum': [
2530
+ ],
2531
+ 'validation': [
2532
+ ]
2533
+ },
2534
+ root_map={
2535
+ 'validations': {
2536
+ },
2537
+ 'allowed_values': {
2538
+ },
2539
+ 'openapi_types': {
2540
+ 'storefront_oid':
2541
+ (int,),
2542
+ },
2543
+ 'attribute_map': {
2544
+ 'storefront_oid': 'storefront_oid',
2545
+ },
2546
+ 'location_map': {
2547
+ 'storefront_oid': 'path',
2548
+ },
2549
+ 'collection_format_map': {
2550
+ }
2551
+ },
2552
+ headers_map={
2553
+ 'accept': [
2554
+ 'application/json'
2555
+ ],
2556
+ 'content_type': [],
2557
+ },
2558
+ api_client=api_client
2559
+ )
2506
2560
  self.get_email_commseq_email_stats_endpoint = _Endpoint(
2507
2561
  settings={
2508
2562
  'response_type': (EmailStatSummaryResponse,),
@@ -14258,6 +14312,88 @@ class StorefrontApi(object):
14258
14312
  commseq_uuid
14259
14313
  return self.get_email_commseq_endpoint.call_with_http_info(**kwargs)
14260
14314
 
14315
+ def get_email_commseq_editor_values(
14316
+ self,
14317
+ storefront_oid,
14318
+ **kwargs
14319
+ ):
14320
+ """Get email merchant specific editor values # noqa: E501
14321
+
14322
+ This method makes a synchronous HTTP request by default. To make an
14323
+ asynchronous HTTP request, please pass async_req=True
14324
+
14325
+ >>> thread = api.get_email_commseq_editor_values(storefront_oid, async_req=True)
14326
+ >>> result = thread.get()
14327
+
14328
+ Args:
14329
+ storefront_oid (int):
14330
+
14331
+ Keyword Args:
14332
+ _return_http_data_only (bool): response data without head status
14333
+ code and headers. Default is True.
14334
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
14335
+ will be returned without reading/decoding response data.
14336
+ Default is True.
14337
+ _request_timeout (int/float/tuple): timeout setting for this request. If
14338
+ one number provided, it will be total request timeout. It can also
14339
+ be a pair (tuple) of (connection, read) timeouts.
14340
+ Default is None.
14341
+ _check_input_type (bool): specifies if type checking
14342
+ should be done one the data sent to the server.
14343
+ Default is True.
14344
+ _check_return_type (bool): specifies if type checking
14345
+ should be done one the data received from the server.
14346
+ Default is True.
14347
+ _spec_property_naming (bool): True if the variable names in the input data
14348
+ are serialized names, as specified in the OpenAPI document.
14349
+ False if the variable names in the input data
14350
+ are pythonic names, e.g. snake case (default)
14351
+ _content_type (str/None): force body content-type.
14352
+ Default is None and content-type will be predicted by allowed
14353
+ content-types and body.
14354
+ _host_index (int/None): specifies the index of the server
14355
+ that we want to use.
14356
+ Default is read from the configuration.
14357
+ _request_auths (list): set to override the auth_settings for an a single
14358
+ request; this effectively ignores the authentication
14359
+ in the spec for a single request.
14360
+ Default is None
14361
+ async_req (bool): execute request asynchronously
14362
+
14363
+ Returns:
14364
+ EmailEditorValuesResponse
14365
+ If the method is called asynchronously, returns the request
14366
+ thread.
14367
+ """
14368
+ kwargs['async_req'] = kwargs.get(
14369
+ 'async_req', False
14370
+ )
14371
+ kwargs['_return_http_data_only'] = kwargs.get(
14372
+ '_return_http_data_only', True
14373
+ )
14374
+ kwargs['_preload_content'] = kwargs.get(
14375
+ '_preload_content', True
14376
+ )
14377
+ kwargs['_request_timeout'] = kwargs.get(
14378
+ '_request_timeout', None
14379
+ )
14380
+ kwargs['_check_input_type'] = kwargs.get(
14381
+ '_check_input_type', True
14382
+ )
14383
+ kwargs['_check_return_type'] = kwargs.get(
14384
+ '_check_return_type', True
14385
+ )
14386
+ kwargs['_spec_property_naming'] = kwargs.get(
14387
+ '_spec_property_naming', False
14388
+ )
14389
+ kwargs['_content_type'] = kwargs.get(
14390
+ '_content_type')
14391
+ kwargs['_host_index'] = kwargs.get('_host_index')
14392
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
14393
+ kwargs['storefront_oid'] = \
14394
+ storefront_oid
14395
+ return self.get_email_commseq_editor_values_endpoint.call_with_http_info(**kwargs)
14396
+
14261
14397
  def get_email_commseq_email_stats(
14262
14398
  self,
14263
14399
  storefront_oid,
ultracart/api_client.py CHANGED
@@ -77,7 +77,7 @@ class ApiClient(object):
77
77
  self.default_headers[header_name] = header_value
78
78
  self.cookie = cookie
79
79
  # Set default User-Agent.
80
- self.user_agent = 'OpenAPI-Generator/4.1.16/python'
80
+ self.user_agent = 'OpenAPI-Generator/4.1.18/python'
81
81
 
82
82
  def __enter__(self):
83
83
  return self
@@ -422,7 +422,7 @@ conf = ultracart.Configuration(
422
422
  "OS: {env}\n"\
423
423
  "Python Version: {pyversion}\n"\
424
424
  "Version of the API: 2.0.0\n"\
425
- "SDK Package Version: 4.1.16".\
425
+ "SDK Package Version: 4.1.18".\
426
426
  format(env=sys.platform, pyversion=sys.version)
427
427
 
428
428
  def get_host_settings(self):
@@ -0,0 +1,282 @@
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_page import CustomDashboardPage
35
+ globals()['CustomDashboardPage'] = CustomDashboardPage
36
+
37
+
38
+ class CustomDashboard(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_custom_dashboard_oid': (int,), # noqa: E501
92
+ 'merchant_id': (str,), # noqa: E501
93
+ 'name': (str,), # noqa: E501
94
+ 'pages': ([CustomDashboardPage],), # noqa: E501
95
+ }
96
+
97
+ @cached_property
98
+ def discriminator():
99
+ return None
100
+
101
+
102
+ attribute_map = {
103
+ 'data_warehouse_custom_dashboard_oid': 'data_warehouse_custom_dashboard_oid', # noqa: E501
104
+ 'merchant_id': 'merchant_id', # noqa: E501
105
+ 'name': 'name', # noqa: E501
106
+ 'pages': 'pages', # noqa: E501
107
+ }
108
+
109
+ read_only_vars = {
110
+ }
111
+
112
+ _composed_schemas = {}
113
+
114
+ @classmethod
115
+ @convert_js_args_to_python_args
116
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
117
+ """CustomDashboard - a model defined in OpenAPI
118
+
119
+ Keyword Args:
120
+ _check_type (bool): if True, values for parameters in openapi_types
121
+ will be type checked and a TypeError will be
122
+ raised if the wrong type is input.
123
+ Defaults to True
124
+ _path_to_item (tuple/list): This is a list of keys or values to
125
+ drill down to the model in received_data
126
+ when deserializing a response
127
+ _spec_property_naming (bool): True if the variable names in the input data
128
+ are serialized names, as specified in the OpenAPI document.
129
+ False if the variable names in the input data
130
+ are pythonic names, e.g. snake case (default)
131
+ _configuration (Configuration): the instance to use when
132
+ deserializing a file_type parameter.
133
+ If passed, type conversion is attempted
134
+ If omitted no type conversion is done.
135
+ _visited_composed_classes (tuple): This stores a tuple of
136
+ classes that we have traveled through so that
137
+ if we see that class again we will not use its
138
+ discriminator again.
139
+ When traveling through a discriminator, the
140
+ composed schema that is
141
+ is traveled through is added to this set.
142
+ For example if Animal has a discriminator
143
+ petType and we pass in "Dog", and the class Dog
144
+ allOf includes Animal, we move through Animal
145
+ once using the discriminator, and pick Dog.
146
+ Then in Dog, we will make an instance of the
147
+ Animal class but this time we won't travel
148
+ through its discriminator because we passed in
149
+ _visited_composed_classes = (Animal,)
150
+ data_warehouse_custom_dashboard_oid (int): [optional] # noqa: E501
151
+ merchant_id (str): [optional] # noqa: E501
152
+ name (str): [optional] # noqa: E501
153
+ pages ([CustomDashboardPage]): [optional] # noqa: E501
154
+ """
155
+
156
+ _check_type = kwargs.pop('_check_type', True)
157
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
158
+ _path_to_item = kwargs.pop('_path_to_item', ())
159
+ _configuration = kwargs.pop('_configuration', None)
160
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
161
+
162
+ self = super(OpenApiModel, cls).__new__(cls)
163
+
164
+ if args:
165
+ for arg in args:
166
+ if isinstance(arg, dict):
167
+ kwargs.update(arg)
168
+ else:
169
+ raise ApiTypeError(
170
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
171
+ args,
172
+ self.__class__.__name__,
173
+ ),
174
+ path_to_item=_path_to_item,
175
+ valid_classes=(self.__class__,),
176
+ )
177
+
178
+ self._data_store = {}
179
+ self._check_type = _check_type
180
+ self._spec_property_naming = _spec_property_naming
181
+ self._path_to_item = _path_to_item
182
+ self._configuration = _configuration
183
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
184
+
185
+ for var_name, var_value in kwargs.items():
186
+ if var_name not in self.attribute_map and \
187
+ self._configuration is not None and \
188
+ self._configuration.discard_unknown_keys and \
189
+ self.additional_properties_type is None:
190
+ # discard variable.
191
+ continue
192
+ setattr(self, var_name, var_value)
193
+ return self
194
+
195
+ required_properties = set([
196
+ '_data_store',
197
+ '_check_type',
198
+ '_spec_property_naming',
199
+ '_path_to_item',
200
+ '_configuration',
201
+ '_visited_composed_classes',
202
+ ])
203
+
204
+ @convert_js_args_to_python_args
205
+ def __init__(self, *args, **kwargs): # noqa: E501
206
+ """CustomDashboard - a model defined in OpenAPI
207
+
208
+ Keyword Args:
209
+ _check_type (bool): if True, values for parameters in openapi_types
210
+ will be type checked and a TypeError will be
211
+ raised if the wrong type is input.
212
+ Defaults to True
213
+ _path_to_item (tuple/list): This is a list of keys or values to
214
+ drill down to the model in received_data
215
+ when deserializing a response
216
+ _spec_property_naming (bool): True if the variable names in the input data
217
+ are serialized names, as specified in the OpenAPI document.
218
+ False if the variable names in the input data
219
+ are pythonic names, e.g. snake case (default)
220
+ _configuration (Configuration): the instance to use when
221
+ deserializing a file_type parameter.
222
+ If passed, type conversion is attempted
223
+ If omitted no type conversion is done.
224
+ _visited_composed_classes (tuple): This stores a tuple of
225
+ classes that we have traveled through so that
226
+ if we see that class again we will not use its
227
+ discriminator again.
228
+ When traveling through a discriminator, the
229
+ composed schema that is
230
+ is traveled through is added to this set.
231
+ For example if Animal has a discriminator
232
+ petType and we pass in "Dog", and the class Dog
233
+ allOf includes Animal, we move through Animal
234
+ once using the discriminator, and pick Dog.
235
+ Then in Dog, we will make an instance of the
236
+ Animal class but this time we won't travel
237
+ through its discriminator because we passed in
238
+ _visited_composed_classes = (Animal,)
239
+ data_warehouse_custom_dashboard_oid (int): [optional] # noqa: E501
240
+ merchant_id (str): [optional] # noqa: E501
241
+ name (str): [optional] # noqa: E501
242
+ pages ([CustomDashboardPage]): [optional] # noqa: E501
243
+ """
244
+
245
+ _check_type = kwargs.pop('_check_type', True)
246
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
247
+ _path_to_item = kwargs.pop('_path_to_item', ())
248
+ _configuration = kwargs.pop('_configuration', None)
249
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
250
+
251
+ if args:
252
+ for arg in args:
253
+ if isinstance(arg, dict):
254
+ kwargs.update(arg)
255
+ else:
256
+ raise ApiTypeError(
257
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
258
+ args,
259
+ self.__class__.__name__,
260
+ ),
261
+ path_to_item=_path_to_item,
262
+ valid_classes=(self.__class__,),
263
+ )
264
+
265
+ self._data_store = {}
266
+ self._check_type = _check_type
267
+ self._spec_property_naming = _spec_property_naming
268
+ self._path_to_item = _path_to_item
269
+ self._configuration = _configuration
270
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
271
+
272
+ for var_name, var_value in kwargs.items():
273
+ if var_name not in self.attribute_map and \
274
+ self._configuration is not None and \
275
+ self._configuration.discard_unknown_keys and \
276
+ self.additional_properties_type is None:
277
+ # discard variable.
278
+ continue
279
+ setattr(self, var_name, var_value)
280
+ if var_name in self.read_only_vars:
281
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
282
+ f"class with read only attributes.")