whop_sdk 0.0.13 → 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 +20 -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/company.rb +9 -1
- data/lib/whop_sdk/models/company_create_params.rb +15 -1
- data/lib/whop_sdk/models/company_list_response.rb +9 -1
- data/lib/whop_sdk/models/company_update_params.rb +15 -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/withdrawal_created_webhook_event.rb +11 -1
- data/lib/whop_sdk/models/withdrawal_list_response.rb +11 -1
- data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +11 -1
- data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +11 -1
- data/lib/whop_sdk/models.rb +8 -0
- data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
- data/lib/whop_sdk/resources/companies.rb +12 -2
- 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/company.rbi +8 -0
- data/rbi/whop_sdk/models/company_create_params.rbi +14 -0
- data/rbi/whop_sdk/models/company_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/company_update_params.rbi +14 -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/withdrawal_created_webhook_event.rbi +12 -0
- data/rbi/whop_sdk/models/withdrawal_list_response.rbi +12 -0
- data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +12 -0
- data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +12 -0
- data/rbi/whop_sdk/models.rbi +8 -0
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
- data/rbi/whop_sdk/resources/companies.rbi +12 -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/company.rbs +5 -0
- data/sig/whop_sdk/models/company_create_params.rbs +6 -1
- data/sig/whop_sdk/models/company_list_response.rbs +5 -0
- data/sig/whop_sdk/models/company_update_params.rbs +9 -1
- 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/withdrawal_created_webhook_event.rbs +5 -0
- data/sig/whop_sdk/models/withdrawal_list_response.rbs +5 -0
- data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +5 -0
- data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +5 -0
- data/sig/whop_sdk/models.rbs +8 -0
- data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
- data/sig/whop_sdk/resources/companies.rbs +2 -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,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::FeeMarkups#list
|
|
6
|
+
class FeeMarkupListResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The unique identifier of the fee markup.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute created_at
|
|
14
|
+
# When this fee markup was created.
|
|
15
|
+
#
|
|
16
|
+
# @return [Time]
|
|
17
|
+
required :created_at, Time
|
|
18
|
+
|
|
19
|
+
# @!attribute fee_type
|
|
20
|
+
# The type of fee this markup applies to.
|
|
21
|
+
#
|
|
22
|
+
# @return [Symbol, WhopSDK::Models::FeeMarkupType]
|
|
23
|
+
required :fee_type, enum: -> { WhopSDK::FeeMarkupType }
|
|
24
|
+
|
|
25
|
+
# @!attribute fixed_fee_usd
|
|
26
|
+
# The fixed fee in USD to charge (0-50).
|
|
27
|
+
#
|
|
28
|
+
# @return [Float, nil]
|
|
29
|
+
required :fixed_fee_usd, Float, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute notes
|
|
32
|
+
# Internal notes about this fee markup.
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
required :notes, String, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute percentage_fee
|
|
38
|
+
# The percentage fee to charge (0-25).
|
|
39
|
+
#
|
|
40
|
+
# @return [Float, nil]
|
|
41
|
+
required :percentage_fee, Float, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute updated_at
|
|
44
|
+
# When this fee markup was last updated.
|
|
45
|
+
#
|
|
46
|
+
# @return [Time]
|
|
47
|
+
required :updated_at, Time
|
|
48
|
+
|
|
49
|
+
# @!method initialize(id:, created_at:, fee_type:, fixed_fee_usd:, notes:, percentage_fee:, updated_at:)
|
|
50
|
+
# Represents a fee markup configuration for a company
|
|
51
|
+
#
|
|
52
|
+
# @param id [String] The unique identifier of the fee markup.
|
|
53
|
+
#
|
|
54
|
+
# @param created_at [Time] When this fee markup was created.
|
|
55
|
+
#
|
|
56
|
+
# @param fee_type [Symbol, WhopSDK::Models::FeeMarkupType] The type of fee this markup applies to.
|
|
57
|
+
#
|
|
58
|
+
# @param fixed_fee_usd [Float, nil] The fixed fee in USD to charge (0-50).
|
|
59
|
+
#
|
|
60
|
+
# @param notes [String, nil] Internal notes about this fee markup.
|
|
61
|
+
#
|
|
62
|
+
# @param percentage_fee [Float, nil] The percentage fee to charge (0-25).
|
|
63
|
+
#
|
|
64
|
+
# @param updated_at [Time] When this fee markup was last updated.
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# The types of fee markups that can be configured
|
|
6
|
+
module FeeMarkupType
|
|
7
|
+
extend WhopSDK::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
CRYPTO_WITHDRAWAL_MARKUP = :crypto_withdrawal_markup
|
|
10
|
+
RTP_WITHDRAWAL_MARKUP = :rtp_withdrawal_markup
|
|
11
|
+
NEXT_DAY_BANK_WITHDRAWAL_MARKUP = :next_day_bank_withdrawal_markup
|
|
12
|
+
BANK_WIRE_WITHDRAWAL_MARKUP = :bank_wire_withdrawal_markup
|
|
13
|
+
DIGITAL_WALLET_WITHDRAWAL_MARKUP = :digital_wallet_withdrawal_markup
|
|
14
|
+
|
|
15
|
+
# @!method self.values
|
|
16
|
+
# @return [Array<Symbol>]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -107,6 +107,14 @@ module WhopSDK
|
|
|
107
107
|
# @return [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::LedgerAccount]
|
|
108
108
|
required :ledger_account, -> { WhopSDK::WithdrawalCreatedWebhookEvent::Data::LedgerAccount }
|
|
109
109
|
|
|
110
|
+
# @!attribute markup_fee
|
|
111
|
+
# The markup fee that was charged for the withdrawal. This is in the same currency
|
|
112
|
+
# as the withdrawal amount. This only applies to platform accounts using Whop
|
|
113
|
+
# Rails.
|
|
114
|
+
#
|
|
115
|
+
# @return [Float]
|
|
116
|
+
required :markup_fee, Float
|
|
117
|
+
|
|
110
118
|
# @!attribute payout_token
|
|
111
119
|
# The payout token used for the withdrawal, if applicable.
|
|
112
120
|
#
|
|
@@ -138,7 +146,7 @@ module WhopSDK
|
|
|
138
146
|
# @return [Symbol, WhopSDK::Models::WithdrawalTypes]
|
|
139
147
|
required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes }
|
|
140
148
|
|
|
141
|
-
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
149
|
+
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
142
150
|
# Some parameter documentations has been truncated, see
|
|
143
151
|
# {WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data} for more details.
|
|
144
152
|
#
|
|
@@ -164,6 +172,8 @@ module WhopSDK
|
|
|
164
172
|
#
|
|
165
173
|
# @param ledger_account [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::LedgerAccount] The ledger account associated with the withdrawal.
|
|
166
174
|
#
|
|
175
|
+
# @param markup_fee [Float] The markup fee that was charged for the withdrawal. This is in the same currency
|
|
176
|
+
#
|
|
167
177
|
# @param payout_token [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::PayoutToken, nil] The payout token used for the withdrawal, if applicable.
|
|
168
178
|
#
|
|
169
179
|
# @param speed [Symbol, WhopSDK::Models::WithdrawalSpeeds] The speed of the withdrawal.
|
|
@@ -41,6 +41,14 @@ module WhopSDK
|
|
|
41
41
|
# @return [Symbol, WhopSDK::Models::WithdrawalFeeTypes, nil]
|
|
42
42
|
required :fee_type, enum: -> { WhopSDK::WithdrawalFeeTypes }, nil?: true
|
|
43
43
|
|
|
44
|
+
# @!attribute markup_fee
|
|
45
|
+
# The markup fee that was charged for the withdrawal. This is in the same currency
|
|
46
|
+
# as the withdrawal amount. This only applies to platform accounts using Whop
|
|
47
|
+
# Rails.
|
|
48
|
+
#
|
|
49
|
+
# @return [Float]
|
|
50
|
+
required :markup_fee, Float
|
|
51
|
+
|
|
44
52
|
# @!attribute speed
|
|
45
53
|
# The speed of the withdrawal.
|
|
46
54
|
#
|
|
@@ -59,7 +67,7 @@ module WhopSDK
|
|
|
59
67
|
# @return [Symbol, WhopSDK::Models::WithdrawalTypes]
|
|
60
68
|
required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes }
|
|
61
69
|
|
|
62
|
-
# @!method initialize(id:, amount:, created_at:, currency:, fee_amount:, fee_type:, speed:, status:, withdrawal_type:)
|
|
70
|
+
# @!method initialize(id:, amount:, created_at:, currency:, fee_amount:, fee_type:, markup_fee:, speed:, status:, withdrawal_type:)
|
|
63
71
|
# Some parameter documentations has been truncated, see
|
|
64
72
|
# {WhopSDK::Models::WithdrawalListResponse} for more details.
|
|
65
73
|
#
|
|
@@ -77,6 +85,8 @@ module WhopSDK
|
|
|
77
85
|
#
|
|
78
86
|
# @param fee_type [Symbol, WhopSDK::Models::WithdrawalFeeTypes, nil] The different fee types for a withdrawal.
|
|
79
87
|
#
|
|
88
|
+
# @param markup_fee [Float] The markup fee that was charged for the withdrawal. This is in the same currency
|
|
89
|
+
#
|
|
80
90
|
# @param speed [Symbol, WhopSDK::Models::WithdrawalSpeeds] The speed of the withdrawal.
|
|
81
91
|
#
|
|
82
92
|
# @param status [Symbol, WhopSDK::Models::WithdrawalStatus] Status of the withdrawal.
|
|
@@ -65,6 +65,14 @@ module WhopSDK
|
|
|
65
65
|
# @return [WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount]
|
|
66
66
|
required :ledger_account, -> { WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount }
|
|
67
67
|
|
|
68
|
+
# @!attribute markup_fee
|
|
69
|
+
# The markup fee that was charged for the withdrawal. This is in the same currency
|
|
70
|
+
# as the withdrawal amount. This only applies to platform accounts using Whop
|
|
71
|
+
# Rails.
|
|
72
|
+
#
|
|
73
|
+
# @return [Float]
|
|
74
|
+
required :markup_fee, Float
|
|
75
|
+
|
|
68
76
|
# @!attribute payout_token
|
|
69
77
|
# The payout token used for the withdrawal, if applicable.
|
|
70
78
|
#
|
|
@@ -96,7 +104,7 @@ module WhopSDK
|
|
|
96
104
|
# @return [Symbol, WhopSDK::Models::WithdrawalTypes]
|
|
97
105
|
required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes }
|
|
98
106
|
|
|
99
|
-
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
107
|
+
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
100
108
|
# Some parameter documentations has been truncated, see
|
|
101
109
|
# {WhopSDK::Models::WithdrawalRetrieveResponse} for more details.
|
|
102
110
|
#
|
|
@@ -122,6 +130,8 @@ module WhopSDK
|
|
|
122
130
|
#
|
|
123
131
|
# @param ledger_account [WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount] The ledger account associated with the withdrawal.
|
|
124
132
|
#
|
|
133
|
+
# @param markup_fee [Float] The markup fee that was charged for the withdrawal. This is in the same currency
|
|
134
|
+
#
|
|
125
135
|
# @param payout_token [WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken, nil] The payout token used for the withdrawal, if applicable.
|
|
126
136
|
#
|
|
127
137
|
# @param speed [Symbol, WhopSDK::Models::WithdrawalSpeeds] The speed of the withdrawal.
|
|
@@ -107,6 +107,14 @@ module WhopSDK
|
|
|
107
107
|
# @return [WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount]
|
|
108
108
|
required :ledger_account, -> { WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount }
|
|
109
109
|
|
|
110
|
+
# @!attribute markup_fee
|
|
111
|
+
# The markup fee that was charged for the withdrawal. This is in the same currency
|
|
112
|
+
# as the withdrawal amount. This only applies to platform accounts using Whop
|
|
113
|
+
# Rails.
|
|
114
|
+
#
|
|
115
|
+
# @return [Float]
|
|
116
|
+
required :markup_fee, Float
|
|
117
|
+
|
|
110
118
|
# @!attribute payout_token
|
|
111
119
|
# The payout token used for the withdrawal, if applicable.
|
|
112
120
|
#
|
|
@@ -138,7 +146,7 @@ module WhopSDK
|
|
|
138
146
|
# @return [Symbol, WhopSDK::Models::WithdrawalTypes]
|
|
139
147
|
required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes }
|
|
140
148
|
|
|
141
|
-
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
149
|
+
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
142
150
|
# Some parameter documentations has been truncated, see
|
|
143
151
|
# {WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data} for more details.
|
|
144
152
|
#
|
|
@@ -164,6 +172,8 @@ module WhopSDK
|
|
|
164
172
|
#
|
|
165
173
|
# @param ledger_account [WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount] The ledger account associated with the withdrawal.
|
|
166
174
|
#
|
|
175
|
+
# @param markup_fee [Float] The markup fee that was charged for the withdrawal. This is in the same currency
|
|
176
|
+
#
|
|
167
177
|
# @param payout_token [WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::PayoutToken, nil] The payout token used for the withdrawal, if applicable.
|
|
168
178
|
#
|
|
169
179
|
# @param speed [Symbol, WhopSDK::Models::WithdrawalSpeeds] The speed of the withdrawal.
|
data/lib/whop_sdk/models.rb
CHANGED
|
@@ -244,6 +244,14 @@ module WhopSDK
|
|
|
244
244
|
|
|
245
245
|
ExperienceUpdateParams = WhopSDK::Models::ExperienceUpdateParams
|
|
246
246
|
|
|
247
|
+
FeeMarkupCreateParams = WhopSDK::Models::FeeMarkupCreateParams
|
|
248
|
+
|
|
249
|
+
FeeMarkupDeleteParams = WhopSDK::Models::FeeMarkupDeleteParams
|
|
250
|
+
|
|
251
|
+
FeeMarkupListParams = WhopSDK::Models::FeeMarkupListParams
|
|
252
|
+
|
|
253
|
+
FeeMarkupType = WhopSDK::Models::FeeMarkupType
|
|
254
|
+
|
|
247
255
|
Forum = WhopSDK::Models::Forum
|
|
248
256
|
|
|
249
257
|
ForumListParams = WhopSDK::Models::ForumListParams
|
|
@@ -16,7 +16,7 @@ module WhopSDK
|
|
|
16
16
|
# - `access_pass:update`
|
|
17
17
|
# - `checkout_configuration:basic:read`
|
|
18
18
|
#
|
|
19
|
-
# @overload create(plan:, plan_id:, company_id:, affiliate_code: nil, metadata: nil, payment_method_configuration: nil, redirect_url: nil, mode: :setup, request_options: {})
|
|
19
|
+
# @overload create(plan:, plan_id:, company_id:, affiliate_code: nil, currency: nil, metadata: nil, payment_method_configuration: nil, redirect_url: nil, mode: :setup, request_options: {})
|
|
20
20
|
#
|
|
21
21
|
# @param plan [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan] Pass this object to create a new plan for this checkout configuration
|
|
22
22
|
#
|
|
@@ -26,6 +26,8 @@ module WhopSDK
|
|
|
26
26
|
#
|
|
27
27
|
# @param affiliate_code [String, nil] The affiliate code to use for the checkout configuration
|
|
28
28
|
#
|
|
29
|
+
# @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform
|
|
30
|
+
#
|
|
29
31
|
# @param metadata [Hash{Symbol=>Object}, nil] The metadata to use for the checkout configuration
|
|
30
32
|
#
|
|
31
33
|
# @param payment_method_configuration [WhopSDK::Models::CheckoutConfigurationCreateParams::PaymentMethodConfiguration, nil] This currently only works for configurations made in 'setup' mode. The explicit
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Resources
|
|
5
5
|
class Companies
|
|
6
|
+
# Some parameter documentations has been truncated, see
|
|
7
|
+
# {WhopSDK::Models::CompanyCreateParams} for more details.
|
|
8
|
+
#
|
|
6
9
|
# Create a new connected account for your platform
|
|
7
10
|
#
|
|
8
11
|
# Required permissions:
|
|
@@ -10,7 +13,7 @@ module WhopSDK
|
|
|
10
13
|
# - `company:create_child`
|
|
11
14
|
# - `company:basic:read`
|
|
12
15
|
#
|
|
13
|
-
# @overload create(email:, parent_company_id:, title:, metadata: nil, request_options: {})
|
|
16
|
+
# @overload create(email:, parent_company_id:, title:, metadata: nil, send_customer_emails: nil, request_options: {})
|
|
14
17
|
#
|
|
15
18
|
# @param email [String] The email of the user who the company will belong to.
|
|
16
19
|
#
|
|
@@ -20,6 +23,8 @@ module WhopSDK
|
|
|
20
23
|
#
|
|
21
24
|
# @param metadata [Hash{Symbol=>Object}, nil] Additional metadata for the account
|
|
22
25
|
#
|
|
26
|
+
# @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
27
|
+
#
|
|
23
28
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
24
29
|
#
|
|
25
30
|
# @return [WhopSDK::Models::Company]
|
|
@@ -60,6 +65,9 @@ module WhopSDK
|
|
|
60
65
|
)
|
|
61
66
|
end
|
|
62
67
|
|
|
68
|
+
# Some parameter documentations has been truncated, see
|
|
69
|
+
# {WhopSDK::Models::CompanyUpdateParams} for more details.
|
|
70
|
+
#
|
|
63
71
|
# Update an existing company. Either a regular company, platform company, or one
|
|
64
72
|
# of a platform's connected accounts
|
|
65
73
|
#
|
|
@@ -68,12 +76,14 @@ module WhopSDK
|
|
|
68
76
|
# - `company:update`
|
|
69
77
|
# - `company:basic:read`
|
|
70
78
|
#
|
|
71
|
-
# @overload update(id, logo: nil, title: nil, request_options: {})
|
|
79
|
+
# @overload update(id, logo: nil, send_customer_emails: nil, title: nil, request_options: {})
|
|
72
80
|
#
|
|
73
81
|
# @param id [String] The ID of the company to update
|
|
74
82
|
#
|
|
75
83
|
# @param logo [WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID, nil] The logo for the company in png, jpeg, or gif format
|
|
76
84
|
#
|
|
85
|
+
# @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
86
|
+
#
|
|
77
87
|
# @param title [String, nil] The title of the company
|
|
78
88
|
#
|
|
79
89
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
@@ -7,12 +7,14 @@ module WhopSDK
|
|
|
7
7
|
#
|
|
8
8
|
# - `experience:create`
|
|
9
9
|
#
|
|
10
|
-
# @overload create(app_id:, company_id:, name: nil, section_id: nil, request_options: {})
|
|
10
|
+
# @overload create(app_id:, company_id:, is_public: nil, name: nil, section_id: nil, request_options: {})
|
|
11
11
|
#
|
|
12
12
|
# @param app_id [String] The ID of the app to create the experience for
|
|
13
13
|
#
|
|
14
14
|
# @param company_id [String] The ID of the company to create the experience for
|
|
15
15
|
#
|
|
16
|
+
# @param is_public [Boolean, nil] Whether the experience is publicly accessible
|
|
17
|
+
#
|
|
16
18
|
# @param name [String, nil] The name of the experience
|
|
17
19
|
#
|
|
18
20
|
# @param section_id [String, nil] The ID of the section to create the experience in
|
|
@@ -57,12 +59,14 @@ module WhopSDK
|
|
|
57
59
|
#
|
|
58
60
|
# - `experience:update`
|
|
59
61
|
#
|
|
60
|
-
# @overload update(id, access_level: nil, logo: nil, name: nil, order: nil, section_id: nil, request_options: {})
|
|
62
|
+
# @overload update(id, access_level: nil, is_public: nil, logo: nil, name: nil, order: nil, section_id: nil, request_options: {})
|
|
61
63
|
#
|
|
62
64
|
# @param id [String] The id of the experience to update.
|
|
63
65
|
#
|
|
64
66
|
# @param access_level [Symbol, WhopSDK::Models::ExperienceUpdateParams::AccessLevel, nil] The different access levels for experiences (PUBLIC IS NEVER USED ANYMORE).
|
|
65
67
|
#
|
|
68
|
+
# @param is_public [Boolean, nil] Whether the experience is publicly accessible.
|
|
69
|
+
#
|
|
66
70
|
# @param logo [WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithID, nil] The logo for the experience
|
|
67
71
|
#
|
|
68
72
|
# @param name [String, nil] The name of the experience.
|
|
@@ -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:
|
|
@@ -57,6 +57,10 @@ module WhopSDK
|
|
|
57
57
|
sig { returns(String) }
|
|
58
58
|
attr_accessor :route
|
|
59
59
|
|
|
60
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
61
|
+
sig { returns(T::Boolean) }
|
|
62
|
+
attr_accessor :send_customer_emails
|
|
63
|
+
|
|
60
64
|
# The social media accounts of the company
|
|
61
65
|
sig { returns(T::Array[WhopSDK::Company::SocialLink]) }
|
|
62
66
|
attr_accessor :social_links
|
|
@@ -87,6 +91,7 @@ module WhopSDK
|
|
|
87
91
|
owner_user: WhopSDK::Company::OwnerUser::OrHash,
|
|
88
92
|
published_reviews_count: Integer,
|
|
89
93
|
route: String,
|
|
94
|
+
send_customer_emails: T::Boolean,
|
|
90
95
|
social_links: T::Array[WhopSDK::Company::SocialLink::OrHash],
|
|
91
96
|
title: String,
|
|
92
97
|
updated_at: Time,
|
|
@@ -117,6 +122,8 @@ module WhopSDK
|
|
|
117
122
|
published_reviews_count:,
|
|
118
123
|
# The slug/route of the company on the Whop site.
|
|
119
124
|
route:,
|
|
125
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
126
|
+
send_customer_emails:,
|
|
120
127
|
# The social media accounts of the company
|
|
121
128
|
social_links:,
|
|
122
129
|
# The title of the company.
|
|
@@ -142,6 +149,7 @@ module WhopSDK
|
|
|
142
149
|
owner_user: WhopSDK::Company::OwnerUser,
|
|
143
150
|
published_reviews_count: Integer,
|
|
144
151
|
route: String,
|
|
152
|
+
send_customer_emails: T::Boolean,
|
|
145
153
|
social_links: T::Array[WhopSDK::Company::SocialLink],
|
|
146
154
|
title: String,
|
|
147
155
|
updated_at: Time,
|