Class: WhopSDK::Models::AdReportRetrieveResponse::Breakdown
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::AdReportRetrieveResponse::Breakdown
- Defined in:
- lib/whop_sdk/models/ad_report_retrieve_response.rb
Defined Under Namespace
Modules: Level Classes: Granularity, Summary
Instance Attribute Summary collapse
-
#granularity ⇒ Array<WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity>?
Per-bucket time series for this entity over the date range, ordered ascending by ‘bucketStart`.
-
#id ⇒ String
Tag of the entity (ad campaign, ad group, or ad).
-
#level ⇒ Symbol, WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level
The entity level of this row — matches the ‘breakdown` arg.
-
#name ⇒ String?
Display name of the entity, when available.
-
#summary ⇒ WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary
Aggregate totals and rates for this entity over the date range.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bucket_start:, clicks:, granularity:, impressions:, reach:, result_count:, result_label_key:, result_label_override:, spend:, spend_currency:, stat_date:, stat_hour:) ⇒ Object
constructor
Some parameter documentations has been truncated, see Granularity for more details.
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.
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 73 74 75 76 77 78 79 80 81 82 83 84 85 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 127 128 129 130 131 132 133 134 135 136 137 138 139 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 183 184 185 186 187 188 189 190 191 192 193 194 195 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 239 240 241 242 243 244 245 246 247 248 249 250 251 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 293 294 295 296 297 298 299 300 301 302 303 304 305 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 347 348 |
# File 'lib/whop_sdk/models/ad_report_retrieve_response.rb', line 47 class Breakdown < WhopSDK::Internal::Type::BaseModel # @!attribute id # Tag of the entity (ad campaign, ad group, or ad). # # @return [String] required :id, String # @!attribute granularity # Per-bucket time series for this entity 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`). # # @return [Array<WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity>, nil] required :granularity, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity] }, nil?: true # @!attribute level # The entity level of this row — matches the `breakdown` arg. # # @return [Symbol, WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level] required :level, enum: -> { WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level } # @!attribute name # Display name of the entity, when available. # # @return [String, nil] required :name, String, nil?: true # @!attribute summary # Aggregate totals and rates for this entity over the date range. # # @return [WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary] required :summary, -> { WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary } # @!method initialize(id:, granularity:, level:, name:, summary:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::AdReportRetrieveResponse::Breakdown} for more details. # # Per-entity ad performance row. Returned when the `breakdown` arg on `adReport` # is set. # # @param id [String] Tag of the entity (ad campaign, ad group, or ad). # # @param granularity [Array<WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity>, nil] Per-bucket time series for this entity over the date range, ordered ascending by # # @param level [Symbol, WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level] The entity level of this row — matches the `breakdown` arg. # # @param name [String, nil] Display name of the entity, when available. # # @param summary [WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary] Aggregate totals and rates for this entity over the date range. class Granularity < WhopSDK::Internal::Type::BaseModel # @!attribute bucket_start # The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved # in the ad account's reporting timezone — render this in the viewer's local # timezone. # # @return [Time] required :bucket_start, Time # @!attribute clicks # Clicks in this bucket. # # @return [Integer] required :clicks, Integer # @!attribute granularity # The bucket size of this row (`daily` or `hourly`). # # @return [Symbol, WhopSDK::Models::Granularities] required :granularity, enum: -> { WhopSDK::Granularities } # @!attribute impressions # Impressions in this bucket. # # @return [Integer] required :impressions, Integer # @!attribute reach # Unique users reached in this bucket. Always `0` for hourly rows (Meta does not # return reach at hourly grain). # # @return [Integer] required :reach, Integer # @!attribute result_count # Count of the primary optimization result in this bucket. # # @return [Integer, nil] required :result_count, Integer, nil?: true # @!attribute result_label_key # Types of optimization results tracked from external ad platforms # # @return [Symbol, WhopSDK::Models::ResultLabelKeys, nil] required :result_label_key, enum: -> { WhopSDK::ResultLabelKeys }, nil?: true # @!attribute result_label_override # Advertiser-defined label for the result when `resultLabelKey` is `custom`. # # @return [String, nil] required :result_label_override, String, nil?: true # @!attribute spend # Charged spend in this bucket in the requested reporting currency — the amount # billed including platform fees, not the platform-side net spend. # # @return [Float] required :spend, Float # @!attribute spend_currency # Currency of the `spend` value. # # @return [Symbol, WhopSDK::Models::Currency] required :spend_currency, enum: -> { WhopSDK::Currency } # @!attribute stat_date # The date these stats cover (midnight UTC). For hourly rows, see `statHour` and # `bucketStart`. # # @return [Time] required :stat_date, Time # @!attribute stat_hour # Hour of the day in the ad account's reporting timezone (0-23). `null` for daily # rows. # # @return [Integer, nil] required :stat_hour, Integer, nil?: true # @!method initialize(bucket_start:, clicks:, granularity:, impressions:, reach:, result_count:, result_label_key:, result_label_override:, spend:, spend_currency:, stat_date:, stat_hour:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::AdReportRetrieveResponse::Breakdown::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. # # @param bucket_start [Time] The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved i # # @param clicks [Integer] Clicks in this bucket. # # @param granularity [Symbol, WhopSDK::Models::Granularities] The bucket size of this row (`daily` or `hourly`). # # @param impressions [Integer] Impressions in this bucket. # # @param reach [Integer] Unique users reached in this bucket. Always `0` for hourly rows (Meta does not r # # @param result_count [Integer, nil] Count of the primary optimization result in this bucket. # # @param result_label_key [Symbol, WhopSDK::Models::ResultLabelKeys, nil] Types of optimization results tracked from external ad platforms # # @param result_label_override [String, nil] Advertiser-defined label for the result when `resultLabelKey` is `custom`. # # @param spend [Float] Charged spend in this bucket in the requested reporting currency — the amount bi # # @param spend_currency [Symbol, WhopSDK::Models::Currency] Currency of the `spend` value. # # @param stat_date [Time] The date these stats cover (midnight UTC). For hourly rows, see `statHour` and ` # # @param stat_hour [Integer, nil] Hour of the day in the ad account's reporting timezone (0-23). `null` for daily end # The entity level of this row — matches the `breakdown` arg. # # @see WhopSDK::Models::AdReportRetrieveResponse::Breakdown#level module Level extend WhopSDK::Internal::Type::Enum CAMPAIGN = :campaign AD_GROUP = :ad_group AD = :ad # @!method self.values # @return [Array<Symbol>] end # @see WhopSDK::Models::AdReportRetrieveResponse::Breakdown#summary class Summary < WhopSDK::Internal::Type::BaseModel # @!attribute clicks # Total clicks over the date range. # # @return [Integer] required :clicks, Integer # @!attribute cost_per_result # Spend divided by `resultCount`. Null when there are no results. # # @return [Float, nil] required :cost_per_result, Float, nil?: true # @!attribute cpc # Cost per click in the requested reporting currency. # # @return [Float] required :cpc, Float # @!attribute cpm # Cost per thousand impressions in the requested reporting currency. # # @return [Float, nil] required :cpm, Float, nil?: true # @!attribute ctr # Click-through rate (clicks / impressions). # # @return [Float] required :ctr, Float # @!attribute frequency # Average number of times each reached user saw an ad. # # @return [Float, nil] required :frequency, Float, nil?: true # @!attribute impressions # Total impressions over the date range. # # @return [Integer] required :impressions, Integer # @!attribute reach # Unique users reached, deduplicated by the external ad platform. # # @return [Integer] required :reach, Integer # @!attribute result_count # Count of the campaign's primary optimization result (purchases, clicks, etc.) — # see `resultLabelKey`. # # @return [Integer, nil] required :result_count, Integer, nil?: true # @!attribute result_label_key # Types of optimization results tracked from external ad platforms # # @return [Symbol, WhopSDK::Models::ResultLabelKeys, nil] required :result_label_key, enum: -> { WhopSDK::ResultLabelKeys }, nil?: true # @!attribute result_label_override # Advertiser-defined label for the result when `resultLabelKey` is `custom`. # # @return [String, nil] required :result_label_override, String, nil?: true # @!attribute roas # Alias for `purchaseRoas` — return on ad spend for purchases, as reported by the # external ad platform. # # @return [Float, nil] required :roas, Float, nil?: true # @!attribute spend # Total spend over the date range in the requested reporting currency. # # @return [Float] required :spend, Float # @!attribute spend_currency # The available currencies on the platform # # @return [Symbol, WhopSDK::Models::Currency, nil] required :spend_currency, enum: -> { WhopSDK::Currency }, nil?: true # @!method initialize(clicks:, cost_per_result:, cpc:, cpm:, ctr:, frequency:, impressions:, reach:, result_count:, result_label_key:, result_label_override:, roas:, spend:, spend_currency:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary} for more # details. # # Aggregate totals and rates for this entity over the date range. # # @param clicks [Integer] Total clicks over the date range. # # @param cost_per_result [Float, nil] Spend divided by `resultCount`. Null when there are no results. # # @param cpc [Float] Cost per click in the requested reporting currency. # # @param cpm [Float, nil] Cost per thousand impressions in the requested reporting currency. # # @param ctr [Float] Click-through rate (clicks / impressions). # # @param frequency [Float, nil] Average number of times each reached user saw an ad. # # @param impressions [Integer] Total impressions over the date range. # # @param reach [Integer] Unique users reached, deduplicated by the external ad platform. # # @param result_count [Integer, nil] Count of the campaign's primary optimization result (purchases, clicks, etc.) — # # @param result_label_key [Symbol, WhopSDK::Models::ResultLabelKeys, nil] Types of optimization results tracked from external ad platforms # # @param result_label_override [String, nil] Advertiser-defined label for the result when `resultLabelKey` is `custom`. # # @param roas [Float, nil] Alias for `purchaseRoas` — return on ad spend for purchases, as reported by the # # @param spend [Float] Total spend over the date range in the requested reporting currency. # # @param spend_currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform end end |
Instance Attribute Details
#granularity ⇒ Array<WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity>?
Per-bucket time series for this entity 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`).
60 61 62 |
# File 'lib/whop_sdk/models/ad_report_retrieve_response.rb', line 60 required :granularity, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity] }, nil?: true |
#id ⇒ String
Tag of the entity (ad campaign, ad group, or ad).
52 |
# File 'lib/whop_sdk/models/ad_report_retrieve_response.rb', line 52 required :id, String |
#level ⇒ Symbol, WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level
The entity level of this row — matches the ‘breakdown` arg.
68 |
# File 'lib/whop_sdk/models/ad_report_retrieve_response.rb', line 68 required :level, enum: -> { WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level } |
#name ⇒ String?
Display name of the entity, when available.
74 |
# File 'lib/whop_sdk/models/ad_report_retrieve_response.rb', line 74 required :name, String, nil?: true |
#summary ⇒ WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary
Aggregate totals and rates for this entity over the date range.
80 |
# File 'lib/whop_sdk/models/ad_report_retrieve_response.rb', line 80 required :summary, -> { WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/whop_sdk/models/ad_report_retrieve_response.rb', line 221
|