Class: WhopSDK::Models::AdCampaignCreateParams

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

Overview

See Also:

  • WhopSDK::Resources::AdCampaigns#create

Defined Under Namespace

Modules: BidType, BudgetOptimization, BudgetType, Objective, Platform, SpecialAdCategory

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(objective:, platform:, title:, account_id: nil, bid_type: nil, budget_amount: nil, budget_optimization: nil, budget_type: nil, desired_cost_per_result: nil, ends_at: nil, special_ad_categories: nil, starts_at: nil, request_options: {}) ⇒ Object

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

Parameters:



# File 'lib/whop_sdk/models/ad_campaign_create_params.rb', line 90

Instance Attribute Details

#account_idString?

The account to create the campaign under. Defaults to the account-scoped key's own account.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :account_id, String

#bid_typeSymbol, ...

CBO bid strategy: minimum_cost (lowest cost), average_target (cost cap), or maximum_target (bid cap). CBO only.



40
# File 'lib/whop_sdk/models/ad_campaign_create_params.rb', line 40

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

#budget_amountFloat?

The campaign budget, in USD. Required for CBO (budget_optimization: ad_campaign); omit for ABO.

Parameters:

  • (Float)

Returns:

  • (Float, nil)


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

optional :budget_amount, Float

#budget_optimizationSymbol, ...

Which level owns the budget — the campaign (CBO) or each ad group (ABO). Defaults to ad_group.



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

optional :budget_optimization, enum: -> { WhopSDK::AdCampaignCreateParams::BudgetOptimization }

#budget_typeSymbol, ...

Whether the budget is spent per day or over the campaign's lifetime. Defaults to daily.



61
# File 'lib/whop_sdk/models/ad_campaign_create_params.rb', line 61

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

#desired_cost_per_resultFloat?

Target/cap cost per result in USD for average_target / maximum_target bidding. CBO only.

Parameters:

  • (Float)

Returns:

  • (Float, nil)


68
# File 'lib/whop_sdk/models/ad_campaign_create_params.rb', line 68

optional :desired_cost_per_result, Float

#ends_atString?

Campaign schedule end (ISO 8601). CBO only.

Parameters:

  • (String)

Returns:

  • (String, nil)


74
# File 'lib/whop_sdk/models/ad_campaign_create_params.rb', line 74

optional :ends_at, String

#objectiveSymbol, WhopSDK::Models::AdCampaignCreateParams::Objective

The goal the campaign optimizes toward.

Parameters:

  • value (WhopSDK::Models::AdCampaignCreateParams::objective)

Returns:



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

required :objective, enum: -> { WhopSDK::AdCampaignCreateParams::Objective }

#platformSymbol, WhopSDK::Models::AdCampaignCreateParams::Platform

The ad network the campaign runs on.

Parameters:

  • value (WhopSDK::Models::AdCampaignCreateParams::platform)

Returns:



20
# File 'lib/whop_sdk/models/ad_campaign_create_params.rb', line 20

required :platform, enum: -> { WhopSDK::AdCampaignCreateParams::Platform }

#special_ad_categoriesArray<Symbol, WhopSDK::Models::AdCampaignCreateParams::SpecialAdCategory>?

Regulated categories the campaign falls under. Ads in these categories are subject to extra targeting restrictions.



81
82
# File 'lib/whop_sdk/models/ad_campaign_create_params.rb', line 81

optional :special_ad_categories,
-> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdCampaignCreateParams::SpecialAdCategory] }

#starts_atString?

Campaign schedule start (ISO 8601). CBO only.

Parameters:

  • (String)

Returns:

  • (String, nil)


88
# File 'lib/whop_sdk/models/ad_campaign_create_params.rb', line 88

optional :starts_at, String

#titleString

The title of the campaign.

Parameters:

  • value (String)

Returns:

  • (String)


26
# File 'lib/whop_sdk/models/ad_campaign_create_params.rb', line 26

required :title, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/ad_campaign_create_params.rb', line 130

Instance Method Details

#to_hash{

Returns:

  • ({)


90
# File 'sig/whop_sdk/models/ad_campaign_create_params.rbs', line 90

def to_hash: -> {