Class: WhopSDK::Models::TransferCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/whop_sdk/models/transfer_create_params.rb,
sig/whop_sdk/models/transfer_create_params.rbs

Overview

See Also:

  • WhopSDK::Resources::Transfers#create

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(amount:, origin_id:, currency: nil, destination_id: nil, expires_at: nil, idempotence_key: nil, metadata: nil, notes: nil, redeemable_count: nil, type: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::TransferCreateParams for more details.

Parameters:

  • amount (Float)

    The amount to move, in the transfer currency. For example 25.00.

  • origin_id (String)

    The account sending the funds. A user ID (user_xxx), account ID (biz_xxx), or le

  • currency (String) (defaults to: nil)

    Currency, such as usd. Required for ledger transfers.

  • destination_id (String) (defaults to: nil)

    The recipient. Required for ledger and walletsend (a user/biz*/ldgr* ID, or —

  • expires_at (Time, nil) (defaults to: nil)

    claim_link only. Link expiry as an ISO 8601 timestamp. Defaults to 24 hours from

  • idempotence_key (String, nil) (defaults to: nil)

    Ledger transfers only. A unique key to prevent duplicate transfers.

  • metadata (Hash{Symbol=>Object}, nil) (defaults to: nil)

    Ledger transfers only. Custom key-value pairs attached to the transfer. Max 50 k

  • notes (String, nil) (defaults to: nil)

    Ledger transfers only. A short note describing the transfer.

  • redeemable_count (Integer) (defaults to: nil)

    claim_link only. How many different users can claim the link. Defaults to 1.

  • type (Symbol, WhopSDK::Models::TransferCreateParams::Type) (defaults to: nil)

    The kind of money movement. Defaults to ledger.

  • request_options (WhopSDK::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


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

Instance Attribute Details

#amountFloat

The amount to move, in the transfer currency. For example 25.00.

Parameters:

  • value (Float)

Returns:

  • (Float)


14
# File 'lib/whop_sdk/models/transfer_create_params.rb', line 14

required :amount, Float

#currencyString?

Currency, such as usd. Required for ledger transfers.

Parameters:

  • (String)

Returns:

  • (String, nil)


27
# File 'lib/whop_sdk/models/transfer_create_params.rb', line 27

optional :currency, String

#destination_idString?

The recipient. Required for ledger and walletsend (a user/biz*/ldgr* ID, or — for sends — an email). Omit for claim_link.

Parameters:

  • (String)

Returns:

  • (String, nil)


34
# File 'lib/whop_sdk/models/transfer_create_params.rb', line 34

optional :destination_id, String

#expires_atTime?

claim_link only. Link expiry as an ISO 8601 timestamp. Defaults to 24 hours from creation.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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

optional :expires_at, Time, nil?: true

#idempotence_keyString?

Ledger transfers only. A unique key to prevent duplicate transfers.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


47
# File 'lib/whop_sdk/models/transfer_create_params.rb', line 47

optional :idempotence_key, String, nil?: true

#metadataHash{Symbol=>Object}?

Ledger transfers only. Custom key-value pairs attached to the transfer. Max 50 keys, 100 chars per key, 500 chars per string value.

Parameters:

  • value (::Hash[Symbol, top], nil)

Returns:

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


54
# File 'lib/whop_sdk/models/transfer_create_params.rb', line 54

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

#notesString?

Ledger transfers only. A short note describing the transfer.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


60
# File 'lib/whop_sdk/models/transfer_create_params.rb', line 60

optional :notes, String, nil?: true

#origin_idString

The account sending the funds. A user ID (user_xxx), account ID (biz_xxx), or ledger account ID (ldgr_xxx).

Parameters:

  • value (String)

Returns:

  • (String)


21
# File 'lib/whop_sdk/models/transfer_create_params.rb', line 21

required :origin_id, String

#redeemable_countInteger?

claim_link only. How many different users can claim the link. Defaults to 1.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


66
# File 'lib/whop_sdk/models/transfer_create_params.rb', line 66

optional :redeemable_count, Integer

#typeSymbol, ...

The kind of money movement. Defaults to ledger.



72
# File 'lib/whop_sdk/models/transfer_create_params.rb', line 72

optional :type, enum: -> { WhopSDK::TransferCreateParams::Type }

Instance Method Details

#to_hash{

Returns:

  • ({)


66
# File 'sig/whop_sdk/models/transfer_create_params.rbs', line 66

def to_hash: -> {