Exception: Stripe::CardError

Inherits:
StripeError show all
Defined in:
lib/stripe/errors.rb

Overview

CardError is raised when a user enters a card that can’t be charged for some reason.

Instance Attribute Summary collapse

Attributes inherited from StripeError

#code, #http_body, #http_headers, #http_status, #json_body, #message, #request_id, #response

Instance Method Summary collapse

Methods inherited from StripeError

#to_s

Constructor Details

#initialize(message, param, code, http_status: nil, http_body: nil, json_body: nil, http_headers: nil) ⇒ CardError

TODO: make code a keyword arg in next major release



63
64
65
66
67
68
69
# File 'lib/stripe/errors.rb', line 63

def initialize(message, param, code, http_status: nil, http_body: nil,
               json_body: nil, http_headers: nil)
  super(message, http_status: http_status, http_body: http_body,
                 json_body: json_body, http_headers: http_headers,
                 code: code)
  @param = param
end

Instance Attribute Details

#paramObject (readonly)

Returns the value of attribute param.



60
61
62
# File 'lib/stripe/errors.rb', line 60

def param
  @param
end