whop_sdk 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +4 -0
  5. data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
  6. data/lib/whop_sdk/models/app_update_params.rb +53 -29
  7. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +115 -39
  8. data/lib/whop_sdk/models/company.rb +13 -1
  9. data/lib/whop_sdk/models/company_create_params.rb +46 -0
  10. data/lib/whop_sdk/models/company_list_params.rb +62 -0
  11. data/lib/whop_sdk/models/company_list_response.rb +175 -0
  12. data/lib/whop_sdk/models/course_create_params.rb +75 -30
  13. data/lib/whop_sdk/models/course_lesson_update_params.rb +204 -83
  14. data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
  15. data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
  16. data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
  17. data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
  18. data/lib/whop_sdk/models/course_update_params.rb +51 -27
  19. data/lib/whop_sdk/models/experience_update_params.rb +53 -29
  20. data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
  21. data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
  22. data/lib/whop_sdk/models/invoice_create_params.rb +48 -32
  23. data/lib/whop_sdk/models/lesson.rb +16 -8
  24. data/lib/whop_sdk/models/message_create_params.rb +51 -27
  25. data/lib/whop_sdk/models/message_update_params.rb +51 -27
  26. data/lib/whop_sdk/models/payment.rb +10 -1
  27. data/lib/whop_sdk/models/payment_list_response.rb +10 -1
  28. data/lib/whop_sdk/models/payment_method_types.rb +2 -1
  29. data/lib/whop_sdk/models/plan.rb +48 -1
  30. data/lib/whop_sdk/models/plan_create_params.rb +97 -22
  31. data/lib/whop_sdk/models/plan_list_response.rb +51 -1
  32. data/lib/whop_sdk/models/plan_update_params.rb +97 -22
  33. data/lib/whop_sdk/models/product_update_params.rb +53 -29
  34. data/lib/whop_sdk/models/transfer.rb +9 -1
  35. data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
  36. data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
  37. data/lib/whop_sdk/models.rb +8 -0
  38. data/lib/whop_sdk/resources/app_builds.rb +1 -1
  39. data/lib/whop_sdk/resources/apps.rb +1 -1
  40. data/lib/whop_sdk/resources/checkout_configurations.rb +6 -6
  41. data/lib/whop_sdk/resources/companies.rb +70 -0
  42. data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -2
  43. data/lib/whop_sdk/resources/course_lessons.rb +7 -3
  44. data/lib/whop_sdk/resources/course_students.rb +76 -0
  45. data/lib/whop_sdk/resources/courses.rb +10 -3
  46. data/lib/whop_sdk/resources/experiences.rb +1 -1
  47. data/lib/whop_sdk/resources/forum_posts.rb +2 -2
  48. data/lib/whop_sdk/resources/invoices.rb +11 -11
  49. data/lib/whop_sdk/resources/messages.rb +2 -2
  50. data/lib/whop_sdk/resources/plans.rb +8 -4
  51. data/lib/whop_sdk/resources/products.rb +1 -1
  52. data/lib/whop_sdk/resources/transfers.rb +3 -1
  53. data/lib/whop_sdk/version.rb +1 -1
  54. data/lib/whop_sdk.rb +8 -1
  55. data/rbi/whop_sdk/client.rbi +3 -0
  56. data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
  57. data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
  58. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +192 -64
  59. data/rbi/whop_sdk/models/company.rbi +10 -0
  60. data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
  61. data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
  62. data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
  63. data/rbi/whop_sdk/models/course_create_params.rbi +104 -38
  64. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +326 -114
  65. data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
  66. data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
  67. data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
  68. data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
  69. data/rbi/whop_sdk/models/course_update_params.rbi +84 -38
  70. data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
  71. data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
  72. data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
  73. data/rbi/whop_sdk/models/invoice_create_params.rbi +58 -44
  74. data/rbi/whop_sdk/models/lesson.rbi +14 -10
  75. data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
  76. data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
  77. data/rbi/whop_sdk/models/payment.rbi +10 -0
  78. data/rbi/whop_sdk/models/payment_list_response.rbi +10 -0
  79. data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
  80. data/rbi/whop_sdk/models/plan.rbi +82 -0
  81. data/rbi/whop_sdk/models/plan_create_params.rbi +174 -32
  82. data/rbi/whop_sdk/models/plan_list_response.rbi +94 -0
  83. data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
  84. data/rbi/whop_sdk/models/product_update_params.rbi +83 -39
  85. data/rbi/whop_sdk/models/transfer.rbi +8 -0
  86. data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
  87. data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
  88. data/rbi/whop_sdk/models.rbi +8 -0
  89. data/rbi/whop_sdk/resources/app_builds.rbi +5 -1
  90. data/rbi/whop_sdk/resources/apps.rbi +7 -1
  91. data/rbi/whop_sdk/resources/checkout_configurations.rbi +6 -7
  92. data/rbi/whop_sdk/resources/companies.rbi +63 -0
  93. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +2 -2
  94. data/rbi/whop_sdk/resources/course_lessons.rbi +21 -2
  95. data/rbi/whop_sdk/resources/course_students.rbi +65 -0
  96. data/rbi/whop_sdk/resources/courses.rbi +22 -2
  97. data/rbi/whop_sdk/resources/experiences.rbi +7 -1
  98. data/rbi/whop_sdk/resources/forum_posts.rbi +12 -2
  99. data/rbi/whop_sdk/resources/invoices.rbi +18 -18
  100. data/rbi/whop_sdk/resources/messages.rbi +12 -2
  101. data/rbi/whop_sdk/resources/plans.rbi +28 -2
  102. data/rbi/whop_sdk/resources/products.rbi +6 -1
  103. data/rbi/whop_sdk/resources/transfers.rbi +3 -0
  104. data/sig/whop_sdk/client.rbs +2 -0
  105. data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
  106. data/sig/whop_sdk/models/app_update_params.rbs +29 -10
  107. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
  108. data/sig/whop_sdk/models/company.rbs +5 -0
  109. data/sig/whop_sdk/models/company_create_params.rbs +41 -0
  110. data/sig/whop_sdk/models/company_list_params.rbs +51 -0
  111. data/sig/whop_sdk/models/company_list_response.rbs +109 -0
  112. data/sig/whop_sdk/models/course_create_params.rbs +39 -10
  113. data/sig/whop_sdk/models/course_lesson_update_params.rbs +116 -30
  114. data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
  115. data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
  116. data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
  117. data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
  118. data/sig/whop_sdk/models/course_update_params.rbs +29 -10
  119. data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
  120. data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
  121. data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
  122. data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
  123. data/sig/whop_sdk/models/lesson.rbs +8 -8
  124. data/sig/whop_sdk/models/message_create_params.rbs +29 -10
  125. data/sig/whop_sdk/models/message_update_params.rbs +29 -10
  126. data/sig/whop_sdk/models/payment.rbs +5 -0
  127. data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
  128. data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
  129. data/sig/whop_sdk/models/plan.rbs +32 -0
  130. data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
  131. data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
  132. data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
  133. data/sig/whop_sdk/models/product_update_params.rbs +29 -10
  134. data/sig/whop_sdk/models/transfer.rbs +5 -0
  135. data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
  136. data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
  137. data/sig/whop_sdk/models.rbs +8 -0
  138. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  139. data/sig/whop_sdk/resources/apps.rbs +1 -1
  140. data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
  141. data/sig/whop_sdk/resources/companies.rbs +18 -0
  142. data/sig/whop_sdk/resources/course_lessons.rbs +4 -2
  143. data/sig/whop_sdk/resources/course_students.rbs +22 -0
  144. data/sig/whop_sdk/resources/courses.rbs +4 -2
  145. data/sig/whop_sdk/resources/experiences.rbs +1 -1
  146. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  147. data/sig/whop_sdk/resources/invoices.rbs +5 -5
  148. data/sig/whop_sdk/resources/messages.rbs +2 -2
  149. data/sig/whop_sdk/resources/plans.rbs +4 -2
  150. data/sig/whop_sdk/resources/products.rbs +1 -1
  151. data/sig/whop_sdk/resources/transfers.rbs +1 -0
  152. metadata +26 -5
  153. data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
  154. data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
  155. data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
@@ -74,7 +74,7 @@ module WhopSDK
74
74
  #
75
75
  # @param experience_path [String, nil] The path for the hub view of the app
76
76
  #
77
- # @param icon [WhopSDK::Models::AppUpdateParams::Icon, nil] The icon for the app
77
+ # @param icon [WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithID, nil] The icon for the app
78
78
  #
79
79
  # @param name [String, nil] The name of the app
80
80
  #
@@ -12,15 +12,15 @@ module WhopSDK
12
12
  # - `access_pass:create`
13
13
  # - `access_pass:update`
14
14
  #
15
- # @overload create(affiliate_code: nil, metadata: nil, plan: nil, plan_id: nil, redirect_url: nil, request_options: {})
15
+ # @overload create(plan:, plan_id:, affiliate_code: nil, metadata: nil, redirect_url: nil, request_options: {})
16
16
  #
17
- # @param affiliate_code [String, nil] The affiliate code to use for the checkout configuration
17
+ # @param plan [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan] Pass this object to create a new plan for this checkout configuration
18
18
  #
19
- # @param metadata [Hash{Symbol=>Object}, nil] The metadata to use for the checkout configuration
19
+ # @param plan_id [String] The ID of the plan to use for the checkout configuration
20
20
  #
21
- # @param plan [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan, nil] Pass this object to create a new plan for this checkout configuration
21
+ # @param affiliate_code [String, nil] The affiliate code to use for the checkout configuration
22
22
  #
23
- # @param plan_id [String, nil] The ID of the plan to use for the checkout configuration
23
+ # @param metadata [Hash{Symbol=>Object}, nil] The metadata to use for the checkout configuration
24
24
  #
25
25
  # @param redirect_url [String, nil] The URL to redirect the user to after the checkout configuration is created
26
26
  #
@@ -29,7 +29,7 @@ module WhopSDK
29
29
  # @return [WhopSDK::Models::CheckoutConfiguration]
30
30
  #
31
31
  # @see WhopSDK::Models::CheckoutConfigurationCreateParams
32
- def create(params = {})
32
+ def create(params)
33
33
  parsed, options = WhopSDK::CheckoutConfigurationCreateParams.dump_request(params)
34
34
  @client.request(
35
35
  method: :post,
@@ -3,6 +3,39 @@
3
3
  module WhopSDK
4
4
  module Resources
5
5
  class Companies
6
+ # Create a new sub company for your platform
7
+ #
8
+ # Required permissions:
9
+ #
10
+ # - `company:create_child`
11
+ # - `company:basic:read`
12
+ #
13
+ # @overload create(email:, parent_company_id:, title:, metadata: nil, request_options: {})
14
+ #
15
+ # @param email [String] The email of the user who the company will belong to.
16
+ #
17
+ # @param parent_company_id [String] The company ID of the platform creating this company.
18
+ #
19
+ # @param title [String] The name of the company being created.
20
+ #
21
+ # @param metadata [Hash{Symbol=>Object}, nil] Additional metadata for the account
22
+ #
23
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
24
+ #
25
+ # @return [WhopSDK::Models::Company]
26
+ #
27
+ # @see WhopSDK::Models::CompanyCreateParams
28
+ def create(params)
29
+ parsed, options = WhopSDK::CompanyCreateParams.dump_request(params)
30
+ @client.request(
31
+ method: :post,
32
+ path: "companies",
33
+ body: parsed,
34
+ model: WhopSDK::Company,
35
+ options: options
36
+ )
37
+ end
38
+
6
39
  # Retrieves an company by ID or its url route
7
40
  #
8
41
  # Required permissions:
@@ -26,6 +59,43 @@ module WhopSDK
26
59
  )
27
60
  end
28
61
 
62
+ # Lists companies the current user has access to
63
+ #
64
+ # Required permissions:
65
+ #
66
+ # - `company:basic:read`
67
+ #
68
+ # @overload list(parent_company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, request_options: {})
69
+ #
70
+ # @param parent_company_id [String] The ID of the parent company to list sub companies for
71
+ #
72
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
73
+ #
74
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
75
+ #
76
+ # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
77
+ #
78
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
79
+ #
80
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
81
+ #
82
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
83
+ #
84
+ # @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::CompanyListResponse>]
85
+ #
86
+ # @see WhopSDK::Models::CompanyListParams
87
+ def list(params)
88
+ parsed, options = WhopSDK::CompanyListParams.dump_request(params)
89
+ @client.request(
90
+ method: :get,
91
+ path: "companies",
92
+ query: parsed,
93
+ page: WhopSDK::Internal::CursorPage,
94
+ model: WhopSDK::Models::CompanyListResponse,
95
+ options: options
96
+ )
97
+ end
98
+
29
99
  # @api private
30
100
  #
31
101
  # @param client [WhopSDK::Client]
@@ -7,8 +7,8 @@ module WhopSDK
7
7
  #
8
8
  # Required permissions:
9
9
  #
10
- # - `course_lesson_interaction:read`
11
10
  # - `courses:read`
11
+ # - `course_analytics:read`
12
12
  #
13
13
  # @overload retrieve(id, request_options: {})
14
14
  #
@@ -31,8 +31,8 @@ module WhopSDK
31
31
  #
32
32
  # Required permissions:
33
33
  #
34
- # - `course_lesson_interaction:read`
35
34
  # - `courses:read`
35
+ # - `course_analytics:read`
36
36
  #
37
37
  # @overload list(after: nil, before: nil, completed: nil, course_id: nil, first: nil, last: nil, lesson_id: nil, user_id: nil, request_options: {})
38
38
  #
@@ -69,13 +69,15 @@ module WhopSDK
69
69
  #
70
70
  # - `courses:update`
71
71
  #
72
- # @overload update(id, assessment_questions: nil, attachments: nil, content: nil, days_from_course_start_until_unlock: nil, lesson_type: nil, main_pdf: nil, mux_asset_id: nil, title: nil, visibility: nil, request_options: {})
72
+ # @overload update(id, assessment_completion_requirement: nil, assessment_questions: nil, attachments: nil, content: nil, days_from_course_start_until_unlock: nil, lesson_type: nil, main_pdf: nil, max_attempts: nil, mux_asset_id: nil, title: nil, visibility: nil, request_options: {})
73
73
  #
74
74
  # @param id [String]
75
75
  #
76
+ # @param assessment_completion_requirement [WhopSDK::Models::CourseLessonUpdateParams::AssessmentCompletionRequirement, nil] Completion requirements for quiz/knowledge check lessons
77
+ #
76
78
  # @param assessment_questions [Array<WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion>, nil] Assessment questions for quiz/knowledge check lessons. Replaces all existing que
77
79
  #
78
- # @param attachments [Array<WhopSDK::Models::CourseLessonUpdateParams::Attachment>, nil] General attachments for the lesson (PDFs, files, etc). Replaces all existing att
80
+ # @param attachments [Array<WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithID>, nil] General attachments for the lesson (PDFs, files, etc). Replaces all existing att
79
81
  #
80
82
  # @param content [String, nil] The content of the lesson
81
83
  #
@@ -83,7 +85,9 @@ module WhopSDK
83
85
  #
84
86
  # @param lesson_type [Symbol, WhopSDK::Models::LessonTypes, nil] The available types for a lesson
85
87
  #
86
- # @param main_pdf [WhopSDK::Models::CourseLessonUpdateParams::MainPdf, nil] The main PDF file for this lesson
88
+ # @param main_pdf [WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID, nil] The main PDF file for this lesson
89
+ #
90
+ # @param max_attempts [Integer, nil] Maximum number of attempts allowed for assessments
87
91
  #
88
92
  # @param mux_asset_id [String, nil] The ID of the Mux asset to attach to this lesson for video lessons
89
93
  #
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Resources
5
+ class CourseStudents
6
+ # Retrieves a course student by interaction ID
7
+ #
8
+ # Required permissions:
9
+ #
10
+ # - `courses:read`
11
+ # - `course_analytics:read`
12
+ #
13
+ # @overload retrieve(id, request_options: {})
14
+ #
15
+ # @param id [String]
16
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
17
+ #
18
+ # @return [WhopSDK::Models::CourseStudentRetrieveResponse]
19
+ #
20
+ # @see WhopSDK::Models::CourseStudentRetrieveParams
21
+ def retrieve(id, params = {})
22
+ @client.request(
23
+ method: :get,
24
+ path: ["course_students/%1$s", id],
25
+ model: WhopSDK::Models::CourseStudentRetrieveResponse,
26
+ options: params[:request_options]
27
+ )
28
+ end
29
+
30
+ # Lists students for a course
31
+ #
32
+ # Required permissions:
33
+ #
34
+ # - `courses:read`
35
+ # - `course_analytics:read`
36
+ #
37
+ # @overload list(course_id:, after: nil, before: nil, first: nil, keyword: nil, last: nil, request_options: {})
38
+ #
39
+ # @param course_id [String] The ID of the course
40
+ #
41
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
42
+ #
43
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
44
+ #
45
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
46
+ #
47
+ # @param keyword [String, nil] Filter students by name - returns students whose names match the keyword
48
+ #
49
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
50
+ #
51
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
52
+ #
53
+ # @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::CourseStudentListResponse>]
54
+ #
55
+ # @see WhopSDK::Models::CourseStudentListParams
56
+ def list(params)
57
+ parsed, options = WhopSDK::CourseStudentListParams.dump_request(params)
58
+ @client.request(
59
+ method: :get,
60
+ path: "course_students",
61
+ query: parsed,
62
+ page: WhopSDK::Internal::CursorPage,
63
+ model: WhopSDK::Models::CourseStudentListResponse,
64
+ options: options
65
+ )
66
+ end
67
+
68
+ # @api private
69
+ #
70
+ # @param client [WhopSDK::Client]
71
+ def initialize(client:)
72
+ @client = client
73
+ end
74
+ end
75
+ end
76
+ end
@@ -3,23 +3,30 @@
3
3
  module WhopSDK
4
4
  module Resources
5
5
  class Courses
6
+ # Some parameter documentations has been truncated, see
7
+ # {WhopSDK::Models::CourseCreateParams} for more details.
8
+ #
6
9
  # Creates a new course module in an experience
7
10
  #
8
11
  # Required permissions:
9
12
  #
10
13
  # - `courses:update`
11
14
  #
12
- # @overload create(experience_id:, title:, cover_image: nil, tagline: nil, thumbnail: nil, request_options: {})
15
+ # @overload create(experience_id:, title:, certificate_after_completion_enabled: nil, cover_image: nil, require_completing_lessons_in_order: nil, tagline: nil, thumbnail: nil, request_options: {})
13
16
  #
14
17
  # @param experience_id [String] The ID of the experience to create the course in
15
18
  #
16
19
  # @param title [String] The title of the course
17
20
  #
21
+ # @param certificate_after_completion_enabled [Boolean, nil] Whether the course will award its students a PDF certificate after completing al
22
+ #
18
23
  # @param cover_image [String, nil] The cover image URL of the course
19
24
  #
25
+ # @param require_completing_lessons_in_order [Boolean, nil] Whether the course requires students to complete the previous lesson before movi
26
+ #
20
27
  # @param tagline [String, nil] The tagline of the course
21
28
  #
22
- # @param thumbnail [WhopSDK::Models::CourseCreateParams::Thumbnail, nil] The thumbnail for the course in png, jpeg, or gif format
29
+ # @param thumbnail [WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithID, nil] The thumbnail for the course in png, jpeg, or gif format
23
30
  #
24
31
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
25
32
  #
@@ -87,7 +94,7 @@ module WhopSDK
87
94
  #
88
95
  # @param tagline [String, nil] A short tagline for the course
89
96
  #
90
- # @param thumbnail [WhopSDK::Models::CourseUpdateParams::Thumbnail, nil] The thumbnail for the course in png, jpeg, or gif format
97
+ # @param thumbnail [WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithID, nil] The thumbnail for the course in png, jpeg, or gif format
91
98
  #
92
99
  # @param title [String, nil] The title of the course
93
100
  #
@@ -62,7 +62,7 @@ module WhopSDK
62
62
  #
63
63
  # @param access_level [Symbol, WhopSDK::Models::ExperienceUpdateParams::AccessLevel, nil] The different access levels for experiences (PUBLIC IS NEVER USED ANYMORE).
64
64
  #
65
- # @param logo [WhopSDK::Models::ExperienceUpdateParams::Logo, nil] The logo for the experience
65
+ # @param logo [WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithID, nil] The logo for the experience
66
66
  #
67
67
  # @param name [String, nil] The name of the experience.
68
68
  #
@@ -16,7 +16,7 @@ module WhopSDK
16
16
  #
17
17
  # @param experience_id [String] The experience to create this post in
18
18
  #
19
- # @param attachments [Array<WhopSDK::Models::ForumPostCreateParams::Attachment>, nil] The attachments for this post
19
+ # @param attachments [Array<WhopSDK::Models::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::ForumPostCreateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this post
20
20
  #
21
21
  # @param content [String, nil] This is the main body of the post in Markdown format. Hidden if paywalled and us
22
22
  #
@@ -82,7 +82,7 @@ module WhopSDK
82
82
  #
83
83
  # @param id [String]
84
84
  #
85
- # @param attachments [Array<WhopSDK::Models::ForumPostUpdateParams::Attachment>, nil] The attachments for this post
85
+ # @param attachments [Array<WhopSDK::Models::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::ForumPostUpdateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this post
86
86
  #
87
87
  # @param content [String, nil] This is the main body of the post in Markdown format. Hidden if paywalled and us
88
88
  #
@@ -13,7 +13,7 @@ module WhopSDK
13
13
  # - `invoice:create`
14
14
  # - `plan:basic:read`
15
15
  #
16
- # @overload create(collection_method:, company_id:, due_date:, plan:, charge_buyer_fee: nil, customer_name: nil, email_address: nil, member_id: nil, payment_token_id: nil, product: nil, product_id: nil, request_options: {})
16
+ # @overload create(collection_method:, company_id:, due_date:, member_id:, plan:, product:, email_address:, product_id:, charge_buyer_fee: nil, customer_name: nil, payment_token_id: nil, request_options: {})
17
17
  #
18
18
  # @param collection_method [Symbol, WhopSDK::Models::CollectionMethod] The method of collection for this invoice. If using charge_automatically, you mu
19
19
  #
@@ -21,25 +21,25 @@ module WhopSDK
21
21
  #
22
22
  # @param due_date [Time] The date the invoice is due, if applicable.
23
23
  #
24
+ # @param member_id [String] The member ID to create this invoice for. Include this if you want to create an
25
+ #
24
26
  # @param plan [WhopSDK::Models::InvoiceCreateParams::Plan] The properties of the plan to create for this invoice.
25
27
  #
26
- # @param charge_buyer_fee [Boolean, nil] Whether or not to charge the customer a buyer fee.
28
+ # @param product [WhopSDK::Models::InvoiceCreateParams::Product] The properties of the product to create for this invoice. Include this if you wa
27
29
  #
28
- # @param customer_name [String, nil] The name of the customer to create this invoice for. This is required if you wan
30
+ # @param email_address [String] The email address to create this invoice for. This is required if you want to cr
29
31
  #
30
- # @param email_address [String, nil] The email address to create this invoice for. This is required if you want to cr
32
+ # @param product_id [String] The product ID to create this invoice for. Include this if you want to create an
31
33
  #
32
- # @param member_id [String, nil] The member ID to create this invoice for. Include this if you want to create an
33
- #
34
- # @param payment_token_id [String, nil] The payment token ID to use for this invoice. If using charge_automatically, you
34
+ # @param charge_buyer_fee [Boolean, nil] Whether or not to charge the customer a buyer fee.
35
35
  #
36
- # @param product [WhopSDK::Models::InvoiceCreateParams::Product, nil] The properties of the product to create for this invoice. Include this if you wa
36
+ # @param customer_name [String, nil] The name of the customer to create this invoice for. This is required if you wan
37
37
  #
38
- # @param product_id [String, nil] The product ID to create this invoice for. Include this if you want to create an
38
+ # @param payment_token_id [String, nil] The payment token ID to use for this invoice. If using charge_automatically, you
39
39
  #
40
40
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
41
41
  #
42
- # @return [WhopSDK::Models::InvoiceCreateResponse]
42
+ # @return [WhopSDK::Models::Invoice]
43
43
  #
44
44
  # @see WhopSDK::Models::InvoiceCreateParams
45
45
  def create(params)
@@ -48,7 +48,7 @@ module WhopSDK
48
48
  method: :post,
49
49
  path: "invoices",
50
50
  body: parsed,
51
- model: WhopSDK::Models::InvoiceCreateResponse,
51
+ model: WhopSDK::Invoice,
52
52
  options: options
53
53
  )
54
54
  end
@@ -15,7 +15,7 @@ module WhopSDK
15
15
  #
16
16
  # @param content [String] The content of the message in Markdown format.
17
17
  #
18
- # @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment>, nil] The attachments for this message, such as videos or images.
18
+ # @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message, such as videos or images.
19
19
  #
20
20
  # @param poll [WhopSDK::Models::MessageCreateParams::Poll, nil] The poll for this message
21
21
  #
@@ -64,7 +64,7 @@ module WhopSDK
64
64
  #
65
65
  # @param id [String]
66
66
  #
67
- # @param attachments [Array<WhopSDK::Models::MessageUpdateParams::Attachment>, nil] The attachments for this message
67
+ # @param attachments [Array<WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message
68
68
  #
69
69
  # @param content [String, nil] The content of the message in Markdown format
70
70
  #
@@ -14,7 +14,7 @@ module WhopSDK
14
14
  # - `access_pass:basic:read`
15
15
  # - `plan:basic:read`
16
16
  #
17
- # @overload create(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
17
+ # @overload create(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
18
18
  #
19
19
  # @param company_id [String] The company the plan should be created for.
20
20
  #
@@ -30,7 +30,7 @@ module WhopSDK
30
30
  #
31
31
  # @param expiration_days [Integer, nil] The interval at which the plan charges (expiration plans).
32
32
  #
33
- # @param image [WhopSDK::Models::PlanCreateParams::Image, nil] An image for the plan. This will be visible on the product page to customers.
33
+ # @param image [WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers.
34
34
  #
35
35
  # @param initial_price [Float, nil] An additional amount charged upon first purchase. Use only if a one time payment
36
36
  #
@@ -38,6 +38,8 @@ module WhopSDK
38
38
  #
39
39
  # @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u
40
40
  #
41
+ # @param payment_method_configuration [WhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration, nil] The explicit payment method configuration for the plan. If not provided, the pla
42
+ #
41
43
  # @param plan_type [Symbol, WhopSDK::Models::PlanType, nil] The type of plan that can be attached to an access pass
42
44
  #
43
45
  # @param release_method [Symbol, WhopSDK::Models::ReleaseMethod, nil] The methods of how a plan can be released.
@@ -102,7 +104,7 @@ module WhopSDK
102
104
  # - `access_pass:basic:read`
103
105
  # - `plan:basic:read`
104
106
  #
105
- # @overload update(id, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, offer_cancel_discount: nil, override_tax_type: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
107
+ # @overload update(id, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, offer_cancel_discount: nil, override_tax_type: nil, payment_method_configuration: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
106
108
  #
107
109
  # @param id [String]
108
110
  #
@@ -116,7 +118,7 @@ module WhopSDK
116
118
  #
117
119
  # @param expiration_days [Integer, nil] The interval at which the plan charges (expiration plans).
118
120
  #
119
- # @param image [WhopSDK::Models::PlanUpdateParams::Image, nil] An image for the plan. This will be visible on the product page to customers.
121
+ # @param image [WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers.
120
122
  #
121
123
  # @param initial_price [Float, nil] An additional amount charged upon first purchase.
122
124
  #
@@ -126,6 +128,8 @@ module WhopSDK
126
128
  #
127
129
  # @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u
128
130
  #
131
+ # @param payment_method_configuration [WhopSDK::Models::PlanUpdateParams::PaymentMethodConfiguration, nil] The explicit payment method configuration for the plan. If sent as null, the cus
132
+ #
129
133
  # @param renewal_price [Float, nil] The amount the customer is charged every billing period.
130
134
  #
131
135
  # @param stock [Integer, nil] The number of units available for purchase.
@@ -111,7 +111,7 @@ module WhopSDK
111
111
  #
112
112
  # @param id [String]
113
113
  #
114
- # @param banner_image [WhopSDK::Models::ProductUpdateParams::BannerImage, nil] A banner image for the product in png, jpeg format
114
+ # @param banner_image [WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID, nil] A banner image for the product in png, jpeg format
115
115
  #
116
116
  # @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
117
117
  #
@@ -12,7 +12,7 @@ module WhopSDK
12
12
  #
13
13
  # - `payout:transfer_funds`
14
14
  #
15
- # @overload create(amount:, currency:, destination_id:, origin_id:, idempotence_key: nil, notes: nil, request_options: {})
15
+ # @overload create(amount:, currency:, destination_id:, origin_id:, idempotence_key: nil, metadata: nil, notes: nil, request_options: {})
16
16
  #
17
17
  # @param amount [Float] The amount to withdraw
18
18
  #
@@ -24,6 +24,8 @@ module WhopSDK
24
24
  #
25
25
  # @param idempotence_key [String, nil] A unique key to ensure idempotence. Use a UUID or similar.
26
26
  #
27
+ # @param metadata [Hash{Symbol=>Object}, nil] A hash of metadata to attach to the transfer.
28
+ #
27
29
  # @param notes [String, nil] Notes for the transfer. Maximum of 50 characters.
28
30
  #
29
31
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WhopSDK
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
data/lib/whop_sdk.rb CHANGED
@@ -90,6 +90,9 @@ require_relative "whop_sdk/models/checkout_configuration_list_response"
90
90
  require_relative "whop_sdk/models/checkout_configuration_retrieve_params"
91
91
  require_relative "whop_sdk/models/collection_method"
92
92
  require_relative "whop_sdk/models/company"
93
+ require_relative "whop_sdk/models/company_create_params"
94
+ require_relative "whop_sdk/models/company_list_params"
95
+ require_relative "whop_sdk/models/company_list_response"
93
96
  require_relative "whop_sdk/models/company_retrieve_params"
94
97
  require_relative "whop_sdk/models/course"
95
98
  require_relative "whop_sdk/models/course_chapter"
@@ -118,6 +121,10 @@ require_relative "whop_sdk/models/course_lesson_update_params"
118
121
  require_relative "whop_sdk/models/course_list_params"
119
122
  require_relative "whop_sdk/models/course_list_response"
120
123
  require_relative "whop_sdk/models/course_retrieve_params"
124
+ require_relative "whop_sdk/models/course_student_list_params"
125
+ require_relative "whop_sdk/models/course_student_list_response"
126
+ require_relative "whop_sdk/models/course_student_retrieve_params"
127
+ require_relative "whop_sdk/models/course_student_retrieve_response"
121
128
  require_relative "whop_sdk/models/course_update_params"
122
129
  require_relative "whop_sdk/models/currency"
123
130
  require_relative "whop_sdk/models/custom_cta"
@@ -164,7 +171,6 @@ require_relative "whop_sdk/models/industry_types"
164
171
  require_relative "whop_sdk/models/invoice"
165
172
  require_relative "whop_sdk/models/invoice_created_webhook_event"
166
173
  require_relative "whop_sdk/models/invoice_create_params"
167
- require_relative "whop_sdk/models/invoice_create_response"
168
174
  require_relative "whop_sdk/models/invoice_list_item"
169
175
  require_relative "whop_sdk/models/invoice_list_params"
170
176
  require_relative "whop_sdk/models/invoice_paid_webhook_event"
@@ -296,6 +302,7 @@ require_relative "whop_sdk/resources/course_chapters"
296
302
  require_relative "whop_sdk/resources/course_lesson_interactions"
297
303
  require_relative "whop_sdk/resources/course_lessons"
298
304
  require_relative "whop_sdk/resources/courses"
305
+ require_relative "whop_sdk/resources/course_students"
299
306
  require_relative "whop_sdk/resources/entries"
300
307
  require_relative "whop_sdk/resources/experiences"
301
308
  require_relative "whop_sdk/resources/forum_posts"
@@ -107,6 +107,9 @@ module WhopSDK
107
107
  sig { returns(WhopSDK::Resources::Reviews) }
108
108
  attr_reader :reviews
109
109
 
110
+ sig { returns(WhopSDK::Resources::CourseStudents) }
111
+ attr_reader :course_students
112
+
110
113
  # @api private
111
114
  sig { override.returns(T::Hash[String, String]) }
112
115
  private def auth_headers