Class: WhopSDK::Models::PaymentListResponse

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

Overview

Defined Under Namespace

Classes: ApplicationFee, BillingAddress, Company, Member, Membership, PaymentMethod, Plan, Product, PromoCode, User

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:, amount_off:, base_currency:, code:, number_of_intervals:, promo_type:) ⇒ Object

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

The promo code used for this payment.

Parameters:

  • id (String)

    The unique identifier for the promo code.

  • amount_off (Float)

    The discount amount. Interpretation depends on promo_type: if ‘percentage’, this

  • base_currency (Symbol, WhopSDK::Models::Currency)

    The monetary currency of the promo code.

  • code (String, nil)

    The specific code used to apply the promo at checkout.

  • number_of_intervals (Integer, nil)

    The number of months the promo is applied for.

  • promo_type (Symbol, WhopSDK::Models::PromoType)

    The type (% or flat amount) of the promo.



# File 'lib/whop_sdk/models/payment_list_response.rb', line 250

Instance Attribute Details

#amount_after_feesFloat

How much the payment is for after fees

Returns:

  • (Float)


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

required :amount_after_fees, Float

#application_feeWhopSDK::Models::PaymentListResponse::ApplicationFee?

The application fee charged on this payment.



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

required :application_fee, -> { WhopSDK::Models::PaymentListResponse::ApplicationFee }, nil?: true

#auto_refundedBoolean

Whether this payment was auto refunded or not

Returns:

  • (Boolean)


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

required :auto_refunded, WhopSDK::Internal::Type::Boolean

#billing_addressWhopSDK::Models::PaymentListResponse::BillingAddress?

The address of the user who made the payment.



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

required :billing_address, -> { WhopSDK::Models::PaymentListResponse::BillingAddress }, nil?: true

#billing_reasonSymbol, ...

The reason why a specific payment was billed

Returns:



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

required :billing_reason, enum: -> { WhopSDK::BillingReasons }, nil?: true

#card_brandSymbol, ...

Possible card brands that a payment token can have

Returns:



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

required :card_brand, enum: -> { WhopSDK::CardBrands }, nil?: true

#card_last4String?

The last four digits of the card used to make this payment. Null if the payment was not made with a card.

Returns:

  • (String, nil)


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

required :card_last4, String, nil?: true

#companyWhopSDK::Models::PaymentListResponse::Company?

The company for the payment.



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

required :company, -> { WhopSDK::Models::PaymentListResponse::Company }, nil?: true

#created_atTime

The datetime the payment was created.

Returns:

  • (Time)


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

required :created_at, Time

#currencySymbol, ...

The available currencies on the platform

Returns:



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

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

#dispute_alerted_atTime?

When an alert came in that this transaction will be disputed

Returns:

  • (Time, nil)


78
# File 'lib/whop_sdk/models/payment_list_response.rb', line 78

required :dispute_alerted_at, Time, nil?: true

#failure_messageString?

If the payment failed, the reason for the failure.

Returns:

  • (String, nil)


84
# File 'lib/whop_sdk/models/payment_list_response.rb', line 84

required :failure_message, String, nil?: true

#idString

The unique identifier for the payment.

Returns:

  • (String)


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

required :id, String

#last_payment_attemptTime?

The time of the last payment attempt.

Returns:

  • (Time, nil)


90
# File 'lib/whop_sdk/models/payment_list_response.rb', line 90

required :last_payment_attempt, Time, nil?: true

#memberWhopSDK::Models::PaymentListResponse::Member?

The member attached to this payment.



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

required :member, -> { WhopSDK::Models::PaymentListResponse::Member }, nil?: true

#membershipWhopSDK::Models::PaymentListResponse::Membership?

The membership attached to this payment.



102
# File 'lib/whop_sdk/models/payment_list_response.rb', line 102

required :membership, -> { WhopSDK::Models::PaymentListResponse::Membership }, nil?: true

#metadataHash{Symbol=>Object}?

The custom metadata stored on this payment. This will be copied over to the checkout configuration for which this payment was made

Returns:

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


109
# File 'lib/whop_sdk/models/payment_list_response.rb', line 109

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

#next_payment_attemptTime?

The time of the next schedule payment retry.

Returns:

  • (Time, nil)


115
# File 'lib/whop_sdk/models/payment_list_response.rb', line 115

required :next_payment_attempt, Time, nil?: true

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

Returns:

  • (Time, nil)


122
# File 'lib/whop_sdk/models/payment_list_response.rb', line 122

required :paid_at, Time, nil?: true

#payment_methodWhopSDK::Models::PaymentListResponse::PaymentMethod?

The tokenized payment method reference used for this payment. Null if no token was used.



129
# File 'lib/whop_sdk/models/payment_list_response.rb', line 129

required :payment_method, -> { WhopSDK::Models::PaymentListResponse::PaymentMethod }, nil?: true

#payment_method_typeSymbol, ...

The different types of payment methods that can be used.

Returns:



135
# File 'lib/whop_sdk/models/payment_list_response.rb', line 135

required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true

#payments_failedInteger?

The number of failed payment attempts for the payment.

Returns:

  • (Integer, nil)


141
# File 'lib/whop_sdk/models/payment_list_response.rb', line 141

required :payments_failed, Integer, nil?: true

#planWhopSDK::Models::PaymentListResponse::Plan?

The plan attached to this payment.



147
# File 'lib/whop_sdk/models/payment_list_response.rb', line 147

required :plan, -> { WhopSDK::Models::PaymentListResponse::Plan }, nil?: true

#productWhopSDK::Models::PaymentListResponse::Product?

The product this payment was made for



153
# File 'lib/whop_sdk/models/payment_list_response.rb', line 153

required :product, -> { WhopSDK::Models::PaymentListResponse::Product }, nil?: true

#promo_codeWhopSDK::Models::PaymentListResponse::PromoCode?

The promo code used for this payment.



159
# File 'lib/whop_sdk/models/payment_list_response.rb', line 159

required :promo_code, -> { WhopSDK::Models::PaymentListResponse::PromoCode }, nil?: true

#refundableBoolean

True only for payments that are ‘paid`, have not been fully refunded, and were processed by a payment processor that allows refunds.

Returns:

  • (Boolean)


166
# File 'lib/whop_sdk/models/payment_list_response.rb', line 166

required :refundable, WhopSDK::Internal::Type::Boolean

#refunded_amountFloat?

The payment refund amount(if applicable).

Returns:

  • (Float, nil)


172
# File 'lib/whop_sdk/models/payment_list_response.rb', line 172

required :refunded_amount, Float, nil?: true

#refunded_atTime?

When the payment was refunded (if applicable).

Returns:

  • (Time, nil)


178
# File 'lib/whop_sdk/models/payment_list_response.rb', line 178

required :refunded_at, Time, nil?: true

#retryableBoolean

True when the payment status is ‘open` and its membership is in one of the retry-eligible states (`active`, `trialing`, `completed`, or `past_due`); otherwise false. Used to decide if Whop can attempt the charge again.

Returns:

  • (Boolean)


186
# File 'lib/whop_sdk/models/payment_list_response.rb', line 186

required :retryable, WhopSDK::Internal::Type::Boolean

#statusSymbol, ...

The status of a receipt

Returns:



192
# File 'lib/whop_sdk/models/payment_list_response.rb', line 192

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

#substatusSymbol, WhopSDK::Models::FriendlyReceiptStatus

The friendly status of the payment.



198
# File 'lib/whop_sdk/models/payment_list_response.rb', line 198

required :substatus, enum: -> { WhopSDK::FriendlyReceiptStatus }

#subtotalFloat?

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

Returns:

  • (Float, nil)


204
# File 'lib/whop_sdk/models/payment_list_response.rb', line 204

required :subtotal, Float, nil?: true

#tax_amountFloat?

The calculated amount of the sales/VAT tax (if applicable).

Returns:

  • (Float, nil)


210
# File 'lib/whop_sdk/models/payment_list_response.rb', line 210

required :tax_amount, Float, nil?: true

#tax_behaviorSymbol, ...

The type of tax inclusivity applied to the receipt, for determining whether the tax is included in the final price, or paid on top.

Returns:



217
# File 'lib/whop_sdk/models/payment_list_response.rb', line 217

required :tax_behavior, enum: -> { WhopSDK::ReceiptTaxBehavior }, nil?: true

#totalFloat?

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

Returns:

  • (Float, nil)


223
# File 'lib/whop_sdk/models/payment_list_response.rb', line 223

required :total, Float, nil?: true

#updated_atTime

The datetime the payment was last updated.

Returns:

  • (Time)


229
# File 'lib/whop_sdk/models/payment_list_response.rb', line 229

required :updated_at, Time

#usd_totalFloat?

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

Returns:

  • (Float, nil)


235
# File 'lib/whop_sdk/models/payment_list_response.rb', line 235

required :usd_total, Float, nil?: true

#userWhopSDK::Models::PaymentListResponse::User?

The user that made this payment.



241
# File 'lib/whop_sdk/models/payment_list_response.rb', line 241

required :user, -> { WhopSDK::Models::PaymentListResponse::User }, nil?: true

#voidableBoolean

True when the payment is tied to a membership in ‘past_due`, the payment status is `open`, and the processor allows voiding payments; otherwise false.

Returns:

  • (Boolean)


248
# File 'lib/whop_sdk/models/payment_list_response.rb', line 248

required :voidable, WhopSDK::Internal::Type::Boolean