Class: WhopSDK::Models::Withdrawal

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/withdrawal.rb

Overview

Defined Under Namespace

Modules: ErrorCode Classes: LedgerAccount, PayoutToken

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, company_id:) ⇒ Object

Some parameter documentations has been truncated, see LedgerAccount for more details.

The ledger account from which the withdrawal funds are sourced.

Parameters:

  • id (String)

    The unique identifier for the ledger account.

  • company_id (String, nil)

    Represents a unique identifier that is Base64 obfuscated. It is often used to re



# File 'lib/whop_sdk/models/withdrawal.rb', line 105

Instance Attribute Details

#amountFloat

The withdrawal amount as a decimal number in the specified currency (e.g., 100.00 for $100.00 USD).

Returns:

  • (Float)


18
# File 'lib/whop_sdk/models/withdrawal.rb', line 18

required :amount, Float

#created_atTime

The datetime the withdrawal was created.

Returns:

  • (Time)


24
# File 'lib/whop_sdk/models/withdrawal.rb', line 24

required :created_at, Time

#currencySymbol, WhopSDK::Models::Currency

The three-letter ISO currency code for this withdrawal (e.g., ‘usd’, ‘eur’).

Returns:



30
# File 'lib/whop_sdk/models/withdrawal.rb', line 30

required :currency, enum: -> { WhopSDK::Currency }

#error_codeSymbol, ...

The different error codes a payout can be in.

Returns:



36
# File 'lib/whop_sdk/models/withdrawal.rb', line 36

required :error_code, enum: -> { WhopSDK::Withdrawal::ErrorCode }, nil?: true

#error_messageString?

A human-readable message describing why the payout failed. Null if no error occurred.

Returns:

  • (String, nil)


43
# File 'lib/whop_sdk/models/withdrawal.rb', line 43

required :error_message, String, nil?: true

#estimated_availabilityTime?

The estimated time at which the funds become available in the destination account. Null if no estimate is available. As a Unix timestamp.

Returns:

  • (Time, nil)


50
# File 'lib/whop_sdk/models/withdrawal.rb', line 50

required :estimated_availability, Time, nil?: true

#fee_amountFloat

The fee charged for processing this withdrawal, in the same currency as the withdrawal amount.

Returns:

  • (Float)


57
# File 'lib/whop_sdk/models/withdrawal.rb', line 57

required :fee_amount, Float

#fee_typeSymbol, ...

The different fee types for a withdrawal.

Returns:



63
# File 'lib/whop_sdk/models/withdrawal.rb', line 63

required :fee_type, enum: -> { WhopSDK::WithdrawalFeeTypes }, nil?: true

#idString

The unique identifier for the withdrawal.

Returns:

  • (String)


11
# File 'lib/whop_sdk/models/withdrawal.rb', line 11

required :id, String

#ledger_accountWhopSDK::Models::Withdrawal::LedgerAccount

The ledger account from which the withdrawal funds are sourced.



69
# File 'lib/whop_sdk/models/withdrawal.rb', line 69

required :ledger_account, -> { WhopSDK::Withdrawal::LedgerAccount }

#markup_feeFloat

An additional markup fee charged for the withdrawal, in the same currency as the withdrawal amount. Only applies to platform accounts using Whop Rails.

Returns:

  • (Float)


76
# File 'lib/whop_sdk/models/withdrawal.rb', line 76

required :markup_fee, Float

#payout_tokenWhopSDK::Models::Withdrawal::PayoutToken?

The saved payout destination used for this withdrawal (e.g., a bank account or PayPal address). Null if no payout token was used.



83
# File 'lib/whop_sdk/models/withdrawal.rb', line 83

required :payout_token, -> { WhopSDK::Withdrawal::PayoutToken }, nil?: true

#speedSymbol, WhopSDK::Models::WithdrawalSpeeds

The processing speed selected for this withdrawal (‘standard’ or ‘instant’).



89
# File 'lib/whop_sdk/models/withdrawal.rb', line 89

required :speed, enum: -> { WhopSDK::WithdrawalSpeeds }

#statusSymbol, WhopSDK::Models::WithdrawalStatus

The computed lifecycle status of the withdrawal, accounting for the state of associated payouts (e.g., ‘requested’, ‘in_transit’, ‘completed’, ‘failed’).



96
# File 'lib/whop_sdk/models/withdrawal.rb', line 96

required :status, enum: -> { WhopSDK::WithdrawalStatus }

#trace_codeString?

The ACH trace number for tracking the payout through the banking network. Null if not available or not an ACH transaction.

Returns:

  • (String, nil)


103
# File 'lib/whop_sdk/models/withdrawal.rb', line 103

required :trace_code, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/withdrawal.rb', line 196