whop_sdk 0.0.14 → 0.0.15
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 +10 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +4 -0
- data/lib/whop_sdk/models/checkout_configuration.rb +9 -1
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
- data/lib/whop_sdk/models/checkout_configuration_list_response.rb +9 -1
- data/lib/whop_sdk/models/experience.rb +9 -1
- data/lib/whop_sdk/models/experience_create_params.rb +9 -1
- data/lib/whop_sdk/models/experience_list_response.rb +9 -1
- data/lib/whop_sdk/models/experience_update_params.rb +9 -1
- data/lib/whop_sdk/models/fee_markup_create_params.rb +62 -0
- data/lib/whop_sdk/models/fee_markup_create_response.rb +67 -0
- data/lib/whop_sdk/models/fee_markup_delete_params.rb +14 -0
- data/lib/whop_sdk/models/fee_markup_delete_response.rb +8 -0
- data/lib/whop_sdk/models/fee_markup_list_params.rb +58 -0
- data/lib/whop_sdk/models/fee_markup_list_response.rb +67 -0
- data/lib/whop_sdk/models/fee_markup_type.rb +19 -0
- data/lib/whop_sdk/models.rb +8 -0
- data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
- data/lib/whop_sdk/resources/experiences.rb +6 -2
- data/lib/whop_sdk/resources/fee_markups.rb +112 -0
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +8 -0
- data/rbi/whop_sdk/client.rbi +3 -0
- data/rbi/whop_sdk/models/checkout_configuration.rbi +8 -0
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/experience.rbi +8 -0
- data/rbi/whop_sdk/models/experience_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/experience_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/experience_update_params.rbi +8 -0
- data/rbi/whop_sdk/models/fee_markup_create_params.rbi +83 -0
- data/rbi/whop_sdk/models/fee_markup_create_response.rbi +89 -0
- data/rbi/whop_sdk/models/fee_markup_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/fee_markup_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/fee_markup_list_params.rbi +77 -0
- data/rbi/whop_sdk/models/fee_markup_list_response.rbi +89 -0
- data/rbi/whop_sdk/models/fee_markup_type.rbi +37 -0
- data/rbi/whop_sdk/models.rbi +8 -0
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
- data/rbi/whop_sdk/resources/experiences.rbi +6 -0
- data/rbi/whop_sdk/resources/fee_markups.rbi +96 -0
- data/sig/whop_sdk/client.rbs +2 -0
- data/sig/whop_sdk/models/checkout_configuration.rbs +5 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
- data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +5 -0
- data/sig/whop_sdk/models/experience.rbs +5 -0
- data/sig/whop_sdk/models/experience_create_params.rbs +11 -1
- data/sig/whop_sdk/models/experience_list_response.rbs +5 -0
- data/sig/whop_sdk/models/experience_update_params.rbs +5 -0
- data/sig/whop_sdk/models/fee_markup_create_params.rbs +51 -0
- data/sig/whop_sdk/models/fee_markup_create_response.rbs +50 -0
- data/sig/whop_sdk/models/fee_markup_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/fee_markup_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/fee_markup_list_params.rbs +46 -0
- data/sig/whop_sdk/models/fee_markup_list_response.rbs +50 -0
- data/sig/whop_sdk/models/fee_markup_type.rbs +22 -0
- data/sig/whop_sdk/models.rbs +8 -0
- data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
- data/sig/whop_sdk/resources/experiences.rbs +2 -0
- data/sig/whop_sdk/resources/fee_markups.rbs +28 -0
- metadata +26 -2
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class FeeMarkups
|
|
6
|
+
# Creates or updates a fee markup for a company.
|
|
7
|
+
#
|
|
8
|
+
# Required permissions:
|
|
9
|
+
#
|
|
10
|
+
# - `company:update_child_fees`
|
|
11
|
+
#
|
|
12
|
+
# @overload create(company_id:, fee_type:, fixed_fee_usd: nil, metadata: nil, notes: nil, percentage_fee: nil, request_options: {})
|
|
13
|
+
#
|
|
14
|
+
# @param company_id [String] The ID (tag) of the company you want to update the fee markup for.
|
|
15
|
+
#
|
|
16
|
+
# @param fee_type [Symbol, WhopSDK::Models::FeeMarkupType] The type of fee this markup applies to.
|
|
17
|
+
#
|
|
18
|
+
# @param fixed_fee_usd [Float, nil] The fixed fee in USD to charge (0-50).
|
|
19
|
+
#
|
|
20
|
+
# @param metadata [Hash{Symbol=>Object}, nil] Custom metadata to attach to this fee markup.
|
|
21
|
+
#
|
|
22
|
+
# @param notes [String, nil] Internal notes about this fee markup.
|
|
23
|
+
#
|
|
24
|
+
# @param percentage_fee [Float, nil] The percentage fee to charge (0-25).
|
|
25
|
+
#
|
|
26
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
27
|
+
#
|
|
28
|
+
# @return [WhopSDK::Models::FeeMarkupCreateResponse]
|
|
29
|
+
#
|
|
30
|
+
# @see WhopSDK::Models::FeeMarkupCreateParams
|
|
31
|
+
def create(params)
|
|
32
|
+
parsed, options = WhopSDK::FeeMarkupCreateParams.dump_request(params)
|
|
33
|
+
@client.request(
|
|
34
|
+
method: :post,
|
|
35
|
+
path: "fee_markups",
|
|
36
|
+
body: parsed,
|
|
37
|
+
model: WhopSDK::Models::FeeMarkupCreateResponse,
|
|
38
|
+
options: options
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Some parameter documentations has been truncated, see
|
|
43
|
+
# {WhopSDK::Models::FeeMarkupListParams} for more details.
|
|
44
|
+
#
|
|
45
|
+
# Lists fee markups for a company.
|
|
46
|
+
#
|
|
47
|
+
# Required permissions:
|
|
48
|
+
#
|
|
49
|
+
# - `company:update_child_fees`
|
|
50
|
+
#
|
|
51
|
+
# @overload list(company_id:, after: nil, before: nil, first: nil, last: nil, request_options: {})
|
|
52
|
+
#
|
|
53
|
+
# @param company_id [String] The ID (tag) of the company you want to list the fee markups for. If you pass yo
|
|
54
|
+
#
|
|
55
|
+
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
56
|
+
#
|
|
57
|
+
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
58
|
+
#
|
|
59
|
+
# @param first [Integer, nil] Returns the first _n_ elements from the list.
|
|
60
|
+
#
|
|
61
|
+
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
62
|
+
#
|
|
63
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
64
|
+
#
|
|
65
|
+
# @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::FeeMarkupListResponse>]
|
|
66
|
+
#
|
|
67
|
+
# @see WhopSDK::Models::FeeMarkupListParams
|
|
68
|
+
def list(params)
|
|
69
|
+
parsed, options = WhopSDK::FeeMarkupListParams.dump_request(params)
|
|
70
|
+
@client.request(
|
|
71
|
+
method: :get,
|
|
72
|
+
path: "fee_markups",
|
|
73
|
+
query: parsed,
|
|
74
|
+
page: WhopSDK::Internal::CursorPage,
|
|
75
|
+
model: WhopSDK::Models::FeeMarkupListResponse,
|
|
76
|
+
options: options
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Deletes a fee markup for a company.
|
|
81
|
+
#
|
|
82
|
+
# Required permissions:
|
|
83
|
+
#
|
|
84
|
+
# - `company:update_child_fees`
|
|
85
|
+
#
|
|
86
|
+
# @overload delete(id, request_options: {})
|
|
87
|
+
#
|
|
88
|
+
# @param id [String] The ID of the fee markup to delete.
|
|
89
|
+
#
|
|
90
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
91
|
+
#
|
|
92
|
+
# @return [Boolean]
|
|
93
|
+
#
|
|
94
|
+
# @see WhopSDK::Models::FeeMarkupDeleteParams
|
|
95
|
+
def delete(id, params = {})
|
|
96
|
+
@client.request(
|
|
97
|
+
method: :delete,
|
|
98
|
+
path: ["fee_markups/%1$s", id],
|
|
99
|
+
model: WhopSDK::Internal::Type::Boolean,
|
|
100
|
+
options: params[:request_options]
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @api private
|
|
105
|
+
#
|
|
106
|
+
# @param client [WhopSDK::Client]
|
|
107
|
+
def initialize(client:)
|
|
108
|
+
@client = client
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
data/lib/whop_sdk/version.rb
CHANGED
data/lib/whop_sdk.rb
CHANGED
|
@@ -180,6 +180,13 @@ require_relative "whop_sdk/models/experience_list_params"
|
|
|
180
180
|
require_relative "whop_sdk/models/experience_list_response"
|
|
181
181
|
require_relative "whop_sdk/models/experience_retrieve_params"
|
|
182
182
|
require_relative "whop_sdk/models/experience_update_params"
|
|
183
|
+
require_relative "whop_sdk/models/fee_markup_create_params"
|
|
184
|
+
require_relative "whop_sdk/models/fee_markup_create_response"
|
|
185
|
+
require_relative "whop_sdk/models/fee_markup_delete_params"
|
|
186
|
+
require_relative "whop_sdk/models/fee_markup_delete_response"
|
|
187
|
+
require_relative "whop_sdk/models/fee_markup_list_params"
|
|
188
|
+
require_relative "whop_sdk/models/fee_markup_list_response"
|
|
189
|
+
require_relative "whop_sdk/models/fee_markup_type"
|
|
183
190
|
require_relative "whop_sdk/models/forum"
|
|
184
191
|
require_relative "whop_sdk/models/forum_list_params"
|
|
185
192
|
require_relative "whop_sdk/models/forum_list_response"
|
|
@@ -370,6 +377,7 @@ require_relative "whop_sdk/resources/course_students"
|
|
|
370
377
|
require_relative "whop_sdk/resources/disputes"
|
|
371
378
|
require_relative "whop_sdk/resources/entries"
|
|
372
379
|
require_relative "whop_sdk/resources/experiences"
|
|
380
|
+
require_relative "whop_sdk/resources/fee_markups"
|
|
373
381
|
require_relative "whop_sdk/resources/forum_posts"
|
|
374
382
|
require_relative "whop_sdk/resources/forums"
|
|
375
383
|
require_relative "whop_sdk/resources/invoices"
|
data/rbi/whop_sdk/client.rbi
CHANGED
|
@@ -136,6 +136,9 @@ module WhopSDK
|
|
|
136
136
|
sig { returns(WhopSDK::Resources::PaymentMethods) }
|
|
137
137
|
attr_reader :payment_methods
|
|
138
138
|
|
|
139
|
+
sig { returns(WhopSDK::Resources::FeeMarkups) }
|
|
140
|
+
attr_reader :fee_markups
|
|
141
|
+
|
|
139
142
|
# @api private
|
|
140
143
|
sig { override.returns(T::Hash[String, String]) }
|
|
141
144
|
private def auth_headers
|
|
@@ -20,6 +20,10 @@ module WhopSDK
|
|
|
20
20
|
sig { returns(String) }
|
|
21
21
|
attr_accessor :company_id
|
|
22
22
|
|
|
23
|
+
# The available currencies on the platform
|
|
24
|
+
sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) }
|
|
25
|
+
attr_accessor :currency
|
|
26
|
+
|
|
23
27
|
# The metadata to use for the checkout configuration
|
|
24
28
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
25
29
|
attr_accessor :metadata
|
|
@@ -78,6 +82,7 @@ module WhopSDK
|
|
|
78
82
|
id: String,
|
|
79
83
|
affiliate_code: T.nilable(String),
|
|
80
84
|
company_id: String,
|
|
85
|
+
currency: T.nilable(WhopSDK::Currency::OrSymbol),
|
|
81
86
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
82
87
|
mode: WhopSDK::CheckoutModes::OrSymbol,
|
|
83
88
|
payment_method_configuration:
|
|
@@ -96,6 +101,8 @@ module WhopSDK
|
|
|
96
101
|
affiliate_code:,
|
|
97
102
|
# The ID of the company to use for the checkout configuration
|
|
98
103
|
company_id:,
|
|
104
|
+
# The available currencies on the platform
|
|
105
|
+
currency:,
|
|
99
106
|
# The metadata to use for the checkout configuration
|
|
100
107
|
metadata:,
|
|
101
108
|
# The mode of the checkout session.
|
|
@@ -120,6 +127,7 @@ module WhopSDK
|
|
|
120
127
|
id: String,
|
|
121
128
|
affiliate_code: T.nilable(String),
|
|
122
129
|
company_id: String,
|
|
130
|
+
currency: T.nilable(WhopSDK::Currency::TaggedSymbol),
|
|
123
131
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
124
132
|
mode: WhopSDK::CheckoutModes::TaggedSymbol,
|
|
125
133
|
payment_method_configuration:
|
|
@@ -29,6 +29,10 @@ module WhopSDK
|
|
|
29
29
|
sig { returns(T.nilable(String)) }
|
|
30
30
|
attr_accessor :affiliate_code
|
|
31
31
|
|
|
32
|
+
# The available currencies on the platform
|
|
33
|
+
sig { returns(T.nilable(WhopSDK::Currency::OrSymbol)) }
|
|
34
|
+
attr_accessor :currency
|
|
35
|
+
|
|
32
36
|
# The metadata to use for the checkout configuration
|
|
33
37
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
34
38
|
attr_accessor :metadata
|
|
@@ -77,6 +81,7 @@ module WhopSDK
|
|
|
77
81
|
plan_id: String,
|
|
78
82
|
company_id: String,
|
|
79
83
|
affiliate_code: T.nilable(String),
|
|
84
|
+
currency: T.nilable(WhopSDK::Currency::OrSymbol),
|
|
80
85
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
81
86
|
payment_method_configuration:
|
|
82
87
|
T.nilable(
|
|
@@ -97,6 +102,8 @@ module WhopSDK
|
|
|
97
102
|
company_id:,
|
|
98
103
|
# The affiliate code to use for the checkout configuration
|
|
99
104
|
affiliate_code: nil,
|
|
105
|
+
# The available currencies on the platform
|
|
106
|
+
currency: nil,
|
|
100
107
|
# The metadata to use for the checkout configuration
|
|
101
108
|
metadata: nil,
|
|
102
109
|
# This currently only works for configurations made in 'setup' mode. The explicit
|
|
@@ -115,6 +122,7 @@ module WhopSDK
|
|
|
115
122
|
{
|
|
116
123
|
plan: WhopSDK::CheckoutConfigurationCreateParams::Plan,
|
|
117
124
|
affiliate_code: T.nilable(String),
|
|
125
|
+
currency: T.nilable(WhopSDK::Currency::OrSymbol),
|
|
118
126
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
119
127
|
mode: Symbol,
|
|
120
128
|
payment_method_configuration:
|
|
@@ -23,6 +23,10 @@ module WhopSDK
|
|
|
23
23
|
sig { returns(String) }
|
|
24
24
|
attr_accessor :company_id
|
|
25
25
|
|
|
26
|
+
# The available currencies on the platform
|
|
27
|
+
sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) }
|
|
28
|
+
attr_accessor :currency
|
|
29
|
+
|
|
26
30
|
# The metadata to use for the checkout configuration
|
|
27
31
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
28
32
|
attr_accessor :metadata
|
|
@@ -90,6 +94,7 @@ module WhopSDK
|
|
|
90
94
|
id: String,
|
|
91
95
|
affiliate_code: T.nilable(String),
|
|
92
96
|
company_id: String,
|
|
97
|
+
currency: T.nilable(WhopSDK::Currency::OrSymbol),
|
|
93
98
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
94
99
|
mode: WhopSDK::CheckoutModes::OrSymbol,
|
|
95
100
|
payment_method_configuration:
|
|
@@ -111,6 +116,8 @@ module WhopSDK
|
|
|
111
116
|
affiliate_code:,
|
|
112
117
|
# The ID of the company to use for the checkout configuration
|
|
113
118
|
company_id:,
|
|
119
|
+
# The available currencies on the platform
|
|
120
|
+
currency:,
|
|
114
121
|
# The metadata to use for the checkout configuration
|
|
115
122
|
metadata:,
|
|
116
123
|
# The mode of the checkout session.
|
|
@@ -135,6 +142,7 @@ module WhopSDK
|
|
|
135
142
|
id: String,
|
|
136
143
|
affiliate_code: T.nilable(String),
|
|
137
144
|
company_id: String,
|
|
145
|
+
currency: T.nilable(WhopSDK::Currency::TaggedSymbol),
|
|
138
146
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
139
147
|
mode: WhopSDK::CheckoutModes::TaggedSymbol,
|
|
140
148
|
payment_method_configuration:
|
|
@@ -35,6 +35,10 @@ module WhopSDK
|
|
|
35
35
|
sig { params(image: T.nilable(WhopSDK::Experience::Image::OrHash)).void }
|
|
36
36
|
attr_writer :image
|
|
37
37
|
|
|
38
|
+
# Whether the experience is visible to the public
|
|
39
|
+
sig { returns(T::Boolean) }
|
|
40
|
+
attr_accessor :is_public
|
|
41
|
+
|
|
38
42
|
# The written name of the description.
|
|
39
43
|
sig { returns(String) }
|
|
40
44
|
attr_accessor :name
|
|
@@ -57,6 +61,7 @@ module WhopSDK
|
|
|
57
61
|
company: WhopSDK::Experience::Company::OrHash,
|
|
58
62
|
created_at: Time,
|
|
59
63
|
image: T.nilable(WhopSDK::Experience::Image::OrHash),
|
|
64
|
+
is_public: T::Boolean,
|
|
60
65
|
name: String,
|
|
61
66
|
order: T.nilable(String),
|
|
62
67
|
products: T::Array[WhopSDK::Experience::Product::OrHash]
|
|
@@ -73,6 +78,8 @@ module WhopSDK
|
|
|
73
78
|
created_at:,
|
|
74
79
|
# The logo for the experience.
|
|
75
80
|
image:,
|
|
81
|
+
# Whether the experience is visible to the public
|
|
82
|
+
is_public:,
|
|
76
83
|
# The written name of the description.
|
|
77
84
|
name:,
|
|
78
85
|
# The order of the experience in the section
|
|
@@ -92,6 +99,7 @@ module WhopSDK
|
|
|
92
99
|
company: WhopSDK::Experience::Company,
|
|
93
100
|
created_at: Time,
|
|
94
101
|
image: T.nilable(WhopSDK::Experience::Image),
|
|
102
|
+
is_public: T::Boolean,
|
|
95
103
|
name: String,
|
|
96
104
|
order: T.nilable(String),
|
|
97
105
|
products: T::Array[WhopSDK::Experience::Product]
|
|
@@ -19,6 +19,10 @@ module WhopSDK
|
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :company_id
|
|
21
21
|
|
|
22
|
+
# Whether the experience is publicly accessible
|
|
23
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
24
|
+
attr_accessor :is_public
|
|
25
|
+
|
|
22
26
|
# The name of the experience
|
|
23
27
|
sig { returns(T.nilable(String)) }
|
|
24
28
|
attr_accessor :name
|
|
@@ -31,6 +35,7 @@ module WhopSDK
|
|
|
31
35
|
params(
|
|
32
36
|
app_id: String,
|
|
33
37
|
company_id: String,
|
|
38
|
+
is_public: T.nilable(T::Boolean),
|
|
34
39
|
name: T.nilable(String),
|
|
35
40
|
section_id: T.nilable(String),
|
|
36
41
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
@@ -41,6 +46,8 @@ module WhopSDK
|
|
|
41
46
|
app_id:,
|
|
42
47
|
# The ID of the company to create the experience for
|
|
43
48
|
company_id:,
|
|
49
|
+
# Whether the experience is publicly accessible
|
|
50
|
+
is_public: nil,
|
|
44
51
|
# The name of the experience
|
|
45
52
|
name: nil,
|
|
46
53
|
# The ID of the section to create the experience in
|
|
@@ -54,6 +61,7 @@ module WhopSDK
|
|
|
54
61
|
{
|
|
55
62
|
app_id: String,
|
|
56
63
|
company_id: String,
|
|
64
|
+
is_public: T.nilable(T::Boolean),
|
|
57
65
|
name: T.nilable(String),
|
|
58
66
|
section_id: T.nilable(String),
|
|
59
67
|
request_options: WhopSDK::RequestOptions
|
|
@@ -51,6 +51,10 @@ module WhopSDK
|
|
|
51
51
|
end
|
|
52
52
|
attr_writer :image
|
|
53
53
|
|
|
54
|
+
# Whether the experience is visible to the public
|
|
55
|
+
sig { returns(T::Boolean) }
|
|
56
|
+
attr_accessor :is_public
|
|
57
|
+
|
|
54
58
|
# The written name of the description.
|
|
55
59
|
sig { returns(String) }
|
|
56
60
|
attr_accessor :name
|
|
@@ -68,6 +72,7 @@ module WhopSDK
|
|
|
68
72
|
created_at: Time,
|
|
69
73
|
image:
|
|
70
74
|
T.nilable(WhopSDK::Models::ExperienceListResponse::Image::OrHash),
|
|
75
|
+
is_public: T::Boolean,
|
|
71
76
|
name: String,
|
|
72
77
|
order: T.nilable(String)
|
|
73
78
|
).returns(T.attached_class)
|
|
@@ -83,6 +88,8 @@ module WhopSDK
|
|
|
83
88
|
created_at:,
|
|
84
89
|
# The logo for the experience.
|
|
85
90
|
image:,
|
|
91
|
+
# Whether the experience is visible to the public
|
|
92
|
+
is_public:,
|
|
86
93
|
# The written name of the description.
|
|
87
94
|
name:,
|
|
88
95
|
# The order of the experience in the section
|
|
@@ -98,6 +105,7 @@ module WhopSDK
|
|
|
98
105
|
company: WhopSDK::Models::ExperienceListResponse::Company,
|
|
99
106
|
created_at: Time,
|
|
100
107
|
image: T.nilable(WhopSDK::Models::ExperienceListResponse::Image),
|
|
108
|
+
is_public: T::Boolean,
|
|
101
109
|
name: String,
|
|
102
110
|
order: T.nilable(String)
|
|
103
111
|
}
|
|
@@ -19,6 +19,10 @@ module WhopSDK
|
|
|
19
19
|
end
|
|
20
20
|
attr_accessor :access_level
|
|
21
21
|
|
|
22
|
+
# Whether the experience is publicly accessible.
|
|
23
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
24
|
+
attr_accessor :is_public
|
|
25
|
+
|
|
22
26
|
# The logo for the experience
|
|
23
27
|
sig do
|
|
24
28
|
returns(
|
|
@@ -48,6 +52,7 @@ module WhopSDK
|
|
|
48
52
|
params(
|
|
49
53
|
access_level:
|
|
50
54
|
T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol),
|
|
55
|
+
is_public: T.nilable(T::Boolean),
|
|
51
56
|
logo:
|
|
52
57
|
T.nilable(
|
|
53
58
|
T.any(
|
|
@@ -64,6 +69,8 @@ module WhopSDK
|
|
|
64
69
|
def self.new(
|
|
65
70
|
# The different access levels for experiences (PUBLIC IS NEVER USED ANYMORE).
|
|
66
71
|
access_level: nil,
|
|
72
|
+
# Whether the experience is publicly accessible.
|
|
73
|
+
is_public: nil,
|
|
67
74
|
# The logo for the experience
|
|
68
75
|
logo: nil,
|
|
69
76
|
# The name of the experience.
|
|
@@ -81,6 +88,7 @@ module WhopSDK
|
|
|
81
88
|
{
|
|
82
89
|
access_level:
|
|
83
90
|
T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol),
|
|
91
|
+
is_public: T.nilable(T::Boolean),
|
|
84
92
|
logo:
|
|
85
93
|
T.nilable(
|
|
86
94
|
T.any(
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class FeeMarkupCreateParams < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(WhopSDK::FeeMarkupCreateParams, WhopSDK::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID (tag) of the company you want to update the fee markup for.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :company_id
|
|
17
|
+
|
|
18
|
+
# The type of fee this markup applies to.
|
|
19
|
+
sig { returns(WhopSDK::FeeMarkupType::OrSymbol) }
|
|
20
|
+
attr_accessor :fee_type
|
|
21
|
+
|
|
22
|
+
# The fixed fee in USD to charge (0-50).
|
|
23
|
+
sig { returns(T.nilable(Float)) }
|
|
24
|
+
attr_accessor :fixed_fee_usd
|
|
25
|
+
|
|
26
|
+
# Custom metadata to attach to this fee markup.
|
|
27
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
28
|
+
attr_accessor :metadata
|
|
29
|
+
|
|
30
|
+
# Internal notes about this fee markup.
|
|
31
|
+
sig { returns(T.nilable(String)) }
|
|
32
|
+
attr_accessor :notes
|
|
33
|
+
|
|
34
|
+
# The percentage fee to charge (0-25).
|
|
35
|
+
sig { returns(T.nilable(Float)) }
|
|
36
|
+
attr_accessor :percentage_fee
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
company_id: String,
|
|
41
|
+
fee_type: WhopSDK::FeeMarkupType::OrSymbol,
|
|
42
|
+
fixed_fee_usd: T.nilable(Float),
|
|
43
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
44
|
+
notes: T.nilable(String),
|
|
45
|
+
percentage_fee: T.nilable(Float),
|
|
46
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
47
|
+
).returns(T.attached_class)
|
|
48
|
+
end
|
|
49
|
+
def self.new(
|
|
50
|
+
# The ID (tag) of the company you want to update the fee markup for.
|
|
51
|
+
company_id:,
|
|
52
|
+
# The type of fee this markup applies to.
|
|
53
|
+
fee_type:,
|
|
54
|
+
# The fixed fee in USD to charge (0-50).
|
|
55
|
+
fixed_fee_usd: nil,
|
|
56
|
+
# Custom metadata to attach to this fee markup.
|
|
57
|
+
metadata: nil,
|
|
58
|
+
# Internal notes about this fee markup.
|
|
59
|
+
notes: nil,
|
|
60
|
+
# The percentage fee to charge (0-25).
|
|
61
|
+
percentage_fee: nil,
|
|
62
|
+
request_options: {}
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
sig do
|
|
67
|
+
override.returns(
|
|
68
|
+
{
|
|
69
|
+
company_id: String,
|
|
70
|
+
fee_type: WhopSDK::FeeMarkupType::OrSymbol,
|
|
71
|
+
fixed_fee_usd: T.nilable(Float),
|
|
72
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
73
|
+
notes: T.nilable(String),
|
|
74
|
+
percentage_fee: T.nilable(Float),
|
|
75
|
+
request_options: WhopSDK::RequestOptions
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
def to_hash
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class FeeMarkupCreateResponse < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
WhopSDK::Models::FeeMarkupCreateResponse,
|
|
10
|
+
WhopSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The unique identifier of the fee markup.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# When this fee markup was created.
|
|
19
|
+
sig { returns(Time) }
|
|
20
|
+
attr_accessor :created_at
|
|
21
|
+
|
|
22
|
+
# The type of fee this markup applies to.
|
|
23
|
+
sig { returns(WhopSDK::FeeMarkupType::TaggedSymbol) }
|
|
24
|
+
attr_accessor :fee_type
|
|
25
|
+
|
|
26
|
+
# The fixed fee in USD to charge (0-50).
|
|
27
|
+
sig { returns(T.nilable(Float)) }
|
|
28
|
+
attr_accessor :fixed_fee_usd
|
|
29
|
+
|
|
30
|
+
# Internal notes about this fee markup.
|
|
31
|
+
sig { returns(T.nilable(String)) }
|
|
32
|
+
attr_accessor :notes
|
|
33
|
+
|
|
34
|
+
# The percentage fee to charge (0-25).
|
|
35
|
+
sig { returns(T.nilable(Float)) }
|
|
36
|
+
attr_accessor :percentage_fee
|
|
37
|
+
|
|
38
|
+
# When this fee markup was last updated.
|
|
39
|
+
sig { returns(Time) }
|
|
40
|
+
attr_accessor :updated_at
|
|
41
|
+
|
|
42
|
+
# Represents a fee markup configuration for a company
|
|
43
|
+
sig do
|
|
44
|
+
params(
|
|
45
|
+
id: String,
|
|
46
|
+
created_at: Time,
|
|
47
|
+
fee_type: WhopSDK::FeeMarkupType::OrSymbol,
|
|
48
|
+
fixed_fee_usd: T.nilable(Float),
|
|
49
|
+
notes: T.nilable(String),
|
|
50
|
+
percentage_fee: T.nilable(Float),
|
|
51
|
+
updated_at: Time
|
|
52
|
+
).returns(T.attached_class)
|
|
53
|
+
end
|
|
54
|
+
def self.new(
|
|
55
|
+
# The unique identifier of the fee markup.
|
|
56
|
+
id:,
|
|
57
|
+
# When this fee markup was created.
|
|
58
|
+
created_at:,
|
|
59
|
+
# The type of fee this markup applies to.
|
|
60
|
+
fee_type:,
|
|
61
|
+
# The fixed fee in USD to charge (0-50).
|
|
62
|
+
fixed_fee_usd:,
|
|
63
|
+
# Internal notes about this fee markup.
|
|
64
|
+
notes:,
|
|
65
|
+
# The percentage fee to charge (0-25).
|
|
66
|
+
percentage_fee:,
|
|
67
|
+
# When this fee markup was last updated.
|
|
68
|
+
updated_at:
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
sig do
|
|
73
|
+
override.returns(
|
|
74
|
+
{
|
|
75
|
+
id: String,
|
|
76
|
+
created_at: Time,
|
|
77
|
+
fee_type: WhopSDK::FeeMarkupType::TaggedSymbol,
|
|
78
|
+
fixed_fee_usd: T.nilable(Float),
|
|
79
|
+
notes: T.nilable(String),
|
|
80
|
+
percentage_fee: T.nilable(Float),
|
|
81
|
+
updated_at: Time
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
def to_hash
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class FeeMarkupDeleteParams < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(WhopSDK::FeeMarkupDeleteParams, WhopSDK::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig do
|
|
15
|
+
params(request_options: WhopSDK::RequestOptions::OrHash).returns(
|
|
16
|
+
T.attached_class
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
def self.new(request_options: {})
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
sig { override.returns({ request_options: WhopSDK::RequestOptions }) }
|
|
23
|
+
def to_hash
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class FeeMarkupListParams < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(WhopSDK::FeeMarkupListParams, WhopSDK::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID (tag) of the company you want to list the fee markups for. If you pass
|
|
15
|
+
# your platform account, you will get the platform default markups.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :company_id
|
|
18
|
+
|
|
19
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
20
|
+
sig { returns(T.nilable(String)) }
|
|
21
|
+
attr_accessor :after
|
|
22
|
+
|
|
23
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_accessor :before
|
|
26
|
+
|
|
27
|
+
# Returns the first _n_ elements from the list.
|
|
28
|
+
sig { returns(T.nilable(Integer)) }
|
|
29
|
+
attr_accessor :first
|
|
30
|
+
|
|
31
|
+
# Returns the last _n_ elements from the list.
|
|
32
|
+
sig { returns(T.nilable(Integer)) }
|
|
33
|
+
attr_accessor :last
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
company_id: String,
|
|
38
|
+
after: T.nilable(String),
|
|
39
|
+
before: T.nilable(String),
|
|
40
|
+
first: T.nilable(Integer),
|
|
41
|
+
last: T.nilable(Integer),
|
|
42
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
43
|
+
).returns(T.attached_class)
|
|
44
|
+
end
|
|
45
|
+
def self.new(
|
|
46
|
+
# The ID (tag) of the company you want to list the fee markups for. If you pass
|
|
47
|
+
# your platform account, you will get the platform default markups.
|
|
48
|
+
company_id:,
|
|
49
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
50
|
+
after: nil,
|
|
51
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
52
|
+
before: nil,
|
|
53
|
+
# Returns the first _n_ elements from the list.
|
|
54
|
+
first: nil,
|
|
55
|
+
# Returns the last _n_ elements from the list.
|
|
56
|
+
last: nil,
|
|
57
|
+
request_options: {}
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
sig do
|
|
62
|
+
override.returns(
|
|
63
|
+
{
|
|
64
|
+
company_id: String,
|
|
65
|
+
after: T.nilable(String),
|
|
66
|
+
before: T.nilable(String),
|
|
67
|
+
first: T.nilable(Integer),
|
|
68
|
+
last: T.nilable(Integer),
|
|
69
|
+
request_options: WhopSDK::RequestOptions
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
end
|
|
73
|
+
def to_hash
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|