Class: Yt::Models::AdvertisingOptionsSet

Inherits:
Base
  • Object
show all
Defined in:
lib/yt/models/advertising_options_set.rb

Overview

Encapsulates advertising options of a video, such as the types of ads that can run during the video as well as the times when ads are allowed to run during the video.

Instance Method Summary collapse

Methods included from Associations::HasReports

#has_report

Methods included from Associations::HasViewerPercentages

#has_viewer_percentages

Methods included from Associations::HasOne

#has_one

Methods included from Associations::HasMany

#has_many

Methods included from Associations::HasAuthentication

#has_authentication

Constructor Details

#initialize(options = {}) ⇒ AdvertisingOptionsSet

Returns a new instance of AdvertisingOptionsSet.



10
11
12
13
# File 'lib/yt/models/advertising_options_set.rb', line 10

def initialize(options = {})
  @auth = options[:auth]
  @video_id = options[:video_id]
end

Instance Method Details

#update(attributes = {}) ⇒ Object



15
16
17
18
19
# File 'lib/yt/models/advertising_options_set.rb', line 15

def update(attributes = {})
  underscore_keys! attributes
  do_patch body: attributes
  true
end