Class: WhopSDK::Models::AdCampaign

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/ad_campaign.rb

Overview

Defined Under Namespace

Classes: CreatedByUser, MetaConfig

Instance Attribute Summary collapse

Instance Method Summary collapse

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(id:, name:, username:) ⇒ Object

The user who created this ad campaign.

Parameters:

  • id (String)

    The unique identifier for the user.

  • name (String, nil)

    The user’s display name shown on their public profile.

  • username (String)

    The user’s unique username shown on their public profile.



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

Instance Attribute Details

#budgetFloat?

Total budget in dollars.

Returns:

  • (Float, nil)


17
# File 'lib/whop_sdk/models/ad_campaign.rb', line 17

required :budget, Float, nil?: true

#budget_typeSymbol, ...

The budget type for an ad campaign or ad group.

Returns:



23
# File 'lib/whop_sdk/models/ad_campaign.rb', line 23

required :budget_type, enum: -> { WhopSDK::AdBudgetType }, nil?: true

#created_atTime

When the ad campaign was created.

Returns:

  • (Time)


29
# File 'lib/whop_sdk/models/ad_campaign.rb', line 29

required :created_at, Time

#created_by_userWhopSDK::Models::AdCampaign::CreatedByUser

The user who created this ad campaign.



35
# File 'lib/whop_sdk/models/ad_campaign.rb', line 35

required :created_by_user, -> { WhopSDK::AdCampaign::CreatedByUser }

#idString

The unique identifier for this ad campaign.

Returns:

  • (String)


11
# File 'lib/whop_sdk/models/ad_campaign.rb', line 11

required :id, String

#meta_configWhopSDK::Models::AdCampaign::MetaConfig?

Meta-specific campaign configuration (objective, budget mode, etc.). Null for non-Meta campaigns.



42
# File 'lib/whop_sdk/models/ad_campaign.rb', line 42

required :meta_config, -> { WhopSDK::AdCampaign::MetaConfig }, nil?: true

#platformSymbol, WhopSDK::Models::AdCampaignPlatform

The external ad platform this campaign is running on (e.g., meta, tiktok).



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

required :platform, enum: -> { WhopSDK::AdCampaignPlatform }

#statusSymbol, WhopSDK::Models::AdCampaignStatus

Current status of the campaign (active, paused, or inactive).



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

required :status, enum: -> { WhopSDK::AdCampaignStatus }

#titleString

The campaign name shown in the Whop dashboard.

Returns:

  • (String)


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

required :title, String

#total_spendFloat

Total amount spent in dollars.

Returns:

  • (Float)


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

required :total_spend, Float

#updated_atTime

When the ad campaign was last updated.

Returns:

  • (Time)


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

required :updated_at, Time