Class: WhopSDK::Models::Ad

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

Overview

Defined Under Namespace

Classes: AdCampaign, AdGroup

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:) ⇒ Object

The ad campaign this ad belongs to.

Parameters:

  • id (String)

    The unique identifier for this ad campaign.



# File 'lib/whop_sdk/models/ad.rb', line 55

Instance Attribute Details

#ad_campaignWhopSDK::Models::Ad::AdCampaign

The ad campaign this ad belongs to.



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

required :ad_campaign, -> { WhopSDK::Ad::AdCampaign }

#ad_groupWhopSDK::Models::Ad::AdGroup

The parent ad group this ad belongs to.



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

required :ad_group, -> { WhopSDK::Ad::AdGroup }

#created_atTime

When the ad was created.

Returns:

  • (Time)


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

required :created_at, Time

#idString

The unique identifier for this ad.

Returns:

  • (String)


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

required :id, String

#platformSymbol, WhopSDK::Models::AdCampaignPlatform

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



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

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

#statusSymbol, WhopSDK::Models::ExternalAdStatus

Current delivery status of the ad.



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

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

#titleString?

The display title of the ad. Falls back to the creative set caption when unset.

Returns:

  • (String, nil)


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

required :title, String, nil?: true

#updated_atTime

When the ad was last updated.

Returns:

  • (Time)


53
# File 'lib/whop_sdk/models/ad.rb', line 53

required :updated_at, Time