Exception: Mollie::RequestError
- Defined in:
- lib/mollie/exception.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#field ⇒ Object
Returns the value of attribute field.
-
#links ⇒ Object
Returns the value of attribute links.
-
#status ⇒ Object
Returns the value of attribute status.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(error) ⇒ RequestError
constructor
A new instance of RequestError.
- #to_s ⇒ Object
Constructor Details
#initialize(error) ⇒ RequestError
Returns a new instance of RequestError.
8 9 10 11 12 13 14 |
# File 'lib/mollie/exception.rb', line 8 def initialize(error) exception.status = error['status'] exception.title = error['title'] exception.detail = error['detail'] exception.field = error['field'] exception.links = error['_links'] end |
Instance Attribute Details
#detail ⇒ Object
Returns the value of attribute detail.
6 7 8 |
# File 'lib/mollie/exception.rb', line 6 def detail @detail end |
#field ⇒ Object
Returns the value of attribute field.
6 7 8 |
# File 'lib/mollie/exception.rb', line 6 def field @field end |
#links ⇒ Object
Returns the value of attribute links.
6 7 8 |
# File 'lib/mollie/exception.rb', line 6 def links @links end |
#status ⇒ Object
Returns the value of attribute status.
6 7 8 |
# File 'lib/mollie/exception.rb', line 6 def status @status end |
#title ⇒ Object
Returns the value of attribute title.
6 7 8 |
# File 'lib/mollie/exception.rb', line 6 def title @title end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/mollie/exception.rb', line 16 def to_s "#{status} #{title}: #{detail}" end |