whop_sdk 0.0.14 → 0.0.16

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.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +8 -0
  5. data/lib/whop_sdk/models/checkout_configuration.rb +9 -1
  6. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
  7. data/lib/whop_sdk/models/checkout_configuration_list_response.rb +9 -1
  8. data/lib/whop_sdk/models/course.rb +57 -1
  9. data/lib/whop_sdk/models/course_lesson_interaction.rb +23 -1
  10. data/lib/whop_sdk/models/course_lesson_interaction_list_item.rb +23 -1
  11. data/lib/whop_sdk/models/experience.rb +9 -1
  12. data/lib/whop_sdk/models/experience_create_params.rb +9 -1
  13. data/lib/whop_sdk/models/experience_list_response.rb +9 -1
  14. data/lib/whop_sdk/models/experience_update_params.rb +9 -1
  15. data/lib/whop_sdk/models/fee_markup_create_params.rb +62 -0
  16. data/lib/whop_sdk/models/fee_markup_create_response.rb +67 -0
  17. data/lib/whop_sdk/models/fee_markup_delete_params.rb +14 -0
  18. data/lib/whop_sdk/models/fee_markup_delete_response.rb +8 -0
  19. data/lib/whop_sdk/models/fee_markup_list_params.rb +58 -0
  20. data/lib/whop_sdk/models/fee_markup_list_response.rb +67 -0
  21. data/lib/whop_sdk/models/fee_markup_type.rb +19 -0
  22. data/lib/whop_sdk/models/payment_list_fees_params.rb +46 -0
  23. data/lib/whop_sdk/models/payment_list_fees_response.rb +84 -0
  24. data/lib/whop_sdk/models/payment_method_list_response.rb +214 -76
  25. data/lib/whop_sdk/models/payment_method_retrieve_response.rb +214 -76
  26. data/lib/whop_sdk/models/payout_method_list_params.rb +54 -0
  27. data/lib/whop_sdk/models/payout_method_list_response.rb +95 -0
  28. data/lib/whop_sdk/models/withdrawal_create_params.rb +46 -0
  29. data/lib/whop_sdk/models/withdrawal_create_response.rb +275 -0
  30. data/lib/whop_sdk/models.rb +14 -0
  31. data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
  32. data/lib/whop_sdk/resources/experiences.rb +6 -2
  33. data/lib/whop_sdk/resources/fee_markups.rb +112 -0
  34. data/lib/whop_sdk/resources/payment_methods.rb +2 -2
  35. data/lib/whop_sdk/resources/payments.rb +35 -0
  36. data/lib/whop_sdk/resources/payout_methods.rb +49 -0
  37. data/lib/whop_sdk/resources/withdrawals.rb +34 -0
  38. data/lib/whop_sdk/version.rb +1 -1
  39. data/lib/whop_sdk.rb +15 -0
  40. data/rbi/whop_sdk/client.rbi +6 -0
  41. data/rbi/whop_sdk/models/checkout_configuration.rbi +8 -0
  42. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
  43. data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +8 -0
  44. data/rbi/whop_sdk/models/course.rbi +115 -3
  45. data/rbi/whop_sdk/models/course_lesson_interaction.rbi +55 -2
  46. data/rbi/whop_sdk/models/course_lesson_interaction_list_item.rbi +60 -2
  47. data/rbi/whop_sdk/models/experience.rbi +8 -0
  48. data/rbi/whop_sdk/models/experience_create_params.rbi +8 -0
  49. data/rbi/whop_sdk/models/experience_list_response.rbi +8 -0
  50. data/rbi/whop_sdk/models/experience_update_params.rbi +8 -0
  51. data/rbi/whop_sdk/models/fee_markup_create_params.rbi +83 -0
  52. data/rbi/whop_sdk/models/fee_markup_create_response.rbi +89 -0
  53. data/rbi/whop_sdk/models/fee_markup_delete_params.rbi +27 -0
  54. data/rbi/whop_sdk/models/fee_markup_delete_response.rbi +8 -0
  55. data/rbi/whop_sdk/models/fee_markup_list_params.rbi +77 -0
  56. data/rbi/whop_sdk/models/fee_markup_list_response.rbi +89 -0
  57. data/rbi/whop_sdk/models/fee_markup_type.rbi +37 -0
  58. data/rbi/whop_sdk/models/payment_list_fees_params.rbi +67 -0
  59. data/rbi/whop_sdk/models/payment_list_fees_response.rbi +239 -0
  60. data/rbi/whop_sdk/models/payment_method_list_response.rbi +305 -83
  61. data/rbi/whop_sdk/models/payment_method_retrieve_response.rbi +305 -88
  62. data/rbi/whop_sdk/models/payout_method_list_params.rbi +75 -0
  63. data/rbi/whop_sdk/models/payout_method_list_response.rbi +200 -0
  64. data/rbi/whop_sdk/models/withdrawal_create_params.rbi +67 -0
  65. data/rbi/whop_sdk/models/withdrawal_create_response.rbi +564 -0
  66. data/rbi/whop_sdk/models.rbi +14 -0
  67. data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
  68. data/rbi/whop_sdk/resources/experiences.rbi +6 -0
  69. data/rbi/whop_sdk/resources/fee_markups.rbi +96 -0
  70. data/rbi/whop_sdk/resources/payment_methods.rbi +2 -2
  71. data/rbi/whop_sdk/resources/payments.rbi +34 -0
  72. data/rbi/whop_sdk/resources/payout_methods.rbi +46 -0
  73. data/rbi/whop_sdk/resources/withdrawals.rbi +29 -0
  74. data/sig/whop_sdk/client.rbs +4 -0
  75. data/sig/whop_sdk/models/checkout_configuration.rbs +5 -0
  76. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
  77. data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +5 -0
  78. data/sig/whop_sdk/models/course.rbs +45 -3
  79. data/sig/whop_sdk/models/course_lesson_interaction.rbs +28 -3
  80. data/sig/whop_sdk/models/course_lesson_interaction_list_item.rbs +28 -3
  81. data/sig/whop_sdk/models/experience.rbs +5 -0
  82. data/sig/whop_sdk/models/experience_create_params.rbs +11 -1
  83. data/sig/whop_sdk/models/experience_list_response.rbs +5 -0
  84. data/sig/whop_sdk/models/experience_update_params.rbs +5 -0
  85. data/sig/whop_sdk/models/fee_markup_create_params.rbs +51 -0
  86. data/sig/whop_sdk/models/fee_markup_create_response.rbs +50 -0
  87. data/sig/whop_sdk/models/fee_markup_delete_params.rbs +15 -0
  88. data/sig/whop_sdk/models/fee_markup_delete_response.rbs +5 -0
  89. data/sig/whop_sdk/models/fee_markup_list_params.rbs +46 -0
  90. data/sig/whop_sdk/models/fee_markup_list_response.rbs +50 -0
  91. data/sig/whop_sdk/models/fee_markup_type.rbs +22 -0
  92. data/sig/whop_sdk/models/payment_list_fees_params.rbs +36 -0
  93. data/sig/whop_sdk/models/payment_list_fees_response.rbs +104 -0
  94. data/sig/whop_sdk/models/payment_method_list_response.rbs +149 -41
  95. data/sig/whop_sdk/models/payment_method_retrieve_response.rbs +149 -41
  96. data/sig/whop_sdk/models/payout_method_list_params.rbs +46 -0
  97. data/sig/whop_sdk/models/payout_method_list_response.rbs +83 -0
  98. data/sig/whop_sdk/models/withdrawal_create_params.rbs +41 -0
  99. data/sig/whop_sdk/models/withdrawal_create_response.rbs +243 -0
  100. data/sig/whop_sdk/models.rbs +14 -0
  101. data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
  102. data/sig/whop_sdk/resources/experiences.rbs +2 -0
  103. data/sig/whop_sdk/resources/fee_markups.rbs +28 -0
  104. data/sig/whop_sdk/resources/payment_methods.rbs +2 -2
  105. data/sig/whop_sdk/resources/payments.rbs +9 -0
  106. data/sig/whop_sdk/resources/payout_methods.rbs +16 -0
  107. data/sig/whop_sdk/resources/withdrawals.rbs +8 -0
  108. metadata +47 -2
@@ -0,0 +1,275 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Withdrawals#create
6
+ class WithdrawalCreateResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # Internal ID of the withdrawal request.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute amount
14
+ # How much money was attempted to be withdrawn, in a float type.
15
+ #
16
+ # @return [Float]
17
+ required :amount, Float
18
+
19
+ # @!attribute created_at
20
+ # When the withdrawal request was created.
21
+ #
22
+ # @return [Time]
23
+ required :created_at, Time
24
+
25
+ # @!attribute currency
26
+ # The currency of the withdrawal request.
27
+ #
28
+ # @return [Symbol, WhopSDK::Models::Currency]
29
+ required :currency, enum: -> { WhopSDK::Currency }
30
+
31
+ # @!attribute error_code
32
+ # The different error codes a payout can be in.
33
+ #
34
+ # @return [Symbol, WhopSDK::Models::WithdrawalCreateResponse::ErrorCode, nil]
35
+ required :error_code, enum: -> { WhopSDK::Models::WithdrawalCreateResponse::ErrorCode }, nil?: true
36
+
37
+ # @!attribute error_message
38
+ # The error message for the withdrawal, if any.
39
+ #
40
+ # @return [String, nil]
41
+ required :error_message, String, nil?: true
42
+
43
+ # @!attribute estimated_availability
44
+ # The estimated availability date for the withdrawal, if any.
45
+ #
46
+ # @return [Time, nil]
47
+ required :estimated_availability, Time, nil?: true
48
+
49
+ # @!attribute fee_amount
50
+ # The fee amount that was charged for the withdrawal. This is in the same currency
51
+ # as the withdrawal amount.
52
+ #
53
+ # @return [Float]
54
+ required :fee_amount, Float
55
+
56
+ # @!attribute fee_type
57
+ # The different fee types for a withdrawal.
58
+ #
59
+ # @return [Symbol, WhopSDK::Models::WithdrawalFeeTypes, nil]
60
+ required :fee_type, enum: -> { WhopSDK::WithdrawalFeeTypes }, nil?: true
61
+
62
+ # @!attribute ledger_account
63
+ # The ledger account associated with the withdrawal.
64
+ #
65
+ # @return [WhopSDK::Models::WithdrawalCreateResponse::LedgerAccount]
66
+ required :ledger_account, -> { WhopSDK::Models::WithdrawalCreateResponse::LedgerAccount }
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
+
76
+ # @!attribute payout_token
77
+ # The payout token used for the withdrawal, if applicable.
78
+ #
79
+ # @return [WhopSDK::Models::WithdrawalCreateResponse::PayoutToken, nil]
80
+ required :payout_token, -> { WhopSDK::Models::WithdrawalCreateResponse::PayoutToken }, nil?: true
81
+
82
+ # @!attribute speed
83
+ # The speed of the withdrawal.
84
+ #
85
+ # @return [Symbol, WhopSDK::Models::WithdrawalSpeeds]
86
+ required :speed, enum: -> { WhopSDK::WithdrawalSpeeds }
87
+
88
+ # @!attribute status
89
+ # Status of the withdrawal.
90
+ #
91
+ # @return [Symbol, WhopSDK::Models::WithdrawalStatus]
92
+ required :status, enum: -> { WhopSDK::WithdrawalStatus }
93
+
94
+ # @!attribute trace_code
95
+ # The trace code for the payout, if applicable. Provided on ACH transactions when
96
+ # available.
97
+ #
98
+ # @return [String, nil]
99
+ required :trace_code, String, nil?: true
100
+
101
+ # @!attribute withdrawal_type
102
+ # The type of withdrawal.
103
+ #
104
+ # @return [Symbol, WhopSDK::Models::WithdrawalTypes]
105
+ required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes }
106
+
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:)
108
+ # Some parameter documentations has been truncated, see
109
+ # {WhopSDK::Models::WithdrawalCreateResponse} for more details.
110
+ #
111
+ # A withdrawal request.
112
+ #
113
+ # @param id [String] Internal ID of the withdrawal request.
114
+ #
115
+ # @param amount [Float] How much money was attempted to be withdrawn, in a float type.
116
+ #
117
+ # @param created_at [Time] When the withdrawal request was created.
118
+ #
119
+ # @param currency [Symbol, WhopSDK::Models::Currency] The currency of the withdrawal request.
120
+ #
121
+ # @param error_code [Symbol, WhopSDK::Models::WithdrawalCreateResponse::ErrorCode, nil] The different error codes a payout can be in.
122
+ #
123
+ # @param error_message [String, nil] The error message for the withdrawal, if any.
124
+ #
125
+ # @param estimated_availability [Time, nil] The estimated availability date for the withdrawal, if any.
126
+ #
127
+ # @param fee_amount [Float] The fee amount that was charged for the withdrawal. This is in the same currency
128
+ #
129
+ # @param fee_type [Symbol, WhopSDK::Models::WithdrawalFeeTypes, nil] The different fee types for a withdrawal.
130
+ #
131
+ # @param ledger_account [WhopSDK::Models::WithdrawalCreateResponse::LedgerAccount] The ledger account associated with the withdrawal.
132
+ #
133
+ # @param markup_fee [Float] The markup fee that was charged for the withdrawal. This is in the same currency
134
+ #
135
+ # @param payout_token [WhopSDK::Models::WithdrawalCreateResponse::PayoutToken, nil] The payout token used for the withdrawal, if applicable.
136
+ #
137
+ # @param speed [Symbol, WhopSDK::Models::WithdrawalSpeeds] The speed of the withdrawal.
138
+ #
139
+ # @param status [Symbol, WhopSDK::Models::WithdrawalStatus] Status of the withdrawal.
140
+ #
141
+ # @param trace_code [String, nil] The trace code for the payout, if applicable. Provided on ACH transactions when
142
+ #
143
+ # @param withdrawal_type [Symbol, WhopSDK::Models::WithdrawalTypes] The type of withdrawal.
144
+
145
+ # The different error codes a payout can be in.
146
+ #
147
+ # @see WhopSDK::Models::WithdrawalCreateResponse#error_code
148
+ module ErrorCode
149
+ extend WhopSDK::Internal::Type::Enum
150
+
151
+ ACCOUNT_CLOSED = :account_closed
152
+ ACCOUNT_DOES_NOT_EXIST = :account_does_not_exist
153
+ ACCOUNT_INFORMATION_INVALID = :account_information_invalid
154
+ ACCOUNT_NUMBER_INVALID_REGION = :account_number_invalid_region
155
+ ACCOUNT_FROZEN = :account_frozen
156
+ ACCOUNT_LOOKUP_FAILED = :account_lookup_failed
157
+ ACCOUNT_NOT_FOUND = :account_not_found
158
+ AMOUNT_OUT_OF_BOUNDS = :amount_out_of_bounds
159
+ ATTRIBUTES_NOT_VALIDATED = :attributes_not_validated
160
+ B2B_PAYMENTS_PROHIBITED = :b2b_payments_prohibited
161
+ BANK_STATEMENT_REQUIRED = :bank_statement_required
162
+ COMPLIANCE_REVIEW = :compliance_review
163
+ CURRENCY_NOT_SUPPORTED = :currency_not_supported
164
+ DEPOSIT_CANCELED = :deposit_canceled
165
+ DEPOSIT_FAILED = :deposit_failed
166
+ DEPOSIT_REJECTED = :deposit_rejected
167
+ DESTINATION_UNAVAILABLE = :destination_unavailable
168
+ EXCEEDED_ACCOUNT_LIMIT = :exceeded_account_limit
169
+ EXPIRED_QUOTE = :expired_quote
170
+ GENERIC_PAYOUT_ERROR = :generic_payout_error
171
+ TECHNICAL_PROBLEM = :technical_problem
172
+ IDENTIFICATION_NUMBER_INVALID = :identification_number_invalid
173
+ INVALID_ACCOUNT_NUMBER = :invalid_account_number
174
+ INVALID_BANK_CODE = :invalid_bank_code
175
+ INVALID_BENEFICIARY = :invalid_beneficiary
176
+ INVALID_BRANCH_NUMBER = :invalid_branch_number
177
+ INVALID_BRANCH_CODE = :invalid_branch_code
178
+ INVALID_PHONE_NUMBER = :invalid_phone_number
179
+ INVALID_ROUTING_NUMBER = :invalid_routing_number
180
+ INVALID_SWIFT_CODE = :invalid_swift_code
181
+ INVALID_COMPANY_DETAILS = :invalid_company_details
182
+ MANUAL_CANCELATION = :manual_cancelation
183
+ MISC_ERROR = :misc_error
184
+ MISSING_CITY_AND_COUNTRY = :missing_city_and_country
185
+ MISSING_PHONE_NUMBER = :missing_phone_number
186
+ MISSING_REMITTANCE_INFO = :missing_remittance_info
187
+ PAYEE_NAME_INVALID = :payee_name_invalid
188
+ RECEIVING_ACCOUNT_LOCKED = :receiving_account_locked
189
+ REJECTED_BY_COMPLIANCE = :rejected_by_compliance
190
+ RTP_NOT_SUPPORTED = :rtp_not_supported
191
+ NON_TRANSACTION_ACCOUNT = :non_transaction_account
192
+ SOURCE_TOKEN_INSUFFICIENT_FUNDS = :source_token_insufficient_funds
193
+ SSN_INVALID = :ssn_invalid
194
+ WALLET_SCREENSHOT_REQUIRED = :wallet_screenshot_required
195
+ UNSUPPORTED_REGION = :unsupported_region
196
+
197
+ # @!method self.values
198
+ # @return [Array<Symbol>]
199
+ end
200
+
201
+ # @see WhopSDK::Models::WithdrawalCreateResponse#ledger_account
202
+ class LedgerAccount < WhopSDK::Internal::Type::BaseModel
203
+ # @!attribute id
204
+ # The ID of the LedgerAccount.
205
+ #
206
+ # @return [String]
207
+ required :id, String
208
+
209
+ # @!attribute company_id
210
+ # The ID of the company associated with this ledger account.
211
+ #
212
+ # @return [String, nil]
213
+ required :company_id, String, nil?: true
214
+
215
+ # @!method initialize(id:, company_id:)
216
+ # The ledger account associated with the withdrawal.
217
+ #
218
+ # @param id [String] The ID of the LedgerAccount.
219
+ #
220
+ # @param company_id [String, nil] The ID of the company associated with this ledger account.
221
+ end
222
+
223
+ # @see WhopSDK::Models::WithdrawalCreateResponse#payout_token
224
+ class PayoutToken < WhopSDK::Internal::Type::BaseModel
225
+ # @!attribute id
226
+ # The ID of the payout token
227
+ #
228
+ # @return [String]
229
+ required :id, String
230
+
231
+ # @!attribute created_at
232
+ # The date and time the payout token was created
233
+ #
234
+ # @return [Time]
235
+ required :created_at, Time
236
+
237
+ # @!attribute destination_currency_code
238
+ # The currency code of the payout destination. This is the currency that payouts
239
+ # will be made in for this token.
240
+ #
241
+ # @return [String]
242
+ required :destination_currency_code, String
243
+
244
+ # @!attribute nickname
245
+ # An optional nickname for the payout token to help the user identify it. This is
246
+ # not used by the provider and is only for the user's reference.
247
+ #
248
+ # @return [String, nil]
249
+ required :nickname, String, nil?: true
250
+
251
+ # @!attribute payer_name
252
+ # The name of the payer associated with the payout token.
253
+ #
254
+ # @return [String, nil]
255
+ required :payer_name, String, nil?: true
256
+
257
+ # @!method initialize(id:, created_at:, destination_currency_code:, nickname:, payer_name:)
258
+ # Some parameter documentations has been truncated, see
259
+ # {WhopSDK::Models::WithdrawalCreateResponse::PayoutToken} for more details.
260
+ #
261
+ # The payout token used for the withdrawal, if applicable.
262
+ #
263
+ # @param id [String] The ID of the payout token
264
+ #
265
+ # @param created_at [Time] The date and time the payout token was created
266
+ #
267
+ # @param destination_currency_code [String] The currency code of the payout destination. This is the currency that payouts w
268
+ #
269
+ # @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is
270
+ #
271
+ # @param payer_name [String, nil] The name of the payer associated with the payout token.
272
+ end
273
+ end
274
+ end
275
+ end
@@ -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
@@ -350,6 +358,8 @@ module WhopSDK
350
358
 
351
359
  PaymentFailedWebhookEvent = WhopSDK::Models::PaymentFailedWebhookEvent
352
360
 
361
+ PaymentListFeesParams = WhopSDK::Models::PaymentListFeesParams
362
+
353
363
  PaymentListParams = WhopSDK::Models::PaymentListParams
354
364
 
355
365
  PaymentMethodListParams = WhopSDK::Models::PaymentMethodListParams
@@ -372,6 +382,8 @@ module WhopSDK
372
382
 
373
383
  PaymentVoidParams = WhopSDK::Models::PaymentVoidParams
374
384
 
385
+ PayoutMethodListParams = WhopSDK::Models::PayoutMethodListParams
386
+
375
387
  Plan = WhopSDK::Models::Plan
376
388
 
377
389
  PlanCreateParams = WhopSDK::Models::PlanCreateParams
@@ -516,6 +528,8 @@ module WhopSDK
516
528
 
517
529
  WithdrawalCreatedWebhookEvent = WhopSDK::Models::WithdrawalCreatedWebhookEvent
518
530
 
531
+ WithdrawalCreateParams = WhopSDK::Models::WithdrawalCreateParams
532
+
519
533
  WithdrawalFeeTypes = WhopSDK::Models::WithdrawalFeeTypes
520
534
 
521
535
  WithdrawalListParams = WhopSDK::Models::WithdrawalListParams
@@ -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
@@ -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
@@ -21,7 +21,7 @@ module WhopSDK
21
21
  #
22
22
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
23
23
  #
24
- # @return [WhopSDK::Models::PaymentMethodRetrieveResponse]
24
+ # @return [WhopSDK::Models::PaymentMethodRetrieveResponse::BasePaymentMethod, WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod, WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod]
25
25
  #
26
26
  # @see WhopSDK::Models::PaymentMethodRetrieveParams
27
27
  def retrieve(id, params)
@@ -65,7 +65,7 @@ module WhopSDK
65
65
  #
66
66
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
67
67
  #
68
- # @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::PaymentMethodListResponse>]
68
+ # @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::PaymentMethodListResponse::BasePaymentMethod, WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod>]
69
69
  #
70
70
  # @see WhopSDK::Models::PaymentMethodListParams
71
71
  def list(params)
@@ -146,6 +146,41 @@ module WhopSDK
146
146
  )
147
147
  end
148
148
 
149
+ # Lists fees for a payment
150
+ #
151
+ # Required permissions:
152
+ #
153
+ # - `payment:basic:read`
154
+ #
155
+ # @overload list_fees(id, after: nil, before: nil, first: nil, last: nil, request_options: {})
156
+ #
157
+ # @param id [String] The ID of the payment to list fees for
158
+ #
159
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
160
+ #
161
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
162
+ #
163
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
164
+ #
165
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
166
+ #
167
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
168
+ #
169
+ # @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::PaymentListFeesResponse>]
170
+ #
171
+ # @see WhopSDK::Models::PaymentListFeesParams
172
+ def list_fees(id, params = {})
173
+ parsed, options = WhopSDK::PaymentListFeesParams.dump_request(params)
174
+ @client.request(
175
+ method: :get,
176
+ path: ["payments/%1$s/fees", id],
177
+ query: parsed,
178
+ page: WhopSDK::Internal::CursorPage,
179
+ model: WhopSDK::Models::PaymentListFeesResponse,
180
+ options: options
181
+ )
182
+ end
183
+
149
184
  # Refunds a payment
150
185
  #
151
186
  # Required permissions:
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Resources
5
+ class PayoutMethods
6
+ # Lists payout destinations for a company
7
+ #
8
+ # Required permissions:
9
+ #
10
+ # - `payout:destination:read`
11
+ #
12
+ # @overload list(company_id:, after: nil, before: nil, first: nil, last: nil, request_options: {})
13
+ #
14
+ # @param company_id [String] The company ID to list payout methods for.
15
+ #
16
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
17
+ #
18
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
19
+ #
20
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
21
+ #
22
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
23
+ #
24
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
25
+ #
26
+ # @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::PayoutMethodListResponse>]
27
+ #
28
+ # @see WhopSDK::Models::PayoutMethodListParams
29
+ def list(params)
30
+ parsed, options = WhopSDK::PayoutMethodListParams.dump_request(params)
31
+ @client.request(
32
+ method: :get,
33
+ path: "payout_methods",
34
+ query: parsed,
35
+ page: WhopSDK::Internal::CursorPage,
36
+ model: WhopSDK::Models::PayoutMethodListResponse,
37
+ options: options
38
+ )
39
+ end
40
+
41
+ # @api private
42
+ #
43
+ # @param client [WhopSDK::Client]
44
+ def initialize(client:)
45
+ @client = client
46
+ end
47
+ end
48
+ end
49
+ end
@@ -3,11 +3,45 @@
3
3
  module WhopSDK
4
4
  module Resources
5
5
  class Withdrawals
6
+ # Creates a withdrawal request for a ledger account
7
+ #
8
+ # Required permissions:
9
+ #
10
+ # - `payout:withdraw_funds`
11
+ # - `payout:destination:read`
12
+ #
13
+ # @overload create(amount:, company_id:, currency:, payout_method_id: nil, request_options: {})
14
+ #
15
+ # @param amount [Float] The amount to withdraw in the specified currency
16
+ #
17
+ # @param company_id [String] The ID of the company to withdraw from.
18
+ #
19
+ # @param currency [Symbol, WhopSDK::Models::Currency] The currency that is being withdrawn.
20
+ #
21
+ # @param payout_method_id [String, nil] The ID of the payout method to use for the withdrawal.
22
+ #
23
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
24
+ #
25
+ # @return [WhopSDK::Models::WithdrawalCreateResponse]
26
+ #
27
+ # @see WhopSDK::Models::WithdrawalCreateParams
28
+ def create(params)
29
+ parsed, options = WhopSDK::WithdrawalCreateParams.dump_request(params)
30
+ @client.request(
31
+ method: :post,
32
+ path: "withdrawals",
33
+ body: parsed,
34
+ model: WhopSDK::Models::WithdrawalCreateResponse,
35
+ options: options
36
+ )
37
+ end
38
+
6
39
  # Retrieves a withdrawal by ID
7
40
  #
8
41
  # Required permissions:
9
42
  #
10
43
  # - `payout:withdrawal:read`
44
+ # - `payout:destination:read`
11
45
  #
12
46
  # @overload retrieve(id, request_options: {})
13
47
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WhopSDK
4
- VERSION = "0.0.14"
4
+ VERSION = "0.0.16"
5
5
  end