Class: WhopSDK::Resources::AdReports
- Inherits:
-
Object
- Object
- WhopSDK::Resources::AdReports
- Defined in:
- lib/whop_sdk/resources/ad_reports.rb,
sig/whop_sdk/resources/ad_reports.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ AdReports
constructor
private
A new instance of AdReports.
-
#retrieve(from:, to:, ad_campaign_ids: nil, ad_group_ids: nil, ad_ids: 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.
59 60 61 |
# File 'lib/whop_sdk/resources/ad_reports.rb', line 59 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(from:, to:, ad_campaign_ids: nil, ad_group_ids: nil, ad_ids: 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 campaigns, ad groups, or ads. Always
returns aggregate summary totals summed across the scope. Set granularity 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, adCampaignIds, adGroupIds, or adIds must be provided.
Required permissions:
ad_campaign:stats:read
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/whop_sdk/resources/ad_reports.rb', line 44 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 |