Exception: Beanstream::BeanstreamException
- Inherits:
-
StandardError
- Object
- StandardError
- Beanstream::BeanstreamException
- Defined in:
- lib/beanstream/exceptions.rb
Direct Known Subclasses
BusinessRuleException, ForbiddenException, InternalServerException, InvalidRequestException, UnauthorizedException
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#http_status_code ⇒ Object
readonly
Returns the value of attribute http_status_code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(code = nil, category = nil, message = nil, http_status_code = nil) ⇒ BeanstreamException
constructor
A new instance of BeanstreamException.
- #is_user_error ⇒ Object
- #user_facing_message ⇒ Object
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, =nil, http_status_code=nil) @code = code @category = category @message = @http_status_code = http_status_code end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
4 5 6 |
# File 'lib/beanstream/exceptions.rb', line 4 def category @category end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/beanstream/exceptions.rb', line 4 def code @code end |
#http_status_code ⇒ Object (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 |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/beanstream/exceptions.rb', line 4 def @message end |
Instance Method Details
#is_user_error ⇒ Object
12 13 14 |
# File 'lib/beanstream/exceptions.rb', line 12 def is_user_error() false end |
#user_facing_message ⇒ Object
16 17 18 |
# File 'lib/beanstream/exceptions.rb', line 16 def () "There was an error processing your request. Please try again or use a different card." end |