Exception: SmartlistSparkpost::DeliveryException
- Inherits:
-
StandardError
- Object
- StandardError
- SmartlistSparkpost::DeliveryException
- Defined in:
- lib/smartlist_sparkpost/delivery_exception.rb
Instance Attribute Summary collapse
-
#service_code ⇒ Object
readonly
Returns the value of attribute service_code.
-
#service_description ⇒ Object
readonly
Returns the value of attribute service_description.
-
#service_message ⇒ Object
readonly
Returns the value of attribute service_message.
Instance Method Summary collapse
-
#initialize(message) ⇒ DeliveryException
constructor
A new instance of DeliveryException.
Constructor Details
#initialize(message) ⇒ DeliveryException
Returns a new instance of DeliveryException.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/smartlist_sparkpost/delivery_exception.rb', line 5 def initialize() errors = [*].first if errors.is_a?(Hash) @service_message = errors['message'] @service_description = errors['description'] @service_code = errors['code'] end super() end |
Instance Attribute Details
#service_code ⇒ Object (readonly)
Returns the value of attribute service_code.
3 4 5 |
# File 'lib/smartlist_sparkpost/delivery_exception.rb', line 3 def service_code @service_code end |
#service_description ⇒ Object (readonly)
Returns the value of attribute service_description.
3 4 5 |
# File 'lib/smartlist_sparkpost/delivery_exception.rb', line 3 def service_description @service_description end |
#service_message ⇒ Object (readonly)
Returns the value of attribute service_message.
3 4 5 |
# File 'lib/smartlist_sparkpost/delivery_exception.rb', line 3 def @service_message end |