Class: Google::Apis::YoutubeV3::Sponsor

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/youtube_v3/classes.rb,
generated/google/apis/youtube_v3/representations.rb,
generated/google/apis/youtube_v3/representations.rb

Overview

A sponsor resource represents a sponsor for a YouTube channel. A sponsor provides recurring monetary support to a creator and receives special benefits.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Sponsor

Returns a new instance of Sponsor



6349
6350
6351
# File 'generated/google/apis/youtube_v3/classes.rb', line 6349

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#etagString

Etag of this resource. Corresponds to the JSON property etag

Returns:

  • (String)


6331
6332
6333
# File 'generated/google/apis/youtube_v3/classes.rb', line 6331

def etag
  @etag
end

#idString

The ID that YouTube assigns to uniquely identify the sponsor. Corresponds to the JSON property id

Returns:

  • (String)


6336
6337
6338
# File 'generated/google/apis/youtube_v3/classes.rb', line 6336

def id
  @id
end

#kindString

Identifies what kind of resource this is. Value: the fixed string "youtube# sponsor". Corresponds to the JSON property kind

Returns:

  • (String)


6342
6343
6344
# File 'generated/google/apis/youtube_v3/classes.rb', line 6342

def kind
  @kind
end

#snippetGoogle::Apis::YoutubeV3::SponsorSnippet

The snippet object contains basic details about the sponsor. Corresponds to the JSON property snippet



6347
6348
6349
# File 'generated/google/apis/youtube_v3/classes.rb', line 6347

def snippet
  @snippet
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6354
6355
6356
6357
6358
6359
# File 'generated/google/apis/youtube_v3/classes.rb', line 6354

def update!(**args)
  @etag = args[:etag] if args.key?(:etag)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @snippet = args[:snippet] if args.key?(:snippet)
end