Class: Dodopayments::Models::Payment::FailureDetails
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::Payment::FailureDetails
- Defined in:
- lib/dodopayments/models/payment.rb,
sig/dodopayments/models/payment.rbs
Overview
Defined Under Namespace
Modules: CustomerCta, CustomerTemplate, DeclineType
Instance Attribute Summary collapse
-
#code ⇒ String
The unified error code (echoes
error_code). -
#customer_cta ⇒ Symbol, Dodopayments::Models::Payment::FailureDetails::CustomerCta
The primary CTA to show the customer.
-
#customer_fixable ⇒ Boolean
Whether the customer can resolve this themselves (e.g. fix CVC).
-
#customer_message ⇒ String
The customer-facing string.
-
#customer_template ⇒ Symbol, Dodopayments::Models::Payment::FailureDetails::CustomerTemplate
The customer message template identifier (C1..C20).
-
#decline_type ⇒ Symbol, Dodopayments::Models::Payment::FailureDetails::DeclineType
Soft or hard decline.
-
#merchant_message ⇒ String
Merchant-facing headline + recommended action (Payment Details).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code:, customer_cta:, customer_fixable:, customer_message:, customer_template:, decline_type:, merchant_message:) ⇒ Object
constructor
Some parameter documentations has been truncated, see FailureDetails for more details.
- #to_hash ⇒ {
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(code:, customer_cta:, customer_fixable:, customer_message:, customer_template:, decline_type:, merchant_message:) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::Payment::FailureDetails for more details.
Purpose-built failure messaging for the merchant and the customer, derived from
error_code. Present whenever error_code is set, regardless of payment
status; unrecognised codes still resolve via a generic fallback rather than
being omitted. The customer copy is always generic for fraud-sensitive declines
(lost/stolen/pickup/fraudulent) so the true reason is never leaked.
|
|
# File 'lib/dodopayments/models/payment.rb', line 434
|
Instance Attribute Details
#code ⇒ String
The unified error code (echoes error_code).
395 |
# File 'lib/dodopayments/models/payment.rb', line 395 required :code, String |
#customer_cta ⇒ Symbol, Dodopayments::Models::Payment::FailureDetails::CustomerCta
The primary CTA to show the customer.
401 |
# File 'lib/dodopayments/models/payment.rb', line 401 required :customer_cta, enum: -> { Dodopayments::Payment::FailureDetails::CustomerCta } |
#customer_fixable ⇒ Boolean
Whether the customer can resolve this themselves (e.g. fix CVC).
407 |
# File 'lib/dodopayments/models/payment.rb', line 407 required :customer_fixable, Dodopayments::Internal::Type::Boolean |
#customer_message ⇒ String
The customer-facing string. Always generic (C11) for the fraud-4.
413 |
# File 'lib/dodopayments/models/payment.rb', line 413 required :customer_message, String |
#customer_template ⇒ Symbol, Dodopayments::Models::Payment::FailureDetails::CustomerTemplate
The customer message template identifier (C1..C20).
419 |
# File 'lib/dodopayments/models/payment.rb', line 419 required :customer_template, enum: -> { Dodopayments::Payment::FailureDetails::CustomerTemplate } |
#decline_type ⇒ Symbol, Dodopayments::Models::Payment::FailureDetails::DeclineType
Soft or hard decline.
425 |
# File 'lib/dodopayments/models/payment.rb', line 425 required :decline_type, enum: -> { Dodopayments::Payment::FailureDetails::DeclineType } |
#merchant_message ⇒ String
Merchant-facing headline + recommended action (Payment Details). For the fraud-4 this includes the operator "do not reveal" warning.
432 |
# File 'lib/dodopayments/models/payment.rb', line 432 required :merchant_message, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/dodopayments/models/payment.rb', line 472
|
Instance Method Details
#to_hash ⇒ {
272 |
# File 'sig/dodopayments/models/payment.rbs', line 272
def to_hash: -> {
|