Class: WhopSDK::Models::CourseUpdateParams::Chapter

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

Defined Under Namespace

Classes: Lesson

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(certificate_after_completion_enabled: nil, chapters: nil, cover_image: nil, description: nil, language: nil, require_completing_lessons_in_order: nil, tagline: nil, thumbnail: nil, title: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::CourseUpdateParams for more details.

Parameters:

  • certificate_after_completion_enabled (Boolean, nil) (defaults to: nil)

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

  • chapters (Array<WhopSDK::Models::CourseUpdateParams::Chapter>, nil) (defaults to: nil)

    The chapters and lessons to update

  • cover_image (String, nil) (defaults to: nil)

    The cover image URL of the course

  • description (String, nil) (defaults to: nil)

    A short description of the course

  • language (Symbol, WhopSDK::Models::Languages, nil) (defaults to: nil)

    The available languages for a course

  • require_completing_lessons_in_order (Boolean, nil) (defaults to: nil)

    Whether the course requires students to complete the previous lesson before movi

  • tagline (String, nil) (defaults to: nil)

    A short tagline for the course

  • thumbnail (WhopSDK::Models::CourseUpdateParams::Thumbnail, nil) (defaults to: nil)

    The thumbnail for the course in png, jpeg, or gif format

  • title (String, nil) (defaults to: nil)

    The title of the course

  • request_options (WhopSDK::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/whop_sdk/models/course_update_params.rb', line 92

class Chapter < WhopSDK::Internal::Type::BaseModel
  # @!attribute id
  #   The ID of the chapter to update
  #
  #   @return [String]
  required :id, String

  # @!attribute order
  #   The order of the chapter within its course
  #
  #   @return [Integer]
  required :order, Integer

  # @!attribute title
  #   The title of the chapter
  #
  #   @return [String]
  required :title, String

  # @!attribute lessons
  #   The lessons to update within this chapter
  #
  #   @return [Array<WhopSDK::Models::CourseUpdateParams::Chapter::Lesson>, nil]
  optional :lessons,
           -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CourseUpdateParams::Chapter::Lesson] },
           nil?: true

  # @!method initialize(id:, order:, title:, lessons: nil)
  #   Input for updating a chapter while updating a course
  #
  #   @param id [String] The ID of the chapter to update
  #
  #   @param order [Integer] The order of the chapter within its course
  #
  #   @param title [String] The title of the chapter
  #
  #   @param lessons [Array<WhopSDK::Models::CourseUpdateParams::Chapter::Lesson>, nil] The lessons to update within this chapter

  class Lesson < WhopSDK::Internal::Type::BaseModel
    # @!attribute id
    #   The ID of the lesson to update
    #
    #   @return [String]
    required :id, String

    # @!attribute chapter_id
    #   The ID of the chapter this lesson belongs to (for moving between chapters)
    #
    #   @return [String]
    required :chapter_id, String

    # @!attribute order
    #   The order of the lesson within its chapter
    #
    #   @return [Integer]
    required :order, Integer

    # @!attribute title
    #   The title of the lesson
    #
    #   @return [String]
    required :title, String

    # @!method initialize(id:, chapter_id:, order:, title:)
    #   Input for updating a lesson while updating a course
    #
    #   @param id [String] The ID of the lesson to update
    #
    #   @param chapter_id [String] The ID of the chapter this lesson belongs to (for moving between chapters)
    #
    #   @param order [Integer] The order of the lesson within its chapter
    #
    #   @param title [String] The title of the lesson
  end
end

Instance Attribute Details

#idString

The ID of the chapter to update

Returns:

  • (String)


97
# File 'lib/whop_sdk/models/course_update_params.rb', line 97

required :id, String

#lessonsArray<WhopSDK::Models::CourseUpdateParams::Chapter::Lesson>?

The lessons to update within this chapter



115
116
117
# File 'lib/whop_sdk/models/course_update_params.rb', line 115

optional :lessons,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CourseUpdateParams::Chapter::Lesson] },
nil?: true

#orderInteger

The order of the chapter within its course

Returns:

  • (Integer)


103
# File 'lib/whop_sdk/models/course_update_params.rb', line 103

required :order, Integer

#titleString

The title of the chapter

Returns:

  • (String)


109
# File 'lib/whop_sdk/models/course_update_params.rb', line 109

required :title, String