Class: AmazonAds::Reporting

Inherits:
API
  • Object
show all
Defined in:
lib/amazon_ads/apis/reporting.rb

Overview

Offline Report

Constant Summary

Constants inherited from API

API::ENDPOINTS

Instance Attribute Summary

Attributes inherited from API

#access_token, #account_id, #profile_id, #region, #retries

Instance Method Summary collapse

Methods inherited from API

#endpoint, #http, #initialize

Constructor Details

This class inherits a constructor from AmazonAds::API

Instance Method Details

#create_async_report(configuration:, end_date:, start_date:, name: nil) ⇒ Object

Creates a report request

Signature:

  • (configuration: untyped, end_date: String, start_date: String, ?name: String?) -> HTTP::Response

RBS:

  • end_date: String -- YYYY-MM-DD format. The maximum lookback window supported depends on the selection of reportTypeId. Most report types support 95 days as lookback window.

  • name: String -- The name of the report.

  • start_date: String -- YYYY-MM-DD format. The maximum lookback window supported depends on the selection of reportTypeId. Most report types support 95 days as lookback window.



11
12
13
# File 'lib/amazon_ads/apis/reporting.rb', line 11

def create_async_report(configuration:, end_date:, start_date:, name: nil)
  request(:post, "/reporting/reports", json: { "configuration" => configuration, "endDate" => end_date, "name" => name, "startDate" => start_date }.compact, headers: { "Content-Type" => "application/vnd.createasyncreportrequest.v3+json" })
end

#delete_async_report(report_id) ⇒ Object

Deletes a report by id

Signature:

  • (String) -> HTTP::Response

RBS:

  • report_id: String -- The identifier of the requested report.



18
19
20
# File 'lib/amazon_ads/apis/reporting.rb', line 18

def delete_async_report(report_id)
  request(:delete, "/reporting/reports/#{report_id}")
end

#get_async_report(report_id) ⇒ Object

Gets a generation status of report by id

Signature:

  • (String) -> HTTP::Response

RBS:

  • report_id: String -- The identifier of the requested report.



25
26
27
# File 'lib/amazon_ads/apis/reporting.rb', line 25

def get_async_report(report_id)
  request(:get, "/reporting/reports/#{report_id}")
end