Class: Stripe::ErrorObject
- Inherits:
-
StripeObject
- Object
- StripeObject
- Stripe::ErrorObject
- Defined in:
- lib/stripe/error_object.rb
Overview
Represents an error object as returned by the API.
Constant Summary
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary
Attributes inherited from StripeObject
Instance Method Summary collapse
-
#advice_code ⇒ Object
errorFields: The beginning of the section generated from our OpenAPI spec For card errors resulting from a card issuer decline, a short string indicating how to proceed with an error if they provide one.
-
#charge ⇒ Object
For card errors, the ID of the failed charge.
-
#code ⇒ Object
For some errors that could be handled programmatically, a short string indicating the error code reported.
-
#decline_code ⇒ Object
For card errors resulting from a card issuer decline, a short string indicating the card issuer's reason for the decline if they provide one.
-
#doc_url ⇒ Object
A URL to more information about the error code reported.
-
#message ⇒ Object
A human-readable message providing more details about the error.
-
#network_advice_code ⇒ Object
For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
-
#network_decline_code ⇒ Object
For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.
-
#param ⇒ Object
If the error is parameter-specific, the parameter related to the error.
-
#payment_intent ⇒ Object
The PaymentIntent object for errors returned on a request involving a PaymentIntent.
-
#payment_method ⇒ Object
The PaymentMethod object for errors returned on a request involving a PaymentMethod.
-
#payment_method_type ⇒ Object
If the error is specific to the type of payment method, the payment method type that had a problem.
-
#request_log_url ⇒ Object
A URL to the request log entry in your dashboard.
-
#setup_intent ⇒ Object
The SetupIntent object for errors returned on a request involving a SetupIntent.
-
#source ⇒ Object
The PaymentSource object for errors returned on a request involving a PaymentSource.
-
#type ⇒ Object
The type of error returned.
-
#user_message ⇒ Object
The user message associated with the error.
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, field_remappings, #hash, #initialize, inner_class_types, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Method Details
#advice_code ⇒ Object
errorFields: The beginning of the section generated from our OpenAPI spec For card errors resulting from a card issuer decline, a short string indicating how to proceed with an error if they provide one.
16 17 18 |
# File 'lib/stripe/error_object.rb', line 16 def advice_code @values[:advice_code] end |
#charge ⇒ Object
For card errors, the ID of the failed charge.
21 22 23 |
# File 'lib/stripe/error_object.rb', line 21 def charge @values[:charge] end |
#code ⇒ Object
For some errors that could be handled programmatically, a short string indicating the error code reported.
26 27 28 |
# File 'lib/stripe/error_object.rb', line 26 def code @values[:code] end |
#decline_code ⇒ Object
For card errors resulting from a card issuer decline, a short string indicating the card issuer's reason for the decline if they provide one.
31 32 33 |
# File 'lib/stripe/error_object.rb', line 31 def decline_code @values[:decline_code] end |
#doc_url ⇒ Object
A URL to more information about the error code reported.
36 37 38 |
# File 'lib/stripe/error_object.rb', line 36 def doc_url @values[:doc_url] end |
#message ⇒ Object
A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
41 42 43 |
# File 'lib/stripe/error_object.rb', line 41 def @values[:message] end |
#network_advice_code ⇒ Object
For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
46 47 48 |
# File 'lib/stripe/error_object.rb', line 46 def network_advice_code @values[:network_advice_code] end |
#network_decline_code ⇒ Object
For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.
51 52 53 |
# File 'lib/stripe/error_object.rb', line 51 def network_decline_code @values[:network_decline_code] end |
#param ⇒ Object
If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
56 57 58 |
# File 'lib/stripe/error_object.rb', line 56 def param @values[:param] end |
#payment_intent ⇒ Object
The PaymentIntent object for errors returned on a request involving a PaymentIntent.
61 62 63 |
# File 'lib/stripe/error_object.rb', line 61 def payment_intent @values[:payment_intent] end |
#payment_method ⇒ Object
The PaymentMethod object for errors returned on a request involving a PaymentMethod.
66 67 68 |
# File 'lib/stripe/error_object.rb', line 66 def payment_method @values[:payment_method] end |
#payment_method_type ⇒ Object
If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
71 72 73 |
# File 'lib/stripe/error_object.rb', line 71 def payment_method_type @values[:payment_method_type] end |
#request_log_url ⇒ Object
A URL to the request log entry in your dashboard.
76 77 78 |
# File 'lib/stripe/error_object.rb', line 76 def request_log_url @values[:request_log_url] end |
#setup_intent ⇒ Object
The SetupIntent object for errors returned on a request involving a SetupIntent.
81 82 83 |
# File 'lib/stripe/error_object.rb', line 81 def setup_intent @values[:setup_intent] end |
#source ⇒ Object
The PaymentSource object for errors returned on a request involving a PaymentSource.
86 87 88 |
# File 'lib/stripe/error_object.rb', line 86 def source @values[:source] end |
#type ⇒ Object
The type of error returned. One of api_error, card_error, idempotency_error, or invalid_request_error
91 92 93 |
# File 'lib/stripe/error_object.rb', line 91 def type @values[:type] end |
#user_message ⇒ Object
The user message associated with the error.
96 97 98 |
# File 'lib/stripe/error_object.rb', line 96 def @values[:user_message] end |