Class: Google::Apis::DisplayvideoV1::FrequencyCap

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/displayvideo_v1/classes.rb,
lib/google/apis/displayvideo_v1/representations.rb,
lib/google/apis/displayvideo_v1/representations.rb

Overview

Settings that control the number of times a user may be shown with the same ad during a given time period.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FrequencyCap

Returns a new instance of FrequencyCap.



5340
5341
5342
# File 'lib/google/apis/displayvideo_v1/classes.rb', line 5340

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#max_impressionsFixnum

The maximum number of times a user may be shown the same ad during this period. Must be greater than 0. Required when unlimited is false and max_views is not set. Corresponds to the JSON property maxImpressions

Returns:

  • (Fixnum)


5314
5315
5316
# File 'lib/google/apis/displayvideo_v1/classes.rb', line 5314

def max_impressions
  @max_impressions
end

#time_unitString

The time unit in which the frequency cap will be applied. Required when unlimited is false. Corresponds to the JSON property timeUnit

Returns:

  • (String)


5320
5321
5322
# File 'lib/google/apis/displayvideo_v1/classes.rb', line 5320

def time_unit
  @time_unit
end

#time_unit_countFixnum

The number of time_unit the frequency cap will last. Required when unlimited is false. The following restrictions apply based on the value of time_unit: * TIME_UNIT_LIFETIME - this field is output only and will default to 1 * TIME_UNIT_MONTHS - must be between 1 and 2 * TIME_UNIT_WEEKS - must be between 1 and 4 * TIME_UNIT_DAYS - must be between 1 and 6 * TIME_UNIT_HOURS - must be between 1 and 23 * TIME_UNIT_MINUTES - must be between 1 and 59 Corresponds to the JSON property timeUnitCount

Returns:

  • (Fixnum)


5331
5332
5333
# File 'lib/google/apis/displayvideo_v1/classes.rb', line 5331

def time_unit_count
  @time_unit_count
end

#unlimitedBoolean Also known as: unlimited?

Whether unlimited frequency capping is applied. When this field is set to true, the remaining frequency cap fields are not applicable. Corresponds to the JSON property unlimited

Returns:

  • (Boolean)


5337
5338
5339
# File 'lib/google/apis/displayvideo_v1/classes.rb', line 5337

def unlimited
  @unlimited
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5345
5346
5347
5348
5349
5350
# File 'lib/google/apis/displayvideo_v1/classes.rb', line 5345

def update!(**args)
  @max_impressions = args[:max_impressions] if args.key?(:max_impressions)
  @time_unit = args[:time_unit] if args.key?(:time_unit)
  @time_unit_count = args[:time_unit_count] if args.key?(:time_unit_count)
  @unlimited = args[:unlimited] if args.key?(:unlimited)
end