ultracart_api 3.10.123 → 3.10.125
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 +461 -0
- data/docs/OrderRefundableResponse.md +1 -0
- data/docs/Report.md +17 -0
- data/docs/ReportAuth.md +11 -0
- data/docs/ReportAuthResponse.md +12 -0
- data/docs/ReportDataSet.md +22 -0
- data/docs/ReportDataSetColumn.md +8 -0
- data/docs/ReportDataSetPage.md +17 -0
- data/docs/ReportDataSetPageResponse.md +12 -0
- data/docs/ReportDataSetQuery.md +19 -0
- data/docs/ReportDataSetResponse.md +12 -0
- data/docs/ReportDataSetRow.md +8 -0
- data/docs/ReportDataSetSchema.md +9 -0
- data/docs/ReportDataSource.md +13 -0
- data/docs/ReportDataSourceSchema.md +10 -0
- data/docs/ReportExecuteQueriesRequest.md +14 -0
- data/docs/ReportFilter.md +13 -0
- data/docs/ReportFilterConnection.md +9 -0
- data/docs/ReportPage.md +11 -0
- data/docs/ReportPageVisualization.md +16 -0
- data/docs/ReportPageVisualizationDimension.md +14 -0
- data/docs/ReportPageVisualizationMetric.md +11 -0
- data/docs/ReportResponse.md +12 -0
- data/docs/ReportsResponse.md +12 -0
- data/lib/ultracart_api/api/datawarehouse_api.rb +529 -0
- data/lib/ultracart_api/models/order_refundable_response.rb +11 -1
- data/lib/ultracart_api/models/report.rb +307 -0
- data/lib/ultracart_api/models/report_auth.rb +212 -0
- data/lib/ultracart_api/models/report_auth_response.rb +221 -0
- data/lib/ultracart_api/models/report_data_set.rb +362 -0
- data/lib/ultracart_api/models/report_data_set_column.rb +184 -0
- data/lib/ultracart_api/models/report_data_set_page.rb +273 -0
- data/lib/ultracart_api/models/report_data_set_page_response.rb +221 -0
- data/lib/ultracart_api/models/report_data_set_query.rb +330 -0
- data/lib/ultracart_api/models/report_data_set_response.rb +221 -0
- data/lib/ultracart_api/models/report_data_set_row.rb +186 -0
- data/lib/ultracart_api/models/report_data_set_schema.rb +228 -0
- data/lib/ultracart_api/models/report_data_source.rb +232 -0
- data/lib/ultracart_api/models/report_data_source_schema.rb +238 -0
- data/lib/ultracart_api/models/report_execute_queries_request.rb +278 -0
- data/lib/ultracart_api/models/report_filter.rb +272 -0
- data/lib/ultracart_api/models/report_filter_connection.rb +193 -0
- data/lib/ultracart_api/models/report_page.rb +216 -0
- data/lib/ultracart_api/models/report_page_visualization.rb +299 -0
- data/lib/ultracart_api/models/report_page_visualization_dimension.rb +244 -0
- data/lib/ultracart_api/models/report_page_visualization_metric.rb +248 -0
- data/lib/ultracart_api/models/report_response.rb +221 -0
- data/lib/ultracart_api/models/reports_response.rb +223 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +23 -0
- metadata +48 -2
@@ -0,0 +1,529 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.15-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'addressable/uri'
|
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 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 The report oid to delete.
|
48
|
+
# @param [Hash] opts the optional parameters
|
49
|
+
# @return [Array<(nil, Fixnum, 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' + '}', report_oid.to_s)
|
60
|
+
|
61
|
+
# query parameters
|
62
|
+
query_params = {}
|
63
|
+
|
64
|
+
# header parameters
|
65
|
+
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
|
+
# HTTP header 'Content-Type'
|
70
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
71
|
+
|
72
|
+
# form parameters
|
73
|
+
form_params = {}
|
74
|
+
|
75
|
+
# http body (model)
|
76
|
+
post_body = nil
|
77
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
78
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
79
|
+
:header_params => header_params,
|
80
|
+
:query_params => query_params,
|
81
|
+
:form_params => form_params,
|
82
|
+
:body => post_body,
|
83
|
+
:auth_names => auth_names)
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#delete_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
# Execute the report queries
|
90
|
+
# Execute the report queries
|
91
|
+
# @param query_request Query request
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [nil]
|
94
|
+
def execute_report_queries(query_request, opts = {})
|
95
|
+
execute_report_queries_with_http_info(query_request, opts)
|
96
|
+
nil
|
97
|
+
end
|
98
|
+
|
99
|
+
# Execute the report queries
|
100
|
+
# Execute the report queries
|
101
|
+
# @param query_request Query request
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
104
|
+
def execute_report_queries_with_http_info(query_request, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.execute_report_queries ...'
|
107
|
+
end
|
108
|
+
# verify the required parameter 'query_request' is set
|
109
|
+
if @api_client.config.client_side_validation && query_request.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'query_request' when calling DatawarehouseApi.execute_report_queries"
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = '/datawarehouse/reports/execute'
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = {}
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = {}
|
120
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
121
|
+
# HTTP header 'Accept' (if needed)
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
123
|
+
# HTTP header 'Content-Type'
|
124
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
125
|
+
|
126
|
+
# form parameters
|
127
|
+
form_params = {}
|
128
|
+
|
129
|
+
# http body (model)
|
130
|
+
post_body = @api_client.object_to_http_body(query_request)
|
131
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
132
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
133
|
+
:header_params => header_params,
|
134
|
+
:query_params => query_params,
|
135
|
+
:form_params => form_params,
|
136
|
+
:body => post_body,
|
137
|
+
:auth_names => auth_names)
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#execute_report_queries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
140
|
+
end
|
141
|
+
return data, status_code, headers
|
142
|
+
end
|
143
|
+
# Get a report
|
144
|
+
# Retrieve a report
|
145
|
+
# @param report_oid
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [ReportResponse]
|
148
|
+
def get_report(report_oid, opts = {})
|
149
|
+
data, _status_code, _headers = get_report_with_http_info(report_oid, opts)
|
150
|
+
data
|
151
|
+
end
|
152
|
+
|
153
|
+
# Get a report
|
154
|
+
# Retrieve a report
|
155
|
+
# @param report_oid
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @return [Array<(ReportResponse, Fixnum, Hash)>] ReportResponse data, response status code and response headers
|
158
|
+
def get_report_with_http_info(report_oid, opts = {})
|
159
|
+
if @api_client.config.debugging
|
160
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_report ...'
|
161
|
+
end
|
162
|
+
# verify the required parameter 'report_oid' is set
|
163
|
+
if @api_client.config.client_side_validation && report_oid.nil?
|
164
|
+
fail ArgumentError, "Missing the required parameter 'report_oid' when calling DatawarehouseApi.get_report"
|
165
|
+
end
|
166
|
+
# resource path
|
167
|
+
local_var_path = '/datawarehouse/reports/{report_oid}'.sub('{' + 'report_oid' + '}', report_oid.to_s)
|
168
|
+
|
169
|
+
# query parameters
|
170
|
+
query_params = {}
|
171
|
+
|
172
|
+
# header parameters
|
173
|
+
header_params = {}
|
174
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
175
|
+
# HTTP header 'Accept' (if needed)
|
176
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
177
|
+
# HTTP header 'Content-Type'
|
178
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
179
|
+
|
180
|
+
# form parameters
|
181
|
+
form_params = {}
|
182
|
+
|
183
|
+
# http body (model)
|
184
|
+
post_body = nil
|
185
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
186
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
187
|
+
:header_params => header_params,
|
188
|
+
:query_params => query_params,
|
189
|
+
:form_params => form_params,
|
190
|
+
:body => post_body,
|
191
|
+
:auth_names => auth_names,
|
192
|
+
:return_type => 'ReportResponse')
|
193
|
+
if @api_client.config.debugging
|
194
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
195
|
+
end
|
196
|
+
return data, status_code, headers
|
197
|
+
end
|
198
|
+
# Get a report data set
|
199
|
+
# Retrieve a report data set
|
200
|
+
# @param dataset_uuid
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @return [ReportDataSetResponse]
|
203
|
+
def get_report_data_set(dataset_uuid, opts = {})
|
204
|
+
data, _status_code, _headers = get_report_data_set_with_http_info(dataset_uuid, opts)
|
205
|
+
data
|
206
|
+
end
|
207
|
+
|
208
|
+
# Get a report data set
|
209
|
+
# Retrieve a report data set
|
210
|
+
# @param dataset_uuid
|
211
|
+
# @param [Hash] opts the optional parameters
|
212
|
+
# @return [Array<(ReportDataSetResponse, Fixnum, Hash)>] ReportDataSetResponse data, response status code and response headers
|
213
|
+
def get_report_data_set_with_http_info(dataset_uuid, opts = {})
|
214
|
+
if @api_client.config.debugging
|
215
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_report_data_set ...'
|
216
|
+
end
|
217
|
+
# verify the required parameter 'dataset_uuid' is set
|
218
|
+
if @api_client.config.client_side_validation && dataset_uuid.nil?
|
219
|
+
fail ArgumentError, "Missing the required parameter 'dataset_uuid' when calling DatawarehouseApi.get_report_data_set"
|
220
|
+
end
|
221
|
+
# resource path
|
222
|
+
local_var_path = '/datawarehouse/reports/dataset/{dataset_uuid}'.sub('{' + 'dataset_uuid' + '}', dataset_uuid.to_s)
|
223
|
+
|
224
|
+
# query parameters
|
225
|
+
query_params = {}
|
226
|
+
|
227
|
+
# header parameters
|
228
|
+
header_params = {}
|
229
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
230
|
+
# HTTP header 'Accept' (if needed)
|
231
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
232
|
+
# HTTP header 'Content-Type'
|
233
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
234
|
+
|
235
|
+
# form parameters
|
236
|
+
form_params = {}
|
237
|
+
|
238
|
+
# http body (model)
|
239
|
+
post_body = nil
|
240
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
241
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
242
|
+
:header_params => header_params,
|
243
|
+
:query_params => query_params,
|
244
|
+
:form_params => form_params,
|
245
|
+
:body => post_body,
|
246
|
+
:auth_names => auth_names,
|
247
|
+
:return_type => 'ReportDataSetResponse')
|
248
|
+
if @api_client.config.debugging
|
249
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_report_data_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
250
|
+
end
|
251
|
+
return data, status_code, headers
|
252
|
+
end
|
253
|
+
# Get a report data set page
|
254
|
+
# Retrieve a report data set page
|
255
|
+
# @param dataset_uuid
|
256
|
+
# @param page_number
|
257
|
+
# @param [Hash] opts the optional parameters
|
258
|
+
# @return [ReportDataSetPageResponse]
|
259
|
+
def get_report_data_set_page(dataset_uuid, page_number, opts = {})
|
260
|
+
data, _status_code, _headers = get_report_data_set_page_with_http_info(dataset_uuid, page_number, opts)
|
261
|
+
data
|
262
|
+
end
|
263
|
+
|
264
|
+
# Get a report data set page
|
265
|
+
# Retrieve a report data set page
|
266
|
+
# @param dataset_uuid
|
267
|
+
# @param page_number
|
268
|
+
# @param [Hash] opts the optional parameters
|
269
|
+
# @return [Array<(ReportDataSetPageResponse, Fixnum, Hash)>] ReportDataSetPageResponse data, response status code and response headers
|
270
|
+
def get_report_data_set_page_with_http_info(dataset_uuid, page_number, opts = {})
|
271
|
+
if @api_client.config.debugging
|
272
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_report_data_set_page ...'
|
273
|
+
end
|
274
|
+
# verify the required parameter 'dataset_uuid' is set
|
275
|
+
if @api_client.config.client_side_validation && dataset_uuid.nil?
|
276
|
+
fail ArgumentError, "Missing the required parameter 'dataset_uuid' when calling DatawarehouseApi.get_report_data_set_page"
|
277
|
+
end
|
278
|
+
# verify the required parameter 'page_number' is set
|
279
|
+
if @api_client.config.client_side_validation && page_number.nil?
|
280
|
+
fail ArgumentError, "Missing the required parameter 'page_number' when calling DatawarehouseApi.get_report_data_set_page"
|
281
|
+
end
|
282
|
+
# resource path
|
283
|
+
local_var_path = '/datawarehouse/reports/dataset/{dataset_uuid}/pages/{page_number}'.sub('{' + 'dataset_uuid' + '}', dataset_uuid.to_s).sub('{' + 'page_number' + '}', page_number.to_s)
|
284
|
+
|
285
|
+
# query parameters
|
286
|
+
query_params = {}
|
287
|
+
|
288
|
+
# header parameters
|
289
|
+
header_params = {}
|
290
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
291
|
+
# HTTP header 'Accept' (if needed)
|
292
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
293
|
+
# HTTP header 'Content-Type'
|
294
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
295
|
+
|
296
|
+
# form parameters
|
297
|
+
form_params = {}
|
298
|
+
|
299
|
+
# http body (model)
|
300
|
+
post_body = nil
|
301
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
302
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
303
|
+
:header_params => header_params,
|
304
|
+
:query_params => query_params,
|
305
|
+
:form_params => form_params,
|
306
|
+
:body => post_body,
|
307
|
+
:auth_names => auth_names,
|
308
|
+
:return_type => 'ReportDataSetPageResponse')
|
309
|
+
if @api_client.config.debugging
|
310
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_report_data_set_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
311
|
+
end
|
312
|
+
return data, status_code, headers
|
313
|
+
end
|
314
|
+
# Get report websocket authorization
|
315
|
+
# Retrieve a JWT to authorize a report to make a websocket connection.
|
316
|
+
# @param [Hash] opts the optional parameters
|
317
|
+
# @return [ReportAuthResponse]
|
318
|
+
def get_report_websocket_authorization(opts = {})
|
319
|
+
data, _status_code, _headers = get_report_websocket_authorization_with_http_info(opts)
|
320
|
+
data
|
321
|
+
end
|
322
|
+
|
323
|
+
# Get report websocket authorization
|
324
|
+
# Retrieve a JWT to authorize a report to make a websocket connection.
|
325
|
+
# @param [Hash] opts the optional parameters
|
326
|
+
# @return [Array<(ReportAuthResponse, Fixnum, Hash)>] ReportAuthResponse data, response status code and response headers
|
327
|
+
def get_report_websocket_authorization_with_http_info(opts = {})
|
328
|
+
if @api_client.config.debugging
|
329
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_report_websocket_authorization ...'
|
330
|
+
end
|
331
|
+
# resource path
|
332
|
+
local_var_path = '/datawarehouse/reports/auth'
|
333
|
+
|
334
|
+
# query parameters
|
335
|
+
query_params = {}
|
336
|
+
|
337
|
+
# header parameters
|
338
|
+
header_params = {}
|
339
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
340
|
+
# HTTP header 'Accept' (if needed)
|
341
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
342
|
+
# HTTP header 'Content-Type'
|
343
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
344
|
+
|
345
|
+
# form parameters
|
346
|
+
form_params = {}
|
347
|
+
|
348
|
+
# http body (model)
|
349
|
+
post_body = nil
|
350
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
351
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
352
|
+
:header_params => header_params,
|
353
|
+
:query_params => query_params,
|
354
|
+
:form_params => form_params,
|
355
|
+
:body => post_body,
|
356
|
+
:auth_names => auth_names,
|
357
|
+
:return_type => 'ReportAuthResponse')
|
358
|
+
if @api_client.config.debugging
|
359
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_report_websocket_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
360
|
+
end
|
361
|
+
return data, status_code, headers
|
362
|
+
end
|
363
|
+
# Get list of reports available
|
364
|
+
# Retrieve a list of reports available
|
365
|
+
# @param [Hash] opts the optional parameters
|
366
|
+
# @return [ReportsResponse]
|
367
|
+
def get_reports(opts = {})
|
368
|
+
data, _status_code, _headers = get_reports_with_http_info(opts)
|
369
|
+
data
|
370
|
+
end
|
371
|
+
|
372
|
+
# Get list of reports available
|
373
|
+
# Retrieve a list of reports available
|
374
|
+
# @param [Hash] opts the optional parameters
|
375
|
+
# @return [Array<(ReportsResponse, Fixnum, Hash)>] ReportsResponse data, response status code and response headers
|
376
|
+
def get_reports_with_http_info(opts = {})
|
377
|
+
if @api_client.config.debugging
|
378
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_reports ...'
|
379
|
+
end
|
380
|
+
# resource path
|
381
|
+
local_var_path = '/datawarehouse/reports'
|
382
|
+
|
383
|
+
# query parameters
|
384
|
+
query_params = {}
|
385
|
+
|
386
|
+
# header parameters
|
387
|
+
header_params = {}
|
388
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
389
|
+
# HTTP header 'Accept' (if needed)
|
390
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
391
|
+
# HTTP header 'Content-Type'
|
392
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
393
|
+
|
394
|
+
# form parameters
|
395
|
+
form_params = {}
|
396
|
+
|
397
|
+
# http body (model)
|
398
|
+
post_body = nil
|
399
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
400
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
401
|
+
:header_params => header_params,
|
402
|
+
:query_params => query_params,
|
403
|
+
:form_params => form_params,
|
404
|
+
:body => post_body,
|
405
|
+
:auth_names => auth_names,
|
406
|
+
:return_type => 'ReportsResponse')
|
407
|
+
if @api_client.config.debugging
|
408
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
409
|
+
end
|
410
|
+
return data, status_code, headers
|
411
|
+
end
|
412
|
+
# Create a report
|
413
|
+
# Create a new report on the UltraCart account.
|
414
|
+
# @param report Report to create
|
415
|
+
# @param [Hash] opts the optional parameters
|
416
|
+
# @return [ReportResponse]
|
417
|
+
def insert_report(report, opts = {})
|
418
|
+
data, _status_code, _headers = insert_report_with_http_info(report, opts)
|
419
|
+
data
|
420
|
+
end
|
421
|
+
|
422
|
+
# Create a report
|
423
|
+
# Create a new report on the UltraCart account.
|
424
|
+
# @param report Report to create
|
425
|
+
# @param [Hash] opts the optional parameters
|
426
|
+
# @return [Array<(ReportResponse, Fixnum, Hash)>] ReportResponse data, response status code and response headers
|
427
|
+
def insert_report_with_http_info(report, opts = {})
|
428
|
+
if @api_client.config.debugging
|
429
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.insert_report ...'
|
430
|
+
end
|
431
|
+
# verify the required parameter 'report' is set
|
432
|
+
if @api_client.config.client_side_validation && report.nil?
|
433
|
+
fail ArgumentError, "Missing the required parameter 'report' when calling DatawarehouseApi.insert_report"
|
434
|
+
end
|
435
|
+
# resource path
|
436
|
+
local_var_path = '/datawarehouse/reports'
|
437
|
+
|
438
|
+
# query parameters
|
439
|
+
query_params = {}
|
440
|
+
|
441
|
+
# header parameters
|
442
|
+
header_params = {}
|
443
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
444
|
+
# HTTP header 'Accept' (if needed)
|
445
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
446
|
+
# HTTP header 'Content-Type'
|
447
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
448
|
+
|
449
|
+
# form parameters
|
450
|
+
form_params = {}
|
451
|
+
|
452
|
+
# http body (model)
|
453
|
+
post_body = @api_client.object_to_http_body(report)
|
454
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
455
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
456
|
+
:header_params => header_params,
|
457
|
+
:query_params => query_params,
|
458
|
+
:form_params => form_params,
|
459
|
+
:body => post_body,
|
460
|
+
:auth_names => auth_names,
|
461
|
+
:return_type => 'ReportResponse')
|
462
|
+
if @api_client.config.debugging
|
463
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#insert_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
464
|
+
end
|
465
|
+
return data, status_code, headers
|
466
|
+
end
|
467
|
+
# Update a report
|
468
|
+
# Update a report on the UltraCart account.
|
469
|
+
# @param report Report to update
|
470
|
+
# @param report_oid The report oid to update.
|
471
|
+
# @param [Hash] opts the optional parameters
|
472
|
+
# @return [ReportResponse]
|
473
|
+
def update_report(report, report_oid, opts = {})
|
474
|
+
data, _status_code, _headers = update_report_with_http_info(report, report_oid, opts)
|
475
|
+
data
|
476
|
+
end
|
477
|
+
|
478
|
+
# Update a report
|
479
|
+
# Update a report on the UltraCart account.
|
480
|
+
# @param report Report to update
|
481
|
+
# @param report_oid The report oid to update.
|
482
|
+
# @param [Hash] opts the optional parameters
|
483
|
+
# @return [Array<(ReportResponse, Fixnum, Hash)>] ReportResponse data, response status code and response headers
|
484
|
+
def update_report_with_http_info(report, report_oid, opts = {})
|
485
|
+
if @api_client.config.debugging
|
486
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.update_report ...'
|
487
|
+
end
|
488
|
+
# verify the required parameter 'report' is set
|
489
|
+
if @api_client.config.client_side_validation && report.nil?
|
490
|
+
fail ArgumentError, "Missing the required parameter 'report' when calling DatawarehouseApi.update_report"
|
491
|
+
end
|
492
|
+
# verify the required parameter 'report_oid' is set
|
493
|
+
if @api_client.config.client_side_validation && report_oid.nil?
|
494
|
+
fail ArgumentError, "Missing the required parameter 'report_oid' when calling DatawarehouseApi.update_report"
|
495
|
+
end
|
496
|
+
# resource path
|
497
|
+
local_var_path = '/datawarehouse/reports/{report_oid}'.sub('{' + 'report_oid' + '}', report_oid.to_s)
|
498
|
+
|
499
|
+
# query parameters
|
500
|
+
query_params = {}
|
501
|
+
|
502
|
+
# header parameters
|
503
|
+
header_params = {}
|
504
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
505
|
+
# HTTP header 'Accept' (if needed)
|
506
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
507
|
+
# HTTP header 'Content-Type'
|
508
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
509
|
+
|
510
|
+
# form parameters
|
511
|
+
form_params = {}
|
512
|
+
|
513
|
+
# http body (model)
|
514
|
+
post_body = @api_client.object_to_http_body(report)
|
515
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
516
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
517
|
+
:header_params => header_params,
|
518
|
+
:query_params => query_params,
|
519
|
+
:form_params => form_params,
|
520
|
+
:body => post_body,
|
521
|
+
:auth_names => auth_names,
|
522
|
+
:return_type => 'ReportResponse')
|
523
|
+
if @api_client.config.debugging
|
524
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#update_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
525
|
+
end
|
526
|
+
return data, status_code, headers
|
527
|
+
end
|
528
|
+
end
|
529
|
+
end
|
@@ -25,6 +25,9 @@ module UltracartClient
|
|
25
25
|
# Return codes available at the item level.
|
26
26
|
attr_accessor :item_level_return_reasons
|
27
27
|
|
28
|
+
# If true, this refund will have to be manually done because of additional charges with the virtual terminal were made
|
29
|
+
attr_accessor :manual_because_multiple_charges
|
30
|
+
|
28
31
|
attr_accessor :metadata
|
29
32
|
|
30
33
|
# True if the order level refund reason is required
|
@@ -51,6 +54,7 @@ module UltracartClient
|
|
51
54
|
:'item_level_refund_reason_required' => :'item_level_refund_reason_required',
|
52
55
|
:'item_level_refund_reasons' => :'item_level_refund_reasons',
|
53
56
|
:'item_level_return_reasons' => :'item_level_return_reasons',
|
57
|
+
:'manual_because_multiple_charges' => :'manual_because_multiple_charges',
|
54
58
|
:'metadata' => :'metadata',
|
55
59
|
:'order_level_refund_reason_required' => :'order_level_refund_reason_required',
|
56
60
|
:'order_level_refund_reasons' => :'order_level_refund_reasons',
|
@@ -68,6 +72,7 @@ module UltracartClient
|
|
68
72
|
:'item_level_refund_reason_required' => :'BOOLEAN',
|
69
73
|
:'item_level_refund_reasons' => :'Array<OrderReason>',
|
70
74
|
:'item_level_return_reasons' => :'Array<OrderReason>',
|
75
|
+
:'manual_because_multiple_charges' => :'BOOLEAN',
|
71
76
|
:'metadata' => :'ResponseMetadata',
|
72
77
|
:'order_level_refund_reason_required' => :'BOOLEAN',
|
73
78
|
:'order_level_refund_reasons' => :'Array<OrderReason>',
|
@@ -106,6 +111,10 @@ module UltracartClient
|
|
106
111
|
end
|
107
112
|
end
|
108
113
|
|
114
|
+
if attributes.has_key?(:'manual_because_multiple_charges')
|
115
|
+
self.manual_because_multiple_charges = attributes[:'manual_because_multiple_charges']
|
116
|
+
end
|
117
|
+
|
109
118
|
if attributes.has_key?(:'metadata')
|
110
119
|
self.metadata = attributes[:'metadata']
|
111
120
|
end
|
@@ -161,6 +170,7 @@ module UltracartClient
|
|
161
170
|
item_level_refund_reason_required == o.item_level_refund_reason_required &&
|
162
171
|
item_level_refund_reasons == o.item_level_refund_reasons &&
|
163
172
|
item_level_return_reasons == o.item_level_return_reasons &&
|
173
|
+
manual_because_multiple_charges == o.manual_because_multiple_charges &&
|
164
174
|
metadata == o.metadata &&
|
165
175
|
order_level_refund_reason_required == o.order_level_refund_reason_required &&
|
166
176
|
order_level_refund_reasons == o.order_level_refund_reasons &&
|
@@ -179,7 +189,7 @@ module UltracartClient
|
|
179
189
|
# Calculates hash code according to all attributes.
|
180
190
|
# @return [Fixnum] Hash code
|
181
191
|
def hash
|
182
|
-
[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
|
192
|
+
[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
|
183
193
|
end
|
184
194
|
|
185
195
|
# Builds the object from hash
|