class ApraService::Response
The response received from the WebService
Attributes
failed_notifications[RW]
Public Class Methods
from_hash(hash)
click to toggle source
# File lib/apralib/response.rb, line 12 def self.from_hash(hash) puts hash.inspect response = Response.new raw_response = hash[:lisaa_apurahat_response] failures = raw_response[:epaonnistuneet_ilmoitukset] if failures failures = [failures] unless failures.is_a? Array response.failed_notifications = failures.map { |notification| NotificationResponse.from_hash(notification) } end response end
new()
click to toggle source
# File lib/apralib/response.rb, line 8 def initialize @failed_notifications = [] end