Class: WhopSDK::Models::Payment
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::Payment
- 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
-
#amount_after_fees ⇒ Float
How much the payment is for after fees.
-
#application_fee ⇒ WhopSDK::Models::Payment::ApplicationFee?
The application fee charged on this payment.
-
#auto_refunded ⇒ Boolean
Whether this payment was auto refunded or not.
-
#billing_address ⇒ WhopSDK::Models::Payment::BillingAddress?
The address of the user who made the payment.
-
#billing_reason ⇒ Symbol, ...
The reason why a specific payment was billed.
-
#card_brand ⇒ Symbol, ...
Possible card brands that a payment token can have.
-
#card_last4 ⇒ String?
The last four digits of the card used to make this payment.
-
#checkout_configuration_id ⇒ String?
The ID of the checkout session/configuration that produced this payment, if any.
-
#company ⇒ WhopSDK::Models::Payment::Company?
The company for the payment.
-
#created_at ⇒ Time
The datetime the payment was created.
-
#currency ⇒ Symbol, WhopSDK::Models::Currency
The three-letter ISO currency code for this payment (e.g., ‘usd’, ‘eur’).
-
#dispute_alerted_at ⇒ Time?
When an alert came in that this transaction will be disputed.
-
#disputes ⇒ Array<WhopSDK::Models::Payment::Dispute>?
The disputes attached to this payment.
-
#failure_message ⇒ String?
If the payment failed, the reason for the failure.
-
#financing_installments_count ⇒ Integer?
The number of financing installments for the payment.
-
#financing_transactions ⇒ Array<WhopSDK::Models::Payment::FinancingTransaction>
The financing transactions attached to this payment.
-
#id ⇒ String
The unique identifier for the payment.
-
#last_payment_attempt ⇒ Time?
The time of the last payment attempt.
-
#member ⇒ WhopSDK::Models::Payment::Member?
The member attached to this payment.
-
#membership ⇒ WhopSDK::Models::Payment::Membership?
The membership attached to this payment.
-
#metadata ⇒ Hash{Symbol=>Object}?
The custom metadata stored on this payment.
-
#next_payment_attempt ⇒ Time?
The time of the next schedule payment retry.
-
#paid_at ⇒ Time?
The time at which this payment was successfully collected.
-
#payment_method ⇒ WhopSDK::Models::Payment::PaymentMethod?
The tokenized payment method reference used for this payment.
-
#payment_method_type ⇒ Symbol, ...
The different types of payment methods that can be used.
-
#payments_failed ⇒ Integer?
The number of failed payment attempts for the payment.
-
#plan ⇒ WhopSDK::Models::Payment::Plan?
The plan attached to this payment.
-
#product ⇒ WhopSDK::Models::Payment::Product?
The product this payment was made for.
-
#promo_code ⇒ WhopSDK::Models::Payment::PromoCode?
The promo code used for this payment.
-
#refundable ⇒ Boolean
True only for payments that are ‘paid`, have not been fully refunded, and were processed by a payment processor that allows refunds.
-
#refunded_amount ⇒ Float?
The payment refund amount(if applicable).
-
#refunded_at ⇒ Time?
When the payment was refunded (if applicable).
-
#resolutions ⇒ Array<WhopSDK::Models::Payment::Resolution>?
The resolution center cases opened by the customer on this payment.
-
#retryable ⇒ Boolean
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.
-
#settlement_amount ⇒ Float
The total amount charged to the customer for this payment, including taxes and after any discounts.
-
#settlement_currency ⇒ Symbol, WhopSDK::Models::Currency
The three-letter ISO currency code for this payment (e.g., ‘usd’, ‘eur’).
-
#settlement_exchange_rate ⇒ Float?
Deprecated.
-
#status ⇒ Symbol, ...
The status of a receipt.
-
#substatus ⇒ Symbol, WhopSDK::Models::FriendlyReceiptStatus
The friendly status of the payment.
-
#subtotal ⇒ Float?
The subtotal to show to the creator (excluding buyer fees).
-
#tax_amount ⇒ Float?
The calculated amount of the sales/VAT tax (if applicable).
-
#tax_behavior ⇒ Symbol, ...
The type of tax inclusivity applied to the receipt, for determining whether the tax is included in the final price, or paid on top.
-
#tax_refunded_amount ⇒ Float?
The amount of tax that has been refunded (if applicable).
-
#total ⇒ Float?
The total to show to the creator (excluding buyer fees).
-
#updated_at ⇒ Time
The datetime the payment was last updated.
-
#usd_total ⇒ Float?
The total in USD to show to the creator (excluding buyer fees).
-
#user ⇒ WhopSDK::Models::Payment::User?
The user that made this payment.
-
#voidable ⇒ Boolean
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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, customer_appealed:, customer_response_actions:, due_date:, issue:, merchant_appealed:, merchant_response_actions:, platform_response_actions:, status:) ⇒ Object
constructor
Some parameter documentations has been truncated, see Resolution for more details.
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.
|
|
# File 'lib/whop_sdk/models/payment.rb', line 311
|
Instance Attribute Details
#amount_after_fees ⇒ Float
How much the payment is for after fees
16 |
# File 'lib/whop_sdk/models/payment.rb', line 16 required :amount_after_fees, Float |
#application_fee ⇒ WhopSDK::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_refunded ⇒ Boolean
Whether this payment was auto refunded or not
28 |
# File 'lib/whop_sdk/models/payment.rb', line 28 required :auto_refunded, WhopSDK::Internal::Type::Boolean |
#billing_address ⇒ WhopSDK::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_reason ⇒ Symbol, ...
The reason why a specific payment was billed
40 |
# File 'lib/whop_sdk/models/payment.rb', line 40 required :billing_reason, enum: -> { WhopSDK::BillingReasons }, nil?: true |
#card_brand ⇒ Symbol, ...
Possible card brands that a payment token can have
46 |
# File 'lib/whop_sdk/models/payment.rb', line 46 required :card_brand, enum: -> { WhopSDK::CardBrands }, nil?: true |
#card_last4 ⇒ String?
The last four digits of the card used to make this payment. Null if the payment was not made with a card.
53 |
# File 'lib/whop_sdk/models/payment.rb', line 53 required :card_last4, String, nil?: true |
#checkout_configuration_id ⇒ String?
The ID of the checkout session/configuration that produced this payment, if any. Use this to map payments back to the checkout configuration that created them.
60 |
# File 'lib/whop_sdk/models/payment.rb', line 60 required :checkout_configuration_id, String, nil?: true |
#company ⇒ WhopSDK::Models::Payment::Company?
The company for the payment.
66 |
# File 'lib/whop_sdk/models/payment.rb', line 66 required :company, -> { WhopSDK::Payment::Company }, nil?: true |
#created_at ⇒ Time
The datetime the payment was created.
72 |
# File 'lib/whop_sdk/models/payment.rb', line 72 required :created_at, Time |
#currency ⇒ Symbol, WhopSDK::Models::Currency
The three-letter ISO currency code for this payment (e.g., ‘usd’, ‘eur’).
78 |
# File 'lib/whop_sdk/models/payment.rb', line 78 required :currency, enum: -> { WhopSDK::Currency } |
#dispute_alerted_at ⇒ Time?
When an alert came in that this transaction will be disputed
84 |
# File 'lib/whop_sdk/models/payment.rb', line 84 required :dispute_alerted_at, Time, nil?: true |
#disputes ⇒ Array<WhopSDK::Models::Payment::Dispute>?
The disputes attached to this payment. Null if the actor in context does not have the payment:dispute:read permission.
91 |
# File 'lib/whop_sdk/models/payment.rb', line 91 required :disputes, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Dispute] }, nil?: true |
#failure_message ⇒ String?
If the payment failed, the reason for the failure.
97 |
# File 'lib/whop_sdk/models/payment.rb', line 97 required :failure_message, String, nil?: true |
#financing_installments_count ⇒ Integer?
The number of financing installments for the payment. Present if the payment is a financing payment (e.g. Splitit, Klarna, etc.).
104 |
# File 'lib/whop_sdk/models/payment.rb', line 104 required :financing_installments_count, Integer, nil?: true |
#financing_transactions ⇒ Array<WhopSDK::Models::Payment::FinancingTransaction>
The financing transactions attached to this payment. Present if the payment is a financing payment (e.g. Splitit, Klarna, etc.).
111 112 |
# File 'lib/whop_sdk/models/payment.rb', line 111 required :financing_transactions, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::FinancingTransaction] } |
#id ⇒ String
The unique identifier for the payment.
10 |
# File 'lib/whop_sdk/models/payment.rb', line 10 required :id, String |
#last_payment_attempt ⇒ Time?
The time of the last payment attempt.
118 |
# File 'lib/whop_sdk/models/payment.rb', line 118 required :last_payment_attempt, Time, nil?: true |
#member ⇒ WhopSDK::Models::Payment::Member?
The member attached to this payment.
124 |
# File 'lib/whop_sdk/models/payment.rb', line 124 required :member, -> { WhopSDK::Payment::Member }, nil?: true |
#membership ⇒ WhopSDK::Models::Payment::Membership?
The membership attached to this payment.
130 |
# File 'lib/whop_sdk/models/payment.rb', line 130 required :membership, -> { WhopSDK::Payment::Membership }, nil?: true |
#metadata ⇒ Hash{Symbol=>Object}?
The custom metadata stored on this payment. This will be copied over to the checkout configuration for which this payment was made
137 |
# File 'lib/whop_sdk/models/payment.rb', line 137 required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true |
#next_payment_attempt ⇒ Time?
The time of the next schedule payment retry.
143 |
# File 'lib/whop_sdk/models/payment.rb', line 143 required :next_payment_attempt, Time, nil?: true |
#paid_at ⇒ Time?
The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.
150 |
# File 'lib/whop_sdk/models/payment.rb', line 150 required :paid_at, Time, nil?: true |
#payment_method ⇒ WhopSDK::Models::Payment::PaymentMethod?
The tokenized payment method reference used for this payment. Null if no token was used.
157 |
# File 'lib/whop_sdk/models/payment.rb', line 157 required :payment_method, -> { WhopSDK::Payment::PaymentMethod }, nil?: true |
#payment_method_type ⇒ Symbol, ...
The different types of payment methods that can be used.
163 |
# File 'lib/whop_sdk/models/payment.rb', line 163 required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true |
#payments_failed ⇒ Integer?
The number of failed payment attempts for the payment.
169 |
# File 'lib/whop_sdk/models/payment.rb', line 169 required :payments_failed, Integer, nil?: true |
#plan ⇒ WhopSDK::Models::Payment::Plan?
The plan attached to this payment.
175 |
# File 'lib/whop_sdk/models/payment.rb', line 175 required :plan, -> { WhopSDK::Payment::Plan }, nil?: true |
#product ⇒ WhopSDK::Models::Payment::Product?
The product this payment was made for
181 |
# File 'lib/whop_sdk/models/payment.rb', line 181 required :product, -> { WhopSDK::Payment::Product }, nil?: true |
#promo_code ⇒ WhopSDK::Models::Payment::PromoCode?
The promo code used for this payment.
187 |
# File 'lib/whop_sdk/models/payment.rb', line 187 required :promo_code, -> { WhopSDK::Payment::PromoCode }, nil?: true |
#refundable ⇒ Boolean
True only for payments that are ‘paid`, have not been fully refunded, and were processed by a payment processor that allows refunds.
194 |
# File 'lib/whop_sdk/models/payment.rb', line 194 required :refundable, WhopSDK::Internal::Type::Boolean |
#refunded_amount ⇒ Float?
The payment refund amount(if applicable).
200 |
# File 'lib/whop_sdk/models/payment.rb', line 200 required :refunded_amount, Float, nil?: true |
#refunded_at ⇒ Time?
When the payment was refunded (if applicable).
206 |
# File 'lib/whop_sdk/models/payment.rb', line 206 required :refunded_at, Time, nil?: true |
#resolutions ⇒ Array<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.
214 |
# File 'lib/whop_sdk/models/payment.rb', line 214 required :resolutions, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution] }, nil?: true |
#retryable ⇒ Boolean
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.
222 |
# File 'lib/whop_sdk/models/payment.rb', line 222 required :retryable, WhopSDK::Internal::Type::Boolean |
#settlement_amount ⇒ Float
The total amount charged to the customer for this payment, including taxes and after any discounts. In the currency specified by the currency field.
229 |
# File 'lib/whop_sdk/models/payment.rb', line 229 required :settlement_amount, Float |
#settlement_currency ⇒ Symbol, WhopSDK::Models::Currency
The three-letter ISO currency code for this payment (e.g., ‘usd’, ‘eur’).
235 |
# File 'lib/whop_sdk/models/payment.rb', line 235 required :settlement_currency, enum: -> { WhopSDK::Currency } |
#settlement_exchange_rate ⇒ Float?
Deprecated. Always returns null.
241 |
# File 'lib/whop_sdk/models/payment.rb', line 241 required :settlement_exchange_rate, Float, nil?: true |
#status ⇒ Symbol, ...
The status of a receipt
247 |
# File 'lib/whop_sdk/models/payment.rb', line 247 required :status, enum: -> { WhopSDK::ReceiptStatus }, nil?: true |
#substatus ⇒ Symbol, WhopSDK::Models::FriendlyReceiptStatus
The friendly status of the payment.
253 |
# File 'lib/whop_sdk/models/payment.rb', line 253 required :substatus, enum: -> { WhopSDK::FriendlyReceiptStatus } |
#subtotal ⇒ Float?
The subtotal to show to the creator (excluding buyer fees).
259 |
# File 'lib/whop_sdk/models/payment.rb', line 259 required :subtotal, Float, nil?: true |
#tax_amount ⇒ Float?
The calculated amount of the sales/VAT tax (if applicable).
265 |
# File 'lib/whop_sdk/models/payment.rb', line 265 required :tax_amount, Float, nil?: true |
#tax_behavior ⇒ Symbol, ...
The type of tax inclusivity applied to the receipt, for determining whether the tax is included in the final price, or paid on top.
272 |
# File 'lib/whop_sdk/models/payment.rb', line 272 required :tax_behavior, enum: -> { WhopSDK::ReceiptTaxBehavior }, nil?: true |
#tax_refunded_amount ⇒ Float?
The amount of tax that has been refunded (if applicable).
278 |
# File 'lib/whop_sdk/models/payment.rb', line 278 required :tax_refunded_amount, Float, nil?: true |
#total ⇒ Float?
The total to show to the creator (excluding buyer fees).
284 |
# File 'lib/whop_sdk/models/payment.rb', line 284 required :total, Float, nil?: true |
#updated_at ⇒ Time
The datetime the payment was last updated.
290 |
# File 'lib/whop_sdk/models/payment.rb', line 290 required :updated_at, Time |
#usd_total ⇒ Float?
The total in USD to show to the creator (excluding buyer fees).
296 |
# File 'lib/whop_sdk/models/payment.rb', line 296 required :usd_total, Float, nil?: true |
#user ⇒ WhopSDK::Models::Payment::User?
The user that made this payment.
302 |
# File 'lib/whop_sdk/models/payment.rb', line 302 required :user, -> { WhopSDK::Payment::User }, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/whop_sdk/models/payment.rb', line 721
|