Class: WhopSDK::Models::Course

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/course.rb

Overview

Defined Under Namespace

Classes: Chapter, Thumbnail

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(duration_seconds:, signed_playback_id:, signed_thumbnail_playback_token:) ⇒ Object

The Mux video asset for video-type lessons, used for streaming playback. Null if this lesson has no hosted video.

Parameters:

  • duration_seconds (Integer, nil)

    The duration of the video in seconds

  • signed_playback_id (String, nil)

    The signed playback ID of the Mux asset

  • signed_thumbnail_playback_token (String, nil)

    The signed thumbnail playback token of the Mux asset



# File 'lib/whop_sdk/models/course.rb', line 276

Instance Attribute Details

#certificate_after_completion_enabledBoolean?

Whether students receive a PDF certificate after completing all lessons in this course. Null if the setting has not been configured.

Returns:

  • (Boolean, nil)


18
# File 'lib/whop_sdk/models/course.rb', line 18

required :certificate_after_completion_enabled, WhopSDK::Internal::Type::Boolean, nil?: true

#chaptersArray<WhopSDK::Models::Course::Chapter>

An ordered list of all chapters in this course, sorted by their display position.



25
# File 'lib/whop_sdk/models/course.rb', line 25

required :chapters, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Course::Chapter] }

#cover_imageString?

The URL of the course cover image shown on preview cards. Null if no cover image has been uploaded.

Returns:

  • (String, nil)


32
# File 'lib/whop_sdk/models/course.rb', line 32

required :cover_image, String, nil?: true

#created_atTime

The datetime the course was created.

Returns:

  • (Time)


38
# File 'lib/whop_sdk/models/course.rb', line 38

required :created_at, Time

#descriptionString?

A brief summary of the course content and objectives. Null if no description has been set.

Returns:

  • (String, nil)


45
# File 'lib/whop_sdk/models/course.rb', line 45

required :description, String, nil?: true

#idString

The unique identifier for the course.

Returns:

  • (String)


11
# File 'lib/whop_sdk/models/course.rb', line 11

required :id, String

#languageSymbol, WhopSDK::Models::Languages

The spoken language of the video content, used to generate accurate closed captions. One of: en, es, it, pt, de, fr, pl, ru, nl, ca, tr, sv, uk, no, fi, sk, el, cs, hr, da, ro, bg.

Returns:



53
# File 'lib/whop_sdk/models/course.rb', line 53

required :language, enum: -> { WhopSDK::Languages }

#orderString

The sort position of this course within its parent experience, as a decimal for flexible ordering.

Returns:

  • (String)


60
# File 'lib/whop_sdk/models/course.rb', line 60

required :order, String

#require_completing_lessons_in_orderBoolean

Whether students must complete each lesson sequentially before advancing to the next one.

Returns:

  • (Boolean)


67
# File 'lib/whop_sdk/models/course.rb', line 67

required :require_completing_lessons_in_order, WhopSDK::Internal::Type::Boolean

#taglineString?

A short marketing tagline displayed beneath the course title. Null if no tagline has been set.

Returns:

  • (String, nil)


74
# File 'lib/whop_sdk/models/course.rb', line 74

required :tagline, String, nil?: true

#thumbnailWhopSDK::Models::Course::Thumbnail?

The thumbnail image displayed on course cards and previews. Null if no thumbnail has been uploaded.



81
# File 'lib/whop_sdk/models/course.rb', line 81

required :thumbnail, -> { WhopSDK::Course::Thumbnail }, nil?: true

#titleString?

The display name of the course shown to students. Null if no title has been set.

Returns:

  • (String, nil)


87
# File 'lib/whop_sdk/models/course.rb', line 87

required :title, String, nil?: true

#updated_atTime

The datetime the course was last updated.

Returns:

  • (Time)


93
# File 'lib/whop_sdk/models/course.rb', line 93

required :updated_at, Time

#visibilitySymbol, WhopSDK::Models::CourseVisibilities

The visibility setting that controls whether this course appears to students. One of: visible, hidden.



100
# File 'lib/whop_sdk/models/course.rb', line 100

required :visibility, enum: -> { WhopSDK::CourseVisibilities }