Class: ApraService::NotificationResponse
- Inherits:
-
Object
- Object
- ApraService::NotificationResponse
- Defined in:
- lib/apralib/notification_response.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#notification ⇒ Object
Returns the value of attribute notification.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(notification, error) ⇒ NotificationResponse
constructor
A new instance of NotificationResponse.
Constructor Details
#initialize(notification, error) ⇒ NotificationResponse
Returns a new instance of NotificationResponse.
7 8 9 10 |
# File 'lib/apralib/notification_response.rb', line 7 def initialize(notification, error) @notification = notification @error = error end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
5 6 7 |
# File 'lib/apralib/notification_response.rb', line 5 def error @error end |
#notification ⇒ Object
Returns the value of attribute notification.
5 6 7 |
# File 'lib/apralib/notification_response.rb', line 5 def notification @notification end |
Class Method Details
.from_hash(hash) ⇒ Object
13 14 15 16 17 |
# File 'lib/apralib/notification_response.rb', line 13 def self.from_hash(hash) notification = Notification.from_hash(hash[:ilmoitus]) error = hash[:virhe] NotificationResponse.new(notification, error) end |