ultracart-rest-sdk 4.1.20__py3-none-any.whl → 4.1.22__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.

Potentially problematic release.


This version of ultracart-rest-sdk might be problematic. Click here for more details.

ultracart/__init__.py CHANGED
@@ -11,7 +11,7 @@
11
11
  """
12
12
 
13
13
 
14
- __version__ = "4.1.20"
14
+ __version__ = "4.1.22"
15
15
 
16
16
  # import ApiClient
17
17
  from ultracart.api_client import ApiClient
@@ -31,6 +31,9 @@ from ultracart.model.custom_dashboards_response import CustomDashboardsResponse
31
31
  from ultracart.model.custom_report import CustomReport
32
32
  from ultracart.model.custom_report_account_config import CustomReportAccountConfig
33
33
  from ultracart.model.custom_report_account_config_response import CustomReportAccountConfigResponse
34
+ from ultracart.model.custom_report_analysis_request import CustomReportAnalysisRequest
35
+ from ultracart.model.custom_report_analysis_response import CustomReportAnalysisResponse
36
+ from ultracart.model.custom_report_chart_png_upload_response import CustomReportChartPngUploadResponse
34
37
  from ultracart.model.custom_report_execution_request import CustomReportExecutionRequest
35
38
  from ultracart.model.custom_report_execution_response import CustomReportExecutionResponse
36
39
  from ultracart.model.custom_report_response import CustomReportResponse
@@ -71,6 +74,65 @@ class DatawarehouseApi(object):
71
74
  if api_client is None:
72
75
  api_client = ApiClient()
73
76
  self.api_client = api_client
77
+ self.analyze_custom_report_endpoint = _Endpoint(
78
+ settings={
79
+ 'response_type': (CustomReportAnalysisResponse,),
80
+ 'auth': [
81
+ 'ultraCartOauth',
82
+ 'ultraCartSimpleApiKey'
83
+ ],
84
+ 'endpoint_path': '/datawarehouse/custom_reports/{custom_report_oid}/analysis',
85
+ 'operation_id': 'analyze_custom_report',
86
+ 'http_method': 'PUT',
87
+ 'servers': None,
88
+ },
89
+ params_map={
90
+ 'all': [
91
+ 'custom_report_oid',
92
+ 'analyze_request',
93
+ ],
94
+ 'required': [
95
+ 'custom_report_oid',
96
+ 'analyze_request',
97
+ ],
98
+ 'nullable': [
99
+ ],
100
+ 'enum': [
101
+ ],
102
+ 'validation': [
103
+ ]
104
+ },
105
+ root_map={
106
+ 'validations': {
107
+ },
108
+ 'allowed_values': {
109
+ },
110
+ 'openapi_types': {
111
+ 'custom_report_oid':
112
+ (int,),
113
+ 'analyze_request':
114
+ (CustomReportAnalysisRequest,),
115
+ },
116
+ 'attribute_map': {
117
+ 'custom_report_oid': 'custom_report_oid',
118
+ },
119
+ 'location_map': {
120
+ 'custom_report_oid': 'path',
121
+ 'analyze_request': 'body',
122
+ },
123
+ 'collection_format_map': {
124
+ }
125
+ },
126
+ headers_map={
127
+ 'accept': [
128
+ 'application/json'
129
+ ],
130
+ 'content_type': [
131
+ 'application/json; charset=UTF-8'
132
+ ]
133
+ },
134
+ api_client=api_client
135
+ )
74
136
  self.delete_custom_dashboard_endpoint = _Endpoint(
75
137
  settings={
76
138
  'response_type': None,
@@ -749,6 +811,58 @@ class DatawarehouseApi(object):
749
811
  },
750
812
  api_client=api_client
751
813
  )
814
+ self.get_custom_report_chart_png_upload_url_endpoint = _Endpoint(
815
+ settings={
816
+ 'response_type': (CustomReportChartPngUploadResponse,),
817
+ 'auth': [
818
+ 'ultraCartOauth',
819
+ 'ultraCartSimpleApiKey'
820
+ ],
821
+ 'endpoint_path': '/datawarehouse/custom_reports/{custom_report_oid}/chart_png',
822
+ 'operation_id': 'get_custom_report_chart_png_upload_url',
823
+ 'http_method': 'GET',
824
+ 'servers': None,
825
+ },
826
+ params_map={
827
+ 'all': [
828
+ 'custom_report_oid',
829
+ ],
830
+ 'required': [
831
+ 'custom_report_oid',
832
+ ],
833
+ 'nullable': [
834
+ ],
835
+ 'enum': [
836
+ ],
837
+ 'validation': [
838
+ ]
839
+ },
840
+ root_map={
841
+ 'validations': {
842
+ },
843
+ 'allowed_values': {
844
+ },
845
+ 'openapi_types': {
846
+ 'custom_report_oid':
847
+ (int,),
848
+ },
849
+ 'attribute_map': {
850
+ 'custom_report_oid': 'custom_report_oid',
851
+ },
852
+ 'location_map': {
853
+ 'custom_report_oid': 'path',
854
+ },
855
+ 'collection_format_map': {
856
+ }
857
+ },
858
+ headers_map={
859
+ 'accept': [
860
+ 'application/json'
861
+ ],
862
+ 'content_type': [],
863
+ },
864
+ api_client=api_client
865
+ )
752
866
  self.get_custom_reports_endpoint = _Endpoint(
753
867
  settings={
754
868
  'response_type': (CustomReportsResponse,),
@@ -1560,6 +1674,93 @@ class DatawarehouseApi(object):
1560
1674
  api_client=api_client
1561
1675
  )
1562
1676
 
1677
+ def analyze_custom_report(
1678
+ self,
1679
+ custom_report_oid,
1680
+ analyze_request,
1681
+ **kwargs
1682
+ ):
1683
+ """Analyze a custom report # noqa: E501
1684
+
1685
+ Analyze a custom report on the UltraCart account. # noqa: E501
1686
+ This method makes a synchronous HTTP request by default. To make an
1687
+ asynchronous HTTP request, please pass async_req=True
1688
+
1689
+ >>> thread = api.analyze_custom_report(custom_report_oid, analyze_request, async_req=True)
1690
+ >>> result = thread.get()
1691
+
1692
+ Args:
1693
+ custom_report_oid (int): The report oid to analyze.
1694
+ analyze_request (CustomReportAnalysisRequest): Request to analyze custom report
1695
+
1696
+ Keyword Args:
1697
+ _return_http_data_only (bool): response data without head status
1698
+ code and headers. Default is True.
1699
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
1700
+ will be returned without reading/decoding response data.
1701
+ Default is True.
1702
+ _request_timeout (int/float/tuple): timeout setting for this request. If
1703
+ one number provided, it will be total request timeout. It can also
1704
+ be a pair (tuple) of (connection, read) timeouts.
1705
+ Default is None.
1706
+ _check_input_type (bool): specifies if type checking
1707
+ should be done one the data sent to the server.
1708
+ Default is True.
1709
+ _check_return_type (bool): specifies if type checking
1710
+ should be done one the data received from the server.
1711
+ Default is True.
1712
+ _spec_property_naming (bool): True if the variable names in the input data
1713
+ are serialized names, as specified in the OpenAPI document.
1714
+ False if the variable names in the input data
1715
+ are pythonic names, e.g. snake case (default)
1716
+ _content_type (str/None): force body content-type.
1717
+ Default is None and content-type will be predicted by allowed
1718
+ content-types and body.
1719
+ _host_index (int/None): specifies the index of the server
1720
+ that we want to use.
1721
+ Default is read from the configuration.
1722
+ _request_auths (list): set to override the auth_settings for an a single
1723
+ request; this effectively ignores the authentication
1724
+ in the spec for a single request.
1725
+ Default is None
1726
+ async_req (bool): execute request asynchronously
1727
+
1728
+ Returns:
1729
+ CustomReportAnalysisResponse
1730
+ If the method is called asynchronously, returns the request
1731
+ thread.
1732
+ """
1733
+ kwargs['async_req'] = kwargs.get(
1734
+ 'async_req', False
1735
+ )
1736
+ kwargs['_return_http_data_only'] = kwargs.get(
1737
+ '_return_http_data_only', True
1738
+ )
1739
+ kwargs['_preload_content'] = kwargs.get(
1740
+ '_preload_content', True
1741
+ )
1742
+ kwargs['_request_timeout'] = kwargs.get(
1743
+ '_request_timeout', None
1744
+ )
1745
+ kwargs['_check_input_type'] = kwargs.get(
1746
+ '_check_input_type', True
1747
+ )
1748
+ kwargs['_check_return_type'] = kwargs.get(
1749
+ '_check_return_type', True
1750
+ )
1751
+ kwargs['_spec_property_naming'] = kwargs.get(
1752
+ '_spec_property_naming', False
1753
+ )
1754
+ kwargs['_content_type'] = kwargs.get(
1755
+ '_content_type')
1756
+ kwargs['_host_index'] = kwargs.get('_host_index')
1757
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
1758
+ kwargs['custom_report_oid'] = \
1759
+ custom_report_oid
1760
+ kwargs['analyze_request'] = \
1761
+ analyze_request
1762
+ return self.analyze_custom_report_endpoint.call_with_http_info(**kwargs)
1763
+
1563
1764
  def delete_custom_dashboard(
1564
1765
  self,
1565
1766
  custom_dashboard_oid,
@@ -2637,6 +2838,89 @@ class DatawarehouseApi(object):
2637
2838
  kwargs['_request_auths'] = kwargs.get('_request_auths', None)
2638
2839
  return self.get_custom_report_account_config_endpoint.call_with_http_info(**kwargs)
2639
2840
 
2841
+ def get_custom_report_chart_png_upload_url(
2842
+ self,
2843
+ custom_report_oid,
2844
+ **kwargs
2845
+ ):
2846
+ """Upload a PNG of a custom report chart # noqa: E501
2847
+
2848
+ Upload a PNG of a custom report chart # noqa: E501
2849
+ This method makes a synchronous HTTP request by default. To make an
2850
+ asynchronous HTTP request, please pass async_req=True
2851
+
2852
+ >>> thread = api.get_custom_report_chart_png_upload_url(custom_report_oid, async_req=True)
2853
+ >>> result = thread.get()
2854
+
2855
+ Args:
2856
+ custom_report_oid (int): The report oid to upload a chart PNG for.
2857
+
2858
+ Keyword Args:
2859
+ _return_http_data_only (bool): response data without head status
2860
+ code and headers. Default is True.
2861
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
2862
+ will be returned without reading/decoding response data.
2863
+ Default is True.
2864
+ _request_timeout (int/float/tuple): timeout setting for this request. If
2865
+ one number provided, it will be total request timeout. It can also
2866
+ be a pair (tuple) of (connection, read) timeouts.
2867
+ Default is None.
2868
+ _check_input_type (bool): specifies if type checking
2869
+ should be done one the data sent to the server.
2870
+ Default is True.
2871
+ _check_return_type (bool): specifies if type checking
2872
+ should be done one the data received from the server.
2873
+ Default is True.
2874
+ _spec_property_naming (bool): True if the variable names in the input data
2875
+ are serialized names, as specified in the OpenAPI document.
2876
+ False if the variable names in the input data
2877
+ are pythonic names, e.g. snake case (default)
2878
+ _content_type (str/None): force body content-type.
2879
+ Default is None and content-type will be predicted by allowed
2880
+ content-types and body.
2881
+ _host_index (int/None): specifies the index of the server
2882
+ that we want to use.
2883
+ Default is read from the configuration.
2884
+ _request_auths (list): set to override the auth_settings for an a single
2885
+ request; this effectively ignores the authentication
2886
+ in the spec for a single request.
2887
+ Default is None
2888
+ async_req (bool): execute request asynchronously
2889
+
2890
+ Returns:
2891
+ CustomReportChartPngUploadResponse
2892
+ If the method is called asynchronously, returns the request
2893
+ thread.
2894
+ """
2895
+ kwargs['async_req'] = kwargs.get(
2896
+ 'async_req', False
2897
+ )
2898
+ kwargs['_return_http_data_only'] = kwargs.get(
2899
+ '_return_http_data_only', True
2900
+ )
2901
+ kwargs['_preload_content'] = kwargs.get(
2902
+ '_preload_content', True
2903
+ )
2904
+ kwargs['_request_timeout'] = kwargs.get(
2905
+ '_request_timeout', None
2906
+ )
2907
+ kwargs['_check_input_type'] = kwargs.get(
2908
+ '_check_input_type', True
2909
+ )
2910
+ kwargs['_check_return_type'] = kwargs.get(
2911
+ '_check_return_type', True
2912
+ )
2913
+ kwargs['_spec_property_naming'] = kwargs.get(
2914
+ '_spec_property_naming', False
2915
+ )
2916
+ kwargs['_content_type'] = kwargs.get(
2917
+ '_content_type')
2918
+ kwargs['_host_index'] = kwargs.get('_host_index')
2919
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
2920
+ kwargs['custom_report_oid'] = \
2921
+ custom_report_oid
2922
+ return self.get_custom_report_chart_png_upload_url_endpoint.call_with_http_info(**kwargs)
2923
+
2640
2924
  def get_custom_reports(
2641
2925
  self,
2642
2926
  **kwargs
@@ -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.20/python'
80
+ self.user_agent = 'OpenAPI-Generator/4.1.22/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.20".\
425
+ "SDK Package Version: 4.1.22".\
426
426
  format(env=sys.platform, pyversion=sys.version)
427
427
 
428
428
  def get_host_settings(self):
@@ -89,6 +89,7 @@ class CustomReportAccountConfig(ModelNormal):
89
89
  'opt_in': (bool,), # noqa: E501
90
90
  'opt_in_by_user': (str,), # noqa: E501
91
91
  'opt_in_date': (str,), # noqa: E501
92
+ 'read_only': (bool,), # noqa: E501
92
93
  'sql_budget': (float,), # noqa: E501
93
94
  'sql_usage': (float,), # noqa: E501
94
95
  }
@@ -106,6 +107,7 @@ class CustomReportAccountConfig(ModelNormal):
106
107
  'opt_in': 'opt_in', # noqa: E501
107
108
  'opt_in_by_user': 'opt_in_by_user', # noqa: E501
108
109
  'opt_in_date': 'opt_in_date', # noqa: E501
110
+ 'read_only': 'read_only', # noqa: E501
109
111
  'sql_budget': 'sql_budget', # noqa: E501
110
112
  'sql_usage': 'sql_usage', # noqa: E501
111
113
  }
@@ -158,6 +160,7 @@ class CustomReportAccountConfig(ModelNormal):
158
160
  opt_in (bool): True if they have opted into custom reports. [optional] # noqa: E501
159
161
  opt_in_by_user (str): User that opted into custom reporting. [optional] # noqa: E501
160
162
  opt_in_date (str): Date/time that custom reporting was opted in to. [optional] # noqa: E501
163
+ read_only (bool): [optional] # noqa: E501
161
164
  sql_budget (float): [optional] # noqa: E501
162
165
  sql_usage (float): [optional] # noqa: E501
163
166
  """
@@ -252,6 +255,7 @@ class CustomReportAccountConfig(ModelNormal):
252
255
  opt_in (bool): True if they have opted into custom reports. [optional] # noqa: E501
253
256
  opt_in_by_user (str): User that opted into custom reporting. [optional] # noqa: E501
254
257
  opt_in_date (str): Date/time that custom reporting was opted in to. [optional] # noqa: E501
258
+ read_only (bool): [optional] # noqa: E501
255
259
  sql_budget (float): [optional] # noqa: E501
256
260
  sql_usage (float): [optional] # noqa: E501
257
261
  """