ultracart-rest-sdk 4.1.18__py3-none-any.whl → 4.1.20__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.
- ultracart/__init__.py +1 -1
- ultracart/api/datawarehouse_api.py +585 -0
- ultracart/api_client.py +1 -1
- ultracart/apis/__init__.py +0 -1
- ultracart/configuration.py +1 -1
- ultracart/model/conversation_virtual_agent_capabilities.py +20 -2
- ultracart/model/conversation_virtual_agent_capability_zoho_desk_department.py +268 -0
- ultracart/model/custom_dashboard.py +6 -0
- ultracart/model/custom_dashboard_execution_parameter.py +276 -0
- ultracart/model/{chargeback_dispute.py → custom_dashboard_schedule.py} +23 -143
- ultracart/model/{chargeback_dispute_response.py → custom_dashboard_schedule_response.py} +9 -9
- ultracart/model/{chargeback_disputes_response.py → custom_dashboard_schedules_response.py} +9 -9
- ultracart/model/custom_report.py +4 -0
- ultracart/model/custom_report_execution_parameter.py +4 -0
- ultracart/model/email_campaign.py +8 -0
- ultracart/model/order_payment.py +2 -0
- ultracart/models/__init__.py +5 -3
- {ultracart_rest_sdk-4.1.18.dist-info → ultracart_rest_sdk-4.1.20.dist-info}/METADATA +1 -1
- {ultracart_rest_sdk-4.1.18.dist-info → ultracart_rest_sdk-4.1.20.dist-info}/RECORD +22 -21
- ultracart/api/chargeback_api.py +0 -818
- {ultracart_rest_sdk-4.1.18.dist-info → ultracart_rest_sdk-4.1.20.dist-info}/LICENSE +0 -0
- {ultracart_rest_sdk-4.1.18.dist-info → ultracart_rest_sdk-4.1.20.dist-info}/WHEEL +0 -0
- {ultracart_rest_sdk-4.1.18.dist-info → ultracart_rest_sdk-4.1.20.dist-info}/top_level.txt +0 -0
|
@@ -30,6 +30,10 @@ from ultracart.model_utils import ( # noqa: F401
|
|
|
30
30
|
from ultracart.exceptions import ApiAttributeError
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
def lazy_import():
|
|
34
|
+
from ultracart.model.conversation_virtual_agent_capability_zoho_desk_department import ConversationVirtualAgentCapabilityZohoDeskDepartment
|
|
35
|
+
globals()['ConversationVirtualAgentCapabilityZohoDeskDepartment'] = ConversationVirtualAgentCapabilityZohoDeskDepartment
|
|
36
|
+
|
|
33
37
|
|
|
34
38
|
class ConversationVirtualAgentCapabilities(ModelNormal):
|
|
35
39
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
@@ -59,8 +63,8 @@ class ConversationVirtualAgentCapabilities(ModelNormal):
|
|
|
59
63
|
('open_support_ticket_channel',): {
|
|
60
64
|
'NONE': "none",
|
|
61
65
|
'EMAIL': "email",
|
|
62
|
-
'ULTRACART_TASK': "
|
|
63
|
-
'ZOHO_DESK_TICKET': "
|
|
66
|
+
'ULTRACART_TASK': "ultracart_task",
|
|
67
|
+
'ZOHO_DESK_TICKET': "zoho_desk_ticket",
|
|
64
68
|
},
|
|
65
69
|
}
|
|
66
70
|
|
|
@@ -73,6 +77,7 @@ class ConversationVirtualAgentCapabilities(ModelNormal):
|
|
|
73
77
|
This must be a method because a model may have properties that are
|
|
74
78
|
of type self, this must run after the class is loaded
|
|
75
79
|
"""
|
|
80
|
+
lazy_import()
|
|
76
81
|
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
77
82
|
|
|
78
83
|
_nullable = False
|
|
@@ -87,6 +92,7 @@ class ConversationVirtualAgentCapabilities(ModelNormal):
|
|
|
87
92
|
openapi_types (dict): The key is attribute name
|
|
88
93
|
and the value is attribute type.
|
|
89
94
|
"""
|
|
95
|
+
lazy_import()
|
|
90
96
|
return {
|
|
91
97
|
'cancel_subscription': (bool,), # noqa: E501
|
|
92
98
|
'delay_subscription': (bool,), # noqa: E501
|
|
@@ -95,10 +101,13 @@ class ConversationVirtualAgentCapabilities(ModelNormal):
|
|
|
95
101
|
'open_support_ticket': (bool,), # noqa: E501
|
|
96
102
|
'open_support_ticket_channel': (str,), # noqa: E501
|
|
97
103
|
'open_support_ticket_channel_email': (str,), # noqa: E501
|
|
104
|
+
'open_support_ticket_zoho_desk_department_id': (str,), # noqa: E501
|
|
98
105
|
'pause_subscription': (bool,), # noqa: E501
|
|
99
106
|
'resume_subscription': (bool,), # noqa: E501
|
|
100
107
|
'transfer_chat_to_live_agent': (bool,), # noqa: E501
|
|
101
108
|
'update_subscription_credit_card': (bool,), # noqa: E501
|
|
109
|
+
'zoho_desk_available': (bool,), # noqa: E501
|
|
110
|
+
'zoho_desk_departments': ([ConversationVirtualAgentCapabilityZohoDeskDepartment],), # noqa: E501
|
|
102
111
|
}
|
|
103
112
|
|
|
104
113
|
@cached_property
|
|
@@ -114,10 +123,13 @@ class ConversationVirtualAgentCapabilities(ModelNormal):
|
|
|
114
123
|
'open_support_ticket': 'open_support_ticket', # noqa: E501
|
|
115
124
|
'open_support_ticket_channel': 'open_support_ticket_channel', # noqa: E501
|
|
116
125
|
'open_support_ticket_channel_email': 'open_support_ticket_channel_email', # noqa: E501
|
|
126
|
+
'open_support_ticket_zoho_desk_department_id': 'open_support_ticket_zoho_desk_department_id', # noqa: E501
|
|
117
127
|
'pause_subscription': 'pause_subscription', # noqa: E501
|
|
118
128
|
'resume_subscription': 'resume_subscription', # noqa: E501
|
|
119
129
|
'transfer_chat_to_live_agent': 'transfer_chat_to_live_agent', # noqa: E501
|
|
120
130
|
'update_subscription_credit_card': 'update_subscription_credit_card', # noqa: E501
|
|
131
|
+
'zoho_desk_available': 'zoho_desk_available', # noqa: E501
|
|
132
|
+
'zoho_desk_departments': 'zoho_desk_departments', # noqa: E501
|
|
121
133
|
}
|
|
122
134
|
|
|
123
135
|
read_only_vars = {
|
|
@@ -168,10 +180,13 @@ class ConversationVirtualAgentCapabilities(ModelNormal):
|
|
|
168
180
|
open_support_ticket (bool): [optional] # noqa: E501
|
|
169
181
|
open_support_ticket_channel (str): Channel to use to open the support ticket. [optional] # noqa: E501
|
|
170
182
|
open_support_ticket_channel_email (str): Email to send support ticket to. [optional] # noqa: E501
|
|
183
|
+
open_support_ticket_zoho_desk_department_id (str): Department ID to open a Zoho Desk ticket for. [optional] # noqa: E501
|
|
171
184
|
pause_subscription (bool): [optional] # noqa: E501
|
|
172
185
|
resume_subscription (bool): [optional] # noqa: E501
|
|
173
186
|
transfer_chat_to_live_agent (bool): [optional] # noqa: E501
|
|
174
187
|
update_subscription_credit_card (bool): [optional] # noqa: E501
|
|
188
|
+
zoho_desk_available (bool): True if Zoho Desk is connected to UltraCart. [optional] # noqa: E501
|
|
189
|
+
zoho_desk_departments ([ConversationVirtualAgentCapabilityZohoDeskDepartment]): Array of Zoho Desk Department if zoho desk is connected to UltraCart. [optional] # noqa: E501
|
|
175
190
|
"""
|
|
176
191
|
|
|
177
192
|
_check_type = kwargs.pop('_check_type', True)
|
|
@@ -264,10 +279,13 @@ class ConversationVirtualAgentCapabilities(ModelNormal):
|
|
|
264
279
|
open_support_ticket (bool): [optional] # noqa: E501
|
|
265
280
|
open_support_ticket_channel (str): Channel to use to open the support ticket. [optional] # noqa: E501
|
|
266
281
|
open_support_ticket_channel_email (str): Email to send support ticket to. [optional] # noqa: E501
|
|
282
|
+
open_support_ticket_zoho_desk_department_id (str): Department ID to open a Zoho Desk ticket for. [optional] # noqa: E501
|
|
267
283
|
pause_subscription (bool): [optional] # noqa: E501
|
|
268
284
|
resume_subscription (bool): [optional] # noqa: E501
|
|
269
285
|
transfer_chat_to_live_agent (bool): [optional] # noqa: E501
|
|
270
286
|
update_subscription_credit_card (bool): [optional] # noqa: E501
|
|
287
|
+
zoho_desk_available (bool): True if Zoho Desk is connected to UltraCart. [optional] # noqa: E501
|
|
288
|
+
zoho_desk_departments ([ConversationVirtualAgentCapabilityZohoDeskDepartment]): Array of Zoho Desk Department if zoho desk is connected to UltraCart. [optional] # noqa: E501
|
|
271
289
|
"""
|
|
272
290
|
|
|
273
291
|
_check_type = kwargs.pop('_check_type', True)
|
|
@@ -0,0 +1,268 @@
|
|
|
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 ConversationVirtualAgentCapabilityZohoDeskDepartment(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
|
+
'department_id': (str,), # noqa: E501
|
|
86
|
+
'department_name': (str,), # noqa: E501
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@cached_property
|
|
90
|
+
def discriminator():
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
attribute_map = {
|
|
95
|
+
'department_id': 'department_id', # noqa: E501
|
|
96
|
+
'department_name': 'department_name', # noqa: E501
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
read_only_vars = {
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
_composed_schemas = {}
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
@convert_js_args_to_python_args
|
|
106
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
107
|
+
"""ConversationVirtualAgentCapabilityZohoDeskDepartment - a model defined in OpenAPI
|
|
108
|
+
|
|
109
|
+
Keyword Args:
|
|
110
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
111
|
+
will be type checked and a TypeError will be
|
|
112
|
+
raised if the wrong type is input.
|
|
113
|
+
Defaults to True
|
|
114
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
115
|
+
drill down to the model in received_data
|
|
116
|
+
when deserializing a response
|
|
117
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
118
|
+
are serialized names, as specified in the OpenAPI document.
|
|
119
|
+
False if the variable names in the input data
|
|
120
|
+
are pythonic names, e.g. snake case (default)
|
|
121
|
+
_configuration (Configuration): the instance to use when
|
|
122
|
+
deserializing a file_type parameter.
|
|
123
|
+
If passed, type conversion is attempted
|
|
124
|
+
If omitted no type conversion is done.
|
|
125
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
126
|
+
classes that we have traveled through so that
|
|
127
|
+
if we see that class again we will not use its
|
|
128
|
+
discriminator again.
|
|
129
|
+
When traveling through a discriminator, the
|
|
130
|
+
composed schema that is
|
|
131
|
+
is traveled through is added to this set.
|
|
132
|
+
For example if Animal has a discriminator
|
|
133
|
+
petType and we pass in "Dog", and the class Dog
|
|
134
|
+
allOf includes Animal, we move through Animal
|
|
135
|
+
once using the discriminator, and pick Dog.
|
|
136
|
+
Then in Dog, we will make an instance of the
|
|
137
|
+
Animal class but this time we won't travel
|
|
138
|
+
through its discriminator because we passed in
|
|
139
|
+
_visited_composed_classes = (Animal,)
|
|
140
|
+
department_id (str): [optional] # noqa: E501
|
|
141
|
+
department_name (str): [optional] # noqa: E501
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
145
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
146
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
147
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
148
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
149
|
+
|
|
150
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
151
|
+
|
|
152
|
+
if args:
|
|
153
|
+
for arg in args:
|
|
154
|
+
if isinstance(arg, dict):
|
|
155
|
+
kwargs.update(arg)
|
|
156
|
+
else:
|
|
157
|
+
raise ApiTypeError(
|
|
158
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
159
|
+
args,
|
|
160
|
+
self.__class__.__name__,
|
|
161
|
+
),
|
|
162
|
+
path_to_item=_path_to_item,
|
|
163
|
+
valid_classes=(self.__class__,),
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
self._data_store = {}
|
|
167
|
+
self._check_type = _check_type
|
|
168
|
+
self._spec_property_naming = _spec_property_naming
|
|
169
|
+
self._path_to_item = _path_to_item
|
|
170
|
+
self._configuration = _configuration
|
|
171
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
172
|
+
|
|
173
|
+
for var_name, var_value in kwargs.items():
|
|
174
|
+
if var_name not in self.attribute_map and \
|
|
175
|
+
self._configuration is not None and \
|
|
176
|
+
self._configuration.discard_unknown_keys and \
|
|
177
|
+
self.additional_properties_type is None:
|
|
178
|
+
# discard variable.
|
|
179
|
+
continue
|
|
180
|
+
setattr(self, var_name, var_value)
|
|
181
|
+
return self
|
|
182
|
+
|
|
183
|
+
required_properties = set([
|
|
184
|
+
'_data_store',
|
|
185
|
+
'_check_type',
|
|
186
|
+
'_spec_property_naming',
|
|
187
|
+
'_path_to_item',
|
|
188
|
+
'_configuration',
|
|
189
|
+
'_visited_composed_classes',
|
|
190
|
+
])
|
|
191
|
+
|
|
192
|
+
@convert_js_args_to_python_args
|
|
193
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
194
|
+
"""ConversationVirtualAgentCapabilityZohoDeskDepartment - a model defined in OpenAPI
|
|
195
|
+
|
|
196
|
+
Keyword Args:
|
|
197
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
198
|
+
will be type checked and a TypeError will be
|
|
199
|
+
raised if the wrong type is input.
|
|
200
|
+
Defaults to True
|
|
201
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
202
|
+
drill down to the model in received_data
|
|
203
|
+
when deserializing a response
|
|
204
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
205
|
+
are serialized names, as specified in the OpenAPI document.
|
|
206
|
+
False if the variable names in the input data
|
|
207
|
+
are pythonic names, e.g. snake case (default)
|
|
208
|
+
_configuration (Configuration): the instance to use when
|
|
209
|
+
deserializing a file_type parameter.
|
|
210
|
+
If passed, type conversion is attempted
|
|
211
|
+
If omitted no type conversion is done.
|
|
212
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
213
|
+
classes that we have traveled through so that
|
|
214
|
+
if we see that class again we will not use its
|
|
215
|
+
discriminator again.
|
|
216
|
+
When traveling through a discriminator, the
|
|
217
|
+
composed schema that is
|
|
218
|
+
is traveled through is added to this set.
|
|
219
|
+
For example if Animal has a discriminator
|
|
220
|
+
petType and we pass in "Dog", and the class Dog
|
|
221
|
+
allOf includes Animal, we move through Animal
|
|
222
|
+
once using the discriminator, and pick Dog.
|
|
223
|
+
Then in Dog, we will make an instance of the
|
|
224
|
+
Animal class but this time we won't travel
|
|
225
|
+
through its discriminator because we passed in
|
|
226
|
+
_visited_composed_classes = (Animal,)
|
|
227
|
+
department_id (str): [optional] # noqa: E501
|
|
228
|
+
department_name (str): [optional] # noqa: E501
|
|
229
|
+
"""
|
|
230
|
+
|
|
231
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
232
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
233
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
234
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
235
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
236
|
+
|
|
237
|
+
if args:
|
|
238
|
+
for arg in args:
|
|
239
|
+
if isinstance(arg, dict):
|
|
240
|
+
kwargs.update(arg)
|
|
241
|
+
else:
|
|
242
|
+
raise ApiTypeError(
|
|
243
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
244
|
+
args,
|
|
245
|
+
self.__class__.__name__,
|
|
246
|
+
),
|
|
247
|
+
path_to_item=_path_to_item,
|
|
248
|
+
valid_classes=(self.__class__,),
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
self._data_store = {}
|
|
252
|
+
self._check_type = _check_type
|
|
253
|
+
self._spec_property_naming = _spec_property_naming
|
|
254
|
+
self._path_to_item = _path_to_item
|
|
255
|
+
self._configuration = _configuration
|
|
256
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
257
|
+
|
|
258
|
+
for var_name, var_value in kwargs.items():
|
|
259
|
+
if var_name not in self.attribute_map and \
|
|
260
|
+
self._configuration is not None and \
|
|
261
|
+
self._configuration.discard_unknown_keys and \
|
|
262
|
+
self.additional_properties_type is None:
|
|
263
|
+
# discard variable.
|
|
264
|
+
continue
|
|
265
|
+
setattr(self, var_name, var_value)
|
|
266
|
+
if var_name in self.read_only_vars:
|
|
267
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
268
|
+
f"class with read only attributes.")
|
|
@@ -31,7 +31,9 @@ from ultracart.exceptions import ApiAttributeError
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def lazy_import():
|
|
34
|
+
from ultracart.model.custom_dashboard_execution_parameter import CustomDashboardExecutionParameter
|
|
34
35
|
from ultracart.model.custom_dashboard_page import CustomDashboardPage
|
|
36
|
+
globals()['CustomDashboardExecutionParameter'] = CustomDashboardExecutionParameter
|
|
35
37
|
globals()['CustomDashboardPage'] = CustomDashboardPage
|
|
36
38
|
|
|
37
39
|
|
|
@@ -92,6 +94,7 @@ class CustomDashboard(ModelNormal):
|
|
|
92
94
|
'merchant_id': (str,), # noqa: E501
|
|
93
95
|
'name': (str,), # noqa: E501
|
|
94
96
|
'pages': ([CustomDashboardPage],), # noqa: E501
|
|
97
|
+
'parameters': ([CustomDashboardExecutionParameter],), # noqa: E501
|
|
95
98
|
}
|
|
96
99
|
|
|
97
100
|
@cached_property
|
|
@@ -104,6 +107,7 @@ class CustomDashboard(ModelNormal):
|
|
|
104
107
|
'merchant_id': 'merchant_id', # noqa: E501
|
|
105
108
|
'name': 'name', # noqa: E501
|
|
106
109
|
'pages': 'pages', # noqa: E501
|
|
110
|
+
'parameters': 'parameters', # noqa: E501
|
|
107
111
|
}
|
|
108
112
|
|
|
109
113
|
read_only_vars = {
|
|
@@ -151,6 +155,7 @@ class CustomDashboard(ModelNormal):
|
|
|
151
155
|
merchant_id (str): [optional] # noqa: E501
|
|
152
156
|
name (str): [optional] # noqa: E501
|
|
153
157
|
pages ([CustomDashboardPage]): [optional] # noqa: E501
|
|
158
|
+
parameters ([CustomDashboardExecutionParameter]): [optional] # noqa: E501
|
|
154
159
|
"""
|
|
155
160
|
|
|
156
161
|
_check_type = kwargs.pop('_check_type', True)
|
|
@@ -240,6 +245,7 @@ class CustomDashboard(ModelNormal):
|
|
|
240
245
|
merchant_id (str): [optional] # noqa: E501
|
|
241
246
|
name (str): [optional] # noqa: E501
|
|
242
247
|
pages ([CustomDashboardPage]): [optional] # noqa: E501
|
|
248
|
+
parameters ([CustomDashboardExecutionParameter]): [optional] # noqa: E501
|
|
243
249
|
"""
|
|
244
250
|
|
|
245
251
|
_check_type = kwargs.pop('_check_type', True)
|
|
@@ -0,0 +1,276 @@
|
|
|
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 CustomDashboardExecutionParameter(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
|
+
'name': (str,), # noqa: E501
|
|
86
|
+
'quick_pick_key': (str,), # noqa: E501
|
|
87
|
+
'type': (str,), # noqa: E501
|
|
88
|
+
'value': (str,), # noqa: E501
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def discriminator():
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
attribute_map = {
|
|
97
|
+
'name': 'name', # noqa: E501
|
|
98
|
+
'quick_pick_key': 'quick_pick_key', # noqa: E501
|
|
99
|
+
'type': 'type', # noqa: E501
|
|
100
|
+
'value': 'value', # noqa: E501
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
read_only_vars = {
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
_composed_schemas = {}
|
|
107
|
+
|
|
108
|
+
@classmethod
|
|
109
|
+
@convert_js_args_to_python_args
|
|
110
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
111
|
+
"""CustomDashboardExecutionParameter - a model defined in OpenAPI
|
|
112
|
+
|
|
113
|
+
Keyword Args:
|
|
114
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
115
|
+
will be type checked and a TypeError will be
|
|
116
|
+
raised if the wrong type is input.
|
|
117
|
+
Defaults to True
|
|
118
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
119
|
+
drill down to the model in received_data
|
|
120
|
+
when deserializing a response
|
|
121
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
122
|
+
are serialized names, as specified in the OpenAPI document.
|
|
123
|
+
False if the variable names in the input data
|
|
124
|
+
are pythonic names, e.g. snake case (default)
|
|
125
|
+
_configuration (Configuration): the instance to use when
|
|
126
|
+
deserializing a file_type parameter.
|
|
127
|
+
If passed, type conversion is attempted
|
|
128
|
+
If omitted no type conversion is done.
|
|
129
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
130
|
+
classes that we have traveled through so that
|
|
131
|
+
if we see that class again we will not use its
|
|
132
|
+
discriminator again.
|
|
133
|
+
When traveling through a discriminator, the
|
|
134
|
+
composed schema that is
|
|
135
|
+
is traveled through is added to this set.
|
|
136
|
+
For example if Animal has a discriminator
|
|
137
|
+
petType and we pass in "Dog", and the class Dog
|
|
138
|
+
allOf includes Animal, we move through Animal
|
|
139
|
+
once using the discriminator, and pick Dog.
|
|
140
|
+
Then in Dog, we will make an instance of the
|
|
141
|
+
Animal class but this time we won't travel
|
|
142
|
+
through its discriminator because we passed in
|
|
143
|
+
_visited_composed_classes = (Animal,)
|
|
144
|
+
name (str): [optional] # noqa: E501
|
|
145
|
+
quick_pick_key (str): [optional] # noqa: E501
|
|
146
|
+
type (str): [optional] # noqa: E501
|
|
147
|
+
value (str): [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
|
+
"""CustomDashboardExecutionParameter - 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
|
+
name (str): [optional] # noqa: E501
|
|
234
|
+
quick_pick_key (str): [optional] # noqa: E501
|
|
235
|
+
type (str): [optional] # noqa: E501
|
|
236
|
+
value (str): [optional] # noqa: E501
|
|
237
|
+
"""
|
|
238
|
+
|
|
239
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
240
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
241
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
242
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
243
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
244
|
+
|
|
245
|
+
if args:
|
|
246
|
+
for arg in args:
|
|
247
|
+
if isinstance(arg, dict):
|
|
248
|
+
kwargs.update(arg)
|
|
249
|
+
else:
|
|
250
|
+
raise ApiTypeError(
|
|
251
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
252
|
+
args,
|
|
253
|
+
self.__class__.__name__,
|
|
254
|
+
),
|
|
255
|
+
path_to_item=_path_to_item,
|
|
256
|
+
valid_classes=(self.__class__,),
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
self._data_store = {}
|
|
260
|
+
self._check_type = _check_type
|
|
261
|
+
self._spec_property_naming = _spec_property_naming
|
|
262
|
+
self._path_to_item = _path_to_item
|
|
263
|
+
self._configuration = _configuration
|
|
264
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
265
|
+
|
|
266
|
+
for var_name, var_value in kwargs.items():
|
|
267
|
+
if var_name not in self.attribute_map and \
|
|
268
|
+
self._configuration is not None and \
|
|
269
|
+
self._configuration.discard_unknown_keys and \
|
|
270
|
+
self.additional_properties_type is None:
|
|
271
|
+
# discard variable.
|
|
272
|
+
continue
|
|
273
|
+
setattr(self, var_name, var_value)
|
|
274
|
+
if var_name in self.read_only_vars:
|
|
275
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
276
|
+
f"class with read only attributes.")
|