Class: AmzSpApi::ReportsApiModel::ReportsApi
- Inherits:
-
Object
- Object
- AmzSpApi::ReportsApiModel::ReportsApi
- Defined in:
- lib/reports-api-model/api/reports_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#cancel_report(report_id, opts = {}) ⇒ nil
Cancels the report that you specify.
-
#cancel_report_schedule(report_schedule_id, opts = {}) ⇒ nil
Cancels the report schedule that you specify.
-
#cancel_report_schedule_with_http_info(report_schedule_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Cancels the report schedule that you specify.
-
#cancel_report_with_http_info(report_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Cancels the report that you specify.
-
#create_report(body, opts = {}) ⇒ CreateReportResponse
Creates a report.
-
#create_report_schedule(body, opts = {}) ⇒ CreateReportScheduleResponse
Creates a report schedule.
-
#create_report_schedule_with_http_info(body, opts = {}) ⇒ Array<(CreateReportScheduleResponse, Integer, Hash)>
Creates a report schedule.
-
#create_report_with_http_info(body, opts = {}) ⇒ Array<(CreateReportResponse, Integer, Hash)>
Creates a report.
-
#get_report(report_id, opts = {}) ⇒ Report
Returns report details (including the reportDocumentId, if available) for the report that you specify.
-
#get_report_document(report_document_id, opts = {}) ⇒ ReportDocument
Returns the information required for retrieving a report document’s contents.
-
#get_report_document_with_http_info(report_document_id, opts = {}) ⇒ Array<(ReportDocument, Integer, Hash)>
Returns the information required for retrieving a report document's contents.
-
#get_report_schedule(report_schedule_id, opts = {}) ⇒ ReportSchedule
Returns report schedule details for the report schedule that you specify.
-
#get_report_schedule_with_http_info(report_schedule_id, opts = {}) ⇒ Array<(ReportSchedule, Integer, Hash)>
Returns report schedule details for the report schedule that you specify.
-
#get_report_schedules(report_types, opts = {}) ⇒ ReportScheduleList
Returns report schedule details that match the filters that you specify.
-
#get_report_schedules_with_http_info(report_types, opts = {}) ⇒ Array<(ReportScheduleList, Integer, Hash)>
Returns report schedule details that match the filters that you specify.
-
#get_report_with_http_info(report_id, opts = {}) ⇒ Array<(Report, Integer, Hash)>
Returns report details (including the reportDocumentId, if available) for the report that you specify.
-
#get_reports(opts = {}) ⇒ GetReportsResponse
Returns report details for the reports that match the filters that you specify.
-
#get_reports_with_http_info(opts = {}) ⇒ Array<(GetReportsResponse, Integer, Hash)>
Returns report details for the reports that match the filters that you specify.
-
#initialize(api_client = ApiClient.default) ⇒ ReportsApi
constructor
A new instance of ReportsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ReportsApi
Returns a new instance of ReportsApi.
16 17 18 |
# File 'lib/reports-api-model/api/reports_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/reports-api-model/api/reports_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#cancel_report(report_id, opts = {}) ⇒ nil
Cancels the report that you specify. Only reports with processingStatus=IN_QUEUE can be cancelled. Cancelled reports are returned in subsequent calls to the getReport and getReports operations. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
23 24 25 26 |
# File 'lib/reports-api-model/api/reports_api.rb', line 23 def cancel_report(report_id, opts = {}) cancel_report_with_http_info(report_id, opts) nil end |
#cancel_report_schedule(report_schedule_id, opts = {}) ⇒ nil
Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
77 78 79 80 |
# File 'lib/reports-api-model/api/reports_api.rb', line 77 def cancel_report_schedule(report_schedule_id, opts = {}) cancel_report_schedule_with_http_info(report_schedule_id, opts) nil end |
#cancel_report_schedule_with_http_info(report_schedule_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/reports-api-model/api/reports_api.rb', line 86 def cancel_report_schedule_with_http_info(report_schedule_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.cancel_report_schedule ...' end # verify the required parameter 'report_schedule_id' is set if @api_client.config.client_side_validation && report_schedule_id.nil? fail ArgumentError, "Missing the required parameter 'report_schedule_id' when calling ReportsApi.cancel_report_schedule" end # resource path local_var_path = '/reports/2021-06-30/schedules/{reportScheduleId}'.sub('{' + 'reportScheduleId' + '}', report_schedule_id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#cancel_report_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#cancel_report_with_http_info(report_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Cancels the report that you specify. Only reports with processingStatus=IN_QUEUE can be cancelled. Cancelled reports are returned in subsequent calls to the getReport and getReports operations. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/reports-api-model/api/reports_api.rb', line 32 def cancel_report_with_http_info(report_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.cancel_report ...' end # verify the required parameter 'report_id' is set if @api_client.config.client_side_validation && report_id.nil? fail ArgumentError, "Missing the required parameter 'report_id' when calling ReportsApi.cancel_report" end # resource path local_var_path = '/reports/2021-06-30/reports/{reportId}'.sub('{' + 'reportId' + '}', report_id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#cancel_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_report(body, opts = {}) ⇒ CreateReportResponse
Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 15 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
131 132 133 134 |
# File 'lib/reports-api-model/api/reports_api.rb', line 131 def create_report(body, opts = {}) data, _status_code, _headers = create_report_with_http_info(body, opts) data end |
#create_report_schedule(body, opts = {}) ⇒ CreateReportScheduleResponse
Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
187 188 189 190 |
# File 'lib/reports-api-model/api/reports_api.rb', line 187 def create_report_schedule(body, opts = {}) data, _status_code, _headers = create_report_schedule_with_http_info(body, opts) data end |
#create_report_schedule_with_http_info(body, opts = {}) ⇒ Array<(CreateReportScheduleResponse, Integer, Hash)>
Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/reports-api-model/api/reports_api.rb', line 196 def create_report_schedule_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.create_report_schedule ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling ReportsApi.create_report_schedule" end # resource path local_var_path = '/reports/2021-06-30/schedules' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'CreateReportScheduleResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#create_report_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_report_with_http_info(body, opts = {}) ⇒ Array<(CreateReportResponse, Integer, Hash)>
Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 15 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/reports-api-model/api/reports_api.rb', line 140 def create_report_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.create_report ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling ReportsApi.create_report" end # resource path local_var_path = '/reports/2021-06-30/reports' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'CreateReportResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#create_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_report(report_id, opts = {}) ⇒ Report
Returns report details (including the reportDocumentId, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 2.0 | 15 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
243 244 245 246 |
# File 'lib/reports-api-model/api/reports_api.rb', line 243 def get_report(report_id, opts = {}) data, _status_code, _headers = get_report_with_http_info(report_id, opts) data end |
#get_report_document(report_document_id, opts = {}) ⇒ ReportDocument
Returns the information required for retrieving a report document’s contents. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 15 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
297 298 299 300 |
# File 'lib/reports-api-model/api/reports_api.rb', line 297 def get_report_document(report_document_id, opts = {}) data, _status_code, _headers = get_report_document_with_http_info(report_document_id, opts) data end |
#get_report_document_with_http_info(report_document_id, opts = {}) ⇒ Array<(ReportDocument, Integer, Hash)>
Returns the information required for retrieving a report document's contents. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 15 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/reports-api-model/api/reports_api.rb', line 306 def get_report_document_with_http_info(report_document_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.get_report_document ...' end # verify the required parameter 'report_document_id' is set if @api_client.config.client_side_validation && report_document_id.nil? fail ArgumentError, "Missing the required parameter 'report_document_id' when calling ReportsApi.get_report_document" end # resource path local_var_path = '/reports/2021-06-30/documents/{reportDocumentId}'.sub('{' + 'reportDocumentId' + '}', report_document_id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'ReportDocument' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#get_report_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_report_schedule(report_schedule_id, opts = {}) ⇒ ReportSchedule
Returns report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
351 352 353 354 |
# File 'lib/reports-api-model/api/reports_api.rb', line 351 def get_report_schedule(report_schedule_id, opts = {}) data, _status_code, _headers = get_report_schedule_with_http_info(report_schedule_id, opts) data end |
#get_report_schedule_with_http_info(report_schedule_id, opts = {}) ⇒ Array<(ReportSchedule, Integer, Hash)>
Returns report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/reports-api-model/api/reports_api.rb', line 360 def get_report_schedule_with_http_info(report_schedule_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.get_report_schedule ...' end # verify the required parameter 'report_schedule_id' is set if @api_client.config.client_side_validation && report_schedule_id.nil? fail ArgumentError, "Missing the required parameter 'report_schedule_id' when calling ReportsApi.get_report_schedule" end # resource path local_var_path = '/reports/2021-06-30/schedules/{reportScheduleId}'.sub('{' + 'reportScheduleId' + '}', report_schedule_id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'ReportSchedule' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#get_report_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_report_schedules(report_types, opts = {}) ⇒ ReportScheduleList
Returns report schedule details that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
405 406 407 408 |
# File 'lib/reports-api-model/api/reports_api.rb', line 405 def get_report_schedules(report_types, opts = {}) data, _status_code, _headers = get_report_schedules_with_http_info(report_types, opts) data end |
#get_report_schedules_with_http_info(report_types, opts = {}) ⇒ Array<(ReportScheduleList, Integer, Hash)>
Returns report schedule details that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
# File 'lib/reports-api-model/api/reports_api.rb', line 414 def get_report_schedules_with_http_info(report_types, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.get_report_schedules ...' end # verify the required parameter 'report_types' is set if @api_client.config.client_side_validation && report_types.nil? fail ArgumentError, "Missing the required parameter 'report_types' when calling ReportsApi.get_report_schedules" end # resource path local_var_path = '/reports/2021-06-30/schedules' # query parameters query_params = opts[:query_params] || {} query_params[:'reportTypes'] = @api_client.build_collection_param(report_types, :csv) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'ReportScheduleList' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#get_report_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_report_with_http_info(report_id, opts = {}) ⇒ Array<(Report, Integer, Hash)>
Returns report details (including the reportDocumentId, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 2.0 | 15 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/reports-api-model/api/reports_api.rb', line 252 def get_report_with_http_info(report_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.get_report ...' end # verify the required parameter 'report_id' is set if @api_client.config.client_side_validation && report_id.nil? fail ArgumentError, "Missing the required parameter 'report_id' when calling ReportsApi.get_report" end # resource path local_var_path = '/reports/2021-06-30/reports/{reportId}'.sub('{' + 'reportId' + '}', report_id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Report' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#get_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_reports(opts = {}) ⇒ GetReportsResponse
Returns report details for the reports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
466 467 468 469 |
# File 'lib/reports-api-model/api/reports_api.rb', line 466 def get_reports(opts = {}) data, _status_code, _headers = get_reports_with_http_info(opts) data end |
#get_reports_with_http_info(opts = {}) ⇒ Array<(GetReportsResponse, Integer, Hash)>
Returns report details for the reports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0222 | 10 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 |
# File 'lib/reports-api-model/api/reports_api.rb', line 481 def get_reports_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.get_reports ...' end if @api_client.config.client_side_validation && opts[:'processing_statuses'] && !opts[:'processing_statuses'].all? { |item| ['CANCELLED', 'DONE', 'FATAL', 'IN_PROGRESS', 'IN_QUEUE'].include?(item) } fail ArgumentError, 'invalid value for "processing_statuses", must include one of CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE' end # resource path local_var_path = '/reports/2021-06-30/reports' # query parameters query_params = opts[:query_params] || {} query_params[:'reportTypes'] = @api_client.build_collection_param(opts[:'report_types'], :csv) if !opts[:'report_types'].nil? query_params[:'processingStatuses'] = @api_client.build_collection_param(opts[:'processing_statuses'], :csv) if !opts[:'processing_statuses'].nil? query_params[:'marketplaceIds'] = @api_client.build_collection_param(opts[:'marketplace_ids'], :csv) if !opts[:'marketplace_ids'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'createdSince'] = opts[:'created_since'] if !opts[:'created_since'].nil? query_params[:'createdUntil'] = opts[:'created_until'] if !opts[:'created_until'].nil? query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'GetReportsResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#get_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |