Class: WhopSDK::Models::AdCreateParams

Inherits:
Internal::Type::BaseModel show all
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

See Also:

  • WhopSDK::Resources::Ads#create

Defined Under Namespace

Modules: CallToAction, PostSource Classes: Creative, LeadForm, MessagingConfig, SocialAccount

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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).

Parameters:

  • keyword (String) (defaults to: nil)
  • message (String) (defaults to: nil)


# File 'lib/whop_sdk/models/ad_create_params.rb', line 125

Instance Attribute Details

#ad_groupObject?

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.

Parameters:

  • (top)

Returns:

  • (Object, nil)


16
# File 'lib/whop_sdk/models/ad_create_params.rb', line 16

optional :ad_group, WhopSDK::Internal::Type::Unknown

#ad_group_idString?

The existing ad group to create the ad in. Provide this OR ad_group, not both.

Parameters:

  • (String)

Returns:

  • (String, nil)


22
# File 'lib/whop_sdk/models/ad_create_params.rb', line 22

optional :ad_group_id, String

#call_to_actionSymbol, ...

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 }

#creativesArray<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] }

#descriptionsArray<String>?

The description variants shown on the ad.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


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

optional :descriptions, WhopSDK::Internal::Type::ArrayOf[String]

#headlinesArray<String>?

The headline variants shown on the ad.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


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

optional :headlines, WhopSDK::Internal::Type::ArrayOf[String]

#lead_formWhopSDK::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_idString?

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :lead_form_id, String

#messaging_configWhopSDK::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_adsBoolean?

Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


79
# File 'lib/whop_sdk/models/ad_create_params.rb', line 79

optional :multi_advertiser_ads, WhopSDK::Internal::Type::Boolean

#post_idString?

Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives. Pair with post_source.

Parameters:

  • (String)

Returns:

  • (String, nil)


86
# File 'lib/whop_sdk/models/ad_create_params.rb', line 86

optional :post_id, String

#post_sourceSymbol, ...

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_textsArray<String>?

The primary text variants shown in the ad body.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


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

optional :primary_texts, WhopSDK::Internal::Type::ArrayOf[String]

#social_accountsArray<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] }

#titleString?

The display name of the ad.

Parameters:

  • (String)

Returns:

  • (String, nil)


111
# File 'lib/whop_sdk/models/ad_create_params.rb', line 111

optional :title, String

#urlString?

The URL the ad links to.

Parameters:

  • (String)

Returns:

  • (String, nil)


117
# File 'lib/whop_sdk/models/ad_create_params.rb', line 117

optional :url, String

#url_parametersObject?

Query parameters appended to the destination URL, as a string-to-string map.

Parameters:

  • (top)

Returns:

  • (Object, nil)


123
# File 'lib/whop_sdk/models/ad_create_params.rb', line 123

optional :url_parameters, WhopSDK::Internal::Type::Unknown

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/ad_create_params.rb', line 192

Instance Method Details

#to_hash{

Returns:

  • ({)


130
# File 'sig/whop_sdk/models/ad_create_params.rbs', line 130

def to_hash: -> {