whop_sdk 0.0.3 → 0.0.5
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 +47 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +8 -0
- data/lib/whop_sdk/internal/transport/base_client.rb +7 -1
- data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +6 -2
- data/lib/whop_sdk/models/access_level.rb +1 -1
- data/lib/whop_sdk/models/access_pass_type.rb +2 -1
- data/lib/whop_sdk/models/access_token_create_params.rb +67 -0
- data/lib/whop_sdk/models/access_token_create_response.rb +27 -0
- data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
- data/lib/whop_sdk/models/app_update_params.rb +53 -29
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +119 -43
- 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 +18 -1
- data/lib/whop_sdk/models/course_create_params.rb +94 -30
- data/lib/whop_sdk/models/course_lesson_create_params.rb +77 -1
- data/lib/whop_sdk/models/course_lesson_list_response.rb +43 -1
- data/lib/whop_sdk/models/course_lesson_update_params.rb +280 -83
- data/lib/whop_sdk/models/course_list_response.rb +18 -1
- 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 +70 -28
- data/lib/whop_sdk/models/course_visibilities.rb +17 -0
- data/lib/whop_sdk/models/embed_type.rb +16 -0
- data/lib/whop_sdk/models/entry.rb +3 -3
- data/lib/whop_sdk/models/entry_list_response.rb +3 -3
- data/lib/whop_sdk/models/experience.rb +5 -6
- data/lib/whop_sdk/models/experience_update_params.rb +53 -29
- data/lib/whop_sdk/models/forum_post.rb +2 -2
- data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
- data/lib/whop_sdk/models/forum_post_list_response.rb +2 -2
- data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
- data/lib/whop_sdk/models/global_affiliate_status.rb +1 -1
- data/lib/whop_sdk/models/invoice_create_params.rb +50 -34
- data/lib/whop_sdk/models/invoice_list_params.rb +27 -40
- data/lib/whop_sdk/models/lesson.rb +59 -9
- data/lib/whop_sdk/models/member_list_params.rb +11 -11
- data/lib/whop_sdk/models/member_list_response.rb +3 -3
- data/lib/whop_sdk/models/member_retrieve_response.rb +3 -3
- data/lib/whop_sdk/models/membership_list_params.rb +9 -9
- data/lib/whop_sdk/models/message.rb +2 -2
- data/lib/whop_sdk/models/message_create_params.rb +51 -27
- data/lib/whop_sdk/models/message_list_response.rb +2 -2
- data/lib/whop_sdk/models/message_update_params.rb +51 -27
- data/lib/whop_sdk/models/payment.rb +13 -4
- data/lib/whop_sdk/models/payment_list_response.rb +13 -4
- data/lib/whop_sdk/models/payment_method_types.rb +2 -1
- data/lib/whop_sdk/models/plan.rb +54 -5
- data/lib/whop_sdk/models/plan_create_params.rb +99 -24
- data/lib/whop_sdk/models/plan_list_response.rb +57 -5
- data/lib/whop_sdk/models/plan_type.rb +1 -1
- data/lib/whop_sdk/models/plan_update_params.rb +97 -22
- data/lib/whop_sdk/models/product.rb +1 -1
- data/lib/whop_sdk/models/product_create_params.rb +6 -6
- data/lib/whop_sdk/models/product_list_item.rb +1 -1
- data/lib/whop_sdk/models/product_update_params.rb +57 -33
- data/lib/whop_sdk/models/promo_code.rb +3 -3
- data/lib/whop_sdk/models/promo_code_list_response.rb +3 -3
- 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 +14 -0
- data/lib/whop_sdk/resources/access_tokens.rb +46 -0
- data/lib/whop_sdk/resources/app_builds.rb +5 -3
- data/lib/whop_sdk/resources/apps.rb +4 -3
- data/lib/whop_sdk/resources/authorized_users.rb +2 -1
- data/lib/whop_sdk/resources/chat_channels.rb +9 -2
- data/lib/whop_sdk/resources/checkout_configurations.rb +8 -7
- data/lib/whop_sdk/resources/companies.rb +72 -1
- data/lib/whop_sdk/resources/course_chapters.rb +5 -3
- data/lib/whop_sdk/resources/course_lesson_interactions.rb +4 -3
- data/lib/whop_sdk/resources/course_lessons.rb +25 -7
- data/lib/whop_sdk/resources/course_students.rb +77 -0
- data/lib/whop_sdk/resources/courses.rb +24 -7
- data/lib/whop_sdk/resources/entries.rb +6 -3
- data/lib/whop_sdk/resources/experiences.rb +9 -7
- data/lib/whop_sdk/resources/forum_posts.rb +5 -4
- data/lib/whop_sdk/resources/forums.rb +3 -2
- data/lib/whop_sdk/resources/invoices.rb +22 -16
- data/lib/whop_sdk/resources/ledger_accounts.rb +6 -2
- data/lib/whop_sdk/resources/members.rb +6 -5
- data/lib/whop_sdk/resources/memberships.rb +10 -8
- data/lib/whop_sdk/resources/messages.rb +5 -4
- data/lib/whop_sdk/resources/payments.rb +7 -4
- data/lib/whop_sdk/resources/plans.rb +14 -8
- data/lib/whop_sdk/resources/products.rb +10 -8
- data/lib/whop_sdk/resources/promo_codes.rb +4 -2
- data/lib/whop_sdk/resources/reactions.rb +2 -1
- data/lib/whop_sdk/resources/reviews.rb +2 -1
- data/lib/whop_sdk/resources/shipments.rb +2 -1
- data/lib/whop_sdk/resources/support_channels.rb +2 -1
- data/lib/whop_sdk/resources/transfers.rb +5 -2
- data/lib/whop_sdk/resources/users.rb +9 -3
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +14 -1
- data/manifest.yaml +1 -0
- data/rbi/whop_sdk/client.rbi +6 -0
- data/rbi/whop_sdk/internal/transport/base_client.rbi +5 -0
- data/rbi/whop_sdk/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/whop_sdk/internal/type/base_model.rbi +8 -4
- data/rbi/whop_sdk/models/access_level.rbi +1 -1
- data/rbi/whop_sdk/models/access_pass_type.rbi +2 -1
- data/rbi/whop_sdk/models/access_token_create_params.rbi +126 -0
- data/rbi/whop_sdk/models/access_token_create_response.rbi +37 -0
- data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
- data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +196 -68
- 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 +21 -3
- data/rbi/whop_sdk/models/course_create_params.rbi +126 -38
- data/rbi/whop_sdk/models/course_lesson_create_params.rbi +126 -0
- data/rbi/whop_sdk/models/course_lesson_list_response.rbi +68 -0
- data/rbi/whop_sdk/models/course_lesson_update_params.rbi +449 -111
- data/rbi/whop_sdk/models/course_list_response.rbi +21 -3
- 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 +104 -38
- data/rbi/whop_sdk/models/course_visibilities.rbi +23 -0
- data/rbi/whop_sdk/models/embed_type.rbi +20 -0
- data/rbi/whop_sdk/models/entry.rbi +3 -3
- data/rbi/whop_sdk/models/entry_list_response.rbi +3 -3
- data/rbi/whop_sdk/models/experience.rbi +7 -9
- data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
- data/rbi/whop_sdk/models/forum_post.rbi +2 -2
- data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/forum_post_list_response.rbi +2 -2
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
- data/rbi/whop_sdk/models/global_affiliate_status.rbi +1 -1
- data/rbi/whop_sdk/models/invoice_create_params.rbi +60 -46
- data/rbi/whop_sdk/models/invoice_list_params.rbi +26 -71
- data/rbi/whop_sdk/models/lesson.rbi +68 -10
- data/rbi/whop_sdk/models/member_list_params.rbi +10 -10
- data/rbi/whop_sdk/models/member_list_response.rbi +6 -6
- data/rbi/whop_sdk/models/member_retrieve_response.rbi +6 -6
- data/rbi/whop_sdk/models/membership_list_params.rbi +8 -8
- data/rbi/whop_sdk/models/message.rbi +2 -2
- data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/message_list_response.rbi +2 -2
- data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
- data/rbi/whop_sdk/models/payment.rbi +13 -3
- data/rbi/whop_sdk/models/payment_list_response.rbi +13 -3
- data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
- data/rbi/whop_sdk/models/plan.rbi +88 -4
- data/rbi/whop_sdk/models/plan_create_params.rbi +176 -34
- data/rbi/whop_sdk/models/plan_list_response.rbi +100 -4
- data/rbi/whop_sdk/models/plan_type.rbi +1 -1
- data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
- data/rbi/whop_sdk/models/product.rbi +1 -1
- data/rbi/whop_sdk/models/product_create_params.rbi +6 -6
- data/rbi/whop_sdk/models/product_list_item.rbi +1 -1
- data/rbi/whop_sdk/models/product_update_params.rbi +87 -43
- data/rbi/whop_sdk/models/promo_code.rbi +3 -3
- data/rbi/whop_sdk/models/promo_code_list_response.rbi +3 -3
- 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 +14 -0
- data/rbi/whop_sdk/resources/access_tokens.rbi +41 -0
- data/rbi/whop_sdk/resources/app_builds.rbi +15 -3
- data/rbi/whop_sdk/resources/apps.rbi +13 -2
- data/rbi/whop_sdk/resources/authorized_users.rbi +5 -1
- data/rbi/whop_sdk/resources/chat_channels.rbi +8 -1
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +11 -8
- data/rbi/whop_sdk/resources/companies.rbi +68 -1
- data/rbi/whop_sdk/resources/course_chapters.rbi +11 -2
- data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +7 -3
- data/rbi/whop_sdk/resources/course_lessons.rbi +62 -4
- data/rbi/whop_sdk/resources/course_students.rbi +69 -0
- data/rbi/whop_sdk/resources/courses.rbi +50 -4
- data/rbi/whop_sdk/resources/entries.rbi +15 -3
- data/rbi/whop_sdk/resources/experiences.rbi +21 -3
- data/rbi/whop_sdk/resources/forum_posts.rbi +18 -3
- data/rbi/whop_sdk/resources/forums.rbi +6 -1
- data/rbi/whop_sdk/resources/invoices.rbi +38 -23
- data/rbi/whop_sdk/resources/ledger_accounts.rbi +7 -2
- data/rbi/whop_sdk/resources/members.rbi +9 -5
- data/rbi/whop_sdk/resources/memberships.rbi +16 -5
- data/rbi/whop_sdk/resources/messages.rbi +18 -3
- data/rbi/whop_sdk/resources/payments.rbi +16 -3
- data/rbi/whop_sdk/resources/plans.rbi +40 -5
- data/rbi/whop_sdk/resources/products.rbi +21 -7
- data/rbi/whop_sdk/resources/promo_codes.rbi +10 -2
- data/rbi/whop_sdk/resources/reactions.rbi +5 -1
- data/rbi/whop_sdk/resources/reviews.rbi +5 -1
- data/rbi/whop_sdk/resources/shipments.rbi +5 -1
- data/rbi/whop_sdk/resources/support_channels.rbi +5 -1
- data/rbi/whop_sdk/resources/transfers.rbi +8 -1
- data/rbi/whop_sdk/resources/users.rbi +13 -2
- data/sig/whop_sdk/client.rbs +4 -0
- data/sig/whop_sdk/internal/transport/base_client.rbs +2 -0
- data/sig/whop_sdk/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/whop_sdk/models/access_token_create_params.rbs +56 -0
- data/sig/whop_sdk/models/access_token_create_response.rbs +15 -0
- data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
- data/sig/whop_sdk/models/app_update_params.rbs +29 -10
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
- data/sig/whop_sdk/models/company.rbs +5 -0
- data/sig/whop_sdk/models/company_create_params.rbs +41 -0
- data/sig/whop_sdk/models/company_list_params.rbs +51 -0
- data/sig/whop_sdk/models/company_list_response.rbs +109 -0
- data/sig/whop_sdk/models/course.rbs +13 -3
- data/sig/whop_sdk/models/course_create_params.rbs +49 -10
- data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
- data/sig/whop_sdk/models/course_lesson_list_response.rbs +25 -0
- data/sig/whop_sdk/models/course_lesson_update_params.rbs +162 -30
- data/sig/whop_sdk/models/course_list_response.rbs +13 -3
- 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 +40 -11
- data/sig/whop_sdk/models/course_visibilities.rbs +14 -0
- data/sig/whop_sdk/models/embed_type.rbs +14 -0
- data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
- data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
- data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
- data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
- data/sig/whop_sdk/models/invoice_list_params.rbs +16 -33
- data/sig/whop_sdk/models/lesson.rbs +33 -8
- data/sig/whop_sdk/models/member_list_params.rbs +5 -5
- data/sig/whop_sdk/models/membership_list_params.rbs +5 -5
- data/sig/whop_sdk/models/message_create_params.rbs +29 -10
- data/sig/whop_sdk/models/message_update_params.rbs +29 -10
- data/sig/whop_sdk/models/payment.rbs +5 -0
- data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
- data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
- data/sig/whop_sdk/models/plan.rbs +32 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
- data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
- data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
- data/sig/whop_sdk/models/product_update_params.rbs +29 -10
- data/sig/whop_sdk/models/transfer.rbs +5 -0
- data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
- data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
- data/sig/whop_sdk/models.rbs +14 -0
- data/sig/whop_sdk/resources/access_tokens.rbs +15 -0
- data/sig/whop_sdk/resources/app_builds.rbs +1 -1
- data/sig/whop_sdk/resources/apps.rbs +1 -1
- data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
- data/sig/whop_sdk/resources/companies.rbs +18 -0
- data/sig/whop_sdk/resources/course_lessons.rbs +10 -2
- data/sig/whop_sdk/resources/course_students.rbs +22 -0
- data/sig/whop_sdk/resources/courses.rbs +8 -2
- data/sig/whop_sdk/resources/experiences.rbs +1 -1
- data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
- data/sig/whop_sdk/resources/invoices.rbs +8 -6
- data/sig/whop_sdk/resources/members.rbs +1 -1
- data/sig/whop_sdk/resources/memberships.rbs +1 -1
- data/sig/whop_sdk/resources/messages.rbs +2 -2
- data/sig/whop_sdk/resources/plans.rbs +4 -2
- data/sig/whop_sdk/resources/products.rbs +1 -1
- data/sig/whop_sdk/resources/transfers.rbs +1 -0
- metadata +41 -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
|
@@ -15,7 +15,7 @@ module WhopSDK
|
|
|
15
15
|
#
|
|
16
16
|
# @param content [String] The content of the message in Markdown format.
|
|
17
17
|
#
|
|
18
|
-
# @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment>, nil] The attachments for this message, such as videos or images.
|
|
18
|
+
# @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message, such as videos or images.
|
|
19
19
|
#
|
|
20
20
|
# @param poll [WhopSDK::Models::MessageCreateParams::Poll, nil] The poll for this message
|
|
21
21
|
#
|
|
@@ -43,7 +43,8 @@ module WhopSDK
|
|
|
43
43
|
#
|
|
44
44
|
# @overload retrieve(id, request_options: {})
|
|
45
45
|
#
|
|
46
|
-
# @param id [String]
|
|
46
|
+
# @param id [String] The ID of the message
|
|
47
|
+
#
|
|
47
48
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
48
49
|
#
|
|
49
50
|
# @return [WhopSDK::Models::Message]
|
|
@@ -62,9 +63,9 @@ module WhopSDK
|
|
|
62
63
|
#
|
|
63
64
|
# @overload update(id, attachments: nil, content: nil, is_pinned: nil, request_options: {})
|
|
64
65
|
#
|
|
65
|
-
# @param id [String]
|
|
66
|
+
# @param id [String] The ID of the message to update
|
|
66
67
|
#
|
|
67
|
-
# @param attachments [Array<WhopSDK::Models::MessageUpdateParams::Attachment>, nil] The attachments for this message
|
|
68
|
+
# @param attachments [Array<WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message
|
|
68
69
|
#
|
|
69
70
|
# @param content [String, nil] The content of the message in Markdown format
|
|
70
71
|
#
|
|
@@ -17,7 +17,8 @@ module WhopSDK
|
|
|
17
17
|
#
|
|
18
18
|
# @overload retrieve(id, request_options: {})
|
|
19
19
|
#
|
|
20
|
-
# @param id [String]
|
|
20
|
+
# @param id [String] The ID of the payment
|
|
21
|
+
#
|
|
21
22
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
22
23
|
#
|
|
23
24
|
# @return [WhopSDK::Models::Payment]
|
|
@@ -109,7 +110,7 @@ module WhopSDK
|
|
|
109
110
|
#
|
|
110
111
|
# @overload refund(id, partial_amount: nil, request_options: {})
|
|
111
112
|
#
|
|
112
|
-
# @param id [String]
|
|
113
|
+
# @param id [String] The ID of the payment you want to update or take action upon.
|
|
113
114
|
#
|
|
114
115
|
# @param partial_amount [Float, nil] An amount if the refund is supposed to be partial.
|
|
115
116
|
#
|
|
@@ -143,7 +144,8 @@ module WhopSDK
|
|
|
143
144
|
#
|
|
144
145
|
# @overload retry_(id, request_options: {})
|
|
145
146
|
#
|
|
146
|
-
# @param id [String]
|
|
147
|
+
# @param id [String] The ID of the payment
|
|
148
|
+
#
|
|
147
149
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
148
150
|
#
|
|
149
151
|
# @return [WhopSDK::Models::Payment]
|
|
@@ -172,7 +174,8 @@ module WhopSDK
|
|
|
172
174
|
#
|
|
173
175
|
# @overload void(id, request_options: {})
|
|
174
176
|
#
|
|
175
|
-
# @param id [String]
|
|
177
|
+
# @param id [String] The ID of the payment you want to void.
|
|
178
|
+
#
|
|
176
179
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
177
180
|
#
|
|
178
181
|
# @return [WhopSDK::Models::Payment]
|
|
@@ -14,7 +14,7 @@ module WhopSDK
|
|
|
14
14
|
# - `access_pass:basic:read`
|
|
15
15
|
# - `plan:basic:read`
|
|
16
16
|
#
|
|
17
|
-
# @overload create(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
|
|
17
|
+
# @overload create(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
|
|
18
18
|
#
|
|
19
19
|
# @param company_id [String] The company the plan should be created for.
|
|
20
20
|
#
|
|
@@ -30,7 +30,7 @@ module WhopSDK
|
|
|
30
30
|
#
|
|
31
31
|
# @param expiration_days [Integer, nil] The interval at which the plan charges (expiration plans).
|
|
32
32
|
#
|
|
33
|
-
# @param image [WhopSDK::Models::PlanCreateParams::Image, nil] An image for the plan. This will be visible on the product page to customers.
|
|
33
|
+
# @param image [WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers.
|
|
34
34
|
#
|
|
35
35
|
# @param initial_price [Float, nil] An additional amount charged upon first purchase. Use only if a one time payment
|
|
36
36
|
#
|
|
@@ -38,7 +38,9 @@ module WhopSDK
|
|
|
38
38
|
#
|
|
39
39
|
# @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u
|
|
40
40
|
#
|
|
41
|
-
# @param
|
|
41
|
+
# @param payment_method_configuration [WhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration, nil] The explicit payment method configuration for the plan. If not provided, the pla
|
|
42
|
+
#
|
|
43
|
+
# @param plan_type [Symbol, WhopSDK::Models::PlanType, nil] The type of plan that can be attached to a product
|
|
42
44
|
#
|
|
43
45
|
# @param release_method [Symbol, WhopSDK::Models::ReleaseMethod, nil] The methods of how a plan can be released.
|
|
44
46
|
#
|
|
@@ -76,7 +78,8 @@ module WhopSDK
|
|
|
76
78
|
#
|
|
77
79
|
# @overload retrieve(id, request_options: {})
|
|
78
80
|
#
|
|
79
|
-
# @param id [String]
|
|
81
|
+
# @param id [String] The ID of the plan
|
|
82
|
+
#
|
|
80
83
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
81
84
|
#
|
|
82
85
|
# @return [WhopSDK::Models::Plan]
|
|
@@ -102,9 +105,9 @@ module WhopSDK
|
|
|
102
105
|
# - `access_pass:basic:read`
|
|
103
106
|
# - `plan:basic:read`
|
|
104
107
|
#
|
|
105
|
-
# @overload update(id, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, offer_cancel_discount: nil, override_tax_type: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
|
|
108
|
+
# @overload update(id, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, offer_cancel_discount: nil, override_tax_type: nil, payment_method_configuration: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
|
|
106
109
|
#
|
|
107
|
-
# @param id [String]
|
|
110
|
+
# @param id [String] The ID
|
|
108
111
|
#
|
|
109
112
|
# @param billing_period [Integer, nil] The interval at which the plan charges (renewal plans).
|
|
110
113
|
#
|
|
@@ -116,7 +119,7 @@ module WhopSDK
|
|
|
116
119
|
#
|
|
117
120
|
# @param expiration_days [Integer, nil] The interval at which the plan charges (expiration plans).
|
|
118
121
|
#
|
|
119
|
-
# @param image [WhopSDK::Models::PlanUpdateParams::Image, nil] An image for the plan. This will be visible on the product page to customers.
|
|
122
|
+
# @param image [WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers.
|
|
120
123
|
#
|
|
121
124
|
# @param initial_price [Float, nil] An additional amount charged upon first purchase.
|
|
122
125
|
#
|
|
@@ -126,6 +129,8 @@ module WhopSDK
|
|
|
126
129
|
#
|
|
127
130
|
# @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u
|
|
128
131
|
#
|
|
132
|
+
# @param payment_method_configuration [WhopSDK::Models::PlanUpdateParams::PaymentMethodConfiguration, nil] The explicit payment method configuration for the plan. If sent as null, the cus
|
|
133
|
+
#
|
|
129
134
|
# @param renewal_price [Float, nil] The amount the customer is charged every billing period.
|
|
130
135
|
#
|
|
131
136
|
# @param stock [Integer, nil] The number of units available for purchase.
|
|
@@ -213,7 +218,8 @@ module WhopSDK
|
|
|
213
218
|
#
|
|
214
219
|
# @overload delete(id, request_options: {})
|
|
215
220
|
#
|
|
216
|
-
# @param id [String]
|
|
221
|
+
# @param id [String] The ID of the plan to delete.
|
|
222
|
+
#
|
|
217
223
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
218
224
|
#
|
|
219
225
|
# @return [Boolean]
|
|
@@ -36,7 +36,7 @@ module WhopSDK
|
|
|
36
36
|
#
|
|
37
37
|
# @param global_affiliate_percentage [Float, nil] The percentage of the revenue that goes to the global affiliate program.
|
|
38
38
|
#
|
|
39
|
-
# @param global_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for
|
|
39
|
+
# @param global_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for a product.
|
|
40
40
|
#
|
|
41
41
|
# @param headline [String, nil] The headline of the product.
|
|
42
42
|
#
|
|
@@ -44,7 +44,7 @@ module WhopSDK
|
|
|
44
44
|
#
|
|
45
45
|
# @param member_affiliate_percentage [Float, nil] The percentage of the revenue that goes to the member affiliate program.
|
|
46
46
|
#
|
|
47
|
-
# @param member_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for
|
|
47
|
+
# @param member_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for a product.
|
|
48
48
|
#
|
|
49
49
|
# @param plan_options [WhopSDK::Models::ProductCreateParams::PlanOptions, nil] The details to assign an autogenerated plan.
|
|
50
50
|
#
|
|
@@ -82,7 +82,8 @@ module WhopSDK
|
|
|
82
82
|
#
|
|
83
83
|
# @overload retrieve(id, request_options: {})
|
|
84
84
|
#
|
|
85
|
-
# @param id [String]
|
|
85
|
+
# @param id [String] The ID or route of the product
|
|
86
|
+
#
|
|
86
87
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
87
88
|
#
|
|
88
89
|
# @return [WhopSDK::Models::Product]
|
|
@@ -109,9 +110,9 @@ module WhopSDK
|
|
|
109
110
|
#
|
|
110
111
|
# @overload update(id, banner_image: nil, business_type: nil, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, industry_type: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, store_page_config: nil, title: nil, visibility: nil, request_options: {})
|
|
111
112
|
#
|
|
112
|
-
# @param id [String]
|
|
113
|
+
# @param id [String] The ID (tag) of the product
|
|
113
114
|
#
|
|
114
|
-
# @param banner_image [WhopSDK::Models::ProductUpdateParams::BannerImage, nil] A banner image for the product in png, jpeg format
|
|
115
|
+
# @param banner_image [WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID, nil] A banner image for the product in png, jpeg format
|
|
115
116
|
#
|
|
116
117
|
# @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
|
|
117
118
|
#
|
|
@@ -128,7 +129,7 @@ module WhopSDK
|
|
|
128
129
|
#
|
|
129
130
|
# @param global_affiliate_percentage [Float, nil] The percentage of the revenue that goes to the global affiliate program.
|
|
130
131
|
#
|
|
131
|
-
# @param global_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for
|
|
132
|
+
# @param global_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for a product.
|
|
132
133
|
#
|
|
133
134
|
# @param headline [String, nil] The headline of the product.
|
|
134
135
|
#
|
|
@@ -136,7 +137,7 @@ module WhopSDK
|
|
|
136
137
|
#
|
|
137
138
|
# @param member_affiliate_percentage [Float, nil] The percentage of the revenue that goes to the member affiliate program.
|
|
138
139
|
#
|
|
139
|
-
# @param member_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for
|
|
140
|
+
# @param member_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for a product.
|
|
140
141
|
#
|
|
141
142
|
# @param product_tax_code_id [String, nil] The ID of the product tax code to apply to this product.
|
|
142
143
|
#
|
|
@@ -217,7 +218,8 @@ module WhopSDK
|
|
|
217
218
|
#
|
|
218
219
|
# @overload delete(id, request_options: {})
|
|
219
220
|
#
|
|
220
|
-
# @param id [String]
|
|
221
|
+
# @param id [String] The internal ID (tag) of the product to delete.
|
|
222
|
+
#
|
|
221
223
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
222
224
|
#
|
|
223
225
|
# @return [Boolean]
|
|
@@ -70,7 +70,8 @@ module WhopSDK
|
|
|
70
70
|
#
|
|
71
71
|
# @overload retrieve(id, request_options: {})
|
|
72
72
|
#
|
|
73
|
-
# @param id [String]
|
|
73
|
+
# @param id [String] The ID of the promo code to retrieve
|
|
74
|
+
#
|
|
74
75
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
75
76
|
#
|
|
76
77
|
# @return [WhopSDK::Models::PromoCode]
|
|
@@ -135,7 +136,8 @@ module WhopSDK
|
|
|
135
136
|
#
|
|
136
137
|
# @overload delete(id, request_options: {})
|
|
137
138
|
#
|
|
138
|
-
# @param id [String]
|
|
139
|
+
# @param id [String] The internal ID of the promo code to archive.
|
|
140
|
+
#
|
|
139
141
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
140
142
|
#
|
|
141
143
|
# @return [Boolean]
|
|
@@ -42,7 +42,8 @@ module WhopSDK
|
|
|
42
42
|
#
|
|
43
43
|
# @overload retrieve(id, request_options: {})
|
|
44
44
|
#
|
|
45
|
-
# @param id [String]
|
|
45
|
+
# @param id [String] The ID of the reaction
|
|
46
|
+
#
|
|
46
47
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
47
48
|
#
|
|
48
49
|
# @return [WhopSDK::Models::Reaction]
|
|
@@ -7,7 +7,8 @@ module WhopSDK
|
|
|
7
7
|
#
|
|
8
8
|
# @overload retrieve(id, request_options: {})
|
|
9
9
|
#
|
|
10
|
-
# @param id [String]
|
|
10
|
+
# @param id [String] The ID of the review
|
|
11
|
+
#
|
|
11
12
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
12
13
|
#
|
|
13
14
|
# @return [WhopSDK::Models::ReviewRetrieveResponse]
|
|
@@ -43,7 +43,8 @@ module WhopSDK
|
|
|
43
43
|
#
|
|
44
44
|
# @overload retrieve(id, request_options: {})
|
|
45
45
|
#
|
|
46
|
-
# @param id [String]
|
|
46
|
+
# @param id [String] The ID of the shipment
|
|
47
|
+
#
|
|
47
48
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
48
49
|
#
|
|
49
50
|
# @return [WhopSDK::Models::Shipment]
|
|
@@ -40,7 +40,8 @@ module WhopSDK
|
|
|
40
40
|
#
|
|
41
41
|
# @overload retrieve(id, request_options: {})
|
|
42
42
|
#
|
|
43
|
-
# @param id [String]
|
|
43
|
+
# @param id [String] The ID of the support channel to fetch
|
|
44
|
+
#
|
|
44
45
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
45
46
|
#
|
|
46
47
|
# @return [WhopSDK::Models::SupportChannel]
|
|
@@ -12,7 +12,7 @@ module WhopSDK
|
|
|
12
12
|
#
|
|
13
13
|
# - `payout:transfer_funds`
|
|
14
14
|
#
|
|
15
|
-
# @overload create(amount:, currency:, destination_id:, origin_id:, idempotence_key: nil, notes: nil, request_options: {})
|
|
15
|
+
# @overload create(amount:, currency:, destination_id:, origin_id:, idempotence_key: nil, metadata: nil, notes: nil, request_options: {})
|
|
16
16
|
#
|
|
17
17
|
# @param amount [Float] The amount to withdraw
|
|
18
18
|
#
|
|
@@ -24,6 +24,8 @@ module WhopSDK
|
|
|
24
24
|
#
|
|
25
25
|
# @param idempotence_key [String, nil] A unique key to ensure idempotence. Use a UUID or similar.
|
|
26
26
|
#
|
|
27
|
+
# @param metadata [Hash{Symbol=>Object}, nil] A hash of metadata to attach to the transfer.
|
|
28
|
+
#
|
|
27
29
|
# @param notes [String, nil] Notes for the transfer. Maximum of 50 characters.
|
|
28
30
|
#
|
|
29
31
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
@@ -50,7 +52,8 @@ module WhopSDK
|
|
|
50
52
|
#
|
|
51
53
|
# @overload retrieve(id, request_options: {})
|
|
52
54
|
#
|
|
53
|
-
# @param id [String]
|
|
55
|
+
# @param id [String] The ID of the transfer
|
|
56
|
+
#
|
|
54
57
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
55
58
|
#
|
|
56
59
|
# @return [WhopSDK::Models::Transfer]
|
|
@@ -7,7 +7,8 @@ module WhopSDK
|
|
|
7
7
|
#
|
|
8
8
|
# @overload retrieve(id, request_options: {})
|
|
9
9
|
#
|
|
10
|
-
# @param id [String]
|
|
10
|
+
# @param id [String] The ID (user_xxx) or username of the user
|
|
11
|
+
#
|
|
11
12
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
12
13
|
#
|
|
13
14
|
# @return [WhopSDK::Models::UserRetrieveResponse]
|
|
@@ -22,12 +23,17 @@ module WhopSDK
|
|
|
22
23
|
)
|
|
23
24
|
end
|
|
24
25
|
|
|
26
|
+
# Some parameter documentations has been truncated, see
|
|
27
|
+
# {WhopSDK::Models::UserCheckAccessParams} for more details.
|
|
28
|
+
#
|
|
25
29
|
# Check if a user has access (and their access level) to a resource
|
|
26
30
|
#
|
|
27
31
|
# @overload check_access(resource_id, id:, request_options: {})
|
|
28
32
|
#
|
|
29
|
-
# @param resource_id [String]
|
|
30
|
-
#
|
|
33
|
+
# @param resource_id [String] The ID of the resource. Can be a company (biz_xxx), product (prod_xxx), or exper
|
|
34
|
+
#
|
|
35
|
+
# @param id [String] The ID (user_xxx) or username of the user
|
|
36
|
+
#
|
|
31
37
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
32
38
|
#
|
|
33
39
|
# @return [WhopSDK::Models::UserCheckAccessResponse]
|
data/lib/whop_sdk/version.rb
CHANGED
data/lib/whop_sdk.rb
CHANGED
|
@@ -9,6 +9,7 @@ require "erb"
|
|
|
9
9
|
require "etc"
|
|
10
10
|
require "json"
|
|
11
11
|
require "net/http"
|
|
12
|
+
require "openssl"
|
|
12
13
|
require "pathname"
|
|
13
14
|
require "rbconfig"
|
|
14
15
|
require "securerandom"
|
|
@@ -53,6 +54,8 @@ require_relative "whop_sdk/client"
|
|
|
53
54
|
require_relative "whop_sdk/internal/cursor_page"
|
|
54
55
|
require_relative "whop_sdk/models/access_level"
|
|
55
56
|
require_relative "whop_sdk/models/access_pass_type"
|
|
57
|
+
require_relative "whop_sdk/models/access_token_create_params"
|
|
58
|
+
require_relative "whop_sdk/models/access_token_create_response"
|
|
56
59
|
require_relative "whop_sdk/models/app"
|
|
57
60
|
require_relative "whop_sdk/models/app_build"
|
|
58
61
|
require_relative "whop_sdk/models/app_build_create_params"
|
|
@@ -90,6 +93,9 @@ require_relative "whop_sdk/models/checkout_configuration_list_response"
|
|
|
90
93
|
require_relative "whop_sdk/models/checkout_configuration_retrieve_params"
|
|
91
94
|
require_relative "whop_sdk/models/collection_method"
|
|
92
95
|
require_relative "whop_sdk/models/company"
|
|
96
|
+
require_relative "whop_sdk/models/company_create_params"
|
|
97
|
+
require_relative "whop_sdk/models/company_list_params"
|
|
98
|
+
require_relative "whop_sdk/models/company_list_response"
|
|
93
99
|
require_relative "whop_sdk/models/company_retrieve_params"
|
|
94
100
|
require_relative "whop_sdk/models/course"
|
|
95
101
|
require_relative "whop_sdk/models/course_chapter"
|
|
@@ -118,12 +124,18 @@ require_relative "whop_sdk/models/course_lesson_update_params"
|
|
|
118
124
|
require_relative "whop_sdk/models/course_list_params"
|
|
119
125
|
require_relative "whop_sdk/models/course_list_response"
|
|
120
126
|
require_relative "whop_sdk/models/course_retrieve_params"
|
|
127
|
+
require_relative "whop_sdk/models/course_student_list_params"
|
|
128
|
+
require_relative "whop_sdk/models/course_student_list_response"
|
|
129
|
+
require_relative "whop_sdk/models/course_student_retrieve_params"
|
|
130
|
+
require_relative "whop_sdk/models/course_student_retrieve_response"
|
|
121
131
|
require_relative "whop_sdk/models/course_update_params"
|
|
132
|
+
require_relative "whop_sdk/models/course_visibilities"
|
|
122
133
|
require_relative "whop_sdk/models/currency"
|
|
123
134
|
require_relative "whop_sdk/models/custom_cta"
|
|
124
135
|
require_relative "whop_sdk/models/direction"
|
|
125
136
|
require_relative "whop_sdk/models/dms_post_types"
|
|
126
137
|
require_relative "whop_sdk/models/email_notification_preferences"
|
|
138
|
+
require_relative "whop_sdk/models/embed_type"
|
|
127
139
|
require_relative "whop_sdk/models/entry"
|
|
128
140
|
require_relative "whop_sdk/models/entry_approved_webhook_event"
|
|
129
141
|
require_relative "whop_sdk/models/entry_approve_params"
|
|
@@ -164,7 +176,6 @@ require_relative "whop_sdk/models/industry_types"
|
|
|
164
176
|
require_relative "whop_sdk/models/invoice"
|
|
165
177
|
require_relative "whop_sdk/models/invoice_created_webhook_event"
|
|
166
178
|
require_relative "whop_sdk/models/invoice_create_params"
|
|
167
|
-
require_relative "whop_sdk/models/invoice_create_response"
|
|
168
179
|
require_relative "whop_sdk/models/invoice_list_item"
|
|
169
180
|
require_relative "whop_sdk/models/invoice_list_params"
|
|
170
181
|
require_relative "whop_sdk/models/invoice_paid_webhook_event"
|
|
@@ -286,6 +297,7 @@ require_relative "whop_sdk/models/who_can_post"
|
|
|
286
297
|
require_relative "whop_sdk/models/who_can_post_types"
|
|
287
298
|
require_relative "whop_sdk/models/who_can_react"
|
|
288
299
|
require_relative "whop_sdk/models"
|
|
300
|
+
require_relative "whop_sdk/resources/access_tokens"
|
|
289
301
|
require_relative "whop_sdk/resources/app_builds"
|
|
290
302
|
require_relative "whop_sdk/resources/apps"
|
|
291
303
|
require_relative "whop_sdk/resources/authorized_users"
|
|
@@ -296,6 +308,7 @@ require_relative "whop_sdk/resources/course_chapters"
|
|
|
296
308
|
require_relative "whop_sdk/resources/course_lesson_interactions"
|
|
297
309
|
require_relative "whop_sdk/resources/course_lessons"
|
|
298
310
|
require_relative "whop_sdk/resources/courses"
|
|
311
|
+
require_relative "whop_sdk/resources/course_students"
|
|
299
312
|
require_relative "whop_sdk/resources/entries"
|
|
300
313
|
require_relative "whop_sdk/resources/experiences"
|
|
301
314
|
require_relative "whop_sdk/resources/forum_posts"
|
data/manifest.yaml
CHANGED
data/rbi/whop_sdk/client.rbi
CHANGED
|
@@ -107,6 +107,12 @@ module WhopSDK
|
|
|
107
107
|
sig { returns(WhopSDK::Resources::Reviews) }
|
|
108
108
|
attr_reader :reviews
|
|
109
109
|
|
|
110
|
+
sig { returns(WhopSDK::Resources::CourseStudents) }
|
|
111
|
+
attr_reader :course_students
|
|
112
|
+
|
|
113
|
+
sig { returns(WhopSDK::Resources::AccessTokens) }
|
|
114
|
+
attr_reader :access_tokens
|
|
115
|
+
|
|
110
116
|
# @api private
|
|
111
117
|
sig { override.returns(T::Hash[String, String]) }
|
|
112
118
|
private def auth_headers
|
|
@@ -26,8 +26,12 @@ module WhopSDK
|
|
|
26
26
|
|
|
27
27
|
class << self
|
|
28
28
|
# @api private
|
|
29
|
-
sig
|
|
30
|
-
|
|
29
|
+
sig do
|
|
30
|
+
params(cert_store: OpenSSL::X509::Store, url: URI::Generic).returns(
|
|
31
|
+
Net::HTTP
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def connect(cert_store:, url:)
|
|
31
35
|
end
|
|
32
36
|
|
|
33
37
|
# @api private
|
|
@@ -31,7 +31,7 @@ module WhopSDK
|
|
|
31
31
|
#
|
|
32
32
|
# Assumes superclass fields are totally defined before fields are accessed /
|
|
33
33
|
# defined on subclasses.
|
|
34
|
-
sig { params(child:
|
|
34
|
+
sig { params(child: WhopSDK::Internal::Type::BaseModel).void }
|
|
35
35
|
def inherited(child)
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -274,9 +274,13 @@ module WhopSDK
|
|
|
274
274
|
|
|
275
275
|
# Create a new instance of a model.
|
|
276
276
|
sig do
|
|
277
|
-
params(
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
params(
|
|
278
|
+
data:
|
|
279
|
+
T.any(
|
|
280
|
+
T::Hash[Symbol, T.anything],
|
|
281
|
+
WhopSDK::Internal::Type::BaseModel
|
|
282
|
+
)
|
|
283
|
+
).returns(T.attached_class)
|
|
280
284
|
end
|
|
281
285
|
def self.new(data = {})
|
|
282
286
|
end
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class AccessTokenCreateParams < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(WhopSDK::AccessTokenCreateParams, WhopSDK::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Array of desired scoped actions for the access token. This list must be a subset
|
|
15
|
+
# of the API keys's existing permissions. Otherwise, an error will be raised.
|
|
16
|
+
sig { returns(T::Array[String]) }
|
|
17
|
+
attr_accessor :scoped_actions
|
|
18
|
+
|
|
19
|
+
# The ID of the target resource (Company, User, etc.) for which the access token
|
|
20
|
+
# is being created.
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :target_resource_id
|
|
23
|
+
|
|
24
|
+
# The type of the target resource (company, user, product, experience, etc.).
|
|
25
|
+
sig do
|
|
26
|
+
returns(WhopSDK::AccessTokenCreateParams::TargetResourceType::OrSymbol)
|
|
27
|
+
end
|
|
28
|
+
attr_accessor :target_resource_type
|
|
29
|
+
|
|
30
|
+
# The expiration timestamp for the access token. If not provided, a default
|
|
31
|
+
# expiration time of 1 hour will be used. The expiration can be set to a maximum
|
|
32
|
+
# of 3 hours from the current time.
|
|
33
|
+
sig { returns(T.nilable(Time)) }
|
|
34
|
+
attr_accessor :expires_at
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
scoped_actions: T::Array[String],
|
|
39
|
+
target_resource_id: String,
|
|
40
|
+
target_resource_type:
|
|
41
|
+
WhopSDK::AccessTokenCreateParams::TargetResourceType::OrSymbol,
|
|
42
|
+
expires_at: T.nilable(Time),
|
|
43
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
44
|
+
).returns(T.attached_class)
|
|
45
|
+
end
|
|
46
|
+
def self.new(
|
|
47
|
+
# Array of desired scoped actions for the access token. This list must be a subset
|
|
48
|
+
# of the API keys's existing permissions. Otherwise, an error will be raised.
|
|
49
|
+
scoped_actions:,
|
|
50
|
+
# The ID of the target resource (Company, User, etc.) for which the access token
|
|
51
|
+
# is being created.
|
|
52
|
+
target_resource_id:,
|
|
53
|
+
# The type of the target resource (company, user, product, experience, etc.).
|
|
54
|
+
target_resource_type:,
|
|
55
|
+
# The expiration timestamp for the access token. If not provided, a default
|
|
56
|
+
# expiration time of 1 hour will be used. The expiration can be set to a maximum
|
|
57
|
+
# of 3 hours from the current time.
|
|
58
|
+
expires_at: nil,
|
|
59
|
+
request_options: {}
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
sig do
|
|
64
|
+
override.returns(
|
|
65
|
+
{
|
|
66
|
+
scoped_actions: T::Array[String],
|
|
67
|
+
target_resource_id: String,
|
|
68
|
+
target_resource_type:
|
|
69
|
+
WhopSDK::AccessTokenCreateParams::TargetResourceType::OrSymbol,
|
|
70
|
+
expires_at: T.nilable(Time),
|
|
71
|
+
request_options: WhopSDK::RequestOptions
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
def to_hash
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# The type of the target resource (company, user, product, experience, etc.).
|
|
79
|
+
module TargetResourceType
|
|
80
|
+
extend WhopSDK::Internal::Type::Enum
|
|
81
|
+
|
|
82
|
+
TaggedSymbol =
|
|
83
|
+
T.type_alias do
|
|
84
|
+
T.all(Symbol, WhopSDK::AccessTokenCreateParams::TargetResourceType)
|
|
85
|
+
end
|
|
86
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
87
|
+
|
|
88
|
+
COMPANY =
|
|
89
|
+
T.let(
|
|
90
|
+
:company,
|
|
91
|
+
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
92
|
+
)
|
|
93
|
+
PRODUCT =
|
|
94
|
+
T.let(
|
|
95
|
+
:product,
|
|
96
|
+
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
97
|
+
)
|
|
98
|
+
EXPERIENCE =
|
|
99
|
+
T.let(
|
|
100
|
+
:experience,
|
|
101
|
+
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
102
|
+
)
|
|
103
|
+
APP =
|
|
104
|
+
T.let(
|
|
105
|
+
:app,
|
|
106
|
+
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
107
|
+
)
|
|
108
|
+
USER =
|
|
109
|
+
T.let(
|
|
110
|
+
:user,
|
|
111
|
+
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
sig do
|
|
115
|
+
override.returns(
|
|
116
|
+
T::Array[
|
|
117
|
+
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
118
|
+
]
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
def self.values
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|