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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +1 -1
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
- data/lib/whop_sdk/models/plan.rb +9 -1
- data/lib/whop_sdk/models/plan_create_params.rb +9 -1
- data/lib/whop_sdk/models/plan_list_response.rb +9 -1
- data/lib/whop_sdk/models/product_create_params.rb +2 -2
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
- data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +309 -0
- data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +111 -166
- data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +309 -0
- data/lib/whop_sdk/models.rb +4 -0
- data/lib/whop_sdk/resources/plans.rb +3 -1
- data/lib/whop_sdk/resources/products.rb +1 -1
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +2 -0
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/plan.rbi +8 -0
- data/rbi/whop_sdk/models/plan_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/plan_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/product_create_params.rbi +2 -2
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +2 -0
- data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +633 -0
- data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +326 -480
- data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +633 -0
- data/rbi/whop_sdk/models.rbi +4 -0
- data/rbi/whop_sdk/resources/plans.rbi +3 -0
- data/rbi/whop_sdk/resources/products.rbi +1 -1
- data/rbi/whop_sdk/resources/webhooks.rbi +2 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
- data/sig/whop_sdk/models/plan.rbs +5 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +5 -0
- data/sig/whop_sdk/models/plan_list_response.rbs +5 -0
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
- data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +275 -0
- data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +132 -191
- data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +275 -0
- data/sig/whop_sdk/models.rbs +4 -0
- data/sig/whop_sdk/resources/plans.rbs +1 -0
- data/sig/whop_sdk/resources/webhooks.rbs +2 -0
- metadata +8 -2
|
@@ -28,6 +28,24 @@ module WhopSDK
|
|
|
28
28
|
# @return [Symbol, WhopSDK::Models::Currency]
|
|
29
29
|
required :currency, enum: -> { WhopSDK::Currency }
|
|
30
30
|
|
|
31
|
+
# @!attribute error_code
|
|
32
|
+
# The different error codes a payout can be in.
|
|
33
|
+
#
|
|
34
|
+
# @return [Symbol, WhopSDK::Models::WithdrawalRetrieveResponse::ErrorCode, nil]
|
|
35
|
+
required :error_code, enum: -> { WhopSDK::Models::WithdrawalRetrieveResponse::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
|
+
|
|
31
49
|
# @!attribute fee_amount
|
|
32
50
|
# The fee amount that was charged for the withdrawal. This is in the same currency
|
|
33
51
|
# as the withdrawal amount.
|
|
@@ -41,11 +59,11 @@ module WhopSDK
|
|
|
41
59
|
# @return [Symbol, WhopSDK::Models::WithdrawalFeeTypes, nil]
|
|
42
60
|
required :fee_type, enum: -> { WhopSDK::WithdrawalFeeTypes }, nil?: true
|
|
43
61
|
|
|
44
|
-
# @!attribute
|
|
45
|
-
# The
|
|
62
|
+
# @!attribute ledger_account
|
|
63
|
+
# The ledger account associated with the withdrawal.
|
|
46
64
|
#
|
|
47
|
-
# @return [WhopSDK::Models::WithdrawalRetrieveResponse::
|
|
48
|
-
required :
|
|
65
|
+
# @return [WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount]
|
|
66
|
+
required :ledger_account, -> { WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount }
|
|
49
67
|
|
|
50
68
|
# @!attribute payout_token
|
|
51
69
|
# The payout token used for the withdrawal, if applicable.
|
|
@@ -65,13 +83,20 @@ module WhopSDK
|
|
|
65
83
|
# @return [Symbol, WhopSDK::Models::WithdrawalStatus]
|
|
66
84
|
required :status, enum: -> { WhopSDK::WithdrawalStatus }
|
|
67
85
|
|
|
86
|
+
# @!attribute trace_code
|
|
87
|
+
# The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
88
|
+
# available.
|
|
89
|
+
#
|
|
90
|
+
# @return [String, nil]
|
|
91
|
+
required :trace_code, String, nil?: true
|
|
92
|
+
|
|
68
93
|
# @!attribute withdrawal_type
|
|
69
94
|
# The type of withdrawal.
|
|
70
95
|
#
|
|
71
96
|
# @return [Symbol, WhopSDK::Models::WithdrawalTypes]
|
|
72
97
|
required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes }
|
|
73
98
|
|
|
74
|
-
# @!method initialize(id:, amount:, created_at:, currency:, fee_amount:, fee_type:,
|
|
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:)
|
|
75
100
|
# Some parameter documentations has been truncated, see
|
|
76
101
|
# {WhopSDK::Models::WithdrawalRetrieveResponse} for more details.
|
|
77
102
|
#
|
|
@@ -85,11 +110,17 @@ module WhopSDK
|
|
|
85
110
|
#
|
|
86
111
|
# @param currency [Symbol, WhopSDK::Models::Currency] The currency of the withdrawal request.
|
|
87
112
|
#
|
|
113
|
+
# @param error_code [Symbol, WhopSDK::Models::WithdrawalRetrieveResponse::ErrorCode, nil] The different error codes a payout can be in.
|
|
114
|
+
#
|
|
115
|
+
# @param error_message [String, nil] The error message for the withdrawal, if any.
|
|
116
|
+
#
|
|
117
|
+
# @param estimated_availability [Time, nil] The estimated availability date for the withdrawal, if any.
|
|
118
|
+
#
|
|
88
119
|
# @param fee_amount [Float] The fee amount that was charged for the withdrawal. This is in the same currency
|
|
89
120
|
#
|
|
90
121
|
# @param fee_type [Symbol, WhopSDK::Models::WithdrawalFeeTypes, nil] The different fee types for a withdrawal.
|
|
91
122
|
#
|
|
92
|
-
# @param
|
|
123
|
+
# @param ledger_account [WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount] The ledger account associated with the withdrawal.
|
|
93
124
|
#
|
|
94
125
|
# @param payout_token [WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken, nil] The payout token used for the withdrawal, if applicable.
|
|
95
126
|
#
|
|
@@ -97,158 +128,86 @@ module WhopSDK
|
|
|
97
128
|
#
|
|
98
129
|
# @param status [Symbol, WhopSDK::Models::WithdrawalStatus] Status of the withdrawal.
|
|
99
130
|
#
|
|
131
|
+
# @param trace_code [String, nil] The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
132
|
+
#
|
|
100
133
|
# @param withdrawal_type [Symbol, WhopSDK::Models::WithdrawalTypes] The type of withdrawal.
|
|
101
134
|
|
|
102
|
-
#
|
|
103
|
-
|
|
135
|
+
# The different error codes a payout can be in.
|
|
136
|
+
#
|
|
137
|
+
# @see WhopSDK::Models::WithdrawalRetrieveResponse#error_code
|
|
138
|
+
module ErrorCode
|
|
139
|
+
extend WhopSDK::Internal::Type::Enum
|
|
140
|
+
|
|
141
|
+
ACCOUNT_CLOSED = :account_closed
|
|
142
|
+
ACCOUNT_DOES_NOT_EXIST = :account_does_not_exist
|
|
143
|
+
ACCOUNT_INFORMATION_INVALID = :account_information_invalid
|
|
144
|
+
ACCOUNT_NUMBER_INVALID_REGION = :account_number_invalid_region
|
|
145
|
+
ACCOUNT_FROZEN = :account_frozen
|
|
146
|
+
ACCOUNT_LOOKUP_FAILED = :account_lookup_failed
|
|
147
|
+
ACCOUNT_NOT_FOUND = :account_not_found
|
|
148
|
+
AMOUNT_OUT_OF_BOUNDS = :amount_out_of_bounds
|
|
149
|
+
ATTRIBUTES_NOT_VALIDATED = :attributes_not_validated
|
|
150
|
+
B2B_PAYMENTS_PROHIBITED = :b2b_payments_prohibited
|
|
151
|
+
BANK_STATEMENT_REQUIRED = :bank_statement_required
|
|
152
|
+
COMPLIANCE_REVIEW = :compliance_review
|
|
153
|
+
CURRENCY_NOT_SUPPORTED = :currency_not_supported
|
|
154
|
+
DEPOSIT_CANCELED = :deposit_canceled
|
|
155
|
+
DEPOSIT_FAILED = :deposit_failed
|
|
156
|
+
DEPOSIT_REJECTED = :deposit_rejected
|
|
157
|
+
DESTINATION_UNAVAILABLE = :destination_unavailable
|
|
158
|
+
EXCEEDED_ACCOUNT_LIMIT = :exceeded_account_limit
|
|
159
|
+
EXPIRED_QUOTE = :expired_quote
|
|
160
|
+
GENERIC_PAYOUT_ERROR = :generic_payout_error
|
|
161
|
+
TECHNICAL_PROBLEM = :technical_problem
|
|
162
|
+
IDENTIFICATION_NUMBER_INVALID = :identification_number_invalid
|
|
163
|
+
INVALID_ACCOUNT_NUMBER = :invalid_account_number
|
|
164
|
+
INVALID_BANK_CODE = :invalid_bank_code
|
|
165
|
+
INVALID_BENEFICIARY = :invalid_beneficiary
|
|
166
|
+
INVALID_BRANCH_NUMBER = :invalid_branch_number
|
|
167
|
+
INVALID_BRANCH_CODE = :invalid_branch_code
|
|
168
|
+
INVALID_PHONE_NUMBER = :invalid_phone_number
|
|
169
|
+
INVALID_ROUTING_NUMBER = :invalid_routing_number
|
|
170
|
+
INVALID_SWIFT_CODE = :invalid_swift_code
|
|
171
|
+
INVALID_COMPANY_DETAILS = :invalid_company_details
|
|
172
|
+
MANUAL_CANCELATION = :manual_cancelation
|
|
173
|
+
MISC_ERROR = :misc_error
|
|
174
|
+
MISSING_CITY_AND_COUNTRY = :missing_city_and_country
|
|
175
|
+
MISSING_PHONE_NUMBER = :missing_phone_number
|
|
176
|
+
MISSING_REMITTANCE_INFO = :missing_remittance_info
|
|
177
|
+
PAYEE_NAME_INVALID = :payee_name_invalid
|
|
178
|
+
RECEIVING_ACCOUNT_LOCKED = :receiving_account_locked
|
|
179
|
+
REJECTED_BY_COMPLIANCE = :rejected_by_compliance
|
|
180
|
+
RTP_NOT_SUPPORTED = :rtp_not_supported
|
|
181
|
+
NON_TRANSACTION_ACCOUNT = :non_transaction_account
|
|
182
|
+
SOURCE_TOKEN_INSUFFICIENT_FUNDS = :source_token_insufficient_funds
|
|
183
|
+
SSN_INVALID = :ssn_invalid
|
|
184
|
+
WALLET_SCREENSHOT_REQUIRED = :wallet_screenshot_required
|
|
185
|
+
UNSUPPORTED_REGION = :unsupported_region
|
|
186
|
+
|
|
187
|
+
# @!method self.values
|
|
188
|
+
# @return [Array<Symbol>]
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# @see WhopSDK::Models::WithdrawalRetrieveResponse#ledger_account
|
|
192
|
+
class LedgerAccount < WhopSDK::Internal::Type::BaseModel
|
|
104
193
|
# @!attribute id
|
|
105
|
-
# The
|
|
194
|
+
# The ID of the LedgerAccount.
|
|
106
195
|
#
|
|
107
196
|
# @return [String]
|
|
108
197
|
required :id, String
|
|
109
198
|
|
|
110
|
-
# @!attribute
|
|
111
|
-
# The
|
|
112
|
-
#
|
|
113
|
-
# @return [Time]
|
|
114
|
-
required :created_at, Time
|
|
115
|
-
|
|
116
|
-
# @!attribute error_code
|
|
117
|
-
# The different error codes a payout can be in.
|
|
118
|
-
#
|
|
119
|
-
# @return [Symbol, WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode, nil]
|
|
120
|
-
required :error_code,
|
|
121
|
-
enum: -> { WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode },
|
|
122
|
-
nil?: true
|
|
123
|
-
|
|
124
|
-
# @!attribute error_message
|
|
125
|
-
# The error message for the payout.
|
|
199
|
+
# @!attribute company_id
|
|
200
|
+
# The ID of the company associated with this ledger account.
|
|
126
201
|
#
|
|
127
202
|
# @return [String, nil]
|
|
128
|
-
required :
|
|
203
|
+
required :company_id, String, nil?: true
|
|
129
204
|
|
|
130
|
-
# @!
|
|
131
|
-
# The
|
|
205
|
+
# @!method initialize(id:, company_id:)
|
|
206
|
+
# The ledger account associated with the withdrawal.
|
|
132
207
|
#
|
|
133
|
-
# @
|
|
134
|
-
required :estimated_availability, Time, nil?: true
|
|
135
|
-
|
|
136
|
-
# @!attribute payer_name
|
|
137
|
-
# The name of the payer for the payout.
|
|
208
|
+
# @param id [String] The ID of the LedgerAccount.
|
|
138
209
|
#
|
|
139
|
-
# @
|
|
140
|
-
required :payer_name, String, nil?: true
|
|
141
|
-
|
|
142
|
-
# @!attribute status
|
|
143
|
-
# The status of the payout.
|
|
144
|
-
#
|
|
145
|
-
# @return [Symbol, WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status]
|
|
146
|
-
required :status, enum: -> { WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status }
|
|
147
|
-
|
|
148
|
-
# @!attribute trace_code
|
|
149
|
-
# The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
150
|
-
# available.
|
|
151
|
-
#
|
|
152
|
-
# @return [String, nil]
|
|
153
|
-
required :trace_code, String, nil?: true
|
|
154
|
-
|
|
155
|
-
# @!method initialize(id:, created_at:, error_code:, error_message:, estimated_availability:, payer_name:, status:, trace_code:)
|
|
156
|
-
# Some parameter documentations has been truncated, see
|
|
157
|
-
# {WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout} for more details.
|
|
158
|
-
#
|
|
159
|
-
# The latest payout associated with this withdrawal, if any.
|
|
160
|
-
#
|
|
161
|
-
# @param id [String] The internal ID of the payout.
|
|
162
|
-
#
|
|
163
|
-
# @param created_at [Time] The date and time the payout was created.
|
|
164
|
-
#
|
|
165
|
-
# @param error_code [Symbol, WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode, nil] The different error codes a payout can be in.
|
|
166
|
-
#
|
|
167
|
-
# @param error_message [String, nil] The error message for the payout.
|
|
168
|
-
#
|
|
169
|
-
# @param estimated_availability [Time, nil] The estimated availability date of the payout.
|
|
170
|
-
#
|
|
171
|
-
# @param payer_name [String, nil] The name of the payer for the payout.
|
|
172
|
-
#
|
|
173
|
-
# @param status [Symbol, WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status] The status of the payout.
|
|
174
|
-
#
|
|
175
|
-
# @param trace_code [String, nil] The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
176
|
-
|
|
177
|
-
# The different error codes a payout can be in.
|
|
178
|
-
#
|
|
179
|
-
# @see WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout#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
|
-
# The status of the payout.
|
|
234
|
-
#
|
|
235
|
-
# @see WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout#status
|
|
236
|
-
module Status
|
|
237
|
-
extend WhopSDK::Internal::Type::Enum
|
|
238
|
-
|
|
239
|
-
SCHEDULED = :scheduled
|
|
240
|
-
PENDING = :pending
|
|
241
|
-
PROCESSING = :processing
|
|
242
|
-
COMPLETED = :completed
|
|
243
|
-
CANCELED = :canceled
|
|
244
|
-
READY_FOR_PICKUP = :ready_for_pickup
|
|
245
|
-
HOLD = :hold
|
|
246
|
-
ERROR = :error
|
|
247
|
-
EXPIRED = :expired
|
|
248
|
-
|
|
249
|
-
# @!method self.values
|
|
250
|
-
# @return [Array<Symbol>]
|
|
251
|
-
end
|
|
210
|
+
# @param company_id [String, nil] The ID of the company associated with this ledger account.
|
|
252
211
|
end
|
|
253
212
|
|
|
254
213
|
# @see WhopSDK::Models::WithdrawalRetrieveResponse#payout_token
|
|
@@ -279,13 +238,13 @@ module WhopSDK
|
|
|
279
238
|
# @return [String, nil]
|
|
280
239
|
required :nickname, String, nil?: true
|
|
281
240
|
|
|
282
|
-
# @!attribute
|
|
283
|
-
# The
|
|
241
|
+
# @!attribute payer_name
|
|
242
|
+
# The name of the payer associated with the payout token.
|
|
284
243
|
#
|
|
285
|
-
# @return [
|
|
286
|
-
required :
|
|
244
|
+
# @return [String, nil]
|
|
245
|
+
required :payer_name, String, nil?: true
|
|
287
246
|
|
|
288
|
-
# @!method initialize(id:, created_at:, destination_currency_code:, nickname:,
|
|
247
|
+
# @!method initialize(id:, created_at:, destination_currency_code:, nickname:, payer_name:)
|
|
289
248
|
# Some parameter documentations has been truncated, see
|
|
290
249
|
# {WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken} for more details.
|
|
291
250
|
#
|
|
@@ -299,21 +258,7 @@ module WhopSDK
|
|
|
299
258
|
#
|
|
300
259
|
# @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is
|
|
301
260
|
#
|
|
302
|
-
# @param
|
|
303
|
-
|
|
304
|
-
# The status of the payout token.
|
|
305
|
-
#
|
|
306
|
-
# @see WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken#status
|
|
307
|
-
module Status
|
|
308
|
-
extend WhopSDK::Internal::Type::Enum
|
|
309
|
-
|
|
310
|
-
CREATED = :created
|
|
311
|
-
ACTIVE = :active
|
|
312
|
-
BROKEN = :broken
|
|
313
|
-
|
|
314
|
-
# @!method self.values
|
|
315
|
-
# @return [Array<Symbol>]
|
|
316
|
-
end
|
|
261
|
+
# @param payer_name [String, nil] The name of the payer associated with the payout token.
|
|
317
262
|
end
|
|
318
263
|
end
|
|
319
264
|
end
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class WithdrawalUpdatedWebhookEvent < 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::WithdrawalUpdatedWebhookEvent::Data]
|
|
22
|
+
required :data, -> { WhopSDK::WithdrawalUpdatedWebhookEvent::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.updated"]
|
|
34
|
+
required :type, const: :"withdrawal.updated"
|
|
35
|
+
|
|
36
|
+
# @!method initialize(id:, data:, timestamp:, api_version: :v1, type: :"withdrawal.updated")
|
|
37
|
+
# @param id [String] A unique ID for every single webhook request
|
|
38
|
+
#
|
|
39
|
+
# @param data [WhopSDK::Models::WithdrawalUpdatedWebhookEvent::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.updated"] The webhook event type
|
|
46
|
+
|
|
47
|
+
# @see WhopSDK::Models::WithdrawalUpdatedWebhookEvent#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::WithdrawalUpdatedWebhookEvent::Data::ErrorCode, nil]
|
|
77
|
+
required :error_code, enum: -> { WhopSDK::WithdrawalUpdatedWebhookEvent::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::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount]
|
|
108
|
+
required :ledger_account, -> { WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount }
|
|
109
|
+
|
|
110
|
+
# @!attribute payout_token
|
|
111
|
+
# The payout token used for the withdrawal, if applicable.
|
|
112
|
+
#
|
|
113
|
+
# @return [WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::PayoutToken, nil]
|
|
114
|
+
required :payout_token, -> { WhopSDK::WithdrawalUpdatedWebhookEvent::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::WithdrawalUpdatedWebhookEvent::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::WithdrawalUpdatedWebhookEvent::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::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount] The ledger account associated with the withdrawal.
|
|
166
|
+
#
|
|
167
|
+
# @param payout_token [WhopSDK::Models::WithdrawalUpdatedWebhookEvent::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::WithdrawalUpdatedWebhookEvent::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::WithdrawalUpdatedWebhookEvent::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::WithdrawalUpdatedWebhookEvent::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::WithdrawalUpdatedWebhookEvent::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
|
data/lib/whop_sdk/models.rb
CHANGED
|
@@ -512,6 +512,8 @@ module WhopSDK
|
|
|
512
512
|
|
|
513
513
|
WhoCanReact = WhopSDK::Models::WhoCanReact
|
|
514
514
|
|
|
515
|
+
WithdrawalCreatedWebhookEvent = WhopSDK::Models::WithdrawalCreatedWebhookEvent
|
|
516
|
+
|
|
515
517
|
WithdrawalFeeTypes = WhopSDK::Models::WithdrawalFeeTypes
|
|
516
518
|
|
|
517
519
|
WithdrawalListParams = WhopSDK::Models::WithdrawalListParams
|
|
@@ -523,4 +525,6 @@ module WhopSDK
|
|
|
523
525
|
WithdrawalStatus = WhopSDK::Models::WithdrawalStatus
|
|
524
526
|
|
|
525
527
|
WithdrawalTypes = WhopSDK::Models::WithdrawalTypes
|
|
528
|
+
|
|
529
|
+
WithdrawalUpdatedWebhookEvent = WhopSDK::Models::WithdrawalUpdatedWebhookEvent
|
|
526
530
|
end
|