Class: WhopSDK::Models::Transfer

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

Defined Under Namespace

Modules: Destination, Origin

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:, route:, title:, typename: :Company) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::Transfer::Destination::Company for more details.

A company is a seller on Whop. Companies own products, manage members, and receive payouts.

Parameters:

  • id (String)

    The unique identifier for the company.

  • route (String)

    The URL slug for the company’s store page (e.g., ‘pickaxe’ in whop.com/pickaxe).

  • title (String)

    The display name of the company shown to customers.

  • typename (Symbol, :Company) (defaults to: :Company)

    The typename of this object



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

Instance Attribute Details

#amountFloat

The transfer amount in the currency specified by the currency field. For example, 10.43 represents $10.43 USD.

Returns:

  • (Float)


17
# File 'lib/whop_sdk/models/transfer.rb', line 17

required :amount, Float

#created_atTime

The datetime the credit transaction transfer was created.

Returns:

  • (Time)


23
# File 'lib/whop_sdk/models/transfer.rb', line 23

required :created_at, Time

#currencySymbol, WhopSDK::Models::Currency

The currency in which this transfer amount is denominated.

Returns:



29
# File 'lib/whop_sdk/models/transfer.rb', line 29

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

#destinationWhopSDK::Models::Transfer::Destination::User, ...

The entity receiving the transferred funds.



35
# File 'lib/whop_sdk/models/transfer.rb', line 35

required :destination, union: -> { WhopSDK::Transfer::Destination }

#destination_ledger_account_idString

The unique identifier of the ledger account receiving the funds.

Returns:

  • (String)


41
# File 'lib/whop_sdk/models/transfer.rb', line 41

required :destination_ledger_account_id, String

#fee_amountFloat?

The flat fee amount deducted from this transfer, in the transfer’s currency. Null if no flat fee was applied.

Returns:

  • (Float, nil)


48
# File 'lib/whop_sdk/models/transfer.rb', line 48

required :fee_amount, Float, nil?: true

#idString

The unique identifier for the credit transaction transfer.

Returns:

  • (String)


10
# File 'lib/whop_sdk/models/transfer.rb', line 10

required :id, String

#metadataHash{Symbol=>Object}?

Custom key-value pairs attached to this transfer. Maximum 50 keys, 500 characters per key, 5000 characters per value.

Returns:

  • (Hash{Symbol=>Object}, nil)


55
# File 'lib/whop_sdk/models/transfer.rb', line 55

required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true

#notesString?

A free-text note attached to this transfer by the sender. Null if no note was provided.

Returns:

  • (String, nil)


62
# File 'lib/whop_sdk/models/transfer.rb', line 62

required :notes, String, nil?: true

#originWhopSDK::Models::Transfer::Origin::User, ...

The entity that sent the transferred funds.



68
# File 'lib/whop_sdk/models/transfer.rb', line 68

required :origin, union: -> { WhopSDK::Transfer::Origin }

#origin_ledger_account_idString

The unique identifier of the ledger account that sent the funds.

Returns:

  • (String)


74
# File 'lib/whop_sdk/models/transfer.rb', line 74

required :origin_ledger_account_id, String