Class: WhopSDK::Models::Payment

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

Defined Under Namespace

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

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:, customer_appealed:, customer_response_actions:, due_date:, issue:, merchant_appealed:, merchant_response_actions:, platform_response_actions:, status:) ⇒ Object

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

A resolution center case is a dispute or support case between a user and a company, tracking the issue, status, and outcome.

Parameters:



# File 'lib/whop_sdk/models/payment.rb', line 285

Instance Attribute Details

#amount_after_feesFloat

How much the payment is for after fees

Returns:

  • (Float)


16
# File 'lib/whop_sdk/models/payment.rb', line 16

required :amount_after_fees, Float

#application_feeWhopSDK::Models::Payment::ApplicationFee?

The application fee charged on this payment.



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

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

#auto_refundedBoolean

Whether this payment was auto refunded or not

Returns:

  • (Boolean)


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

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

#billing_addressWhopSDK::Models::Payment::BillingAddress?

The address of the user who made the payment.



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

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

#billing_reasonSymbol, ...

The reason why a specific payment was billed

Returns:



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

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

#card_brandSymbol, ...

Possible card brands that a payment token can have

Returns:



46
# File 'lib/whop_sdk/models/payment.rb', line 46

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)


53
# File 'lib/whop_sdk/models/payment.rb', line 53

required :card_last4, String, nil?: true

#companyWhopSDK::Models::Payment::Company?

The company for the payment.



59
# File 'lib/whop_sdk/models/payment.rb', line 59

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

#created_atTime

The datetime the payment was created.

Returns:

  • (Time)


65
# File 'lib/whop_sdk/models/payment.rb', line 65

required :created_at, Time

#currencySymbol, ...

The available currencies on the platform

Returns:



71
# File 'lib/whop_sdk/models/payment.rb', line 71

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

#dispute_alerted_atTime?

When an alert came in that this transaction will be disputed

Returns:

  • (Time, nil)


77
# File 'lib/whop_sdk/models/payment.rb', line 77

required :dispute_alerted_at, Time, nil?: true

#disputesArray<WhopSDK::Models::Payment::Dispute>?

The disputes attached to this payment. Null if the actor in context does not have the payment:dispute:read permission.

Returns:



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

required :disputes, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Dispute] }, nil?: true

#failure_messageString?

If the payment failed, the reason for the failure.

Returns:

  • (String, nil)


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

required :failure_message, String, nil?: true

#financing_installments_countInteger?

The number of financing installments for the payment. Present if the payment is a financing payment (e.g. Splitit, Klarna, etc.).

Returns:

  • (Integer, nil)


97
# File 'lib/whop_sdk/models/payment.rb', line 97

required :financing_installments_count, Integer, nil?: true

#financing_transactionsArray<WhopSDK::Models::Payment::FinancingTransaction>

The financing transactions attached to this payment. Present if the payment is a financing payment (e.g. Splitit, Klarna, etc.).



104
105
# File 'lib/whop_sdk/models/payment.rb', line 104

required :financing_transactions,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::FinancingTransaction] }

#idString

The unique identifier for the payment.

Returns:

  • (String)


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

required :id, String

#last_payment_attemptTime?

The time of the last payment attempt.

Returns:

  • (Time, nil)


111
# File 'lib/whop_sdk/models/payment.rb', line 111

required :last_payment_attempt, Time, nil?: true

#memberWhopSDK::Models::Payment::Member?

The member attached to this payment.



117
# File 'lib/whop_sdk/models/payment.rb', line 117

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

#membershipWhopSDK::Models::Payment::Membership?

The membership attached to this payment.



123
# File 'lib/whop_sdk/models/payment.rb', line 123

required :membership, -> { WhopSDK::Payment::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)


130
# File 'lib/whop_sdk/models/payment.rb', line 130

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)


136
# File 'lib/whop_sdk/models/payment.rb', line 136

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)


143
# File 'lib/whop_sdk/models/payment.rb', line 143

required :paid_at, Time, nil?: true

#payment_methodWhopSDK::Models::Payment::PaymentMethod?

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



150
# File 'lib/whop_sdk/models/payment.rb', line 150

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

#payment_method_typeSymbol, ...

The different types of payment methods that can be used.

Returns:



156
# File 'lib/whop_sdk/models/payment.rb', line 156

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

#payments_failedInteger?

The number of failed payment attempts for the payment.

Returns:

  • (Integer, nil)


162
# File 'lib/whop_sdk/models/payment.rb', line 162

required :payments_failed, Integer, nil?: true

#planWhopSDK::Models::Payment::Plan?

The plan attached to this payment.



168
# File 'lib/whop_sdk/models/payment.rb', line 168

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

#productWhopSDK::Models::Payment::Product?

The product this payment was made for



174
# File 'lib/whop_sdk/models/payment.rb', line 174

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

#promo_codeWhopSDK::Models::Payment::PromoCode?

The promo code used for this payment.



180
# File 'lib/whop_sdk/models/payment.rb', line 180

required :promo_code, -> { WhopSDK::Payment::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)


187
# File 'lib/whop_sdk/models/payment.rb', line 187

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

#refunded_amountFloat?

The payment refund amount(if applicable).

Returns:

  • (Float, nil)


193
# File 'lib/whop_sdk/models/payment.rb', line 193

required :refunded_amount, Float, nil?: true

#refunded_atTime?

When the payment was refunded (if applicable).

Returns:

  • (Time, nil)


199
# File 'lib/whop_sdk/models/payment.rb', line 199

required :refunded_at, Time, nil?: true

#resolutionsArray<WhopSDK::Models::Payment::Resolution>?

The resolution center cases opened by the customer on this payment. Null if the actor in context does not have the payment:resolution_center_case:read permission.

Returns:



207
# File 'lib/whop_sdk/models/payment.rb', line 207

required :resolutions, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution] }, 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)


215
# File 'lib/whop_sdk/models/payment.rb', line 215

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

#statusSymbol, ...

The status of a receipt

Returns:



221
# File 'lib/whop_sdk/models/payment.rb', line 221

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

#substatusSymbol, WhopSDK::Models::FriendlyReceiptStatus

The friendly status of the payment.



227
# File 'lib/whop_sdk/models/payment.rb', line 227

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

#subtotalFloat?

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

Returns:

  • (Float, nil)


233
# File 'lib/whop_sdk/models/payment.rb', line 233

required :subtotal, Float, nil?: true

#tax_amountFloat?

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

Returns:

  • (Float, nil)


239
# File 'lib/whop_sdk/models/payment.rb', line 239

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:



246
# File 'lib/whop_sdk/models/payment.rb', line 246

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

#tax_refunded_amountFloat?

The amount of tax that has been refunded (if applicable).

Returns:

  • (Float, nil)


252
# File 'lib/whop_sdk/models/payment.rb', line 252

required :tax_refunded_amount, Float, nil?: true

#totalFloat?

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

Returns:

  • (Float, nil)


258
# File 'lib/whop_sdk/models/payment.rb', line 258

required :total, Float, nil?: true

#updated_atTime

The datetime the payment was last updated.

Returns:

  • (Time)


264
# File 'lib/whop_sdk/models/payment.rb', line 264

required :updated_at, Time

#usd_totalFloat?

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

Returns:

  • (Float, nil)


270
# File 'lib/whop_sdk/models/payment.rb', line 270

required :usd_total, Float, nil?: true

#userWhopSDK::Models::Payment::User?

The user that made this payment.



276
# File 'lib/whop_sdk/models/payment.rb', line 276

required :user, -> { WhopSDK::Payment::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)


283
# File 'lib/whop_sdk/models/payment.rb', line 283

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/payment.rb', line 688