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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +4 -0
- data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
- data/lib/whop_sdk/models/app_update_params.rb +53 -29
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +115 -39
- data/lib/whop_sdk/models/company.rb +13 -1
- data/lib/whop_sdk/models/company_create_params.rb +46 -0
- data/lib/whop_sdk/models/company_list_params.rb +62 -0
- data/lib/whop_sdk/models/company_list_response.rb +175 -0
- data/lib/whop_sdk/models/course_create_params.rb +75 -30
- data/lib/whop_sdk/models/course_lesson_update_params.rb +204 -83
- data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
- data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
- data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
- data/lib/whop_sdk/models/course_update_params.rb +51 -27
- data/lib/whop_sdk/models/experience_update_params.rb +53 -29
- data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
- data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
- data/lib/whop_sdk/models/invoice_create_params.rb +48 -32
- data/lib/whop_sdk/models/lesson.rb +16 -8
- data/lib/whop_sdk/models/message_create_params.rb +51 -27
- data/lib/whop_sdk/models/message_update_params.rb +51 -27
- data/lib/whop_sdk/models/payment.rb +10 -1
- data/lib/whop_sdk/models/payment_list_response.rb +10 -1
- data/lib/whop_sdk/models/payment_method_types.rb +2 -1
- data/lib/whop_sdk/models/plan.rb +48 -1
- data/lib/whop_sdk/models/plan_create_params.rb +97 -22
- data/lib/whop_sdk/models/plan_list_response.rb +51 -1
- data/lib/whop_sdk/models/plan_update_params.rb +97 -22
- data/lib/whop_sdk/models/product_update_params.rb +53 -29
- data/lib/whop_sdk/models/transfer.rb +9 -1
- data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
- data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
- data/lib/whop_sdk/models.rb +8 -0
- data/lib/whop_sdk/resources/app_builds.rb +1 -1
- data/lib/whop_sdk/resources/apps.rb +1 -1
- data/lib/whop_sdk/resources/checkout_configurations.rb +6 -6
- data/lib/whop_sdk/resources/companies.rb +70 -0
- data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -2
- data/lib/whop_sdk/resources/course_lessons.rb +7 -3
- data/lib/whop_sdk/resources/course_students.rb +76 -0
- data/lib/whop_sdk/resources/courses.rb +10 -3
- data/lib/whop_sdk/resources/experiences.rb +1 -1
- data/lib/whop_sdk/resources/forum_posts.rb +2 -2
- data/lib/whop_sdk/resources/invoices.rb +11 -11
- data/lib/whop_sdk/resources/messages.rb +2 -2
- data/lib/whop_sdk/resources/plans.rb +8 -4
- data/lib/whop_sdk/resources/products.rb +1 -1
- data/lib/whop_sdk/resources/transfers.rb +3 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +8 -1
- data/rbi/whop_sdk/client.rbi +3 -0
- data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
- data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +192 -64
- data/rbi/whop_sdk/models/company.rbi +10 -0
- data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
- data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
- data/rbi/whop_sdk/models/course_create_params.rbi +104 -38
- data/rbi/whop_sdk/models/course_lesson_update_params.rbi +326 -114
- data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
- data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
- data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
- data/rbi/whop_sdk/models/course_update_params.rbi +84 -38
- data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
- data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
- data/rbi/whop_sdk/models/invoice_create_params.rbi +58 -44
- data/rbi/whop_sdk/models/lesson.rbi +14 -10
- data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
- data/rbi/whop_sdk/models/payment.rbi +10 -0
- data/rbi/whop_sdk/models/payment_list_response.rbi +10 -0
- data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
- data/rbi/whop_sdk/models/plan.rbi +82 -0
- data/rbi/whop_sdk/models/plan_create_params.rbi +174 -32
- data/rbi/whop_sdk/models/plan_list_response.rbi +94 -0
- data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
- data/rbi/whop_sdk/models/product_update_params.rbi +83 -39
- data/rbi/whop_sdk/models/transfer.rbi +8 -0
- data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
- data/rbi/whop_sdk/models.rbi +8 -0
- data/rbi/whop_sdk/resources/app_builds.rbi +5 -1
- data/rbi/whop_sdk/resources/apps.rbi +7 -1
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +6 -7
- data/rbi/whop_sdk/resources/companies.rbi +63 -0
- data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +2 -2
- data/rbi/whop_sdk/resources/course_lessons.rbi +21 -2
- data/rbi/whop_sdk/resources/course_students.rbi +65 -0
- data/rbi/whop_sdk/resources/courses.rbi +22 -2
- data/rbi/whop_sdk/resources/experiences.rbi +7 -1
- data/rbi/whop_sdk/resources/forum_posts.rbi +12 -2
- data/rbi/whop_sdk/resources/invoices.rbi +18 -18
- data/rbi/whop_sdk/resources/messages.rbi +12 -2
- data/rbi/whop_sdk/resources/plans.rbi +28 -2
- data/rbi/whop_sdk/resources/products.rbi +6 -1
- data/rbi/whop_sdk/resources/transfers.rbi +3 -0
- data/sig/whop_sdk/client.rbs +2 -0
- data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
- data/sig/whop_sdk/models/app_update_params.rbs +29 -10
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
- data/sig/whop_sdk/models/company.rbs +5 -0
- data/sig/whop_sdk/models/company_create_params.rbs +41 -0
- data/sig/whop_sdk/models/company_list_params.rbs +51 -0
- data/sig/whop_sdk/models/company_list_response.rbs +109 -0
- data/sig/whop_sdk/models/course_create_params.rbs +39 -10
- data/sig/whop_sdk/models/course_lesson_update_params.rbs +116 -30
- data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
- data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
- data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
- data/sig/whop_sdk/models/course_update_params.rbs +29 -10
- data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
- data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
- data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
- data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
- data/sig/whop_sdk/models/lesson.rbs +8 -8
- data/sig/whop_sdk/models/message_create_params.rbs +29 -10
- data/sig/whop_sdk/models/message_update_params.rbs +29 -10
- data/sig/whop_sdk/models/payment.rbs +5 -0
- data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
- data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
- data/sig/whop_sdk/models/plan.rbs +32 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
- data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
- data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
- data/sig/whop_sdk/models/product_update_params.rbs +29 -10
- data/sig/whop_sdk/models/transfer.rbs +5 -0
- data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
- data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
- data/sig/whop_sdk/models.rbs +8 -0
- data/sig/whop_sdk/resources/app_builds.rbs +1 -1
- data/sig/whop_sdk/resources/apps.rbs +1 -1
- data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
- data/sig/whop_sdk/resources/companies.rbs +18 -0
- data/sig/whop_sdk/resources/course_lessons.rbs +4 -2
- data/sig/whop_sdk/resources/course_students.rbs +22 -0
- data/sig/whop_sdk/resources/courses.rbs +4 -2
- data/sig/whop_sdk/resources/experiences.rbs +1 -1
- data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
- data/sig/whop_sdk/resources/invoices.rbs +5 -5
- data/sig/whop_sdk/resources/messages.rbs +2 -2
- data/sig/whop_sdk/resources/plans.rbs +4 -2
- data/sig/whop_sdk/resources/products.rbs +1 -1
- data/sig/whop_sdk/resources/transfers.rbs +1 -0
- metadata +26 -5
- data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
- data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
- data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
|
@@ -3,6 +3,34 @@
|
|
|
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
|
+
sig do
|
|
13
|
+
params(
|
|
14
|
+
email: String,
|
|
15
|
+
parent_company_id: String,
|
|
16
|
+
title: String,
|
|
17
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
18
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
19
|
+
).returns(WhopSDK::Company)
|
|
20
|
+
end
|
|
21
|
+
def create(
|
|
22
|
+
# The email of the user who the company will belong to.
|
|
23
|
+
email:,
|
|
24
|
+
# The company ID of the platform creating this company.
|
|
25
|
+
parent_company_id:,
|
|
26
|
+
# The name of the company being created.
|
|
27
|
+
title:,
|
|
28
|
+
# Additional metadata for the account
|
|
29
|
+
metadata: nil,
|
|
30
|
+
request_options: {}
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
6
34
|
# Retrieves an company by ID or its url route
|
|
7
35
|
#
|
|
8
36
|
# Required permissions:
|
|
@@ -17,6 +45,41 @@ module WhopSDK
|
|
|
17
45
|
def retrieve(id, request_options: {})
|
|
18
46
|
end
|
|
19
47
|
|
|
48
|
+
# Lists companies the current user has access to
|
|
49
|
+
#
|
|
50
|
+
# Required permissions:
|
|
51
|
+
#
|
|
52
|
+
# - `company:basic:read`
|
|
53
|
+
sig do
|
|
54
|
+
params(
|
|
55
|
+
parent_company_id: String,
|
|
56
|
+
after: T.nilable(String),
|
|
57
|
+
before: T.nilable(String),
|
|
58
|
+
direction: T.nilable(WhopSDK::Direction::OrSymbol),
|
|
59
|
+
first: T.nilable(Integer),
|
|
60
|
+
last: T.nilable(Integer),
|
|
61
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
62
|
+
).returns(
|
|
63
|
+
WhopSDK::Internal::CursorPage[WhopSDK::Models::CompanyListResponse]
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
def list(
|
|
67
|
+
# The ID of the parent company to list sub companies for
|
|
68
|
+
parent_company_id:,
|
|
69
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
70
|
+
after: nil,
|
|
71
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
72
|
+
before: nil,
|
|
73
|
+
# The direction of the sort.
|
|
74
|
+
direction: nil,
|
|
75
|
+
# Returns the first _n_ elements from the list.
|
|
76
|
+
first: nil,
|
|
77
|
+
# Returns the last _n_ elements from the list.
|
|
78
|
+
last: nil,
|
|
79
|
+
request_options: {}
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
|
|
20
83
|
# @api private
|
|
21
84
|
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
22
85
|
def self.new(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
|
sig do
|
|
13
13
|
params(
|
|
14
14
|
id: String,
|
|
@@ -22,8 +22,8 @@ module WhopSDK
|
|
|
22
22
|
#
|
|
23
23
|
# Required permissions:
|
|
24
24
|
#
|
|
25
|
-
# - `course_lesson_interaction:read`
|
|
26
25
|
# - `courses:read`
|
|
26
|
+
# - `course_analytics:read`
|
|
27
27
|
sig do
|
|
28
28
|
params(
|
|
29
29
|
after: T.nilable(String),
|
|
@@ -55,6 +55,10 @@ module WhopSDK
|
|
|
55
55
|
sig do
|
|
56
56
|
params(
|
|
57
57
|
id: String,
|
|
58
|
+
assessment_completion_requirement:
|
|
59
|
+
T.nilable(
|
|
60
|
+
WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement::OrHash
|
|
61
|
+
),
|
|
58
62
|
assessment_questions:
|
|
59
63
|
T.nilable(
|
|
60
64
|
T::Array[
|
|
@@ -63,13 +67,24 @@ module WhopSDK
|
|
|
63
67
|
),
|
|
64
68
|
attachments:
|
|
65
69
|
T.nilable(
|
|
66
|
-
T::Array[
|
|
70
|
+
T::Array[
|
|
71
|
+
T.any(
|
|
72
|
+
WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
|
|
73
|
+
WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID::OrHash
|
|
74
|
+
)
|
|
75
|
+
]
|
|
67
76
|
),
|
|
68
77
|
content: T.nilable(String),
|
|
69
78
|
days_from_course_start_until_unlock: T.nilable(Integer),
|
|
70
79
|
lesson_type: T.nilable(WhopSDK::LessonTypes::OrSymbol),
|
|
71
80
|
main_pdf:
|
|
72
|
-
T.nilable(
|
|
81
|
+
T.nilable(
|
|
82
|
+
T.any(
|
|
83
|
+
WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID::OrHash,
|
|
84
|
+
WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID::OrHash
|
|
85
|
+
)
|
|
86
|
+
),
|
|
87
|
+
max_attempts: T.nilable(Integer),
|
|
73
88
|
mux_asset_id: T.nilable(String),
|
|
74
89
|
title: T.nilable(String),
|
|
75
90
|
visibility: T.nilable(WhopSDK::LessonVisibilities::OrSymbol),
|
|
@@ -78,6 +93,8 @@ module WhopSDK
|
|
|
78
93
|
end
|
|
79
94
|
def update(
|
|
80
95
|
id,
|
|
96
|
+
# Completion requirements for quiz/knowledge check lessons
|
|
97
|
+
assessment_completion_requirement: nil,
|
|
81
98
|
# Assessment questions for quiz/knowledge check lessons. Replaces all existing
|
|
82
99
|
# questions.
|
|
83
100
|
assessment_questions: nil,
|
|
@@ -92,6 +109,8 @@ module WhopSDK
|
|
|
92
109
|
lesson_type: nil,
|
|
93
110
|
# The main PDF file for this lesson
|
|
94
111
|
main_pdf: nil,
|
|
112
|
+
# Maximum number of attempts allowed for assessments
|
|
113
|
+
max_attempts: nil,
|
|
95
114
|
# The ID of the Mux asset to attach to this lesson for video lessons
|
|
96
115
|
mux_asset_id: nil,
|
|
97
116
|
# The title of the lesson
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# typed: strong
|
|
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
|
+
sig do
|
|
13
|
+
params(
|
|
14
|
+
id: String,
|
|
15
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
16
|
+
).returns(WhopSDK::Models::CourseStudentRetrieveResponse)
|
|
17
|
+
end
|
|
18
|
+
def retrieve(id, request_options: {})
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Lists students for a course
|
|
22
|
+
#
|
|
23
|
+
# Required permissions:
|
|
24
|
+
#
|
|
25
|
+
# - `courses:read`
|
|
26
|
+
# - `course_analytics:read`
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
course_id: String,
|
|
30
|
+
after: T.nilable(String),
|
|
31
|
+
before: T.nilable(String),
|
|
32
|
+
first: T.nilable(Integer),
|
|
33
|
+
keyword: T.nilable(String),
|
|
34
|
+
last: T.nilable(Integer),
|
|
35
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
36
|
+
).returns(
|
|
37
|
+
WhopSDK::Internal::CursorPage[
|
|
38
|
+
WhopSDK::Models::CourseStudentListResponse
|
|
39
|
+
]
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def list(
|
|
43
|
+
# The ID of the course
|
|
44
|
+
course_id:,
|
|
45
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
46
|
+
after: nil,
|
|
47
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
48
|
+
before: nil,
|
|
49
|
+
# Returns the first _n_ elements from the list.
|
|
50
|
+
first: nil,
|
|
51
|
+
# Filter students by name - returns students whose names match the keyword
|
|
52
|
+
keyword: nil,
|
|
53
|
+
# Returns the last _n_ elements from the list.
|
|
54
|
+
last: nil,
|
|
55
|
+
request_options: {}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# @api private
|
|
60
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
61
|
+
def self.new(client:)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -12,9 +12,17 @@ module WhopSDK
|
|
|
12
12
|
params(
|
|
13
13
|
experience_id: String,
|
|
14
14
|
title: String,
|
|
15
|
+
certificate_after_completion_enabled: T.nilable(T::Boolean),
|
|
15
16
|
cover_image: T.nilable(String),
|
|
17
|
+
require_completing_lessons_in_order: T.nilable(T::Boolean),
|
|
16
18
|
tagline: T.nilable(String),
|
|
17
|
-
thumbnail:
|
|
19
|
+
thumbnail:
|
|
20
|
+
T.nilable(
|
|
21
|
+
T.any(
|
|
22
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
|
|
23
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID::OrHash
|
|
24
|
+
)
|
|
25
|
+
),
|
|
18
26
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
19
27
|
).returns(WhopSDK::Course)
|
|
20
28
|
end
|
|
@@ -23,8 +31,14 @@ module WhopSDK
|
|
|
23
31
|
experience_id:,
|
|
24
32
|
# The title of the course
|
|
25
33
|
title:,
|
|
34
|
+
# Whether the course will award its students a PDF certificate after completing
|
|
35
|
+
# all lessons
|
|
36
|
+
certificate_after_completion_enabled: nil,
|
|
26
37
|
# The cover image URL of the course
|
|
27
38
|
cover_image: nil,
|
|
39
|
+
# Whether the course requires students to complete the previous lesson before
|
|
40
|
+
# moving on to the next one
|
|
41
|
+
require_completing_lessons_in_order: nil,
|
|
28
42
|
# The tagline of the course
|
|
29
43
|
tagline: nil,
|
|
30
44
|
# The thumbnail for the course in png, jpeg, or gif format
|
|
@@ -63,7 +77,13 @@ module WhopSDK
|
|
|
63
77
|
language: T.nilable(WhopSDK::Languages::OrSymbol),
|
|
64
78
|
require_completing_lessons_in_order: T.nilable(T::Boolean),
|
|
65
79
|
tagline: T.nilable(String),
|
|
66
|
-
thumbnail:
|
|
80
|
+
thumbnail:
|
|
81
|
+
T.nilable(
|
|
82
|
+
T.any(
|
|
83
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
|
|
84
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID::OrHash
|
|
85
|
+
)
|
|
86
|
+
),
|
|
67
87
|
title: T.nilable(String),
|
|
68
88
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
69
89
|
).returns(WhopSDK::Course)
|
|
@@ -46,7 +46,13 @@ module WhopSDK
|
|
|
46
46
|
id: String,
|
|
47
47
|
access_level:
|
|
48
48
|
T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol),
|
|
49
|
-
logo:
|
|
49
|
+
logo:
|
|
50
|
+
T.nilable(
|
|
51
|
+
T.any(
|
|
52
|
+
WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID::OrHash,
|
|
53
|
+
WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID::OrHash
|
|
54
|
+
)
|
|
55
|
+
),
|
|
50
56
|
name: T.nilable(String),
|
|
51
57
|
order: T.nilable(String),
|
|
52
58
|
section_id: T.nilable(String),
|
|
@@ -13,7 +13,12 @@ module WhopSDK
|
|
|
13
13
|
experience_id: String,
|
|
14
14
|
attachments:
|
|
15
15
|
T.nilable(
|
|
16
|
-
T::Array[
|
|
16
|
+
T::Array[
|
|
17
|
+
T.any(
|
|
18
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
|
|
19
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID::OrHash
|
|
20
|
+
)
|
|
21
|
+
]
|
|
17
22
|
),
|
|
18
23
|
content: T.nilable(String),
|
|
19
24
|
is_mention: T.nilable(T::Boolean),
|
|
@@ -76,7 +81,12 @@ module WhopSDK
|
|
|
76
81
|
id: String,
|
|
77
82
|
attachments:
|
|
78
83
|
T.nilable(
|
|
79
|
-
T::Array[
|
|
84
|
+
T::Array[
|
|
85
|
+
T.any(
|
|
86
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
|
|
87
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID::OrHash
|
|
88
|
+
)
|
|
89
|
+
]
|
|
80
90
|
),
|
|
81
91
|
content: T.nilable(String),
|
|
82
92
|
is_pinned: T.nilable(T::Boolean),
|
|
@@ -14,16 +14,16 @@ module WhopSDK
|
|
|
14
14
|
collection_method: WhopSDK::CollectionMethod::OrSymbol,
|
|
15
15
|
company_id: String,
|
|
16
16
|
due_date: Time,
|
|
17
|
+
member_id: String,
|
|
17
18
|
plan: WhopSDK::InvoiceCreateParams::Plan::OrHash,
|
|
19
|
+
product: WhopSDK::InvoiceCreateParams::Product::OrHash,
|
|
20
|
+
email_address: String,
|
|
21
|
+
product_id: String,
|
|
18
22
|
charge_buyer_fee: T.nilable(T::Boolean),
|
|
19
23
|
customer_name: T.nilable(String),
|
|
20
|
-
email_address: T.nilable(String),
|
|
21
|
-
member_id: T.nilable(String),
|
|
22
24
|
payment_token_id: T.nilable(String),
|
|
23
|
-
product: T.nilable(WhopSDK::InvoiceCreateParams::Product::OrHash),
|
|
24
|
-
product_id: T.nilable(String),
|
|
25
25
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
26
|
-
).returns(WhopSDK::
|
|
26
|
+
).returns(WhopSDK::Invoice)
|
|
27
27
|
end
|
|
28
28
|
def create(
|
|
29
29
|
# The method of collection for this invoice. If using charge_automatically, you
|
|
@@ -33,30 +33,30 @@ module WhopSDK
|
|
|
33
33
|
company_id:,
|
|
34
34
|
# The date the invoice is due, if applicable.
|
|
35
35
|
due_date:,
|
|
36
|
+
# The member ID to create this invoice for. Include this if you want to create an
|
|
37
|
+
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
38
|
+
# an email_address and customer_name.
|
|
39
|
+
member_id:,
|
|
36
40
|
# The properties of the plan to create for this invoice.
|
|
37
41
|
plan:,
|
|
42
|
+
# The properties of the product to create for this invoice. Include this if you
|
|
43
|
+
# want to create an invoice for a new product.
|
|
44
|
+
product:,
|
|
45
|
+
# The email address to create this invoice for. This is required if you want to
|
|
46
|
+
# create an invoice for a user who does not have a member of your company yet.
|
|
47
|
+
email_address:,
|
|
48
|
+
# The product ID to create this invoice for. Include this if you want to create an
|
|
49
|
+
# invoice for an existing product.
|
|
50
|
+
product_id:,
|
|
38
51
|
# Whether or not to charge the customer a buyer fee.
|
|
39
52
|
charge_buyer_fee: nil,
|
|
40
53
|
# The name of the customer to create this invoice for. This is required if you
|
|
41
54
|
# want to create an invoice for a customer who does not have a member of your
|
|
42
55
|
# company yet.
|
|
43
56
|
customer_name: nil,
|
|
44
|
-
# The email address to create this invoice for. This is required if you want to
|
|
45
|
-
# create an invoice for a user who does not have a member of your company yet.
|
|
46
|
-
email_address: nil,
|
|
47
|
-
# The member ID to create this invoice for. Include this if you want to create an
|
|
48
|
-
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
49
|
-
# an email_address and customer_name.
|
|
50
|
-
member_id: nil,
|
|
51
57
|
# The payment token ID to use for this invoice. If using charge_automatically, you
|
|
52
58
|
# must provide a payment_token.
|
|
53
59
|
payment_token_id: nil,
|
|
54
|
-
# The properties of the product to create for this invoice. Include this if you
|
|
55
|
-
# want to create an invoice for a new product.
|
|
56
|
-
product: nil,
|
|
57
|
-
# The product ID to create this invoice for. Include this if you want to create an
|
|
58
|
-
# invoice for an existing product.
|
|
59
|
-
product_id: nil,
|
|
60
60
|
request_options: {}
|
|
61
61
|
)
|
|
62
62
|
end
|
|
@@ -14,7 +14,12 @@ module WhopSDK
|
|
|
14
14
|
content: String,
|
|
15
15
|
attachments:
|
|
16
16
|
T.nilable(
|
|
17
|
-
T::Array[
|
|
17
|
+
T::Array[
|
|
18
|
+
T.any(
|
|
19
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
|
|
20
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID::OrHash
|
|
21
|
+
)
|
|
22
|
+
]
|
|
18
23
|
),
|
|
19
24
|
poll: T.nilable(WhopSDK::MessageCreateParams::Poll::OrHash),
|
|
20
25
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
@@ -53,7 +58,12 @@ module WhopSDK
|
|
|
53
58
|
id: String,
|
|
54
59
|
attachments:
|
|
55
60
|
T.nilable(
|
|
56
|
-
T::Array[
|
|
61
|
+
T::Array[
|
|
62
|
+
T.any(
|
|
63
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
|
|
64
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID::OrHash
|
|
65
|
+
)
|
|
66
|
+
]
|
|
57
67
|
),
|
|
58
68
|
content: T.nilable(String),
|
|
59
69
|
is_pinned: T.nilable(T::Boolean),
|
|
@@ -20,10 +20,20 @@ module WhopSDK
|
|
|
20
20
|
T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField::OrHash]),
|
|
21
21
|
description: T.nilable(String),
|
|
22
22
|
expiration_days: T.nilable(Integer),
|
|
23
|
-
image:
|
|
23
|
+
image:
|
|
24
|
+
T.nilable(
|
|
25
|
+
T.any(
|
|
26
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID::OrHash,
|
|
27
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithID::OrHash
|
|
28
|
+
)
|
|
29
|
+
),
|
|
24
30
|
initial_price: T.nilable(Float),
|
|
25
31
|
internal_notes: T.nilable(String),
|
|
26
32
|
override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
|
|
33
|
+
payment_method_configuration:
|
|
34
|
+
T.nilable(
|
|
35
|
+
WhopSDK::PlanCreateParams::PaymentMethodConfiguration::OrHash
|
|
36
|
+
),
|
|
27
37
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
28
38
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
29
39
|
renewal_price: T.nilable(Float),
|
|
@@ -63,6 +73,9 @@ module WhopSDK
|
|
|
63
73
|
# Whether or not the tax is included in a plan's price (or if it hasn't been set
|
|
64
74
|
# up)
|
|
65
75
|
override_tax_type: nil,
|
|
76
|
+
# The explicit payment method configuration for the plan. If not provided, the
|
|
77
|
+
# platform or company's defaults will apply.
|
|
78
|
+
payment_method_configuration: nil,
|
|
66
79
|
# The type of plan that can be attached to an access pass
|
|
67
80
|
plan_type: nil,
|
|
68
81
|
# The methods of how a plan can be released.
|
|
@@ -120,11 +133,21 @@ module WhopSDK
|
|
|
120
133
|
T.nilable(T::Array[WhopSDK::PlanUpdateParams::CustomField::OrHash]),
|
|
121
134
|
description: T.nilable(String),
|
|
122
135
|
expiration_days: T.nilable(Integer),
|
|
123
|
-
image:
|
|
136
|
+
image:
|
|
137
|
+
T.nilable(
|
|
138
|
+
T.any(
|
|
139
|
+
WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID::OrHash,
|
|
140
|
+
WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID::OrHash
|
|
141
|
+
)
|
|
142
|
+
),
|
|
124
143
|
initial_price: T.nilable(Float),
|
|
125
144
|
internal_notes: T.nilable(String),
|
|
126
145
|
offer_cancel_discount: T.nilable(T::Boolean),
|
|
127
146
|
override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
|
|
147
|
+
payment_method_configuration:
|
|
148
|
+
T.nilable(
|
|
149
|
+
WhopSDK::PlanUpdateParams::PaymentMethodConfiguration::OrHash
|
|
150
|
+
),
|
|
128
151
|
renewal_price: T.nilable(Float),
|
|
129
152
|
stock: T.nilable(Integer),
|
|
130
153
|
strike_through_initial_price: T.nilable(Float),
|
|
@@ -159,6 +182,9 @@ module WhopSDK
|
|
|
159
182
|
# Whether or not the tax is included in a plan's price (or if it hasn't been set
|
|
160
183
|
# up)
|
|
161
184
|
override_tax_type: nil,
|
|
185
|
+
# The explicit payment method configuration for the plan. If sent as null, the
|
|
186
|
+
# custom configuration will be removed.
|
|
187
|
+
payment_method_configuration: nil,
|
|
162
188
|
# The amount the customer is charged every billing period.
|
|
163
189
|
renewal_price: nil,
|
|
164
190
|
# The number of units available for purchase.
|
|
@@ -114,7 +114,12 @@ module WhopSDK
|
|
|
114
114
|
params(
|
|
115
115
|
id: String,
|
|
116
116
|
banner_image:
|
|
117
|
-
T.nilable(
|
|
117
|
+
T.nilable(
|
|
118
|
+
T.any(
|
|
119
|
+
WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID::OrHash,
|
|
120
|
+
WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithID::OrHash
|
|
121
|
+
)
|
|
122
|
+
),
|
|
118
123
|
business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
|
|
119
124
|
collect_shipping_address: T.nilable(T::Boolean),
|
|
120
125
|
custom_cta: T.nilable(WhopSDK::CustomCta::OrSymbol),
|
|
@@ -15,6 +15,7 @@ module WhopSDK
|
|
|
15
15
|
destination_id: String,
|
|
16
16
|
origin_id: String,
|
|
17
17
|
idempotence_key: T.nilable(String),
|
|
18
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
18
19
|
notes: T.nilable(String),
|
|
19
20
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
20
21
|
).returns(WhopSDK::Transfer)
|
|
@@ -32,6 +33,8 @@ module WhopSDK
|
|
|
32
33
|
origin_id:,
|
|
33
34
|
# A unique key to ensure idempotence. Use a UUID or similar.
|
|
34
35
|
idempotence_key: nil,
|
|
36
|
+
# A hash of metadata to attach to the transfer.
|
|
37
|
+
metadata: nil,
|
|
35
38
|
# Notes for the transfer. Maximum of 50 characters.
|
|
36
39
|
notes: nil,
|
|
37
40
|
request_options: {}
|
data/sig/whop_sdk/client.rbs
CHANGED
|
@@ -2,7 +2,7 @@ module WhopSDK
|
|
|
2
2
|
module Models
|
|
3
3
|
type app_build_create_params =
|
|
4
4
|
{
|
|
5
|
-
attachment: WhopSDK::AppBuildCreateParams::
|
|
5
|
+
attachment: WhopSDK::Models::AppBuildCreateParams::attachment,
|
|
6
6
|
checksum: String,
|
|
7
7
|
platform: WhopSDK::Models::app_build_platforms,
|
|
8
8
|
app_id: String?,
|
|
@@ -14,7 +14,7 @@ module WhopSDK
|
|
|
14
14
|
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
15
15
|
include WhopSDK::Internal::Type::RequestParameters
|
|
16
16
|
|
|
17
|
-
attr_accessor attachment: WhopSDK::AppBuildCreateParams::
|
|
17
|
+
attr_accessor attachment: WhopSDK::Models::AppBuildCreateParams::attachment
|
|
18
18
|
|
|
19
19
|
attr_accessor checksum: String
|
|
20
20
|
|
|
@@ -25,7 +25,7 @@ module WhopSDK
|
|
|
25
25
|
attr_accessor supported_app_view_types: ::Array[WhopSDK::Models::app_view_type]?
|
|
26
26
|
|
|
27
27
|
def initialize: (
|
|
28
|
-
attachment: WhopSDK::AppBuildCreateParams::
|
|
28
|
+
attachment: WhopSDK::Models::AppBuildCreateParams::attachment,
|
|
29
29
|
checksum: String,
|
|
30
30
|
platform: WhopSDK::Models::app_build_platforms,
|
|
31
31
|
?app_id: String?,
|
|
@@ -34,7 +34,7 @@ module WhopSDK
|
|
|
34
34
|
) -> void
|
|
35
35
|
|
|
36
36
|
def to_hash: -> {
|
|
37
|
-
attachment: WhopSDK::AppBuildCreateParams::
|
|
37
|
+
attachment: WhopSDK::Models::AppBuildCreateParams::attachment,
|
|
38
38
|
checksum: String,
|
|
39
39
|
platform: WhopSDK::Models::app_build_platforms,
|
|
40
40
|
app_id: String?,
|
|
@@ -42,16 +42,35 @@ module WhopSDK
|
|
|
42
42
|
request_options: WhopSDK::RequestOptions
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
type attachment =
|
|
45
|
+
type attachment =
|
|
46
|
+
WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID
|
|
47
|
+
| WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
module Attachment
|
|
50
|
+
extend WhopSDK::Internal::Type::Union
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
type attachment_input_with_direct_upload_id =
|
|
53
|
+
{ direct_upload_id: String }
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
56
|
+
attr_accessor direct_upload_id: String
|
|
53
57
|
|
|
54
|
-
|
|
58
|
+
def initialize: (direct_upload_id: String) -> void
|
|
59
|
+
|
|
60
|
+
def to_hash: -> { direct_upload_id: String }
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
type attachment_input_with_id = { id: String }
|
|
64
|
+
|
|
65
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
66
|
+
attr_accessor id: String
|
|
67
|
+
|
|
68
|
+
def initialize: (id: String) -> void
|
|
69
|
+
|
|
70
|
+
def to_hash: -> { id: String }
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def self?.variants: -> ::Array[WhopSDK::Models::AppBuildCreateParams::attachment]
|
|
55
74
|
end
|
|
56
75
|
end
|
|
57
76
|
end
|
|
@@ -8,7 +8,7 @@ module WhopSDK
|
|
|
8
8
|
description: String?,
|
|
9
9
|
discover_path: String?,
|
|
10
10
|
experience_path: String?,
|
|
11
|
-
icon: WhopSDK::AppUpdateParams::
|
|
11
|
+
icon: WhopSDK::Models::AppUpdateParams::icon?,
|
|
12
12
|
name: String?,
|
|
13
13
|
required_scopes: ::Array[WhopSDK::Models::AppUpdateParams::required_scope]?,
|
|
14
14
|
status: WhopSDK::Models::app_statuses?
|
|
@@ -31,7 +31,7 @@ module WhopSDK
|
|
|
31
31
|
|
|
32
32
|
attr_accessor experience_path: String?
|
|
33
33
|
|
|
34
|
-
attr_accessor icon: WhopSDK::AppUpdateParams::
|
|
34
|
+
attr_accessor icon: WhopSDK::Models::AppUpdateParams::icon?
|
|
35
35
|
|
|
36
36
|
attr_accessor name: String?
|
|
37
37
|
|
|
@@ -46,7 +46,7 @@ module WhopSDK
|
|
|
46
46
|
?description: String?,
|
|
47
47
|
?discover_path: String?,
|
|
48
48
|
?experience_path: String?,
|
|
49
|
-
?icon: WhopSDK::AppUpdateParams::
|
|
49
|
+
?icon: WhopSDK::Models::AppUpdateParams::icon?,
|
|
50
50
|
?name: String?,
|
|
51
51
|
?required_scopes: ::Array[WhopSDK::Models::AppUpdateParams::required_scope]?,
|
|
52
52
|
?status: WhopSDK::Models::app_statuses?,
|
|
@@ -60,23 +60,42 @@ module WhopSDK
|
|
|
60
60
|
description: String?,
|
|
61
61
|
discover_path: String?,
|
|
62
62
|
experience_path: String?,
|
|
63
|
-
icon: WhopSDK::AppUpdateParams::
|
|
63
|
+
icon: WhopSDK::Models::AppUpdateParams::icon?,
|
|
64
64
|
name: String?,
|
|
65
65
|
required_scopes: ::Array[WhopSDK::Models::AppUpdateParams::required_scope]?,
|
|
66
66
|
status: WhopSDK::Models::app_statuses?,
|
|
67
67
|
request_options: WhopSDK::RequestOptions
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
type icon =
|
|
70
|
+
type icon =
|
|
71
|
+
WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID
|
|
72
|
+
| WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID
|
|
71
73
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
module Icon
|
|
75
|
+
extend WhopSDK::Internal::Type::Union
|
|
74
76
|
|
|
75
|
-
|
|
77
|
+
type attachment_input_with_direct_upload_id =
|
|
78
|
+
{ direct_upload_id: String }
|
|
76
79
|
|
|
77
|
-
|
|
80
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
81
|
+
attr_accessor direct_upload_id: String
|
|
78
82
|
|
|
79
|
-
|
|
83
|
+
def initialize: (direct_upload_id: String) -> void
|
|
84
|
+
|
|
85
|
+
def to_hash: -> { direct_upload_id: String }
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
type attachment_input_with_id = { id: String }
|
|
89
|
+
|
|
90
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
91
|
+
attr_accessor id: String
|
|
92
|
+
|
|
93
|
+
def initialize: (id: String) -> void
|
|
94
|
+
|
|
95
|
+
def to_hash: -> { id: String }
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def self?.variants: -> ::Array[WhopSDK::Models::AppUpdateParams::icon]
|
|
80
99
|
end
|
|
81
100
|
|
|
82
101
|
type required_scope = :read_user
|