whop_sdk 0.0.7 → 0.0.9
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 +35 -0
- data/README.md +7 -7
- data/lib/whop_sdk/client.rb +12 -0
- data/lib/whop_sdk/internal/type/base_model.rb +1 -1
- data/lib/whop_sdk/models/account_link_create_params.rb +62 -0
- data/lib/whop_sdk/models/account_link_create_response.rb +28 -0
- data/lib/whop_sdk/models/app.rb +9 -1
- data/lib/whop_sdk/models/app_build_list_params.rb +17 -1
- data/lib/whop_sdk/models/app_list_params.rb +10 -1
- data/lib/whop_sdk/models/app_list_response.rb +9 -1
- data/lib/whop_sdk/models/app_type.rb +18 -0
- data/lib/whop_sdk/models/app_update_params.rb +9 -1
- data/lib/whop_sdk/models/authorized_user_list_params.rb +17 -1
- data/lib/whop_sdk/models/checkout_configuration.rb +69 -7
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +73 -1
- data/lib/whop_sdk/models/checkout_configuration_list_params.rb +17 -1
- data/lib/whop_sdk/models/checkout_configuration_list_response.rb +69 -7
- data/lib/whop_sdk/models/checkout_modes.rb +16 -0
- data/lib/whop_sdk/models/company_list_params.rb +17 -1
- data/lib/whop_sdk/models/course.rb +9 -1
- data/lib/whop_sdk/models/course_lesson_list_response.rb +9 -1
- data/lib/whop_sdk/models/course_lesson_mark_as_completed_params.rb +14 -0
- data/lib/whop_sdk/models/course_lesson_mark_as_completed_response.rb +8 -0
- data/lib/whop_sdk/models/course_lesson_start_params.rb +14 -0
- data/lib/whop_sdk/models/course_lesson_start_response.rb +8 -0
- data/lib/whop_sdk/models/course_lesson_submit_assessment_params.rb +52 -0
- data/lib/whop_sdk/models/course_lesson_submit_assessment_response.rb +151 -0
- data/lib/whop_sdk/models/course_list_response.rb +9 -1
- data/lib/whop_sdk/models/dispute_list_params.rb +17 -1
- data/lib/whop_sdk/models/entry_list_params.rb +17 -1
- data/lib/whop_sdk/models/experience_list_params.rb +17 -1
- data/lib/whop_sdk/models/forum_post_create_params.rb +3 -14
- data/lib/whop_sdk/models/forum_post_update_params.rb +3 -14
- data/lib/whop_sdk/models/forum_post_visibility_type.rb +16 -0
- data/lib/whop_sdk/models/invoice_list_params.rb +17 -1
- data/lib/whop_sdk/models/lesson.rb +104 -2
- data/lib/whop_sdk/models/payment_method_types.rb +1 -0
- data/lib/whop_sdk/models/payment_provider.rb +22 -0
- data/lib/whop_sdk/models/plan_create_params.rb +3 -21
- data/lib/whop_sdk/models/plan_list_params.rb +17 -1
- data/lib/whop_sdk/models/product_list_params.rb +17 -1
- data/lib/whop_sdk/models/product_update_params.rb +1 -61
- data/lib/whop_sdk/models/promo_code_list_params.rb +17 -1
- data/lib/whop_sdk/models/refund_created_webhook_event.rb +354 -0
- data/lib/whop_sdk/models/refund_list_params.rb +78 -0
- data/lib/whop_sdk/models/refund_list_response.rb +113 -0
- data/lib/whop_sdk/models/refund_reference_status.rb +17 -0
- data/lib/whop_sdk/models/refund_reference_type.rb +17 -0
- data/lib/whop_sdk/models/refund_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/refund_retrieve_response.rb +307 -0
- data/lib/whop_sdk/models/refund_status.rb +19 -0
- data/lib/whop_sdk/models/refund_updated_webhook_event.rb +354 -0
- data/lib/whop_sdk/models/review_list_params.rb +17 -1
- data/lib/whop_sdk/models/transfer_list_params.rb +17 -1
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
- data/lib/whop_sdk/models/withdrawal_fee_types.rb +16 -0
- data/lib/whop_sdk/models/withdrawal_list_params.rb +78 -0
- data/lib/whop_sdk/models/withdrawal_list_response.rb +87 -0
- data/lib/whop_sdk/models/withdrawal_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +320 -0
- data/lib/whop_sdk/models/withdrawal_speeds.rb +16 -0
- data/lib/whop_sdk/models/withdrawal_status.rb +21 -0
- data/lib/whop_sdk/models/withdrawal_types.rb +16 -0
- data/lib/whop_sdk/models.rb +42 -0
- data/lib/whop_sdk/resources/account_links.rb +47 -0
- data/lib/whop_sdk/resources/app_builds.rb +5 -1
- data/lib/whop_sdk/resources/apps.rb +6 -2
- data/lib/whop_sdk/resources/authorized_users.rb +5 -1
- data/lib/whop_sdk/resources/checkout_configurations.rb +16 -2
- data/lib/whop_sdk/resources/companies.rb +5 -1
- data/lib/whop_sdk/resources/course_lessons.rb +64 -0
- data/lib/whop_sdk/resources/disputes.rb +5 -1
- data/lib/whop_sdk/resources/entries.rb +5 -1
- data/lib/whop_sdk/resources/experiences.rb +5 -1
- data/lib/whop_sdk/resources/forum_posts.rb +2 -2
- data/lib/whop_sdk/resources/invoices.rb +5 -1
- data/lib/whop_sdk/resources/plans.rb +7 -7
- data/lib/whop_sdk/resources/products.rb +6 -4
- data/lib/whop_sdk/resources/promo_codes.rb +5 -1
- data/lib/whop_sdk/resources/refunds.rb +82 -0
- data/lib/whop_sdk/resources/reviews.rb +5 -1
- data/lib/whop_sdk/resources/transfers.rb +5 -1
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- data/lib/whop_sdk/resources/withdrawals.rb +79 -0
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +33 -0
- data/manifest.yaml +1 -0
- data/rbi/whop_sdk/client.rbi +9 -0
- data/rbi/whop_sdk/models/account_link_create_params.rbi +101 -0
- data/rbi/whop_sdk/models/account_link_create_response.rbi +38 -0
- data/rbi/whop_sdk/models/app.rbi +8 -0
- data/rbi/whop_sdk/models/app_build_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/app_list_params.rbi +13 -0
- data/rbi/whop_sdk/models/app_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/app_type.rbi +22 -0
- data/rbi/whop_sdk/models/app_update_params.rbi +8 -0
- data/rbi/whop_sdk/models/authorized_user_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/checkout_configuration.rbi +117 -7
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +116 -0
- data/rbi/whop_sdk/models/checkout_configuration_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +127 -7
- data/rbi/whop_sdk/models/checkout_modes.rbi +20 -0
- data/rbi/whop_sdk/models/company_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/course.rbi +8 -0
- data/rbi/whop_sdk/models/course_lesson_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_lesson_mark_as_completed_params.rbi +30 -0
- data/rbi/whop_sdk/models/course_lesson_mark_as_completed_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_lesson_start_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_lesson_start_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_lesson_submit_assessment_params.rbi +104 -0
- data/rbi/whop_sdk/models/course_lesson_submit_assessment_response.rbi +222 -0
- data/rbi/whop_sdk/models/course_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/dispute_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/entry_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/experience_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/forum_post_create_params.rbi +3 -37
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +3 -37
- data/rbi/whop_sdk/models/forum_post_visibility_type.rbi +27 -0
- data/rbi/whop_sdk/models/invoice_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/lesson.rbi +115 -3
- data/rbi/whop_sdk/models/payment_method_types.rbi +1 -0
- data/rbi/whop_sdk/models/payment_provider.rbi +27 -0
- data/rbi/whop_sdk/models/plan_create_params.rbi +2 -22
- data/rbi/whop_sdk/models/plan_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/product_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/product_update_params.rbi +0 -110
- data/rbi/whop_sdk/models/promo_code_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/refund_created_webhook_event.rbi +561 -0
- data/rbi/whop_sdk/models/refund_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/refund_list_response.rbi +155 -0
- data/rbi/whop_sdk/models/refund_reference_status.rbi +26 -0
- data/rbi/whop_sdk/models/refund_reference_type.rbi +36 -0
- data/rbi/whop_sdk/models/refund_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/refund_retrieve_response.rbi +484 -0
- data/rbi/whop_sdk/models/refund_status.rbi +24 -0
- data/rbi/whop_sdk/models/refund_updated_webhook_event.rbi +561 -0
- data/rbi/whop_sdk/models/review_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/transfer_list_params.rbi +16 -0
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -1
- data/rbi/whop_sdk/models/withdrawal_fee_types.rbi +22 -0
- data/rbi/whop_sdk/models/withdrawal_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/withdrawal_list_response.rbi +107 -0
- data/rbi/whop_sdk/models/withdrawal_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +713 -0
- data/rbi/whop_sdk/models/withdrawal_speeds.rbi +22 -0
- data/rbi/whop_sdk/models/withdrawal_status.rbi +28 -0
- data/rbi/whop_sdk/models/withdrawal_types.rbi +20 -0
- data/rbi/whop_sdk/models.rbi +44 -0
- data/rbi/whop_sdk/resources/account_links.rbi +39 -0
- data/rbi/whop_sdk/resources/app_builds.rbi +6 -0
- data/rbi/whop_sdk/resources/apps.rbi +6 -0
- data/rbi/whop_sdk/resources/authorized_users.rbi +6 -0
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +21 -0
- data/rbi/whop_sdk/resources/companies.rbi +6 -0
- data/rbi/whop_sdk/resources/course_lessons.rbi +48 -0
- data/rbi/whop_sdk/resources/disputes.rbi +6 -0
- data/rbi/whop_sdk/resources/entries.rbi +6 -0
- data/rbi/whop_sdk/resources/experiences.rbi +6 -0
- data/rbi/whop_sdk/resources/forum_posts.rbi +2 -4
- data/rbi/whop_sdk/resources/invoices.rbi +6 -0
- data/rbi/whop_sdk/resources/plans.rbi +7 -9
- data/rbi/whop_sdk/resources/products.rbi +6 -9
- data/rbi/whop_sdk/resources/promo_codes.rbi +6 -0
- data/rbi/whop_sdk/resources/refunds.rbi +74 -0
- data/rbi/whop_sdk/resources/reviews.rbi +6 -0
- data/rbi/whop_sdk/resources/transfers.rbi +6 -0
- data/rbi/whop_sdk/resources/webhooks.rbi +3 -1
- data/rbi/whop_sdk/resources/withdrawals.rbi +71 -0
- data/sig/whop_sdk/client.rbs +6 -0
- data/sig/whop_sdk/models/account_link_create_params.rbs +52 -0
- data/sig/whop_sdk/models/account_link_create_response.rbs +15 -0
- data/sig/whop_sdk/models/app.rbs +5 -0
- data/sig/whop_sdk/models/app_build_list_params.rbs +10 -0
- data/sig/whop_sdk/models/app_list_params.rbs +7 -0
- data/sig/whop_sdk/models/app_list_response.rbs +5 -0
- data/sig/whop_sdk/models/app_type.rbs +16 -0
- data/sig/whop_sdk/models/app_update_params.rbs +5 -0
- data/sig/whop_sdk/models/authorized_user_list_params.rbs +10 -0
- data/sig/whop_sdk/models/checkout_configuration.rbs +45 -8
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +43 -1
- data/sig/whop_sdk/models/checkout_configuration_list_params.rbs +10 -0
- data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +45 -8
- data/sig/whop_sdk/models/checkout_modes.rbs +14 -0
- data/sig/whop_sdk/models/company_list_params.rbs +10 -0
- data/sig/whop_sdk/models/course.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_list_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_mark_as_completed_params.rbs +15 -0
- data/sig/whop_sdk/models/course_lesson_mark_as_completed_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_start_params.rbs +15 -0
- data/sig/whop_sdk/models/course_lesson_start_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_submit_assessment_params.rbs +51 -0
- data/sig/whop_sdk/models/course_lesson_submit_assessment_response.rbs +96 -0
- data/sig/whop_sdk/models/course_list_response.rbs +5 -0
- data/sig/whop_sdk/models/dispute_list_params.rbs +10 -0
- data/sig/whop_sdk/models/entry_list_params.rbs +10 -0
- data/sig/whop_sdk/models/experience_list_params.rbs +10 -0
- data/sig/whop_sdk/models/forum_post_create_params.rbs +4 -15
- data/sig/whop_sdk/models/forum_post_update_params.rbs +4 -15
- data/sig/whop_sdk/models/forum_post_visibility_type.rbs +14 -0
- data/sig/whop_sdk/models/invoice_list_params.rbs +10 -0
- data/sig/whop_sdk/models/lesson.rbs +79 -3
- data/sig/whop_sdk/models/payment_method_types.rbs +2 -0
- data/sig/whop_sdk/models/payment_provider.rbs +28 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +0 -10
- data/sig/whop_sdk/models/plan_list_params.rbs +10 -0
- data/sig/whop_sdk/models/product_list_params.rbs +10 -0
- data/sig/whop_sdk/models/product_update_params.rbs +0 -36
- data/sig/whop_sdk/models/promo_code_list_params.rbs +10 -0
- data/sig/whop_sdk/models/refund_created_webhook_event.rbs +252 -0
- data/sig/whop_sdk/models/refund_list_params.rbs +61 -0
- data/sig/whop_sdk/models/refund_list_response.rbs +80 -0
- data/sig/whop_sdk/models/refund_reference_status.rbs +15 -0
- data/sig/whop_sdk/models/refund_reference_type.rbs +18 -0
- data/sig/whop_sdk/models/refund_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/refund_retrieve_response.rbs +215 -0
- data/sig/whop_sdk/models/refund_status.rbs +18 -0
- data/sig/whop_sdk/models/refund_updated_webhook_event.rbs +252 -0
- data/sig/whop_sdk/models/review_list_params.rbs +10 -0
- data/sig/whop_sdk/models/transfer_list_params.rbs +10 -0
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
- data/sig/whop_sdk/models/withdrawal_fee_types.rbs +14 -0
- data/sig/whop_sdk/models/withdrawal_list_params.rbs +61 -0
- data/sig/whop_sdk/models/withdrawal_list_response.rbs +60 -0
- data/sig/whop_sdk/models/withdrawal_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +297 -0
- data/sig/whop_sdk/models/withdrawal_speeds.rbs +14 -0
- data/sig/whop_sdk/models/withdrawal_status.rbs +26 -0
- data/sig/whop_sdk/models/withdrawal_types.rbs +14 -0
- data/sig/whop_sdk/models.rbs +42 -0
- data/sig/whop_sdk/resources/account_links.rbs +15 -0
- data/sig/whop_sdk/resources/app_builds.rbs +2 -0
- data/sig/whop_sdk/resources/apps.rbs +2 -0
- data/sig/whop_sdk/resources/authorized_users.rbs +2 -0
- data/sig/whop_sdk/resources/checkout_configurations.rbs +5 -0
- data/sig/whop_sdk/resources/companies.rbs +2 -0
- data/sig/whop_sdk/resources/course_lessons.rbs +16 -0
- data/sig/whop_sdk/resources/disputes.rbs +2 -0
- data/sig/whop_sdk/resources/entries.rbs +2 -0
- data/sig/whop_sdk/resources/experiences.rbs +2 -0
- data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
- data/sig/whop_sdk/resources/invoices.rbs +2 -0
- data/sig/whop_sdk/resources/plans.rbs +2 -2
- data/sig/whop_sdk/resources/products.rbs +2 -1
- data/sig/whop_sdk/resources/promo_codes.rbs +2 -0
- data/sig/whop_sdk/resources/refunds.rbs +24 -0
- data/sig/whop_sdk/resources/reviews.rbs +2 -0
- data/sig/whop_sdk/resources/transfers.rbs +2 -0
- data/sig/whop_sdk/resources/webhooks.rbs +3 -1
- data/sig/whop_sdk/resources/withdrawals.rbs +24 -0
- metadata +98 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c10840499139acda05743f2fc27c566c608b2d5361559820d43db0be286fe9a5
|
|
4
|
+
data.tar.gz: 3e285be5b55549d35de9fc885cc6ea3301edce23388f544ece842cd64354a9ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ecfe3f22c5202c573a52632778059a81ad80f61080b90a8afb762a1d39d6f3759937207b66dc06325cdfdab1f5e56acdacb4472b41a69f3047b56fc00eb49fba
|
|
7
|
+
data.tar.gz: bb88d51770763c2a9e5d384b16e40e2228cf5731e26dbd935e572157bda9b34ad021eb411f2f037969fef4e4c148603054367ba1fd539eb3669214cd23c85bbf
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.9 (2025-12-01)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.0.8...v0.0.9](https://github.com/whopio/whopsdk-ruby/compare/v0.0.8...v0.0.9)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([b9f7830](https://github.com/whopio/whopsdk-ruby/commit/b9f7830e02fce7ea744123f9391bd63477777791))
|
|
10
|
+
* **api:** api update ([0d6de41](https://github.com/whopio/whopsdk-ruby/commit/0d6de416cc96a1dff8176a8c986c1e5170439708))
|
|
11
|
+
* **api:** api update ([cb2a10b](https://github.com/whopio/whopsdk-ruby/commit/cb2a10bf8cf75a57e4714c1af3d8687e9fd0a45f))
|
|
12
|
+
* **api:** manual updates ([b5db9c0](https://github.com/whopio/whopsdk-ruby/commit/b5db9c035ee748775db6be426484057806f1fcd8))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Chores
|
|
16
|
+
|
|
17
|
+
* explicitly require "base64" gem ([07c9cd7](https://github.com/whopio/whopsdk-ruby/commit/07c9cd76d730e34b7170f5ebdb0596dc0c978155))
|
|
18
|
+
|
|
19
|
+
## 0.0.8 (2025-11-21)
|
|
20
|
+
|
|
21
|
+
Full Changelog: [v0.0.7...v0.0.8](https://github.com/whopio/whopsdk-ruby/compare/v0.0.7...v0.0.8)
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* **api:** api update ([72487db](https://github.com/whopio/whopsdk-ruby/commit/72487dbb2daaa569372cb99905d1b96a0826fa56))
|
|
26
|
+
* **api:** api update ([341b128](https://github.com/whopio/whopsdk-ruby/commit/341b128658ed294d1b760c3092d6041d52d44eb4))
|
|
27
|
+
* **api:** api update ([d9b89be](https://github.com/whopio/whopsdk-ruby/commit/d9b89be75eff6ba70aeefbf042c4aeabd09781bb))
|
|
28
|
+
* **api:** api update ([dfdbc53](https://github.com/whopio/whopsdk-ruby/commit/dfdbc5320bdfda5dd7926197d43cb2757cce21ac))
|
|
29
|
+
* **api:** api update ([1ff62ca](https://github.com/whopio/whopsdk-ruby/commit/1ff62caa47b1ae680cf9ae162db3be7212544fb0))
|
|
30
|
+
* **api:** api update ([840e972](https://github.com/whopio/whopsdk-ruby/commit/840e97296beec8d6d673a393418ab06f929b6ecc))
|
|
31
|
+
* **api:** api update ([35bad56](https://github.com/whopio/whopsdk-ruby/commit/35bad566f34175c7bf3c82207ac408ac358db265))
|
|
32
|
+
* **api:** api update ([48e6d40](https://github.com/whopio/whopsdk-ruby/commit/48e6d4091b7d6d313a1726ad34b606e2b66c8e96))
|
|
33
|
+
* **api:** api update ([1ba7f81](https://github.com/whopio/whopsdk-ruby/commit/1ba7f814b72b379e4bcff6878e1d5d54fab85d5f))
|
|
34
|
+
* **api:** manual updates ([ebbd3fc](https://github.com/whopio/whopsdk-ruby/commit/ebbd3fcc2b580428328e534c6dd5b46872fbb3c0))
|
|
35
|
+
* **api:** manual updates ([20edbe3](https://github.com/whopio/whopsdk-ruby/commit/20edbe30c55d090caf1deae00f0134d0db6caa1f))
|
|
36
|
+
* **api:** manual updates ([e809850](https://github.com/whopio/whopsdk-ruby/commit/e809850e0ecffd74f7470bfa1ff306f3751be838))
|
|
37
|
+
|
|
3
38
|
## 0.0.7 (2025-11-13)
|
|
4
39
|
|
|
5
40
|
Full Changelog: [v0.0.6...v0.0.7](https://github.com/whopio/whopsdk-ruby/compare/v0.0.6...v0.0.7)
|
data/README.md
CHANGED
|
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
17
17
|
<!-- x-release-please-start-version -->
|
|
18
18
|
|
|
19
19
|
```ruby
|
|
20
|
-
gem "whop_sdk", "~> 0.0.
|
|
20
|
+
gem "whop_sdk", "~> 0.0.9"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
<!-- x-release-please-end -->
|
|
@@ -225,11 +225,11 @@ whop.payments.list(**params)
|
|
|
225
225
|
Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:
|
|
226
226
|
|
|
227
227
|
```ruby
|
|
228
|
-
# :
|
|
229
|
-
puts(WhopSDK::
|
|
228
|
+
# :b2b_app
|
|
229
|
+
puts(WhopSDK::AppType::B2B_APP)
|
|
230
230
|
|
|
231
|
-
# Revealed type: `T.all(WhopSDK::
|
|
232
|
-
T.reveal_type(WhopSDK::
|
|
231
|
+
# Revealed type: `T.all(WhopSDK::AppType, Symbol)`
|
|
232
|
+
T.reveal_type(WhopSDK::AppType::B2B_APP)
|
|
233
233
|
```
|
|
234
234
|
|
|
235
235
|
Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:
|
|
@@ -237,13 +237,13 @@ Enum parameters have a "relaxed" type, so you can either pass in enum constants
|
|
|
237
237
|
```ruby
|
|
238
238
|
# Using the enum constants preserves the tagged type information:
|
|
239
239
|
whop.apps.update(
|
|
240
|
-
|
|
240
|
+
app_type: WhopSDK::AppType::B2B_APP,
|
|
241
241
|
# …
|
|
242
242
|
)
|
|
243
243
|
|
|
244
244
|
# Literal values are also permissible:
|
|
245
245
|
whop.apps.update(
|
|
246
|
-
|
|
246
|
+
app_type: :b2b_app,
|
|
247
247
|
# …
|
|
248
248
|
)
|
|
249
249
|
```
|
data/lib/whop_sdk/client.rb
CHANGED
|
@@ -126,6 +126,15 @@ module WhopSDK
|
|
|
126
126
|
# @return [WhopSDK::Resources::Disputes]
|
|
127
127
|
attr_reader :disputes
|
|
128
128
|
|
|
129
|
+
# @return [WhopSDK::Resources::Refunds]
|
|
130
|
+
attr_reader :refunds
|
|
131
|
+
|
|
132
|
+
# @return [WhopSDK::Resources::Withdrawals]
|
|
133
|
+
attr_reader :withdrawals
|
|
134
|
+
|
|
135
|
+
# @return [WhopSDK::Resources::AccountLinks]
|
|
136
|
+
attr_reader :account_links
|
|
137
|
+
|
|
129
138
|
# @api private
|
|
130
139
|
#
|
|
131
140
|
# @return [Hash{String=>String}]
|
|
@@ -217,6 +226,9 @@ module WhopSDK
|
|
|
217
226
|
@access_tokens = WhopSDK::Resources::AccessTokens.new(client: self)
|
|
218
227
|
@notifications = WhopSDK::Resources::Notifications.new(client: self)
|
|
219
228
|
@disputes = WhopSDK::Resources::Disputes.new(client: self)
|
|
229
|
+
@refunds = WhopSDK::Resources::Refunds.new(client: self)
|
|
230
|
+
@withdrawals = WhopSDK::Resources::Withdrawals.new(client: self)
|
|
231
|
+
@account_links = WhopSDK::Resources::AccountLinks.new(client: self)
|
|
220
232
|
end
|
|
221
233
|
|
|
222
234
|
# Verifies a Whop user token
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::AccountLinks#create
|
|
6
|
+
class AccountLinkCreateParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute company_id
|
|
11
|
+
# The ID of the Company to generate the url for. The company must be a
|
|
12
|
+
# sub-merchant of the API key's company.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :company_id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute refresh_url
|
|
18
|
+
# The URL to redirect to if the session expires and needs to be re-authenticated
|
|
19
|
+
# due to the token expiring.
|
|
20
|
+
#
|
|
21
|
+
# @return [String]
|
|
22
|
+
required :refresh_url, String
|
|
23
|
+
|
|
24
|
+
# @!attribute return_url
|
|
25
|
+
# The URL to redirect to when the customer wants to return to your site.
|
|
26
|
+
#
|
|
27
|
+
# @return [String]
|
|
28
|
+
required :return_url, String
|
|
29
|
+
|
|
30
|
+
# @!attribute use_case
|
|
31
|
+
# The use case for which the link will be used.
|
|
32
|
+
#
|
|
33
|
+
# @return [Symbol, WhopSDK::Models::AccountLinkCreateParams::UseCase]
|
|
34
|
+
required :use_case, enum: -> { WhopSDK::AccountLinkCreateParams::UseCase }
|
|
35
|
+
|
|
36
|
+
# @!method initialize(company_id:, refresh_url:, return_url:, use_case:, request_options: {})
|
|
37
|
+
# Some parameter documentations has been truncated, see
|
|
38
|
+
# {WhopSDK::Models::AccountLinkCreateParams} for more details.
|
|
39
|
+
#
|
|
40
|
+
# @param company_id [String] The ID of the Company to generate the url for. The company must be a sub-merchan
|
|
41
|
+
#
|
|
42
|
+
# @param refresh_url [String] The URL to redirect to if the session expires and needs to be re-authenticated d
|
|
43
|
+
#
|
|
44
|
+
# @param return_url [String] The URL to redirect to when the customer wants to return to your site.
|
|
45
|
+
#
|
|
46
|
+
# @param use_case [Symbol, WhopSDK::Models::AccountLinkCreateParams::UseCase] The use case for which the link will be used.
|
|
47
|
+
#
|
|
48
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
49
|
+
|
|
50
|
+
# The use case for which the link will be used.
|
|
51
|
+
module UseCase
|
|
52
|
+
extend WhopSDK::Internal::Type::Enum
|
|
53
|
+
|
|
54
|
+
ACCOUNT_ONBOARDING = :account_onboarding
|
|
55
|
+
PAYOUTS_PORTAL = :payouts_portal
|
|
56
|
+
|
|
57
|
+
# @!method self.values
|
|
58
|
+
# @return [Array<Symbol>]
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::AccountLinks#create
|
|
6
|
+
class AccountLinkCreateResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute expires_at
|
|
8
|
+
# The expiration timestamp of the url.
|
|
9
|
+
#
|
|
10
|
+
# @return [Time]
|
|
11
|
+
required :expires_at, Time
|
|
12
|
+
|
|
13
|
+
# @!attribute url
|
|
14
|
+
# The URL to navigate the user to.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :url, String
|
|
18
|
+
|
|
19
|
+
# @!method initialize(expires_at:, url:)
|
|
20
|
+
# An object representing a url that a user can be directed to to access their
|
|
21
|
+
# account.
|
|
22
|
+
#
|
|
23
|
+
# @param expires_at [Time] The expiration timestamp of the url.
|
|
24
|
+
#
|
|
25
|
+
# @param url [String] The URL to navigate the user to.
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
data/lib/whop_sdk/models/app.rb
CHANGED
|
@@ -15,6 +15,12 @@ module WhopSDK
|
|
|
15
15
|
# @return [WhopSDK::Models::App::APIKey, nil]
|
|
16
16
|
required :api_key, -> { WhopSDK::App::APIKey }, nil?: true
|
|
17
17
|
|
|
18
|
+
# @!attribute app_type
|
|
19
|
+
# The type of end-user an app is built for
|
|
20
|
+
#
|
|
21
|
+
# @return [Symbol, WhopSDK::Models::AppType]
|
|
22
|
+
required :app_type, enum: -> { WhopSDK::AppType }
|
|
23
|
+
|
|
18
24
|
# @!attribute base_url
|
|
19
25
|
# The base url of the app
|
|
20
26
|
#
|
|
@@ -112,7 +118,7 @@ module WhopSDK
|
|
|
112
118
|
# @return [Boolean]
|
|
113
119
|
required :verified, WhopSDK::Internal::Type::Boolean
|
|
114
120
|
|
|
115
|
-
# @!method initialize(id:, api_key:, base_url:, company:, creator:, dashboard_path:, description:, discover_path:, domain_id:, experience_path:, icon:, name:, requested_permissions:, stats:, status:, verified:)
|
|
121
|
+
# @!method initialize(id:, api_key:, app_type:, base_url:, company:, creator:, dashboard_path:, description:, discover_path:, domain_id:, experience_path:, icon:, name:, requested_permissions:, stats:, status:, verified:)
|
|
116
122
|
# Some parameter documentations has been truncated, see {WhopSDK::Models::App} for
|
|
117
123
|
# more details.
|
|
118
124
|
#
|
|
@@ -122,6 +128,8 @@ module WhopSDK
|
|
|
122
128
|
#
|
|
123
129
|
# @param api_key [WhopSDK::Models::App::APIKey, nil] The API key for the app
|
|
124
130
|
#
|
|
131
|
+
# @param app_type [Symbol, WhopSDK::Models::AppType] The type of end-user an app is built for
|
|
132
|
+
#
|
|
125
133
|
# @param base_url [String, nil] The base url of the app
|
|
126
134
|
#
|
|
127
135
|
# @param company [WhopSDK::Models::App::Company] The company that owns the app
|
|
@@ -25,6 +25,18 @@ module WhopSDK
|
|
|
25
25
|
# @return [String, nil]
|
|
26
26
|
optional :before, String, nil?: true
|
|
27
27
|
|
|
28
|
+
# @!attribute created_after
|
|
29
|
+
# The minimum creation date to filter by
|
|
30
|
+
#
|
|
31
|
+
# @return [Time, nil]
|
|
32
|
+
optional :created_after, Time, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!attribute created_before
|
|
35
|
+
# The maximum creation date to filter by
|
|
36
|
+
#
|
|
37
|
+
# @return [Time, nil]
|
|
38
|
+
optional :created_before, Time, nil?: true
|
|
39
|
+
|
|
28
40
|
# @!attribute first
|
|
29
41
|
# Returns the first _n_ elements from the list.
|
|
30
42
|
#
|
|
@@ -49,13 +61,17 @@ module WhopSDK
|
|
|
49
61
|
# @return [Symbol, WhopSDK::Models::AppBuildStatuses, nil]
|
|
50
62
|
optional :status, enum: -> { WhopSDK::AppBuildStatuses }, nil?: true
|
|
51
63
|
|
|
52
|
-
# @!method initialize(app_id:, after: nil, before: nil, first: nil, last: nil, platform: nil, status: nil, request_options: {})
|
|
64
|
+
# @!method initialize(app_id:, after: nil, before: nil, created_after: nil, created_before: nil, first: nil, last: nil, platform: nil, status: nil, request_options: {})
|
|
53
65
|
# @param app_id [String] The ID of the app to filter app builds by
|
|
54
66
|
#
|
|
55
67
|
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
56
68
|
#
|
|
57
69
|
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
58
70
|
#
|
|
71
|
+
# @param created_after [Time, nil] The minimum creation date to filter by
|
|
72
|
+
#
|
|
73
|
+
# @param created_before [Time, nil] The maximum creation date to filter by
|
|
74
|
+
#
|
|
59
75
|
# @param first [Integer, nil] Returns the first _n_ elements from the list.
|
|
60
76
|
#
|
|
61
77
|
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
@@ -13,6 +13,12 @@ module WhopSDK
|
|
|
13
13
|
# @return [String, nil]
|
|
14
14
|
optional :after, String, nil?: true
|
|
15
15
|
|
|
16
|
+
# @!attribute app_type
|
|
17
|
+
# The type of end-user an app is built for
|
|
18
|
+
#
|
|
19
|
+
# @return [Symbol, WhopSDK::Models::AppType, nil]
|
|
20
|
+
optional :app_type, enum: -> { WhopSDK::AppType }, nil?: true
|
|
21
|
+
|
|
16
22
|
# @!attribute before
|
|
17
23
|
# Returns the elements in the list that come before the specified cursor.
|
|
18
24
|
#
|
|
@@ -68,12 +74,14 @@ module WhopSDK
|
|
|
68
74
|
# @return [Symbol, WhopSDK::Models::AppViewType, nil]
|
|
69
75
|
optional :view_type, enum: -> { WhopSDK::AppViewType }, nil?: true
|
|
70
76
|
|
|
71
|
-
# @!method initialize(after: nil, before: nil, company_id: nil, direction: nil, first: nil, last: nil, order: nil, query: nil, verified_apps_only: nil, view_type: nil, request_options: {})
|
|
77
|
+
# @!method initialize(after: nil, app_type: nil, before: nil, company_id: nil, direction: nil, first: nil, last: nil, order: nil, query: nil, verified_apps_only: nil, view_type: nil, request_options: {})
|
|
72
78
|
# Some parameter documentations has been truncated, see
|
|
73
79
|
# {WhopSDK::Models::AppListParams} for more details.
|
|
74
80
|
#
|
|
75
81
|
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
76
82
|
#
|
|
83
|
+
# @param app_type [Symbol, WhopSDK::Models::AppType, nil] The type of end-user an app is built for
|
|
84
|
+
#
|
|
77
85
|
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
78
86
|
#
|
|
79
87
|
# @param company_id [String, nil] The ID of the company to filter apps by
|
|
@@ -100,6 +108,7 @@ module WhopSDK
|
|
|
100
108
|
|
|
101
109
|
DISCOVERABLE_AT = :discoverable_at
|
|
102
110
|
TOTAL_INSTALLS_LAST_30_DAYS = :total_installs_last_30_days
|
|
111
|
+
TOTAL_INSTALLS_LAST_7_DAYS = :total_installs_last_7_days
|
|
103
112
|
TIME_SPENT = :time_spent
|
|
104
113
|
TIME_SPENT_LAST_24_HOURS = :time_spent_last_24_hours
|
|
105
114
|
DAILY_ACTIVE_USERS = :daily_active_users
|
|
@@ -10,6 +10,12 @@ module WhopSDK
|
|
|
10
10
|
# @return [String]
|
|
11
11
|
required :id, String
|
|
12
12
|
|
|
13
|
+
# @!attribute app_type
|
|
14
|
+
# The type of end-user an app is built for
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, WhopSDK::Models::AppType]
|
|
17
|
+
required :app_type, enum: -> { WhopSDK::AppType }
|
|
18
|
+
|
|
13
19
|
# @!attribute base_url
|
|
14
20
|
# The base url of the app
|
|
15
21
|
#
|
|
@@ -93,7 +99,7 @@ module WhopSDK
|
|
|
93
99
|
# @return [Boolean]
|
|
94
100
|
required :verified, WhopSDK::Internal::Type::Boolean
|
|
95
101
|
|
|
96
|
-
# @!method initialize(id:, base_url:, company:, creator:, dashboard_path:, description:, discover_path:, domain_id:, experience_path:, icon:, name:, status:, verified:)
|
|
102
|
+
# @!method initialize(id:, app_type:, base_url:, company:, creator:, dashboard_path:, description:, discover_path:, domain_id:, experience_path:, icon:, name:, status:, verified:)
|
|
97
103
|
# Some parameter documentations has been truncated, see
|
|
98
104
|
# {WhopSDK::Models::AppListResponse} for more details.
|
|
99
105
|
#
|
|
@@ -101,6 +107,8 @@ module WhopSDK
|
|
|
101
107
|
#
|
|
102
108
|
# @param id [String] The ID of the app
|
|
103
109
|
#
|
|
110
|
+
# @param app_type [Symbol, WhopSDK::Models::AppType] The type of end-user an app is built for
|
|
111
|
+
#
|
|
104
112
|
# @param base_url [String, nil] The base url of the app
|
|
105
113
|
#
|
|
106
114
|
# @param company [WhopSDK::Models::AppListResponse::Company] The company that owns the app
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# The type of end-user an app is built for
|
|
6
|
+
module AppType
|
|
7
|
+
extend WhopSDK::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
B2B_APP = :b2b_app
|
|
10
|
+
B2C_APP = :b2c_app
|
|
11
|
+
COMPANY_APP = :company_app
|
|
12
|
+
COMPONENT = :component
|
|
13
|
+
|
|
14
|
+
# @!method self.values
|
|
15
|
+
# @return [Array<Symbol>]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -13,6 +13,12 @@ module WhopSDK
|
|
|
13
13
|
# @return [String, nil]
|
|
14
14
|
optional :app_store_description, String, nil?: true
|
|
15
15
|
|
|
16
|
+
# @!attribute app_type
|
|
17
|
+
# The type of end-user an app is built for
|
|
18
|
+
#
|
|
19
|
+
# @return [Symbol, WhopSDK::Models::AppType, nil]
|
|
20
|
+
optional :app_type, enum: -> { WhopSDK::AppType }, nil?: true
|
|
21
|
+
|
|
16
22
|
# @!attribute base_url
|
|
17
23
|
# The base production url of the app
|
|
18
24
|
#
|
|
@@ -69,9 +75,11 @@ module WhopSDK
|
|
|
69
75
|
# @return [Symbol, WhopSDK::Models::AppStatuses, nil]
|
|
70
76
|
optional :status, enum: -> { WhopSDK::AppStatuses }, nil?: true
|
|
71
77
|
|
|
72
|
-
# @!method initialize(app_store_description: nil, base_url: nil, dashboard_path: nil, description: nil, discover_path: nil, experience_path: nil, icon: nil, name: nil, required_scopes: nil, status: nil, request_options: {})
|
|
78
|
+
# @!method initialize(app_store_description: nil, app_type: nil, base_url: nil, dashboard_path: nil, description: nil, discover_path: nil, experience_path: nil, icon: nil, name: nil, required_scopes: nil, status: nil, request_options: {})
|
|
73
79
|
# @param app_store_description [String, nil] The description of the app for the app store in-depth app view.
|
|
74
80
|
#
|
|
81
|
+
# @param app_type [Symbol, WhopSDK::Models::AppType, nil] The type of end-user an app is built for
|
|
82
|
+
#
|
|
75
83
|
# @param base_url [String, nil] The base production url of the app
|
|
76
84
|
#
|
|
77
85
|
# @param dashboard_path [String, nil] The path for the dashboard view of the app
|
|
@@ -25,6 +25,18 @@ module WhopSDK
|
|
|
25
25
|
# @return [String, nil]
|
|
26
26
|
optional :before, String, nil?: true
|
|
27
27
|
|
|
28
|
+
# @!attribute created_after
|
|
29
|
+
# The minimum creation date to filter by
|
|
30
|
+
#
|
|
31
|
+
# @return [Time, nil]
|
|
32
|
+
optional :created_after, Time, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!attribute created_before
|
|
35
|
+
# The maximum creation date to filter by
|
|
36
|
+
#
|
|
37
|
+
# @return [Time, nil]
|
|
38
|
+
optional :created_before, Time, nil?: true
|
|
39
|
+
|
|
28
40
|
# @!attribute first
|
|
29
41
|
# Returns the first _n_ elements from the list.
|
|
30
42
|
#
|
|
@@ -49,13 +61,17 @@ module WhopSDK
|
|
|
49
61
|
# @return [String, nil]
|
|
50
62
|
optional :user_id, String, nil?: true
|
|
51
63
|
|
|
52
|
-
# @!method initialize(company_id:, after: nil, before: nil, first: nil, last: nil, role: nil, user_id: nil, request_options: {})
|
|
64
|
+
# @!method initialize(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, first: nil, last: nil, role: nil, user_id: nil, request_options: {})
|
|
53
65
|
# @param company_id [String] The ID of the company to list authorized users for
|
|
54
66
|
#
|
|
55
67
|
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
56
68
|
#
|
|
57
69
|
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
58
70
|
#
|
|
71
|
+
# @param created_after [Time, nil] The minimum creation date to filter by
|
|
72
|
+
#
|
|
73
|
+
# @param created_before [Time, nil] The maximum creation date to filter by
|
|
74
|
+
#
|
|
59
75
|
# @param first [Integer, nil] Returns the first _n_ elements from the list.
|
|
60
76
|
#
|
|
61
77
|
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
@@ -24,14 +24,30 @@ module WhopSDK
|
|
|
24
24
|
# @!attribute metadata
|
|
25
25
|
# The metadata to use for the checkout configuration
|
|
26
26
|
#
|
|
27
|
-
# @return [Hash{Symbol=>Object}]
|
|
28
|
-
required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]
|
|
27
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
28
|
+
required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
29
|
+
|
|
30
|
+
# @!attribute mode
|
|
31
|
+
# The mode of the checkout session.
|
|
32
|
+
#
|
|
33
|
+
# @return [Symbol, WhopSDK::Models::CheckoutModes]
|
|
34
|
+
required :mode, enum: -> { WhopSDK::CheckoutModes }
|
|
35
|
+
|
|
36
|
+
# @!attribute payment_method_configuration
|
|
37
|
+
# The explicit payment method configuration for the session, if any. This
|
|
38
|
+
# currently only works in 'setup' mode. Use the plan's
|
|
39
|
+
# payment_method_configuration for payment method.
|
|
40
|
+
#
|
|
41
|
+
# @return [WhopSDK::Models::CheckoutConfiguration::PaymentMethodConfiguration, nil]
|
|
42
|
+
required :payment_method_configuration,
|
|
43
|
+
-> { WhopSDK::CheckoutConfiguration::PaymentMethodConfiguration },
|
|
44
|
+
nil?: true
|
|
29
45
|
|
|
30
46
|
# @!attribute plan
|
|
31
47
|
# The plan to use for the checkout configuration
|
|
32
48
|
#
|
|
33
|
-
# @return [WhopSDK::Models::CheckoutConfiguration::Plan]
|
|
34
|
-
required :plan, -> { WhopSDK::CheckoutConfiguration::Plan }
|
|
49
|
+
# @return [WhopSDK::Models::CheckoutConfiguration::Plan, nil]
|
|
50
|
+
required :plan, -> { WhopSDK::CheckoutConfiguration::Plan }, nil?: true
|
|
35
51
|
|
|
36
52
|
# @!attribute purchase_url
|
|
37
53
|
# A URL you can send to customers to complete a checkout. It looks like
|
|
@@ -46,7 +62,7 @@ module WhopSDK
|
|
|
46
62
|
# @return [String, nil]
|
|
47
63
|
required :redirect_url, String, nil?: true
|
|
48
64
|
|
|
49
|
-
# @!method initialize(id:, affiliate_code:, company_id:, metadata:, plan:, purchase_url:, redirect_url:)
|
|
65
|
+
# @!method initialize(id:, affiliate_code:, company_id:, metadata:, mode:, payment_method_configuration:, plan:, purchase_url:, redirect_url:)
|
|
50
66
|
# Some parameter documentations has been truncated, see
|
|
51
67
|
# {WhopSDK::Models::CheckoutConfiguration} for more details.
|
|
52
68
|
#
|
|
@@ -61,14 +77,60 @@ module WhopSDK
|
|
|
61
77
|
#
|
|
62
78
|
# @param company_id [String] The ID of the company to use for the checkout configuration
|
|
63
79
|
#
|
|
64
|
-
# @param metadata [Hash{Symbol=>Object}] The metadata to use for the checkout configuration
|
|
80
|
+
# @param metadata [Hash{Symbol=>Object}, nil] The metadata to use for the checkout configuration
|
|
81
|
+
#
|
|
82
|
+
# @param mode [Symbol, WhopSDK::Models::CheckoutModes] The mode of the checkout session.
|
|
65
83
|
#
|
|
66
|
-
# @param
|
|
84
|
+
# @param payment_method_configuration [WhopSDK::Models::CheckoutConfiguration::PaymentMethodConfiguration, nil] The explicit payment method configuration for the session, if any. This currentl
|
|
85
|
+
#
|
|
86
|
+
# @param plan [WhopSDK::Models::CheckoutConfiguration::Plan, nil] The plan to use for the checkout configuration
|
|
67
87
|
#
|
|
68
88
|
# @param purchase_url [String] A URL you can send to customers to complete a checkout. It looks like `/checkout
|
|
69
89
|
#
|
|
70
90
|
# @param redirect_url [String, nil] The URL to redirect the user to after the checkout configuration is created
|
|
71
91
|
|
|
92
|
+
# @see WhopSDK::Models::CheckoutConfiguration#payment_method_configuration
|
|
93
|
+
class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
|
|
94
|
+
# @!attribute disabled
|
|
95
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
96
|
+
# applies if the include_platform_defaults is true.
|
|
97
|
+
#
|
|
98
|
+
# @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
|
|
99
|
+
required :disabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
|
|
100
|
+
|
|
101
|
+
# @!attribute enabled
|
|
102
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
103
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
104
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
105
|
+
# defaults with additional methods.
|
|
106
|
+
#
|
|
107
|
+
# @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
|
|
108
|
+
required :enabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
|
|
109
|
+
|
|
110
|
+
# @!attribute include_platform_defaults
|
|
111
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
112
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
113
|
+
# the documentation at docs.whop.com/payments.
|
|
114
|
+
#
|
|
115
|
+
# @return [Boolean]
|
|
116
|
+
required :include_platform_defaults, WhopSDK::Internal::Type::Boolean
|
|
117
|
+
|
|
118
|
+
# @!method initialize(disabled:, enabled:, include_platform_defaults:)
|
|
119
|
+
# Some parameter documentations has been truncated, see
|
|
120
|
+
# {WhopSDK::Models::CheckoutConfiguration::PaymentMethodConfiguration} for more
|
|
121
|
+
# details.
|
|
122
|
+
#
|
|
123
|
+
# The explicit payment method configuration for the session, if any. This
|
|
124
|
+
# currently only works in 'setup' mode. Use the plan's
|
|
125
|
+
# payment_method_configuration for payment method.
|
|
126
|
+
#
|
|
127
|
+
# @param disabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly disabled. Only applie
|
|
128
|
+
#
|
|
129
|
+
# @param enabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly enabled. This means t
|
|
130
|
+
#
|
|
131
|
+
# @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included
|
|
132
|
+
end
|
|
133
|
+
|
|
72
134
|
# @see WhopSDK::Models::CheckoutConfiguration#plan
|
|
73
135
|
class Plan < WhopSDK::Internal::Type::BaseModel
|
|
74
136
|
# @!attribute id
|
|
@@ -25,6 +25,21 @@ module WhopSDK
|
|
|
25
25
|
# @return [Hash{Symbol=>Object}, nil]
|
|
26
26
|
optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
27
27
|
|
|
28
|
+
# @!attribute mode
|
|
29
|
+
#
|
|
30
|
+
# @return [Symbol, :setup]
|
|
31
|
+
required :mode, const: :setup
|
|
32
|
+
|
|
33
|
+
# @!attribute payment_method_configuration
|
|
34
|
+
# This currently only works for configurations made in 'setup' mode. The explicit
|
|
35
|
+
# payment method configuration for the checkout session. If not provided, the
|
|
36
|
+
# platform or company's defaults will apply.
|
|
37
|
+
#
|
|
38
|
+
# @return [WhopSDK::Models::CheckoutConfigurationCreateParams::PaymentMethodConfiguration, nil]
|
|
39
|
+
optional :payment_method_configuration,
|
|
40
|
+
-> { WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration },
|
|
41
|
+
nil?: true
|
|
42
|
+
|
|
28
43
|
# @!attribute redirect_url
|
|
29
44
|
# The URL to redirect the user to after the checkout configuration is created
|
|
30
45
|
#
|
|
@@ -37,17 +52,33 @@ module WhopSDK
|
|
|
37
52
|
# @return [String]
|
|
38
53
|
required :plan_id, String
|
|
39
54
|
|
|
40
|
-
# @!
|
|
55
|
+
# @!attribute company_id
|
|
56
|
+
# The ID of the company for which to generate the checkout configuration. Only
|
|
57
|
+
# required in setup mode.
|
|
58
|
+
#
|
|
59
|
+
# @return [String]
|
|
60
|
+
required :company_id, String
|
|
61
|
+
|
|
62
|
+
# @!method initialize(plan:, plan_id:, company_id:, affiliate_code: nil, metadata: nil, payment_method_configuration: nil, redirect_url: nil, mode: :setup, request_options: {})
|
|
63
|
+
# Some parameter documentations has been truncated, see
|
|
64
|
+
# {WhopSDK::Models::CheckoutConfigurationCreateParams} for more details.
|
|
65
|
+
#
|
|
41
66
|
# @param plan [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan] Pass this object to create a new plan for this checkout configuration
|
|
42
67
|
#
|
|
43
68
|
# @param plan_id [String] The ID of the plan to use for the checkout configuration
|
|
44
69
|
#
|
|
70
|
+
# @param company_id [String] The ID of the company for which to generate the checkout configuration. Only req
|
|
71
|
+
#
|
|
45
72
|
# @param affiliate_code [String, nil] The affiliate code to use for the checkout configuration
|
|
46
73
|
#
|
|
47
74
|
# @param metadata [Hash{Symbol=>Object}, nil] The metadata to use for the checkout configuration
|
|
48
75
|
#
|
|
76
|
+
# @param payment_method_configuration [WhopSDK::Models::CheckoutConfigurationCreateParams::PaymentMethodConfiguration, nil] This currently only works for configurations made in 'setup' mode. The explicit
|
|
77
|
+
#
|
|
49
78
|
# @param redirect_url [String, nil] The URL to redirect the user to after the checkout configuration is created
|
|
50
79
|
#
|
|
80
|
+
# @param mode [Symbol, :setup]
|
|
81
|
+
#
|
|
51
82
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
52
83
|
|
|
53
84
|
class Plan < WhopSDK::Internal::Type::BaseModel
|
|
@@ -501,6 +532,47 @@ module WhopSDK
|
|
|
501
532
|
# @param visibility [Symbol, WhopSDK::Models::Visibility, nil] Visibility of a resource
|
|
502
533
|
end
|
|
503
534
|
end
|
|
535
|
+
|
|
536
|
+
class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
|
|
537
|
+
# @!attribute disabled
|
|
538
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
539
|
+
# applies if the include_platform_defaults is true.
|
|
540
|
+
#
|
|
541
|
+
# @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
|
|
542
|
+
required :disabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
|
|
543
|
+
|
|
544
|
+
# @!attribute enabled
|
|
545
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
546
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
547
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
548
|
+
# defaults with additional methods.
|
|
549
|
+
#
|
|
550
|
+
# @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
|
|
551
|
+
required :enabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
|
|
552
|
+
|
|
553
|
+
# @!attribute include_platform_defaults
|
|
554
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
555
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
556
|
+
# the documentation at docs.whop.com/payments.
|
|
557
|
+
#
|
|
558
|
+
# @return [Boolean]
|
|
559
|
+
required :include_platform_defaults, WhopSDK::Internal::Type::Boolean
|
|
560
|
+
|
|
561
|
+
# @!method initialize(disabled:, enabled:, include_platform_defaults:)
|
|
562
|
+
# Some parameter documentations has been truncated, see
|
|
563
|
+
# {WhopSDK::Models::CheckoutConfigurationCreateParams::PaymentMethodConfiguration}
|
|
564
|
+
# for more details.
|
|
565
|
+
#
|
|
566
|
+
# This currently only works for configurations made in 'setup' mode. The explicit
|
|
567
|
+
# payment method configuration for the checkout session. If not provided, the
|
|
568
|
+
# platform or company's defaults will apply.
|
|
569
|
+
#
|
|
570
|
+
# @param disabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly disabled. Only applie
|
|
571
|
+
#
|
|
572
|
+
# @param enabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly enabled. This means t
|
|
573
|
+
#
|
|
574
|
+
# @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included
|
|
575
|
+
end
|
|
504
576
|
end
|
|
505
577
|
end
|
|
506
578
|
end
|