whop_sdk 0.0.6 → 0.0.7
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 +13 -0
- data/README.md +1 -1
- data/lib/whop_sdk/models/access_token_create_params.rb +26 -36
- data/lib/whop_sdk/models/card_brands.rb +1 -0
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -9
- data/lib/whop_sdk/models/currency.rb +1 -0
- data/lib/whop_sdk/models/forum_post_create_params.rb +20 -1
- data/lib/whop_sdk/models/forum_post_update_params.rb +20 -1
- data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +1 -0
- data/lib/whop_sdk/models/shipment.rb +3 -3
- data/lib/whop_sdk/models/shipment_list_response.rb +3 -3
- data/lib/whop_sdk/resources/access_tokens.rb +9 -7
- data/lib/whop_sdk/resources/forum_posts.rb +6 -2
- data/lib/whop_sdk/version.rb +1 -1
- data/rbi/whop_sdk/models/access_token_create_params.rbi +34 -77
- data/rbi/whop_sdk/models/card_brands.rbi +1 -0
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -8
- data/rbi/whop_sdk/models/currency.rbi +1 -0
- data/rbi/whop_sdk/models/forum_post_create_params.rbi +42 -0
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +42 -0
- data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +5 -0
- data/rbi/whop_sdk/models/shipment.rbi +6 -4
- data/rbi/whop_sdk/models/shipment_list_response.rbi +6 -4
- data/rbi/whop_sdk/resources/access_tokens.rbi +19 -14
- data/rbi/whop_sdk/resources/forum_posts.rbi +8 -0
- data/sig/whop_sdk/models/access_token_create_params.rbs +14 -29
- data/sig/whop_sdk/models/card_brands.rbs +2 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -5
- data/sig/whop_sdk/models/currency.rbs +2 -0
- data/sig/whop_sdk/models/forum_post_create_params.rbs +17 -1
- data/sig/whop_sdk/models/forum_post_update_params.rbs +17 -1
- data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +2 -0
- data/sig/whop_sdk/models/shipment.rbs +4 -4
- data/sig/whop_sdk/models/shipment_list_response.rbs +4 -4
- data/sig/whop_sdk/resources/access_tokens.rbs +3 -3
- data/sig/whop_sdk/resources/forum_posts.rbs +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3eecc254b8ba9c6ee8fd458763a9749b1478efc921f4f3c696823cae79f31a1c
|
|
4
|
+
data.tar.gz: 0b085d7a2c1551bc99016a562266d326312f8da3b3a6104a08426677f9b89c1e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ed891547df3d339cbec397a7d78e55e7c00610187dc5cb80acf05e6fc2e93e0952020f55723e98b2f5230a220424d3bdf8498f70ac472f8f5e2aed37dfa0e6e
|
|
7
|
+
data.tar.gz: 9d9ca43b7fc87ff4df8a9e050d15503631e25070369381116c362b6cae95cf0740de7a3488325538928974349c1687e7147f729d8794bbbe44ca2ef79b125259
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.7 (2025-11-13)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.0.6...v0.0.7](https://github.com/whopio/whopsdk-ruby/compare/v0.0.6...v0.0.7)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([ebffee5](https://github.com/whopio/whopsdk-ruby/commit/ebffee5d68b29d6a7219b6f5446229c1734a9c58))
|
|
10
|
+
* **api:** api update ([9984831](https://github.com/whopio/whopsdk-ruby/commit/9984831a51353e776c0e3dd6c4e58bc7ecf94cb3))
|
|
11
|
+
* **api:** api update ([89cb635](https://github.com/whopio/whopsdk-ruby/commit/89cb635fcb034579638e5946bf7d773639848f80))
|
|
12
|
+
* **api:** api update ([71c9708](https://github.com/whopio/whopsdk-ruby/commit/71c9708ff5359af68c59e22eafe8c9b2af8be588))
|
|
13
|
+
* **api:** api update ([f0ed1e2](https://github.com/whopio/whopsdk-ruby/commit/f0ed1e29b2293b5bb408b7d3c12722df36add5b7))
|
|
14
|
+
* **api:** api update ([117f8ff](https://github.com/whopio/whopsdk-ruby/commit/117f8ff26be6ccd0e004d74e65c3ad866ae31d64))
|
|
15
|
+
|
|
3
16
|
## 0.0.6 (2025-11-10)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v0.0.5...v0.0.6](https://github.com/whopio/whopsdk-ruby/compare/v0.0.5...v0.0.6)
|
data/README.md
CHANGED
|
@@ -7,25 +7,13 @@ module WhopSDK
|
|
|
7
7
|
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include WhopSDK::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!attribute
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
# @return [Array<String>]
|
|
15
|
-
required :scoped_actions, WhopSDK::Internal::Type::ArrayOf[String]
|
|
16
|
-
|
|
17
|
-
# @!attribute target_resource_id
|
|
18
|
-
# The ID of the target resource (Company, User, etc.) for which the access token
|
|
19
|
-
# is being created.
|
|
10
|
+
# @!attribute company_id
|
|
11
|
+
# The ID of the Company to generate the token for. The API key must have
|
|
12
|
+
# permission to access this Company, such as the being the company the API key
|
|
13
|
+
# belongs to or a sub-merchant of it
|
|
20
14
|
#
|
|
21
15
|
# @return [String]
|
|
22
|
-
required :
|
|
23
|
-
|
|
24
|
-
# @!attribute target_resource_type
|
|
25
|
-
# The type of the target resource (company, user, product, experience, etc.).
|
|
26
|
-
#
|
|
27
|
-
# @return [Symbol, WhopSDK::Models::AccessTokenCreateParams::TargetResourceType]
|
|
28
|
-
required :target_resource_type, enum: -> { WhopSDK::AccessTokenCreateParams::TargetResourceType }
|
|
16
|
+
required :company_id, String
|
|
29
17
|
|
|
30
18
|
# @!attribute expires_at
|
|
31
19
|
# The expiration timestamp for the access token. If not provided, a default
|
|
@@ -35,33 +23,35 @@ module WhopSDK
|
|
|
35
23
|
# @return [Time, nil]
|
|
36
24
|
optional :expires_at, Time, nil?: true
|
|
37
25
|
|
|
38
|
-
# @!
|
|
26
|
+
# @!attribute scoped_actions
|
|
27
|
+
# Array of desired scoped actions for the access token. If sent as an empty array
|
|
28
|
+
# or not provided, all permissions from the API key making the request will be
|
|
29
|
+
# available on the token. If sending an explicit list, they must be a subset of
|
|
30
|
+
# the API keys's existing permissions. Otherwise, an error will be raised.
|
|
31
|
+
#
|
|
32
|
+
# @return [Array<String>, nil]
|
|
33
|
+
optional :scoped_actions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute user_id
|
|
36
|
+
# The ID of the User to generate the token for. The API key must have permission
|
|
37
|
+
# to access this User.
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
required :user_id, String
|
|
41
|
+
|
|
42
|
+
# @!method initialize(company_id:, user_id:, expires_at: nil, scoped_actions: nil, request_options: {})
|
|
39
43
|
# Some parameter documentations has been truncated, see
|
|
40
44
|
# {WhopSDK::Models::AccessTokenCreateParams} for more details.
|
|
41
45
|
#
|
|
42
|
-
# @param
|
|
43
|
-
#
|
|
44
|
-
# @param target_resource_id [String] The ID of the target resource (Company, User, etc.) for which the access token i
|
|
46
|
+
# @param company_id [String] The ID of the Company to generate the token for. The API key must have permissio
|
|
45
47
|
#
|
|
46
|
-
# @param
|
|
48
|
+
# @param user_id [String] The ID of the User to generate the token for. The API key must have permission t
|
|
47
49
|
#
|
|
48
50
|
# @param expires_at [Time, nil] The expiration timestamp for the access token. If not provided, a default expira
|
|
49
51
|
#
|
|
52
|
+
# @param scoped_actions [Array<String>, nil] Array of desired scoped actions for the access token. If sent as an empty array
|
|
53
|
+
#
|
|
50
54
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
51
|
-
|
|
52
|
-
# The type of the target resource (company, user, product, experience, etc.).
|
|
53
|
-
module TargetResourceType
|
|
54
|
-
extend WhopSDK::Internal::Type::Enum
|
|
55
|
-
|
|
56
|
-
COMPANY = :company
|
|
57
|
-
PRODUCT = :product
|
|
58
|
-
EXPERIENCE = :experience
|
|
59
|
-
APP = :app
|
|
60
|
-
USER = :user
|
|
61
|
-
|
|
62
|
-
# @!method self.values
|
|
63
|
-
# @return [Array<Symbol>]
|
|
64
|
-
end
|
|
65
55
|
end
|
|
66
56
|
end
|
|
67
57
|
end
|
|
@@ -57,18 +57,18 @@ module WhopSDK
|
|
|
57
57
|
# @return [String]
|
|
58
58
|
required :company_id, String
|
|
59
59
|
|
|
60
|
+
# @!attribute currency
|
|
61
|
+
# The respective currency identifier for the plan.
|
|
62
|
+
#
|
|
63
|
+
# @return [Symbol, WhopSDK::Models::Currency]
|
|
64
|
+
required :currency, enum: -> { WhopSDK::Currency }
|
|
65
|
+
|
|
60
66
|
# @!attribute billing_period
|
|
61
67
|
# The interval at which the plan charges (renewal plans).
|
|
62
68
|
#
|
|
63
69
|
# @return [Integer, nil]
|
|
64
70
|
optional :billing_period, Integer, nil?: true
|
|
65
71
|
|
|
66
|
-
# @!attribute currency
|
|
67
|
-
# The available currencies on the platform
|
|
68
|
-
#
|
|
69
|
-
# @return [Symbol, WhopSDK::Models::Currency, nil]
|
|
70
|
-
optional :currency, enum: -> { WhopSDK::Currency }, nil?: true
|
|
71
|
-
|
|
72
72
|
# @!attribute custom_fields
|
|
73
73
|
# An array of custom field objects.
|
|
74
74
|
#
|
|
@@ -181,7 +181,7 @@ module WhopSDK
|
|
|
181
181
|
# @return [Symbol, WhopSDK::Models::Visibility, nil]
|
|
182
182
|
optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
|
|
183
183
|
|
|
184
|
-
# @!method initialize(company_id:, billing_period: nil,
|
|
184
|
+
# @!method initialize(company_id:, currency:, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil)
|
|
185
185
|
# Some parameter documentations has been truncated, see
|
|
186
186
|
# {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan} for more details.
|
|
187
187
|
#
|
|
@@ -189,9 +189,9 @@ module WhopSDK
|
|
|
189
189
|
#
|
|
190
190
|
# @param company_id [String] The company the plan should be created for.
|
|
191
191
|
#
|
|
192
|
-
# @param
|
|
192
|
+
# @param currency [Symbol, WhopSDK::Models::Currency] The respective currency identifier for the plan.
|
|
193
193
|
#
|
|
194
|
-
# @param
|
|
194
|
+
# @param billing_period [Integer, nil] The interval at which the plan charges (renewal plans).
|
|
195
195
|
#
|
|
196
196
|
# @param custom_fields [Array<WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::CustomField>, nil] An array of custom field objects.
|
|
197
197
|
#
|
|
@@ -74,7 +74,13 @@ module WhopSDK
|
|
|
74
74
|
# @return [String, nil]
|
|
75
75
|
optional :title, String, nil?: true
|
|
76
76
|
|
|
77
|
-
# @!
|
|
77
|
+
# @!attribute visibility
|
|
78
|
+
# The visibility types for forum posts
|
|
79
|
+
#
|
|
80
|
+
# @return [Symbol, WhopSDK::Models::ForumPostCreateParams::Visibility, nil]
|
|
81
|
+
optional :visibility, enum: -> { WhopSDK::ForumPostCreateParams::Visibility }, nil?: true
|
|
82
|
+
|
|
83
|
+
# @!method initialize(experience_id:, attachments: nil, content: nil, is_mention: nil, parent_id: nil, paywall_amount: nil, paywall_currency: nil, pinned: nil, poll: nil, title: nil, visibility: nil, request_options: {})
|
|
78
84
|
# Some parameter documentations has been truncated, see
|
|
79
85
|
# {WhopSDK::Models::ForumPostCreateParams} for more details.
|
|
80
86
|
#
|
|
@@ -98,6 +104,8 @@ module WhopSDK
|
|
|
98
104
|
#
|
|
99
105
|
# @param title [String, nil] The title of the post. Only visible if paywalled.
|
|
100
106
|
#
|
|
107
|
+
# @param visibility [Symbol, WhopSDK::Models::ForumPostCreateParams::Visibility, nil] The visibility types for forum posts
|
|
108
|
+
#
|
|
101
109
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
102
110
|
|
|
103
111
|
# Input for an attachment
|
|
@@ -185,6 +193,17 @@ module WhopSDK
|
|
|
185
193
|
# @param text [String] The text of the poll option
|
|
186
194
|
end
|
|
187
195
|
end
|
|
196
|
+
|
|
197
|
+
# The visibility types for forum posts
|
|
198
|
+
module Visibility
|
|
199
|
+
extend WhopSDK::Internal::Type::Enum
|
|
200
|
+
|
|
201
|
+
MEMBERS_ONLY = :members_only
|
|
202
|
+
GLOBALLY_VISIBLE = :globally_visible
|
|
203
|
+
|
|
204
|
+
# @!method self.values
|
|
205
|
+
# @return [Array<Symbol>]
|
|
206
|
+
end
|
|
188
207
|
end
|
|
189
208
|
end
|
|
190
209
|
end
|
|
@@ -34,7 +34,13 @@ module WhopSDK
|
|
|
34
34
|
# @return [String, nil]
|
|
35
35
|
optional :title, String, nil?: true
|
|
36
36
|
|
|
37
|
-
# @!
|
|
37
|
+
# @!attribute visibility
|
|
38
|
+
# The visibility types for forum posts
|
|
39
|
+
#
|
|
40
|
+
# @return [Symbol, WhopSDK::Models::ForumPostUpdateParams::Visibility, nil]
|
|
41
|
+
optional :visibility, enum: -> { WhopSDK::ForumPostUpdateParams::Visibility }, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!method initialize(attachments: nil, content: nil, is_pinned: nil, title: nil, visibility: nil, request_options: {})
|
|
38
44
|
# Some parameter documentations has been truncated, see
|
|
39
45
|
# {WhopSDK::Models::ForumPostUpdateParams} for more details.
|
|
40
46
|
#
|
|
@@ -46,6 +52,8 @@ module WhopSDK
|
|
|
46
52
|
#
|
|
47
53
|
# @param title [String, nil] The title of the post. Only visible if paywalled.
|
|
48
54
|
#
|
|
55
|
+
# @param visibility [Symbol, WhopSDK::Models::ForumPostUpdateParams::Visibility, nil] The visibility types for forum posts
|
|
56
|
+
#
|
|
49
57
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
50
58
|
|
|
51
59
|
# Input for an attachment
|
|
@@ -99,6 +107,17 @@ module WhopSDK
|
|
|
99
107
|
# @!method self.variants
|
|
100
108
|
# @return [Array(WhopSDK::Models::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::ForumPostUpdateParams::Attachment::AttachmentInputWithID)]
|
|
101
109
|
end
|
|
110
|
+
|
|
111
|
+
# The visibility types for forum posts
|
|
112
|
+
module Visibility
|
|
113
|
+
extend WhopSDK::Internal::Type::Enum
|
|
114
|
+
|
|
115
|
+
MEMBERS_ONLY = :members_only
|
|
116
|
+
GLOBALLY_VISIBLE = :globally_visible
|
|
117
|
+
|
|
118
|
+
# @!method self.values
|
|
119
|
+
# @return [Array<Symbol>]
|
|
120
|
+
end
|
|
102
121
|
end
|
|
103
122
|
end
|
|
104
123
|
end
|
|
@@ -30,8 +30,8 @@ module WhopSDK
|
|
|
30
30
|
# @!attribute payment
|
|
31
31
|
# The payment of the shipment
|
|
32
32
|
#
|
|
33
|
-
# @return [WhopSDK::Models::Shipment::Payment]
|
|
34
|
-
required :payment, -> { WhopSDK::Shipment::Payment }
|
|
33
|
+
# @return [WhopSDK::Models::Shipment::Payment, nil]
|
|
34
|
+
required :payment, -> { WhopSDK::Shipment::Payment }, nil?: true
|
|
35
35
|
|
|
36
36
|
# @!attribute service
|
|
37
37
|
# The service of the shipment
|
|
@@ -74,7 +74,7 @@ module WhopSDK
|
|
|
74
74
|
#
|
|
75
75
|
# @param delivery_estimate [Time, nil] The delivery estimate of the shipment
|
|
76
76
|
#
|
|
77
|
-
# @param payment [WhopSDK::Models::Shipment::Payment] The payment of the shipment
|
|
77
|
+
# @param payment [WhopSDK::Models::Shipment::Payment, nil] The payment of the shipment
|
|
78
78
|
#
|
|
79
79
|
# @param service [String, nil] The service of the shipment
|
|
80
80
|
#
|
|
@@ -31,8 +31,8 @@ module WhopSDK
|
|
|
31
31
|
# @!attribute payment
|
|
32
32
|
# The payment of the shipment
|
|
33
33
|
#
|
|
34
|
-
# @return [WhopSDK::Models::ShipmentListResponse::Payment]
|
|
35
|
-
required :payment, -> { WhopSDK::Models::ShipmentListResponse::Payment }
|
|
34
|
+
# @return [WhopSDK::Models::ShipmentListResponse::Payment, nil]
|
|
35
|
+
required :payment, -> { WhopSDK::Models::ShipmentListResponse::Payment }, nil?: true
|
|
36
36
|
|
|
37
37
|
# @!attribute service
|
|
38
38
|
# The service of the shipment
|
|
@@ -75,7 +75,7 @@ module WhopSDK
|
|
|
75
75
|
#
|
|
76
76
|
# @param delivery_estimate [Time, nil] The delivery estimate of the shipment
|
|
77
77
|
#
|
|
78
|
-
# @param payment [WhopSDK::Models::ShipmentListResponse::Payment] The payment of the shipment
|
|
78
|
+
# @param payment [WhopSDK::Models::ShipmentListResponse::Payment, nil] The payment of the shipment
|
|
79
79
|
#
|
|
80
80
|
# @param service [String, nil] The service of the shipment
|
|
81
81
|
#
|
|
@@ -6,19 +6,21 @@ module WhopSDK
|
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
|
7
7
|
# {WhopSDK::Models::AccessTokenCreateParams} for more details.
|
|
8
8
|
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Create a short-lived access token to authenticate API requests on behalf of a
|
|
10
|
+
# Company or User. This token should be used with Whop's web and mobile embedded
|
|
11
|
+
# components. You must provide either a company_id or a user_id argument, but not
|
|
12
|
+
# both.
|
|
11
13
|
#
|
|
12
|
-
# @overload create(
|
|
14
|
+
# @overload create(company_id:, user_id:, expires_at: nil, scoped_actions: nil, request_options: {})
|
|
13
15
|
#
|
|
14
|
-
# @param
|
|
16
|
+
# @param company_id [String] The ID of the Company to generate the token for. The API key must have permissio
|
|
15
17
|
#
|
|
16
|
-
# @param
|
|
17
|
-
#
|
|
18
|
-
# @param target_resource_type [Symbol, WhopSDK::Models::AccessTokenCreateParams::TargetResourceType] The type of the target resource (company, user, product, experience, etc.).
|
|
18
|
+
# @param user_id [String] The ID of the User to generate the token for. The API key must have permission t
|
|
19
19
|
#
|
|
20
20
|
# @param expires_at [Time, nil] The expiration timestamp for the access token. If not provided, a default expira
|
|
21
21
|
#
|
|
22
|
+
# @param scoped_actions [Array<String>, nil] Array of desired scoped actions for the access token. If sent as an empty array
|
|
23
|
+
#
|
|
22
24
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
23
25
|
#
|
|
24
26
|
# @return [WhopSDK::Models::AccessTokenCreateResponse]
|
|
@@ -12,7 +12,7 @@ module WhopSDK
|
|
|
12
12
|
#
|
|
13
13
|
# - `forum:post:create`
|
|
14
14
|
#
|
|
15
|
-
# @overload create(experience_id:, attachments: nil, content: nil, is_mention: nil, parent_id: nil, paywall_amount: nil, paywall_currency: nil, pinned: nil, poll: nil, title: nil, request_options: {})
|
|
15
|
+
# @overload create(experience_id:, attachments: nil, content: nil, is_mention: nil, parent_id: nil, paywall_amount: nil, paywall_currency: nil, pinned: nil, poll: nil, title: nil, visibility: nil, request_options: {})
|
|
16
16
|
#
|
|
17
17
|
# @param experience_id [String] The experience to create this post in
|
|
18
18
|
#
|
|
@@ -34,6 +34,8 @@ module WhopSDK
|
|
|
34
34
|
#
|
|
35
35
|
# @param title [String, nil] The title of the post. Only visible if paywalled.
|
|
36
36
|
#
|
|
37
|
+
# @param visibility [Symbol, WhopSDK::Models::ForumPostCreateParams::Visibility, nil] The visibility types for forum posts
|
|
38
|
+
#
|
|
37
39
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
38
40
|
#
|
|
39
41
|
# @return [WhopSDK::Models::ForumPost]
|
|
@@ -79,7 +81,7 @@ module WhopSDK
|
|
|
79
81
|
#
|
|
80
82
|
# Update an existing forum post
|
|
81
83
|
#
|
|
82
|
-
# @overload update(id, attachments: nil, content: nil, is_pinned: nil, title: nil, request_options: {})
|
|
84
|
+
# @overload update(id, attachments: nil, content: nil, is_pinned: nil, title: nil, visibility: nil, request_options: {})
|
|
83
85
|
#
|
|
84
86
|
# @param id [String] The ID of the forum post to update
|
|
85
87
|
#
|
|
@@ -91,6 +93,8 @@ module WhopSDK
|
|
|
91
93
|
#
|
|
92
94
|
# @param title [String, nil] The title of the post. Only visible if paywalled.
|
|
93
95
|
#
|
|
96
|
+
# @param visibility [Symbol, WhopSDK::Models::ForumPostUpdateParams::Visibility, nil] The visibility types for forum posts
|
|
97
|
+
#
|
|
94
98
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
95
99
|
#
|
|
96
100
|
# @return [WhopSDK::Models::ForumPost]
|
data/lib/whop_sdk/version.rb
CHANGED
|
@@ -11,21 +11,11 @@ module WhopSDK
|
|
|
11
11
|
T.any(WhopSDK::AccessTokenCreateParams, WhopSDK::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
attr_accessor :scoped_actions
|
|
18
|
-
|
|
19
|
-
# The ID of the target resource (Company, User, etc.) for which the access token
|
|
20
|
-
# is being created.
|
|
14
|
+
# The ID of the Company to generate the token for. The API key must have
|
|
15
|
+
# permission to access this Company, such as the being the company the API key
|
|
16
|
+
# belongs to or a sub-merchant of it
|
|
21
17
|
sig { returns(String) }
|
|
22
|
-
attr_accessor :
|
|
23
|
-
|
|
24
|
-
# The type of the target resource (company, user, product, experience, etc.).
|
|
25
|
-
sig do
|
|
26
|
-
returns(WhopSDK::AccessTokenCreateParams::TargetResourceType::OrSymbol)
|
|
27
|
-
end
|
|
28
|
-
attr_accessor :target_resource_type
|
|
18
|
+
attr_accessor :company_id
|
|
29
19
|
|
|
30
20
|
# The expiration timestamp for the access token. If not provided, a default
|
|
31
21
|
# expiration time of 1 hour will be used. The expiration can be set to a maximum
|
|
@@ -33,29 +23,44 @@ module WhopSDK
|
|
|
33
23
|
sig { returns(T.nilable(Time)) }
|
|
34
24
|
attr_accessor :expires_at
|
|
35
25
|
|
|
26
|
+
# Array of desired scoped actions for the access token. If sent as an empty array
|
|
27
|
+
# or not provided, all permissions from the API key making the request will be
|
|
28
|
+
# available on the token. If sending an explicit list, they must be a subset of
|
|
29
|
+
# the API keys's existing permissions. Otherwise, an error will be raised.
|
|
30
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
31
|
+
attr_accessor :scoped_actions
|
|
32
|
+
|
|
33
|
+
# The ID of the User to generate the token for. The API key must have permission
|
|
34
|
+
# to access this User.
|
|
35
|
+
sig { returns(String) }
|
|
36
|
+
attr_accessor :user_id
|
|
37
|
+
|
|
36
38
|
sig do
|
|
37
39
|
params(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
target_resource_type:
|
|
41
|
-
WhopSDK::AccessTokenCreateParams::TargetResourceType::OrSymbol,
|
|
40
|
+
company_id: String,
|
|
41
|
+
user_id: String,
|
|
42
42
|
expires_at: T.nilable(Time),
|
|
43
|
+
scoped_actions: T.nilable(T::Array[String]),
|
|
43
44
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
44
45
|
).returns(T.attached_class)
|
|
45
46
|
end
|
|
46
47
|
def self.new(
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
#
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
target_resource_type:,
|
|
48
|
+
# The ID of the Company to generate the token for. The API key must have
|
|
49
|
+
# permission to access this Company, such as the being the company the API key
|
|
50
|
+
# belongs to or a sub-merchant of it
|
|
51
|
+
company_id:,
|
|
52
|
+
# The ID of the User to generate the token for. The API key must have permission
|
|
53
|
+
# to access this User.
|
|
54
|
+
user_id:,
|
|
55
55
|
# The expiration timestamp for the access token. If not provided, a default
|
|
56
56
|
# expiration time of 1 hour will be used. The expiration can be set to a maximum
|
|
57
57
|
# of 3 hours from the current time.
|
|
58
58
|
expires_at: nil,
|
|
59
|
+
# Array of desired scoped actions for the access token. If sent as an empty array
|
|
60
|
+
# or not provided, all permissions from the API key making the request will be
|
|
61
|
+
# available on the token. If sending an explicit list, they must be a subset of
|
|
62
|
+
# the API keys's existing permissions. Otherwise, an error will be raised.
|
|
63
|
+
scoped_actions: nil,
|
|
59
64
|
request_options: {}
|
|
60
65
|
)
|
|
61
66
|
end
|
|
@@ -63,64 +68,16 @@ module WhopSDK
|
|
|
63
68
|
sig do
|
|
64
69
|
override.returns(
|
|
65
70
|
{
|
|
66
|
-
|
|
67
|
-
target_resource_id: String,
|
|
68
|
-
target_resource_type:
|
|
69
|
-
WhopSDK::AccessTokenCreateParams::TargetResourceType::OrSymbol,
|
|
71
|
+
company_id: String,
|
|
70
72
|
expires_at: T.nilable(Time),
|
|
73
|
+
scoped_actions: T.nilable(T::Array[String]),
|
|
74
|
+
user_id: String,
|
|
71
75
|
request_options: WhopSDK::RequestOptions
|
|
72
76
|
}
|
|
73
77
|
)
|
|
74
78
|
end
|
|
75
79
|
def to_hash
|
|
76
80
|
end
|
|
77
|
-
|
|
78
|
-
# The type of the target resource (company, user, product, experience, etc.).
|
|
79
|
-
module TargetResourceType
|
|
80
|
-
extend WhopSDK::Internal::Type::Enum
|
|
81
|
-
|
|
82
|
-
TaggedSymbol =
|
|
83
|
-
T.type_alias do
|
|
84
|
-
T.all(Symbol, WhopSDK::AccessTokenCreateParams::TargetResourceType)
|
|
85
|
-
end
|
|
86
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
87
|
-
|
|
88
|
-
COMPANY =
|
|
89
|
-
T.let(
|
|
90
|
-
:company,
|
|
91
|
-
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
92
|
-
)
|
|
93
|
-
PRODUCT =
|
|
94
|
-
T.let(
|
|
95
|
-
:product,
|
|
96
|
-
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
97
|
-
)
|
|
98
|
-
EXPERIENCE =
|
|
99
|
-
T.let(
|
|
100
|
-
:experience,
|
|
101
|
-
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
102
|
-
)
|
|
103
|
-
APP =
|
|
104
|
-
T.let(
|
|
105
|
-
:app,
|
|
106
|
-
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
107
|
-
)
|
|
108
|
-
USER =
|
|
109
|
-
T.let(
|
|
110
|
-
:user,
|
|
111
|
-
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
112
|
-
)
|
|
113
|
-
|
|
114
|
-
sig do
|
|
115
|
-
override.returns(
|
|
116
|
-
T::Array[
|
|
117
|
-
WhopSDK::AccessTokenCreateParams::TargetResourceType::TaggedSymbol
|
|
118
|
-
]
|
|
119
|
-
)
|
|
120
|
-
end
|
|
121
|
-
def self.values
|
|
122
|
-
end
|
|
123
|
-
end
|
|
124
81
|
end
|
|
125
82
|
end
|
|
126
83
|
end
|
|
@@ -25,6 +25,7 @@ module WhopSDK
|
|
|
25
25
|
RUPAY = T.let(:rupay, WhopSDK::CardBrands::TaggedSymbol)
|
|
26
26
|
JCBRUPAY = T.let(:jcbrupay, WhopSDK::CardBrands::TaggedSymbol)
|
|
27
27
|
ELO = T.let(:elo, WhopSDK::CardBrands::TaggedSymbol)
|
|
28
|
+
MAESTRO = T.let(:maestro, WhopSDK::CardBrands::TaggedSymbol)
|
|
28
29
|
UNKNOWN = T.let(:unknown, WhopSDK::CardBrands::TaggedSymbol)
|
|
29
30
|
|
|
30
31
|
sig { override.returns(T::Array[WhopSDK::CardBrands::TaggedSymbol]) }
|
|
@@ -94,14 +94,14 @@ module WhopSDK
|
|
|
94
94
|
sig { returns(String) }
|
|
95
95
|
attr_accessor :company_id
|
|
96
96
|
|
|
97
|
+
# The respective currency identifier for the plan.
|
|
98
|
+
sig { returns(WhopSDK::Currency::OrSymbol) }
|
|
99
|
+
attr_accessor :currency
|
|
100
|
+
|
|
97
101
|
# The interval at which the plan charges (renewal plans).
|
|
98
102
|
sig { returns(T.nilable(Integer)) }
|
|
99
103
|
attr_accessor :billing_period
|
|
100
104
|
|
|
101
|
-
# The available currencies on the platform
|
|
102
|
-
sig { returns(T.nilable(WhopSDK::Currency::OrSymbol)) }
|
|
103
|
-
attr_accessor :currency
|
|
104
|
-
|
|
105
105
|
# An array of custom field objects.
|
|
106
106
|
sig do
|
|
107
107
|
returns(
|
|
@@ -225,8 +225,8 @@ module WhopSDK
|
|
|
225
225
|
sig do
|
|
226
226
|
params(
|
|
227
227
|
company_id: String,
|
|
228
|
+
currency: WhopSDK::Currency::OrSymbol,
|
|
228
229
|
billing_period: T.nilable(Integer),
|
|
229
|
-
currency: T.nilable(WhopSDK::Currency::OrSymbol),
|
|
230
230
|
custom_fields:
|
|
231
231
|
T.nilable(
|
|
232
232
|
T::Array[
|
|
@@ -266,10 +266,10 @@ module WhopSDK
|
|
|
266
266
|
def self.new(
|
|
267
267
|
# The company the plan should be created for.
|
|
268
268
|
company_id:,
|
|
269
|
+
# The respective currency identifier for the plan.
|
|
270
|
+
currency:,
|
|
269
271
|
# The interval at which the plan charges (renewal plans).
|
|
270
272
|
billing_period: nil,
|
|
271
|
-
# The available currencies on the platform
|
|
272
|
-
currency: nil,
|
|
273
273
|
# An array of custom field objects.
|
|
274
274
|
custom_fields: nil,
|
|
275
275
|
# The description of the plan.
|
|
@@ -315,8 +315,8 @@ module WhopSDK
|
|
|
315
315
|
override.returns(
|
|
316
316
|
{
|
|
317
317
|
company_id: String,
|
|
318
|
+
currency: WhopSDK::Currency::OrSymbol,
|
|
318
319
|
billing_period: T.nilable(Integer),
|
|
319
|
-
currency: T.nilable(WhopSDK::Currency::OrSymbol),
|
|
320
320
|
custom_fields:
|
|
321
321
|
T.nilable(
|
|
322
322
|
T::Array[
|
|
@@ -93,6 +93,7 @@ module WhopSDK
|
|
|
93
93
|
UZS = T.let(:uzs, WhopSDK::Currency::TaggedSymbol)
|
|
94
94
|
RUB = T.let(:rub, WhopSDK::Currency::TaggedSymbol)
|
|
95
95
|
BTC = T.let(:btc, WhopSDK::Currency::TaggedSymbol)
|
|
96
|
+
CNY = T.let(:cny, WhopSDK::Currency::TaggedSymbol)
|
|
96
97
|
|
|
97
98
|
sig { override.returns(T::Array[WhopSDK::Currency::TaggedSymbol]) }
|
|
98
99
|
def self.values
|