class Google::Apis::DisplayvideoV1::FrequencyCap

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

Attributes

max_impressions[RW]

The maximum number of times a user may be shown with the same ad during this period. Must be greater than 0. Required when unlimited is `false`. Corresponds to the JSON property `maxImpressions` @return [Fixnum]

time_unit[RW]

The time unit in which the frequency cap will be applied. Required when unlimited is `false`. Corresponds to the JSON property `timeUnit` @return [String]

time_unit_count[RW]

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` @return [Fixnum]

unlimited[RW]

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` @return [Boolean]

unlimited?[RW]

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` @return [Boolean]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/displayvideo_v1/classes.rb, line 4639
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/displayvideo_v1/classes.rb, line 4644
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