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(id: , lesson_type: , order: , title: ) ⇒ Object

A lesson from the courses app

Parameters:

  • id (String) (defaults to: )

    The ID of the lesson

  • lesson_type (Symbol, WhopSDK::Models::LessonTypes) (defaults to: )

    The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)

  • order (Integer) (defaults to: )

    The order of the lesson within its chapter

  • title (String) (defaults to: )

    The title of the lesson



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

Instance Attribute Details

#certificate_after_completion_enabledBoolean?

Whether the course will award its students a PDF certificate after completing all lessons

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>

The chapters in this course



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

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

#created_atTime

The timestamp of when the course was created

Returns:

  • (Time)


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

required :created_at, Time

#descriptionString?

A short description of the course

Returns:

  • (String, nil)


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

required :description, String, nil?: true

#idString

The ID of the course. Looks like cors_XXX

Returns:

  • (String)


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

required :id, String

#languageSymbol, WhopSDK::Models::Languages

The language spoken in the video content of the course, used to generate closed captions in the right language

Returns:



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

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

#orderString

The order of the course within its experience

Returns:

  • (String)


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

required :order, String

#require_completing_lessons_in_orderBoolean

Whether the course requires students to complete the previous lesson before moving on to the next one

Returns:

  • (Boolean)


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

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

#taglineString?

A short tagline for the course. It is displayed under the course title in the UI

Returns:

  • (String, nil)


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

required :tagline, String, nil?: true

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

The thumbnail for the course



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

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

#titleString?

The title of the course

Returns:

  • (String, nil)


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

required :title, String, nil?: true

#updated_atTime

The timestamp of when the course was last updated

Returns:

  • (Time)


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

required :updated_at, Time

#visibilitySymbol, WhopSDK::Models::CourseVisibilities

The visibility of the course. Determines how / whether this course is visible to users.



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

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