ultracart_api 4.0.140 → 4.0.142
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +37 -4
- data/docs/DatawarehouseApi.md +651 -0
- data/docs/OrderRefundableResponse.md +2 -0
- data/docs/Report.md +36 -0
- data/docs/ReportAuth.md +24 -0
- data/docs/ReportAuthResponse.md +26 -0
- data/docs/ReportDataSet.md +46 -0
- data/docs/ReportDataSetColumn.md +18 -0
- data/docs/ReportDataSetPage.md +36 -0
- data/docs/ReportDataSetPageResponse.md +26 -0
- data/docs/ReportDataSetQuery.md +40 -0
- data/docs/ReportDataSetResponse.md +26 -0
- data/docs/ReportDataSetRow.md +18 -0
- data/docs/ReportDataSetSchema.md +20 -0
- data/docs/ReportDataSource.md +28 -0
- data/docs/ReportDataSourceSchema.md +22 -0
- data/docs/ReportExecuteQueriesRequest.md +30 -0
- data/docs/ReportFilter.md +28 -0
- data/docs/ReportFilterConnection.md +20 -0
- data/docs/ReportPage.md +24 -0
- data/docs/ReportPageVisualization.md +34 -0
- data/docs/ReportPageVisualizationDimension.md +30 -0
- data/docs/ReportPageVisualizationMetric.md +24 -0
- data/docs/ReportResponse.md +26 -0
- data/docs/ReportsResponse.md +26 -0
- data/lib/ultracart_api/api/datawarehouse_api.rb +626 -0
- data/lib/ultracart_api/models/order_refundable_response.rb +11 -1
- data/lib/ultracart_api/models/report.rb +342 -0
- data/lib/ultracart_api/models/report_auth.rb +247 -0
- data/lib/ultracart_api/models/report_auth_response.rb +256 -0
- data/lib/ultracart_api/models/report_data_set.rb +397 -0
- data/lib/ultracart_api/models/report_data_set_column.rb +219 -0
- data/lib/ultracart_api/models/report_data_set_page.rb +308 -0
- data/lib/ultracart_api/models/report_data_set_page_response.rb +256 -0
- data/lib/ultracart_api/models/report_data_set_query.rb +365 -0
- data/lib/ultracart_api/models/report_data_set_response.rb +256 -0
- data/lib/ultracart_api/models/report_data_set_row.rb +221 -0
- data/lib/ultracart_api/models/report_data_set_schema.rb +263 -0
- data/lib/ultracart_api/models/report_data_source.rb +267 -0
- data/lib/ultracart_api/models/report_data_source_schema.rb +273 -0
- data/lib/ultracart_api/models/report_execute_queries_request.rb +313 -0
- data/lib/ultracart_api/models/report_filter.rb +307 -0
- data/lib/ultracart_api/models/report_filter_connection.rb +228 -0
- data/lib/ultracart_api/models/report_page.rb +251 -0
- data/lib/ultracart_api/models/report_page_visualization.rb +334 -0
- data/lib/ultracart_api/models/report_page_visualization_dimension.rb +279 -0
- data/lib/ultracart_api/models/report_page_visualization_metric.rb +283 -0
- data/lib/ultracart_api/models/report_response.rb +256 -0
- data/lib/ultracart_api/models/reports_response.rb +258 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +23 -0
- metadata +48 -2
@@ -0,0 +1,626 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module UltracartClient
|
16
|
+
class DatawarehouseApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
|
24
|
+
api_config = Configuration.new
|
25
|
+
api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
|
26
|
+
api_config.api_version = '2017-03-01'
|
27
|
+
api_config.verify_ssl = verify_ssl
|
28
|
+
|
29
|
+
api_client = ApiClient.new(api_config)
|
30
|
+
api_client.config.debugging = debugging
|
31
|
+
|
32
|
+
UltracartClient::DatawarehouseApi.new(api_client)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Delete a report
|
36
|
+
# Delete a report on the UltraCart account.
|
37
|
+
# @param report_oid [Integer] The report oid to delete.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [nil]
|
40
|
+
def delete_report(report_oid, opts = {})
|
41
|
+
delete_report_with_http_info(report_oid, opts)
|
42
|
+
nil
|
43
|
+
end
|
44
|
+
|
45
|
+
# Delete a report
|
46
|
+
# Delete a report on the UltraCart account.
|
47
|
+
# @param report_oid [Integer] The report oid to delete.
|
48
|
+
# @param [Hash] opts the optional parameters
|
49
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
50
|
+
def delete_report_with_http_info(report_oid, opts = {})
|
51
|
+
if @api_client.config.debugging
|
52
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.delete_report ...'
|
53
|
+
end
|
54
|
+
# verify the required parameter 'report_oid' is set
|
55
|
+
if @api_client.config.client_side_validation && report_oid.nil?
|
56
|
+
fail ArgumentError, "Missing the required parameter 'report_oid' when calling DatawarehouseApi.delete_report"
|
57
|
+
end
|
58
|
+
# resource path
|
59
|
+
local_var_path = '/datawarehouse/reports/{report_oid}'.sub('{' + 'report_oid' + '}', CGI.escape(report_oid.to_s))
|
60
|
+
|
61
|
+
# query parameters
|
62
|
+
query_params = opts[:query_params] || {}
|
63
|
+
|
64
|
+
# header parameters
|
65
|
+
header_params = opts[:header_params] || {}
|
66
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
67
|
+
# HTTP header 'Accept' (if needed)
|
68
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
69
|
+
|
70
|
+
# form parameters
|
71
|
+
form_params = opts[:form_params] || {}
|
72
|
+
|
73
|
+
# http body (model)
|
74
|
+
post_body = opts[:debug_body]
|
75
|
+
|
76
|
+
# return_type
|
77
|
+
return_type = opts[:debug_return_type]
|
78
|
+
|
79
|
+
# auth_names
|
80
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
81
|
+
|
82
|
+
new_options = opts.merge(
|
83
|
+
:operation => :"DatawarehouseApi.delete_report",
|
84
|
+
:header_params => header_params,
|
85
|
+
:query_params => query_params,
|
86
|
+
:form_params => form_params,
|
87
|
+
:body => post_body,
|
88
|
+
:auth_names => auth_names,
|
89
|
+
:return_type => return_type
|
90
|
+
)
|
91
|
+
|
92
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
93
|
+
if @api_client.config.debugging
|
94
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#delete_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
95
|
+
end
|
96
|
+
return data, status_code, headers
|
97
|
+
end
|
98
|
+
|
99
|
+
# Execute the report queries
|
100
|
+
# Execute the report queries
|
101
|
+
# @param query_request [ReportExecuteQueriesRequest] Query request
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [nil]
|
104
|
+
def execute_report_queries(query_request, opts = {})
|
105
|
+
execute_report_queries_with_http_info(query_request, opts)
|
106
|
+
nil
|
107
|
+
end
|
108
|
+
|
109
|
+
# Execute the report queries
|
110
|
+
# Execute the report queries
|
111
|
+
# @param query_request [ReportExecuteQueriesRequest] Query request
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
114
|
+
def execute_report_queries_with_http_info(query_request, opts = {})
|
115
|
+
if @api_client.config.debugging
|
116
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.execute_report_queries ...'
|
117
|
+
end
|
118
|
+
# verify the required parameter 'query_request' is set
|
119
|
+
if @api_client.config.client_side_validation && query_request.nil?
|
120
|
+
fail ArgumentError, "Missing the required parameter 'query_request' when calling DatawarehouseApi.execute_report_queries"
|
121
|
+
end
|
122
|
+
# resource path
|
123
|
+
local_var_path = '/datawarehouse/reports/execute'
|
124
|
+
|
125
|
+
# query parameters
|
126
|
+
query_params = opts[:query_params] || {}
|
127
|
+
|
128
|
+
# header parameters
|
129
|
+
header_params = opts[:header_params] || {}
|
130
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
131
|
+
# HTTP header 'Accept' (if needed)
|
132
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
133
|
+
# HTTP header 'Content-Type'
|
134
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
135
|
+
if !content_type.nil?
|
136
|
+
header_params['Content-Type'] = content_type
|
137
|
+
end
|
138
|
+
|
139
|
+
# form parameters
|
140
|
+
form_params = opts[:form_params] || {}
|
141
|
+
|
142
|
+
# http body (model)
|
143
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(query_request)
|
144
|
+
|
145
|
+
# return_type
|
146
|
+
return_type = opts[:debug_return_type]
|
147
|
+
|
148
|
+
# auth_names
|
149
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
150
|
+
|
151
|
+
new_options = opts.merge(
|
152
|
+
:operation => :"DatawarehouseApi.execute_report_queries",
|
153
|
+
:header_params => header_params,
|
154
|
+
:query_params => query_params,
|
155
|
+
:form_params => form_params,
|
156
|
+
:body => post_body,
|
157
|
+
:auth_names => auth_names,
|
158
|
+
:return_type => return_type
|
159
|
+
)
|
160
|
+
|
161
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#execute_report_queries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
|
+
end
|
165
|
+
return data, status_code, headers
|
166
|
+
end
|
167
|
+
|
168
|
+
# Get a report
|
169
|
+
# Retrieve a report
|
170
|
+
# @param report_oid [Integer]
|
171
|
+
# @param [Hash] opts the optional parameters
|
172
|
+
# @return [ReportResponse]
|
173
|
+
def get_report(report_oid, opts = {})
|
174
|
+
data, _status_code, _headers = get_report_with_http_info(report_oid, opts)
|
175
|
+
data
|
176
|
+
end
|
177
|
+
|
178
|
+
# Get a report
|
179
|
+
# Retrieve a report
|
180
|
+
# @param report_oid [Integer]
|
181
|
+
# @param [Hash] opts the optional parameters
|
182
|
+
# @return [Array<(ReportResponse, Integer, Hash)>] ReportResponse data, response status code and response headers
|
183
|
+
def get_report_with_http_info(report_oid, opts = {})
|
184
|
+
if @api_client.config.debugging
|
185
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_report ...'
|
186
|
+
end
|
187
|
+
# verify the required parameter 'report_oid' is set
|
188
|
+
if @api_client.config.client_side_validation && report_oid.nil?
|
189
|
+
fail ArgumentError, "Missing the required parameter 'report_oid' when calling DatawarehouseApi.get_report"
|
190
|
+
end
|
191
|
+
# resource path
|
192
|
+
local_var_path = '/datawarehouse/reports/{report_oid}'.sub('{' + 'report_oid' + '}', CGI.escape(report_oid.to_s))
|
193
|
+
|
194
|
+
# query parameters
|
195
|
+
query_params = opts[:query_params] || {}
|
196
|
+
|
197
|
+
# header parameters
|
198
|
+
header_params = opts[:header_params] || {}
|
199
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
200
|
+
# HTTP header 'Accept' (if needed)
|
201
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
202
|
+
|
203
|
+
# form parameters
|
204
|
+
form_params = opts[:form_params] || {}
|
205
|
+
|
206
|
+
# http body (model)
|
207
|
+
post_body = opts[:debug_body]
|
208
|
+
|
209
|
+
# return_type
|
210
|
+
return_type = opts[:debug_return_type] || 'ReportResponse'
|
211
|
+
|
212
|
+
# auth_names
|
213
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
214
|
+
|
215
|
+
new_options = opts.merge(
|
216
|
+
:operation => :"DatawarehouseApi.get_report",
|
217
|
+
:header_params => header_params,
|
218
|
+
:query_params => query_params,
|
219
|
+
:form_params => form_params,
|
220
|
+
:body => post_body,
|
221
|
+
:auth_names => auth_names,
|
222
|
+
:return_type => return_type
|
223
|
+
)
|
224
|
+
|
225
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
226
|
+
if @api_client.config.debugging
|
227
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
228
|
+
end
|
229
|
+
return data, status_code, headers
|
230
|
+
end
|
231
|
+
|
232
|
+
# Get a report data set
|
233
|
+
# Retrieve a report data set
|
234
|
+
# @param dataset_uuid [String]
|
235
|
+
# @param [Hash] opts the optional parameters
|
236
|
+
# @return [ReportDataSetResponse]
|
237
|
+
def get_report_data_set(dataset_uuid, opts = {})
|
238
|
+
data, _status_code, _headers = get_report_data_set_with_http_info(dataset_uuid, opts)
|
239
|
+
data
|
240
|
+
end
|
241
|
+
|
242
|
+
# Get a report data set
|
243
|
+
# Retrieve a report data set
|
244
|
+
# @param dataset_uuid [String]
|
245
|
+
# @param [Hash] opts the optional parameters
|
246
|
+
# @return [Array<(ReportDataSetResponse, Integer, Hash)>] ReportDataSetResponse data, response status code and response headers
|
247
|
+
def get_report_data_set_with_http_info(dataset_uuid, opts = {})
|
248
|
+
if @api_client.config.debugging
|
249
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_report_data_set ...'
|
250
|
+
end
|
251
|
+
# verify the required parameter 'dataset_uuid' is set
|
252
|
+
if @api_client.config.client_side_validation && dataset_uuid.nil?
|
253
|
+
fail ArgumentError, "Missing the required parameter 'dataset_uuid' when calling DatawarehouseApi.get_report_data_set"
|
254
|
+
end
|
255
|
+
# resource path
|
256
|
+
local_var_path = '/datawarehouse/reports/dataset/{dataset_uuid}'.sub('{' + 'dataset_uuid' + '}', CGI.escape(dataset_uuid.to_s))
|
257
|
+
|
258
|
+
# query parameters
|
259
|
+
query_params = opts[:query_params] || {}
|
260
|
+
|
261
|
+
# header parameters
|
262
|
+
header_params = opts[:header_params] || {}
|
263
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
264
|
+
# HTTP header 'Accept' (if needed)
|
265
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
266
|
+
|
267
|
+
# form parameters
|
268
|
+
form_params = opts[:form_params] || {}
|
269
|
+
|
270
|
+
# http body (model)
|
271
|
+
post_body = opts[:debug_body]
|
272
|
+
|
273
|
+
# return_type
|
274
|
+
return_type = opts[:debug_return_type] || 'ReportDataSetResponse'
|
275
|
+
|
276
|
+
# auth_names
|
277
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
278
|
+
|
279
|
+
new_options = opts.merge(
|
280
|
+
:operation => :"DatawarehouseApi.get_report_data_set",
|
281
|
+
:header_params => header_params,
|
282
|
+
:query_params => query_params,
|
283
|
+
:form_params => form_params,
|
284
|
+
:body => post_body,
|
285
|
+
:auth_names => auth_names,
|
286
|
+
:return_type => return_type
|
287
|
+
)
|
288
|
+
|
289
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
290
|
+
if @api_client.config.debugging
|
291
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_report_data_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
292
|
+
end
|
293
|
+
return data, status_code, headers
|
294
|
+
end
|
295
|
+
|
296
|
+
# Get a report data set page
|
297
|
+
# Retrieve a report data set page
|
298
|
+
# @param dataset_uuid [String]
|
299
|
+
# @param page_number [Integer]
|
300
|
+
# @param [Hash] opts the optional parameters
|
301
|
+
# @return [ReportDataSetPageResponse]
|
302
|
+
def get_report_data_set_page(dataset_uuid, page_number, opts = {})
|
303
|
+
data, _status_code, _headers = get_report_data_set_page_with_http_info(dataset_uuid, page_number, opts)
|
304
|
+
data
|
305
|
+
end
|
306
|
+
|
307
|
+
# Get a report data set page
|
308
|
+
# Retrieve a report data set page
|
309
|
+
# @param dataset_uuid [String]
|
310
|
+
# @param page_number [Integer]
|
311
|
+
# @param [Hash] opts the optional parameters
|
312
|
+
# @return [Array<(ReportDataSetPageResponse, Integer, Hash)>] ReportDataSetPageResponse data, response status code and response headers
|
313
|
+
def get_report_data_set_page_with_http_info(dataset_uuid, page_number, opts = {})
|
314
|
+
if @api_client.config.debugging
|
315
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_report_data_set_page ...'
|
316
|
+
end
|
317
|
+
# verify the required parameter 'dataset_uuid' is set
|
318
|
+
if @api_client.config.client_side_validation && dataset_uuid.nil?
|
319
|
+
fail ArgumentError, "Missing the required parameter 'dataset_uuid' when calling DatawarehouseApi.get_report_data_set_page"
|
320
|
+
end
|
321
|
+
# verify the required parameter 'page_number' is set
|
322
|
+
if @api_client.config.client_side_validation && page_number.nil?
|
323
|
+
fail ArgumentError, "Missing the required parameter 'page_number' when calling DatawarehouseApi.get_report_data_set_page"
|
324
|
+
end
|
325
|
+
# resource path
|
326
|
+
local_var_path = '/datawarehouse/reports/dataset/{dataset_uuid}/pages/{page_number}'.sub('{' + 'dataset_uuid' + '}', CGI.escape(dataset_uuid.to_s)).sub('{' + 'page_number' + '}', CGI.escape(page_number.to_s))
|
327
|
+
|
328
|
+
# query parameters
|
329
|
+
query_params = opts[:query_params] || {}
|
330
|
+
|
331
|
+
# header parameters
|
332
|
+
header_params = opts[:header_params] || {}
|
333
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
334
|
+
# HTTP header 'Accept' (if needed)
|
335
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
336
|
+
|
337
|
+
# form parameters
|
338
|
+
form_params = opts[:form_params] || {}
|
339
|
+
|
340
|
+
# http body (model)
|
341
|
+
post_body = opts[:debug_body]
|
342
|
+
|
343
|
+
# return_type
|
344
|
+
return_type = opts[:debug_return_type] || 'ReportDataSetPageResponse'
|
345
|
+
|
346
|
+
# auth_names
|
347
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
348
|
+
|
349
|
+
new_options = opts.merge(
|
350
|
+
:operation => :"DatawarehouseApi.get_report_data_set_page",
|
351
|
+
:header_params => header_params,
|
352
|
+
:query_params => query_params,
|
353
|
+
:form_params => form_params,
|
354
|
+
:body => post_body,
|
355
|
+
:auth_names => auth_names,
|
356
|
+
:return_type => return_type
|
357
|
+
)
|
358
|
+
|
359
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
360
|
+
if @api_client.config.debugging
|
361
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_report_data_set_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
362
|
+
end
|
363
|
+
return data, status_code, headers
|
364
|
+
end
|
365
|
+
|
366
|
+
# Get report websocket authorization
|
367
|
+
# Retrieve a JWT to authorize a report to make a websocket connection.
|
368
|
+
# @param [Hash] opts the optional parameters
|
369
|
+
# @return [ReportAuthResponse]
|
370
|
+
def get_report_websocket_authorization(opts = {})
|
371
|
+
data, _status_code, _headers = get_report_websocket_authorization_with_http_info(opts)
|
372
|
+
data
|
373
|
+
end
|
374
|
+
|
375
|
+
# Get report websocket authorization
|
376
|
+
# Retrieve a JWT to authorize a report to make a websocket connection.
|
377
|
+
# @param [Hash] opts the optional parameters
|
378
|
+
# @return [Array<(ReportAuthResponse, Integer, Hash)>] ReportAuthResponse data, response status code and response headers
|
379
|
+
def get_report_websocket_authorization_with_http_info(opts = {})
|
380
|
+
if @api_client.config.debugging
|
381
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_report_websocket_authorization ...'
|
382
|
+
end
|
383
|
+
# resource path
|
384
|
+
local_var_path = '/datawarehouse/reports/auth'
|
385
|
+
|
386
|
+
# query parameters
|
387
|
+
query_params = opts[:query_params] || {}
|
388
|
+
|
389
|
+
# header parameters
|
390
|
+
header_params = opts[:header_params] || {}
|
391
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
392
|
+
# HTTP header 'Accept' (if needed)
|
393
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
394
|
+
|
395
|
+
# form parameters
|
396
|
+
form_params = opts[:form_params] || {}
|
397
|
+
|
398
|
+
# http body (model)
|
399
|
+
post_body = opts[:debug_body]
|
400
|
+
|
401
|
+
# return_type
|
402
|
+
return_type = opts[:debug_return_type] || 'ReportAuthResponse'
|
403
|
+
|
404
|
+
# auth_names
|
405
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
406
|
+
|
407
|
+
new_options = opts.merge(
|
408
|
+
:operation => :"DatawarehouseApi.get_report_websocket_authorization",
|
409
|
+
:header_params => header_params,
|
410
|
+
:query_params => query_params,
|
411
|
+
:form_params => form_params,
|
412
|
+
:body => post_body,
|
413
|
+
:auth_names => auth_names,
|
414
|
+
:return_type => return_type
|
415
|
+
)
|
416
|
+
|
417
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
418
|
+
if @api_client.config.debugging
|
419
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_report_websocket_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
420
|
+
end
|
421
|
+
return data, status_code, headers
|
422
|
+
end
|
423
|
+
|
424
|
+
# Get list of reports available
|
425
|
+
# Retrieve a list of reports available
|
426
|
+
# @param [Hash] opts the optional parameters
|
427
|
+
# @return [ReportsResponse]
|
428
|
+
def get_reports(opts = {})
|
429
|
+
data, _status_code, _headers = get_reports_with_http_info(opts)
|
430
|
+
data
|
431
|
+
end
|
432
|
+
|
433
|
+
# Get list of reports available
|
434
|
+
# Retrieve a list of reports available
|
435
|
+
# @param [Hash] opts the optional parameters
|
436
|
+
# @return [Array<(ReportsResponse, Integer, Hash)>] ReportsResponse data, response status code and response headers
|
437
|
+
def get_reports_with_http_info(opts = {})
|
438
|
+
if @api_client.config.debugging
|
439
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_reports ...'
|
440
|
+
end
|
441
|
+
# resource path
|
442
|
+
local_var_path = '/datawarehouse/reports'
|
443
|
+
|
444
|
+
# query parameters
|
445
|
+
query_params = opts[:query_params] || {}
|
446
|
+
|
447
|
+
# header parameters
|
448
|
+
header_params = opts[:header_params] || {}
|
449
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
450
|
+
# HTTP header 'Accept' (if needed)
|
451
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
452
|
+
|
453
|
+
# form parameters
|
454
|
+
form_params = opts[:form_params] || {}
|
455
|
+
|
456
|
+
# http body (model)
|
457
|
+
post_body = opts[:debug_body]
|
458
|
+
|
459
|
+
# return_type
|
460
|
+
return_type = opts[:debug_return_type] || 'ReportsResponse'
|
461
|
+
|
462
|
+
# auth_names
|
463
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
464
|
+
|
465
|
+
new_options = opts.merge(
|
466
|
+
:operation => :"DatawarehouseApi.get_reports",
|
467
|
+
:header_params => header_params,
|
468
|
+
:query_params => query_params,
|
469
|
+
:form_params => form_params,
|
470
|
+
:body => post_body,
|
471
|
+
:auth_names => auth_names,
|
472
|
+
:return_type => return_type
|
473
|
+
)
|
474
|
+
|
475
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
476
|
+
if @api_client.config.debugging
|
477
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
478
|
+
end
|
479
|
+
return data, status_code, headers
|
480
|
+
end
|
481
|
+
|
482
|
+
# Create a report
|
483
|
+
# Create a new report on the UltraCart account.
|
484
|
+
# @param report [Report] Report to create
|
485
|
+
# @param [Hash] opts the optional parameters
|
486
|
+
# @return [ReportResponse]
|
487
|
+
def insert_report(report, opts = {})
|
488
|
+
data, _status_code, _headers = insert_report_with_http_info(report, opts)
|
489
|
+
data
|
490
|
+
end
|
491
|
+
|
492
|
+
# Create a report
|
493
|
+
# Create a new report on the UltraCart account.
|
494
|
+
# @param report [Report] Report to create
|
495
|
+
# @param [Hash] opts the optional parameters
|
496
|
+
# @return [Array<(ReportResponse, Integer, Hash)>] ReportResponse data, response status code and response headers
|
497
|
+
def insert_report_with_http_info(report, opts = {})
|
498
|
+
if @api_client.config.debugging
|
499
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.insert_report ...'
|
500
|
+
end
|
501
|
+
# verify the required parameter 'report' is set
|
502
|
+
if @api_client.config.client_side_validation && report.nil?
|
503
|
+
fail ArgumentError, "Missing the required parameter 'report' when calling DatawarehouseApi.insert_report"
|
504
|
+
end
|
505
|
+
# resource path
|
506
|
+
local_var_path = '/datawarehouse/reports'
|
507
|
+
|
508
|
+
# query parameters
|
509
|
+
query_params = opts[:query_params] || {}
|
510
|
+
|
511
|
+
# header parameters
|
512
|
+
header_params = opts[:header_params] || {}
|
513
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
514
|
+
# HTTP header 'Accept' (if needed)
|
515
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
516
|
+
# HTTP header 'Content-Type'
|
517
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
518
|
+
if !content_type.nil?
|
519
|
+
header_params['Content-Type'] = content_type
|
520
|
+
end
|
521
|
+
|
522
|
+
# form parameters
|
523
|
+
form_params = opts[:form_params] || {}
|
524
|
+
|
525
|
+
# http body (model)
|
526
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(report)
|
527
|
+
|
528
|
+
# return_type
|
529
|
+
return_type = opts[:debug_return_type] || 'ReportResponse'
|
530
|
+
|
531
|
+
# auth_names
|
532
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
533
|
+
|
534
|
+
new_options = opts.merge(
|
535
|
+
:operation => :"DatawarehouseApi.insert_report",
|
536
|
+
:header_params => header_params,
|
537
|
+
:query_params => query_params,
|
538
|
+
:form_params => form_params,
|
539
|
+
:body => post_body,
|
540
|
+
:auth_names => auth_names,
|
541
|
+
:return_type => return_type
|
542
|
+
)
|
543
|
+
|
544
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
545
|
+
if @api_client.config.debugging
|
546
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#insert_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
547
|
+
end
|
548
|
+
return data, status_code, headers
|
549
|
+
end
|
550
|
+
|
551
|
+
# Update a report
|
552
|
+
# Update a report on the UltraCart account.
|
553
|
+
# @param report_oid [Integer] The report oid to update.
|
554
|
+
# @param report [Report] Report to update
|
555
|
+
# @param [Hash] opts the optional parameters
|
556
|
+
# @return [ReportResponse]
|
557
|
+
def update_report(report_oid, report, opts = {})
|
558
|
+
data, _status_code, _headers = update_report_with_http_info(report_oid, report, opts)
|
559
|
+
data
|
560
|
+
end
|
561
|
+
|
562
|
+
# Update a report
|
563
|
+
# Update a report on the UltraCart account.
|
564
|
+
# @param report_oid [Integer] The report oid to update.
|
565
|
+
# @param report [Report] Report to update
|
566
|
+
# @param [Hash] opts the optional parameters
|
567
|
+
# @return [Array<(ReportResponse, Integer, Hash)>] ReportResponse data, response status code and response headers
|
568
|
+
def update_report_with_http_info(report_oid, report, opts = {})
|
569
|
+
if @api_client.config.debugging
|
570
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.update_report ...'
|
571
|
+
end
|
572
|
+
# verify the required parameter 'report_oid' is set
|
573
|
+
if @api_client.config.client_side_validation && report_oid.nil?
|
574
|
+
fail ArgumentError, "Missing the required parameter 'report_oid' when calling DatawarehouseApi.update_report"
|
575
|
+
end
|
576
|
+
# verify the required parameter 'report' is set
|
577
|
+
if @api_client.config.client_side_validation && report.nil?
|
578
|
+
fail ArgumentError, "Missing the required parameter 'report' when calling DatawarehouseApi.update_report"
|
579
|
+
end
|
580
|
+
# resource path
|
581
|
+
local_var_path = '/datawarehouse/reports/{report_oid}'.sub('{' + 'report_oid' + '}', CGI.escape(report_oid.to_s))
|
582
|
+
|
583
|
+
# query parameters
|
584
|
+
query_params = opts[:query_params] || {}
|
585
|
+
|
586
|
+
# header parameters
|
587
|
+
header_params = opts[:header_params] || {}
|
588
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
589
|
+
# HTTP header 'Accept' (if needed)
|
590
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
591
|
+
# HTTP header 'Content-Type'
|
592
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
593
|
+
if !content_type.nil?
|
594
|
+
header_params['Content-Type'] = content_type
|
595
|
+
end
|
596
|
+
|
597
|
+
# form parameters
|
598
|
+
form_params = opts[:form_params] || {}
|
599
|
+
|
600
|
+
# http body (model)
|
601
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(report)
|
602
|
+
|
603
|
+
# return_type
|
604
|
+
return_type = opts[:debug_return_type] || 'ReportResponse'
|
605
|
+
|
606
|
+
# auth_names
|
607
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
608
|
+
|
609
|
+
new_options = opts.merge(
|
610
|
+
:operation => :"DatawarehouseApi.update_report",
|
611
|
+
:header_params => header_params,
|
612
|
+
:query_params => query_params,
|
613
|
+
:form_params => form_params,
|
614
|
+
:body => post_body,
|
615
|
+
:auth_names => auth_names,
|
616
|
+
:return_type => return_type
|
617
|
+
)
|
618
|
+
|
619
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
620
|
+
if @api_client.config.debugging
|
621
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#update_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
622
|
+
end
|
623
|
+
return data, status_code, headers
|
624
|
+
end
|
625
|
+
end
|
626
|
+
end
|
@@ -26,6 +26,9 @@ module UltracartClient
|
|
26
26
|
# Return codes available at the item level.
|
27
27
|
attr_accessor :item_level_return_reasons
|
28
28
|
|
29
|
+
# If true, this refund will have to be manually done because of additional charges with the virtual terminal were made
|
30
|
+
attr_accessor :manual_because_multiple_charges
|
31
|
+
|
29
32
|
attr_accessor :metadata
|
30
33
|
|
31
34
|
# True if the order level refund reason is required
|
@@ -52,6 +55,7 @@ module UltracartClient
|
|
52
55
|
:'item_level_refund_reason_required' => :'item_level_refund_reason_required',
|
53
56
|
:'item_level_refund_reasons' => :'item_level_refund_reasons',
|
54
57
|
:'item_level_return_reasons' => :'item_level_return_reasons',
|
58
|
+
:'manual_because_multiple_charges' => :'manual_because_multiple_charges',
|
55
59
|
:'metadata' => :'metadata',
|
56
60
|
:'order_level_refund_reason_required' => :'order_level_refund_reason_required',
|
57
61
|
:'order_level_refund_reasons' => :'order_level_refund_reasons',
|
@@ -74,6 +78,7 @@ module UltracartClient
|
|
74
78
|
:'item_level_refund_reason_required' => :'Boolean',
|
75
79
|
:'item_level_refund_reasons' => :'Array<OrderReason>',
|
76
80
|
:'item_level_return_reasons' => :'Array<OrderReason>',
|
81
|
+
:'manual_because_multiple_charges' => :'Boolean',
|
77
82
|
:'metadata' => :'ResponseMetadata',
|
78
83
|
:'order_level_refund_reason_required' => :'Boolean',
|
79
84
|
:'order_level_refund_reasons' => :'Array<OrderReason>',
|
@@ -125,6 +130,10 @@ module UltracartClient
|
|
125
130
|
end
|
126
131
|
end
|
127
132
|
|
133
|
+
if attributes.key?(:'manual_because_multiple_charges')
|
134
|
+
self.manual_because_multiple_charges = attributes[:'manual_because_multiple_charges']
|
135
|
+
end
|
136
|
+
|
128
137
|
if attributes.key?(:'metadata')
|
129
138
|
self.metadata = attributes[:'metadata']
|
130
139
|
end
|
@@ -180,6 +189,7 @@ module UltracartClient
|
|
180
189
|
item_level_refund_reason_required == o.item_level_refund_reason_required &&
|
181
190
|
item_level_refund_reasons == o.item_level_refund_reasons &&
|
182
191
|
item_level_return_reasons == o.item_level_return_reasons &&
|
192
|
+
manual_because_multiple_charges == o.manual_because_multiple_charges &&
|
183
193
|
metadata == o.metadata &&
|
184
194
|
order_level_refund_reason_required == o.order_level_refund_reason_required &&
|
185
195
|
order_level_refund_reasons == o.order_level_refund_reasons &&
|
@@ -198,7 +208,7 @@ module UltracartClient
|
|
198
208
|
# Calculates hash code according to all attributes.
|
199
209
|
# @return [Integer] Hash code
|
200
210
|
def hash
|
201
|
-
[error, item_level_refund_reason_required, item_level_refund_reasons, item_level_return_reasons, metadata, order_level_refund_reason_required, order_level_refund_reasons, order_level_reject_reasons, refundable, success, warning].hash
|
211
|
+
[error, item_level_refund_reason_required, item_level_refund_reasons, item_level_return_reasons, manual_because_multiple_charges, metadata, order_level_refund_reason_required, order_level_refund_reasons, order_level_reject_reasons, refundable, success, warning].hash
|
202
212
|
end
|
203
213
|
|
204
214
|
# Builds the object from hash
|