Class: WhopSDK::Models::AdCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::AdCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/whop_sdk/models/ad_create_params.rb,
sig/whop_sdk/models/ad_create_params.rbs
Overview
Defined Under Namespace
Modules: CallToAction, PostSource Classes: Creative, LeadForm, MessagingConfig, SocialAccount
Instance Attribute Summary collapse
-
#ad_group ⇒ Object?
An inline ad group to create (same shape as POST /ad_groups, including ad_campaign_id).
-
#ad_group_id ⇒ String?
The existing ad group to create the ad in.
-
#call_to_action ⇒ Symbol, ...
The call-to-action button shown on the ad.
-
#creatives ⇒ Array<WhopSDK::Models::AdCreateParams::Creative>?
The ad's creative assets.
-
#descriptions ⇒ Array<String>?
The description variants shown on the ad.
-
#headlines ⇒ Array<String>?
The headline variants shown on the ad.
-
#lead_form ⇒ WhopSDK::Models::AdCreateParams::LeadForm?
Instant lead form for the ad.
-
#lead_form_id ⇒ String?
Use an existing Meta instant form instead of creating one — the form's Meta id, from a form already on the ad's Facebook page.
-
#messaging_config ⇒ WhopSDK::Models::AdCreateParams::MessagingConfig?
Click-to-message welcome copy: the greeting (message) and the ice-breaker prompt (keyword).
-
#multi_advertiser_ads ⇒ Boolean?
Whether the ad can appear alongside other advertisers' ads in the same unit.
-
#post_id ⇒ String?
Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id.
-
#post_source ⇒ Symbol, ...
Which network post_id refers to — facebook (a page post) or instagram (a media id).
-
#primary_texts ⇒ Array<String>?
The primary text variants shown in the ad body.
-
#social_accounts ⇒ Array<WhopSDK::Models::AdCreateParams::SocialAccount>?
The social accounts (Facebook page, Instagram profile) the ad runs under.
-
#title ⇒ String?
The display name of the ad.
-
#url ⇒ String?
The URL the ad links to.
-
#url_parameters ⇒ Object?
Query parameters appended to the destination URL, as a string-to-string map.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(keyword: nil, message: nil) ⇒ Object
constructor
Click-to-message welcome copy: the greeting (message) and the ice-breaker prompt (keyword).
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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(keyword: nil, message: nil) ⇒ Object
Click-to-message welcome copy: the greeting (message) and the ice-breaker prompt (keyword).
|
|
# File 'lib/whop_sdk/models/ad_create_params.rb', line 125
|
Instance Attribute Details
#ad_group ⇒ Object?
An inline ad group to create (same shape as POST /ad_groups, including ad_campaign_id). Creates the ad group and the ad together. Provide this OR ad_group_id.
16 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 16 optional :ad_group, WhopSDK::Internal::Type::Unknown |
#ad_group_id ⇒ String?
The existing ad group to create the ad in. Provide this OR ad_group, not both.
22 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 22 optional :ad_group_id, String |
#call_to_action ⇒ Symbol, ...
The call-to-action button shown on the ad.
28 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 28 optional :call_to_action, enum: -> { WhopSDK::AdCreateParams::CallToAction } |
#creatives ⇒ Array<WhopSDK::Models::AdCreateParams::Creative>?
The ad's creative assets. Each entry is an uploaded file id with an optional format; omit format for the original asset.
35 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 35 optional :creatives, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdCreateParams::Creative] } |
#descriptions ⇒ Array<String>?
The description variants shown on the ad.
41 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 41 optional :descriptions, WhopSDK::Internal::Type::ArrayOf[String] |
#headlines ⇒ Array<String>?
The headline variants shown on the ad.
47 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 47 optional :headlines, WhopSDK::Internal::Type::ArrayOf[String] |
#lead_form ⇒ WhopSDK::Models::AdCreateParams::LeadForm?
Instant lead form for the ad. Only allowed when the ad group's conversion_location is an instant-form destination (instant_forms, instant_forms_and_messenger, website_and_instant_forms). Mutually exclusive with lead_form_id.
56 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 56 optional :lead_form, -> { WhopSDK::AdCreateParams::LeadForm } |
#lead_form_id ⇒ String?
Use an existing Meta instant form instead of creating one — the form's Meta id, from a form already on the ad's Facebook page. Only allowed when the ad group's conversion_location is an instant-form destination. Mutually exclusive with lead_form.
65 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 65 optional :lead_form_id, String |
#messaging_config ⇒ WhopSDK::Models::AdCreateParams::MessagingConfig?
Click-to-message welcome copy: the greeting (message) and the ice-breaker prompt (keyword).
72 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 72 optional :messaging_config, -> { WhopSDK::AdCreateParams::MessagingConfig } |
#multi_advertiser_ads ⇒ Boolean?
Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true.
79 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 79 optional :multi_advertiser_ads, WhopSDK::Internal::Type::Boolean |
#post_id ⇒ String?
Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source.
86 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 86 optional :post_id, String |
#post_source ⇒ Symbol, ...
Which network post_id refers to — facebook (a page post) or instagram (a media id). Authoritative; when omitted the source is inferred from the id shape.
93 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 93 optional :post_source, enum: -> { WhopSDK::AdCreateParams::PostSource } |
#primary_texts ⇒ Array<String>?
The primary text variants shown in the ad body.
99 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 99 optional :primary_texts, WhopSDK::Internal::Type::ArrayOf[String] |
#social_accounts ⇒ Array<WhopSDK::Models::AdCreateParams::SocialAccount>?
The social accounts (Facebook page, Instagram profile) the ad runs under.
105 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 105 optional :social_accounts, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdCreateParams::SocialAccount] } |
#title ⇒ String?
The display name of the ad.
111 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 111 optional :title, String |
#url ⇒ String?
The URL the ad links to.
117 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 117 optional :url, String |
#url_parameters ⇒ Object?
Query parameters appended to the destination URL, as a string-to-string map.
123 |
# File 'lib/whop_sdk/models/ad_create_params.rb', line 123 optional :url_parameters, WhopSDK::Internal::Type::Unknown |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/whop_sdk/models/ad_create_params.rb', line 192
|
Instance Method Details
#to_hash ⇒ {
130 |
# File 'sig/whop_sdk/models/ad_create_params.rbs', line 130
def to_hash: -> {
|