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
|
@@ -17,7 +17,16 @@ module WhopSDK
|
|
|
17
17
|
|
|
18
18
|
# The attachments for this post
|
|
19
19
|
sig do
|
|
20
|
-
returns(
|
|
20
|
+
returns(
|
|
21
|
+
T.nilable(
|
|
22
|
+
T::Array[
|
|
23
|
+
T.any(
|
|
24
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
25
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID
|
|
26
|
+
)
|
|
27
|
+
]
|
|
28
|
+
)
|
|
29
|
+
)
|
|
21
30
|
end
|
|
22
31
|
attr_accessor :attachments
|
|
23
32
|
|
|
@@ -70,7 +79,12 @@ module WhopSDK
|
|
|
70
79
|
experience_id: String,
|
|
71
80
|
attachments:
|
|
72
81
|
T.nilable(
|
|
73
|
-
T::Array[
|
|
82
|
+
T::Array[
|
|
83
|
+
T.any(
|
|
84
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
|
|
85
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID::OrHash
|
|
86
|
+
)
|
|
87
|
+
]
|
|
74
88
|
),
|
|
75
89
|
content: T.nilable(String),
|
|
76
90
|
is_mention: T.nilable(T::Boolean),
|
|
@@ -118,7 +132,14 @@ module WhopSDK
|
|
|
118
132
|
{
|
|
119
133
|
experience_id: String,
|
|
120
134
|
attachments:
|
|
121
|
-
T.nilable(
|
|
135
|
+
T.nilable(
|
|
136
|
+
T::Array[
|
|
137
|
+
T.any(
|
|
138
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
139
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID
|
|
140
|
+
)
|
|
141
|
+
]
|
|
142
|
+
),
|
|
122
143
|
content: T.nilable(String),
|
|
123
144
|
is_mention: T.nilable(T::Boolean),
|
|
124
145
|
parent_id: T.nilable(String),
|
|
@@ -134,52 +155,84 @@ module WhopSDK
|
|
|
134
155
|
def to_hash
|
|
135
156
|
end
|
|
136
157
|
|
|
137
|
-
|
|
138
|
-
|
|
158
|
+
# Input for an attachment
|
|
159
|
+
module Attachment
|
|
160
|
+
extend WhopSDK::Internal::Type::Union
|
|
161
|
+
|
|
162
|
+
Variants =
|
|
139
163
|
T.type_alias do
|
|
140
164
|
T.any(
|
|
141
|
-
WhopSDK::ForumPostCreateParams::Attachment,
|
|
142
|
-
WhopSDK::
|
|
165
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
166
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID
|
|
143
167
|
)
|
|
144
168
|
end
|
|
145
169
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
170
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
171
|
+
OrHash =
|
|
172
|
+
T.type_alias do
|
|
173
|
+
T.any(
|
|
174
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
175
|
+
WhopSDK::Internal::AnyHash
|
|
176
|
+
)
|
|
177
|
+
end
|
|
151
178
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
179
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
180
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
181
|
+
# mediaDirectUpload mutation.
|
|
182
|
+
sig { returns(String) }
|
|
183
|
+
attr_accessor :direct_upload_id
|
|
157
184
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
185
|
+
# Input for an attachment
|
|
186
|
+
sig { params(direct_upload_id: String).returns(T.attached_class) }
|
|
187
|
+
def self.new(
|
|
188
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
189
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
190
|
+
# mediaDirectUpload mutation.
|
|
191
|
+
direct_upload_id:
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
sig { override.returns({ direct_upload_id: String }) }
|
|
196
|
+
def to_hash
|
|
197
|
+
end
|
|
164
198
|
end
|
|
165
|
-
|
|
199
|
+
|
|
200
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
201
|
+
OrHash =
|
|
202
|
+
T.type_alias do
|
|
203
|
+
T.any(
|
|
204
|
+
WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID,
|
|
205
|
+
WhopSDK::Internal::AnyHash
|
|
206
|
+
)
|
|
207
|
+
end
|
|
208
|
+
|
|
166
209
|
# The ID of an existing attachment object. Use this when updating a resource and
|
|
167
210
|
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
168
211
|
# doing.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
#
|
|
173
|
-
|
|
174
|
-
|
|
212
|
+
sig { returns(String) }
|
|
213
|
+
attr_accessor :id
|
|
214
|
+
|
|
215
|
+
# Input for an attachment
|
|
216
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
217
|
+
def self.new(
|
|
218
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
219
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
220
|
+
# doing.
|
|
221
|
+
id:
|
|
222
|
+
)
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
sig { override.returns({ id: String }) }
|
|
226
|
+
def to_hash
|
|
227
|
+
end
|
|
175
228
|
end
|
|
176
229
|
|
|
177
230
|
sig do
|
|
178
231
|
override.returns(
|
|
179
|
-
|
|
232
|
+
T::Array[WhopSDK::ForumPostCreateParams::Attachment::Variants]
|
|
180
233
|
)
|
|
181
234
|
end
|
|
182
|
-
def
|
|
235
|
+
def self.variants
|
|
183
236
|
end
|
|
184
237
|
end
|
|
185
238
|
|
|
@@ -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
|
|
|
@@ -87,7 +87,7 @@ module WhopSDK
|
|
|
87
87
|
).returns(T.attached_class)
|
|
88
88
|
end
|
|
89
89
|
def self.new(
|
|
90
|
-
# The unique identifier
|
|
90
|
+
# The unique identifier of the resource.
|
|
91
91
|
id:,
|
|
92
92
|
# The amount of comments on this post
|
|
93
93
|
comment_count:,
|
|
@@ -13,7 +13,16 @@ module WhopSDK
|
|
|
13
13
|
|
|
14
14
|
# The attachments for this post
|
|
15
15
|
sig do
|
|
16
|
-
returns(
|
|
16
|
+
returns(
|
|
17
|
+
T.nilable(
|
|
18
|
+
T::Array[
|
|
19
|
+
T.any(
|
|
20
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
21
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID
|
|
22
|
+
)
|
|
23
|
+
]
|
|
24
|
+
)
|
|
25
|
+
)
|
|
17
26
|
end
|
|
18
27
|
attr_accessor :attachments
|
|
19
28
|
|
|
@@ -34,7 +43,12 @@ module WhopSDK
|
|
|
34
43
|
params(
|
|
35
44
|
attachments:
|
|
36
45
|
T.nilable(
|
|
37
|
-
T::Array[
|
|
46
|
+
T::Array[
|
|
47
|
+
T.any(
|
|
48
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
|
|
49
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID::OrHash
|
|
50
|
+
)
|
|
51
|
+
]
|
|
38
52
|
),
|
|
39
53
|
content: T.nilable(String),
|
|
40
54
|
is_pinned: T.nilable(T::Boolean),
|
|
@@ -60,7 +74,14 @@ module WhopSDK
|
|
|
60
74
|
override.returns(
|
|
61
75
|
{
|
|
62
76
|
attachments:
|
|
63
|
-
T.nilable(
|
|
77
|
+
T.nilable(
|
|
78
|
+
T::Array[
|
|
79
|
+
T.any(
|
|
80
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
81
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID
|
|
82
|
+
)
|
|
83
|
+
]
|
|
84
|
+
),
|
|
64
85
|
content: T.nilable(String),
|
|
65
86
|
is_pinned: T.nilable(T::Boolean),
|
|
66
87
|
title: T.nilable(String),
|
|
@@ -71,52 +92,84 @@ module WhopSDK
|
|
|
71
92
|
def to_hash
|
|
72
93
|
end
|
|
73
94
|
|
|
74
|
-
|
|
75
|
-
|
|
95
|
+
# Input for an attachment
|
|
96
|
+
module Attachment
|
|
97
|
+
extend WhopSDK::Internal::Type::Union
|
|
98
|
+
|
|
99
|
+
Variants =
|
|
76
100
|
T.type_alias do
|
|
77
101
|
T.any(
|
|
78
|
-
WhopSDK::ForumPostUpdateParams::Attachment,
|
|
79
|
-
WhopSDK::
|
|
102
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
103
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID
|
|
80
104
|
)
|
|
81
105
|
end
|
|
82
106
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
107
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
108
|
+
OrHash =
|
|
109
|
+
T.type_alias do
|
|
110
|
+
T.any(
|
|
111
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
|
|
112
|
+
WhopSDK::Internal::AnyHash
|
|
113
|
+
)
|
|
114
|
+
end
|
|
88
115
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
116
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
117
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
118
|
+
# mediaDirectUpload mutation.
|
|
119
|
+
sig { returns(String) }
|
|
120
|
+
attr_accessor :direct_upload_id
|
|
94
121
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
122
|
+
# Input for an attachment
|
|
123
|
+
sig { params(direct_upload_id: String).returns(T.attached_class) }
|
|
124
|
+
def self.new(
|
|
125
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
126
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
127
|
+
# mediaDirectUpload mutation.
|
|
128
|
+
direct_upload_id:
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
sig { override.returns({ direct_upload_id: String }) }
|
|
133
|
+
def to_hash
|
|
134
|
+
end
|
|
101
135
|
end
|
|
102
|
-
|
|
136
|
+
|
|
137
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
138
|
+
OrHash =
|
|
139
|
+
T.type_alias do
|
|
140
|
+
T.any(
|
|
141
|
+
WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID,
|
|
142
|
+
WhopSDK::Internal::AnyHash
|
|
143
|
+
)
|
|
144
|
+
end
|
|
145
|
+
|
|
103
146
|
# The ID of an existing attachment object. Use this when updating a resource and
|
|
104
147
|
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
105
148
|
# doing.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
#
|
|
110
|
-
|
|
111
|
-
|
|
149
|
+
sig { returns(String) }
|
|
150
|
+
attr_accessor :id
|
|
151
|
+
|
|
152
|
+
# Input for an attachment
|
|
153
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
154
|
+
def self.new(
|
|
155
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
156
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
157
|
+
# doing.
|
|
158
|
+
id:
|
|
159
|
+
)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
sig { override.returns({ id: String }) }
|
|
163
|
+
def to_hash
|
|
164
|
+
end
|
|
112
165
|
end
|
|
113
166
|
|
|
114
167
|
sig do
|
|
115
168
|
override.returns(
|
|
116
|
-
|
|
169
|
+
T::Array[WhopSDK::ForumPostUpdateParams::Attachment::Variants]
|
|
117
170
|
)
|
|
118
171
|
end
|
|
119
|
-
def
|
|
172
|
+
def self.variants
|
|
120
173
|
end
|
|
121
174
|
end
|
|
122
175
|
end
|
|
@@ -24,6 +24,12 @@ module WhopSDK
|
|
|
24
24
|
sig { returns(Time) }
|
|
25
25
|
attr_accessor :due_date
|
|
26
26
|
|
|
27
|
+
# The member ID to create this invoice for. Include this if you want to create an
|
|
28
|
+
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
29
|
+
# an email_address and customer_name.
|
|
30
|
+
sig { returns(String) }
|
|
31
|
+
attr_accessor :member_id
|
|
32
|
+
|
|
27
33
|
# The properties of the plan to create for this invoice.
|
|
28
34
|
sig { returns(WhopSDK::InvoiceCreateParams::Plan) }
|
|
29
35
|
attr_reader :plan
|
|
@@ -31,6 +37,16 @@ module WhopSDK
|
|
|
31
37
|
sig { params(plan: WhopSDK::InvoiceCreateParams::Plan::OrHash).void }
|
|
32
38
|
attr_writer :plan
|
|
33
39
|
|
|
40
|
+
# The properties of the product to create for this invoice. Include this if you
|
|
41
|
+
# want to create an invoice for a new product.
|
|
42
|
+
sig { returns(WhopSDK::InvoiceCreateParams::Product) }
|
|
43
|
+
attr_reader :product
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
params(product: WhopSDK::InvoiceCreateParams::Product::OrHash).void
|
|
47
|
+
end
|
|
48
|
+
attr_writer :product
|
|
49
|
+
|
|
34
50
|
# Whether or not to charge the customer a buyer fee.
|
|
35
51
|
sig { returns(T.nilable(T::Boolean)) }
|
|
36
52
|
attr_accessor :charge_buyer_fee
|
|
@@ -41,37 +57,19 @@ module WhopSDK
|
|
|
41
57
|
sig { returns(T.nilable(String)) }
|
|
42
58
|
attr_accessor :customer_name
|
|
43
59
|
|
|
44
|
-
# The email address to create this invoice for. This is required if you want to
|
|
45
|
-
# create an invoice for a user who does not have a member of your company yet.
|
|
46
|
-
sig { returns(T.nilable(String)) }
|
|
47
|
-
attr_accessor :email_address
|
|
48
|
-
|
|
49
|
-
# The member ID to create this invoice for. Include this if you want to create an
|
|
50
|
-
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
51
|
-
# an email_address and customer_name.
|
|
52
|
-
sig { returns(T.nilable(String)) }
|
|
53
|
-
attr_accessor :member_id
|
|
54
|
-
|
|
55
60
|
# The payment token ID to use for this invoice. If using charge_automatically, you
|
|
56
61
|
# must provide a payment_token.
|
|
57
62
|
sig { returns(T.nilable(String)) }
|
|
58
63
|
attr_accessor :payment_token_id
|
|
59
64
|
|
|
60
|
-
# The
|
|
61
|
-
#
|
|
62
|
-
sig { returns(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
sig do
|
|
66
|
-
params(
|
|
67
|
-
product: T.nilable(WhopSDK::InvoiceCreateParams::Product::OrHash)
|
|
68
|
-
).void
|
|
69
|
-
end
|
|
70
|
-
attr_writer :product
|
|
65
|
+
# The email address to create this invoice for. This is required if you want to
|
|
66
|
+
# create an invoice for a user who does not have a member of your company yet.
|
|
67
|
+
sig { returns(String) }
|
|
68
|
+
attr_accessor :email_address
|
|
71
69
|
|
|
72
70
|
# The product ID to create this invoice for. Include this if you want to create an
|
|
73
71
|
# invoice for an existing product.
|
|
74
|
-
sig { returns(
|
|
72
|
+
sig { returns(String) }
|
|
75
73
|
attr_accessor :product_id
|
|
76
74
|
|
|
77
75
|
sig do
|
|
@@ -79,14 +77,14 @@ module WhopSDK
|
|
|
79
77
|
collection_method: WhopSDK::CollectionMethod::OrSymbol,
|
|
80
78
|
company_id: String,
|
|
81
79
|
due_date: Time,
|
|
80
|
+
member_id: String,
|
|
82
81
|
plan: WhopSDK::InvoiceCreateParams::Plan::OrHash,
|
|
82
|
+
product: WhopSDK::InvoiceCreateParams::Product::OrHash,
|
|
83
|
+
email_address: String,
|
|
84
|
+
product_id: String,
|
|
83
85
|
charge_buyer_fee: T.nilable(T::Boolean),
|
|
84
86
|
customer_name: T.nilable(String),
|
|
85
|
-
email_address: T.nilable(String),
|
|
86
|
-
member_id: T.nilable(String),
|
|
87
87
|
payment_token_id: T.nilable(String),
|
|
88
|
-
product: T.nilable(WhopSDK::InvoiceCreateParams::Product::OrHash),
|
|
89
|
-
product_id: T.nilable(String),
|
|
90
88
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
91
89
|
).returns(T.attached_class)
|
|
92
90
|
end
|
|
@@ -98,30 +96,30 @@ module WhopSDK
|
|
|
98
96
|
company_id:,
|
|
99
97
|
# The date the invoice is due, if applicable.
|
|
100
98
|
due_date:,
|
|
99
|
+
# The member ID to create this invoice for. Include this if you want to create an
|
|
100
|
+
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
101
|
+
# an email_address and customer_name.
|
|
102
|
+
member_id:,
|
|
101
103
|
# The properties of the plan to create for this invoice.
|
|
102
104
|
plan:,
|
|
105
|
+
# The properties of the product to create for this invoice. Include this if you
|
|
106
|
+
# want to create an invoice for a new product.
|
|
107
|
+
product:,
|
|
108
|
+
# The email address to create this invoice for. This is required if you want to
|
|
109
|
+
# create an invoice for a user who does not have a member of your company yet.
|
|
110
|
+
email_address:,
|
|
111
|
+
# The product ID to create this invoice for. Include this if you want to create an
|
|
112
|
+
# invoice for an existing product.
|
|
113
|
+
product_id:,
|
|
103
114
|
# Whether or not to charge the customer a buyer fee.
|
|
104
115
|
charge_buyer_fee: nil,
|
|
105
116
|
# The name of the customer to create this invoice for. This is required if you
|
|
106
117
|
# want to create an invoice for a customer who does not have a member of your
|
|
107
118
|
# company yet.
|
|
108
119
|
customer_name: nil,
|
|
109
|
-
# The email address to create this invoice for. This is required if you want to
|
|
110
|
-
# create an invoice for a user who does not have a member of your company yet.
|
|
111
|
-
email_address: nil,
|
|
112
|
-
# The member ID to create this invoice for. Include this if you want to create an
|
|
113
|
-
# invoice for an existing member. If you do not have a member ID, you must provide
|
|
114
|
-
# an email_address and customer_name.
|
|
115
|
-
member_id: nil,
|
|
116
120
|
# The payment token ID to use for this invoice. If using charge_automatically, you
|
|
117
121
|
# must provide a payment_token.
|
|
118
122
|
payment_token_id: nil,
|
|
119
|
-
# The properties of the product to create for this invoice. Include this if you
|
|
120
|
-
# want to create an invoice for a new product.
|
|
121
|
-
product: nil,
|
|
122
|
-
# The product ID to create this invoice for. Include this if you want to create an
|
|
123
|
-
# invoice for an existing product.
|
|
124
|
-
product_id: nil,
|
|
125
123
|
request_options: {}
|
|
126
124
|
)
|
|
127
125
|
end
|
|
@@ -132,14 +130,14 @@ module WhopSDK
|
|
|
132
130
|
collection_method: WhopSDK::CollectionMethod::OrSymbol,
|
|
133
131
|
company_id: String,
|
|
134
132
|
due_date: Time,
|
|
133
|
+
member_id: String,
|
|
135
134
|
plan: WhopSDK::InvoiceCreateParams::Plan,
|
|
135
|
+
product: WhopSDK::InvoiceCreateParams::Product,
|
|
136
136
|
charge_buyer_fee: T.nilable(T::Boolean),
|
|
137
137
|
customer_name: T.nilable(String),
|
|
138
|
-
email_address: T.nilable(String),
|
|
139
|
-
member_id: T.nilable(String),
|
|
140
138
|
payment_token_id: T.nilable(String),
|
|
141
|
-
|
|
142
|
-
product_id:
|
|
139
|
+
email_address: String,
|
|
140
|
+
product_id: String,
|
|
143
141
|
request_options: WhopSDK::RequestOptions
|
|
144
142
|
}
|
|
145
143
|
)
|
|
@@ -186,7 +184,7 @@ module WhopSDK
|
|
|
186
184
|
sig { returns(T.nilable(String)) }
|
|
187
185
|
attr_accessor :internal_notes
|
|
188
186
|
|
|
189
|
-
# The type of plan that can be attached to
|
|
187
|
+
# The type of plan that can be attached to a product
|
|
190
188
|
sig { returns(T.nilable(WhopSDK::PlanType::OrSymbol)) }
|
|
191
189
|
attr_accessor :plan_type
|
|
192
190
|
|
|
@@ -199,10 +197,18 @@ module WhopSDK
|
|
|
199
197
|
sig { returns(T.nilable(Float)) }
|
|
200
198
|
attr_accessor :renewal_price
|
|
201
199
|
|
|
200
|
+
# The number of units available for purchase.
|
|
201
|
+
sig { returns(T.nilable(Integer)) }
|
|
202
|
+
attr_accessor :stock
|
|
203
|
+
|
|
202
204
|
# The number of free trial days added before a renewal plan.
|
|
203
205
|
sig { returns(T.nilable(Integer)) }
|
|
204
206
|
attr_accessor :trial_period_days
|
|
205
207
|
|
|
208
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
209
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
210
|
+
attr_accessor :unlimited_stock
|
|
211
|
+
|
|
206
212
|
# Visibility of a resource
|
|
207
213
|
sig { returns(T.nilable(WhopSDK::Visibility::OrSymbol)) }
|
|
208
214
|
attr_accessor :visibility
|
|
@@ -224,7 +230,9 @@ module WhopSDK
|
|
|
224
230
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
225
231
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
226
232
|
renewal_price: T.nilable(Float),
|
|
233
|
+
stock: T.nilable(Integer),
|
|
227
234
|
trial_period_days: T.nilable(Integer),
|
|
235
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
228
236
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
|
|
229
237
|
).returns(T.attached_class)
|
|
230
238
|
end
|
|
@@ -243,15 +251,19 @@ module WhopSDK
|
|
|
243
251
|
initial_price: nil,
|
|
244
252
|
# A personal description or notes section for the business.
|
|
245
253
|
internal_notes: nil,
|
|
246
|
-
# The type of plan that can be attached to
|
|
254
|
+
# The type of plan that can be attached to a product
|
|
247
255
|
plan_type: nil,
|
|
248
256
|
# The methods of how a plan can be released.
|
|
249
257
|
release_method: nil,
|
|
250
258
|
# The amount the customer is charged every billing period. Use only if a recurring
|
|
251
259
|
# payment. Provided as a number in dollars. Eg: 10.43 for $10.43
|
|
252
260
|
renewal_price: nil,
|
|
261
|
+
# The number of units available for purchase.
|
|
262
|
+
stock: nil,
|
|
253
263
|
# The number of free trial days added before a renewal plan.
|
|
254
264
|
trial_period_days: nil,
|
|
265
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
266
|
+
unlimited_stock: nil,
|
|
255
267
|
# Visibility of a resource
|
|
256
268
|
visibility: nil
|
|
257
269
|
)
|
|
@@ -272,7 +284,9 @@ module WhopSDK
|
|
|
272
284
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
273
285
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
274
286
|
renewal_price: T.nilable(Float),
|
|
287
|
+
stock: T.nilable(Integer),
|
|
275
288
|
trial_period_days: T.nilable(Integer),
|
|
289
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
276
290
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
|
|
277
291
|
}
|
|
278
292
|
)
|