class Yt::Models::AdvertisingOptionsSet
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. @see developers.google.com/youtube/partner/docs/v1/videoAdvertisingOptions#resource
Public Class Methods
new(options = {})
click to toggle source
# 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
Public Instance Methods
update(attributes = {})
click to toggle source
# 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
Private Instance Methods
patch_params()
click to toggle source
@see developers.google.com/youtube/partner/docs/v1/videoAdvertisingOptions/patch
Calls superclass method
# File lib/yt/models/advertising_options_set.rb, line 29 def patch_params super.tap do |params| params[:expected_response] = Net::HTTPOK params[:path] = "/youtube/partner/v1/videoAdvertisingOptions/#{@video_id}" params[:params] = {on_behalf_of_content_owner: @auth.owner_name} end end