Class: WhopSDK::Models::AdReportRetrieveResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/ad_report_retrieve_response.rb

Overview

Defined Under Namespace

Classes: Breakdown, Granularity, Summary

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(bucket_start:, clicks:, granularity:, impressions:, reach:, result_count:, result_label_key:, result_label_override:, spend:, spend_currency:, stat_date:, stat_hour:) ⇒ Object

Some parameter documentations has been truncated, see Granularity for more details.

Per-bucket ad performance for an ad campaign, ad group, or ad. Bucket grain is set by the ‘ad_report` query’s ‘granularity` argument.

Parameters:

  • bucket_start (Time)

    The bucket’s start time as a real UTC instant. ‘(statDate, statHour)` resolved i

  • clicks (Integer)

    Clicks in this bucket.

  • granularity (Symbol, WhopSDK::Models::Granularities)

    The bucket size of this row (‘daily` or `hourly`).

  • impressions (Integer)

    Impressions in this bucket.

  • reach (Integer)

    Unique users reached in this bucket. Always ‘0` for hourly rows (Meta does not r

  • result_count (Integer, nil)

    Count of the primary optimization result in this bucket.

  • result_label_key (Symbol, WhopSDK::Models::ResultLabelKeys, nil)

    Types of optimization results tracked from external ad platforms

  • result_label_override (String, nil)

    Advertiser-defined label for the result when ‘resultLabelKey` is `custom`.

  • spend (Float)

    Charged spend in this bucket in the requested reporting currency — the amount bi

  • spend_currency (Symbol, WhopSDK::Models::Currency)

    Currency of the ‘spend` value.

  • stat_date (Time)

    The date these stats cover (midnight UTC). For hourly rows, see ‘statHour` and `

  • stat_hour (Integer, nil)

    Hour of the day in the ad account’s reporting timezone (0-23). ‘null` for daily



# File 'lib/whop_sdk/models/ad_report_retrieve_response.rb', line 313

Instance Attribute Details

#breakdownArray<WhopSDK::Models::AdReportRetrieveResponse::Breakdown>?

Per-entity rows over the date range. ‘null` when the `breakdown` arg on `adReport` is omitted; otherwise contains one row per ad campaign, ad group, or ad inside the requested scope at the requested level.



13
14
15
# File 'lib/whop_sdk/models/ad_report_retrieve_response.rb', line 13

required :breakdown,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::AdReportRetrieveResponse::Breakdown] },
nil?: true

#granularityArray<WhopSDK::Models::AdReportRetrieveResponse::Granularity>?

Per-bucket time series over the date range, ordered ascending by ‘bucketStart`. `null` when the `granularity` arg on `adReport` is omitted; otherwise contains rows at the requested grain (`daily` or `hourly`).



23
24
25
# File 'lib/whop_sdk/models/ad_report_retrieve_response.rb', line 23

required :granularity,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::AdReportRetrieveResponse::Granularity] },
nil?: true

#summaryWhopSDK::Models::AdReportRetrieveResponse::Summary

Aggregate totals and rates over the date range.



31
# File 'lib/whop_sdk/models/ad_report_retrieve_response.rb', line 31

required :summary, -> { WhopSDK::Models::AdReportRetrieveResponse::Summary }