Class: WhopSDK::Models::AdCampaign

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/ad_campaign.rb,
sig/whop_sdk/models/ad_campaign.rbs

Overview

See Also:

  • WhopSDK::Resources::AdCampaigns#create

Defined Under Namespace

Modules: BidType, BudgetOptimization, BudgetType, DeliveryStatus, Objective, Platform, ResultEvent, SpecialAdCategory, Status Classes: Issue

Instance Attribute Summary collapse

Class Method 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(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.

Parameters:

  • id (String)

    Unique identifier for the ad campaign.

  • added_to_carts (Float)

    Whop pixel-attributed add-to-cart events, last-click.

  • bid_type (Symbol, WhopSDK::Models::AdCampaign::BidType, nil)

    The bidding strategy the campaign uses.

  • budget_amount (Float, nil)

    The campaign budget in USD. Null when budget is set at the ad group level (ABO).

  • budget_optimization (Symbol, WhopSDK::Models::AdCampaign::BudgetOptimization, nil)

    Which level owns the budget — the campaign (CBO) or each ad group (ABO).

  • budget_type (Symbol, WhopSDK::Models::AdCampaign::BudgetType, nil)

    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, nil)

    Spend divided by attributed add-to-cart events; null when they are not the goal

  • cost_per_click (Float)

    Spend divided by clicks; 0 when there are no clicks.

  • cost_per_completed_registration (Float, nil)

    Spend divided by attributed complete-registration events; null when they are not

  • cost_per_contact (Float, nil)

    Spend divided by attributed contact events; null when contacts are not the goal

  • cost_per_lead (Float, nil)

    Spend divided by attributed leads; null when leads are not a goal and none are a

  • cost_per_mille (Float)

    Spend per 1,000 impressions; 0 when there are no impressions.

  • cost_per_purchase (Float, nil)

    Spend divided by attributed purchases; null when purchases are not a goal and no

  • cost_per_result (Float, nil)

    Spend divided by Whop pixel-attributed results; null when nothing Whop-attributa

  • cost_per_schedule (Float, nil)

    Spend divided by attributed schedule events; null when schedules are not the goa

  • cost_per_submitted_application (Float, nil)

    Spend divided by attributed submit-application events; null when they are not th

  • cost_per_viewed_content (Float, nil)

    Spend divided by attributed view-content events; null when they are not the goal

  • 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, a

  • custom_event_counts (Object)

    Whop pixel-attributed custom conversions broken out by merchant-defined event na

  • delivery_status (Symbol, WhopSDK::Models::AdCampaign::DeliveryStatus)

    The current delivery state, mirroring the Delivery column in the ads dashboard.

  • frequency (Float, nil)

    Platform-reported impressions divided by reach.

  • impressions (Float)

    The number of impressions.

  • issues (Array<WhopSDK::Models::AdCampaign::Issue>)
  • leads (Float)

    Whop pixel-attributed leads, last-click.

  • objective (Symbol, WhopSDK::Models::AdCampaign::Objective, nil)

    The goal the campaign optimizes toward.

  • optimization_goal (String, nil)

    The specific event the campaign optimizes for. If the campaign is CBO, then all

  • 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, WhopSDK::Models::AdCampaign::ResultEvent, nil)

    The Whop pixel conversion event whose attributed count represents results — the

  • result_event_name (String, nil)

    The merchant-defined event name when result_event is custom; null for the standa

  • results (Float, nil)

    The Whop pixel-attributed count behind result_event. When a campaign's ad groups

  • return_on_ad_spend (Float)

    Purchase value divided by spend, both in USD (a currency-neutral ratio); 0 when

  • 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, nil)

    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, nil)

    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.



# File 'lib/whop_sdk/models/ad_campaign.rb', line 329

Instance Attribute Details

#added_to_cartsFloat

Whop pixel-attributed add-to-cart events, last-click.

Parameters:

  • value (Float)

Returns:

  • (Float)


17
# File 'lib/whop_sdk/models/ad_campaign.rb', line 17

required :added_to_carts, Float

#bid_typeSymbol, ...

The bidding strategy the campaign uses.

Parameters:

  • value (WhopSDK::Models::AdCampaign::bid_type, nil)

Returns:



23
# File 'lib/whop_sdk/models/ad_campaign.rb', line 23

required :bid_type, enum: -> { WhopSDK::AdCampaign::BidType }, nil?: true

#budget_amountFloat?

The campaign budget in USD. Null when budget is set at the ad group level (ABO).

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


29
# File 'lib/whop_sdk/models/ad_campaign.rb', line 29

required :budget_amount, Float, nil?: true

#budget_optimizationSymbol, ...

Which level owns the budget — the campaign (CBO) or each ad group (ABO).

Parameters:

  • value (WhopSDK::Models::AdCampaign::budget_optimization, nil)

Returns:



35
# File 'lib/whop_sdk/models/ad_campaign.rb', line 35

required :budget_optimization, enum: -> { WhopSDK::AdCampaign::BudgetOptimization }, nil?: true

#budget_typeSymbol, ...

Whether the budget is spent per day or over the campaign's lifetime.

Parameters:

  • value (WhopSDK::Models::AdCampaign::budget_type, nil)

Returns:



41
# File 'lib/whop_sdk/models/ad_campaign.rb', line 41

required :budget_type, enum: -> { WhopSDK::AdCampaign::BudgetType }, nil?: true

#click_through_rateFloat

Clicks divided by impressions, between 0 and 1.

Parameters:

  • value (Float)

Returns:

  • (Float)


47
# File 'lib/whop_sdk/models/ad_campaign.rb', line 47

required :click_through_rate, Float

#clicksFloat

The number of clicks.

Parameters:

  • value (Float)

Returns:

  • (Float)


53
# File 'lib/whop_sdk/models/ad_campaign.rb', line 53

required :clicks, Float

#completed_registrationsFloat

Whop pixel-attributed complete-registration events, last-click.

Parameters:

  • value (Float)

Returns:

  • (Float)


59
# File 'lib/whop_sdk/models/ad_campaign.rb', line 59

required :completed_registrations, Float

#contactsFloat

Whop pixel-attributed contact events, last-click.

Parameters:

  • value (Float)

Returns:

  • (Float)


65
# File 'lib/whop_sdk/models/ad_campaign.rb', line 65

required :contacts, Float

#cost_per_added_to_cartFloat?

Spend divided by attributed add-to-cart events; null when they are not the goal and none are attributed.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


72
# File 'lib/whop_sdk/models/ad_campaign.rb', line 72

required :cost_per_added_to_cart, Float, nil?: true

#cost_per_clickFloat

Spend divided by clicks; 0 when there are no clicks.

Parameters:

  • value (Float)

Returns:

  • (Float)


78
# File 'lib/whop_sdk/models/ad_campaign.rb', line 78

required :cost_per_click, Float

#cost_per_completed_registrationFloat?

Spend divided by attributed complete-registration events; null when they are not the goal and none are attributed.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


85
# File 'lib/whop_sdk/models/ad_campaign.rb', line 85

required :cost_per_completed_registration, Float, nil?: true

#cost_per_contactFloat?

Spend divided by attributed contact events; null when contacts are not the goal and none are attributed.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


92
# File 'lib/whop_sdk/models/ad_campaign.rb', line 92

required :cost_per_contact, Float, nil?: true

#cost_per_leadFloat?

Spend divided by attributed leads; null when leads are not a goal and none are attributed.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


99
# File 'lib/whop_sdk/models/ad_campaign.rb', line 99

required :cost_per_lead, Float, nil?: true

#cost_per_milleFloat

Spend per 1,000 impressions; 0 when there are no impressions.

Parameters:

  • value (Float)

Returns:

  • (Float)


105
# File 'lib/whop_sdk/models/ad_campaign.rb', line 105

required :cost_per_mille, Float

#cost_per_purchaseFloat?

Spend divided by attributed purchases; null when purchases are not a goal and none are attributed.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


112
# File 'lib/whop_sdk/models/ad_campaign.rb', line 112

required :cost_per_purchase, Float, nil?: true

#cost_per_resultFloat?

Spend divided by Whop pixel-attributed results; null when nothing Whop-attributable is being optimized for.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


119
# File 'lib/whop_sdk/models/ad_campaign.rb', line 119

required :cost_per_result, Float, nil?: true

#cost_per_scheduleFloat?

Spend divided by attributed schedule events; null when schedules are not the goal and none are attributed.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


126
# File 'lib/whop_sdk/models/ad_campaign.rb', line 126

required :cost_per_schedule, Float, nil?: true

#cost_per_submitted_applicationFloat?

Spend divided by attributed submit-application events; null when they are not the goal and none are attributed.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


133
# File 'lib/whop_sdk/models/ad_campaign.rb', line 133

required :cost_per_submitted_application, Float, nil?: true

#cost_per_viewed_contentFloat?

Spend divided by attributed view-content events; null when they are not the goal and none are attributed.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


140
# File 'lib/whop_sdk/models/ad_campaign.rb', line 140

required :cost_per_viewed_content, Float, nil?: true

#created_atString

When the campaign was created, as an ISO 8601 timestamp.

Parameters:

  • value (String)

Returns:

  • (String)


146
# File 'lib/whop_sdk/models/ad_campaign.rb', line 146

required :created_at, String

#custom_conversionsFloat

Whop pixel-attributed custom (merchant-defined) conversion events, last-click, across all custom event names.

Parameters:

  • value (Float)

Returns:

  • (Float)


153
# File 'lib/whop_sdk/models/ad_campaign.rb', line 153

required :custom_conversions, Float

#custom_event_countsObject

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.

Parameters:

  • value (top)

Returns:

  • (Object)


163
# File 'lib/whop_sdk/models/ad_campaign.rb', line 163

required :custom_event_counts, WhopSDK::Internal::Type::Unknown

#delivery_statusSymbol, 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.

Parameters:

  • value (WhopSDK::Models::AdCampaign::delivery_status)

Returns:



170
# File 'lib/whop_sdk/models/ad_campaign.rb', line 170

required :delivery_status, enum: -> { WhopSDK::AdCampaign::DeliveryStatus }

#frequencyFloat?

Platform-reported impressions divided by reach.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


176
# File 'lib/whop_sdk/models/ad_campaign.rb', line 176

required :frequency, Float, nil?: true

#idString

Unique identifier for the ad campaign.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/whop_sdk/models/ad_campaign.rb', line 11

required :id, String

#impressionsFloat

The number of impressions.

Parameters:

  • value (Float)

Returns:

  • (Float)


182
# File 'lib/whop_sdk/models/ad_campaign.rb', line 182

required :impressions, Float

#issuesArray<WhopSDK::Models::AdCampaign::Issue>

Parameters:

  • value (::Array[WhopSDK::AdCampaign::Issue])

Returns:



187
# File 'lib/whop_sdk/models/ad_campaign.rb', line 187

required :issues, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdCampaign::Issue] }

#leadsFloat

Whop pixel-attributed leads, last-click.

Parameters:

  • value (Float)

Returns:

  • (Float)


193
# File 'lib/whop_sdk/models/ad_campaign.rb', line 193

required :leads, Float

#objectiveSymbol, ...

The goal the campaign optimizes toward.

Parameters:

  • value (WhopSDK::Models::AdCampaign::objective, nil)

Returns:



199
# File 'lib/whop_sdk/models/ad_campaign.rb', line 199

required :objective, enum: -> { WhopSDK::AdCampaign::Objective }, nil?: true

#optimization_goalString?

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.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


206
# File 'lib/whop_sdk/models/ad_campaign.rb', line 206

required :optimization_goal, String, nil?: true

#platformSymbol, WhopSDK::Models::AdCampaign::Platform

The ad network the campaign runs on.

Parameters:

  • value (WhopSDK::Models::AdCampaign::platform)

Returns:



212
# File 'lib/whop_sdk/models/ad_campaign.rb', line 212

required :platform, enum: -> { WhopSDK::AdCampaign::Platform }

#purchase_valueFloat

USD value of pixel-attributed purchases.

Parameters:

  • value (Float)

Returns:

  • (Float)


218
# File 'lib/whop_sdk/models/ad_campaign.rb', line 218

required :purchase_value, Float

#purchasesFloat

Whop pixel-attributed purchases, last-click.

Parameters:

  • value (Float)

Returns:

  • (Float)


224
# File 'lib/whop_sdk/models/ad_campaign.rb', line 224

required :purchases, Float

#reachFloat

The number of unique people who saw this.

Parameters:

  • value (Float)

Returns:

  • (Float)


230
# File 'lib/whop_sdk/models/ad_campaign.rb', line 230

required :reach, Float

#result_eventSymbol, ...

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.

Parameters:

  • value (WhopSDK::Models::AdCampaign::result_event, nil)

Returns:



238
# File 'lib/whop_sdk/models/ad_campaign.rb', line 238

required :result_event, enum: -> { WhopSDK::AdCampaign::ResultEvent }, nil?: true

#result_event_nameString?

The merchant-defined event name when result_event is custom; null for the standard events.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


245
# File 'lib/whop_sdk/models/ad_campaign.rb', line 245

required :result_event_name, String, nil?: true

#resultsFloat?

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.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


254
# File 'lib/whop_sdk/models/ad_campaign.rb', line 254

required :results, Float, nil?: true

#return_on_ad_spendFloat

Purchase value divided by spend, both in USD (a currency-neutral ratio); 0 when there is no spend.

Parameters:

  • value (Float)

Returns:

  • (Float)


261
# File 'lib/whop_sdk/models/ad_campaign.rb', line 261

required :return_on_ad_spend, Float

#schedulesFloat

Whop pixel-attributed schedule events, last-click.

Parameters:

  • value (Float)

Returns:

  • (Float)


267
# File 'lib/whop_sdk/models/ad_campaign.rb', line 267

required :schedules, Float

#special_ad_categoriesArray<Symbol, WhopSDK::Models::AdCampaign::SpecialAdCategory>

Parameters:

  • value (::Array[WhopSDK::Models::AdCampaign::special_ad_category])

Returns:



272
273
# File 'lib/whop_sdk/models/ad_campaign.rb', line 272

required :special_ad_categories,
-> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdCampaign::SpecialAdCategory] }

#spendFloat

The amount charged, in spend_currency.

Parameters:

  • value (Float)

Returns:

  • (Float)


279
# File 'lib/whop_sdk/models/ad_campaign.rb', line 279

required :spend, Float

#spend_currencyString?

The ISO 4217 currency code of all monetary metrics.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


285
# File 'lib/whop_sdk/models/ad_campaign.rb', line 285

required :spend_currency, String, nil?: true

#statusSymbol, WhopSDK::Models::AdCampaign::Status

The lifecycle status of the ad campaign.

Parameters:

  • value (WhopSDK::Models::AdCampaign::status)

Returns:



291
# File 'lib/whop_sdk/models/ad_campaign.rb', line 291

required :status, enum: -> { WhopSDK::AdCampaign::Status }

#submitted_applicationsFloat

Whop pixel-attributed submit-application events, last-click.

Parameters:

  • value (Float)

Returns:

  • (Float)


297
# File 'lib/whop_sdk/models/ad_campaign.rb', line 297

required :submitted_applications, Float

#titleString

The title of the ad campaign.

Parameters:

  • value (String)

Returns:

  • (String)


303
# File 'lib/whop_sdk/models/ad_campaign.rb', line 303

required :title, String

#unique_click_through_rateFloat?

Unique clicks divided by impressions, between 0 and 1.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


309
# File 'lib/whop_sdk/models/ad_campaign.rb', line 309

required :unique_click_through_rate, Float, nil?: true

#unique_clicksFloat

The number of unique clicks.

Parameters:

  • value (Float)

Returns:

  • (Float)


315
# File 'lib/whop_sdk/models/ad_campaign.rb', line 315

required :unique_clicks, Float

#updated_atString

When the campaign was last updated, as an ISO 8601 timestamp.

Parameters:

  • value (String)

Returns:

  • (String)


321
# File 'lib/whop_sdk/models/ad_campaign.rb', line 321

required :updated_at, String

#viewed_contentsFloat

Whop pixel-attributed view-content events, last-click.

Parameters:

  • value (Float)

Returns:

  • (Float)


327
# File 'lib/whop_sdk/models/ad_campaign.rb', line 327

required :viewed_contents, Float

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/ad_campaign.rb', line 443

Instance Method Details

#to_hash{

Returns:

  • ({)


211
# File 'sig/whop_sdk/models/ad_campaign.rbs', line 211

def to_hash: -> {