Exception: Beanstream::BeanstreamException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/beanstream/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code = nil, category = nil, message = nil, http_status_code = nil) ⇒ BeanstreamException

Returns a new instance of BeanstreamException.



5
6
7
8
9
10
# File 'lib/beanstream/exceptions.rb', line 5

def initialize(code=nil, category=nil, message=nil, http_status_code=nil)
  @code = code
  @category = category
  @message = message
  @http_status_code = http_status_code
end

Instance Attribute Details

#categoryObject (readonly)

Returns the value of attribute category.



4
5
6
# File 'lib/beanstream/exceptions.rb', line 4

def category
  @category
end

#codeObject (readonly)

Returns the value of attribute code.



4
5
6
# File 'lib/beanstream/exceptions.rb', line 4

def code
  @code
end

#http_status_codeObject (readonly)

Returns the value of attribute http_status_code.



4
5
6
# File 'lib/beanstream/exceptions.rb', line 4

def http_status_code
  @http_status_code
end

#messageObject (readonly)

Returns the value of attribute message.



4
5
6
# File 'lib/beanstream/exceptions.rb', line 4

def message
  @message
end

Instance Method Details

#is_user_errorObject



12
13
14
# File 'lib/beanstream/exceptions.rb', line 12

def is_user_error()
  false
end

#user_facing_messageObject



16
17
18
# File 'lib/beanstream/exceptions.rb', line 16

def user_facing_message()
  "There was an error processing your request. Please try again or use a different card."
end