Class: WhopSDK::Models::Ad
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::Ad
- Defined in:
- lib/whop_sdk/models/ad.rb,
sig/whop_sdk/models/ad.rbs
Overview
Defined Under Namespace
Modules: CallToAction, DeliveryStatus, PostSource, ResultEvent, Status Classes: AdCampaign, AdGroup, Creative, Issue
Instance Attribute Summary collapse
-
#ad_campaign ⇒ WhopSDK::Models::Ad::AdCampaign
The ad campaign this ad belongs to, an object with an id.
-
#ad_group ⇒ WhopSDK::Models::Ad::AdGroup
The ad group this ad belongs to, an object with an id.
-
#added_to_carts ⇒ Float
Whop pixel-attributed add-to-cart events, last-click.
-
#call_to_action ⇒ Symbol, ...
The call-to-action button shown on the ad.
-
#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 ad was created, as an ISO 8601 timestamp.
- #creatives ⇒ Array<WhopSDK::Models::Ad::Creative>
-
#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::Ad::DeliveryStatus
The current delivery state, mirroring the Delivery column in the ads dashboard.
- #descriptions ⇒ Array<String>
-
#frequency ⇒ Float?
Platform-reported impressions divided by reach.
- #headlines ⇒ Array<String>
-
#id ⇒ String
Unique identifier for the ad.
-
#impressions ⇒ Float
The number of impressions.
- #issues ⇒ Array<WhopSDK::Models::Ad::Issue>
-
#lead_form ⇒ Object?
The instant lead form on the ad (Meta lead ads), or null when the ad group's conversion_location is not an instant-form destination.
-
#lead_form_id ⇒ String?
The Meta lead form the ad uses.
-
#leads ⇒ Float
Whop pixel-attributed leads, last-click.
-
#messaging_config ⇒ Object?
The click-to-message welcome copy, an object with message and keyword, or null when the ad has none.
-
#multi_advertiser_ads ⇒ Boolean
Whether the ad can appear alongside other advertisers' ads in the same unit.
-
#post_id ⇒ String?
The existing post this ad promotes (a Facebook post or Instagram media), or null when it uses uploaded creatives.
-
#post_source ⇒ Symbol, ...
Which network post_id refers to — facebook (a page post) or instagram (a media id) — or null when the ad uses uploaded creatives.
-
#post_thumbnail_url ⇒ String?
Preview image of the existing post this ad promotes.
- #primary_texts ⇒ Array<String>
-
#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.
- #social_accounts ⇒ Array<Object>
-
#spend ⇒ Float
The amount charged, in spend_currency.
-
#spend_currency ⇒ String?
The ISO 4217 currency code of all monetary metrics.
-
#status ⇒ Symbol, WhopSDK::Models::Ad::Status
The delivery status of the ad.
-
#submitted_applications ⇒ Float
Whop pixel-attributed submit-application events, last-click.
-
#title ⇒ String?
The display title of the ad.
-
#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 ad was last updated, as an ISO 8601 timestamp.
-
#url ⇒ String?
The URL the ad links to.
-
#url_parameters ⇒ Object
Query parameters appended to the URL, as a string-to-string map.
-
#viewed_contents ⇒ Float
Whop pixel-attributed view-content events, last-click.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:) ⇒ Object
constructor
The ad group this ad belongs to, an object with an id.
- #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:) ⇒ Object
The ad group this ad belongs to, an object with an id.
|
|
# File 'lib/whop_sdk/models/ad.rb', line 387
|
Instance Attribute Details
#ad_campaign ⇒ WhopSDK::Models::Ad::AdCampaign
The ad campaign this ad belongs to, an object with an id.
17 |
# File 'lib/whop_sdk/models/ad.rb', line 17 required :ad_campaign, -> { WhopSDK::Ad::AdCampaign } |
#ad_group ⇒ WhopSDK::Models::Ad::AdGroup
The ad group this ad belongs to, an object with an id.
23 |
# File 'lib/whop_sdk/models/ad.rb', line 23 required :ad_group, -> { WhopSDK::Ad::AdGroup } |
#added_to_carts ⇒ Float
Whop pixel-attributed add-to-cart events, last-click.
29 |
# File 'lib/whop_sdk/models/ad.rb', line 29 required :added_to_carts, Float |
#call_to_action ⇒ Symbol, ...
The call-to-action button shown on the ad.
35 |
# File 'lib/whop_sdk/models/ad.rb', line 35 required :call_to_action, enum: -> { WhopSDK::Ad::CallToAction }, nil?: true |
#click_through_rate ⇒ Float
Clicks divided by impressions, between 0 and 1.
41 |
# File 'lib/whop_sdk/models/ad.rb', line 41 required :click_through_rate, Float |
#clicks ⇒ Float
The number of clicks.
47 |
# File 'lib/whop_sdk/models/ad.rb', line 47 required :clicks, Float |
#completed_registrations ⇒ Float
Whop pixel-attributed complete-registration events, last-click.
53 |
# File 'lib/whop_sdk/models/ad.rb', line 53 required :completed_registrations, Float |
#contacts ⇒ Float
Whop pixel-attributed contact events, last-click.
59 |
# File 'lib/whop_sdk/models/ad.rb', line 59 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.
66 |
# File 'lib/whop_sdk/models/ad.rb', line 66 required :cost_per_added_to_cart, Float, nil?: true |
#cost_per_click ⇒ Float
Spend divided by clicks; 0 when there are no clicks.
72 |
# File 'lib/whop_sdk/models/ad.rb', line 72 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.
79 |
# File 'lib/whop_sdk/models/ad.rb', line 79 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.
86 |
# File 'lib/whop_sdk/models/ad.rb', line 86 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.
93 |
# File 'lib/whop_sdk/models/ad.rb', line 93 required :cost_per_lead, Float, nil?: true |
#cost_per_mille ⇒ Float
Spend per 1,000 impressions; 0 when there are no impressions.
99 |
# File 'lib/whop_sdk/models/ad.rb', line 99 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.
106 |
# File 'lib/whop_sdk/models/ad.rb', line 106 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.
113 |
# File 'lib/whop_sdk/models/ad.rb', line 113 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.
120 |
# File 'lib/whop_sdk/models/ad.rb', line 120 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.
127 |
# File 'lib/whop_sdk/models/ad.rb', line 127 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.
134 |
# File 'lib/whop_sdk/models/ad.rb', line 134 required :cost_per_viewed_content, Float, nil?: true |
#created_at ⇒ String
When the ad was created, as an ISO 8601 timestamp.
140 |
# File 'lib/whop_sdk/models/ad.rb', line 140 required :created_at, String |
#creatives ⇒ Array<WhopSDK::Models::Ad::Creative>
145 |
# File 'lib/whop_sdk/models/ad.rb', line 145 required :creatives, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Ad::Creative] } |
#custom_conversions ⇒ Float
Whop pixel-attributed custom (merchant-defined) conversion events, last-click, across all custom event names.
152 |
# File 'lib/whop_sdk/models/ad.rb', line 152 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.
162 |
# File 'lib/whop_sdk/models/ad.rb', line 162 required :custom_event_counts, WhopSDK::Internal::Type::Unknown |
#delivery_status ⇒ Symbol, WhopSDK::Models::Ad::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.
169 |
# File 'lib/whop_sdk/models/ad.rb', line 169 required :delivery_status, enum: -> { WhopSDK::Ad::DeliveryStatus } |
#descriptions ⇒ Array<String>
174 |
# File 'lib/whop_sdk/models/ad.rb', line 174 required :descriptions, WhopSDK::Internal::Type::ArrayOf[String] |
#frequency ⇒ Float?
Platform-reported impressions divided by reach.
180 |
# File 'lib/whop_sdk/models/ad.rb', line 180 required :frequency, Float, nil?: true |
#headlines ⇒ Array<String>
185 |
# File 'lib/whop_sdk/models/ad.rb', line 185 required :headlines, WhopSDK::Internal::Type::ArrayOf[String] |
#id ⇒ String
Unique identifier for the ad.
11 |
# File 'lib/whop_sdk/models/ad.rb', line 11 required :id, String |
#impressions ⇒ Float
The number of impressions.
191 |
# File 'lib/whop_sdk/models/ad.rb', line 191 required :impressions, Float |
#issues ⇒ Array<WhopSDK::Models::Ad::Issue>
196 |
# File 'lib/whop_sdk/models/ad.rb', line 196 required :issues, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Ad::Issue] } |
#lead_form ⇒ Object?
The instant lead form on the ad (Meta lead ads), or null when the ad group's conversion_location is not an instant-form destination. An object with name, form_type (more_volume or higher_intent), an optional intro, questions, a privacy_policy, an optional completion screen, and phone_verification.
205 |
# File 'lib/whop_sdk/models/ad.rb', line 205 required :lead_form, WhopSDK::Internal::Type::Unknown, nil?: true |
#lead_form_id ⇒ String?
The Meta lead form the ad uses. Set when the ad references an existing form via lead_form_id, or once a form built from lead_form has been created on Meta at launch.
213 |
# File 'lib/whop_sdk/models/ad.rb', line 213 required :lead_form_id, String, nil?: true |
#leads ⇒ Float
Whop pixel-attributed leads, last-click.
219 |
# File 'lib/whop_sdk/models/ad.rb', line 219 required :leads, Float |
#messaging_config ⇒ Object?
The click-to-message welcome copy, an object with message and keyword, or null when the ad has none.
226 |
# File 'lib/whop_sdk/models/ad.rb', line 226 required :messaging_config, WhopSDK::Internal::Type::Unknown, nil?: true |
#multi_advertiser_ads ⇒ Boolean
Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true.
233 |
# File 'lib/whop_sdk/models/ad.rb', line 233 required :multi_advertiser_ads, WhopSDK::Internal::Type::Boolean |
#post_id ⇒ String?
The existing post this ad promotes (a Facebook post or Instagram media), or null when it uses uploaded creatives.
240 |
# File 'lib/whop_sdk/models/ad.rb', line 240 required :post_id, String, nil?: true |
#post_source ⇒ Symbol, ...
Which network post_id refers to — facebook (a page post) or instagram (a media id) — or null when the ad uses uploaded creatives.
247 |
# File 'lib/whop_sdk/models/ad.rb', line 247 required :post_source, enum: -> { WhopSDK::Ad::PostSource }, nil?: true |
#post_thumbnail_url ⇒ String?
Preview image of the existing post this ad promotes. Null for ads that use uploaded creatives, or until the post's media has been fetched from the network.
254 |
# File 'lib/whop_sdk/models/ad.rb', line 254 required :post_thumbnail_url, String, nil?: true |
#primary_texts ⇒ Array<String>
259 |
# File 'lib/whop_sdk/models/ad.rb', line 259 required :primary_texts, WhopSDK::Internal::Type::ArrayOf[String] |
#purchase_value ⇒ Float
USD value of pixel-attributed purchases.
265 |
# File 'lib/whop_sdk/models/ad.rb', line 265 required :purchase_value, Float |
#purchases ⇒ Float
Whop pixel-attributed purchases, last-click.
271 |
# File 'lib/whop_sdk/models/ad.rb', line 271 required :purchases, Float |
#reach ⇒ Float
The number of unique people who saw this.
277 |
# File 'lib/whop_sdk/models/ad.rb', line 277 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.
285 |
# File 'lib/whop_sdk/models/ad.rb', line 285 required :result_event, enum: -> { WhopSDK::Ad::ResultEvent }, nil?: true |
#result_event_name ⇒ String?
The merchant-defined event name when result_event is custom; null for the standard events.
292 |
# File 'lib/whop_sdk/models/ad.rb', line 292 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.
301 |
# File 'lib/whop_sdk/models/ad.rb', line 301 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.
308 |
# File 'lib/whop_sdk/models/ad.rb', line 308 required :return_on_ad_spend, Float |
#schedules ⇒ Float
Whop pixel-attributed schedule events, last-click.
314 |
# File 'lib/whop_sdk/models/ad.rb', line 314 required :schedules, Float |
#social_accounts ⇒ Array<Object>
319 |
# File 'lib/whop_sdk/models/ad.rb', line 319 required :social_accounts, WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::Unknown] |
#spend ⇒ Float
The amount charged, in spend_currency.
325 |
# File 'lib/whop_sdk/models/ad.rb', line 325 required :spend, Float |
#spend_currency ⇒ String?
The ISO 4217 currency code of all monetary metrics.
331 |
# File 'lib/whop_sdk/models/ad.rb', line 331 required :spend_currency, String, nil?: true |
#status ⇒ Symbol, WhopSDK::Models::Ad::Status
The delivery status of the ad.
337 |
# File 'lib/whop_sdk/models/ad.rb', line 337 required :status, enum: -> { WhopSDK::Ad::Status } |
#submitted_applications ⇒ Float
Whop pixel-attributed submit-application events, last-click.
343 |
# File 'lib/whop_sdk/models/ad.rb', line 343 required :submitted_applications, Float |
#title ⇒ String?
The display title of the ad. Falls back to the creative set caption when unset.
349 |
# File 'lib/whop_sdk/models/ad.rb', line 349 required :title, String, nil?: true |
#unique_click_through_rate ⇒ Float?
Unique clicks divided by impressions, between 0 and 1.
355 |
# File 'lib/whop_sdk/models/ad.rb', line 355 required :unique_click_through_rate, Float, nil?: true |
#unique_clicks ⇒ Float
The number of unique clicks.
361 |
# File 'lib/whop_sdk/models/ad.rb', line 361 required :unique_clicks, Float |
#updated_at ⇒ String
When the ad was last updated, as an ISO 8601 timestamp.
367 |
# File 'lib/whop_sdk/models/ad.rb', line 367 required :updated_at, String |
#url ⇒ String?
The URL the ad links to.
373 |
# File 'lib/whop_sdk/models/ad.rb', line 373 required :url, String, nil?: true |
#url_parameters ⇒ Object
Query parameters appended to the URL, as a string-to-string map.
379 |
# File 'lib/whop_sdk/models/ad.rb', line 379 required :url_parameters, WhopSDK::Internal::Type::Unknown |
#viewed_contents ⇒ Float
Whop pixel-attributed view-content events, last-click.
385 |
# File 'lib/whop_sdk/models/ad.rb', line 385 required :viewed_contents, Float |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/whop_sdk/models/ad.rb', line 575
|
Instance Method Details
#to_hash ⇒ {
247 |
# File 'sig/whop_sdk/models/ad.rbs', line 247
def to_hash: -> {
|