whop_sdk 0.0.2 → 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 +51 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +24 -0
- data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +30 -24
- 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/assessment_question_types.rb +18 -0
- data/lib/whop_sdk/models/billing_reasons.rb +20 -0
- data/lib/whop_sdk/models/card_brands.rb +30 -0
- data/lib/whop_sdk/models/checkout_configuration.rb +10 -7
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +251 -38
- data/lib/whop_sdk/models/checkout_configuration_list_response.rb +10 -7
- 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.rb +230 -0
- data/lib/whop_sdk/models/course_chapter.rb +72 -0
- data/lib/whop_sdk/models/course_chapter_create_params.rb +30 -0
- data/lib/whop_sdk/models/course_chapter_delete_params.rb +14 -0
- data/lib/whop_sdk/models/course_chapter_delete_response.rb +8 -0
- data/lib/whop_sdk/models/course_chapter_list_params.rb +54 -0
- data/lib/whop_sdk/models/course_chapter_list_response.rb +35 -0
- data/lib/whop_sdk/models/course_chapter_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/course_chapter_update_params.rb +22 -0
- data/lib/whop_sdk/models/course_create_params.rb +127 -0
- data/lib/whop_sdk/models/course_delete_params.rb +14 -0
- data/lib/whop_sdk/models/course_delete_response.rb +8 -0
- data/lib/whop_sdk/models/course_lesson_create_params.rb +54 -0
- data/lib/whop_sdk/models/course_lesson_delete_params.rb +14 -0
- data/lib/whop_sdk/models/course_lesson_delete_response.rb +8 -0
- data/lib/whop_sdk/models/course_lesson_list_params.rb +62 -0
- data/lib/whop_sdk/models/course_lesson_list_response.rb +71 -0
- data/lib/whop_sdk/models/course_lesson_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/course_lesson_update_params.rb +399 -0
- data/lib/whop_sdk/models/course_list_params.rb +62 -0
- data/lib/whop_sdk/models/course_list_response.rb +148 -0
- data/lib/whop_sdk/models/course_retrieve_params.rb +14 -0
- 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 +221 -0
- data/lib/whop_sdk/models/experience_duplicate_params.rb +22 -0
- data/lib/whop_sdk/models/experience_update_params.rb +53 -29
- data/lib/whop_sdk/models/forum_post.rb +17 -1
- data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
- data/lib/whop_sdk/models/forum_post_list_response.rb +17 -1
- data/lib/whop_sdk/models/forum_post_update_params.rb +104 -0
- data/lib/whop_sdk/models/invoice.rb +6 -2
- data/lib/whop_sdk/models/invoice_create_params.rb +48 -32
- data/lib/whop_sdk/models/invoice_list_item.rb +6 -2
- data/lib/whop_sdk/models/languages.rb +36 -0
- data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +9 -0
- data/lib/whop_sdk/models/lesson.rb +373 -0
- data/lib/whop_sdk/models/lesson_types.rb +20 -0
- data/lib/whop_sdk/models/lesson_visibilities.rb +17 -0
- data/lib/whop_sdk/models/member_list_params.rb +9 -1
- data/lib/whop_sdk/models/membership.rb +31 -1
- data/lib/whop_sdk/models/membership_list_params.rb +16 -8
- data/lib/whop_sdk/models/membership_list_response.rb +31 -1
- data/lib/whop_sdk/models/message_create_params.rb +51 -27
- data/lib/whop_sdk/models/message_update_params.rb +92 -0
- data/lib/whop_sdk/models/payment.rb +34 -22
- data/lib/whop_sdk/models/payment_list_params.rb +3 -18
- data/lib/whop_sdk/models/payment_list_response.rb +34 -22
- data/lib/whop_sdk/models/payment_method_types.rb +99 -0
- data/lib/whop_sdk/models/plan.rb +72 -1
- data/lib/whop_sdk/models/plan_create_params.rb +133 -24
- data/lib/whop_sdk/models/plan_list_response.rb +75 -1
- data/lib/whop_sdk/models/plan_update_params.rb +131 -22
- data/lib/whop_sdk/models/product.rb +11 -1
- data/lib/whop_sdk/models/product_create_params.rb +1 -45
- data/lib/whop_sdk/models/product_list_item.rb +14 -1
- data/lib/whop_sdk/models/product_update_params.rb +76 -23
- data/lib/whop_sdk/models/promo_code.rb +211 -0
- data/lib/whop_sdk/models/promo_code_create_params.rb +140 -0
- data/lib/whop_sdk/models/promo_code_delete_params.rb +14 -0
- data/lib/whop_sdk/models/promo_code_delete_response.rb +8 -0
- data/lib/whop_sdk/models/promo_code_list_params.rb +78 -0
- data/lib/whop_sdk/models/promo_code_list_response.rb +181 -0
- data/lib/whop_sdk/models/promo_code_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/promo_code_status.rb +17 -0
- data/lib/whop_sdk/models/promo_duration.rb +17 -0
- data/lib/whop_sdk/models/review_list_params.rb +70 -0
- data/lib/whop_sdk/models/review_list_response.rb +183 -0
- data/lib/whop_sdk/models/review_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/review_retrieve_response.rb +251 -0
- data/lib/whop_sdk/models/review_status.rb +17 -0
- 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 +84 -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 +8 -6
- data/lib/whop_sdk/resources/companies.rb +70 -0
- data/lib/whop_sdk/resources/course_chapters.rb +151 -0
- data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -2
- data/lib/whop_sdk/resources/course_lessons.rb +182 -0
- data/lib/whop_sdk/resources/course_students.rb +76 -0
- data/lib/whop_sdk/resources/courses.rb +185 -0
- data/lib/whop_sdk/resources/experiences.rb +34 -1
- data/lib/whop_sdk/resources/forum_posts.rb +34 -1
- data/lib/whop_sdk/resources/invoices.rb +11 -11
- data/lib/whop_sdk/resources/members.rb +3 -1
- data/lib/whop_sdk/resources/memberships.rb +6 -4
- data/lib/whop_sdk/resources/messages.rb +29 -1
- data/lib/whop_sdk/resources/payments.rb +1 -1
- data/lib/whop_sdk/resources/plans.rb +25 -5
- data/lib/whop_sdk/resources/products.rb +5 -7
- data/lib/whop_sdk/resources/promo_codes.rb +161 -0
- data/lib/whop_sdk/resources/reviews.rb +68 -0
- data/lib/whop_sdk/resources/transfers.rb +3 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +61 -1
- data/rbi/whop_sdk/client.rbi +18 -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/assessment_question_types.rbi +31 -0
- data/rbi/whop_sdk/models/billing_reasons.rbi +27 -0
- data/rbi/whop_sdk/models/card_brands.rbi +35 -0
- data/rbi/whop_sdk/models/checkout_configuration.rbi +4 -2
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +371 -62
- data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +4 -2
- 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.rbi +313 -0
- data/rbi/whop_sdk/models/course_chapter.rbi +101 -0
- data/rbi/whop_sdk/models/course_chapter_create_params.rbi +51 -0
- data/rbi/whop_sdk/models/course_chapter_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_chapter_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_chapter_list_params.rbi +75 -0
- data/rbi/whop_sdk/models/course_chapter_list_response.rbi +47 -0
- data/rbi/whop_sdk/models/course_chapter_retrieve_params.rbi +30 -0
- data/rbi/whop_sdk/models/course_chapter_update_params.rbi +40 -0
- data/rbi/whop_sdk/models/course_create_params.rbi +197 -0
- data/rbi/whop_sdk/models/course_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_delete_response.rbi +7 -0
- data/rbi/whop_sdk/models/course_lesson_create_params.rbi +75 -0
- data/rbi/whop_sdk/models/course_lesson_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_lesson_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_lesson_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/course_lesson_list_response.rbi +91 -0
- data/rbi/whop_sdk/models/course_lesson_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_lesson_update_params.rbi +677 -0
- data/rbi/whop_sdk/models/course_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/course_list_response.rbi +198 -0
- data/rbi/whop_sdk/models/course_retrieve_params.rbi +27 -0
- 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 +339 -0
- data/rbi/whop_sdk/models/experience_duplicate_params.rbi +40 -0
- data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
- data/rbi/whop_sdk/models/forum_post.rbi +16 -0
- data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/forum_post_list_response.rbi +16 -0
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +177 -0
- data/rbi/whop_sdk/models/invoice.rbi +4 -2
- data/rbi/whop_sdk/models/invoice_create_params.rbi +58 -44
- data/rbi/whop_sdk/models/invoice_list_item.rbi +4 -2
- data/rbi/whop_sdk/models/languages.rbi +40 -0
- data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +45 -0
- data/rbi/whop_sdk/models/lesson.rbi +521 -0
- data/rbi/whop_sdk/models/lesson_types.rbi +25 -0
- data/rbi/whop_sdk/models/lesson_visibilities.rbi +23 -0
- data/rbi/whop_sdk/models/member_list_params.rbi +8 -0
- data/rbi/whop_sdk/models/membership.rbi +40 -0
- data/rbi/whop_sdk/models/membership_list_params.rbi +16 -8
- data/rbi/whop_sdk/models/membership_list_response.rbi +47 -0
- data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/message_update_params.rbi +167 -0
- data/rbi/whop_sdk/models/payment.rbi +42 -25
- data/rbi/whop_sdk/models/payment_list_params.rbi +3 -63
- data/rbi/whop_sdk/models/payment_list_response.rbi +42 -25
- data/rbi/whop_sdk/models/payment_method_types.rbi +118 -0
- data/rbi/whop_sdk/models/plan.rbi +106 -0
- data/rbi/whop_sdk/models/plan_create_params.rbi +212 -34
- data/rbi/whop_sdk/models/plan_list_response.rbi +118 -0
- data/rbi/whop_sdk/models/plan_update_params.rbi +210 -32
- data/rbi/whop_sdk/models/product.rbi +12 -0
- data/rbi/whop_sdk/models/product_create_params.rbi +0 -74
- data/rbi/whop_sdk/models/product_list_item.rbi +12 -0
- data/rbi/whop_sdk/models/product_update_params.rbi +136 -33
- data/rbi/whop_sdk/models/promo_code.rbi +248 -0
- data/rbi/whop_sdk/models/promo_code_create_params.rbi +161 -0
- data/rbi/whop_sdk/models/promo_code_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/promo_code_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/promo_code_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/promo_code_list_response.rbi +222 -0
- data/rbi/whop_sdk/models/promo_code_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/promo_code_status.rbi +21 -0
- data/rbi/whop_sdk/models/promo_duration.rbi +21 -0
- data/rbi/whop_sdk/models/review_list_params.rbi +91 -0
- data/rbi/whop_sdk/models/review_list_response.rbi +243 -0
- data/rbi/whop_sdk/models/review_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/review_retrieve_response.rbi +354 -0
- data/rbi/whop_sdk/models/review_status.rbi +21 -0
- 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 +84 -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 +8 -7
- data/rbi/whop_sdk/resources/companies.rbi +63 -0
- data/rbi/whop_sdk/resources/course_chapters.rbi +115 -0
- data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +2 -2
- data/rbi/whop_sdk/resources/course_lessons.rbi +182 -0
- data/rbi/whop_sdk/resources/course_students.rbi +65 -0
- data/rbi/whop_sdk/resources/courses.rbi +172 -0
- data/rbi/whop_sdk/resources/experiences.rbi +32 -1
- data/rbi/whop_sdk/resources/forum_posts.rbi +40 -1
- data/rbi/whop_sdk/resources/invoices.rbi +18 -18
- data/rbi/whop_sdk/resources/members.rbi +3 -0
- data/rbi/whop_sdk/resources/memberships.rbi +6 -3
- data/rbi/whop_sdk/resources/messages.rbi +36 -1
- data/rbi/whop_sdk/resources/payments.rbi +1 -3
- data/rbi/whop_sdk/resources/plans.rbi +57 -3
- data/rbi/whop_sdk/resources/products.rbi +10 -8
- data/rbi/whop_sdk/resources/promo_codes.rbi +147 -0
- data/rbi/whop_sdk/resources/reviews.rbi +56 -0
- data/rbi/whop_sdk/resources/transfers.rbi +3 -0
- data/sig/whop_sdk/client.rbs +12 -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/assessment_question_types.rbs +17 -0
- data/sig/whop_sdk/models/billing_reasons.rbs +24 -0
- data/sig/whop_sdk/models/card_brands.rbs +44 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +159 -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.rbs +171 -0
- data/sig/whop_sdk/models/course_chapter.rbs +49 -0
- data/sig/whop_sdk/models/course_chapter_create_params.rbs +28 -0
- data/sig/whop_sdk/models/course_chapter_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/course_chapter_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/course_chapter_list_params.rbs +46 -0
- data/sig/whop_sdk/models/course_chapter_list_response.rbs +18 -0
- data/sig/whop_sdk/models/course_chapter_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/course_chapter_update_params.rbs +23 -0
- data/sig/whop_sdk/models/course_create_params.rbs +87 -0
- data/sig/whop_sdk/models/course_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/course_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
- data/sig/whop_sdk/models/course_lesson_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/course_lesson_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_list_params.rbs +51 -0
- data/sig/whop_sdk/models/course_lesson_list_response.rbs +50 -0
- data/sig/whop_sdk/models/course_lesson_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/course_lesson_update_params.rbs +248 -0
- data/sig/whop_sdk/models/course_list_params.rbs +51 -0
- data/sig/whop_sdk/models/course_list_response.rbs +102 -0
- data/sig/whop_sdk/models/course_retrieve_params.rbs +15 -0
- 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 +156 -0
- data/sig/whop_sdk/models/experience_duplicate_params.rbs +23 -0
- data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
- data/sig/whop_sdk/models/forum_post.rbs +10 -0
- data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
- data/sig/whop_sdk/models/forum_post_list_response.rbs +10 -0
- data/sig/whop_sdk/models/forum_post_update_params.rbs +72 -0
- data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
- data/sig/whop_sdk/models/languages.rbs +56 -0
- data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +20 -1
- data/sig/whop_sdk/models/lesson.rbs +248 -0
- data/sig/whop_sdk/models/lesson_types.rbs +19 -0
- data/sig/whop_sdk/models/lesson_visibilities.rbs +14 -0
- data/sig/whop_sdk/models/member_list_params.rbs +6 -1
- data/sig/whop_sdk/models/membership.rbs +17 -0
- data/sig/whop_sdk/models/membership_list_params.rbs +11 -6
- data/sig/whop_sdk/models/membership_list_response.rbs +17 -0
- data/sig/whop_sdk/models/message_create_params.rbs +29 -10
- data/sig/whop_sdk/models/message_update_params.rbs +67 -0
- data/sig/whop_sdk/models/payment.rbs +17 -12
- data/sig/whop_sdk/models/payment_list_params.rbs +4 -25
- data/sig/whop_sdk/models/payment_list_response.rbs +17 -12
- data/sig/whop_sdk/models/payment_method_types.rbs +182 -0
- data/sig/whop_sdk/models/plan.rbs +47 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +81 -10
- data/sig/whop_sdk/models/plan_list_response.rbs +47 -0
- data/sig/whop_sdk/models/plan_update_params.rbs +81 -10
- data/sig/whop_sdk/models/product.rbs +5 -0
- data/sig/whop_sdk/models/product_create_params.rbs +0 -22
- data/sig/whop_sdk/models/product_list_item.rbs +5 -0
- data/sig/whop_sdk/models/product_update_params.rbs +46 -10
- data/sig/whop_sdk/models/promo_code.rbs +134 -0
- data/sig/whop_sdk/models/promo_code_create_params.rbs +96 -0
- data/sig/whop_sdk/models/promo_code_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/promo_code_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/promo_code_list_params.rbs +61 -0
- data/sig/whop_sdk/models/promo_code_list_response.rbs +117 -0
- data/sig/whop_sdk/models/promo_code_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/promo_code_status.rbs +15 -0
- data/sig/whop_sdk/models/promo_duration.rbs +15 -0
- data/sig/whop_sdk/models/review_list_params.rbs +56 -0
- data/sig/whop_sdk/models/review_list_response.rbs +116 -0
- data/sig/whop_sdk/models/review_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/review_retrieve_response.rbs +152 -0
- data/sig/whop_sdk/models/review_status.rbs +15 -0
- 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 +84 -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_chapters.rbs +35 -0
- data/sig/whop_sdk/resources/course_lessons.rbs +49 -0
- data/sig/whop_sdk/resources/course_students.rbs +22 -0
- data/sig/whop_sdk/resources/courses.rbs +49 -0
- data/sig/whop_sdk/resources/experiences.rbs +7 -1
- data/sig/whop_sdk/resources/forum_posts.rbs +10 -1
- data/sig/whop_sdk/resources/invoices.rbs +5 -5
- data/sig/whop_sdk/resources/members.rbs +1 -0
- data/sig/whop_sdk/resources/memberships.rbs +2 -1
- data/sig/whop_sdk/resources/messages.rbs +9 -1
- data/sig/whop_sdk/resources/payments.rbs +1 -1
- data/sig/whop_sdk/resources/plans.rbs +12 -2
- data/sig/whop_sdk/resources/products.rbs +2 -3
- data/sig/whop_sdk/resources/promo_codes.rbs +45 -0
- data/sig/whop_sdk/resources/reviews.rbs +23 -0
- data/sig/whop_sdk/resources/transfers.rbs +1 -0
- metadata +213 -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
|
@@ -19,7 +19,7 @@ module WhopSDK
|
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :product_id
|
|
21
21
|
|
|
22
|
-
# The interval at which the plan charges (renewal plans).
|
|
22
|
+
# The interval in days at which the plan charges (renewal plans).
|
|
23
23
|
sig { returns(T.nilable(Integer)) }
|
|
24
24
|
attr_accessor :billing_period
|
|
25
25
|
|
|
@@ -42,13 +42,17 @@ module WhopSDK
|
|
|
42
42
|
attr_accessor :expiration_days
|
|
43
43
|
|
|
44
44
|
# An image for the plan. This will be visible on the product page to customers.
|
|
45
|
-
sig { returns(T.nilable(WhopSDK::PlanCreateParams::Image)) }
|
|
46
|
-
attr_reader :image
|
|
47
|
-
|
|
48
45
|
sig do
|
|
49
|
-
|
|
46
|
+
returns(
|
|
47
|
+
T.nilable(
|
|
48
|
+
T.any(
|
|
49
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
|
|
50
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
)
|
|
50
54
|
end
|
|
51
|
-
|
|
55
|
+
attr_accessor :image
|
|
52
56
|
|
|
53
57
|
# An additional amount charged upon first purchase. Use only if a one time payment
|
|
54
58
|
# OR you want to charge an additional amount on top of the renewal price. Provided
|
|
@@ -65,6 +69,25 @@ module WhopSDK
|
|
|
65
69
|
sig { returns(T.nilable(WhopSDK::TaxType::OrSymbol)) }
|
|
66
70
|
attr_accessor :override_tax_type
|
|
67
71
|
|
|
72
|
+
# The explicit payment method configuration for the plan. If not provided, the
|
|
73
|
+
# platform or company's defaults will apply.
|
|
74
|
+
sig do
|
|
75
|
+
returns(
|
|
76
|
+
T.nilable(WhopSDK::PlanCreateParams::PaymentMethodConfiguration)
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
attr_reader :payment_method_configuration
|
|
80
|
+
|
|
81
|
+
sig do
|
|
82
|
+
params(
|
|
83
|
+
payment_method_configuration:
|
|
84
|
+
T.nilable(
|
|
85
|
+
WhopSDK::PlanCreateParams::PaymentMethodConfiguration::OrHash
|
|
86
|
+
)
|
|
87
|
+
).void
|
|
88
|
+
end
|
|
89
|
+
attr_writer :payment_method_configuration
|
|
90
|
+
|
|
68
91
|
# The type of plan that can be attached to an access pass
|
|
69
92
|
sig { returns(T.nilable(WhopSDK::PlanType::OrSymbol)) }
|
|
70
93
|
attr_accessor :plan_type
|
|
@@ -78,6 +101,20 @@ module WhopSDK
|
|
|
78
101
|
sig { returns(T.nilable(Float)) }
|
|
79
102
|
attr_accessor :renewal_price
|
|
80
103
|
|
|
104
|
+
# The number of units available for purchase.
|
|
105
|
+
sig { returns(T.nilable(Integer)) }
|
|
106
|
+
attr_accessor :stock
|
|
107
|
+
|
|
108
|
+
# The price to display with a strikethrough for the initial price. Provided as a
|
|
109
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
110
|
+
sig { returns(T.nilable(Float)) }
|
|
111
|
+
attr_accessor :strike_through_initial_price
|
|
112
|
+
|
|
113
|
+
# The price to display with a strikethrough for the renewal price. Provided as a
|
|
114
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
115
|
+
sig { returns(T.nilable(Float)) }
|
|
116
|
+
attr_accessor :strike_through_renewal_price
|
|
117
|
+
|
|
81
118
|
# The title of the plan. This will be visible on the product page to customers.
|
|
82
119
|
sig { returns(T.nilable(String)) }
|
|
83
120
|
attr_accessor :title
|
|
@@ -86,6 +123,10 @@ module WhopSDK
|
|
|
86
123
|
sig { returns(T.nilable(Integer)) }
|
|
87
124
|
attr_accessor :trial_period_days
|
|
88
125
|
|
|
126
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
127
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
128
|
+
attr_accessor :unlimited_stock
|
|
129
|
+
|
|
89
130
|
# Visibility of a resource
|
|
90
131
|
sig { returns(T.nilable(WhopSDK::Visibility::OrSymbol)) }
|
|
91
132
|
attr_accessor :visibility
|
|
@@ -100,15 +141,29 @@ module WhopSDK
|
|
|
100
141
|
T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField::OrHash]),
|
|
101
142
|
description: T.nilable(String),
|
|
102
143
|
expiration_days: T.nilable(Integer),
|
|
103
|
-
image:
|
|
144
|
+
image:
|
|
145
|
+
T.nilable(
|
|
146
|
+
T.any(
|
|
147
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID::OrHash,
|
|
148
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithID::OrHash
|
|
149
|
+
)
|
|
150
|
+
),
|
|
104
151
|
initial_price: T.nilable(Float),
|
|
105
152
|
internal_notes: T.nilable(String),
|
|
106
153
|
override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
|
|
154
|
+
payment_method_configuration:
|
|
155
|
+
T.nilable(
|
|
156
|
+
WhopSDK::PlanCreateParams::PaymentMethodConfiguration::OrHash
|
|
157
|
+
),
|
|
107
158
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
108
159
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
109
160
|
renewal_price: T.nilable(Float),
|
|
161
|
+
stock: T.nilable(Integer),
|
|
162
|
+
strike_through_initial_price: T.nilable(Float),
|
|
163
|
+
strike_through_renewal_price: T.nilable(Float),
|
|
110
164
|
title: T.nilable(String),
|
|
111
165
|
trial_period_days: T.nilable(Integer),
|
|
166
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
112
167
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol),
|
|
113
168
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
114
169
|
).returns(T.attached_class)
|
|
@@ -118,7 +173,7 @@ module WhopSDK
|
|
|
118
173
|
company_id:,
|
|
119
174
|
# The product the plan is related to.
|
|
120
175
|
product_id:,
|
|
121
|
-
# The interval at which the plan charges (renewal plans).
|
|
176
|
+
# The interval in days at which the plan charges (renewal plans).
|
|
122
177
|
billing_period: nil,
|
|
123
178
|
# The available currencies on the platform
|
|
124
179
|
currency: nil,
|
|
@@ -139,6 +194,9 @@ module WhopSDK
|
|
|
139
194
|
# Whether or not the tax is included in a plan's price (or if it hasn't been set
|
|
140
195
|
# up)
|
|
141
196
|
override_tax_type: nil,
|
|
197
|
+
# The explicit payment method configuration for the plan. If not provided, the
|
|
198
|
+
# platform or company's defaults will apply.
|
|
199
|
+
payment_method_configuration: nil,
|
|
142
200
|
# The type of plan that can be attached to an access pass
|
|
143
201
|
plan_type: nil,
|
|
144
202
|
# The methods of how a plan can be released.
|
|
@@ -146,10 +204,20 @@ module WhopSDK
|
|
|
146
204
|
# The amount the customer is charged every billing period. Use only if a recurring
|
|
147
205
|
# payment. Provided as a number in dollars. Eg: 10.43 for $10.43
|
|
148
206
|
renewal_price: nil,
|
|
207
|
+
# The number of units available for purchase.
|
|
208
|
+
stock: nil,
|
|
209
|
+
# The price to display with a strikethrough for the initial price. Provided as a
|
|
210
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
211
|
+
strike_through_initial_price: nil,
|
|
212
|
+
# The price to display with a strikethrough for the renewal price. Provided as a
|
|
213
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
214
|
+
strike_through_renewal_price: nil,
|
|
149
215
|
# The title of the plan. This will be visible on the product page to customers.
|
|
150
216
|
title: nil,
|
|
151
217
|
# The number of free trial days added before a renewal plan.
|
|
152
218
|
trial_period_days: nil,
|
|
219
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
220
|
+
unlimited_stock: nil,
|
|
153
221
|
# Visibility of a resource
|
|
154
222
|
visibility: nil,
|
|
155
223
|
request_options: {}
|
|
@@ -167,15 +235,27 @@ module WhopSDK
|
|
|
167
235
|
T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField]),
|
|
168
236
|
description: T.nilable(String),
|
|
169
237
|
expiration_days: T.nilable(Integer),
|
|
170
|
-
image:
|
|
238
|
+
image:
|
|
239
|
+
T.nilable(
|
|
240
|
+
T.any(
|
|
241
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
|
|
242
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
|
|
243
|
+
)
|
|
244
|
+
),
|
|
171
245
|
initial_price: T.nilable(Float),
|
|
172
246
|
internal_notes: T.nilable(String),
|
|
173
247
|
override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
|
|
248
|
+
payment_method_configuration:
|
|
249
|
+
T.nilable(WhopSDK::PlanCreateParams::PaymentMethodConfiguration),
|
|
174
250
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
175
251
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
176
252
|
renewal_price: T.nilable(Float),
|
|
253
|
+
stock: T.nilable(Integer),
|
|
254
|
+
strike_through_initial_price: T.nilable(Float),
|
|
255
|
+
strike_through_renewal_price: T.nilable(Float),
|
|
177
256
|
title: T.nilable(String),
|
|
178
257
|
trial_period_days: T.nilable(Integer),
|
|
258
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
179
259
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol),
|
|
180
260
|
request_options: WhopSDK::RequestOptions
|
|
181
261
|
}
|
|
@@ -259,46 +339,144 @@ module WhopSDK
|
|
|
259
339
|
end
|
|
260
340
|
end
|
|
261
341
|
|
|
262
|
-
|
|
263
|
-
|
|
342
|
+
# An image for the plan. This will be visible on the product page to customers.
|
|
343
|
+
module Image
|
|
344
|
+
extend WhopSDK::Internal::Type::Union
|
|
345
|
+
|
|
346
|
+
Variants =
|
|
264
347
|
T.type_alias do
|
|
265
|
-
T.any(
|
|
348
|
+
T.any(
|
|
349
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
|
|
350
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
|
|
351
|
+
)
|
|
266
352
|
end
|
|
267
353
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
354
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
355
|
+
OrHash =
|
|
356
|
+
T.type_alias do
|
|
357
|
+
T.any(
|
|
358
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID,
|
|
359
|
+
WhopSDK::Internal::AnyHash
|
|
360
|
+
)
|
|
361
|
+
end
|
|
273
362
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
363
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
364
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
365
|
+
# mediaDirectUpload mutation.
|
|
366
|
+
sig { returns(String) }
|
|
367
|
+
attr_accessor :direct_upload_id
|
|
368
|
+
|
|
369
|
+
# Input for an attachment
|
|
370
|
+
sig { params(direct_upload_id: String).returns(T.attached_class) }
|
|
371
|
+
def self.new(
|
|
372
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
373
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
374
|
+
# mediaDirectUpload mutation.
|
|
375
|
+
direct_upload_id:
|
|
376
|
+
)
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
sig { override.returns({ direct_upload_id: String }) }
|
|
380
|
+
def to_hash
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
385
|
+
OrHash =
|
|
386
|
+
T.type_alias do
|
|
387
|
+
T.any(
|
|
388
|
+
WhopSDK::PlanCreateParams::Image::AttachmentInputWithID,
|
|
389
|
+
WhopSDK::Internal::AnyHash
|
|
390
|
+
)
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
394
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
395
|
+
# doing.
|
|
396
|
+
sig { returns(String) }
|
|
397
|
+
attr_accessor :id
|
|
398
|
+
|
|
399
|
+
# Input for an attachment
|
|
400
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
401
|
+
def self.new(
|
|
402
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
403
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
404
|
+
# doing.
|
|
405
|
+
id:
|
|
406
|
+
)
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
sig { override.returns({ id: String }) }
|
|
410
|
+
def to_hash
|
|
411
|
+
end
|
|
412
|
+
end
|
|
279
413
|
|
|
280
|
-
|
|
414
|
+
sig do
|
|
415
|
+
override.returns(T::Array[WhopSDK::PlanCreateParams::Image::Variants])
|
|
416
|
+
end
|
|
417
|
+
def self.variants
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
|
|
422
|
+
OrHash =
|
|
423
|
+
T.type_alias do
|
|
424
|
+
T.any(
|
|
425
|
+
WhopSDK::PlanCreateParams::PaymentMethodConfiguration,
|
|
426
|
+
WhopSDK::Internal::AnyHash
|
|
427
|
+
)
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
431
|
+
# applies if the include_platform_defaults is true.
|
|
432
|
+
sig { returns(T::Array[WhopSDK::PaymentMethodTypes::OrSymbol]) }
|
|
433
|
+
attr_accessor :disabled
|
|
434
|
+
|
|
435
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
436
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
437
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
438
|
+
# defaults with additional methods.
|
|
439
|
+
sig { returns(T::Array[WhopSDK::PaymentMethodTypes::OrSymbol]) }
|
|
440
|
+
attr_accessor :enabled
|
|
441
|
+
|
|
442
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
443
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
444
|
+
# the documentation at docs.whop.com/payments.
|
|
445
|
+
sig { returns(T::Boolean) }
|
|
446
|
+
attr_accessor :include_platform_defaults
|
|
447
|
+
|
|
448
|
+
# The explicit payment method configuration for the plan. If not provided, the
|
|
449
|
+
# platform or company's defaults will apply.
|
|
281
450
|
sig do
|
|
282
451
|
params(
|
|
283
|
-
|
|
284
|
-
|
|
452
|
+
disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
453
|
+
enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
454
|
+
include_platform_defaults: T::Boolean
|
|
285
455
|
).returns(T.attached_class)
|
|
286
456
|
end
|
|
287
457
|
def self.new(
|
|
288
|
-
#
|
|
289
|
-
#
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
#
|
|
293
|
-
#
|
|
294
|
-
#
|
|
295
|
-
|
|
458
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
459
|
+
# applies if the include_platform_defaults is true.
|
|
460
|
+
disabled:,
|
|
461
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
462
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
463
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
464
|
+
# defaults with additional methods.
|
|
465
|
+
enabled:,
|
|
466
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
467
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
468
|
+
# the documentation at docs.whop.com/payments.
|
|
469
|
+
include_platform_defaults:
|
|
296
470
|
)
|
|
297
471
|
end
|
|
298
472
|
|
|
299
473
|
sig do
|
|
300
474
|
override.returns(
|
|
301
|
-
{
|
|
475
|
+
{
|
|
476
|
+
disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
477
|
+
enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
478
|
+
include_platform_defaults: T::Boolean
|
|
479
|
+
}
|
|
302
480
|
)
|
|
303
481
|
end
|
|
304
482
|
def to_hash
|
|
@@ -66,6 +66,26 @@ module WhopSDK
|
|
|
66
66
|
sig { returns(T.nilable(Integer)) }
|
|
67
67
|
attr_accessor :member_count
|
|
68
68
|
|
|
69
|
+
# The explicit payment method configuration for the plan, if any.
|
|
70
|
+
sig do
|
|
71
|
+
returns(
|
|
72
|
+
T.nilable(
|
|
73
|
+
WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration
|
|
74
|
+
)
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
attr_reader :payment_method_configuration
|
|
78
|
+
|
|
79
|
+
sig do
|
|
80
|
+
params(
|
|
81
|
+
payment_method_configuration:
|
|
82
|
+
T.nilable(
|
|
83
|
+
WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration::OrHash
|
|
84
|
+
)
|
|
85
|
+
).void
|
|
86
|
+
end
|
|
87
|
+
attr_writer :payment_method_configuration
|
|
88
|
+
|
|
69
89
|
# Indicates if the plan is a one time payment or recurring.
|
|
70
90
|
sig { returns(WhopSDK::PlanType::TaggedSymbol) }
|
|
71
91
|
attr_accessor :plan_type
|
|
@@ -93,10 +113,22 @@ module WhopSDK
|
|
|
93
113
|
sig { returns(Float) }
|
|
94
114
|
attr_accessor :renewal_price
|
|
95
115
|
|
|
116
|
+
# The number of units available for purchase. Only displayed to authorized actors
|
|
117
|
+
sig { returns(T.nilable(Integer)) }
|
|
118
|
+
attr_accessor :stock
|
|
119
|
+
|
|
120
|
+
# The title of the plan. This will be visible on the product page to customers.
|
|
121
|
+
sig { returns(T.nilable(String)) }
|
|
122
|
+
attr_accessor :title
|
|
123
|
+
|
|
96
124
|
# The number of free trial days added before a renewal plan.
|
|
97
125
|
sig { returns(T.nilable(Integer)) }
|
|
98
126
|
attr_accessor :trial_period_days
|
|
99
127
|
|
|
128
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
129
|
+
sig { returns(T::Boolean) }
|
|
130
|
+
attr_accessor :unlimited_stock
|
|
131
|
+
|
|
100
132
|
# When the plan was last updated.
|
|
101
133
|
sig { returns(Time) }
|
|
102
134
|
attr_accessor :updated_at
|
|
@@ -121,13 +153,20 @@ module WhopSDK
|
|
|
121
153
|
invoice:
|
|
122
154
|
T.nilable(WhopSDK::Models::PlanListResponse::Invoice::OrHash),
|
|
123
155
|
member_count: T.nilable(Integer),
|
|
156
|
+
payment_method_configuration:
|
|
157
|
+
T.nilable(
|
|
158
|
+
WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration::OrHash
|
|
159
|
+
),
|
|
124
160
|
plan_type: WhopSDK::PlanType::OrSymbol,
|
|
125
161
|
product:
|
|
126
162
|
T.nilable(WhopSDK::Models::PlanListResponse::Product::OrHash),
|
|
127
163
|
purchase_url: String,
|
|
128
164
|
release_method: WhopSDK::ReleaseMethod::OrSymbol,
|
|
129
165
|
renewal_price: Float,
|
|
166
|
+
stock: T.nilable(Integer),
|
|
167
|
+
title: T.nilable(String),
|
|
130
168
|
trial_period_days: T.nilable(Integer),
|
|
169
|
+
unlimited_stock: T::Boolean,
|
|
131
170
|
updated_at: Time,
|
|
132
171
|
visibility: WhopSDK::Visibility::OrSymbol
|
|
133
172
|
).returns(T.attached_class)
|
|
@@ -155,6 +194,8 @@ module WhopSDK
|
|
|
155
194
|
invoice:,
|
|
156
195
|
# The number of members for the plan.
|
|
157
196
|
member_count:,
|
|
197
|
+
# The explicit payment method configuration for the plan, if any.
|
|
198
|
+
payment_method_configuration:,
|
|
158
199
|
# Indicates if the plan is a one time payment or recurring.
|
|
159
200
|
plan_type:,
|
|
160
201
|
# The access pass for the plan.
|
|
@@ -165,8 +206,14 @@ module WhopSDK
|
|
|
165
206
|
release_method:,
|
|
166
207
|
# The price a person has to pay for a plan on the renewal purchase.
|
|
167
208
|
renewal_price:,
|
|
209
|
+
# The number of units available for purchase. Only displayed to authorized actors
|
|
210
|
+
stock:,
|
|
211
|
+
# The title of the plan. This will be visible on the product page to customers.
|
|
212
|
+
title:,
|
|
168
213
|
# The number of free trial days added before a renewal plan.
|
|
169
214
|
trial_period_days:,
|
|
215
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
216
|
+
unlimited_stock:,
|
|
170
217
|
# When the plan was last updated.
|
|
171
218
|
updated_at:,
|
|
172
219
|
# Shows or hides the plan from public/business view.
|
|
@@ -188,12 +235,19 @@ module WhopSDK
|
|
|
188
235
|
internal_notes: T.nilable(String),
|
|
189
236
|
invoice: T.nilable(WhopSDK::Models::PlanListResponse::Invoice),
|
|
190
237
|
member_count: T.nilable(Integer),
|
|
238
|
+
payment_method_configuration:
|
|
239
|
+
T.nilable(
|
|
240
|
+
WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration
|
|
241
|
+
),
|
|
191
242
|
plan_type: WhopSDK::PlanType::TaggedSymbol,
|
|
192
243
|
product: T.nilable(WhopSDK::Models::PlanListResponse::Product),
|
|
193
244
|
purchase_url: String,
|
|
194
245
|
release_method: WhopSDK::ReleaseMethod::TaggedSymbol,
|
|
195
246
|
renewal_price: Float,
|
|
247
|
+
stock: T.nilable(Integer),
|
|
248
|
+
title: T.nilable(String),
|
|
196
249
|
trial_period_days: T.nilable(Integer),
|
|
250
|
+
unlimited_stock: T::Boolean,
|
|
197
251
|
updated_at: Time,
|
|
198
252
|
visibility: WhopSDK::Visibility::TaggedSymbol
|
|
199
253
|
}
|
|
@@ -260,6 +314,70 @@ module WhopSDK
|
|
|
260
314
|
end
|
|
261
315
|
end
|
|
262
316
|
|
|
317
|
+
class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
|
|
318
|
+
OrHash =
|
|
319
|
+
T.type_alias do
|
|
320
|
+
T.any(
|
|
321
|
+
WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration,
|
|
322
|
+
WhopSDK::Internal::AnyHash
|
|
323
|
+
)
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
327
|
+
# applies if the include_platform_defaults is true.
|
|
328
|
+
sig { returns(T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol]) }
|
|
329
|
+
attr_accessor :disabled
|
|
330
|
+
|
|
331
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
332
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
333
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
334
|
+
# defaults with additional methods.
|
|
335
|
+
sig { returns(T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol]) }
|
|
336
|
+
attr_accessor :enabled
|
|
337
|
+
|
|
338
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
339
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
340
|
+
# the documentation at docs.whop.com/payments.
|
|
341
|
+
sig { returns(T::Boolean) }
|
|
342
|
+
attr_accessor :include_platform_defaults
|
|
343
|
+
|
|
344
|
+
# The explicit payment method configuration for the plan, if any.
|
|
345
|
+
sig do
|
|
346
|
+
params(
|
|
347
|
+
disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
348
|
+
enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
349
|
+
include_platform_defaults: T::Boolean
|
|
350
|
+
).returns(T.attached_class)
|
|
351
|
+
end
|
|
352
|
+
def self.new(
|
|
353
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
354
|
+
# applies if the include_platform_defaults is true.
|
|
355
|
+
disabled:,
|
|
356
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
357
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
358
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
359
|
+
# defaults with additional methods.
|
|
360
|
+
enabled:,
|
|
361
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
362
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
363
|
+
# the documentation at docs.whop.com/payments.
|
|
364
|
+
include_platform_defaults:
|
|
365
|
+
)
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
sig do
|
|
369
|
+
override.returns(
|
|
370
|
+
{
|
|
371
|
+
disabled: T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol],
|
|
372
|
+
enabled: T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol],
|
|
373
|
+
include_platform_defaults: T::Boolean
|
|
374
|
+
}
|
|
375
|
+
)
|
|
376
|
+
end
|
|
377
|
+
def to_hash
|
|
378
|
+
end
|
|
379
|
+
end
|
|
380
|
+
|
|
263
381
|
class Product < WhopSDK::Internal::Type::BaseModel
|
|
264
382
|
OrHash =
|
|
265
383
|
T.type_alias do
|