Class: WhopSDK::Models::AdGroupUpdateParams::Config

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

Defined Under Namespace

Modules: BidStrategy, BillingEvent, OptimizationGoal, Pacing Classes: Targeting

Instance Attribute Summary collapse

Class Method 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(bid_amount: nil, bid_strategy: nil, billing_event: nil, end_time: nil, frequency_cap: nil, frequency_cap_interval_days: nil, optimization_goal: nil, pacing: nil, start_time: nil, targeting: nil) ⇒ Object

Unified ad group configuration (bidding, optimization, targeting).

Parameters:



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 76

class Config < WhopSDK::Internal::Type::BaseModel
  # @!attribute bid_amount
  #   Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap.
  #
  #   @return [Integer, nil]
  optional :bid_amount, Integer, nil?: true

  # @!attribute bid_strategy
  #   Bid strategy: lowest_cost, bid_cap, or cost_cap.
  #
  #   @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::BidStrategy, nil]
  optional :bid_strategy, enum: -> { WhopSDK::AdGroupUpdateParams::Config::BidStrategy }, nil?: true

  # @!attribute billing_event
  #   How you are billed (e.g., impressions, clicks).
  #
  #   @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::BillingEvent, nil]
  optional :billing_event, enum: -> { WhopSDK::AdGroupUpdateParams::Config::BillingEvent }, nil?: true

  # @!attribute end_time
  #   Scheduled end time (ISO8601). Required for lifetime budgets.
  #
  #   @return [String, nil]
  optional :end_time, String, nil?: true

  # @!attribute frequency_cap
  #   Maximum number of times to show ads to each person in the frequency interval.
  #
  #   @return [Integer, nil]
  optional :frequency_cap, Integer, nil?: true

  # @!attribute frequency_cap_interval_days
  #   Number of days for the frequency cap interval.
  #
  #   @return [Integer, nil]
  optional :frequency_cap_interval_days, Integer, nil?: true

  # @!attribute optimization_goal
  #   What the ad group optimizes for (e.g., conversions, link_clicks, reach).
  #
  #   @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::OptimizationGoal, nil]
  optional :optimization_goal,
           enum: -> { WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal },
           nil?: true

  # @!attribute pacing
  #   Budget pacing: standard (even) or accelerated (fast).
  #
  #   @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Pacing, nil]
  optional :pacing, enum: -> { WhopSDK::AdGroupUpdateParams::Config::Pacing }, nil?: true

  # @!attribute start_time
  #   Scheduled start time (ISO8601).
  #
  #   @return [String, nil]
  optional :start_time, String, nil?: true

  # @!attribute targeting
  #   Audience targeting settings (demographics, geo, interests, audiences, devices).
  #
  #   @return [WhopSDK::Models::AdGroupUpdateParams::Config::Targeting, nil]
  optional :targeting, -> { WhopSDK::AdGroupUpdateParams::Config::Targeting }, nil?: true

  # @!method initialize(bid_amount: nil, bid_strategy: nil, billing_event: nil, end_time: nil, frequency_cap: nil, frequency_cap_interval_days: nil, optimization_goal: nil, pacing: nil, start_time: nil, targeting: nil)
  #   Unified ad group configuration (bidding, optimization, targeting).
  #
  #   @param bid_amount [Integer, nil] Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap.
  #
  #   @param bid_strategy [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::BidStrategy, nil] Bid strategy: lowest_cost, bid_cap, or cost_cap.
  #
  #   @param billing_event [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::BillingEvent, nil] How you are billed (e.g., impressions, clicks).
  #
  #   @param end_time [String, nil] Scheduled end time (ISO8601). Required for lifetime budgets.
  #
  #   @param frequency_cap [Integer, nil] Maximum number of times to show ads to each person in the frequency interval.
  #
  #   @param frequency_cap_interval_days [Integer, nil] Number of days for the frequency cap interval.
  #
  #   @param optimization_goal [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::OptimizationGoal, nil] What the ad group optimizes for (e.g., conversions, link_clicks, reach).
  #
  #   @param pacing [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Pacing, nil] Budget pacing: standard (even) or accelerated (fast).
  #
  #   @param start_time [String, nil] Scheduled start time (ISO8601).
  #
  #   @param targeting [WhopSDK::Models::AdGroupUpdateParams::Config::Targeting, nil] Audience targeting settings (demographics, geo, interests, audiences, devices).

  # Bid strategy: lowest_cost, bid_cap, or cost_cap.
  #
  # @see WhopSDK::Models::AdGroupUpdateParams::Config#bid_strategy
  module BidStrategy
    extend WhopSDK::Internal::Type::Enum

    LOWEST_COST = :lowest_cost
    BID_CAP = :bid_cap
    COST_CAP = :cost_cap

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # How you are billed (e.g., impressions, clicks).
  #
  # @see WhopSDK::Models::AdGroupUpdateParams::Config#billing_event
  module BillingEvent
    extend WhopSDK::Internal::Type::Enum

    IMPRESSIONS = :impressions
    CLICKS = :clicks
    OPTIMIZED_CPM = :optimized_cpm
    VIDEO_VIEWS = :video_views

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # What the ad group optimizes for (e.g., conversions, link_clicks, reach).
  #
  # @see WhopSDK::Models::AdGroupUpdateParams::Config#optimization_goal
  module OptimizationGoal
    extend WhopSDK::Internal::Type::Enum

    CONVERSIONS = :conversions
    LINK_CLICKS = :link_clicks
    LANDING_PAGE_VIEWS = :landing_page_views
    REACH = :reach
    IMPRESSIONS = :impressions
    APP_INSTALLS = :app_installs
    VIDEO_VIEWS = :video_views
    LEAD_GENERATION = :lead_generation
    VALUE = :value
    PAGE_LIKES = :page_likes
    CONVERSATIONS = :conversations
    AD_RECALL_LIFT = :ad_recall_lift
    TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :two_second_continuous_video_views
    POST_ENGAGEMENT = :post_engagement
    EVENT_RESPONSES = :event_responses
    REMINDERS_SET = :reminders_set
    QUALITY_LEAD = :quality_lead

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # Budget pacing: standard (even) or accelerated (fast).
  #
  # @see WhopSDK::Models::AdGroupUpdateParams::Config#pacing
  module Pacing
    extend WhopSDK::Internal::Type::Enum

    STANDARD = :standard
    ACCELERATED = :accelerated

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see WhopSDK::Models::AdGroupUpdateParams::Config#targeting
  class Targeting < WhopSDK::Internal::Type::BaseModel
    # @!attribute age_max
    #   Maximum age for demographic targeting.
    #
    #   @return [Integer, nil]
    optional :age_max, Integer, nil?: true

    # @!attribute age_min
    #   Minimum age for demographic targeting.
    #
    #   @return [Integer, nil]
    optional :age_min, Integer, nil?: true

    # @!attribute countries
    #   ISO 3166-1 alpha-2 country codes to target.
    #
    #   @return [Array<String>, nil]
    optional :countries, WhopSDK::Internal::Type::ArrayOf[String], nil?: true

    # @!attribute device_platforms
    #   Device platforms to target.
    #
    #   @return [Array<Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::DevicePlatform>, nil]
    optional :device_platforms,
             -> {
               WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupUpdateParams::Config::Targeting::DevicePlatform]
             },
             nil?: true

    # @!attribute exclude_audience_ids
    #   Platform audience IDs to exclude.
    #
    #   @return [Array<String>, nil]
    optional :exclude_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true

    # @!attribute genders
    #   Genders to target.
    #
    #   @return [Array<Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::Gender>, nil]
    optional :genders,
             -> {
               WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupUpdateParams::Config::Targeting::Gender]
             },
             nil?: true

    # @!attribute include_audience_ids
    #   Platform audience IDs to include.
    #
    #   @return [Array<String>, nil]
    optional :include_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true

    # @!attribute interest_ids
    #   Platform-specific interest IDs to target.
    #
    #   @return [Array<String>, nil]
    optional :interest_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true

    # @!attribute languages
    #   Language codes to target.
    #
    #   @return [Array<String>, nil]
    optional :languages, WhopSDK::Internal::Type::ArrayOf[String], nil?: true

    # @!attribute placement_type
    #   Placement strategy for ad delivery.
    #
    #   @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::PlacementType, nil]
    optional :placement_type,
             enum: -> { WhopSDK::AdGroupUpdateParams::Config::Targeting::PlacementType },
             nil?: true

    # @!method initialize(age_max: nil, age_min: nil, countries: nil, device_platforms: nil, exclude_audience_ids: nil, genders: nil, include_audience_ids: nil, interest_ids: nil, languages: nil, placement_type: nil)
    #   Audience targeting settings (demographics, geo, interests, audiences, devices).
    #
    #   @param age_max [Integer, nil] Maximum age for demographic targeting.
    #
    #   @param age_min [Integer, nil] Minimum age for demographic targeting.
    #
    #   @param countries [Array<String>, nil] ISO 3166-1 alpha-2 country codes to target.
    #
    #   @param device_platforms [Array<Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::DevicePlatform>, nil] Device platforms to target.
    #
    #   @param exclude_audience_ids [Array<String>, nil] Platform audience IDs to exclude.
    #
    #   @param genders [Array<Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::Gender>, nil] Genders to target.
    #
    #   @param include_audience_ids [Array<String>, nil] Platform audience IDs to include.
    #
    #   @param interest_ids [Array<String>, nil] Platform-specific interest IDs to target.
    #
    #   @param languages [Array<String>, nil] Language codes to target.
    #
    #   @param placement_type [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::PlacementType, nil] Placement strategy for ad delivery.

    # Device platform targeting options.
    module DevicePlatform
      extend WhopSDK::Internal::Type::Enum

      MOBILE = :mobile
      DESKTOP = :desktop

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    # Gender targeting options.
    module Gender
      extend WhopSDK::Internal::Type::Enum

      MALE = :male
      FEMALE = :female
      ALL = :all

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    # Placement strategy for ad delivery.
    #
    # @see WhopSDK::Models::AdGroupUpdateParams::Config::Targeting#placement_type
    module PlacementType
      extend WhopSDK::Internal::Type::Enum

      AUTOMATIC = :automatic
      MANUAL = :manual

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end
end

Instance Attribute Details

#bid_amountInteger?

Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap.

Returns:

  • (Integer, nil)


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

optional :bid_amount, Integer, nil?: true

#bid_strategySymbol, ...

Bid strategy: lowest_cost, bid_cap, or cost_cap.



87
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 87

optional :bid_strategy, enum: -> { WhopSDK::AdGroupUpdateParams::Config::BidStrategy }, nil?: true

#billing_eventSymbol, ...

How you are billed (e.g., impressions, clicks).



93
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 93

optional :billing_event, enum: -> { WhopSDK::AdGroupUpdateParams::Config::BillingEvent }, nil?: true

#end_timeString?

Scheduled end time (ISO8601). Required for lifetime budgets.

Returns:

  • (String, nil)


99
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 99

optional :end_time, String, nil?: true

#frequency_capInteger?

Maximum number of times to show ads to each person in the frequency interval.

Returns:

  • (Integer, nil)


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

optional :frequency_cap, Integer, nil?: true

#frequency_cap_interval_daysInteger?

Number of days for the frequency cap interval.

Returns:

  • (Integer, nil)


111
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 111

optional :frequency_cap_interval_days, Integer, nil?: true

#optimization_goalSymbol, ...

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



117
118
119
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 117

optional :optimization_goal,
enum: -> { WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal },
nil?: true

#pacingSymbol, ...

Budget pacing: standard (even) or accelerated (fast).



125
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 125

optional :pacing, enum: -> { WhopSDK::AdGroupUpdateParams::Config::Pacing }, nil?: true

#start_timeString?

Scheduled start time (ISO8601).

Returns:

  • (String, nil)


131
# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 131

optional :start_time, String, nil?: true

#targetingWhopSDK::Models::AdGroupUpdateParams::Config::Targeting?

Audience targeting settings (demographics, geo, interests, audiences, devices).



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

optional :targeting, -> { WhopSDK::AdGroupUpdateParams::Config::Targeting }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/ad_group_update_params.rb', line 172