Exception: CorePro::CoreProApiException
- Inherits:
-
StandardError
- Object
- StandardError
- CorePro::CoreProApiException
- Defined in:
- lib/corepro/core_pro_api_exception.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
Instance Method Summary collapse
- #firstCode ⇒ Object
- #firstMessage ⇒ Object
-
#initialize(errors) ⇒ CoreProApiException
constructor
A new instance of CoreProApiException.
- #to_s ⇒ Object
Constructor Details
#initialize(errors) ⇒ CoreProApiException
Returns a new instance of CoreProApiException.
3 4 5 |
# File 'lib/corepro/core_pro_api_exception.rb', line 3 def initialize(errors) @errors = errors end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
7 8 9 |
# File 'lib/corepro/core_pro_api_exception.rb', line 7 def errors @errors end |
Instance Method Details
#firstCode ⇒ Object
13 14 15 |
# File 'lib/corepro/core_pro_api_exception.rb', line 13 def firstCode @errors[0].code end |
#firstMessage ⇒ Object
9 10 11 |
# File 'lib/corepro/core_pro_api_exception.rb', line 9 def firstMessage @errors[0]. end |
#to_s ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/corepro/core_pro_api_exception.rb', line 17 def to_s msg = '' @errors.each do |e| msg += e.to_s + ' ' end msg end |