Premium Full senza canale società usa il canale piattaforma come Light; in app restano solo Match Live TV e YouTube Live. Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
496 B
Ruby
26 lines
496 B
Ruby
module Youtube
|
|
class CredentialResolver
|
|
def self.for_team(team)
|
|
new(team).resolve
|
|
end
|
|
|
|
def initialize(team)
|
|
@team = team
|
|
@status = TeamStatus.new(team)
|
|
@mode = team.entitlements.plan.youtube_mode
|
|
end
|
|
|
|
def resolve
|
|
if @status.uses_platform_channel?
|
|
PlatformCredential.new
|
|
elsif @mode == "team"
|
|
@team.youtube_credential
|
|
end
|
|
end
|
|
|
|
def uses_platform_channel?
|
|
@status.uses_platform_channel?
|
|
end
|
|
end
|
|
end
|