Class: WhopSDK::Models::AdCampaign
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::AdCampaign
- Defined in:
- lib/whop_sdk/models/ad_campaign.rb,
sig/whop_sdk/models/ad_campaign.rbs
Overview
Defined Under Namespace
Modules: BidType, BudgetOptimization, BudgetType, DeliveryStatus, Objective, Platform, ResultEvent, SpecialAdCategory, Status Classes: Issue
Instance Attribute Summary collapse
-
#added_to_carts ⇒ Float
Whop pixel-attributed add-to-cart events, last-click.
-
#bid_type ⇒ Symbol, ...
The bidding strategy the campaign uses.
-
#budget_amount ⇒ Float?
The campaign budget in USD.
-
#budget_optimization ⇒ Symbol, ...
Which level owns the budget — the campaign (CBO) or each ad group (ABO).
-
#budget_type ⇒ Symbol, ...
Whether the budget is spent per day or over the campaign's lifetime.
-
#click_through_rate ⇒ Float
Clicks divided by impressions, between 0 and 1.
-
#clicks ⇒ Float
The number of clicks.
-
#completed_registrations ⇒ Float
Whop pixel-attributed complete-registration events, last-click.
-
#contacts ⇒ Float
Whop pixel-attributed contact events, last-click.
-
#cost_per_added_to_cart ⇒ Float?
Spend divided by attributed add-to-cart events; null when they are not the goal and none are attributed.
-
#cost_per_click ⇒ Float
Spend divided by clicks; 0 when there are no clicks.
-
#cost_per_completed_registration ⇒ Float?
Spend divided by attributed complete-registration events; null when they are not the goal and none are attributed.
-
#cost_per_contact ⇒ Float?
Spend divided by attributed contact events; null when contacts are not the goal and none are attributed.
-
#cost_per_lead ⇒ Float?
Spend divided by attributed leads; null when leads are not a goal and none are attributed.
-
#cost_per_mille ⇒ Float
Spend per 1,000 impressions; 0 when there are no impressions.
-
#cost_per_purchase ⇒ Float?
Spend divided by attributed purchases; null when purchases are not a goal and none are attributed.
-
#cost_per_result ⇒ Float?
Spend divided by Whop pixel-attributed results; null when nothing Whop-attributable is being optimized for.
-
#cost_per_schedule ⇒ Float?
Spend divided by attributed schedule events; null when schedules are not the goal and none are attributed.
-
#cost_per_submitted_application ⇒ Float?
Spend divided by attributed submit-application events; null when they are not the goal and none are attributed.
-
#cost_per_viewed_content ⇒ Float?
Spend divided by attributed view-content events; null when they are not the goal and none are attributed.
-
#created_at ⇒ String
When the campaign was created, as an ISO 8601 timestamp.
-
#custom_conversions ⇒ Float
Whop pixel-attributed custom (merchant-defined) conversion events, last-click, across all custom event names.
-
#custom_event_counts ⇒ Object
Whop pixel-attributed custom conversions broken out by merchant-defined event name, last-click, as a { event_name => count } map over the stats window.
-
#delivery_status ⇒ Symbol, WhopSDK::Models::AdCampaign::DeliveryStatus
The current delivery state, mirroring the Delivery column in the ads dashboard.
-
#frequency ⇒ Float?
Platform-reported impressions divided by reach.
-
#id ⇒ String
Unique identifier for the ad campaign.
-
#impressions ⇒ Float
The number of impressions.
- #issues ⇒ Array<WhopSDK::Models::AdCampaign::Issue>
-
#leads ⇒ Float
Whop pixel-attributed leads, last-click.
-
#objective ⇒ Symbol, ...
The goal the campaign optimizes toward.
-
#optimization_goal ⇒ String?
The specific event the campaign optimizes for.
-
#platform ⇒ Symbol, WhopSDK::Models::AdCampaign::Platform
The ad network the campaign runs on.
-
#purchase_value ⇒ Float
USD value of pixel-attributed purchases.
-
#purchases ⇒ Float
Whop pixel-attributed purchases, last-click.
-
#reach ⇒ Float
The number of unique people who saw this.
-
#result_event ⇒ Symbol, ...
The Whop pixel conversion event whose attributed count represents results — the optimization goal, or the highest-volume attributed event for campaigns that budget per ad group.
-
#result_event_name ⇒ String?
The merchant-defined event name when result_event is custom; null for the standard events.
-
#results ⇒ Float?
The Whop pixel-attributed count behind result_event.
-
#return_on_ad_spend ⇒ Float
Purchase value divided by spend, both in USD (a currency-neutral ratio); 0 when there is no spend.
-
#schedules ⇒ Float
Whop pixel-attributed schedule events, last-click.
- #special_ad_categories ⇒ Array<Symbol, WhopSDK::Models::AdCampaign::SpecialAdCategory>
-
#spend ⇒ Float
The amount charged, in spend_currency.
-
#spend_currency ⇒ String?
The ISO 4217 currency code of all monetary metrics.
-
#status ⇒ Symbol, WhopSDK::Models::AdCampaign::Status
The lifecycle status of the ad campaign.
-
#submitted_applications ⇒ Float
Whop pixel-attributed submit-application events, last-click.
-
#title ⇒ String
The title of the ad campaign.
-
#unique_click_through_rate ⇒ Float?
Unique clicks divided by impressions, between 0 and 1.
-
#unique_clicks ⇒ Float
The number of unique clicks.
-
#updated_at ⇒ String
When the campaign was last updated, as an ISO 8601 timestamp.
-
#viewed_contents ⇒ Float
Whop pixel-attributed view-content events, last-click.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, added_to_carts:, bid_type:, budget_amount:, budget_optimization:, budget_type:, click_through_rate:, clicks:, completed_registrations:, contacts:, cost_per_added_to_cart:, cost_per_click:, cost_per_completed_registration:, cost_per_contact:, cost_per_lead:, cost_per_mille:, cost_per_purchase:, cost_per_result:, cost_per_schedule:, cost_per_submitted_application:, cost_per_viewed_content:, created_at:, custom_conversions:, custom_event_counts:, delivery_status:, frequency:, impressions:, issues:, leads:, objective:, optimization_goal:, platform:, purchase_value:, purchases:, reach:, result_event:, result_event_name:, results:, return_on_ad_spend:, schedules:, special_ad_categories:, spend:, spend_currency:, status:, submitted_applications:, title:, unique_click_through_rate:, unique_clicks:, updated_at:, viewed_contents:) ⇒ Object
constructor
Some parameter documentations has been truncated, see AdCampaign for more details.
- #to_hash ⇒ {
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(id:, added_to_carts:, bid_type:, budget_amount:, budget_optimization:, budget_type:, click_through_rate:, clicks:, completed_registrations:, contacts:, cost_per_added_to_cart:, cost_per_click:, cost_per_completed_registration:, cost_per_contact:, cost_per_lead:, cost_per_mille:, cost_per_purchase:, cost_per_result:, cost_per_schedule:, cost_per_submitted_application:, cost_per_viewed_content:, created_at:, custom_conversions:, custom_event_counts:, delivery_status:, frequency:, impressions:, issues:, leads:, objective:, optimization_goal:, platform:, purchase_value:, purchases:, reach:, result_event:, result_event_name:, results:, return_on_ad_spend:, schedules:, special_ad_categories:, spend:, spend_currency:, status:, submitted_applications:, title:, unique_click_through_rate:, unique_clicks:, updated_at:, viewed_contents:) ⇒ Object
Some parameter documentations has been truncated, see WhopSDK::Models::AdCampaign for more details.
|
|
# File 'lib/whop_sdk/models/ad_campaign.rb', line 329
|
Instance Attribute Details
#added_to_carts ⇒ Float
Whop pixel-attributed add-to-cart events, last-click.
17 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 17 required :added_to_carts, Float |
#bid_type ⇒ Symbol, ...
The bidding strategy the campaign uses.
23 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 23 required :bid_type, enum: -> { WhopSDK::AdCampaign::BidType }, nil?: true |
#budget_amount ⇒ Float?
The campaign budget in USD. Null when budget is set at the ad group level (ABO).
29 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 29 required :budget_amount, Float, nil?: true |
#budget_optimization ⇒ Symbol, ...
Which level owns the budget — the campaign (CBO) or each ad group (ABO).
35 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 35 required :budget_optimization, enum: -> { WhopSDK::AdCampaign::BudgetOptimization }, nil?: true |
#budget_type ⇒ Symbol, ...
Whether the budget is spent per day or over the campaign's lifetime.
41 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 41 required :budget_type, enum: -> { WhopSDK::AdCampaign::BudgetType }, nil?: true |
#click_through_rate ⇒ Float
Clicks divided by impressions, between 0 and 1.
47 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 47 required :click_through_rate, Float |
#clicks ⇒ Float
The number of clicks.
53 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 53 required :clicks, Float |
#completed_registrations ⇒ Float
Whop pixel-attributed complete-registration events, last-click.
59 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 59 required :completed_registrations, Float |
#contacts ⇒ Float
Whop pixel-attributed contact events, last-click.
65 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 65 required :contacts, Float |
#cost_per_added_to_cart ⇒ Float?
Spend divided by attributed add-to-cart events; null when they are not the goal and none are attributed.
72 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 72 required :cost_per_added_to_cart, Float, nil?: true |
#cost_per_click ⇒ Float
Spend divided by clicks; 0 when there are no clicks.
78 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 78 required :cost_per_click, Float |
#cost_per_completed_registration ⇒ Float?
Spend divided by attributed complete-registration events; null when they are not the goal and none are attributed.
85 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 85 required :cost_per_completed_registration, Float, nil?: true |
#cost_per_contact ⇒ Float?
Spend divided by attributed contact events; null when contacts are not the goal and none are attributed.
92 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 92 required :cost_per_contact, Float, nil?: true |
#cost_per_lead ⇒ Float?
Spend divided by attributed leads; null when leads are not a goal and none are attributed.
99 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 99 required :cost_per_lead, Float, nil?: true |
#cost_per_mille ⇒ Float
Spend per 1,000 impressions; 0 when there are no impressions.
105 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 105 required :cost_per_mille, Float |
#cost_per_purchase ⇒ Float?
Spend divided by attributed purchases; null when purchases are not a goal and none are attributed.
112 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 112 required :cost_per_purchase, Float, nil?: true |
#cost_per_result ⇒ Float?
Spend divided by Whop pixel-attributed results; null when nothing Whop-attributable is being optimized for.
119 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 119 required :cost_per_result, Float, nil?: true |
#cost_per_schedule ⇒ Float?
Spend divided by attributed schedule events; null when schedules are not the goal and none are attributed.
126 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 126 required :cost_per_schedule, Float, nil?: true |
#cost_per_submitted_application ⇒ Float?
Spend divided by attributed submit-application events; null when they are not the goal and none are attributed.
133 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 133 required :cost_per_submitted_application, Float, nil?: true |
#cost_per_viewed_content ⇒ Float?
Spend divided by attributed view-content events; null when they are not the goal and none are attributed.
140 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 140 required :cost_per_viewed_content, Float, nil?: true |
#created_at ⇒ String
When the campaign was created, as an ISO 8601 timestamp.
146 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 146 required :created_at, String |
#custom_conversions ⇒ Float
Whop pixel-attributed custom (merchant-defined) conversion events, last-click, across all custom event names.
153 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 153 required :custom_conversions, Float |
#custom_event_counts ⇒ Object
Whop pixel-attributed custom conversions broken out by merchant-defined event name, last-click, as a { event_name => count } map over the stats window. Empty when no named custom events are attributed. Custom events fired without a name are counted in custom_conversions but omitted here, so these values sum to at most custom_conversions.
163 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 163 required :custom_event_counts, WhopSDK::Internal::Type::Unknown |
#delivery_status ⇒ Symbol, WhopSDK::Models::AdCampaign::DeliveryStatus
The current delivery state, mirroring the Delivery column in the ads dashboard. When several states apply at once, the highest-precedence one is returned.
170 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 170 required :delivery_status, enum: -> { WhopSDK::AdCampaign::DeliveryStatus } |
#frequency ⇒ Float?
Platform-reported impressions divided by reach.
176 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 176 required :frequency, Float, nil?: true |
#id ⇒ String
Unique identifier for the ad campaign.
11 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 11 required :id, String |
#impressions ⇒ Float
The number of impressions.
182 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 182 required :impressions, Float |
#issues ⇒ Array<WhopSDK::Models::AdCampaign::Issue>
187 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 187 required :issues, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdCampaign::Issue] } |
#leads ⇒ Float
Whop pixel-attributed leads, last-click.
193 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 193 required :leads, Float |
#objective ⇒ Symbol, ...
The goal the campaign optimizes toward.
199 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 199 required :objective, enum: -> { WhopSDK::AdCampaign::Objective }, nil?: true |
#optimization_goal ⇒ String?
The specific event the campaign optimizes for. If the campaign is CBO, then all ad groups will have the same optimization goal, which will be returned here.
206 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 206 required :optimization_goal, String, nil?: true |
#platform ⇒ Symbol, WhopSDK::Models::AdCampaign::Platform
The ad network the campaign runs on.
212 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 212 required :platform, enum: -> { WhopSDK::AdCampaign::Platform } |
#purchase_value ⇒ Float
USD value of pixel-attributed purchases.
218 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 218 required :purchase_value, Float |
#purchases ⇒ Float
Whop pixel-attributed purchases, last-click.
224 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 224 required :purchases, Float |
#reach ⇒ Float
The number of unique people who saw this.
230 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 230 required :reach, Float |
#result_event ⇒ Symbol, ...
The Whop pixel conversion event whose attributed count represents results — the optimization goal, or the highest-volume attributed event for campaigns that budget per ad group. Null when the goal isn't a Whop-attributed event.
238 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 238 required :result_event, enum: -> { WhopSDK::AdCampaign::ResultEvent }, nil?: true |
#result_event_name ⇒ String?
The merchant-defined event name when result_event is custom; null for the standard events.
245 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 245 required :result_event_name, String, nil?: true |
#results ⇒ Float?
The Whop pixel-attributed count behind result_event. When a campaign's ad groups optimize different goals there is no single result_event (it is null), and this is instead the sum of each ad group's own attributed results. Null when nothing Whop-attributable is being optimized for.
254 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 254 required :results, Float, nil?: true |
#return_on_ad_spend ⇒ Float
Purchase value divided by spend, both in USD (a currency-neutral ratio); 0 when there is no spend.
261 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 261 required :return_on_ad_spend, Float |
#schedules ⇒ Float
Whop pixel-attributed schedule events, last-click.
267 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 267 required :schedules, Float |
#special_ad_categories ⇒ Array<Symbol, WhopSDK::Models::AdCampaign::SpecialAdCategory>
272 273 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 272 required :special_ad_categories, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdCampaign::SpecialAdCategory] } |
#spend ⇒ Float
The amount charged, in spend_currency.
279 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 279 required :spend, Float |
#spend_currency ⇒ String?
The ISO 4217 currency code of all monetary metrics.
285 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 285 required :spend_currency, String, nil?: true |
#status ⇒ Symbol, WhopSDK::Models::AdCampaign::Status
The lifecycle status of the ad campaign.
291 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 291 required :status, enum: -> { WhopSDK::AdCampaign::Status } |
#submitted_applications ⇒ Float
Whop pixel-attributed submit-application events, last-click.
297 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 297 required :submitted_applications, Float |
#title ⇒ String
The title of the ad campaign.
303 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 303 required :title, String |
#unique_click_through_rate ⇒ Float?
Unique clicks divided by impressions, between 0 and 1.
309 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 309 required :unique_click_through_rate, Float, nil?: true |
#unique_clicks ⇒ Float
The number of unique clicks.
315 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 315 required :unique_clicks, Float |
#updated_at ⇒ String
When the campaign was last updated, as an ISO 8601 timestamp.
321 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 321 required :updated_at, String |
#viewed_contents ⇒ Float
Whop pixel-attributed view-content events, last-click.
327 |
# File 'lib/whop_sdk/models/ad_campaign.rb', line 327 required :viewed_contents, Float |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/whop_sdk/models/ad_campaign.rb', line 443
|
Instance Method Details
#to_hash ⇒ {
211 |
# File 'sig/whop_sdk/models/ad_campaign.rbs', line 211
def to_hash: -> {
|