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
|
@@ -21,7 +21,16 @@ module WhopSDK
|
|
|
21
21
|
|
|
22
22
|
# The attachments for this message, such as videos or images.
|
|
23
23
|
sig do
|
|
24
|
-
returns(
|
|
24
|
+
returns(
|
|
25
|
+
T.nilable(
|
|
26
|
+
T::Array[
|
|
27
|
+
T.any(
|
|
28
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
29
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID
|
|
30
|
+
)
|
|
31
|
+
]
|
|
32
|
+
)
|
|
33
|
+
)
|
|
25
34
|
end
|
|
26
35
|
attr_accessor :attachments
|
|
27
36
|
|
|
@@ -40,7 +49,12 @@ module WhopSDK
|
|
|
40
49
|
content: String,
|
|
41
50
|
attachments:
|
|
42
51
|
T.nilable(
|
|
43
|
-
T::Array[
|
|
52
|
+
T::Array[
|
|
53
|
+
T.any(
|
|
54
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
|
|
55
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID::OrHash
|
|
56
|
+
)
|
|
57
|
+
]
|
|
44
58
|
),
|
|
45
59
|
poll: T.nilable(WhopSDK::MessageCreateParams::Poll::OrHash),
|
|
46
60
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
@@ -65,7 +79,14 @@ module WhopSDK
|
|
|
65
79
|
channel_id: String,
|
|
66
80
|
content: String,
|
|
67
81
|
attachments:
|
|
68
|
-
T.nilable(
|
|
82
|
+
T.nilable(
|
|
83
|
+
T::Array[
|
|
84
|
+
T.any(
|
|
85
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
86
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
),
|
|
69
90
|
poll: T.nilable(WhopSDK::MessageCreateParams::Poll),
|
|
70
91
|
request_options: WhopSDK::RequestOptions
|
|
71
92
|
}
|
|
@@ -74,52 +95,84 @@ module WhopSDK
|
|
|
74
95
|
def to_hash
|
|
75
96
|
end
|
|
76
97
|
|
|
77
|
-
|
|
78
|
-
|
|
98
|
+
# Input for an attachment
|
|
99
|
+
module Attachment
|
|
100
|
+
extend WhopSDK::Internal::Type::Union
|
|
101
|
+
|
|
102
|
+
Variants =
|
|
79
103
|
T.type_alias do
|
|
80
104
|
T.any(
|
|
81
|
-
WhopSDK::MessageCreateParams::Attachment,
|
|
82
|
-
WhopSDK::
|
|
105
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
106
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID
|
|
83
107
|
)
|
|
84
108
|
end
|
|
85
109
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
110
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
111
|
+
OrHash =
|
|
112
|
+
T.type_alias do
|
|
113
|
+
T.any(
|
|
114
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
115
|
+
WhopSDK::Internal::AnyHash
|
|
116
|
+
)
|
|
117
|
+
end
|
|
91
118
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
119
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
120
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
121
|
+
# mediaDirectUpload mutation.
|
|
122
|
+
sig { returns(String) }
|
|
123
|
+
attr_accessor :direct_upload_id
|
|
97
124
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
125
|
+
# Input for an attachment
|
|
126
|
+
sig { params(direct_upload_id: String).returns(T.attached_class) }
|
|
127
|
+
def self.new(
|
|
128
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
129
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
130
|
+
# mediaDirectUpload mutation.
|
|
131
|
+
direct_upload_id:
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
sig { override.returns({ direct_upload_id: String }) }
|
|
136
|
+
def to_hash
|
|
137
|
+
end
|
|
104
138
|
end
|
|
105
|
-
|
|
139
|
+
|
|
140
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
141
|
+
OrHash =
|
|
142
|
+
T.type_alias do
|
|
143
|
+
T.any(
|
|
144
|
+
WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID,
|
|
145
|
+
WhopSDK::Internal::AnyHash
|
|
146
|
+
)
|
|
147
|
+
end
|
|
148
|
+
|
|
106
149
|
# The ID of an existing attachment object. Use this when updating a resource and
|
|
107
150
|
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
108
151
|
# doing.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
#
|
|
113
|
-
|
|
114
|
-
|
|
152
|
+
sig { returns(String) }
|
|
153
|
+
attr_accessor :id
|
|
154
|
+
|
|
155
|
+
# Input for an attachment
|
|
156
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
157
|
+
def self.new(
|
|
158
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
159
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
160
|
+
# doing.
|
|
161
|
+
id:
|
|
162
|
+
)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
sig { override.returns({ id: String }) }
|
|
166
|
+
def to_hash
|
|
167
|
+
end
|
|
115
168
|
end
|
|
116
169
|
|
|
117
170
|
sig do
|
|
118
171
|
override.returns(
|
|
119
|
-
|
|
172
|
+
T::Array[WhopSDK::MessageCreateParams::Attachment::Variants]
|
|
120
173
|
)
|
|
121
174
|
end
|
|
122
|
-
def
|
|
175
|
+
def self.variants
|
|
123
176
|
end
|
|
124
177
|
end
|
|
125
178
|
|
|
@@ -11,7 +11,7 @@ module WhopSDK
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# The unique identifier
|
|
14
|
+
# The unique identifier of the resource.
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :id
|
|
17
17
|
|
|
@@ -100,7 +100,7 @@ module WhopSDK
|
|
|
100
100
|
).returns(T.attached_class)
|
|
101
101
|
end
|
|
102
102
|
def self.new(
|
|
103
|
-
# The unique identifier
|
|
103
|
+
# The unique identifier of the resource.
|
|
104
104
|
id:,
|
|
105
105
|
# The content of the message in Markdown format
|
|
106
106
|
content:,
|
|
@@ -13,7 +13,16 @@ module WhopSDK
|
|
|
13
13
|
|
|
14
14
|
# The attachments for this message
|
|
15
15
|
sig do
|
|
16
|
-
returns(
|
|
16
|
+
returns(
|
|
17
|
+
T.nilable(
|
|
18
|
+
T::Array[
|
|
19
|
+
T.any(
|
|
20
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
21
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID
|
|
22
|
+
)
|
|
23
|
+
]
|
|
24
|
+
)
|
|
25
|
+
)
|
|
17
26
|
end
|
|
18
27
|
attr_accessor :attachments
|
|
19
28
|
|
|
@@ -29,7 +38,12 @@ module WhopSDK
|
|
|
29
38
|
params(
|
|
30
39
|
attachments:
|
|
31
40
|
T.nilable(
|
|
32
|
-
T::Array[
|
|
41
|
+
T::Array[
|
|
42
|
+
T.any(
|
|
43
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
|
|
44
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID::OrHash
|
|
45
|
+
)
|
|
46
|
+
]
|
|
33
47
|
),
|
|
34
48
|
content: T.nilable(String),
|
|
35
49
|
is_pinned: T.nilable(T::Boolean),
|
|
@@ -51,7 +65,14 @@ module WhopSDK
|
|
|
51
65
|
override.returns(
|
|
52
66
|
{
|
|
53
67
|
attachments:
|
|
54
|
-
T.nilable(
|
|
68
|
+
T.nilable(
|
|
69
|
+
T::Array[
|
|
70
|
+
T.any(
|
|
71
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
72
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
),
|
|
55
76
|
content: T.nilable(String),
|
|
56
77
|
is_pinned: T.nilable(T::Boolean),
|
|
57
78
|
request_options: WhopSDK::RequestOptions
|
|
@@ -61,52 +82,84 @@ module WhopSDK
|
|
|
61
82
|
def to_hash
|
|
62
83
|
end
|
|
63
84
|
|
|
64
|
-
|
|
65
|
-
|
|
85
|
+
# Input for an attachment
|
|
86
|
+
module Attachment
|
|
87
|
+
extend WhopSDK::Internal::Type::Union
|
|
88
|
+
|
|
89
|
+
Variants =
|
|
66
90
|
T.type_alias do
|
|
67
91
|
T.any(
|
|
68
|
-
WhopSDK::MessageUpdateParams::Attachment,
|
|
69
|
-
WhopSDK::
|
|
92
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
93
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID
|
|
70
94
|
)
|
|
71
95
|
end
|
|
72
96
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
97
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
98
|
+
OrHash =
|
|
99
|
+
T.type_alias do
|
|
100
|
+
T.any(
|
|
101
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
102
|
+
WhopSDK::Internal::AnyHash
|
|
103
|
+
)
|
|
104
|
+
end
|
|
78
105
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
106
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
107
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
108
|
+
# mediaDirectUpload mutation.
|
|
109
|
+
sig { returns(String) }
|
|
110
|
+
attr_accessor :direct_upload_id
|
|
84
111
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
112
|
+
# Input for an attachment
|
|
113
|
+
sig { params(direct_upload_id: String).returns(T.attached_class) }
|
|
114
|
+
def self.new(
|
|
115
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
116
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
117
|
+
# mediaDirectUpload mutation.
|
|
118
|
+
direct_upload_id:
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
sig { override.returns({ direct_upload_id: String }) }
|
|
123
|
+
def to_hash
|
|
124
|
+
end
|
|
91
125
|
end
|
|
92
|
-
|
|
126
|
+
|
|
127
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
128
|
+
OrHash =
|
|
129
|
+
T.type_alias do
|
|
130
|
+
T.any(
|
|
131
|
+
WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID,
|
|
132
|
+
WhopSDK::Internal::AnyHash
|
|
133
|
+
)
|
|
134
|
+
end
|
|
135
|
+
|
|
93
136
|
# The ID of an existing attachment object. Use this when updating a resource and
|
|
94
137
|
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
95
138
|
# doing.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
#
|
|
100
|
-
|
|
101
|
-
|
|
139
|
+
sig { returns(String) }
|
|
140
|
+
attr_accessor :id
|
|
141
|
+
|
|
142
|
+
# Input for an attachment
|
|
143
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
144
|
+
def self.new(
|
|
145
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
146
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
147
|
+
# doing.
|
|
148
|
+
id:
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
sig { override.returns({ id: String }) }
|
|
153
|
+
def to_hash
|
|
154
|
+
end
|
|
102
155
|
end
|
|
103
156
|
|
|
104
157
|
sig do
|
|
105
158
|
override.returns(
|
|
106
|
-
|
|
159
|
+
T::Array[WhopSDK::MessageUpdateParams::Attachment::Variants]
|
|
107
160
|
)
|
|
108
161
|
end
|
|
109
|
-
def
|
|
162
|
+
def self.variants
|
|
110
163
|
end
|
|
111
164
|
end
|
|
112
165
|
end
|
|
@@ -84,6 +84,11 @@ module WhopSDK
|
|
|
84
84
|
end
|
|
85
85
|
attr_writer :membership
|
|
86
86
|
|
|
87
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
88
|
+
# configuration for which this payment was made
|
|
89
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
90
|
+
attr_accessor :metadata
|
|
91
|
+
|
|
87
92
|
# The datetime the payment was paid
|
|
88
93
|
sig { returns(T.nilable(Time)) }
|
|
89
94
|
attr_accessor :paid_at
|
|
@@ -99,7 +104,7 @@ module WhopSDK
|
|
|
99
104
|
sig { params(plan: T.nilable(WhopSDK::Payment::Plan::OrHash)).void }
|
|
100
105
|
attr_writer :plan
|
|
101
106
|
|
|
102
|
-
# The
|
|
107
|
+
# The product this payment was made for
|
|
103
108
|
sig { returns(T.nilable(WhopSDK::Payment::Product)) }
|
|
104
109
|
attr_reader :product
|
|
105
110
|
|
|
@@ -184,6 +189,7 @@ module WhopSDK
|
|
|
184
189
|
last_payment_attempt: T.nilable(Time),
|
|
185
190
|
member: T.nilable(WhopSDK::Payment::Member::OrHash),
|
|
186
191
|
membership: T.nilable(WhopSDK::Payment::Membership::OrHash),
|
|
192
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
187
193
|
paid_at: T.nilable(Time),
|
|
188
194
|
payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol),
|
|
189
195
|
plan: T.nilable(WhopSDK::Payment::Plan::OrHash),
|
|
@@ -233,13 +239,16 @@ module WhopSDK
|
|
|
233
239
|
member:,
|
|
234
240
|
# The membership attached to this payment.
|
|
235
241
|
membership:,
|
|
242
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
243
|
+
# configuration for which this payment was made
|
|
244
|
+
metadata:,
|
|
236
245
|
# The datetime the payment was paid
|
|
237
246
|
paid_at:,
|
|
238
247
|
# The different types of payment methods that can be used.
|
|
239
248
|
payment_method_type:,
|
|
240
249
|
# The plan attached to this payment.
|
|
241
250
|
plan:,
|
|
242
|
-
# The
|
|
251
|
+
# The product this payment was made for
|
|
243
252
|
product:,
|
|
244
253
|
# The promo code used for this payment.
|
|
245
254
|
promo_code:,
|
|
@@ -290,6 +299,7 @@ module WhopSDK
|
|
|
290
299
|
last_payment_attempt: T.nilable(Time),
|
|
291
300
|
member: T.nilable(WhopSDK::Payment::Member),
|
|
292
301
|
membership: T.nilable(WhopSDK::Payment::Membership),
|
|
302
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
293
303
|
paid_at: T.nilable(Time),
|
|
294
304
|
payment_method_type:
|
|
295
305
|
T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol),
|
|
@@ -543,7 +553,7 @@ module WhopSDK
|
|
|
543
553
|
sig { returns(String) }
|
|
544
554
|
attr_accessor :title
|
|
545
555
|
|
|
546
|
-
# The
|
|
556
|
+
# The product this payment was made for
|
|
547
557
|
sig do
|
|
548
558
|
params(id: String, route: String, title: String).returns(
|
|
549
559
|
T.attached_class
|
|
@@ -109,6 +109,11 @@ module WhopSDK
|
|
|
109
109
|
end
|
|
110
110
|
attr_writer :membership
|
|
111
111
|
|
|
112
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
113
|
+
# configuration for which this payment was made
|
|
114
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
115
|
+
attr_accessor :metadata
|
|
116
|
+
|
|
112
117
|
# The datetime the payment was paid
|
|
113
118
|
sig { returns(T.nilable(Time)) }
|
|
114
119
|
attr_accessor :paid_at
|
|
@@ -128,7 +133,7 @@ module WhopSDK
|
|
|
128
133
|
end
|
|
129
134
|
attr_writer :plan
|
|
130
135
|
|
|
131
|
-
# The
|
|
136
|
+
# The product this payment was made for
|
|
132
137
|
sig { returns(T.nilable(WhopSDK::Models::PaymentListResponse::Product)) }
|
|
133
138
|
attr_reader :product
|
|
134
139
|
|
|
@@ -233,6 +238,7 @@ module WhopSDK
|
|
|
233
238
|
T.nilable(WhopSDK::Models::PaymentListResponse::Member::OrHash),
|
|
234
239
|
membership:
|
|
235
240
|
T.nilable(WhopSDK::Models::PaymentListResponse::Membership::OrHash),
|
|
241
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
236
242
|
paid_at: T.nilable(Time),
|
|
237
243
|
payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol),
|
|
238
244
|
plan: T.nilable(WhopSDK::Models::PaymentListResponse::Plan::OrHash),
|
|
@@ -284,13 +290,16 @@ module WhopSDK
|
|
|
284
290
|
member:,
|
|
285
291
|
# The membership attached to this payment.
|
|
286
292
|
membership:,
|
|
293
|
+
# The custom metadata stored on this payment. This will be copied the checkout
|
|
294
|
+
# configuration for which this payment was made
|
|
295
|
+
metadata:,
|
|
287
296
|
# The datetime the payment was paid
|
|
288
297
|
paid_at:,
|
|
289
298
|
# The different types of payment methods that can be used.
|
|
290
299
|
payment_method_type:,
|
|
291
300
|
# The plan attached to this payment.
|
|
292
301
|
plan:,
|
|
293
|
-
# The
|
|
302
|
+
# The product this payment was made for
|
|
294
303
|
product:,
|
|
295
304
|
# The promo code used for this payment.
|
|
296
305
|
promo_code:,
|
|
@@ -343,6 +352,7 @@ module WhopSDK
|
|
|
343
352
|
member: T.nilable(WhopSDK::Models::PaymentListResponse::Member),
|
|
344
353
|
membership:
|
|
345
354
|
T.nilable(WhopSDK::Models::PaymentListResponse::Membership),
|
|
355
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
346
356
|
paid_at: T.nilable(Time),
|
|
347
357
|
payment_method_type:
|
|
348
358
|
T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol),
|
|
@@ -615,7 +625,7 @@ module WhopSDK
|
|
|
615
625
|
sig { returns(String) }
|
|
616
626
|
attr_accessor :title
|
|
617
627
|
|
|
618
|
-
# The
|
|
628
|
+
# The product this payment was made for
|
|
619
629
|
sig do
|
|
620
630
|
params(id: String, route: String, title: String).returns(
|
|
621
631
|
T.attached_class
|
|
@@ -100,10 +100,12 @@ module WhopSDK
|
|
|
100
100
|
T.let(:id_bank_transfer, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
101
101
|
DEMO_PAY = T.let(:demo_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
102
102
|
SHOP_PAY = T.let(:shop_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
103
|
-
APPLE = T.let(:apple, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
104
103
|
SEZZLE = T.let(:sezzle, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
105
104
|
COINBASE = T.let(:coinbase, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
106
105
|
SPLITIT = T.let(:splitit, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
106
|
+
PLATFORM_BALANCE =
|
|
107
|
+
T.let(:platform_balance, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
108
|
+
APPLE = T.let(:apple, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
107
109
|
UNKNOWN = T.let(:unknown, WhopSDK::PaymentMethodTypes::TaggedSymbol)
|
|
108
110
|
|
|
109
111
|
sig do
|
|
@@ -63,11 +63,23 @@ module WhopSDK
|
|
|
63
63
|
sig { returns(T.nilable(Integer)) }
|
|
64
64
|
attr_accessor :member_count
|
|
65
65
|
|
|
66
|
+
# The explicit payment method configuration for the plan, if any.
|
|
67
|
+
sig { returns(T.nilable(WhopSDK::Plan::PaymentMethodConfiguration)) }
|
|
68
|
+
attr_reader :payment_method_configuration
|
|
69
|
+
|
|
70
|
+
sig do
|
|
71
|
+
params(
|
|
72
|
+
payment_method_configuration:
|
|
73
|
+
T.nilable(WhopSDK::Plan::PaymentMethodConfiguration::OrHash)
|
|
74
|
+
).void
|
|
75
|
+
end
|
|
76
|
+
attr_writer :payment_method_configuration
|
|
77
|
+
|
|
66
78
|
# Indicates if the plan is a one time payment or recurring.
|
|
67
79
|
sig { returns(WhopSDK::PlanType::TaggedSymbol) }
|
|
68
80
|
attr_accessor :plan_type
|
|
69
81
|
|
|
70
|
-
# The
|
|
82
|
+
# The product that this plan belongs to.
|
|
71
83
|
sig { returns(T.nilable(WhopSDK::Plan::Product)) }
|
|
72
84
|
attr_reader :product
|
|
73
85
|
|
|
@@ -114,7 +126,9 @@ module WhopSDK
|
|
|
114
126
|
sig { returns(WhopSDK::Visibility::TaggedSymbol) }
|
|
115
127
|
attr_accessor :visibility
|
|
116
128
|
|
|
117
|
-
#
|
|
129
|
+
# A plan for an product. Plans define the core parameters that define a checkout
|
|
130
|
+
# and payment on whop. Use plans to create different ways to price your products
|
|
131
|
+
# (Eg renewal / one_time)
|
|
118
132
|
sig do
|
|
119
133
|
params(
|
|
120
134
|
id: String,
|
|
@@ -130,6 +144,8 @@ module WhopSDK
|
|
|
130
144
|
internal_notes: T.nilable(String),
|
|
131
145
|
invoice: T.nilable(WhopSDK::Plan::Invoice::OrHash),
|
|
132
146
|
member_count: T.nilable(Integer),
|
|
147
|
+
payment_method_configuration:
|
|
148
|
+
T.nilable(WhopSDK::Plan::PaymentMethodConfiguration::OrHash),
|
|
133
149
|
plan_type: WhopSDK::PlanType::OrSymbol,
|
|
134
150
|
product: T.nilable(WhopSDK::Plan::Product::OrHash),
|
|
135
151
|
purchase_url: String,
|
|
@@ -171,9 +187,11 @@ module WhopSDK
|
|
|
171
187
|
invoice:,
|
|
172
188
|
# The number of members for the plan.
|
|
173
189
|
member_count:,
|
|
190
|
+
# The explicit payment method configuration for the plan, if any.
|
|
191
|
+
payment_method_configuration:,
|
|
174
192
|
# Indicates if the plan is a one time payment or recurring.
|
|
175
193
|
plan_type:,
|
|
176
|
-
# The
|
|
194
|
+
# The product that this plan belongs to.
|
|
177
195
|
product:,
|
|
178
196
|
# The direct link to purchase the product.
|
|
179
197
|
purchase_url:,
|
|
@@ -214,6 +232,8 @@ module WhopSDK
|
|
|
214
232
|
internal_notes: T.nilable(String),
|
|
215
233
|
invoice: T.nilable(WhopSDK::Plan::Invoice),
|
|
216
234
|
member_count: T.nilable(Integer),
|
|
235
|
+
payment_method_configuration:
|
|
236
|
+
T.nilable(WhopSDK::Plan::PaymentMethodConfiguration),
|
|
217
237
|
plan_type: WhopSDK::PlanType::TaggedSymbol,
|
|
218
238
|
product: T.nilable(WhopSDK::Plan::Product),
|
|
219
239
|
purchase_url: String,
|
|
@@ -357,6 +377,70 @@ module WhopSDK
|
|
|
357
377
|
end
|
|
358
378
|
end
|
|
359
379
|
|
|
380
|
+
class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
|
|
381
|
+
OrHash =
|
|
382
|
+
T.type_alias do
|
|
383
|
+
T.any(
|
|
384
|
+
WhopSDK::Plan::PaymentMethodConfiguration,
|
|
385
|
+
WhopSDK::Internal::AnyHash
|
|
386
|
+
)
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
390
|
+
# applies if the include_platform_defaults is true.
|
|
391
|
+
sig { returns(T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol]) }
|
|
392
|
+
attr_accessor :disabled
|
|
393
|
+
|
|
394
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
395
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
396
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
397
|
+
# defaults with additional methods.
|
|
398
|
+
sig { returns(T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol]) }
|
|
399
|
+
attr_accessor :enabled
|
|
400
|
+
|
|
401
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
402
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
403
|
+
# the documentation at docs.whop.com/payments.
|
|
404
|
+
sig { returns(T::Boolean) }
|
|
405
|
+
attr_accessor :include_platform_defaults
|
|
406
|
+
|
|
407
|
+
# The explicit payment method configuration for the plan, if any.
|
|
408
|
+
sig do
|
|
409
|
+
params(
|
|
410
|
+
disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
411
|
+
enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol],
|
|
412
|
+
include_platform_defaults: T::Boolean
|
|
413
|
+
).returns(T.attached_class)
|
|
414
|
+
end
|
|
415
|
+
def self.new(
|
|
416
|
+
# An array of payment method identifiers that are explicitly disabled. Only
|
|
417
|
+
# applies if the include_platform_defaults is true.
|
|
418
|
+
disabled:,
|
|
419
|
+
# An array of payment method identifiers that are explicitly enabled. This means
|
|
420
|
+
# these payment methods will be shown on checkout. Example use case is to only
|
|
421
|
+
# enable a specific payment method like cashapp, or extending the platform
|
|
422
|
+
# defaults with additional methods.
|
|
423
|
+
enabled:,
|
|
424
|
+
# Whether Whop's platform default payment method enablement settings are included
|
|
425
|
+
# in this configuration. The full list of default payment methods can be found in
|
|
426
|
+
# the documentation at docs.whop.com/payments.
|
|
427
|
+
include_platform_defaults:
|
|
428
|
+
)
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
sig do
|
|
432
|
+
override.returns(
|
|
433
|
+
{
|
|
434
|
+
disabled: T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol],
|
|
435
|
+
enabled: T::Array[WhopSDK::PaymentMethodTypes::TaggedSymbol],
|
|
436
|
+
include_platform_defaults: T::Boolean
|
|
437
|
+
}
|
|
438
|
+
)
|
|
439
|
+
end
|
|
440
|
+
def to_hash
|
|
441
|
+
end
|
|
442
|
+
end
|
|
443
|
+
|
|
360
444
|
class Product < WhopSDK::Internal::Type::BaseModel
|
|
361
445
|
OrHash =
|
|
362
446
|
T.type_alias do
|
|
@@ -371,7 +455,7 @@ module WhopSDK
|
|
|
371
455
|
sig { returns(String) }
|
|
372
456
|
attr_accessor :title
|
|
373
457
|
|
|
374
|
-
# The
|
|
458
|
+
# The product that this plan belongs to.
|
|
375
459
|
sig { params(id: String, title: String).returns(T.attached_class) }
|
|
376
460
|
def self.new(
|
|
377
461
|
# The internal ID of the public product.
|