mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-07 00:05:33 -04:00
21 lines
505 B
Ruby
21 lines
505 B
Ruby
module Stripe
|
|
class StripeError < StandardError
|
|
attr_reader :message
|
|
attr_reader :http_status
|
|
attr_reader :http_body
|
|
attr_reader :json_body
|
|
|
|
def initialize(message=nil, http_status=nil, http_body=nil, json_body=nil)
|
|
@message = message
|
|
@http_status = http_status
|
|
@http_body = http_body
|
|
@json_body = json_body
|
|
end
|
|
|
|
def to_s
|
|
status_string = @http_status.nil? ? "" : "(Status #{@http_status}) "
|
|
"#{status_string}#{@message}"
|
|
end
|
|
end
|
|
end
|