Class: WhopSDK::Models::SwapRetrieveResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/swap_retrieve_response.rb,
sig/whop_sdk/models/swap_retrieve_response.rbs

Overview

See Also:

  • WhopSDK::Resources::Swaps#retrieve

Defined Under Namespace

Modules: Object

Instance Attribute 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:, account_id:, object:, status:, tx_hashes:, error: nil) ⇒ Object

Parameters:

  • id (String)

    Swap ID.

  • account_id (String)

    Account ID that owns the wallet used for the swap.

  • object (Symbol, WhopSDK::Models::SwapRetrieveResponse::Object)
  • status (String)

    Current swap status.

  • tx_hashes (Array<String>)

    On-chain transaction hashes produced by the swap.

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

    Latest error returned for a failed swap.



# File 'lib/whop_sdk/models/swap_retrieve_response.rb', line 42

Instance Attribute Details

#account_idString

Account ID that owns the wallet used for the swap.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :account_id, String

#errorString?

Latest error returned for a failed swap.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


40
# File 'lib/whop_sdk/models/swap_retrieve_response.rb', line 40

optional :error, String, nil?: true

#idString

Swap ID.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#objectSymbol, WhopSDK::Models::SwapRetrieveResponse::Object

Parameters:

  • value (WhopSDK::Models::SwapRetrieveResponse::object)

Returns:



22
# File 'lib/whop_sdk/models/swap_retrieve_response.rb', line 22

required :object, enum: -> { WhopSDK::Models::SwapRetrieveResponse::Object }

#statusString

Current swap status.

Parameters:

  • value (String)

Returns:

  • (String)


28
# File 'lib/whop_sdk/models/swap_retrieve_response.rb', line 28

required :status, String

#tx_hashesArray<String>

On-chain transaction hashes produced by the swap.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


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

required :tx_hashes, WhopSDK::Internal::Type::ArrayOf[String]

Instance Method Details

#to_hash{

Returns:

  • ({)


35
# File 'sig/whop_sdk/models/swap_retrieve_response.rbs', line 35

def to_hash: -> {