Class: WhopSDK::Models::AdUpdateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/whop_sdk/models/ad_update_params.rb,
sig/whop_sdk/models/ad_update_params.rbs

Overview

See Also:

  • WhopSDK::Resources::Ads#update

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_update_params.rb', line 117

Instance Attribute Details

#call_to_actionSymbol, ...

The call-to-action button shown on the ad.



19
# File 'lib/whop_sdk/models/ad_update_params.rb', line 19

optional :call_to_action, enum: -> { WhopSDK::AdUpdateParams::CallToAction }

#creativesArray<WhopSDK::Models::AdUpdateParams::Creative>?

The ad's creative assets. Each entry is an uploaded file id with an optional format; omit format for the original asset. Replaces a live ad's creative on the platform.



27
# File 'lib/whop_sdk/models/ad_update_params.rb', line 27

optional :creatives, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdUpdateParams::Creative] }

#descriptionsArray<String>?

The description variants shown on the ad.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


33
# File 'lib/whop_sdk/models/ad_update_params.rb', line 33

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

#headlinesArray<String>?

The headline variants shown on the ad.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


39
# File 'lib/whop_sdk/models/ad_update_params.rb', line 39

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

#idString

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/whop_sdk/models/ad_update_params.rb', line 13

required :id, String

#lead_formWhopSDK::Models::AdUpdateParams::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.



48
# File 'lib/whop_sdk/models/ad_update_params.rb', line 48

optional :lead_form, -> { WhopSDK::AdUpdateParams::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. Replaces a stored lead_form.

Parameters:

  • (String)

Returns:

  • (String, nil)


57
# File 'lib/whop_sdk/models/ad_update_params.rb', line 57

optional :lead_form_id, String

#messaging_configWhopSDK::Models::AdUpdateParams::MessagingConfig?

Click-to-message welcome copy: the greeting (message) and the ice-breaker prompt (keyword).



64
# File 'lib/whop_sdk/models/ad_update_params.rb', line 64

optional :messaging_config, -> { WhopSDK::AdUpdateParams::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)


71
# File 'lib/whop_sdk/models/ad_update_params.rb', line 71

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)


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

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.



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

optional :post_source, enum: -> { WhopSDK::AdUpdateParams::PostSource }

#primary_textsArray<String>?

The primary text variants shown in the ad body.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


91
# File 'lib/whop_sdk/models/ad_update_params.rb', line 91

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

#social_accountsArray<WhopSDK::Models::AdUpdateParams::SocialAccount>?

The social accounts the ad runs under.



97
# File 'lib/whop_sdk/models/ad_update_params.rb', line 97

optional :social_accounts, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdUpdateParams::SocialAccount] }

#titleString?

The display name of the ad.

Parameters:

  • (String)

Returns:

  • (String, nil)


103
# File 'lib/whop_sdk/models/ad_update_params.rb', line 103

optional :title, String

#urlString?

The URL the ad links to.

Parameters:

  • (String)

Returns:

  • (String, nil)


109
# File 'lib/whop_sdk/models/ad_update_params.rb', line 109

optional :url, String

#url_parametersObject?

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

Parameters:

  • (top)

Returns:

  • (Object, nil)


115
# File 'lib/whop_sdk/models/ad_update_params.rb', line 115

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


122
# File 'sig/whop_sdk/models/ad_update_params.rbs', line 122

def to_hash: -> {