Exception: AlphaCard::AlphaCardError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/alpha_card/errors/alpha_card_error.rb

Overview

Common class for Alpha Card Gateway errors and exceptions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, response = nil) ⇒ AlphaCardError

AlphaCard::AlphaCardError constructor.

Examples:

AlphaCard::AlphaCardError.new

#=> #<AlphaCard::AlphaCardError: AlphaCard::AlphaCardError>

Parameters:

  • response (String) (defaults to: nil)

    Error message

  • response (AlphaCard::AlphaCardResponse) (defaults to: nil)

    AlphaCard Gateway response



24
25
26
27
# File 'lib/alpha_card/errors/alpha_card_error.rb', line 24

def initialize(message = nil, response = nil)
  @message = message
  @response = response
end

Instance Attribute Details

#messageObject (readonly)

Error message.



10
11
12
# File 'lib/alpha_card/errors/alpha_card_error.rb', line 10

def message
  @message
end

#responseObject (readonly)

Alpha Card Gateway response.



7
8
9
# File 'lib/alpha_card/errors/alpha_card_error.rb', line 7

def response
  @response
end