ultracart-rest-sdk 4.1.19__py3-none-any.whl → 4.1.21__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.
@@ -46,6 +46,7 @@ from ultracart.model.order_token_response import OrderTokenResponse
46
46
  from ultracart.model.order_validation_request import OrderValidationRequest
47
47
  from ultracart.model.order_validation_response import OrderValidationResponse
48
48
  from ultracart.model.orders_response import OrdersResponse
49
+ from ultracart.model.replace_order_item_id_request import ReplaceOrderItemIdRequest
49
50
 
50
51
 
51
52
  class OrderApi(object):
@@ -1495,6 +1496,70 @@ class OrderApi(object):
1495
1496
  },
1496
1497
  api_client=api_client
1497
1498
  )
1499
+ self.replace_order_item_merchant_item_id_endpoint = _Endpoint(
1500
+ settings={
1501
+ 'response_type': (OrderResponse,),
1502
+ 'auth': [
1503
+ 'ultraCartOauth',
1504
+ 'ultraCartSimpleApiKey'
1505
+ ],
1506
+ 'endpoint_path': '/order/orders/{order_id}/replace_item_id',
1507
+ 'operation_id': 'replace_order_item_merchant_item_id',
1508
+ 'http_method': 'PUT',
1509
+ 'servers': None,
1510
+ },
1511
+ params_map={
1512
+ 'all': [
1513
+ 'order_id',
1514
+ 'replace_order_item_id_request',
1515
+ 'expand',
1516
+ ],
1517
+ 'required': [
1518
+ 'order_id',
1519
+ 'replace_order_item_id_request',
1520
+ ],
1521
+ 'nullable': [
1522
+ ],
1523
+ 'enum': [
1524
+ ],
1525
+ 'validation': [
1526
+ ]
1527
+ },
1528
+ root_map={
1529
+ 'validations': {
1530
+ },
1531
+ 'allowed_values': {
1532
+ },
1533
+ 'openapi_types': {
1534
+ 'order_id':
1535
+ (str,),
1536
+ 'replace_order_item_id_request':
1537
+ (ReplaceOrderItemIdRequest,),
1538
+ 'expand':
1539
+ (str,),
1540
+ },
1541
+ 'attribute_map': {
1542
+ 'order_id': 'order_id',
1543
+ 'expand': '_expand',
1544
+ },
1545
+ 'location_map': {
1546
+ 'order_id': 'path',
1547
+ 'replace_order_item_id_request': 'body',
1548
+ 'expand': 'query',
1549
+ },
1550
+ 'collection_format_map': {
1551
+ }
1552
+ },
1553
+ headers_map={
1554
+ 'accept': [
1555
+ 'application/json'
1556
+ ],
1557
+ 'content_type': [
1558
+ 'application/json; charset=UTF-8'
1559
+ ]
1560
+ },
1561
+ api_client=api_client
1562
+ )
1498
1563
  self.replacement_endpoint = _Endpoint(
1499
1564
  settings={
1500
1565
  'response_type': (OrderReplacementResponse,),
@@ -3765,6 +3830,94 @@ class OrderApi(object):
3765
3830
  order
3766
3831
  return self.refund_order_endpoint.call_with_http_info(**kwargs)
3767
3832
 
3833
+ def replace_order_item_merchant_item_id(
3834
+ self,
3835
+ order_id,
3836
+ replace_order_item_id_request,
3837
+ **kwargs
3838
+ ):
3839
+ """Replaces an order item id # noqa: E501
3840
+
3841
+ Replaces a single order item id with another merchant_item_id, leaving all other attributes and properties unchanged. A custom method requested by a merchant to allow for item id updates due to shipping errors. It is doubtful you will ever need this method. The expansion variable affects the returned order object. # noqa: E501
3842
+ This method makes a synchronous HTTP request by default. To make an
3843
+ asynchronous HTTP request, please pass async_req=True
3844
+
3845
+ >>> thread = api.replace_order_item_merchant_item_id(order_id, replace_order_item_id_request, async_req=True)
3846
+ >>> result = thread.get()
3847
+
3848
+ Args:
3849
+ order_id (str): The order id to update.
3850
+ replace_order_item_id_request (ReplaceOrderItemIdRequest): Replacement Request
3851
+
3852
+ Keyword Args:
3853
+ expand (str): The object expansion to perform on the result. See documentation for examples. [optional]
3854
+ _return_http_data_only (bool): response data without head status
3855
+ code and headers. Default is True.
3856
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
3857
+ will be returned without reading/decoding response data.
3858
+ Default is True.
3859
+ _request_timeout (int/float/tuple): timeout setting for this request. If
3860
+ one number provided, it will be total request timeout. It can also
3861
+ be a pair (tuple) of (connection, read) timeouts.
3862
+ Default is None.
3863
+ _check_input_type (bool): specifies if type checking
3864
+ should be done one the data sent to the server.
3865
+ Default is True.
3866
+ _check_return_type (bool): specifies if type checking
3867
+ should be done one the data received from the server.
3868
+ Default is True.
3869
+ _spec_property_naming (bool): True if the variable names in the input data
3870
+ are serialized names, as specified in the OpenAPI document.
3871
+ False if the variable names in the input data
3872
+ are pythonic names, e.g. snake case (default)
3873
+ _content_type (str/None): force body content-type.
3874
+ Default is None and content-type will be predicted by allowed
3875
+ content-types and body.
3876
+ _host_index (int/None): specifies the index of the server
3877
+ that we want to use.
3878
+ Default is read from the configuration.
3879
+ _request_auths (list): set to override the auth_settings for an a single
3880
+ request; this effectively ignores the authentication
3881
+ in the spec for a single request.
3882
+ Default is None
3883
+ async_req (bool): execute request asynchronously
3884
+
3885
+ Returns:
3886
+ OrderResponse
3887
+ If the method is called asynchronously, returns the request
3888
+ thread.
3889
+ """
3890
+ kwargs['async_req'] = kwargs.get(
3891
+ 'async_req', False
3892
+ )
3893
+ kwargs['_return_http_data_only'] = kwargs.get(
3894
+ '_return_http_data_only', True
3895
+ )
3896
+ kwargs['_preload_content'] = kwargs.get(
3897
+ '_preload_content', True
3898
+ )
3899
+ kwargs['_request_timeout'] = kwargs.get(
3900
+ '_request_timeout', None
3901
+ )
3902
+ kwargs['_check_input_type'] = kwargs.get(
3903
+ '_check_input_type', True
3904
+ )
3905
+ kwargs['_check_return_type'] = kwargs.get(
3906
+ '_check_return_type', True
3907
+ )
3908
+ kwargs['_spec_property_naming'] = kwargs.get(
3909
+ '_spec_property_naming', False
3910
+ )
3911
+ kwargs['_content_type'] = kwargs.get(
3912
+ '_content_type')
3913
+ kwargs['_host_index'] = kwargs.get('_host_index')
3914
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
3915
+ kwargs['order_id'] = \
3916
+ order_id
3917
+ kwargs['replace_order_item_id_request'] = \
3918
+ replace_order_item_id_request
3919
+ return self.replace_order_item_merchant_item_id_endpoint.call_with_http_info(**kwargs)
3920
+
3768
3921
  def replacement(
3769
3922
  self,
3770
3923
  order_id,
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.19/python'
80
+ self.user_agent = 'OpenAPI-Generator/4.1.21/python'
81
81
 
82
82
  def __enter__(self):
83
83
  return self
@@ -17,7 +17,6 @@
17
17
  from ultracart.api.affiliate_api import AffiliateApi
18
18
  from ultracart.api.auto_order_api import AutoOrderApi
19
19
  from ultracart.api.channel_partner_api import ChannelPartnerApi
20
- from ultracart.api.chargeback_api import ChargebackApi
21
20
  from ultracart.api.checkout_api import CheckoutApi
22
21
  from ultracart.api.conversation_api import ConversationApi
23
22
  from ultracart.api.coupon_api import CouponApi
@@ -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.19".\
425
+ "SDK Package Version: 4.1.21".\
426
426
  format(env=sys.platform, pyversion=sys.version)
427
427
 
428
428
  def get_host_settings(self):
@@ -0,0 +1,280 @@
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 CustomDashboardSchedule(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
+ 'cron_trigger_expression': (str,), # noqa: E501
86
+ 'data_warehouse_custom_dashboard_oid': (int,), # noqa: E501
87
+ 'data_warehouse_custom_dashboard_schedule_oid': (int,), # noqa: E501
88
+ 'emails': ([str],), # noqa: E501
89
+ 'next_send_dts': (str,), # noqa: E501
90
+ }
91
+
92
+ @cached_property
93
+ def discriminator():
94
+ return None
95
+
96
+
97
+ attribute_map = {
98
+ 'cron_trigger_expression': 'cron_trigger_expression', # noqa: E501
99
+ 'data_warehouse_custom_dashboard_oid': 'data_warehouse_custom_dashboard_oid', # noqa: E501
100
+ 'data_warehouse_custom_dashboard_schedule_oid': 'data_warehouse_custom_dashboard_schedule_oid', # noqa: E501
101
+ 'emails': 'emails', # noqa: E501
102
+ 'next_send_dts': 'next_send_dts', # 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
+ """CustomDashboardSchedule - 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
+ cron_trigger_expression (str): [optional] # noqa: E501
147
+ data_warehouse_custom_dashboard_oid (int): [optional] # noqa: E501
148
+ data_warehouse_custom_dashboard_schedule_oid (int): [optional] # noqa: E501
149
+ emails ([str]): [optional] # noqa: E501
150
+ next_send_dts (str): Date/time that the next send will occur.. [optional] # noqa: E501
151
+ """
152
+
153
+ _check_type = kwargs.pop('_check_type', True)
154
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
155
+ _path_to_item = kwargs.pop('_path_to_item', ())
156
+ _configuration = kwargs.pop('_configuration', None)
157
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
158
+
159
+ self = super(OpenApiModel, cls).__new__(cls)
160
+
161
+ if args:
162
+ for arg in args:
163
+ if isinstance(arg, dict):
164
+ kwargs.update(arg)
165
+ else:
166
+ raise ApiTypeError(
167
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
168
+ args,
169
+ self.__class__.__name__,
170
+ ),
171
+ path_to_item=_path_to_item,
172
+ valid_classes=(self.__class__,),
173
+ )
174
+
175
+ self._data_store = {}
176
+ self._check_type = _check_type
177
+ self._spec_property_naming = _spec_property_naming
178
+ self._path_to_item = _path_to_item
179
+ self._configuration = _configuration
180
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
181
+
182
+ for var_name, var_value in kwargs.items():
183
+ if var_name not in self.attribute_map and \
184
+ self._configuration is not None and \
185
+ self._configuration.discard_unknown_keys and \
186
+ self.additional_properties_type is None:
187
+ # discard variable.
188
+ continue
189
+ setattr(self, var_name, var_value)
190
+ return self
191
+
192
+ required_properties = set([
193
+ '_data_store',
194
+ '_check_type',
195
+ '_spec_property_naming',
196
+ '_path_to_item',
197
+ '_configuration',
198
+ '_visited_composed_classes',
199
+ ])
200
+
201
+ @convert_js_args_to_python_args
202
+ def __init__(self, *args, **kwargs): # noqa: E501
203
+ """CustomDashboardSchedule - a model defined in OpenAPI
204
+
205
+ Keyword Args:
206
+ _check_type (bool): if True, values for parameters in openapi_types
207
+ will be type checked and a TypeError will be
208
+ raised if the wrong type is input.
209
+ Defaults to True
210
+ _path_to_item (tuple/list): This is a list of keys or values to
211
+ drill down to the model in received_data
212
+ when deserializing a response
213
+ _spec_property_naming (bool): True if the variable names in the input data
214
+ are serialized names, as specified in the OpenAPI document.
215
+ False if the variable names in the input data
216
+ are pythonic names, e.g. snake case (default)
217
+ _configuration (Configuration): the instance to use when
218
+ deserializing a file_type parameter.
219
+ If passed, type conversion is attempted
220
+ If omitted no type conversion is done.
221
+ _visited_composed_classes (tuple): This stores a tuple of
222
+ classes that we have traveled through so that
223
+ if we see that class again we will not use its
224
+ discriminator again.
225
+ When traveling through a discriminator, the
226
+ composed schema that is
227
+ is traveled through is added to this set.
228
+ For example if Animal has a discriminator
229
+ petType and we pass in "Dog", and the class Dog
230
+ allOf includes Animal, we move through Animal
231
+ once using the discriminator, and pick Dog.
232
+ Then in Dog, we will make an instance of the
233
+ Animal class but this time we won't travel
234
+ through its discriminator because we passed in
235
+ _visited_composed_classes = (Animal,)
236
+ cron_trigger_expression (str): [optional] # noqa: E501
237
+ data_warehouse_custom_dashboard_oid (int): [optional] # noqa: E501
238
+ data_warehouse_custom_dashboard_schedule_oid (int): [optional] # noqa: E501
239
+ emails ([str]): [optional] # noqa: E501
240
+ next_send_dts (str): Date/time that the next send will occur.. [optional] # noqa: E501
241
+ """
242
+
243
+ _check_type = kwargs.pop('_check_type', True)
244
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
245
+ _path_to_item = kwargs.pop('_path_to_item', ())
246
+ _configuration = kwargs.pop('_configuration', None)
247
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
248
+
249
+ if args:
250
+ for arg in args:
251
+ if isinstance(arg, dict):
252
+ kwargs.update(arg)
253
+ else:
254
+ raise ApiTypeError(
255
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
256
+ args,
257
+ self.__class__.__name__,
258
+ ),
259
+ path_to_item=_path_to_item,
260
+ valid_classes=(self.__class__,),
261
+ )
262
+
263
+ self._data_store = {}
264
+ self._check_type = _check_type
265
+ self._spec_property_naming = _spec_property_naming
266
+ self._path_to_item = _path_to_item
267
+ self._configuration = _configuration
268
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
269
+
270
+ for var_name, var_value in kwargs.items():
271
+ if var_name not in self.attribute_map and \
272
+ self._configuration is not None and \
273
+ self._configuration.discard_unknown_keys and \
274
+ self.additional_properties_type is None:
275
+ # discard variable.
276
+ continue
277
+ setattr(self, var_name, var_value)
278
+ if var_name in self.read_only_vars:
279
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
280
+ f"class with read only attributes.")
@@ -31,17 +31,17 @@ from ultracart.exceptions import ApiAttributeError
31
31
 
32
32
 
33
33
  def lazy_import():
34
- from ultracart.model.chargeback_dispute import ChargebackDispute
34
+ from ultracart.model.custom_dashboard_schedule import CustomDashboardSchedule
35
35
  from ultracart.model.error import Error
36
36
  from ultracart.model.response_metadata import ResponseMetadata
37
37
  from ultracart.model.warning import Warning
38
- globals()['ChargebackDispute'] = ChargebackDispute
38
+ globals()['CustomDashboardSchedule'] = CustomDashboardSchedule
39
39
  globals()['Error'] = Error
40
40
  globals()['ResponseMetadata'] = ResponseMetadata
41
41
  globals()['Warning'] = Warning
42
42
 
43
43
 
44
- class ChargebackDisputesResponse(ModelNormal):
44
+ class CustomDashboardScheduleResponse(ModelNormal):
45
45
  """NOTE: This class is auto generated by OpenAPI Generator.
46
46
  Ref: https://openapi-generator.tech
47
47
 
@@ -94,9 +94,9 @@ class ChargebackDisputesResponse(ModelNormal):
94
94
  """
95
95
  lazy_import()
96
96
  return {
97
- 'chargebacks': ([ChargebackDispute],), # noqa: E501
98
97
  'error': (Error,), # noqa: E501
99
98
  'metadata': (ResponseMetadata,), # noqa: E501
99
+ 'schedule': (CustomDashboardSchedule,), # noqa: E501
100
100
  'success': (bool,), # noqa: E501
101
101
  'warning': (Warning,), # noqa: E501
102
102
  }
@@ -107,9 +107,9 @@ class ChargebackDisputesResponse(ModelNormal):
107
107
 
108
108
 
109
109
  attribute_map = {
110
- 'chargebacks': 'chargebacks', # noqa: E501
111
110
  'error': 'error', # noqa: E501
112
111
  'metadata': 'metadata', # noqa: E501
112
+ 'schedule': 'schedule', # noqa: E501
113
113
  'success': 'success', # noqa: E501
114
114
  'warning': 'warning', # noqa: E501
115
115
  }
@@ -122,7 +122,7 @@ class ChargebackDisputesResponse(ModelNormal):
122
122
  @classmethod
123
123
  @convert_js_args_to_python_args
124
124
  def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
125
- """ChargebackDisputesResponse - a model defined in OpenAPI
125
+ """CustomDashboardScheduleResponse - a model defined in OpenAPI
126
126
 
127
127
  Keyword Args:
128
128
  _check_type (bool): if True, values for parameters in openapi_types
@@ -155,9 +155,9 @@ class ChargebackDisputesResponse(ModelNormal):
155
155
  Animal class but this time we won't travel
156
156
  through its discriminator because we passed in
157
157
  _visited_composed_classes = (Animal,)
158
- chargebacks ([ChargebackDispute]): [optional] # noqa: E501
159
158
  error (Error): [optional] # noqa: E501
160
159
  metadata (ResponseMetadata): [optional] # noqa: E501
160
+ schedule (CustomDashboardSchedule): [optional] # noqa: E501
161
161
  success (bool): Indicates if API call was successful. [optional] # noqa: E501
162
162
  warning (Warning): [optional] # noqa: E501
163
163
  """
@@ -212,7 +212,7 @@ class ChargebackDisputesResponse(ModelNormal):
212
212
 
213
213
  @convert_js_args_to_python_args
214
214
  def __init__(self, *args, **kwargs): # noqa: E501
215
- """ChargebackDisputesResponse - a model defined in OpenAPI
215
+ """CustomDashboardScheduleResponse - a model defined in OpenAPI
216
216
 
217
217
  Keyword Args:
218
218
  _check_type (bool): if True, values for parameters in openapi_types
@@ -245,9 +245,9 @@ class ChargebackDisputesResponse(ModelNormal):
245
245
  Animal class but this time we won't travel
246
246
  through its discriminator because we passed in
247
247
  _visited_composed_classes = (Animal,)
248
- chargebacks ([ChargebackDispute]): [optional] # noqa: E501
249
248
  error (Error): [optional] # noqa: E501
250
249
  metadata (ResponseMetadata): [optional] # noqa: E501
250
+ schedule (CustomDashboardSchedule): [optional] # noqa: E501
251
251
  success (bool): Indicates if API call was successful. [optional] # noqa: E501
252
252
  warning (Warning): [optional] # noqa: E501
253
253
  """