whop_sdk 0.0.11 → 0.0.12

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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
  5. data/lib/whop_sdk/models/plan.rb +9 -1
  6. data/lib/whop_sdk/models/plan_create_params.rb +9 -1
  7. data/lib/whop_sdk/models/plan_list_response.rb +9 -1
  8. data/lib/whop_sdk/models/product_create_params.rb +2 -2
  9. data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
  10. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +309 -0
  11. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +111 -166
  12. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +309 -0
  13. data/lib/whop_sdk/models.rb +4 -0
  14. data/lib/whop_sdk/resources/plans.rb +3 -1
  15. data/lib/whop_sdk/resources/products.rb +1 -1
  16. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  17. data/lib/whop_sdk/version.rb +1 -1
  18. data/lib/whop_sdk.rb +2 -0
  19. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
  20. data/rbi/whop_sdk/models/plan.rbi +8 -0
  21. data/rbi/whop_sdk/models/plan_create_params.rbi +8 -0
  22. data/rbi/whop_sdk/models/plan_list_response.rbi +8 -0
  23. data/rbi/whop_sdk/models/product_create_params.rbi +2 -2
  24. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +2 -0
  25. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +633 -0
  26. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +326 -480
  27. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +633 -0
  28. data/rbi/whop_sdk/models.rbi +4 -0
  29. data/rbi/whop_sdk/resources/plans.rbi +3 -0
  30. data/rbi/whop_sdk/resources/products.rbi +1 -1
  31. data/rbi/whop_sdk/resources/webhooks.rbi +2 -0
  32. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
  33. data/sig/whop_sdk/models/plan.rbs +5 -0
  34. data/sig/whop_sdk/models/plan_create_params.rbs +5 -0
  35. data/sig/whop_sdk/models/plan_list_response.rbs +5 -0
  36. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
  37. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +275 -0
  38. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +132 -191
  39. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +275 -0
  40. data/sig/whop_sdk/models.rbs +4 -0
  41. data/sig/whop_sdk/resources/plans.rbs +1 -0
  42. data/sig/whop_sdk/resources/webhooks.rbs +2 -0
  43. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c1fa6283e78ac7d35742c7972630f30bde25fb899730ccb1b10daad50ee5dcb
4
- data.tar.gz: 0a703e1bfda78d55b4780979e20397beff3eaa4ce6ed9d42d55f006f1c948054
3
+ metadata.gz: 2104fb2c1dc9085753b9081bb0b41e448e9032eb9edf9872685b75c08caf6c8e
4
+ data.tar.gz: 26dbb716c67b11dff5e6b9e00fdc7183bda0888bae0293ca062ff98c988d38b9
5
5
  SHA512:
6
- metadata.gz: c69ac08c3f771766d2167d8ce82d54484979b583a78eb6dcd986101d21a793bbacf9f19cbe52ae5dac09e34e5dea0ff607ea4e2f324d237e8047321f69aa60e9
7
- data.tar.gz: 9261ba267af898db55bd7283bf75f869e49071d8d36d37c5cfa7648e136f811be5b8f43713192fa622e1e5af0f4faa7aa95776266a22cefe6b84e88b796f5457
6
+ metadata.gz: a9e4c4c3f0691435ef76bbc1c4e1f833de704aad8e8edd376b6a880da93ca0a03f7bea17aa4adaa2bcd5a4720cdbe0c22e6d8b410a60315d02ed8c6ae6c03119
7
+ data.tar.gz: 920caa9c016799f63dc2a379512cbfb460a36480eb263fcb96df6eca8577648c065209e633f21dd36d64ba5e03bc450f5198224485d585673892cb78e3af3c0c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.12 (2025-12-03)
4
+
5
+ Full Changelog: [v0.0.11...v0.0.12](https://github.com/whopio/whopsdk-ruby/compare/v0.0.11...v0.0.12)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([d339d55](https://github.com/whopio/whopsdk-ruby/commit/d339d55a2776f2ac1c41bddadcd592edc07931dd))
10
+ * **api:** api update ([6de152e](https://github.com/whopio/whopsdk-ruby/commit/6de152ec6aba2bed5897803fd555055e7a47ae18))
11
+ * **api:** api update ([b947c74](https://github.com/whopio/whopsdk-ruby/commit/b947c740bcfacacc0933c906298977190d99ee2f))
12
+
3
13
  ## 0.0.11 (2025-12-02)
4
14
 
5
15
  Full Changelog: [v0.0.10...v0.0.11](https://github.com/whopio/whopsdk-ruby/compare/v0.0.10...v0.0.11)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "whop_sdk", "~> 0.0.11"
20
+ gem "whop_sdk", "~> 0.0.12"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -194,6 +194,12 @@ module WhopSDK
194
194
  # @return [Float, nil]
195
195
  optional :renewal_price, Float, nil?: true
196
196
 
197
+ # @!attribute split_pay_required_payments
198
+ # The number of payments required before pausing the subscription.
199
+ #
200
+ # @return [Integer, nil]
201
+ optional :split_pay_required_payments, Integer, nil?: true
202
+
197
203
  # @!attribute title
198
204
  # The title of the plan. This will be visible on the product page to customers.
199
205
  #
@@ -212,7 +218,7 @@ module WhopSDK
212
218
  # @return [Symbol, WhopSDK::Models::Visibility, nil]
213
219
  optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
214
220
 
215
- # @!method initialize(company_id:, currency:, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil)
221
+ # @!method initialize(company_id:, currency:, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, title: nil, trial_period_days: nil, visibility: nil)
216
222
  # Some parameter documentations has been truncated, see
217
223
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan} for more details.
218
224
  #
@@ -252,6 +258,8 @@ module WhopSDK
252
258
  #
253
259
  # @param renewal_price [Float, nil] The amount the customer is charged every billing period.
254
260
  #
261
+ # @param split_pay_required_payments [Integer, nil] The number of payments required before pausing the subscription.
262
+ #
255
263
  # @param title [String, nil] The title of the plan. This will be visible on the product page to customers.
256
264
  #
257
265
  # @param trial_period_days [Integer, nil] The number of free trial days added before a renewal plan.
@@ -117,6 +117,12 @@ module WhopSDK
117
117
  # @return [Float]
118
118
  required :renewal_price, Float
119
119
 
120
+ # @!attribute split_pay_required_payments
121
+ # The number of payments required before pausing the subscription.
122
+ #
123
+ # @return [Integer, nil]
124
+ required :split_pay_required_payments, Integer, nil?: true
125
+
120
126
  # @!attribute stock
121
127
  # The number of units available for purchase. Only displayed to authorized actors
122
128
  #
@@ -159,7 +165,7 @@ module WhopSDK
159
165
  # @return [Symbol, WhopSDK::Models::Visibility]
160
166
  required :visibility, enum: -> { WhopSDK::Visibility }
161
167
 
162
- # @!method initialize(id:, billing_period:, collect_tax:, company:, created_at:, currency:, custom_fields:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, stock:, tax_type:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
168
+ # @!method initialize(id:, billing_period:, collect_tax:, company:, created_at:, currency:, custom_fields:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, split_pay_required_payments:, stock:, tax_type:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
163
169
  # A plan for an product. Plans define the core parameters that define a checkout
164
170
  # and payment on whop. Use plans to create different ways to price your products
165
171
  # (Eg renewal / one_time)
@@ -202,6 +208,8 @@ module WhopSDK
202
208
  #
203
209
  # @param renewal_price [Float] The price a person has to pay for a plan on the renewal purchase.
204
210
  #
211
+ # @param split_pay_required_payments [Integer, nil] The number of payments required before pausing the subscription.
212
+ #
205
213
  # @param stock [Integer, nil] The number of units available for purchase. Only displayed to authorized actors
206
214
  #
207
215
  # @param tax_type [Symbol, WhopSDK::Models::TaxType] The tax type for the plan.
@@ -106,6 +106,12 @@ module WhopSDK
106
106
  # @return [Float, nil]
107
107
  optional :renewal_price, Float, nil?: true
108
108
 
109
+ # @!attribute split_pay_required_payments
110
+ # The number of payments required before pausing the subscription.
111
+ #
112
+ # @return [Integer, nil]
113
+ optional :split_pay_required_payments, Integer, nil?: true
114
+
109
115
  # @!attribute stock
110
116
  # The number of units available for purchase.
111
117
  #
@@ -136,7 +142,7 @@ module WhopSDK
136
142
  # @return [Symbol, WhopSDK::Models::Visibility, nil]
137
143
  optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
138
144
 
139
- # @!method initialize(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
145
+ # @!method initialize(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
140
146
  # Some parameter documentations has been truncated, see
141
147
  # {WhopSDK::Models::PlanCreateParams} for more details.
142
148
  #
@@ -170,6 +176,8 @@ module WhopSDK
170
176
  #
171
177
  # @param renewal_price [Float, nil] The amount the customer is charged every billing period. Use only if a recurring
172
178
  #
179
+ # @param split_pay_required_payments [Integer, nil] The number of payments required before pausing the subscription.
180
+ #
173
181
  # @param stock [Integer, nil] The number of units available for purchase.
174
182
  #
175
183
  # @param title [String, nil] The title of the plan. This will be visible on the product page to customers.
@@ -108,6 +108,12 @@ module WhopSDK
108
108
  # @return [Float]
109
109
  required :renewal_price, Float
110
110
 
111
+ # @!attribute split_pay_required_payments
112
+ # The number of payments required before pausing the subscription.
113
+ #
114
+ # @return [Integer, nil]
115
+ required :split_pay_required_payments, Integer, nil?: true
116
+
111
117
  # @!attribute stock
112
118
  # The number of units available for purchase. Only displayed to authorized actors
113
119
  #
@@ -144,7 +150,7 @@ module WhopSDK
144
150
  # @return [Symbol, WhopSDK::Models::Visibility]
145
151
  required :visibility, enum: -> { WhopSDK::Visibility }
146
152
 
147
- # @!method initialize(id:, billing_period:, company:, created_at:, currency:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, stock:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
153
+ # @!method initialize(id:, billing_period:, company:, created_at:, currency:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, split_pay_required_payments:, stock:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:)
148
154
  # A plan for an product. Plans define the core parameters that define a checkout
149
155
  # and payment on whop. Use plans to create different ways to price your products
150
156
  # (Eg renewal / one_time)
@@ -183,6 +189,8 @@ module WhopSDK
183
189
  #
184
190
  # @param renewal_price [Float] The price a person has to pay for a plan on the renewal purchase.
185
191
  #
192
+ # @param split_pay_required_payments [Integer, nil] The number of payments required before pausing the subscription.
193
+ #
186
194
  # @param stock [Integer, nil] The number of units available for purchase. Only displayed to authorized actors
187
195
  #
188
196
  # @param title [String, nil] The title of the plan. This will be visible on the product page to customers.
@@ -14,7 +14,7 @@ module WhopSDK
14
14
  required :company_id, String
15
15
 
16
16
  # @!attribute title
17
- # The title of the product.
17
+ # The title of the product. It must be max 40 characters.
18
18
  #
19
19
  # @return [String]
20
20
  required :title, String
@@ -143,7 +143,7 @@ module WhopSDK
143
143
  #
144
144
  # @param company_id [String] The ID of the company to create the product for.
145
145
  #
146
- # @param title [String] The title of the product.
146
+ # @param title [String] The title of the product. It must be max 40 characters.
147
147
  #
148
148
  # @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
149
149
  #
@@ -33,6 +33,10 @@ module WhopSDK
33
33
 
34
34
  variant :"setup_intent.canceled", -> { WhopSDK::SetupIntentCanceledWebhookEvent }
35
35
 
36
+ variant :"withdrawal.created", -> { WhopSDK::WithdrawalCreatedWebhookEvent }
37
+
38
+ variant :"withdrawal.updated", -> { WhopSDK::WithdrawalUpdatedWebhookEvent }
39
+
36
40
  variant :"course_lesson_interaction.completed",
37
41
  -> { WhopSDK::CourseLessonInteractionCompletedWebhookEvent }
38
42
 
@@ -51,7 +55,7 @@ module WhopSDK
51
55
  variant :"refund.updated", -> { WhopSDK::RefundUpdatedWebhookEvent }
52
56
 
53
57
  # @!method self.variants
54
- # @return [Array(WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::SetupIntentRequiresActionWebhookEvent, WhopSDK::Models::SetupIntentSucceededWebhookEvent, WhopSDK::Models::SetupIntentCanceledWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent)]
58
+ # @return [Array(WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::SetupIntentRequiresActionWebhookEvent, WhopSDK::Models::SetupIntentSucceededWebhookEvent, WhopSDK::Models::SetupIntentCanceledWebhookEvent, WhopSDK::Models::WithdrawalCreatedWebhookEvent, WhopSDK::Models::WithdrawalUpdatedWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent)]
55
59
  end
56
60
  end
57
61
  end
@@ -0,0 +1,309 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class WithdrawalCreatedWebhookEvent < WhopSDK::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ # A unique ID for every single webhook request
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute api_version
13
+ # The API version for this webhook
14
+ #
15
+ # @return [Symbol, :v1]
16
+ required :api_version, const: :v1
17
+
18
+ # @!attribute data
19
+ # A withdrawal request.
20
+ #
21
+ # @return [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data]
22
+ required :data, -> { WhopSDK::WithdrawalCreatedWebhookEvent::Data }
23
+
24
+ # @!attribute timestamp
25
+ # The timestamp in ISO 8601 format that the webhook was sent at on the server
26
+ #
27
+ # @return [Time]
28
+ required :timestamp, Time
29
+
30
+ # @!attribute type
31
+ # The webhook event type
32
+ #
33
+ # @return [Symbol, :"withdrawal.created"]
34
+ required :type, const: :"withdrawal.created"
35
+
36
+ # @!method initialize(id:, data:, timestamp:, api_version: :v1, type: :"withdrawal.created")
37
+ # @param id [String] A unique ID for every single webhook request
38
+ #
39
+ # @param data [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data] A withdrawal request.
40
+ #
41
+ # @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
42
+ #
43
+ # @param api_version [Symbol, :v1] The API version for this webhook
44
+ #
45
+ # @param type [Symbol, :"withdrawal.created"] The webhook event type
46
+
47
+ # @see WhopSDK::Models::WithdrawalCreatedWebhookEvent#data
48
+ class Data < WhopSDK::Internal::Type::BaseModel
49
+ # @!attribute id
50
+ # Internal ID of the withdrawal request.
51
+ #
52
+ # @return [String]
53
+ required :id, String
54
+
55
+ # @!attribute amount
56
+ # How much money was attempted to be withdrawn, in a float type.
57
+ #
58
+ # @return [Float]
59
+ required :amount, Float
60
+
61
+ # @!attribute created_at
62
+ # When the withdrawal request was created.
63
+ #
64
+ # @return [Time]
65
+ required :created_at, Time
66
+
67
+ # @!attribute currency
68
+ # The currency of the withdrawal request.
69
+ #
70
+ # @return [Symbol, WhopSDK::Models::Currency]
71
+ required :currency, enum: -> { WhopSDK::Currency }
72
+
73
+ # @!attribute error_code
74
+ # The different error codes a payout can be in.
75
+ #
76
+ # @return [Symbol, WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::ErrorCode, nil]
77
+ required :error_code, enum: -> { WhopSDK::WithdrawalCreatedWebhookEvent::Data::ErrorCode }, nil?: true
78
+
79
+ # @!attribute error_message
80
+ # The error message for the withdrawal, if any.
81
+ #
82
+ # @return [String, nil]
83
+ required :error_message, String, nil?: true
84
+
85
+ # @!attribute estimated_availability
86
+ # The estimated availability date for the withdrawal, if any.
87
+ #
88
+ # @return [Time, nil]
89
+ required :estimated_availability, Time, nil?: true
90
+
91
+ # @!attribute fee_amount
92
+ # The fee amount that was charged for the withdrawal. This is in the same currency
93
+ # as the withdrawal amount.
94
+ #
95
+ # @return [Float]
96
+ required :fee_amount, Float
97
+
98
+ # @!attribute fee_type
99
+ # The different fee types for a withdrawal.
100
+ #
101
+ # @return [Symbol, WhopSDK::Models::WithdrawalFeeTypes, nil]
102
+ required :fee_type, enum: -> { WhopSDK::WithdrawalFeeTypes }, nil?: true
103
+
104
+ # @!attribute ledger_account
105
+ # The ledger account associated with the withdrawal.
106
+ #
107
+ # @return [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::LedgerAccount]
108
+ required :ledger_account, -> { WhopSDK::WithdrawalCreatedWebhookEvent::Data::LedgerAccount }
109
+
110
+ # @!attribute payout_token
111
+ # The payout token used for the withdrawal, if applicable.
112
+ #
113
+ # @return [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::PayoutToken, nil]
114
+ required :payout_token, -> { WhopSDK::WithdrawalCreatedWebhookEvent::Data::PayoutToken }, nil?: true
115
+
116
+ # @!attribute speed
117
+ # The speed of the withdrawal.
118
+ #
119
+ # @return [Symbol, WhopSDK::Models::WithdrawalSpeeds]
120
+ required :speed, enum: -> { WhopSDK::WithdrawalSpeeds }
121
+
122
+ # @!attribute status
123
+ # Status of the withdrawal.
124
+ #
125
+ # @return [Symbol, WhopSDK::Models::WithdrawalStatus]
126
+ required :status, enum: -> { WhopSDK::WithdrawalStatus }
127
+
128
+ # @!attribute trace_code
129
+ # The trace code for the payout, if applicable. Provided on ACH transactions when
130
+ # available.
131
+ #
132
+ # @return [String, nil]
133
+ required :trace_code, String, nil?: true
134
+
135
+ # @!attribute withdrawal_type
136
+ # The type of withdrawal.
137
+ #
138
+ # @return [Symbol, WhopSDK::Models::WithdrawalTypes]
139
+ required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes }
140
+
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:)
142
+ # Some parameter documentations has been truncated, see
143
+ # {WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data} for more details.
144
+ #
145
+ # A withdrawal request.
146
+ #
147
+ # @param id [String] Internal ID of the withdrawal request.
148
+ #
149
+ # @param amount [Float] How much money was attempted to be withdrawn, in a float type.
150
+ #
151
+ # @param created_at [Time] When the withdrawal request was created.
152
+ #
153
+ # @param currency [Symbol, WhopSDK::Models::Currency] The currency of the withdrawal request.
154
+ #
155
+ # @param error_code [Symbol, WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::ErrorCode, nil] The different error codes a payout can be in.
156
+ #
157
+ # @param error_message [String, nil] The error message for the withdrawal, if any.
158
+ #
159
+ # @param estimated_availability [Time, nil] The estimated availability date for the withdrawal, if any.
160
+ #
161
+ # @param fee_amount [Float] The fee amount that was charged for the withdrawal. This is in the same currency
162
+ #
163
+ # @param fee_type [Symbol, WhopSDK::Models::WithdrawalFeeTypes, nil] The different fee types for a withdrawal.
164
+ #
165
+ # @param ledger_account [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::LedgerAccount] The ledger account associated with the withdrawal.
166
+ #
167
+ # @param payout_token [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::PayoutToken, nil] The payout token used for the withdrawal, if applicable.
168
+ #
169
+ # @param speed [Symbol, WhopSDK::Models::WithdrawalSpeeds] The speed of the withdrawal.
170
+ #
171
+ # @param status [Symbol, WhopSDK::Models::WithdrawalStatus] Status of the withdrawal.
172
+ #
173
+ # @param trace_code [String, nil] The trace code for the payout, if applicable. Provided on ACH transactions when
174
+ #
175
+ # @param withdrawal_type [Symbol, WhopSDK::Models::WithdrawalTypes] The type of withdrawal.
176
+
177
+ # The different error codes a payout can be in.
178
+ #
179
+ # @see WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data#error_code
180
+ module ErrorCode
181
+ extend WhopSDK::Internal::Type::Enum
182
+
183
+ ACCOUNT_CLOSED = :account_closed
184
+ ACCOUNT_DOES_NOT_EXIST = :account_does_not_exist
185
+ ACCOUNT_INFORMATION_INVALID = :account_information_invalid
186
+ ACCOUNT_NUMBER_INVALID_REGION = :account_number_invalid_region
187
+ ACCOUNT_FROZEN = :account_frozen
188
+ ACCOUNT_LOOKUP_FAILED = :account_lookup_failed
189
+ ACCOUNT_NOT_FOUND = :account_not_found
190
+ AMOUNT_OUT_OF_BOUNDS = :amount_out_of_bounds
191
+ ATTRIBUTES_NOT_VALIDATED = :attributes_not_validated
192
+ B2B_PAYMENTS_PROHIBITED = :b2b_payments_prohibited
193
+ BANK_STATEMENT_REQUIRED = :bank_statement_required
194
+ COMPLIANCE_REVIEW = :compliance_review
195
+ CURRENCY_NOT_SUPPORTED = :currency_not_supported
196
+ DEPOSIT_CANCELED = :deposit_canceled
197
+ DEPOSIT_FAILED = :deposit_failed
198
+ DEPOSIT_REJECTED = :deposit_rejected
199
+ DESTINATION_UNAVAILABLE = :destination_unavailable
200
+ EXCEEDED_ACCOUNT_LIMIT = :exceeded_account_limit
201
+ EXPIRED_QUOTE = :expired_quote
202
+ GENERIC_PAYOUT_ERROR = :generic_payout_error
203
+ TECHNICAL_PROBLEM = :technical_problem
204
+ IDENTIFICATION_NUMBER_INVALID = :identification_number_invalid
205
+ INVALID_ACCOUNT_NUMBER = :invalid_account_number
206
+ INVALID_BANK_CODE = :invalid_bank_code
207
+ INVALID_BENEFICIARY = :invalid_beneficiary
208
+ INVALID_BRANCH_NUMBER = :invalid_branch_number
209
+ INVALID_BRANCH_CODE = :invalid_branch_code
210
+ INVALID_PHONE_NUMBER = :invalid_phone_number
211
+ INVALID_ROUTING_NUMBER = :invalid_routing_number
212
+ INVALID_SWIFT_CODE = :invalid_swift_code
213
+ INVALID_COMPANY_DETAILS = :invalid_company_details
214
+ MANUAL_CANCELATION = :manual_cancelation
215
+ MISC_ERROR = :misc_error
216
+ MISSING_CITY_AND_COUNTRY = :missing_city_and_country
217
+ MISSING_PHONE_NUMBER = :missing_phone_number
218
+ MISSING_REMITTANCE_INFO = :missing_remittance_info
219
+ PAYEE_NAME_INVALID = :payee_name_invalid
220
+ RECEIVING_ACCOUNT_LOCKED = :receiving_account_locked
221
+ REJECTED_BY_COMPLIANCE = :rejected_by_compliance
222
+ RTP_NOT_SUPPORTED = :rtp_not_supported
223
+ NON_TRANSACTION_ACCOUNT = :non_transaction_account
224
+ SOURCE_TOKEN_INSUFFICIENT_FUNDS = :source_token_insufficient_funds
225
+ SSN_INVALID = :ssn_invalid
226
+ WALLET_SCREENSHOT_REQUIRED = :wallet_screenshot_required
227
+ UNSUPPORTED_REGION = :unsupported_region
228
+
229
+ # @!method self.values
230
+ # @return [Array<Symbol>]
231
+ end
232
+
233
+ # @see WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data#ledger_account
234
+ class LedgerAccount < WhopSDK::Internal::Type::BaseModel
235
+ # @!attribute id
236
+ # The ID of the LedgerAccount.
237
+ #
238
+ # @return [String]
239
+ required :id, String
240
+
241
+ # @!attribute company_id
242
+ # The ID of the company associated with this ledger account.
243
+ #
244
+ # @return [String, nil]
245
+ required :company_id, String, nil?: true
246
+
247
+ # @!method initialize(id:, company_id:)
248
+ # The ledger account associated with the withdrawal.
249
+ #
250
+ # @param id [String] The ID of the LedgerAccount.
251
+ #
252
+ # @param company_id [String, nil] The ID of the company associated with this ledger account.
253
+ end
254
+
255
+ # @see WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data#payout_token
256
+ class PayoutToken < WhopSDK::Internal::Type::BaseModel
257
+ # @!attribute id
258
+ # The ID of the payout token
259
+ #
260
+ # @return [String]
261
+ required :id, String
262
+
263
+ # @!attribute created_at
264
+ # The date and time the payout token was created
265
+ #
266
+ # @return [Time]
267
+ required :created_at, Time
268
+
269
+ # @!attribute destination_currency_code
270
+ # The currency code of the payout destination. This is the currency that payouts
271
+ # will be made in for this token.
272
+ #
273
+ # @return [String]
274
+ required :destination_currency_code, String
275
+
276
+ # @!attribute nickname
277
+ # An optional nickname for the payout token to help the user identify it. This is
278
+ # not used by the provider and is only for the user's reference.
279
+ #
280
+ # @return [String, nil]
281
+ required :nickname, String, nil?: true
282
+
283
+ # @!attribute payer_name
284
+ # The name of the payer associated with the payout token.
285
+ #
286
+ # @return [String, nil]
287
+ required :payer_name, String, nil?: true
288
+
289
+ # @!method initialize(id:, created_at:, destination_currency_code:, nickname:, payer_name:)
290
+ # Some parameter documentations has been truncated, see
291
+ # {WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::PayoutToken} for more
292
+ # details.
293
+ #
294
+ # The payout token used for the withdrawal, if applicable.
295
+ #
296
+ # @param id [String] The ID of the payout token
297
+ #
298
+ # @param created_at [Time] The date and time the payout token was created
299
+ #
300
+ # @param destination_currency_code [String] The currency code of the payout destination. This is the currency that payouts w
301
+ #
302
+ # @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is
303
+ #
304
+ # @param payer_name [String, nil] The name of the payer associated with the payout token.
305
+ end
306
+ end
307
+ end
308
+ end
309
+ end