Class: Google::Apis::DisplayvideoV3::FrequencyCap
- Inherits:
-
Object
- Object
- Google::Apis::DisplayvideoV3::FrequencyCap
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/displayvideo_v3/classes.rb,
lib/google/apis/displayvideo_v3/representations.rb,
lib/google/apis/displayvideo_v3/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
-
#max_impressions ⇒ Fixnum
The maximum number of times a user may be shown the same ad during this period.
-
#max_views ⇒ Fixnum
Optional.
-
#time_unit ⇒ String
The time unit in which the frequency cap will be applied.
-
#time_unit_count ⇒ Fixnum
The number of time_unit the frequency cap will last.
-
#unlimited ⇒ Boolean
(also: #unlimited?)
Whether unlimited frequency capping is applied.
Instance Method Summary collapse
-
#initialize(**args) ⇒ FrequencyCap
constructor
A new instance of FrequencyCap.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ FrequencyCap
Returns a new instance of FrequencyCap.
7653 7654 7655 |
# File 'lib/google/apis/displayvideo_v3/classes.rb', line 7653 def initialize(**args) update!(**args) end |
Instance Attribute Details
#max_impressions ⇒ Fixnum
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
7621 7622 7623 |
# File 'lib/google/apis/displayvideo_v3/classes.rb', line 7621 def max_impressions @max_impressions end |
#max_views ⇒ Fixnum
Optional. The maximum number of times a user may click-through or fully view
an ad during this period until it is no longer served to them. Must be greater
than 0. Only applicable to YouTube and Partners resources. Required when
unlimited is false and max_impressions is not set.
Corresponds to the JSON property maxViews
7629 7630 7631 |
# File 'lib/google/apis/displayvideo_v3/classes.rb', line 7629 def max_views @max_views end |
#time_unit ⇒ String
The time unit in which the frequency cap will be applied. Required when
unlimited is false.
Corresponds to the JSON property timeUnit
7635 7636 7637 |
# File 'lib/google/apis/displayvideo_v3/classes.rb', line 7635 def time_unit @time_unit end |
#time_unit_count ⇒ Fixnum
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_MONTHS - must be 1 * 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
7644 7645 7646 |
# File 'lib/google/apis/displayvideo_v3/classes.rb', line 7644 def time_unit_count @time_unit_count end |
#unlimited ⇒ Boolean 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
7650 7651 7652 |
# File 'lib/google/apis/displayvideo_v3/classes.rb', line 7650 def unlimited @unlimited end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7658 7659 7660 7661 7662 7663 7664 |
# File 'lib/google/apis/displayvideo_v3/classes.rb', line 7658 def update!(**args) @max_impressions = args[:max_impressions] if args.key?(:max_impressions) @max_views = args[:max_views] if args.key?(:max_views) @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 |