Class: WhopSDK::Models::TopupCreateResponse

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

Overview

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:, created_at:, currency:, failure_message:, paid_at:, status:, total:) ⇒ Object

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

A payment represents a completed or attempted charge. Payments track the amount, status, currency, and payment method used.

Parameters:

  • id (String)

    The unique identifier for the payment.

  • created_at (Time)

    The datetime the payment was created.

  • currency (Symbol, WhopSDK::Models::Currency, nil)

    The available currencies on the platform

  • failure_message (String, nil)

    If the payment failed, the reason for the failure.

  • paid_at (Time, nil)

    The time at which this payment was successfully collected. Null if the payment h

  • status (Symbol, WhopSDK::Models::ReceiptStatus, nil)

    The status of a receipt

  • total (Float, nil)

    The total to show to the creator (excluding buyer fees).



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

Instance Attribute Details

#created_atTime

The datetime the payment was created.

Returns:

  • (Time)


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

required :created_at, Time

#currencySymbol, ...

The available currencies on the platform

Returns:



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

required :currency, enum: -> { WhopSDK::Currency }, nil?: true

#failure_messageString?

If the payment failed, the reason for the failure.

Returns:

  • (String, nil)


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

required :failure_message, String, nil?: true

#idString

The unique identifier for the payment.

Returns:

  • (String)


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

required :id, String

The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.

Returns:

  • (Time, nil)


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

required :paid_at, Time, nil?: true

#statusSymbol, ...

The status of a receipt

Returns:



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

required :status, enum: -> { WhopSDK::ReceiptStatus }, nil?: true

#totalFloat?

The total to show to the creator (excluding buyer fees).

Returns:

  • (Float, nil)


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

required :total, Float, nil?: true