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
Defined Under Namespace
Modules: PaymentProvider Classes: ProductCart
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_holder_name ⇒ String?
Cardholder name.
-
#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.
-
#custom_field_responses ⇒ Array<Dodopayments::Models::CustomFieldResponse>?
Customer’s responses to custom fields collected during checkout.
-
#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?
deprecated
Deprecated.
Use ‘discounts` instead.
-
#discounts ⇒ Array<Dodopayments::Models::DiscountDetail>?
All stacked discounts applied, ordered by position.
-
#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.
-
#invoice_id ⇒ String?
Invoice ID for this payment.
-
#invoice_url ⇒ String?
URL to download the invoice PDF for this payment.
-
#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”).
-
#payment_provider ⇒ Symbol, Dodopayments::Models::Payment::PaymentProvider
Which processor handled this payment.
-
#product_cart ⇒ Array<Dodopayments::Models::Payment::ProductCart>?
List of products purchased in a one-time payment.
-
#refund_status ⇒ Symbol, ...
Summary of the refund status for this payment.
-
#refunds ⇒ Array<Dodopayments::Models::RefundListItem>
List of refunds issued for this payment.
-
#retry_attempt ⇒ Integer
Retry attempt number for subscription renewal payments.
-
#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 the currency’s smallest unit (e.g. cents for USD, yen for JPY, fils for KWD).
-
#total_amount ⇒ Integer
Total amount charged to the customer including tax, in the currency’s smallest unit (e.g. cents for USD, yen for JPY, fils for KWD — see the currency’s decimal places).
-
#updated_at ⇒ Time?
Timestamp when the payment was last updated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(billing:, brand_id:, business_id:, created_at:, currency:, customer:, digital_products_delivered:, disputes:, metadata:, payment_id:, payment_provider:, refunds:, retry_attempt:, settlement_amount:, settlement_currency:, total_amount:, card_holder_name: nil, card_issuing_country: nil, card_last_four: nil, card_network: nil, card_type: nil, checkout_session_id: nil, custom_field_responses: nil, discount_id: nil, discounts: nil, error_code: nil, error_message: nil, invoice_id: nil, invoice_url: nil, payment_link: nil, payment_method: nil, payment_method_type: nil, product_cart: nil, refund_status: nil, settlement_tax: nil, status: nil, subscription_id: nil, tax: nil, updated_at: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Payment 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(billing:, brand_id:, business_id:, created_at:, currency:, customer:, digital_products_delivered:, disputes:, metadata:, payment_id:, payment_provider:, refunds:, retry_attempt:, settlement_amount:, settlement_currency:, total_amount:, card_holder_name: nil, card_issuing_country: nil, card_last_four: nil, card_network: nil, card_type: nil, checkout_session_id: nil, custom_field_responses: nil, discount_id: nil, discounts: nil, error_code: nil, error_message: nil, invoice_id: nil, invoice_url: nil, payment_link: nil, payment_method: nil, payment_method_type: nil, product_cart: nil, refund_status: nil, settlement_tax: nil, status: nil, subscription_id: nil, tax: nil, updated_at: nil) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::Payment for more details.
|
|
# File 'lib/dodopayments/models/payment.rb', line 264
|
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_holder_name ⇒ String?
Cardholder name
117 |
# File 'lib/dodopayments/models/payment.rb', line 117 optional :card_holder_name, String, nil?: true |
#card_issuing_country ⇒ Symbol, ...
ISO2 country code of the card
123 |
# File 'lib/dodopayments/models/payment.rb', line 123 optional :card_issuing_country, enum: -> { Dodopayments::CountryCode }, nil?: true |
#card_last_four ⇒ String?
The last four digits of the card
129 |
# File 'lib/dodopayments/models/payment.rb', line 129 optional :card_last_four, String, nil?: true |
#card_network ⇒ String?
Card network like VISA, MASTERCARD etc.
135 |
# File 'lib/dodopayments/models/payment.rb', line 135 optional :card_network, String, nil?: true |
#card_type ⇒ String?
The type of card DEBIT or CREDIT
141 |
# File 'lib/dodopayments/models/payment.rb', line 141 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.
148 |
# File 'lib/dodopayments/models/payment.rb', line 148 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 } |
#custom_field_responses ⇒ Array<Dodopayments::Models::CustomFieldResponse>?
Customer’s responses to custom fields collected during checkout
154 155 156 |
# File 'lib/dodopayments/models/payment.rb', line 154 optional :custom_field_responses, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::CustomFieldResponse] }, nil?: true |
#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?
Use ‘discounts` instead.
DEPRECATED: Use discounts instead. Returns the first discount’s ID if present.
164 |
# File 'lib/dodopayments/models/payment.rb', line 164 optional :discount_id, String, nil?: true |
#discounts ⇒ Array<Dodopayments::Models::DiscountDetail>?
All stacked discounts applied, ordered by position
170 171 172 |
# File 'lib/dodopayments/models/payment.rb', line 170 optional :discounts, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::DiscountDetail] }, 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
178 |
# File 'lib/dodopayments/models/payment.rb', line 178 optional :error_code, String, nil?: true |
#error_message ⇒ String?
An error message if the payment failed
184 |
# File 'lib/dodopayments/models/payment.rb', line 184 optional :error_message, String, nil?: true |
#invoice_id ⇒ String?
Invoice ID for this payment. Uses India-specific invoice ID if available.
190 |
# File 'lib/dodopayments/models/payment.rb', line 190 optional :invoice_id, String, nil?: true |
#invoice_url ⇒ String?
URL to download the invoice PDF for this payment.
196 |
# File 'lib/dodopayments/models/payment.rb', line 196 optional :invoice_url, 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
202 |
# File 'lib/dodopayments/models/payment.rb', line 202 optional :payment_link, String, nil?: true |
#payment_method ⇒ String?
Payment method used by customer (e.g. “card”, “bank_transfer”)
208 |
# File 'lib/dodopayments/models/payment.rb', line 208 optional :payment_method, String, nil?: true |
#payment_method_type ⇒ String?
Specific type of payment method (e.g. “visa”, “mastercard”)
214 |
# File 'lib/dodopayments/models/payment.rb', line 214 optional :payment_method_type, String, nil?: true |
#payment_provider ⇒ Symbol, Dodopayments::Models::Payment::PaymentProvider
Which processor handled this payment. ‘stripe` / `adyen` for BYOP routes (the merchant’s own Hyperswitch connector); ‘dodo` for everything Dodo processed itself.
73 |
# File 'lib/dodopayments/models/payment.rb', line 73 required :payment_provider, enum: -> { Dodopayments::Payment::PaymentProvider } |
#product_cart ⇒ Array<Dodopayments::Models::Payment::ProductCart>?
List of products purchased in a one-time payment
220 221 222 |
# File 'lib/dodopayments/models/payment.rb', line 220 optional :product_cart, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Payment::ProductCart] }, nil?: true |
#refund_status ⇒ Symbol, ...
Summary of the refund status for this payment. None if no succeeded refunds exist.
229 |
# File 'lib/dodopayments/models/payment.rb', line 229 optional :refund_status, enum: -> { Dodopayments::PaymentRefundStatus }, nil?: true |
#refunds ⇒ Array<Dodopayments::Models::RefundListItem>
List of refunds issued for this payment
79 |
# File 'lib/dodopayments/models/payment.rb', line 79 required :refunds, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::RefundListItem] } |
#retry_attempt ⇒ Integer
Retry attempt number for subscription renewal payments. ‘0` for the original payment, `1`+ for each scheduled off-session retry after a failed renewal. Always `0` for non-subscription payments.
87 |
# File 'lib/dodopayments/models/payment.rb', line 87 required :retry_attempt, Integer |
#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.
95 |
# File 'lib/dodopayments/models/payment.rb', line 95 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.
103 |
# File 'lib/dodopayments/models/payment.rb', line 103 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.
237 |
# File 'lib/dodopayments/models/payment.rb', line 237 optional :settlement_tax, Integer, nil?: true |
#status ⇒ Symbol, ...
Current status of the payment intent
243 |
# File 'lib/dodopayments/models/payment.rb', line 243 optional :status, enum: -> { Dodopayments::IntentStatus }, nil?: true |
#subscription_id ⇒ String?
Identifier of the subscription if payment is part of a subscription
249 |
# File 'lib/dodopayments/models/payment.rb', line 249 optional :subscription_id, String, nil?: true |
#tax ⇒ Integer?
Amount of tax collected in the currency’s smallest unit (e.g. cents for USD, yen for JPY, fils for KWD)
256 |
# File 'lib/dodopayments/models/payment.rb', line 256 optional :tax, Integer, nil?: true |
#total_amount ⇒ Integer
Total amount charged to the customer including tax, in the currency’s smallest unit (e.g. cents for USD, yen for JPY, fils for KWD — see the currency’s decimal places)
111 |
# File 'lib/dodopayments/models/payment.rb', line 111 required :total_amount, Integer |
#updated_at ⇒ Time?
Timestamp when the payment was last updated
262 |
# File 'lib/dodopayments/models/payment.rb', line 262 optional :updated_at, Time, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/dodopayments/models/payment.rb', line 358
|