Class: Dodopayments::Models::Payment
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::Payment
- Defined in:
- lib/dodopayments/models/payment.rb
Overview
Direct Known Subclasses
Dodopayments::Models::PaymentCancelledWebhookEvent::Data, Dodopayments::Models::PaymentFailedWebhookEvent::Data, Dodopayments::Models::PaymentProcessingWebhookEvent::Data, Dodopayments::Models::PaymentSucceededWebhookEvent::Data, WebhookPayload::Data::Payment
Defined Under Namespace
Classes: ProductCart, Refund
Instance Attribute Summary collapse
-
#billing ⇒ Dodopayments::Models::BillingAddress
Billing address details for payments.
-
#brand_id ⇒ String
brand id this payment belongs to.
-
#business_id ⇒ String
Identifier of the business associated with the payment.
-
#card_issuing_country ⇒ Symbol, ...
ISO2 country code of the card.
-
#card_last_four ⇒ String?
The last four digits of the card.
-
#card_network ⇒ String?
Card network like VISA, MASTERCARD etc.
-
#card_type ⇒ String?
The type of card DEBIT or CREDIT.
-
#checkout_session_id ⇒ String?
If payment is made using a checkout session, this field is set to the id of the session.
-
#created_at ⇒ Time
Timestamp when the payment was created.
-
#currency ⇒ Symbol, Dodopayments::Models::Currency
Currency used for the payment.
-
#customer ⇒ Dodopayments::Models::CustomerLimitedDetails
Details about the customer who made the payment.
-
#digital_products_delivered ⇒ Boolean
brand id this payment belongs to.
-
#discount_id ⇒ String?
The discount id if discount is applied.
-
#disputes ⇒ Array<Dodopayments::Models::Dispute>
List of disputes associated with this payment.
-
#error_code ⇒ String?
An error code if the payment failed.
-
#error_message ⇒ String?
An error message if the payment failed.
-
#metadata ⇒ Hash{Symbol=>String}
Additional custom data associated with the payment.
-
#payment_id ⇒ String
Unique identifier for the payment.
-
#payment_link ⇒ String?
Checkout URL.
-
#payment_method ⇒ String?
Payment method used by customer (e.g. “card”, “bank_transfer”).
-
#payment_method_type ⇒ String?
Specific type of payment method (e.g. “visa”, “mastercard”).
-
#product_cart ⇒ Array<Dodopayments::Models::Payment::ProductCart>?
List of products purchased in a one-time payment.
-
#refunds ⇒ Array<Dodopayments::Models::Payment::Refund>
List of refunds issued for this payment.
-
#settlement_amount ⇒ Integer
The amount that will be credited to your Dodo balance after currency conversion and processing.
-
#settlement_currency ⇒ Symbol, Dodopayments::Models::Currency
The currency in which the settlement_amount will be credited to your Dodo balance.
-
#settlement_tax ⇒ Integer?
This represents the portion of settlement_amount that corresponds to taxes collected.
-
#status ⇒ Symbol, ...
Current status of the payment intent.
-
#subscription_id ⇒ String?
Identifier of the subscription if payment is part of a subscription.
-
#tax ⇒ Integer?
Amount of tax collected in smallest currency unit (e.g. cents).
-
#total_amount ⇒ Integer
Total amount charged to the customer including tax, in smallest currency unit (e.g. cents).
-
#updated_at ⇒ Time?
Timestamp when the payment was last updated.
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(business_id: , created_at: , is_partial: , payment_id: , refund_id: , status: , amount: nil, currency: nil, reason: nil) ⇒ Object
|
|
# File 'lib/dodopayments/models/payment.rb', line 324
|
Instance Attribute Details
#billing ⇒ Dodopayments::Models::BillingAddress
Billing address details for payments
11 |
# File 'lib/dodopayments/models/payment.rb', line 11 required :billing, -> { Dodopayments::BillingAddress } |
#brand_id ⇒ String
brand id this payment belongs to
17 |
# File 'lib/dodopayments/models/payment.rb', line 17 required :brand_id, String |
#business_id ⇒ String
Identifier of the business associated with the payment
23 |
# File 'lib/dodopayments/models/payment.rb', line 23 required :business_id, String |
#card_issuing_country ⇒ Symbol, ...
ISO2 country code of the card
100 |
# File 'lib/dodopayments/models/payment.rb', line 100 optional :card_issuing_country, enum: -> { Dodopayments::CountryCode }, nil?: true |
#card_last_four ⇒ String?
The last four digits of the card
106 |
# File 'lib/dodopayments/models/payment.rb', line 106 optional :card_last_four, String, nil?: true |
#card_network ⇒ String?
Card network like VISA, MASTERCARD etc.
112 |
# File 'lib/dodopayments/models/payment.rb', line 112 optional :card_network, String, nil?: true |
#card_type ⇒ String?
The type of card DEBIT or CREDIT
118 |
# File 'lib/dodopayments/models/payment.rb', line 118 optional :card_type, String, nil?: true |
#checkout_session_id ⇒ String?
If payment is made using a checkout session, this field is set to the id of the session.
125 |
# File 'lib/dodopayments/models/payment.rb', line 125 optional :checkout_session_id, String, nil?: true |
#created_at ⇒ Time
Timestamp when the payment was created
29 |
# File 'lib/dodopayments/models/payment.rb', line 29 required :created_at, Time |
#currency ⇒ Symbol, Dodopayments::Models::Currency
Currency used for the payment
35 |
# File 'lib/dodopayments/models/payment.rb', line 35 required :currency, enum: -> { Dodopayments::Currency } |
#customer ⇒ Dodopayments::Models::CustomerLimitedDetails
Details about the customer who made the payment
41 |
# File 'lib/dodopayments/models/payment.rb', line 41 required :customer, -> { Dodopayments::CustomerLimitedDetails } |
#digital_products_delivered ⇒ Boolean
brand id this payment belongs to
47 |
# File 'lib/dodopayments/models/payment.rb', line 47 required :digital_products_delivered, Dodopayments::Internal::Type::Boolean |
#discount_id ⇒ String?
The discount id if discount is applied
131 |
# File 'lib/dodopayments/models/payment.rb', line 131 optional :discount_id, String, nil?: true |
#disputes ⇒ Array<Dodopayments::Models::Dispute>
List of disputes associated with this payment
53 |
# File 'lib/dodopayments/models/payment.rb', line 53 required :disputes, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Dispute] } |
#error_code ⇒ String?
An error code if the payment failed
137 |
# File 'lib/dodopayments/models/payment.rb', line 137 optional :error_code, String, nil?: true |
#error_message ⇒ String?
An error message if the payment failed
143 |
# File 'lib/dodopayments/models/payment.rb', line 143 optional :error_message, String, nil?: true |
#metadata ⇒ Hash{Symbol=>String}
Additional custom data associated with the payment
59 |
# File 'lib/dodopayments/models/payment.rb', line 59 required :metadata, Dodopayments::Internal::Type::HashOf[String] |
#payment_id ⇒ String
Unique identifier for the payment
65 |
# File 'lib/dodopayments/models/payment.rb', line 65 required :payment_id, String |
#payment_link ⇒ String?
Checkout URL
149 |
# File 'lib/dodopayments/models/payment.rb', line 149 optional :payment_link, String, nil?: true |
#payment_method ⇒ String?
Payment method used by customer (e.g. “card”, “bank_transfer”)
155 |
# File 'lib/dodopayments/models/payment.rb', line 155 optional :payment_method, String, nil?: true |
#payment_method_type ⇒ String?
Specific type of payment method (e.g. “visa”, “mastercard”)
161 |
# File 'lib/dodopayments/models/payment.rb', line 161 optional :payment_method_type, String, nil?: true |
#product_cart ⇒ Array<Dodopayments::Models::Payment::ProductCart>?
List of products purchased in a one-time payment
167 168 169 |
# File 'lib/dodopayments/models/payment.rb', line 167 optional :product_cart, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Payment::ProductCart] }, nil?: true |
#refunds ⇒ Array<Dodopayments::Models::Payment::Refund>
List of refunds issued for this payment
71 |
# File 'lib/dodopayments/models/payment.rb', line 71 required :refunds, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Payment::Refund] } |
#settlement_amount ⇒ Integer
The amount that will be credited to your Dodo balance after currency conversion and processing. Especially relevant for adaptive pricing where the customer’s payment currency differs from your settlement currency.
79 |
# File 'lib/dodopayments/models/payment.rb', line 79 required :settlement_amount, Integer |
#settlement_currency ⇒ Symbol, Dodopayments::Models::Currency
The currency in which the settlement_amount will be credited to your Dodo balance. This may differ from the customer’s payment currency in adaptive pricing scenarios.
87 |
# File 'lib/dodopayments/models/payment.rb', line 87 required :settlement_currency, enum: -> { Dodopayments::Currency } |
#settlement_tax ⇒ Integer?
This represents the portion of settlement_amount that corresponds to taxes collected. Especially relevant for adaptive pricing where the tax component must be tracked separately in your Dodo balance.
177 |
# File 'lib/dodopayments/models/payment.rb', line 177 optional :settlement_tax, Integer, nil?: true |
#status ⇒ Symbol, ...
Current status of the payment intent
183 |
# File 'lib/dodopayments/models/payment.rb', line 183 optional :status, enum: -> { Dodopayments::IntentStatus }, nil?: true |
#subscription_id ⇒ String?
Identifier of the subscription if payment is part of a subscription
189 |
# File 'lib/dodopayments/models/payment.rb', line 189 optional :subscription_id, String, nil?: true |
#tax ⇒ Integer?
Amount of tax collected in smallest currency unit (e.g. cents)
195 |
# File 'lib/dodopayments/models/payment.rb', line 195 optional :tax, Integer, nil?: true |
#total_amount ⇒ Integer
Total amount charged to the customer including tax, in smallest currency unit (e.g. cents)
94 |
# File 'lib/dodopayments/models/payment.rb', line 94 required :total_amount, Integer |
#updated_at ⇒ Time?
Timestamp when the payment was last updated
201 |
# File 'lib/dodopayments/models/payment.rb', line 201 optional :updated_at, Time, nil?: true |