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

Constructor Details

#initialize(options = {}) ⇒ AdvertisingOptionsSet


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

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

Instance Method Details

#update(attributes = {}) ⇒ Object


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

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