Class: WhopSDK::Models::CourseChapter::Lesson

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

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

An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content.

Parameters:

  • id (String)

    The unique identifier for the lesson.

  • order (Integer)

    The sort position of this lesson within its parent chapter, starting from zero.

  • title (String)

    The display name of the lesson shown to students. Maximum 120 characters.



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/whop_sdk/models/course_chapter.rb', line 47

class Lesson < WhopSDK::Internal::Type::BaseModel
  # @!attribute id
  #   The unique identifier for the lesson.
  #
  #   @return [String]
  required :id, String

  # @!attribute order
  #   The sort position of this lesson within its parent chapter, starting from zero.
  #
  #   @return [Integer]
  required :order, Integer

  # @!attribute title
  #   The display name of the lesson shown to students. Maximum 120 characters.
  #
  #   @return [String]
  required :title, String

  # @!method initialize(id:, order:, title:)
  #   An individual learning unit within a chapter, which can contain text, video,
  #   PDF, or assessment content.
  #
  #   @param id [String] The unique identifier for the lesson.
  #
  #   @param order [Integer] The sort position of this lesson within its parent chapter, starting from zero.
  #
  #   @param title [String] The display name of the lesson shown to students. Maximum 120 characters.
end

Instance Attribute Details

#idString

The unique identifier for the lesson.

Returns:

  • (String)


52
# File 'lib/whop_sdk/models/course_chapter.rb', line 52

required :id, String

#orderInteger

The sort position of this lesson within its parent chapter, starting from zero.

Returns:

  • (Integer)


58
# File 'lib/whop_sdk/models/course_chapter.rb', line 58

required :order, Integer

#titleString

The display name of the lesson shown to students. Maximum 120 characters.

Returns:

  • (String)


64
# File 'lib/whop_sdk/models/course_chapter.rb', line 64

required :title, String