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
|
@@ -22,9 +22,9 @@ module WhopSDK
|
|
|
22
22
|
# @!attribute attachments
|
|
23
23
|
# The attachments for this message, such as videos or images.
|
|
24
24
|
#
|
|
25
|
-
# @return [Array<WhopSDK::Models::MessageCreateParams::Attachment>, nil]
|
|
25
|
+
# @return [Array<WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID>, nil]
|
|
26
26
|
optional :attachments,
|
|
27
|
-
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::MessageCreateParams::Attachment] },
|
|
27
|
+
-> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::MessageCreateParams::Attachment] },
|
|
28
28
|
nil?: true
|
|
29
29
|
|
|
30
30
|
# @!attribute poll
|
|
@@ -38,38 +38,62 @@ module WhopSDK
|
|
|
38
38
|
#
|
|
39
39
|
# @param content [String] The content of the message in Markdown format.
|
|
40
40
|
#
|
|
41
|
-
# @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment>, nil] The attachments for this message, such as videos or images.
|
|
41
|
+
# @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message, such as videos or images.
|
|
42
42
|
#
|
|
43
43
|
# @param poll [WhopSDK::Models::MessageCreateParams::Poll, nil] The poll for this message
|
|
44
44
|
#
|
|
45
45
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
51
|
-
# doing.
|
|
52
|
-
#
|
|
53
|
-
# @return [String, nil]
|
|
54
|
-
optional :id, String, nil?: true
|
|
47
|
+
# Input for an attachment
|
|
48
|
+
module Attachment
|
|
49
|
+
extend WhopSDK::Internal::Type::Union
|
|
55
50
|
|
|
56
|
-
#
|
|
57
|
-
|
|
58
|
-
# the direct upload that was created when uploading the file to S3 via the
|
|
59
|
-
# mediaDirectUpload mutation.
|
|
60
|
-
#
|
|
61
|
-
# @return [String, nil]
|
|
62
|
-
optional :direct_upload_id, String, nil?: true
|
|
51
|
+
# Input for an attachment
|
|
52
|
+
variant -> { WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID }
|
|
63
53
|
|
|
64
|
-
#
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
54
|
+
# Input for an attachment
|
|
55
|
+
variant -> { WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID }
|
|
56
|
+
|
|
57
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
58
|
+
# @!attribute direct_upload_id
|
|
59
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
60
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
61
|
+
# mediaDirectUpload mutation.
|
|
62
|
+
#
|
|
63
|
+
# @return [String]
|
|
64
|
+
required :direct_upload_id, String
|
|
65
|
+
|
|
66
|
+
# @!method initialize(direct_upload_id:)
|
|
67
|
+
# Some parameter documentations has been truncated, see
|
|
68
|
+
# {WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID}
|
|
69
|
+
# for more details.
|
|
70
|
+
#
|
|
71
|
+
# Input for an attachment
|
|
72
|
+
#
|
|
73
|
+
# @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
77
|
+
# @!attribute id
|
|
78
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
79
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
80
|
+
# doing.
|
|
81
|
+
#
|
|
82
|
+
# @return [String]
|
|
83
|
+
required :id, String
|
|
84
|
+
|
|
85
|
+
# @!method initialize(id:)
|
|
86
|
+
# Some parameter documentations has been truncated, see
|
|
87
|
+
# {WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID} for
|
|
88
|
+
# more details.
|
|
89
|
+
#
|
|
90
|
+
# Input for an attachment
|
|
91
|
+
#
|
|
92
|
+
# @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# @!method self.variants
|
|
96
|
+
# @return [Array(WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID)]
|
|
73
97
|
end
|
|
74
98
|
|
|
75
99
|
class Poll < WhopSDK::Internal::Type::BaseModel
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Messages#update
|
|
6
|
+
class MessageUpdateParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute attachments
|
|
11
|
+
# The attachments for this message
|
|
12
|
+
#
|
|
13
|
+
# @return [Array<WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID>, nil]
|
|
14
|
+
optional :attachments,
|
|
15
|
+
-> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::MessageUpdateParams::Attachment] },
|
|
16
|
+
nil?: true
|
|
17
|
+
|
|
18
|
+
# @!attribute content
|
|
19
|
+
# The content of the message in Markdown format
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :content, String, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!attribute is_pinned
|
|
25
|
+
# Whether this message is pinned
|
|
26
|
+
#
|
|
27
|
+
# @return [Boolean, nil]
|
|
28
|
+
optional :is_pinned, WhopSDK::Internal::Type::Boolean, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!method initialize(attachments: nil, content: nil, is_pinned: nil, request_options: {})
|
|
31
|
+
# @param attachments [Array<WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message
|
|
32
|
+
#
|
|
33
|
+
# @param content [String, nil] The content of the message in Markdown format
|
|
34
|
+
#
|
|
35
|
+
# @param is_pinned [Boolean, nil] Whether this message is pinned
|
|
36
|
+
#
|
|
37
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
38
|
+
|
|
39
|
+
# Input for an attachment
|
|
40
|
+
module Attachment
|
|
41
|
+
extend WhopSDK::Internal::Type::Union
|
|
42
|
+
|
|
43
|
+
# Input for an attachment
|
|
44
|
+
variant -> { WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID }
|
|
45
|
+
|
|
46
|
+
# Input for an attachment
|
|
47
|
+
variant -> { WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID }
|
|
48
|
+
|
|
49
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
50
|
+
# @!attribute direct_upload_id
|
|
51
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
52
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
53
|
+
# mediaDirectUpload mutation.
|
|
54
|
+
#
|
|
55
|
+
# @return [String]
|
|
56
|
+
required :direct_upload_id, String
|
|
57
|
+
|
|
58
|
+
# @!method initialize(direct_upload_id:)
|
|
59
|
+
# Some parameter documentations has been truncated, see
|
|
60
|
+
# {WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID}
|
|
61
|
+
# for more details.
|
|
62
|
+
#
|
|
63
|
+
# Input for an attachment
|
|
64
|
+
#
|
|
65
|
+
# @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
69
|
+
# @!attribute id
|
|
70
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
71
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
72
|
+
# doing.
|
|
73
|
+
#
|
|
74
|
+
# @return [String]
|
|
75
|
+
required :id, String
|
|
76
|
+
|
|
77
|
+
# @!method initialize(id:)
|
|
78
|
+
# Some parameter documentations has been truncated, see
|
|
79
|
+
# {WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID} for
|
|
80
|
+
# more details.
|
|
81
|
+
#
|
|
82
|
+
# Input for an attachment
|
|
83
|
+
#
|
|
84
|
+
# @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# @!method self.variants
|
|
88
|
+
# @return [Array(WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID)]
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -28,16 +28,16 @@ module WhopSDK
|
|
|
28
28
|
required :billing_address, -> { WhopSDK::Payment::BillingAddress }, nil?: true
|
|
29
29
|
|
|
30
30
|
# @!attribute billing_reason
|
|
31
|
-
# The
|
|
31
|
+
# The reason why a specific payment was billed
|
|
32
32
|
#
|
|
33
|
-
# @return [
|
|
34
|
-
required :billing_reason,
|
|
33
|
+
# @return [Symbol, WhopSDK::Models::BillingReasons, nil]
|
|
34
|
+
required :billing_reason, enum: -> { WhopSDK::BillingReasons }, nil?: true
|
|
35
35
|
|
|
36
36
|
# @!attribute card_brand
|
|
37
|
-
#
|
|
37
|
+
# Possible card brands that a payment token can have
|
|
38
38
|
#
|
|
39
|
-
# @return [
|
|
40
|
-
required :card_brand,
|
|
39
|
+
# @return [Symbol, WhopSDK::Models::CardBrands, nil]
|
|
40
|
+
required :card_brand, enum: -> { WhopSDK::CardBrands }, nil?: true
|
|
41
41
|
|
|
42
42
|
# @!attribute card_last4
|
|
43
43
|
# The last 4 digits of the card used to make the payment.
|
|
@@ -93,6 +93,13 @@ module WhopSDK
|
|
|
93
93
|
# @return [WhopSDK::Models::Payment::Membership, nil]
|
|
94
94
|
required :membership, -> { WhopSDK::Payment::Membership }, nil?: true
|
|
95
95
|
|
|
96
|
+
# @!attribute metadata
|
|
97
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
98
|
+
# configuration for which this payment was made
|
|
99
|
+
#
|
|
100
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
101
|
+
required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
102
|
+
|
|
96
103
|
# @!attribute paid_at
|
|
97
104
|
# The datetime the payment was paid
|
|
98
105
|
#
|
|
@@ -100,11 +107,10 @@ module WhopSDK
|
|
|
100
107
|
required :paid_at, Time, nil?: true
|
|
101
108
|
|
|
102
109
|
# @!attribute payment_method_type
|
|
103
|
-
#
|
|
104
|
-
# klarna, affirm, card, cashapp
|
|
110
|
+
# The different types of payment methods that can be used.
|
|
105
111
|
#
|
|
106
|
-
# @return [
|
|
107
|
-
required :payment_method_type,
|
|
112
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil]
|
|
113
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true
|
|
108
114
|
|
|
109
115
|
# @!attribute plan
|
|
110
116
|
# The plan attached to this payment.
|
|
@@ -125,7 +131,8 @@ module WhopSDK
|
|
|
125
131
|
required :promo_code, -> { WhopSDK::Payment::PromoCode }, nil?: true
|
|
126
132
|
|
|
127
133
|
# @!attribute refundable
|
|
128
|
-
#
|
|
134
|
+
# True only for payments that are `paid`, have not been fully refunded, and were
|
|
135
|
+
# processed by a payment processor that allows refunds.
|
|
129
136
|
#
|
|
130
137
|
# @return [Boolean]
|
|
131
138
|
required :refundable, WhopSDK::Internal::Type::Boolean
|
|
@@ -143,7 +150,9 @@ module WhopSDK
|
|
|
143
150
|
required :refunded_at, Time, nil?: true
|
|
144
151
|
|
|
145
152
|
# @!attribute retryable
|
|
146
|
-
#
|
|
153
|
+
# True when the payment status is `open` and its membership is in one of the
|
|
154
|
+
# retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
|
|
155
|
+
# otherwise false. Used to decide if Whop can attempt the charge again.
|
|
147
156
|
#
|
|
148
157
|
# @return [Boolean]
|
|
149
158
|
required :retryable, WhopSDK::Internal::Type::Boolean
|
|
@@ -185,12 +194,13 @@ module WhopSDK
|
|
|
185
194
|
required :user, -> { WhopSDK::Payment::User }, nil?: true
|
|
186
195
|
|
|
187
196
|
# @!attribute voidable
|
|
188
|
-
#
|
|
197
|
+
# True when the payment is tied to a membership in `past_due`, the payment status
|
|
198
|
+
# is `open`, and the processor allows voiding payments; otherwise false.
|
|
189
199
|
#
|
|
190
200
|
# @return [Boolean]
|
|
191
201
|
required :voidable, WhopSDK::Internal::Type::Boolean
|
|
192
202
|
|
|
193
|
-
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
|
|
203
|
+
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
|
|
194
204
|
# Some parameter documentations has been truncated, see {WhopSDK::Models::Payment}
|
|
195
205
|
# for more details.
|
|
196
206
|
#
|
|
@@ -204,9 +214,9 @@ module WhopSDK
|
|
|
204
214
|
#
|
|
205
215
|
# @param billing_address [WhopSDK::Models::Payment::BillingAddress, nil] The address of the user who made the payment.
|
|
206
216
|
#
|
|
207
|
-
# @param billing_reason [
|
|
217
|
+
# @param billing_reason [Symbol, WhopSDK::Models::BillingReasons, nil] The reason why a specific payment was billed
|
|
208
218
|
#
|
|
209
|
-
# @param card_brand [
|
|
219
|
+
# @param card_brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
210
220
|
#
|
|
211
221
|
# @param card_last4 [String, nil] The last 4 digits of the card used to make the payment.
|
|
212
222
|
#
|
|
@@ -226,9 +236,11 @@ module WhopSDK
|
|
|
226
236
|
#
|
|
227
237
|
# @param membership [WhopSDK::Models::Payment::Membership, nil] The membership attached to this payment.
|
|
228
238
|
#
|
|
239
|
+
# @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied the checkout con
|
|
240
|
+
#
|
|
229
241
|
# @param paid_at [Time, nil] The datetime the payment was paid
|
|
230
242
|
#
|
|
231
|
-
# @param payment_method_type [
|
|
243
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
|
|
232
244
|
#
|
|
233
245
|
# @param plan [WhopSDK::Models::Payment::Plan, nil] The plan attached to this payment.
|
|
234
246
|
#
|
|
@@ -236,13 +248,13 @@ module WhopSDK
|
|
|
236
248
|
#
|
|
237
249
|
# @param promo_code [WhopSDK::Models::Payment::PromoCode, nil] The promo code used for this payment.
|
|
238
250
|
#
|
|
239
|
-
# @param refundable [Boolean]
|
|
251
|
+
# @param refundable [Boolean] True only for payments that are `paid`, have not been fully refunded, and were p
|
|
240
252
|
#
|
|
241
253
|
# @param refunded_amount [Float, nil] The payment refund amount(if applicable).
|
|
242
254
|
#
|
|
243
255
|
# @param refunded_at [Time, nil] When the payment was refunded (if applicable).
|
|
244
256
|
#
|
|
245
|
-
# @param retryable [Boolean]
|
|
257
|
+
# @param retryable [Boolean] True when the payment status is `open` and its membership is in one of the retry
|
|
246
258
|
#
|
|
247
259
|
# @param status [Symbol, WhopSDK::Models::ReceiptStatus, nil] The status of a receipt
|
|
248
260
|
#
|
|
@@ -256,7 +268,7 @@ module WhopSDK
|
|
|
256
268
|
#
|
|
257
269
|
# @param user [WhopSDK::Models::Payment::User, nil] The user that made this payment.
|
|
258
270
|
#
|
|
259
|
-
# @param voidable [Boolean]
|
|
271
|
+
# @param voidable [Boolean] True when the payment is tied to a membership in `past_due`, the payment status
|
|
260
272
|
|
|
261
273
|
# @see WhopSDK::Models::Payment#billing_address
|
|
262
274
|
class BillingAddress < WhopSDK::Internal::Type::BaseModel
|
|
@@ -465,7 +477,7 @@ module WhopSDK
|
|
|
465
477
|
required :code, String, nil?: true
|
|
466
478
|
|
|
467
479
|
# @!attribute number_of_intervals
|
|
468
|
-
# The number of
|
|
480
|
+
# The number of months the promo is applied for.
|
|
469
481
|
#
|
|
470
482
|
# @return [Integer, nil]
|
|
471
483
|
required :number_of_intervals, Integer, nil?: true
|
|
@@ -487,7 +499,7 @@ module WhopSDK
|
|
|
487
499
|
#
|
|
488
500
|
# @param code [String, nil] The specific code used to apply the promo at checkout.
|
|
489
501
|
#
|
|
490
|
-
# @param number_of_intervals [Integer, nil] The number of
|
|
502
|
+
# @param number_of_intervals [Integer, nil] The number of months the promo is applied for.
|
|
491
503
|
#
|
|
492
504
|
# @param promo_type [Symbol, WhopSDK::Models::PromoType] The type (% or flat amount) of the promo.
|
|
493
505
|
end
|
|
@@ -28,9 +28,9 @@ module WhopSDK
|
|
|
28
28
|
# @!attribute billing_reasons
|
|
29
29
|
# The billing reason for the payment
|
|
30
30
|
#
|
|
31
|
-
# @return [Array<Symbol, WhopSDK::Models::
|
|
31
|
+
# @return [Array<Symbol, WhopSDK::Models::BillingReasons>, nil]
|
|
32
32
|
optional :billing_reasons,
|
|
33
|
-
-> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::
|
|
33
|
+
-> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::BillingReasons] },
|
|
34
34
|
nil?: true
|
|
35
35
|
|
|
36
36
|
# @!attribute created_after
|
|
@@ -114,7 +114,7 @@ module WhopSDK
|
|
|
114
114
|
#
|
|
115
115
|
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
116
116
|
#
|
|
117
|
-
# @param billing_reasons [Array<Symbol, WhopSDK::Models::
|
|
117
|
+
# @param billing_reasons [Array<Symbol, WhopSDK::Models::BillingReasons>, nil] The billing reason for the payment
|
|
118
118
|
#
|
|
119
119
|
# @param created_after [Time, nil] The minimum creation date to filter by
|
|
120
120
|
#
|
|
@@ -142,21 +142,6 @@ module WhopSDK
|
|
|
142
142
|
#
|
|
143
143
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
144
144
|
|
|
145
|
-
# The reason why a specific payment was billed
|
|
146
|
-
module BillingReason
|
|
147
|
-
extend WhopSDK::Internal::Type::Enum
|
|
148
|
-
|
|
149
|
-
SUBSCRIPTION_CREATE = :subscription_create
|
|
150
|
-
SUBSCRIPTION_CYCLE = :subscription_cycle
|
|
151
|
-
SUBSCRIPTION_UPDATE = :subscription_update
|
|
152
|
-
ONE_TIME = :one_time
|
|
153
|
-
MANUAL = :manual
|
|
154
|
-
SUBSCRIPTION = :subscription
|
|
155
|
-
|
|
156
|
-
# @!method self.values
|
|
157
|
-
# @return [Array<Symbol>]
|
|
158
|
-
end
|
|
159
|
-
|
|
160
145
|
# The order to sort the results by.
|
|
161
146
|
module Order
|
|
162
147
|
extend WhopSDK::Internal::Type::Enum
|
|
@@ -29,16 +29,16 @@ module WhopSDK
|
|
|
29
29
|
required :billing_address, -> { WhopSDK::Models::PaymentListResponse::BillingAddress }, nil?: true
|
|
30
30
|
|
|
31
31
|
# @!attribute billing_reason
|
|
32
|
-
# The
|
|
32
|
+
# The reason why a specific payment was billed
|
|
33
33
|
#
|
|
34
|
-
# @return [
|
|
35
|
-
required :billing_reason,
|
|
34
|
+
# @return [Symbol, WhopSDK::Models::BillingReasons, nil]
|
|
35
|
+
required :billing_reason, enum: -> { WhopSDK::BillingReasons }, nil?: true
|
|
36
36
|
|
|
37
37
|
# @!attribute card_brand
|
|
38
|
-
#
|
|
38
|
+
# Possible card brands that a payment token can have
|
|
39
39
|
#
|
|
40
|
-
# @return [
|
|
41
|
-
required :card_brand,
|
|
40
|
+
# @return [Symbol, WhopSDK::Models::CardBrands, nil]
|
|
41
|
+
required :card_brand, enum: -> { WhopSDK::CardBrands }, nil?: true
|
|
42
42
|
|
|
43
43
|
# @!attribute card_last4
|
|
44
44
|
# The last 4 digits of the card used to make the payment.
|
|
@@ -94,6 +94,13 @@ module WhopSDK
|
|
|
94
94
|
# @return [WhopSDK::Models::PaymentListResponse::Membership, nil]
|
|
95
95
|
required :membership, -> { WhopSDK::Models::PaymentListResponse::Membership }, nil?: true
|
|
96
96
|
|
|
97
|
+
# @!attribute metadata
|
|
98
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
99
|
+
# configuration for which this payment was made
|
|
100
|
+
#
|
|
101
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
102
|
+
required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
103
|
+
|
|
97
104
|
# @!attribute paid_at
|
|
98
105
|
# The datetime the payment was paid
|
|
99
106
|
#
|
|
@@ -101,11 +108,10 @@ module WhopSDK
|
|
|
101
108
|
required :paid_at, Time, nil?: true
|
|
102
109
|
|
|
103
110
|
# @!attribute payment_method_type
|
|
104
|
-
#
|
|
105
|
-
# klarna, affirm, card, cashapp
|
|
111
|
+
# The different types of payment methods that can be used.
|
|
106
112
|
#
|
|
107
|
-
# @return [
|
|
108
|
-
required :payment_method_type,
|
|
113
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil]
|
|
114
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true
|
|
109
115
|
|
|
110
116
|
# @!attribute plan
|
|
111
117
|
# The plan attached to this payment.
|
|
@@ -126,7 +132,8 @@ module WhopSDK
|
|
|
126
132
|
required :promo_code, -> { WhopSDK::Models::PaymentListResponse::PromoCode }, nil?: true
|
|
127
133
|
|
|
128
134
|
# @!attribute refundable
|
|
129
|
-
#
|
|
135
|
+
# True only for payments that are `paid`, have not been fully refunded, and were
|
|
136
|
+
# processed by a payment processor that allows refunds.
|
|
130
137
|
#
|
|
131
138
|
# @return [Boolean]
|
|
132
139
|
required :refundable, WhopSDK::Internal::Type::Boolean
|
|
@@ -144,7 +151,9 @@ module WhopSDK
|
|
|
144
151
|
required :refunded_at, Time, nil?: true
|
|
145
152
|
|
|
146
153
|
# @!attribute retryable
|
|
147
|
-
#
|
|
154
|
+
# True when the payment status is `open` and its membership is in one of the
|
|
155
|
+
# retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
|
|
156
|
+
# otherwise false. Used to decide if Whop can attempt the charge again.
|
|
148
157
|
#
|
|
149
158
|
# @return [Boolean]
|
|
150
159
|
required :retryable, WhopSDK::Internal::Type::Boolean
|
|
@@ -186,12 +195,13 @@ module WhopSDK
|
|
|
186
195
|
required :user, -> { WhopSDK::Models::PaymentListResponse::User }, nil?: true
|
|
187
196
|
|
|
188
197
|
# @!attribute voidable
|
|
189
|
-
#
|
|
198
|
+
# True when the payment is tied to a membership in `past_due`, the payment status
|
|
199
|
+
# is `open`, and the processor allows voiding payments; otherwise false.
|
|
190
200
|
#
|
|
191
201
|
# @return [Boolean]
|
|
192
202
|
required :voidable, WhopSDK::Internal::Type::Boolean
|
|
193
203
|
|
|
194
|
-
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
|
|
204
|
+
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
|
|
195
205
|
# Some parameter documentations has been truncated, see
|
|
196
206
|
# {WhopSDK::Models::PaymentListResponse} for more details.
|
|
197
207
|
#
|
|
@@ -205,9 +215,9 @@ module WhopSDK
|
|
|
205
215
|
#
|
|
206
216
|
# @param billing_address [WhopSDK::Models::PaymentListResponse::BillingAddress, nil] The address of the user who made the payment.
|
|
207
217
|
#
|
|
208
|
-
# @param billing_reason [
|
|
218
|
+
# @param billing_reason [Symbol, WhopSDK::Models::BillingReasons, nil] The reason why a specific payment was billed
|
|
209
219
|
#
|
|
210
|
-
# @param card_brand [
|
|
220
|
+
# @param card_brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
211
221
|
#
|
|
212
222
|
# @param card_last4 [String, nil] The last 4 digits of the card used to make the payment.
|
|
213
223
|
#
|
|
@@ -227,9 +237,11 @@ module WhopSDK
|
|
|
227
237
|
#
|
|
228
238
|
# @param membership [WhopSDK::Models::PaymentListResponse::Membership, nil] The membership attached to this payment.
|
|
229
239
|
#
|
|
240
|
+
# @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied the checkout con
|
|
241
|
+
#
|
|
230
242
|
# @param paid_at [Time, nil] The datetime the payment was paid
|
|
231
243
|
#
|
|
232
|
-
# @param payment_method_type [
|
|
244
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
|
|
233
245
|
#
|
|
234
246
|
# @param plan [WhopSDK::Models::PaymentListResponse::Plan, nil] The plan attached to this payment.
|
|
235
247
|
#
|
|
@@ -237,13 +249,13 @@ module WhopSDK
|
|
|
237
249
|
#
|
|
238
250
|
# @param promo_code [WhopSDK::Models::PaymentListResponse::PromoCode, nil] The promo code used for this payment.
|
|
239
251
|
#
|
|
240
|
-
# @param refundable [Boolean]
|
|
252
|
+
# @param refundable [Boolean] True only for payments that are `paid`, have not been fully refunded, and were p
|
|
241
253
|
#
|
|
242
254
|
# @param refunded_amount [Float, nil] The payment refund amount(if applicable).
|
|
243
255
|
#
|
|
244
256
|
# @param refunded_at [Time, nil] When the payment was refunded (if applicable).
|
|
245
257
|
#
|
|
246
|
-
# @param retryable [Boolean]
|
|
258
|
+
# @param retryable [Boolean] True when the payment status is `open` and its membership is in one of the retry
|
|
247
259
|
#
|
|
248
260
|
# @param status [Symbol, WhopSDK::Models::ReceiptStatus, nil] The status of a receipt
|
|
249
261
|
#
|
|
@@ -257,7 +269,7 @@ module WhopSDK
|
|
|
257
269
|
#
|
|
258
270
|
# @param user [WhopSDK::Models::PaymentListResponse::User, nil] The user that made this payment.
|
|
259
271
|
#
|
|
260
|
-
# @param voidable [Boolean]
|
|
272
|
+
# @param voidable [Boolean] True when the payment is tied to a membership in `past_due`, the payment status
|
|
261
273
|
|
|
262
274
|
# @see WhopSDK::Models::PaymentListResponse#billing_address
|
|
263
275
|
class BillingAddress < WhopSDK::Internal::Type::BaseModel
|
|
@@ -466,7 +478,7 @@ module WhopSDK
|
|
|
466
478
|
required :code, String, nil?: true
|
|
467
479
|
|
|
468
480
|
# @!attribute number_of_intervals
|
|
469
|
-
# The number of
|
|
481
|
+
# The number of months the promo is applied for.
|
|
470
482
|
#
|
|
471
483
|
# @return [Integer, nil]
|
|
472
484
|
required :number_of_intervals, Integer, nil?: true
|
|
@@ -488,7 +500,7 @@ module WhopSDK
|
|
|
488
500
|
#
|
|
489
501
|
# @param code [String, nil] The specific code used to apply the promo at checkout.
|
|
490
502
|
#
|
|
491
|
-
# @param number_of_intervals [Integer, nil] The number of
|
|
503
|
+
# @param number_of_intervals [Integer, nil] The number of months the promo is applied for.
|
|
492
504
|
#
|
|
493
505
|
# @param promo_type [Symbol, WhopSDK::Models::PromoType] The type (% or flat amount) of the promo.
|
|
494
506
|
end
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# The different types of payment methods that can be used.
|
|
6
|
+
module PaymentMethodTypes
|
|
7
|
+
extend WhopSDK::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
ACSS_DEBIT = :acss_debit
|
|
10
|
+
AFFIRM = :affirm
|
|
11
|
+
AFTERPAY_CLEARPAY = :afterpay_clearpay
|
|
12
|
+
ALIPAY = :alipay
|
|
13
|
+
ALMA = :alma
|
|
14
|
+
AMAZON_PAY = :amazon_pay
|
|
15
|
+
APPLE_PAY = :apple_pay
|
|
16
|
+
AU_BECS_DEBIT = :au_becs_debit
|
|
17
|
+
BACS_DEBIT = :bacs_debit
|
|
18
|
+
BANCONTACT = :bancontact
|
|
19
|
+
BILLIE = :billie
|
|
20
|
+
BLIK = :blik
|
|
21
|
+
BOLETO = :boleto
|
|
22
|
+
CARD = :card
|
|
23
|
+
CASHAPP = :cashapp
|
|
24
|
+
CRYPTO = :crypto
|
|
25
|
+
EPS = :eps
|
|
26
|
+
FPX = :fpx
|
|
27
|
+
GIROPAY = :giropay
|
|
28
|
+
GOOGLE_PAY = :google_pay
|
|
29
|
+
GRABPAY = :grabpay
|
|
30
|
+
IDEAL = :ideal
|
|
31
|
+
KAKAO_PAY = :kakao_pay
|
|
32
|
+
KLARNA = :klarna
|
|
33
|
+
KONBINI = :konbini
|
|
34
|
+
KR_CARD = :kr_card
|
|
35
|
+
LINK = :link
|
|
36
|
+
MOBILEPAY = :mobilepay
|
|
37
|
+
MULTIBANCO = :multibanco
|
|
38
|
+
NAVER_PAY = :naver_pay
|
|
39
|
+
NZ_BANK_ACCOUNT = :nz_bank_account
|
|
40
|
+
OXXO = :oxxo
|
|
41
|
+
P24 = :p24
|
|
42
|
+
PAY_BY_BANK = :pay_by_bank
|
|
43
|
+
PAYCO = :payco
|
|
44
|
+
PAYNOW = :paynow
|
|
45
|
+
PIX = :pix
|
|
46
|
+
PROMPTPAY = :promptpay
|
|
47
|
+
REVOLUT_PAY = :revolut_pay
|
|
48
|
+
SAMSUNG_PAY = :samsung_pay
|
|
49
|
+
SATISPAY = :satispay
|
|
50
|
+
SEPA_DEBIT = :sepa_debit
|
|
51
|
+
SOFORT = :sofort
|
|
52
|
+
SWISH = :swish
|
|
53
|
+
TWINT = :twint
|
|
54
|
+
US_BANK_ACCOUNT = :us_bank_account
|
|
55
|
+
WECHAT_PAY = :wechat_pay
|
|
56
|
+
ZIP = :zip
|
|
57
|
+
BIZUM = :bizum
|
|
58
|
+
CAPCHASE_PAY = :capchase_pay
|
|
59
|
+
KRIYA = :kriya
|
|
60
|
+
MONDU = :mondu
|
|
61
|
+
NG_WALLET = :ng_wallet
|
|
62
|
+
PAYPAY = :paypay
|
|
63
|
+
SEQURA = :sequra
|
|
64
|
+
SCALAPAY = :scalapay
|
|
65
|
+
VIPPS = :vipps
|
|
66
|
+
CUSTOM = :custom
|
|
67
|
+
CUSTOMER_BALANCE = :customer_balance
|
|
68
|
+
GOPAY = :gopay
|
|
69
|
+
MB_WAY = :mb_way
|
|
70
|
+
NG_BANK = :ng_bank
|
|
71
|
+
NG_BANK_TRANSFER = :ng_bank_transfer
|
|
72
|
+
NG_CARD = :ng_card
|
|
73
|
+
NG_MARKET = :ng_market
|
|
74
|
+
NG_USSD = :ng_ussd
|
|
75
|
+
PAYPAL = :paypal
|
|
76
|
+
PAYTO = :payto
|
|
77
|
+
QRIS = :qris
|
|
78
|
+
RECHNUNG = :rechnung
|
|
79
|
+
SOUTH_KOREA_MARKET = :south_korea_market
|
|
80
|
+
KR_MARKET = :kr_market
|
|
81
|
+
SHOPEEPAY = :shopeepay
|
|
82
|
+
UPI = :upi
|
|
83
|
+
SUNBIT = :sunbit
|
|
84
|
+
NETBANKING = :netbanking
|
|
85
|
+
ID_BANK_TRANSFER = :id_bank_transfer
|
|
86
|
+
DEMO_PAY = :demo_pay
|
|
87
|
+
SHOP_PAY = :shop_pay
|
|
88
|
+
SEZZLE = :sezzle
|
|
89
|
+
COINBASE = :coinbase
|
|
90
|
+
SPLITIT = :splitit
|
|
91
|
+
PLATFORM_BALANCE = :platform_balance
|
|
92
|
+
APPLE = :apple
|
|
93
|
+
UNKNOWN = :unknown
|
|
94
|
+
|
|
95
|
+
# @!method self.values
|
|
96
|
+
# @return [Array<Symbol>]
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|