Class: WhopSDK::Models::AdGroupCreateParams

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

Overview

See Also:

  • WhopSDK::Resources::AdGroups#create

Defined Under Namespace

Modules: BidType, BudgetType, ConversionEvent, ConversionLocation, MessageApp, Status

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(ad_campaign_id:, audiences: nil, bid_type: nil, budget_amount: nil, budget_type: nil, conversion_event: nil, conversion_location: nil, demographics: nil, desired_cost_per_result: nil, devices: nil, dynamic_creative: nil, ends_at: nil, frequency_cap: nil, languages: nil, message_apps: nil, minimum_daily_spend: nil, optimization_goal: nil, placements: nil, regions: nil, starts_at: nil, status: nil, title: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::AdGroupCreateParams for more details.

Parameters:

  • ad_campaign_id (String)

    The ad campaign to create the ad group in.

  • audiences (Object) (defaults to: nil)

    Saved-audience targeting: { include, exclude } arrays of audience IDs. Incompati

  • bid_type (Symbol, WhopSDK::Models::AdGroupCreateParams::BidType) (defaults to: nil)

    Bid strategy.

  • budget_amount (Float) (defaults to: nil)

    Ad-set budget in dollars (ABO only; omit under CBO).

  • budget_type (Symbol, WhopSDK::Models::AdGroupCreateParams::BudgetType) (defaults to: nil)

    Whether the budget is daily or lifetime.

  • conversion_event (Symbol, String, WhopSDK::Models::AdGroupCreateParams::ConversionEvent, nil) (defaults to: nil)

    The pixel event optimized for. A standard event, or any custom pixel event name.

  • conversion_location (Symbol, WhopSDK::Models::AdGroupCreateParams::ConversionLocation) (defaults to: nil)

    Where results happen: website (conversions), profile (IG/FB engagement), messagi

  • demographics (Object) (defaults to: nil)

    Demographic targeting: { automatic, minimum_age, maximum_age, gender }.

  • desired_cost_per_result (Float) (defaults to: nil)

    Target/cap cost for average_target / maximum_target.

  • devices (Object) (defaults to: nil)

    Device targeting: { platforms, operating_systems: [{ os, minimum_version }] }.

  • dynamic_creative (Boolean) (defaults to: nil)

    Run Meta dynamic (Advantage+) creative for this ad set. Set at creation; immutab

  • ends_at (String) (defaults to: nil)

    Schedule end, ISO 8601.

  • frequency_cap (Object) (defaults to: nil)

    { maximum_impressions, per_days } — only valid for reach optimization.

  • languages (Array<String>) (defaults to: nil)

    Languages to target as ISO 639 codes (e.g. en, es). Empty/omitted = all language

  • message_apps (Array<Symbol, WhopSDK::Models::AdGroupCreateParams::MessageApp>) (defaults to: nil)

    Required when conversion_location is messaging: which apps to message on. Combin

  • minimum_daily_spend (Float) (defaults to: nil)

    Daily spend floor within the budget.

  • optimization_goal (String) (defaults to: nil)

    What the ad group optimizes for (e.g. conversions, link_clicks, reach).

  • placements (Object) (defaults to: nil)

    'automatic' (Advantage+) or a list of { platform, positions }. Omit positions to

  • regions (Object) (defaults to: nil)

    Geo targeting: { include / exclude: { countries (ISO 3166-1), regions (states/pr

  • starts_at (String) (defaults to: nil)

    Schedule start, ISO 8601.

  • status (Symbol, WhopSDK::Models::AdGroupCreateParams::Status) (defaults to: nil)

    Initial status (default: active).

  • title (String) (defaults to: nil)

    The display name of the ad group.

  • request_options (WhopSDK::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 164

Instance Attribute Details

#ad_campaign_idString

The ad campaign to create the ad group in.

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 14

required :ad_campaign_id, String

#audiencesObject?

Saved-audience targeting: { include, exclude } arrays of audience IDs. Incompatible with demographics.automatic (Advantage+).

Parameters:

  • (top)

Returns:

  • (Object, nil)


21
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 21

optional :audiences, WhopSDK::Internal::Type::Unknown

#bid_typeSymbol, ...

Bid strategy.



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

optional :bid_type, enum: -> { WhopSDK::AdGroupCreateParams::BidType }

#budget_amountFloat?

Ad-set budget in dollars (ABO only; omit under CBO).

Parameters:

  • (Float)

Returns:

  • (Float, nil)


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

optional :budget_amount, Float

#budget_typeSymbol, ...

Whether the budget is daily or lifetime.



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

optional :budget_type, enum: -> { WhopSDK::AdGroupCreateParams::BudgetType }

#conversion_eventSymbol, ...

The pixel event optimized for. A standard event, or any custom pixel event name.

Parameters:

  • value (WhopSDK::Models::AdGroupCreateParams::conversion_event, nil)

Returns:



45
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 45

optional :conversion_event, union: -> { WhopSDK::AdGroupCreateParams::ConversionEvent }, nil?: true

#conversion_locationSymbol, ...

Where results happen: website (conversions), profile (IG/FB engagement), messaging (DM), on_ad (engagement on the ad, surface follows the optimization goal), or the lead destinations (instant_forms, instant_forms_and_messenger, website_and_instant_forms). The lead form itself is set on the ad.



54
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 54

optional :conversion_location, enum: -> { WhopSDK::AdGroupCreateParams::ConversionLocation }

#demographicsObject?

Demographic targeting: { automatic, minimum_age, maximum_age, gender }.

Parameters:

  • (top)

Returns:

  • (Object, nil)


60
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 60

optional :demographics, WhopSDK::Internal::Type::Unknown

#desired_cost_per_resultFloat?

Target/cap cost for average_target / maximum_target.

Parameters:

  • (Float)

Returns:

  • (Float, nil)


66
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 66

optional :desired_cost_per_result, Float

#devicesObject?

Device targeting: { platforms, operating_systems: [{ os, minimum_version }] }.

Parameters:

  • (top)

Returns:

  • (Object, nil)


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

optional :devices, WhopSDK::Internal::Type::Unknown

#dynamic_creativeBoolean?

Run Meta dynamic (Advantage+) creative for this ad set. Set at creation; immutable afterward.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


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

optional :dynamic_creative, WhopSDK::Internal::Type::Boolean

#ends_atString?

Schedule end, ISO 8601.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :ends_at, String

#frequency_capObject?

{ maximum_impressions, per_days } — only valid for reach optimization.

Parameters:

  • (top)

Returns:

  • (Object, nil)


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

optional :frequency_cap, WhopSDK::Internal::Type::Unknown

#languagesArray<String>?

Languages to target as ISO 639 codes (e.g. en, es). Empty/omitted = all languages.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


98
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 98

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

#message_appsArray<Symbol, WhopSDK::Models::AdGroupCreateParams::MessageApp>?

Required when conversion_location is messaging: which apps to message on. Combinations map to the matching Meta destination.

Returns:



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

optional :message_apps,
-> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupCreateParams::MessageApp] }

#minimum_daily_spendFloat?

Daily spend floor within the budget.

Parameters:

  • (Float)

Returns:

  • (Float, nil)


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

optional :minimum_daily_spend, Float

#optimization_goalString?

What the ad group optimizes for (e.g. conversions, link_clicks, reach).

Parameters:

  • (String)

Returns:

  • (String, nil)


118
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 118

optional :optimization_goal, String

#placementsObject?

'automatic' (Advantage+) or a list of { platform, positions }. Omit positions to target all of a platform's.

Valid positions per platform:

  • facebook: feed, right_hand_column, marketplace, search, profile_feed, notification, story, instream_video, facebook_reels, facebook_reels_overlay, biz_disco_feed
  • instagram: stream, story, explore, explore_home, reels, profile_feed, profile_reels, ig_search
  • messenger: story
  • audience_network: classic, rewarded_video
  • threads: threads_stream
  • whatsapp: status

Parameters:

  • (top)

Returns:

  • (Object, nil)


137
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 137

optional :placements, WhopSDK::Internal::Type::Unknown

#regionsObject?

Geo targeting: { include / exclude: { countries (ISO 3166-1), regions (states/provinces as ISO 3166-2, e.g. US-CA), cities (keyed), zips } }.

Parameters:

  • (top)

Returns:

  • (Object, nil)


144
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 144

optional :regions, WhopSDK::Internal::Type::Unknown

#starts_atString?

Schedule start, ISO 8601.

Parameters:

  • (String)

Returns:

  • (String, nil)


150
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 150

optional :starts_at, String

#statusSymbol, ...

Initial status (default: active).



156
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 156

optional :status, enum: -> { WhopSDK::AdGroupCreateParams::Status }

#titleString?

The display name of the ad group.

Parameters:

  • (String)

Returns:

  • (String, nil)


162
# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 162

optional :title, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/ad_group_create_params.rb', line 222

Instance Method Details

#to_hash{

Returns:

  • ({)


154
# File 'sig/whop_sdk/models/ad_group_create_params.rbs', line 154

def to_hash: -> {