Class: WhopSDK::Resources::AdReports
- Inherits:
-
Object
- Object
- WhopSDK::Resources::AdReports
- Defined in:
- lib/whop_sdk/resources/ad_reports.rb
Overview
Ad reports
Instance Method Summary collapse
-
#initialize(client:) ⇒ AdReports
constructor
private
A new instance of AdReports.
-
#retrieve(from:, to:, ad_campaign_id: nil, ad_group_id: nil, ad_id: nil, breakdown: nil, company_id: nil, currency: nil, granularity: nil, request_options: {}) ⇒ WhopSDK::Models::AdReportRetrieveResponse
Some parameter documentations has been truncated, see Models::AdReportRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ AdReports
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of AdReports.
60 61 62 |
# File 'lib/whop_sdk/resources/ad_reports.rb', line 60 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(from:, to:, ad_campaign_id: nil, ad_group_id: nil, ad_id: nil, breakdown: nil, company_id: nil, currency: nil, granularity: nil, request_options: {}) ⇒ WhopSDK::Models::AdReportRetrieveResponse
Some parameter documentations has been truncated, see Models::AdReportRetrieveParams for more details.
Performance report for a company, ad campaign, ad group, or ad. Always returns aggregate ‘summary` totals. Set `granularity` (`daily`/`hourly`) to additionally get a time series, or set `breakdown` (`campaign`/`ad_group`/`ad`) to additionally get per-entity rows inside the requested scope. Exactly one of `companyId`, `adCampaignId`, `adGroupId`, or `adId` must be provided.
Required permissions:
-
‘ad_campaign:stats:read`
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/whop_sdk/resources/ad_reports.rb', line 45 def retrieve(params) parsed, = WhopSDK::AdReportRetrieveParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "ad_reports", query: query, model: WhopSDK::Models::AdReportRetrieveResponse, options: ) end |