whop_sdk 0.0.2 → 0.0.3
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 +29 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +20 -0
- data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +30 -24
- data/lib/whop_sdk/models/assessment_question_types.rb +18 -0
- data/lib/whop_sdk/models/billing_reasons.rb +20 -0
- data/lib/whop_sdk/models/card_brands.rb +30 -0
- data/lib/whop_sdk/models/checkout_configuration.rb +10 -7
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +140 -3
- data/lib/whop_sdk/models/checkout_configuration_list_response.rb +10 -7
- data/lib/whop_sdk/models/course.rb +230 -0
- data/lib/whop_sdk/models/course_chapter.rb +72 -0
- data/lib/whop_sdk/models/course_chapter_create_params.rb +30 -0
- data/lib/whop_sdk/models/course_chapter_delete_params.rb +14 -0
- data/lib/whop_sdk/models/course_chapter_delete_response.rb +8 -0
- data/lib/whop_sdk/models/course_chapter_list_params.rb +54 -0
- data/lib/whop_sdk/models/course_chapter_list_response.rb +35 -0
- data/lib/whop_sdk/models/course_chapter_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/course_chapter_update_params.rb +22 -0
- data/lib/whop_sdk/models/course_create_params.rb +82 -0
- data/lib/whop_sdk/models/course_delete_params.rb +14 -0
- data/lib/whop_sdk/models/course_delete_response.rb +8 -0
- data/lib/whop_sdk/models/course_lesson_create_params.rb +54 -0
- data/lib/whop_sdk/models/course_lesson_delete_params.rb +14 -0
- data/lib/whop_sdk/models/course_lesson_delete_response.rb +8 -0
- data/lib/whop_sdk/models/course_lesson_list_params.rb +62 -0
- data/lib/whop_sdk/models/course_lesson_list_response.rb +71 -0
- data/lib/whop_sdk/models/course_lesson_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/course_lesson_update_params.rb +278 -0
- data/lib/whop_sdk/models/course_list_params.rb +62 -0
- data/lib/whop_sdk/models/course_list_response.rb +148 -0
- data/lib/whop_sdk/models/course_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/course_update_params.rb +197 -0
- data/lib/whop_sdk/models/experience_duplicate_params.rb +22 -0
- data/lib/whop_sdk/models/forum_post.rb +17 -1
- data/lib/whop_sdk/models/forum_post_list_response.rb +17 -1
- data/lib/whop_sdk/models/forum_post_update_params.rb +80 -0
- data/lib/whop_sdk/models/invoice.rb +6 -2
- data/lib/whop_sdk/models/invoice_list_item.rb +6 -2
- data/lib/whop_sdk/models/languages.rb +36 -0
- data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +9 -0
- data/lib/whop_sdk/models/lesson.rb +365 -0
- data/lib/whop_sdk/models/lesson_types.rb +20 -0
- data/lib/whop_sdk/models/lesson_visibilities.rb +17 -0
- data/lib/whop_sdk/models/member_list_params.rb +9 -1
- data/lib/whop_sdk/models/membership.rb +31 -1
- data/lib/whop_sdk/models/membership_list_params.rb +16 -8
- data/lib/whop_sdk/models/membership_list_response.rb +31 -1
- data/lib/whop_sdk/models/message_update_params.rb +68 -0
- data/lib/whop_sdk/models/payment.rb +24 -21
- data/lib/whop_sdk/models/payment_list_params.rb +3 -18
- data/lib/whop_sdk/models/payment_list_response.rb +24 -21
- data/lib/whop_sdk/models/payment_method_types.rb +98 -0
- data/lib/whop_sdk/models/plan.rb +25 -1
- data/lib/whop_sdk/models/plan_create_params.rb +37 -3
- data/lib/whop_sdk/models/plan_list_response.rb +25 -1
- data/lib/whop_sdk/models/plan_update_params.rb +35 -1
- data/lib/whop_sdk/models/product.rb +11 -1
- data/lib/whop_sdk/models/product_create_params.rb +1 -45
- data/lib/whop_sdk/models/product_list_item.rb +14 -1
- data/lib/whop_sdk/models/product_update_params.rb +30 -1
- data/lib/whop_sdk/models/promo_code.rb +211 -0
- data/lib/whop_sdk/models/promo_code_create_params.rb +140 -0
- data/lib/whop_sdk/models/promo_code_delete_params.rb +14 -0
- data/lib/whop_sdk/models/promo_code_delete_response.rb +8 -0
- data/lib/whop_sdk/models/promo_code_list_params.rb +78 -0
- data/lib/whop_sdk/models/promo_code_list_response.rb +181 -0
- data/lib/whop_sdk/models/promo_code_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/promo_code_status.rb +17 -0
- data/lib/whop_sdk/models/promo_duration.rb +17 -0
- data/lib/whop_sdk/models/review_list_params.rb +70 -0
- data/lib/whop_sdk/models/review_list_response.rb +183 -0
- data/lib/whop_sdk/models/review_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/review_retrieve_response.rb +251 -0
- data/lib/whop_sdk/models/review_status.rb +17 -0
- data/lib/whop_sdk/models.rb +76 -0
- data/lib/whop_sdk/resources/checkout_configurations.rb +2 -0
- data/lib/whop_sdk/resources/course_chapters.rb +151 -0
- data/lib/whop_sdk/resources/course_lessons.rb +178 -0
- data/lib/whop_sdk/resources/courses.rb +178 -0
- data/lib/whop_sdk/resources/experiences.rb +33 -0
- data/lib/whop_sdk/resources/forum_posts.rb +33 -0
- data/lib/whop_sdk/resources/members.rb +3 -1
- data/lib/whop_sdk/resources/memberships.rb +6 -4
- data/lib/whop_sdk/resources/messages.rb +28 -0
- data/lib/whop_sdk/resources/payments.rb +1 -1
- data/lib/whop_sdk/resources/plans.rb +19 -3
- data/lib/whop_sdk/resources/products.rb +4 -6
- data/lib/whop_sdk/resources/promo_codes.rb +161 -0
- data/lib/whop_sdk/resources/reviews.rb +68 -0
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +53 -0
- data/rbi/whop_sdk/client.rbi +15 -0
- data/rbi/whop_sdk/models/assessment_question_types.rbi +31 -0
- data/rbi/whop_sdk/models/billing_reasons.rbi +27 -0
- data/rbi/whop_sdk/models/card_brands.rbi +35 -0
- data/rbi/whop_sdk/models/checkout_configuration.rbi +4 -2
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +183 -2
- data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +4 -2
- data/rbi/whop_sdk/models/course.rbi +313 -0
- data/rbi/whop_sdk/models/course_chapter.rbi +101 -0
- data/rbi/whop_sdk/models/course_chapter_create_params.rbi +51 -0
- data/rbi/whop_sdk/models/course_chapter_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_chapter_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_chapter_list_params.rbi +75 -0
- data/rbi/whop_sdk/models/course_chapter_list_response.rbi +47 -0
- data/rbi/whop_sdk/models/course_chapter_retrieve_params.rbi +30 -0
- data/rbi/whop_sdk/models/course_chapter_update_params.rbi +40 -0
- data/rbi/whop_sdk/models/course_create_params.rbi +131 -0
- data/rbi/whop_sdk/models/course_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_delete_response.rbi +7 -0
- data/rbi/whop_sdk/models/course_lesson_create_params.rbi +75 -0
- data/rbi/whop_sdk/models/course_lesson_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_lesson_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_lesson_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/course_lesson_list_response.rbi +91 -0
- data/rbi/whop_sdk/models/course_lesson_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_lesson_update_params.rbi +465 -0
- data/rbi/whop_sdk/models/course_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/course_list_response.rbi +198 -0
- data/rbi/whop_sdk/models/course_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_update_params.rbi +293 -0
- data/rbi/whop_sdk/models/experience_duplicate_params.rbi +40 -0
- data/rbi/whop_sdk/models/forum_post.rbi +16 -0
- data/rbi/whop_sdk/models/forum_post_list_response.rbi +16 -0
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +124 -0
- data/rbi/whop_sdk/models/invoice.rbi +4 -2
- data/rbi/whop_sdk/models/invoice_list_item.rbi +4 -2
- data/rbi/whop_sdk/models/languages.rbi +40 -0
- data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +45 -0
- data/rbi/whop_sdk/models/lesson.rbi +517 -0
- data/rbi/whop_sdk/models/lesson_types.rbi +25 -0
- data/rbi/whop_sdk/models/lesson_visibilities.rbi +23 -0
- data/rbi/whop_sdk/models/member_list_params.rbi +8 -0
- data/rbi/whop_sdk/models/membership.rbi +40 -0
- data/rbi/whop_sdk/models/membership_list_params.rbi +16 -8
- data/rbi/whop_sdk/models/membership_list_response.rbi +47 -0
- data/rbi/whop_sdk/models/message_update_params.rbi +114 -0
- data/rbi/whop_sdk/models/payment.rbi +32 -25
- data/rbi/whop_sdk/models/payment_list_params.rbi +3 -63
- data/rbi/whop_sdk/models/payment_list_response.rbi +32 -25
- data/rbi/whop_sdk/models/payment_method_types.rbi +116 -0
- data/rbi/whop_sdk/models/plan.rbi +24 -0
- data/rbi/whop_sdk/models/plan_create_params.rbi +38 -2
- data/rbi/whop_sdk/models/plan_list_response.rbi +24 -0
- data/rbi/whop_sdk/models/plan_update_params.rbi +36 -0
- data/rbi/whop_sdk/models/product.rbi +12 -0
- data/rbi/whop_sdk/models/product_create_params.rbi +0 -74
- data/rbi/whop_sdk/models/product_list_item.rbi +12 -0
- data/rbi/whop_sdk/models/product_update_params.rbi +59 -0
- data/rbi/whop_sdk/models/promo_code.rbi +248 -0
- data/rbi/whop_sdk/models/promo_code_create_params.rbi +161 -0
- data/rbi/whop_sdk/models/promo_code_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/promo_code_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/promo_code_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/promo_code_list_response.rbi +222 -0
- data/rbi/whop_sdk/models/promo_code_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/promo_code_status.rbi +21 -0
- data/rbi/whop_sdk/models/promo_duration.rbi +21 -0
- data/rbi/whop_sdk/models/review_list_params.rbi +91 -0
- data/rbi/whop_sdk/models/review_list_response.rbi +243 -0
- data/rbi/whop_sdk/models/review_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/review_retrieve_response.rbi +354 -0
- data/rbi/whop_sdk/models/review_status.rbi +21 -0
- data/rbi/whop_sdk/models.rbi +76 -0
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +2 -0
- data/rbi/whop_sdk/resources/course_chapters.rbi +115 -0
- data/rbi/whop_sdk/resources/course_lessons.rbi +163 -0
- data/rbi/whop_sdk/resources/courses.rbi +152 -0
- data/rbi/whop_sdk/resources/experiences.rbi +25 -0
- data/rbi/whop_sdk/resources/forum_posts.rbi +29 -0
- data/rbi/whop_sdk/resources/members.rbi +3 -0
- data/rbi/whop_sdk/resources/memberships.rbi +6 -3
- data/rbi/whop_sdk/resources/messages.rbi +25 -0
- data/rbi/whop_sdk/resources/payments.rbi +1 -3
- data/rbi/whop_sdk/resources/plans.rbi +29 -1
- data/rbi/whop_sdk/resources/products.rbi +4 -7
- data/rbi/whop_sdk/resources/promo_codes.rbi +147 -0
- data/rbi/whop_sdk/resources/reviews.rbi +56 -0
- data/sig/whop_sdk/client.rbs +10 -0
- data/sig/whop_sdk/models/assessment_question_types.rbs +17 -0
- data/sig/whop_sdk/models/billing_reasons.rbs +24 -0
- data/sig/whop_sdk/models/card_brands.rbs +44 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +87 -0
- data/sig/whop_sdk/models/course.rbs +171 -0
- data/sig/whop_sdk/models/course_chapter.rbs +49 -0
- data/sig/whop_sdk/models/course_chapter_create_params.rbs +28 -0
- data/sig/whop_sdk/models/course_chapter_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/course_chapter_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/course_chapter_list_params.rbs +46 -0
- data/sig/whop_sdk/models/course_chapter_list_response.rbs +18 -0
- data/sig/whop_sdk/models/course_chapter_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/course_chapter_update_params.rbs +23 -0
- data/sig/whop_sdk/models/course_create_params.rbs +58 -0
- data/sig/whop_sdk/models/course_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/course_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
- data/sig/whop_sdk/models/course_lesson_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/course_lesson_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_list_params.rbs +51 -0
- data/sig/whop_sdk/models/course_lesson_list_response.rbs +50 -0
- data/sig/whop_sdk/models/course_lesson_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/course_lesson_update_params.rbs +162 -0
- data/sig/whop_sdk/models/course_list_params.rbs +51 -0
- data/sig/whop_sdk/models/course_list_response.rbs +102 -0
- data/sig/whop_sdk/models/course_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/course_update_params.rbs +137 -0
- data/sig/whop_sdk/models/experience_duplicate_params.rbs +23 -0
- data/sig/whop_sdk/models/forum_post.rbs +10 -0
- data/sig/whop_sdk/models/forum_post_list_response.rbs +10 -0
- data/sig/whop_sdk/models/forum_post_update_params.rbs +53 -0
- data/sig/whop_sdk/models/languages.rbs +56 -0
- data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +20 -1
- data/sig/whop_sdk/models/lesson.rbs +248 -0
- data/sig/whop_sdk/models/lesson_types.rbs +19 -0
- data/sig/whop_sdk/models/lesson_visibilities.rbs +14 -0
- data/sig/whop_sdk/models/member_list_params.rbs +6 -1
- data/sig/whop_sdk/models/membership.rbs +17 -0
- data/sig/whop_sdk/models/membership_list_params.rbs +11 -6
- data/sig/whop_sdk/models/membership_list_response.rbs +17 -0
- data/sig/whop_sdk/models/message_update_params.rbs +48 -0
- data/sig/whop_sdk/models/payment.rbs +12 -12
- data/sig/whop_sdk/models/payment_list_params.rbs +4 -25
- data/sig/whop_sdk/models/payment_list_response.rbs +12 -12
- data/sig/whop_sdk/models/payment_method_types.rbs +180 -0
- data/sig/whop_sdk/models/plan.rbs +15 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +20 -0
- data/sig/whop_sdk/models/plan_list_response.rbs +15 -0
- data/sig/whop_sdk/models/plan_update_params.rbs +20 -0
- data/sig/whop_sdk/models/product.rbs +5 -0
- data/sig/whop_sdk/models/product_create_params.rbs +0 -22
- data/sig/whop_sdk/models/product_list_item.rbs +5 -0
- data/sig/whop_sdk/models/product_update_params.rbs +17 -0
- data/sig/whop_sdk/models/promo_code.rbs +134 -0
- data/sig/whop_sdk/models/promo_code_create_params.rbs +96 -0
- data/sig/whop_sdk/models/promo_code_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/promo_code_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/promo_code_list_params.rbs +61 -0
- data/sig/whop_sdk/models/promo_code_list_response.rbs +117 -0
- data/sig/whop_sdk/models/promo_code_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/promo_code_status.rbs +15 -0
- data/sig/whop_sdk/models/promo_duration.rbs +15 -0
- data/sig/whop_sdk/models/review_list_params.rbs +56 -0
- data/sig/whop_sdk/models/review_list_response.rbs +116 -0
- data/sig/whop_sdk/models/review_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/review_retrieve_response.rbs +152 -0
- data/sig/whop_sdk/models/review_status.rbs +15 -0
- data/sig/whop_sdk/models.rbs +76 -0
- data/sig/whop_sdk/resources/course_chapters.rbs +35 -0
- data/sig/whop_sdk/resources/course_lessons.rbs +47 -0
- data/sig/whop_sdk/resources/courses.rbs +47 -0
- data/sig/whop_sdk/resources/experiences.rbs +6 -0
- data/sig/whop_sdk/resources/forum_posts.rbs +9 -0
- data/sig/whop_sdk/resources/members.rbs +1 -0
- data/sig/whop_sdk/resources/memberships.rbs +2 -1
- data/sig/whop_sdk/resources/messages.rbs +8 -0
- data/sig/whop_sdk/resources/payments.rbs +1 -1
- data/sig/whop_sdk/resources/plans.rbs +8 -0
- data/sig/whop_sdk/resources/products.rbs +1 -2
- data/sig/whop_sdk/resources/promo_codes.rbs +45 -0
- data/sig/whop_sdk/resources/reviews.rbs +23 -0
- metadata +189 -2
|
@@ -45,7 +45,6 @@ module WhopSDK
|
|
|
45
45
|
# - `member:basic:read`
|
|
46
46
|
sig do
|
|
47
47
|
params(
|
|
48
|
-
company_id: String,
|
|
49
48
|
access_pass_ids: T.nilable(T::Array[String]),
|
|
50
49
|
after: T.nilable(String),
|
|
51
50
|
before: T.nilable(String),
|
|
@@ -53,6 +52,7 @@ module WhopSDK
|
|
|
53
52
|
T.nilable(
|
|
54
53
|
T::Array[WhopSDK::MembershipListParams::CancelOption::OrSymbol]
|
|
55
54
|
),
|
|
55
|
+
company_id: T.nilable(String),
|
|
56
56
|
created_after: T.nilable(Time),
|
|
57
57
|
created_before: T.nilable(Time),
|
|
58
58
|
direction: T.nilable(WhopSDK::Direction::OrSymbol),
|
|
@@ -62,14 +62,13 @@ module WhopSDK
|
|
|
62
62
|
plan_ids: T.nilable(T::Array[String]),
|
|
63
63
|
promo_code_ids: T.nilable(T::Array[String]),
|
|
64
64
|
statuses: T.nilable(T::Array[WhopSDK::MembershipStatus::OrSymbol]),
|
|
65
|
+
user_ids: T.nilable(T::Array[String]),
|
|
65
66
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
66
67
|
).returns(
|
|
67
68
|
WhopSDK::Internal::CursorPage[WhopSDK::Models::MembershipListResponse]
|
|
68
69
|
)
|
|
69
70
|
end
|
|
70
71
|
def list(
|
|
71
|
-
# The ID of the company to list memberships for
|
|
72
|
-
company_id:,
|
|
73
72
|
# The access pass IDs to filter the memberships by
|
|
74
73
|
access_pass_ids: nil,
|
|
75
74
|
# Returns the elements in the list that come after the specified cursor.
|
|
@@ -78,6 +77,8 @@ module WhopSDK
|
|
|
78
77
|
before: nil,
|
|
79
78
|
# The cancel options to filter the memberships by
|
|
80
79
|
cancel_options: nil,
|
|
80
|
+
# The ID of the company to list memberships for
|
|
81
|
+
company_id: nil,
|
|
81
82
|
# The minimum creation date to filter by
|
|
82
83
|
created_after: nil,
|
|
83
84
|
# The maximum creation date to filter by
|
|
@@ -96,6 +97,8 @@ module WhopSDK
|
|
|
96
97
|
promo_code_ids: nil,
|
|
97
98
|
# The membership status to filter the memberships by
|
|
98
99
|
statuses: nil,
|
|
100
|
+
# Only return memberships from these whop user ids
|
|
101
|
+
user_ids: nil,
|
|
99
102
|
request_options: {}
|
|
100
103
|
)
|
|
101
104
|
end
|
|
@@ -47,6 +47,31 @@ module WhopSDK
|
|
|
47
47
|
def retrieve(id, request_options: {})
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
# Updates an existing message
|
|
51
|
+
sig do
|
|
52
|
+
params(
|
|
53
|
+
id: String,
|
|
54
|
+
attachments:
|
|
55
|
+
T.nilable(
|
|
56
|
+
T::Array[WhopSDK::MessageUpdateParams::Attachment::OrHash]
|
|
57
|
+
),
|
|
58
|
+
content: T.nilable(String),
|
|
59
|
+
is_pinned: T.nilable(T::Boolean),
|
|
60
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
61
|
+
).returns(WhopSDK::Message)
|
|
62
|
+
end
|
|
63
|
+
def update(
|
|
64
|
+
id,
|
|
65
|
+
# The attachments for this message
|
|
66
|
+
attachments: nil,
|
|
67
|
+
# The content of the message in Markdown format
|
|
68
|
+
content: nil,
|
|
69
|
+
# Whether this message is pinned
|
|
70
|
+
is_pinned: nil,
|
|
71
|
+
request_options: {}
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
50
75
|
# Lists messages inside a channel
|
|
51
76
|
#
|
|
52
77
|
# Required permissions:
|
|
@@ -40,9 +40,7 @@ module WhopSDK
|
|
|
40
40
|
after: T.nilable(String),
|
|
41
41
|
before: T.nilable(String),
|
|
42
42
|
billing_reasons:
|
|
43
|
-
T.nilable(
|
|
44
|
-
T::Array[WhopSDK::PaymentListParams::BillingReason::OrSymbol]
|
|
45
|
-
),
|
|
43
|
+
T.nilable(T::Array[WhopSDK::BillingReasons::OrSymbol]),
|
|
46
44
|
created_after: T.nilable(Time),
|
|
47
45
|
created_before: T.nilable(Time),
|
|
48
46
|
currencies: T.nilable(T::Array[WhopSDK::Currency::OrSymbol]),
|
|
@@ -27,8 +27,12 @@ module WhopSDK
|
|
|
27
27
|
plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
|
|
28
28
|
release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
|
|
29
29
|
renewal_price: T.nilable(Float),
|
|
30
|
+
stock: T.nilable(Integer),
|
|
31
|
+
strike_through_initial_price: T.nilable(Float),
|
|
32
|
+
strike_through_renewal_price: T.nilable(Float),
|
|
30
33
|
title: T.nilable(String),
|
|
31
34
|
trial_period_days: T.nilable(Integer),
|
|
35
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
32
36
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol),
|
|
33
37
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
34
38
|
).returns(WhopSDK::Plan)
|
|
@@ -38,7 +42,7 @@ module WhopSDK
|
|
|
38
42
|
company_id:,
|
|
39
43
|
# The product the plan is related to.
|
|
40
44
|
product_id:,
|
|
41
|
-
# The interval at which the plan charges (renewal plans).
|
|
45
|
+
# The interval in days at which the plan charges (renewal plans).
|
|
42
46
|
billing_period: nil,
|
|
43
47
|
# The available currencies on the platform
|
|
44
48
|
currency: nil,
|
|
@@ -66,10 +70,20 @@ module WhopSDK
|
|
|
66
70
|
# The amount the customer is charged every billing period. Use only if a recurring
|
|
67
71
|
# payment. Provided as a number in dollars. Eg: 10.43 for $10.43
|
|
68
72
|
renewal_price: nil,
|
|
73
|
+
# The number of units available for purchase.
|
|
74
|
+
stock: nil,
|
|
75
|
+
# The price to display with a strikethrough for the initial price. Provided as a
|
|
76
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
77
|
+
strike_through_initial_price: nil,
|
|
78
|
+
# The price to display with a strikethrough for the renewal price. Provided as a
|
|
79
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
80
|
+
strike_through_renewal_price: nil,
|
|
69
81
|
# The title of the plan. This will be visible on the product page to customers.
|
|
70
82
|
title: nil,
|
|
71
83
|
# The number of free trial days added before a renewal plan.
|
|
72
84
|
trial_period_days: nil,
|
|
85
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
86
|
+
unlimited_stock: nil,
|
|
73
87
|
# Visibility of a resource
|
|
74
88
|
visibility: nil,
|
|
75
89
|
request_options: {}
|
|
@@ -112,8 +126,12 @@ module WhopSDK
|
|
|
112
126
|
offer_cancel_discount: T.nilable(T::Boolean),
|
|
113
127
|
override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol),
|
|
114
128
|
renewal_price: T.nilable(Float),
|
|
129
|
+
stock: T.nilable(Integer),
|
|
130
|
+
strike_through_initial_price: T.nilable(Float),
|
|
131
|
+
strike_through_renewal_price: T.nilable(Float),
|
|
115
132
|
title: T.nilable(String),
|
|
116
133
|
trial_period_days: T.nilable(Integer),
|
|
134
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
117
135
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol),
|
|
118
136
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
119
137
|
).returns(WhopSDK::Plan)
|
|
@@ -143,10 +161,20 @@ module WhopSDK
|
|
|
143
161
|
override_tax_type: nil,
|
|
144
162
|
# The amount the customer is charged every billing period.
|
|
145
163
|
renewal_price: nil,
|
|
164
|
+
# The number of units available for purchase.
|
|
165
|
+
stock: nil,
|
|
166
|
+
# The price to display with a strikethrough for the initial price. Provided as a
|
|
167
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
168
|
+
strike_through_initial_price: nil,
|
|
169
|
+
# The price to display with a strikethrough for the renewal price. Provided as a
|
|
170
|
+
# number in dollars. Eg: 19.99 for $19.99
|
|
171
|
+
strike_through_renewal_price: nil,
|
|
146
172
|
# The title of the plan. This will be visible on the product page to customers.
|
|
147
173
|
title: nil,
|
|
148
174
|
# The number of free trial days added before a renewal plan.
|
|
149
175
|
trial_period_days: nil,
|
|
176
|
+
# Limits/doesn't limit the number of units available for purchase.
|
|
177
|
+
unlimited_stock: nil,
|
|
150
178
|
# Visibility of a resource
|
|
151
179
|
visibility: nil,
|
|
152
180
|
request_options: {}
|
|
@@ -13,9 +13,6 @@ module WhopSDK
|
|
|
13
13
|
params(
|
|
14
14
|
company_id: String,
|
|
15
15
|
title: String,
|
|
16
|
-
access_pass_type: T.nilable(WhopSDK::AccessPassType::OrSymbol),
|
|
17
|
-
banner_image:
|
|
18
|
-
T.nilable(WhopSDK::ProductCreateParams::BannerImage::OrHash),
|
|
19
16
|
business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
|
|
20
17
|
collect_shipping_address: T.nilable(T::Boolean),
|
|
21
18
|
custom_cta: T.nilable(WhopSDK::CustomCta::OrSymbol),
|
|
@@ -49,10 +46,6 @@ module WhopSDK
|
|
|
49
46
|
company_id:,
|
|
50
47
|
# The title of the product.
|
|
51
48
|
title:,
|
|
52
|
-
# The different types an access pass can be.
|
|
53
|
-
access_pass_type: nil,
|
|
54
|
-
# A banner image for the product in png, jpeg format
|
|
55
|
-
banner_image: nil,
|
|
56
49
|
# The different business types a company can be.
|
|
57
50
|
business_type: nil,
|
|
58
51
|
# Whether or not to collect shipping information at checkout from the customer.
|
|
@@ -139,6 +132,8 @@ module WhopSDK
|
|
|
139
132
|
product_tax_code_id: T.nilable(String),
|
|
140
133
|
redirect_purchase_url: T.nilable(String),
|
|
141
134
|
route: T.nilable(String),
|
|
135
|
+
store_page_config:
|
|
136
|
+
T.nilable(WhopSDK::ProductUpdateParams::StorePageConfig::OrHash),
|
|
142
137
|
title: T.nilable(String),
|
|
143
138
|
visibility: T.nilable(WhopSDK::Visibility::OrSymbol),
|
|
144
139
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
@@ -180,6 +175,8 @@ module WhopSDK
|
|
|
180
175
|
redirect_purchase_url: nil,
|
|
181
176
|
# The route of the product.
|
|
182
177
|
route: nil,
|
|
178
|
+
# Configuration for a product on the company's store page.
|
|
179
|
+
store_page_config: nil,
|
|
183
180
|
# The title of the product.
|
|
184
181
|
title: nil,
|
|
185
182
|
# Visibility of a resource
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class PromoCodes
|
|
6
|
+
# Create a new promo code for a product or plan
|
|
7
|
+
#
|
|
8
|
+
# Required permissions:
|
|
9
|
+
#
|
|
10
|
+
# - `promo_code:create`
|
|
11
|
+
# - `access_pass:basic:read`
|
|
12
|
+
sig do
|
|
13
|
+
params(
|
|
14
|
+
amount_off: Float,
|
|
15
|
+
base_currency: WhopSDK::Currency::OrSymbol,
|
|
16
|
+
code: String,
|
|
17
|
+
company_id: String,
|
|
18
|
+
new_users_only: T::Boolean,
|
|
19
|
+
promo_duration_months: Integer,
|
|
20
|
+
promo_type: WhopSDK::PromoType::OrSymbol,
|
|
21
|
+
churned_users_only: T.nilable(T::Boolean),
|
|
22
|
+
existing_memberships_only: T.nilable(T::Boolean),
|
|
23
|
+
expires_at: T.nilable(Time),
|
|
24
|
+
one_per_customer: T.nilable(T::Boolean),
|
|
25
|
+
plan_ids: T.nilable(T::Array[String]),
|
|
26
|
+
product_id: T.nilable(String),
|
|
27
|
+
stock: T.nilable(Integer),
|
|
28
|
+
unlimited_stock: T.nilable(T::Boolean),
|
|
29
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
30
|
+
).returns(WhopSDK::PromoCode)
|
|
31
|
+
end
|
|
32
|
+
def create(
|
|
33
|
+
# The amount off (% or flat amount) for the promo.
|
|
34
|
+
amount_off:,
|
|
35
|
+
# The monetary currency of the promo code.
|
|
36
|
+
base_currency:,
|
|
37
|
+
# The specific code used to apply the promo at checkout.
|
|
38
|
+
code:,
|
|
39
|
+
# The id of the company to create the promo code for.
|
|
40
|
+
company_id:,
|
|
41
|
+
# Restricts promo use to only users who have never purchased from the company
|
|
42
|
+
# before.
|
|
43
|
+
new_users_only:,
|
|
44
|
+
# The number of months this promo code is applied and valid for.
|
|
45
|
+
promo_duration_months:,
|
|
46
|
+
# The type (% or flat amount) of the promo.
|
|
47
|
+
promo_type:,
|
|
48
|
+
# Restricts promo use to only users who have churned from the company before.
|
|
49
|
+
churned_users_only: nil,
|
|
50
|
+
# Whether this promo code is for existing memberships only (cancelations)
|
|
51
|
+
existing_memberships_only: nil,
|
|
52
|
+
# The date/time of when the promo expires.
|
|
53
|
+
expires_at: nil,
|
|
54
|
+
# Restricts promo use to only be applied once per customer.
|
|
55
|
+
one_per_customer: nil,
|
|
56
|
+
# The IDs of the plans that the promo code applies to. If product_id is provided,
|
|
57
|
+
# it will only apply to plans attached to that product
|
|
58
|
+
plan_ids: nil,
|
|
59
|
+
# The product to lock the promo code to, if any. If provided will filter out any
|
|
60
|
+
# plan ids not attached to this product
|
|
61
|
+
product_id: nil,
|
|
62
|
+
# The quantity limit on the number of uses.
|
|
63
|
+
stock: nil,
|
|
64
|
+
# Whether or not the promo code should have unlimited stock.
|
|
65
|
+
unlimited_stock: nil,
|
|
66
|
+
request_options: {}
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Retrieves a promo code by ID
|
|
71
|
+
#
|
|
72
|
+
# Required permissions:
|
|
73
|
+
#
|
|
74
|
+
# - `promo_code:basic:read`
|
|
75
|
+
# - `access_pass:basic:read`
|
|
76
|
+
sig do
|
|
77
|
+
params(
|
|
78
|
+
id: String,
|
|
79
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
80
|
+
).returns(WhopSDK::PromoCode)
|
|
81
|
+
end
|
|
82
|
+
def retrieve(id, request_options: {})
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Lists promo codes for a company
|
|
86
|
+
#
|
|
87
|
+
# Required permissions:
|
|
88
|
+
#
|
|
89
|
+
# - `promo_code:basic:read`
|
|
90
|
+
# - `access_pass:basic:read`
|
|
91
|
+
sig do
|
|
92
|
+
params(
|
|
93
|
+
company_id: String,
|
|
94
|
+
after: T.nilable(String),
|
|
95
|
+
before: T.nilable(String),
|
|
96
|
+
first: T.nilable(Integer),
|
|
97
|
+
last: T.nilable(Integer),
|
|
98
|
+
plan_ids: T.nilable(T::Array[String]),
|
|
99
|
+
product_ids: T.nilable(T::Array[String]),
|
|
100
|
+
status: T.nilable(WhopSDK::PromoCodeStatus::OrSymbol),
|
|
101
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
102
|
+
).returns(
|
|
103
|
+
WhopSDK::Internal::CursorPage[WhopSDK::Models::PromoCodeListResponse]
|
|
104
|
+
)
|
|
105
|
+
end
|
|
106
|
+
def list(
|
|
107
|
+
# The ID of the company to list promo codes for
|
|
108
|
+
company_id:,
|
|
109
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
110
|
+
after: nil,
|
|
111
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
112
|
+
before: nil,
|
|
113
|
+
# Returns the first _n_ elements from the list.
|
|
114
|
+
first: nil,
|
|
115
|
+
# Returns the last _n_ elements from the list.
|
|
116
|
+
last: nil,
|
|
117
|
+
# Filter promo codes by plan ID(s)
|
|
118
|
+
plan_ids: nil,
|
|
119
|
+
# Filter promo codes by product ID(s)
|
|
120
|
+
product_ids: nil,
|
|
121
|
+
# Statuses for promo codes
|
|
122
|
+
status: nil,
|
|
123
|
+
request_options: {}
|
|
124
|
+
)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Archive a promo code, preventing further use
|
|
128
|
+
#
|
|
129
|
+
# Required permissions:
|
|
130
|
+
#
|
|
131
|
+
# - `promo_code:delete`
|
|
132
|
+
sig do
|
|
133
|
+
params(
|
|
134
|
+
id: String,
|
|
135
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
136
|
+
).returns(T::Boolean)
|
|
137
|
+
end
|
|
138
|
+
def delete(id, request_options: {})
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# @api private
|
|
142
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
143
|
+
def self.new(client:)
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class Reviews
|
|
6
|
+
# Retrieve a review by its ID
|
|
7
|
+
sig do
|
|
8
|
+
params(
|
|
9
|
+
id: String,
|
|
10
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
11
|
+
).returns(WhopSDK::Models::ReviewRetrieveResponse)
|
|
12
|
+
end
|
|
13
|
+
def retrieve(id, request_options: {})
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# List all reviews
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
product_id: String,
|
|
20
|
+
after: T.nilable(String),
|
|
21
|
+
before: T.nilable(String),
|
|
22
|
+
first: T.nilable(Integer),
|
|
23
|
+
last: T.nilable(Integer),
|
|
24
|
+
max_stars: T.nilable(Integer),
|
|
25
|
+
min_stars: T.nilable(Integer),
|
|
26
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
27
|
+
).returns(
|
|
28
|
+
WhopSDK::Internal::CursorPage[WhopSDK::Models::ReviewListResponse]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def list(
|
|
32
|
+
# The ID of the product
|
|
33
|
+
product_id:,
|
|
34
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
35
|
+
after: nil,
|
|
36
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
37
|
+
before: nil,
|
|
38
|
+
# Returns the first _n_ elements from the list.
|
|
39
|
+
first: nil,
|
|
40
|
+
# Returns the last _n_ elements from the list.
|
|
41
|
+
last: nil,
|
|
42
|
+
# The maximum star rating of the review (inclusive)
|
|
43
|
+
max_stars: nil,
|
|
44
|
+
# The minimum star rating of the review (inclusive)
|
|
45
|
+
min_stars: nil,
|
|
46
|
+
request_options: {}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# @api private
|
|
51
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
52
|
+
def self.new(client:)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
data/sig/whop_sdk/client.rbs
CHANGED
|
@@ -62,6 +62,16 @@ module WhopSDK
|
|
|
62
62
|
|
|
63
63
|
attr_reader forums: WhopSDK::Resources::Forums
|
|
64
64
|
|
|
65
|
+
attr_reader promo_codes: WhopSDK::Resources::PromoCodes
|
|
66
|
+
|
|
67
|
+
attr_reader courses: WhopSDK::Resources::Courses
|
|
68
|
+
|
|
69
|
+
attr_reader course_chapters: WhopSDK::Resources::CourseChapters
|
|
70
|
+
|
|
71
|
+
attr_reader course_lessons: WhopSDK::Resources::CourseLessons
|
|
72
|
+
|
|
73
|
+
attr_reader reviews: WhopSDK::Resources::Reviews
|
|
74
|
+
|
|
65
75
|
private def auth_headers: -> ::Hash[String, String]
|
|
66
76
|
|
|
67
77
|
def initialize: (
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type assessment_question_types =
|
|
4
|
+
:short_answer | :true_false | :multiple_choice | :multiple_select
|
|
5
|
+
|
|
6
|
+
module AssessmentQuestionTypes
|
|
7
|
+
extend WhopSDK::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
SHORT_ANSWER: :short_answer
|
|
10
|
+
TRUE_FALSE: :true_false
|
|
11
|
+
MULTIPLE_CHOICE: :multiple_choice
|
|
12
|
+
MULTIPLE_SELECT: :multiple_select
|
|
13
|
+
|
|
14
|
+
def self?.values: -> ::Array[WhopSDK::Models::assessment_question_types]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type billing_reasons =
|
|
4
|
+
:subscription_create
|
|
5
|
+
| :subscription_cycle
|
|
6
|
+
| :subscription_update
|
|
7
|
+
| :one_time
|
|
8
|
+
| :manual
|
|
9
|
+
| :subscription
|
|
10
|
+
|
|
11
|
+
module BillingReasons
|
|
12
|
+
extend WhopSDK::Internal::Type::Enum
|
|
13
|
+
|
|
14
|
+
SUBSCRIPTION_CREATE: :subscription_create
|
|
15
|
+
SUBSCRIPTION_CYCLE: :subscription_cycle
|
|
16
|
+
SUBSCRIPTION_UPDATE: :subscription_update
|
|
17
|
+
ONE_TIME: :one_time
|
|
18
|
+
MANUAL: :manual
|
|
19
|
+
SUBSCRIPTION: :subscription
|
|
20
|
+
|
|
21
|
+
def self?.values: -> ::Array[WhopSDK::Models::billing_reasons]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type card_brands =
|
|
4
|
+
:mastercard
|
|
5
|
+
| :visa
|
|
6
|
+
| :amex
|
|
7
|
+
| :discover
|
|
8
|
+
| :unionpay
|
|
9
|
+
| :jcb
|
|
10
|
+
| :diners
|
|
11
|
+
| :link
|
|
12
|
+
| :troy
|
|
13
|
+
| :visadankort
|
|
14
|
+
| :visabancontact
|
|
15
|
+
| :china_union_pay
|
|
16
|
+
| :rupay
|
|
17
|
+
| :jcbrupay
|
|
18
|
+
| :elo
|
|
19
|
+
| :unknown
|
|
20
|
+
|
|
21
|
+
module CardBrands
|
|
22
|
+
extend WhopSDK::Internal::Type::Enum
|
|
23
|
+
|
|
24
|
+
MASTERCARD: :mastercard
|
|
25
|
+
VISA: :visa
|
|
26
|
+
AMEX: :amex
|
|
27
|
+
DISCOVER: :discover
|
|
28
|
+
UNIONPAY: :unionpay
|
|
29
|
+
JCB: :jcb
|
|
30
|
+
DINERS: :diners
|
|
31
|
+
LINK: :link
|
|
32
|
+
TROY: :troy
|
|
33
|
+
VISADANKORT: :visadankort
|
|
34
|
+
VISABANCONTACT: :visabancontact
|
|
35
|
+
CHINA_UNION_PAY: :china_union_pay
|
|
36
|
+
RUPAY: :rupay
|
|
37
|
+
JCBRUPAY: :jcbrupay
|
|
38
|
+
ELO: :elo
|
|
39
|
+
UNKNOWN: :unknown
|
|
40
|
+
|
|
41
|
+
def self?.values: -> ::Array[WhopSDK::Models::card_brands]
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -56,6 +56,7 @@ module WhopSDK
|
|
|
56
56
|
internal_notes: String?,
|
|
57
57
|
override_tax_type: WhopSDK::Models::tax_type?,
|
|
58
58
|
plan_type: WhopSDK::Models::plan_type?,
|
|
59
|
+
product: WhopSDK::CheckoutConfigurationCreateParams::Plan::Product?,
|
|
59
60
|
product_id: String?,
|
|
60
61
|
release_method: WhopSDK::Models::release_method?,
|
|
61
62
|
renewal_price: Float?,
|
|
@@ -89,6 +90,8 @@ module WhopSDK
|
|
|
89
90
|
|
|
90
91
|
attr_accessor plan_type: WhopSDK::Models::plan_type?
|
|
91
92
|
|
|
93
|
+
attr_accessor product: WhopSDK::CheckoutConfigurationCreateParams::Plan::Product?
|
|
94
|
+
|
|
92
95
|
attr_accessor product_id: String?
|
|
93
96
|
|
|
94
97
|
attr_accessor release_method: WhopSDK::Models::release_method?
|
|
@@ -114,6 +117,7 @@ module WhopSDK
|
|
|
114
117
|
?internal_notes: String?,
|
|
115
118
|
?override_tax_type: WhopSDK::Models::tax_type?,
|
|
116
119
|
?plan_type: WhopSDK::Models::plan_type?,
|
|
120
|
+
?product: WhopSDK::CheckoutConfigurationCreateParams::Plan::Product?,
|
|
117
121
|
?product_id: String?,
|
|
118
122
|
?release_method: WhopSDK::Models::release_method?,
|
|
119
123
|
?renewal_price: Float?,
|
|
@@ -135,6 +139,7 @@ module WhopSDK
|
|
|
135
139
|
internal_notes: String?,
|
|
136
140
|
override_tax_type: WhopSDK::Models::tax_type?,
|
|
137
141
|
plan_type: WhopSDK::Models::plan_type?,
|
|
142
|
+
product: WhopSDK::CheckoutConfigurationCreateParams::Plan::Product?,
|
|
138
143
|
product_id: String?,
|
|
139
144
|
release_method: WhopSDK::Models::release_method?,
|
|
140
145
|
renewal_price: Float?,
|
|
@@ -196,6 +201,88 @@ module WhopSDK
|
|
|
196
201
|
|
|
197
202
|
def to_hash: -> { id: String?, direct_upload_id: String? }
|
|
198
203
|
end
|
|
204
|
+
|
|
205
|
+
type product =
|
|
206
|
+
{
|
|
207
|
+
external_identifier: String,
|
|
208
|
+
title: String,
|
|
209
|
+
business_type: WhopSDK::Models::business_types?,
|
|
210
|
+
collect_shipping_address: bool?,
|
|
211
|
+
custom_statement_descriptor: String?,
|
|
212
|
+
description: String?,
|
|
213
|
+
global_affiliate_percentage: Float?,
|
|
214
|
+
global_affiliate_status: WhopSDK::Models::global_affiliate_status?,
|
|
215
|
+
headline: String?,
|
|
216
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
217
|
+
product_tax_code_id: String?,
|
|
218
|
+
redirect_purchase_url: String?,
|
|
219
|
+
route: String?,
|
|
220
|
+
visibility: WhopSDK::Models::visibility?
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
class Product < WhopSDK::Internal::Type::BaseModel
|
|
224
|
+
attr_accessor external_identifier: String
|
|
225
|
+
|
|
226
|
+
attr_accessor title: String
|
|
227
|
+
|
|
228
|
+
attr_accessor business_type: WhopSDK::Models::business_types?
|
|
229
|
+
|
|
230
|
+
attr_accessor collect_shipping_address: bool?
|
|
231
|
+
|
|
232
|
+
attr_accessor custom_statement_descriptor: String?
|
|
233
|
+
|
|
234
|
+
attr_accessor description: String?
|
|
235
|
+
|
|
236
|
+
attr_accessor global_affiliate_percentage: Float?
|
|
237
|
+
|
|
238
|
+
attr_accessor global_affiliate_status: WhopSDK::Models::global_affiliate_status?
|
|
239
|
+
|
|
240
|
+
attr_accessor headline: String?
|
|
241
|
+
|
|
242
|
+
attr_accessor industry_type: WhopSDK::Models::industry_types?
|
|
243
|
+
|
|
244
|
+
attr_accessor product_tax_code_id: String?
|
|
245
|
+
|
|
246
|
+
attr_accessor redirect_purchase_url: String?
|
|
247
|
+
|
|
248
|
+
attr_accessor route: String?
|
|
249
|
+
|
|
250
|
+
attr_accessor visibility: WhopSDK::Models::visibility?
|
|
251
|
+
|
|
252
|
+
def initialize: (
|
|
253
|
+
external_identifier: String,
|
|
254
|
+
title: String,
|
|
255
|
+
?business_type: WhopSDK::Models::business_types?,
|
|
256
|
+
?collect_shipping_address: bool?,
|
|
257
|
+
?custom_statement_descriptor: String?,
|
|
258
|
+
?description: String?,
|
|
259
|
+
?global_affiliate_percentage: Float?,
|
|
260
|
+
?global_affiliate_status: WhopSDK::Models::global_affiliate_status?,
|
|
261
|
+
?headline: String?,
|
|
262
|
+
?industry_type: WhopSDK::Models::industry_types?,
|
|
263
|
+
?product_tax_code_id: String?,
|
|
264
|
+
?redirect_purchase_url: String?,
|
|
265
|
+
?route: String?,
|
|
266
|
+
?visibility: WhopSDK::Models::visibility?
|
|
267
|
+
) -> void
|
|
268
|
+
|
|
269
|
+
def to_hash: -> {
|
|
270
|
+
external_identifier: String,
|
|
271
|
+
title: String,
|
|
272
|
+
business_type: WhopSDK::Models::business_types?,
|
|
273
|
+
collect_shipping_address: bool?,
|
|
274
|
+
custom_statement_descriptor: String?,
|
|
275
|
+
description: String?,
|
|
276
|
+
global_affiliate_percentage: Float?,
|
|
277
|
+
global_affiliate_status: WhopSDK::Models::global_affiliate_status?,
|
|
278
|
+
headline: String?,
|
|
279
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
280
|
+
product_tax_code_id: String?,
|
|
281
|
+
redirect_purchase_url: String?,
|
|
282
|
+
route: String?,
|
|
283
|
+
visibility: WhopSDK::Models::visibility?
|
|
284
|
+
}
|
|
285
|
+
end
|
|
199
286
|
end
|
|
200
287
|
end
|
|
201
288
|
end
|