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
|
@@ -24,6 +24,12 @@ module WhopSDK
|
|
|
24
24
|
sig { returns(Time) }
|
|
25
25
|
attr_accessor :due_date
|
|
26
26
|
|
|
27
|
+
# The member ID to create this invoice for. Include this if you want to create an
|
|
28
|
+
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
29
|
+
# an email_address and customer_name.
|
|
30
|
+
sig { returns(String) }
|
|
31
|
+
attr_accessor :member_id
|
|
32
|
+
|
|
27
33
|
# The properties of the plan to create for this invoice.
|
|
28
34
|
sig { returns(WhopSDK::InvoiceCreateParams::Plan) }
|
|
29
35
|
attr_reader :plan
|
|
@@ -31,6 +37,16 @@ module WhopSDK
|
|
|
31
37
|
sig { params(plan: WhopSDK::InvoiceCreateParams::Plan::OrHash).void }
|
|
32
38
|
attr_writer :plan
|
|
33
39
|
|
|
40
|
+
# The properties of the product to create for this invoice. Include this if you
|
|
41
|
+
# want to create an invoice for a new product.
|
|
42
|
+
sig { returns(WhopSDK::InvoiceCreateParams::Product) }
|
|
43
|
+
attr_reader :product
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
params(product: WhopSDK::InvoiceCreateParams::Product::OrHash).void
|
|
47
|
+
end
|
|
48
|
+
attr_writer :product
|
|
49
|
+
|
|
34
50
|
# Whether or not to charge the customer a buyer fee.
|
|
35
51
|
sig { returns(T.nilable(T::Boolean)) }
|
|
36
52
|
attr_accessor :charge_buyer_fee
|
|
@@ -41,37 +57,19 @@ module WhopSDK
|
|
|
41
57
|
sig { returns(T.nilable(String)) }
|
|
42
58
|
attr_accessor :customer_name
|
|
43
59
|
|
|
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
|
-
sig { returns(T.nilable(String)) }
|
|
47
|
-
attr_accessor :email_address
|
|
48
|
-
|
|
49
|
-
# The member ID to create this invoice for. Include this if you want to create an
|
|
50
|
-
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
51
|
-
# an email_address and customer_name.
|
|
52
|
-
sig { returns(T.nilable(String)) }
|
|
53
|
-
attr_accessor :member_id
|
|
54
|
-
|
|
55
60
|
# The payment token ID to use for this invoice. If using charge_automatically, you
|
|
56
61
|
# must provide a payment_token.
|
|
57
62
|
sig { returns(T.nilable(String)) }
|
|
58
63
|
attr_accessor :payment_token_id
|
|
59
64
|
|
|
60
|
-
# The
|
|
61
|
-
#
|
|
62
|
-
sig { returns(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
sig do
|
|
66
|
-
params(
|
|
67
|
-
product: T.nilable(WhopSDK::InvoiceCreateParams::Product::OrHash)
|
|
68
|
-
).void
|
|
69
|
-
end
|
|
70
|
-
attr_writer :product
|
|
65
|
+
# The email address to create this invoice for. This is required if you want to
|
|
66
|
+
# create an invoice for a user who does not have a member of your company yet.
|
|
67
|
+
sig { returns(String) }
|
|
68
|
+
attr_accessor :email_address
|
|
71
69
|
|
|
72
70
|
# The product ID to create this invoice for. Include this if you want to create an
|
|
73
71
|
# invoice for an existing product.
|
|
74
|
-
sig { returns(
|
|
72
|
+
sig { returns(String) }
|
|
75
73
|
attr_accessor :product_id
|
|
76
74
|
|
|
77
75
|
sig do
|
|
@@ -79,14 +77,14 @@ module WhopSDK
|
|
|
79
77
|
collection_method: WhopSDK::CollectionMethod::OrSymbol,
|
|
80
78
|
company_id: String,
|
|
81
79
|
due_date: Time,
|
|
80
|
+
member_id: String,
|
|
82
81
|
plan: WhopSDK::InvoiceCreateParams::Plan::OrHash,
|
|
82
|
+
product: WhopSDK::InvoiceCreateParams::Product::OrHash,
|
|
83
|
+
email_address: String,
|
|
84
|
+
product_id: String,
|
|
83
85
|
charge_buyer_fee: T.nilable(T::Boolean),
|
|
84
86
|
customer_name: T.nilable(String),
|
|
85
|
-
email_address: T.nilable(String),
|
|
86
|
-
member_id: T.nilable(String),
|
|
87
87
|
payment_token_id: T.nilable(String),
|
|
88
|
-
product: T.nilable(WhopSDK::InvoiceCreateParams::Product::OrHash),
|
|
89
|
-
product_id: T.nilable(String),
|
|
90
88
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
91
89
|
).returns(T.attached_class)
|
|
92
90
|
end
|
|
@@ -98,30 +96,30 @@ module WhopSDK
|
|
|
98
96
|
company_id:,
|
|
99
97
|
# The date the invoice is due, if applicable.
|
|
100
98
|
due_date:,
|
|
99
|
+
# The member ID to create this invoice for. Include this if you want to create an
|
|
100
|
+
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
101
|
+
# an email_address and customer_name.
|
|
102
|
+
member_id:,
|
|
101
103
|
# The properties of the plan to create for this invoice.
|
|
102
104
|
plan:,
|
|
105
|
+
# The properties of the product to create for this invoice. Include this if you
|
|
106
|
+
# want to create an invoice for a new product.
|
|
107
|
+
product:,
|
|
108
|
+
# The email address to create this invoice for. This is required if you want to
|
|
109
|
+
# create an invoice for a user who does not have a member of your company yet.
|
|
110
|
+
email_address:,
|
|
111
|
+
# The product ID to create this invoice for. Include this if you want to create an
|
|
112
|
+
# invoice for an existing product.
|
|
113
|
+
product_id:,
|
|
103
114
|
# Whether or not to charge the customer a buyer fee.
|
|
104
115
|
charge_buyer_fee: nil,
|
|
105
116
|
# The name of the customer to create this invoice for. This is required if you
|
|
106
117
|
# want to create an invoice for a customer who does not have a member of your
|
|
107
118
|
# company yet.
|
|
108
119
|
customer_name: nil,
|
|
109
|
-
# The email address to create this invoice for. This is required if you want to
|
|
110
|
-
# create an invoice for a user who does not have a member of your company yet.
|
|
111
|
-
email_address: nil,
|
|
112
|
-
# The member ID to create this invoice for. Include this if you want to create an
|
|
113
|
-
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
114
|
-
# an email_address and customer_name.
|
|
115
|
-
member_id: nil,
|
|
116
120
|
# The payment token ID to use for this invoice. If using charge_automatically, you
|
|
117
121
|
# must provide a payment_token.
|
|
118
122
|
payment_token_id: nil,
|
|
119
|
-
# The properties of the product to create for this invoice. Include this if you
|
|
120
|
-
# want to create an invoice for a new product.
|
|
121
|
-
product: nil,
|
|
122
|
-
# The product ID to create this invoice for. Include this if you want to create an
|
|
123
|
-
# invoice for an existing product.
|
|
124
|
-
product_id: nil,
|
|
125
123
|
request_options: {}
|
|
126
124
|
)
|
|
127
125
|
end
|
|
@@ -132,14 +130,14 @@ module WhopSDK
|
|
|
132
130
|
collection_method: WhopSDK::CollectionMethod::OrSymbol,
|
|
133
131
|
company_id: String,
|
|
134
132
|
due_date: Time,
|
|
133
|
+
member_id: String,
|
|
135
134
|
plan: WhopSDK::InvoiceCreateParams::Plan,
|
|
135
|
+
product: WhopSDK::InvoiceCreateParams::Product,
|
|
136
136
|
charge_buyer_fee: T.nilable(T::Boolean),
|
|
137
137
|
customer_name: T.nilable(String),
|
|
138
|
-
email_address: T.nilable(String),
|
|
139
|
-
member_id: T.nilable(String),
|
|
140
138
|
payment_token_id: T.nilable(String),
|
|
141
|
-
|
|
142
|
-
product_id:
|
|
139
|
+
email_address: String,
|
|
140
|
+
product_id: String,
|
|
143
141
|
request_options: WhopSDK::RequestOptions
|
|
144
142
|
}
|
|
145
143
|
)
|
|
@@ -199,10 +197,18 @@ module WhopSDK
|
|
|
199
197
|
sig { returns(T.nilable(Float)) }
|
|
200
198
|
attr_accessor :renewal_price
|
|
201
199
|
|
|
200
|
+
# The number of units available for purchase.
|
|
201
|
+
sig { returns(T.nilable(Integer)) }
|
|
202
|
+
attr_accessor :stock
|
|
203
|
+
|
|
202
204
|
# The number of free trial days added before a renewal plan.
|
|
203
205
|
sig { returns(T.nilable(Integer)) }
|
|
204
206
|
attr_accessor :trial_period_days
|
|
205
207
|
|
|
208
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
209
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
210
|
+
attr_accessor :unlimited_stock
|
|
211
|
+
|
|
206
212
|
# Visibility of a resource
|
|
207
213
|
sig { returns(T.nilable(WhopSDK::Visibility::OrSymbol)) }
|
|
208
214
|
attr_accessor :visibility
|
|
@@ -224,7 +230,9 @@ module WhopSDK
|
|
|
224
230
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
225
231
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
226
232
|
renewal_price: T.nilable(Float),
|
|
233
|
+
stock: T.nilable(Integer),
|
|
227
234
|
trial_period_days: T.nilable(Integer),
|
|
235
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
228
236
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
|
|
229
237
|
).returns(T.attached_class)
|
|
230
238
|
end
|
|
@@ -250,8 +258,12 @@ module WhopSDK
|
|
|
250
258
|
# The amount the customer is charged every billing period. Use only if a recurring
|
|
251
259
|
# payment. Provided as a number in dollars. Eg: 10.43 for $10.43
|
|
252
260
|
renewal_price: nil,
|
|
261
|
+
# The number of units available for purchase.
|
|
262
|
+
stock: nil,
|
|
253
263
|
# The number of free trial days added before a renewal plan.
|
|
254
264
|
trial_period_days: nil,
|
|
265
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
266
|
+
unlimited_stock: nil,
|
|
255
267
|
# Visibility of a resource
|
|
256
268
|
visibility: nil
|
|
257
269
|
)
|
|
@@ -272,7 +284,9 @@ module WhopSDK
|
|
|
272
284
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
273
285
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
274
286
|
renewal_price: T.nilable(Float),
|
|
287
|
+
stock: T.nilable(Integer),
|
|
275
288
|
trial_period_days: T.nilable(Integer),
|
|
289
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
276
290
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
|
|
277
291
|
}
|
|
278
292
|
)
|
|
@@ -136,8 +136,9 @@ module WhopSDK
|
|
|
136
136
|
sig { returns(String) }
|
|
137
137
|
attr_accessor :id
|
|
138
138
|
|
|
139
|
-
# The correct answer for the question. Used for short answer questions
|
|
140
|
-
|
|
139
|
+
# The correct answer for the question. Used for short answer questions. Only
|
|
140
|
+
# visible to admins (users with courses:update permission)
|
|
141
|
+
sig { returns(T.nilable(String)) }
|
|
141
142
|
attr_accessor :correct_answer
|
|
142
143
|
|
|
143
144
|
# When the question was created
|
|
@@ -175,7 +176,7 @@ module WhopSDK
|
|
|
175
176
|
sig do
|
|
176
177
|
params(
|
|
177
178
|
id: String,
|
|
178
|
-
correct_answer: String,
|
|
179
|
+
correct_answer: T.nilable(String),
|
|
179
180
|
created_at: Time,
|
|
180
181
|
image:
|
|
181
182
|
T.nilable(WhopSDK::Lesson::AssessmentQuestion::Image::OrHash),
|
|
@@ -189,7 +190,8 @@ module WhopSDK
|
|
|
189
190
|
def self.new(
|
|
190
191
|
# The ID of the assessment question
|
|
191
192
|
id:,
|
|
192
|
-
# The correct answer for the question. Used for short answer questions
|
|
193
|
+
# The correct answer for the question. Used for short answer questions. Only
|
|
194
|
+
# visible to admins (users with courses:update permission)
|
|
193
195
|
correct_answer:,
|
|
194
196
|
# When the question was created
|
|
195
197
|
created_at:,
|
|
@@ -210,7 +212,7 @@ module WhopSDK
|
|
|
210
212
|
override.returns(
|
|
211
213
|
{
|
|
212
214
|
id: String,
|
|
213
|
-
correct_answer: String,
|
|
215
|
+
correct_answer: T.nilable(String),
|
|
214
216
|
created_at: Time,
|
|
215
217
|
image: T.nilable(WhopSDK::Lesson::AssessmentQuestion::Image),
|
|
216
218
|
options: T::Array[WhopSDK::Lesson::AssessmentQuestion::Option],
|
|
@@ -298,8 +300,9 @@ module WhopSDK
|
|
|
298
300
|
sig { returns(String) }
|
|
299
301
|
attr_accessor :id
|
|
300
302
|
|
|
301
|
-
# Whether this option is a correct answer
|
|
302
|
-
|
|
303
|
+
# Whether this option is a correct answer. Only visible to admins (users with
|
|
304
|
+
# courses:update permission)
|
|
305
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
303
306
|
attr_accessor :is_correct
|
|
304
307
|
|
|
305
308
|
# The text of the answer option
|
|
@@ -314,7 +317,7 @@ module WhopSDK
|
|
|
314
317
|
sig do
|
|
315
318
|
params(
|
|
316
319
|
id: String,
|
|
317
|
-
is_correct: T::Boolean,
|
|
320
|
+
is_correct: T.nilable(T::Boolean),
|
|
318
321
|
option_text: String,
|
|
319
322
|
order: Integer
|
|
320
323
|
).returns(T.attached_class)
|
|
@@ -322,7 +325,8 @@ module WhopSDK
|
|
|
322
325
|
def self.new(
|
|
323
326
|
# The ID of the assessment question option
|
|
324
327
|
id:,
|
|
325
|
-
# Whether this option is a correct answer
|
|
328
|
+
# Whether this option is a correct answer. Only visible to admins (users with
|
|
329
|
+
# courses:update permission)
|
|
326
330
|
is_correct:,
|
|
327
331
|
# The text of the answer option
|
|
328
332
|
option_text:,
|
|
@@ -335,7 +339,7 @@ module WhopSDK
|
|
|
335
339
|
override.returns(
|
|
336
340
|
{
|
|
337
341
|
id: String,
|
|
338
|
-
is_correct: T::Boolean,
|
|
342
|
+
is_correct: T.nilable(T::Boolean),
|
|
339
343
|
option_text: String,
|
|
340
344
|
order: Integer
|
|
341
345
|
}
|
|
@@ -21,7 +21,16 @@ module WhopSDK
|
|
|
21
21
|
|
|
22
22
|
# The attachments for this message, such as videos or images.
|
|
23
23
|
sig do
|
|
24
|
-
returns(
|
|
24
|
+
returns(
|
|
25
|
+
T.nilable(
|
|
26
|
+
T::Array[
|
|
27
|
+
T.any(
|
|
28
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
29
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID
|
|
30
|
+
)
|
|
31
|
+
]
|
|
32
|
+
)
|
|
33
|
+
)
|
|
25
34
|
end
|
|
26
35
|
attr_accessor :attachments
|
|
27
36
|
|
|
@@ -40,7 +49,12 @@ module WhopSDK
|
|
|
40
49
|
content: String,
|
|
41
50
|
attachments:
|
|
42
51
|
T.nilable(
|
|
43
|
-
T::Array[
|
|
52
|
+
T::Array[
|
|
53
|
+
T.any(
|
|
54
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
|
|
55
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID::OrHash
|
|
56
|
+
)
|
|
57
|
+
]
|
|
44
58
|
),
|
|
45
59
|
poll: T.nilable(WhopSDK::MessageCreateParams::Poll::OrHash),
|
|
46
60
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
@@ -65,7 +79,14 @@ module WhopSDK
|
|
|
65
79
|
channel_id: String,
|
|
66
80
|
content: String,
|
|
67
81
|
attachments:
|
|
68
|
-
T.nilable(
|
|
82
|
+
T.nilable(
|
|
83
|
+
T::Array[
|
|
84
|
+
T.any(
|
|
85
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
86
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
),
|
|
69
90
|
poll: T.nilable(WhopSDK::MessageCreateParams::Poll),
|
|
70
91
|
request_options: WhopSDK::RequestOptions
|
|
71
92
|
}
|
|
@@ -74,52 +95,84 @@ module WhopSDK
|
|
|
74
95
|
def to_hash
|
|
75
96
|
end
|
|
76
97
|
|
|
77
|
-
|
|
78
|
-
|
|
98
|
+
# Input for an attachment
|
|
99
|
+
module Attachment
|
|
100
|
+
extend WhopSDK::Internal::Type::Union
|
|
101
|
+
|
|
102
|
+
Variants =
|
|
79
103
|
T.type_alias do
|
|
80
104
|
T.any(
|
|
81
|
-
WhopSDK::MessageCreateParams::Attachment,
|
|
82
|
-
WhopSDK::
|
|
105
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
106
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID
|
|
83
107
|
)
|
|
84
108
|
end
|
|
85
109
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
110
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
111
|
+
OrHash =
|
|
112
|
+
T.type_alias do
|
|
113
|
+
T.any(
|
|
114
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
115
|
+
WhopSDK::Internal::AnyHash
|
|
116
|
+
)
|
|
117
|
+
end
|
|
91
118
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
119
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
120
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
121
|
+
# mediaDirectUpload mutation.
|
|
122
|
+
sig { returns(String) }
|
|
123
|
+
attr_accessor :direct_upload_id
|
|
97
124
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
125
|
+
# Input for an attachment
|
|
126
|
+
sig { params(direct_upload_id: String).returns(T.attached_class) }
|
|
127
|
+
def self.new(
|
|
128
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
129
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
130
|
+
# mediaDirectUpload mutation.
|
|
131
|
+
direct_upload_id:
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
sig { override.returns({ direct_upload_id: String }) }
|
|
136
|
+
def to_hash
|
|
137
|
+
end
|
|
104
138
|
end
|
|
105
|
-
|
|
139
|
+
|
|
140
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
141
|
+
OrHash =
|
|
142
|
+
T.type_alias do
|
|
143
|
+
T.any(
|
|
144
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID,
|
|
145
|
+
WhopSDK::Internal::AnyHash
|
|
146
|
+
)
|
|
147
|
+
end
|
|
148
|
+
|
|
106
149
|
# The ID of an existing attachment object. Use this when updating a resource and
|
|
107
150
|
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
108
151
|
# doing.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
#
|
|
113
|
-
|
|
114
|
-
|
|
152
|
+
sig { returns(String) }
|
|
153
|
+
attr_accessor :id
|
|
154
|
+
|
|
155
|
+
# Input for an attachment
|
|
156
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
157
|
+
def self.new(
|
|
158
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
159
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
160
|
+
# doing.
|
|
161
|
+
id:
|
|
162
|
+
)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
sig { override.returns({ id: String }) }
|
|
166
|
+
def to_hash
|
|
167
|
+
end
|
|
115
168
|
end
|
|
116
169
|
|
|
117
170
|
sig do
|
|
118
171
|
override.returns(
|
|
119
|
-
|
|
172
|
+
T::Array[WhopSDK::MessageCreateParams::Attachment::Variants]
|
|
120
173
|
)
|
|
121
174
|
end
|
|
122
|
-
def
|
|
175
|
+
def self.variants
|
|
123
176
|
end
|
|
124
177
|
end
|
|
125
178
|
|
|
@@ -13,7 +13,16 @@ module WhopSDK
|
|
|
13
13
|
|
|
14
14
|
# The attachments for this message
|
|
15
15
|
sig do
|
|
16
|
-
returns(
|
|
16
|
+
returns(
|
|
17
|
+
T.nilable(
|
|
18
|
+
T::Array[
|
|
19
|
+
T.any(
|
|
20
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
21
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID
|
|
22
|
+
)
|
|
23
|
+
]
|
|
24
|
+
)
|
|
25
|
+
)
|
|
17
26
|
end
|
|
18
27
|
attr_accessor :attachments
|
|
19
28
|
|
|
@@ -29,7 +38,12 @@ module WhopSDK
|
|
|
29
38
|
params(
|
|
30
39
|
attachments:
|
|
31
40
|
T.nilable(
|
|
32
|
-
T::Array[
|
|
41
|
+
T::Array[
|
|
42
|
+
T.any(
|
|
43
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
|
|
44
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID::OrHash
|
|
45
|
+
)
|
|
46
|
+
]
|
|
33
47
|
),
|
|
34
48
|
content: T.nilable(String),
|
|
35
49
|
is_pinned: T.nilable(T::Boolean),
|
|
@@ -51,7 +65,14 @@ module WhopSDK
|
|
|
51
65
|
override.returns(
|
|
52
66
|
{
|
|
53
67
|
attachments:
|
|
54
|
-
T.nilable(
|
|
68
|
+
T.nilable(
|
|
69
|
+
T::Array[
|
|
70
|
+
T.any(
|
|
71
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
72
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
),
|
|
55
76
|
content: T.nilable(String),
|
|
56
77
|
is_pinned: T.nilable(T::Boolean),
|
|
57
78
|
request_options: WhopSDK::RequestOptions
|
|
@@ -61,52 +82,84 @@ module WhopSDK
|
|
|
61
82
|
def to_hash
|
|
62
83
|
end
|
|
63
84
|
|
|
64
|
-
|
|
65
|
-
|
|
85
|
+
# Input for an attachment
|
|
86
|
+
module Attachment
|
|
87
|
+
extend WhopSDK::Internal::Type::Union
|
|
88
|
+
|
|
89
|
+
Variants =
|
|
66
90
|
T.type_alias do
|
|
67
91
|
T.any(
|
|
68
|
-
WhopSDK::MessageUpdateParams::Attachment,
|
|
69
|
-
WhopSDK::
|
|
92
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
93
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID
|
|
70
94
|
)
|
|
71
95
|
end
|
|
72
96
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
97
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
98
|
+
OrHash =
|
|
99
|
+
T.type_alias do
|
|
100
|
+
T.any(
|
|
101
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
102
|
+
WhopSDK::Internal::AnyHash
|
|
103
|
+
)
|
|
104
|
+
end
|
|
78
105
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
106
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
107
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
108
|
+
# mediaDirectUpload mutation.
|
|
109
|
+
sig { returns(String) }
|
|
110
|
+
attr_accessor :direct_upload_id
|
|
84
111
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
112
|
+
# Input for an attachment
|
|
113
|
+
sig { params(direct_upload_id: String).returns(T.attached_class) }
|
|
114
|
+
def self.new(
|
|
115
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
116
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
117
|
+
# mediaDirectUpload mutation.
|
|
118
|
+
direct_upload_id:
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
sig { override.returns({ direct_upload_id: String }) }
|
|
123
|
+
def to_hash
|
|
124
|
+
end
|
|
91
125
|
end
|
|
92
|
-
|
|
126
|
+
|
|
127
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
128
|
+
OrHash =
|
|
129
|
+
T.type_alias do
|
|
130
|
+
T.any(
|
|
131
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID,
|
|
132
|
+
WhopSDK::Internal::AnyHash
|
|
133
|
+
)
|
|
134
|
+
end
|
|
135
|
+
|
|
93
136
|
# The ID of an existing attachment object. Use this when updating a resource and
|
|
94
137
|
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
95
138
|
# doing.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
#
|
|
100
|
-
|
|
101
|
-
|
|
139
|
+
sig { returns(String) }
|
|
140
|
+
attr_accessor :id
|
|
141
|
+
|
|
142
|
+
# Input for an attachment
|
|
143
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
144
|
+
def self.new(
|
|
145
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
146
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
147
|
+
# doing.
|
|
148
|
+
id:
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
sig { override.returns({ id: String }) }
|
|
153
|
+
def to_hash
|
|
154
|
+
end
|
|
102
155
|
end
|
|
103
156
|
|
|
104
157
|
sig do
|
|
105
158
|
override.returns(
|
|
106
|
-
|
|
159
|
+
T::Array[WhopSDK::MessageUpdateParams::Attachment::Variants]
|
|
107
160
|
)
|
|
108
161
|
end
|
|
109
|
-
def
|
|
162
|
+
def self.variants
|
|
110
163
|
end
|
|
111
164
|
end
|
|
112
165
|
end
|
|
@@ -84,6 +84,11 @@ module WhopSDK
|
|
|
84
84
|
end
|
|
85
85
|
attr_writer :membership
|
|
86
86
|
|
|
87
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
88
|
+
# configuration for which this payment was made
|
|
89
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
90
|
+
attr_accessor :metadata
|
|
91
|
+
|
|
87
92
|
# The datetime the payment was paid
|
|
88
93
|
sig { returns(T.nilable(Time)) }
|
|
89
94
|
attr_accessor :paid_at
|
|
@@ -184,6 +189,7 @@ module WhopSDK
|
|
|
184
189
|
last_payment_attempt: T.nilable(Time),
|
|
185
190
|
member: T.nilable(WhopSDK::Payment::Member::OrHash),
|
|
186
191
|
membership: T.nilable(WhopSDK::Payment::Membership::OrHash),
|
|
192
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
187
193
|
paid_at: T.nilable(Time),
|
|
188
194
|
payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol),
|
|
189
195
|
plan: T.nilable(WhopSDK::Payment::Plan::OrHash),
|
|
@@ -233,6 +239,9 @@ module WhopSDK
|
|
|
233
239
|
member:,
|
|
234
240
|
# The membership attached to this payment.
|
|
235
241
|
membership:,
|
|
242
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
243
|
+
# configuration for which this payment was made
|
|
244
|
+
metadata:,
|
|
236
245
|
# The datetime the payment was paid
|
|
237
246
|
paid_at:,
|
|
238
247
|
# The different types of payment methods that can be used.
|
|
@@ -290,6 +299,7 @@ module WhopSDK
|
|
|
290
299
|
last_payment_attempt: T.nilable(Time),
|
|
291
300
|
member: T.nilable(WhopSDK::Payment::Member),
|
|
292
301
|
membership: T.nilable(WhopSDK::Payment::Membership),
|
|
302
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
293
303
|
paid_at: T.nilable(Time),
|
|
294
304
|
payment_method_type:
|
|
295
305
|
T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol),
|
|
@@ -109,6 +109,11 @@ module WhopSDK
|
|
|
109
109
|
end
|
|
110
110
|
attr_writer :membership
|
|
111
111
|
|
|
112
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
113
|
+
# configuration for which this payment was made
|
|
114
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
115
|
+
attr_accessor :metadata
|
|
116
|
+
|
|
112
117
|
# The datetime the payment was paid
|
|
113
118
|
sig { returns(T.nilable(Time)) }
|
|
114
119
|
attr_accessor :paid_at
|
|
@@ -233,6 +238,7 @@ module WhopSDK
|
|
|
233
238
|
T.nilable(WhopSDK::Models::PaymentListResponse::Member::OrHash),
|
|
234
239
|
membership:
|
|
235
240
|
T.nilable(WhopSDK::Models::PaymentListResponse::Membership::OrHash),
|
|
241
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
236
242
|
paid_at: T.nilable(Time),
|
|
237
243
|
payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol),
|
|
238
244
|
plan: T.nilable(WhopSDK::Models::PaymentListResponse::Plan::OrHash),
|
|
@@ -284,6 +290,9 @@ module WhopSDK
|
|
|
284
290
|
member:,
|
|
285
291
|
# The membership attached to this payment.
|
|
286
292
|
membership:,
|
|
293
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
294
|
+
# configuration for which this payment was made
|
|
295
|
+
metadata:,
|
|
287
296
|
# The datetime the payment was paid
|
|
288
297
|
paid_at:,
|
|
289
298
|
# The different types of payment methods that can be used.
|
|
@@ -343,6 +352,7 @@ module WhopSDK
|
|
|
343
352
|
member: T.nilable(WhopSDK::Models::PaymentListResponse::Member),
|
|
344
353
|
membership:
|
|
345
354
|
T.nilable(WhopSDK::Models::PaymentListResponse::Membership),
|
|
355
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
346
356
|
paid_at: T.nilable(Time),
|
|
347
357
|
payment_method_type:
|
|
348
358
|
T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol),
|