class Ingenico::Connect::SDK::Domain::Riskassessments::RiskAssessmentResponse
@attr [Array<Ingenico::Connect::SDK::Domain::Definitions::ResultDoRiskAssessment>] results
Attributes
results[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# File lib/ingenico/connect/sdk/domain/riskassessments/risk_assessment_response.rb, line 24 def from_hash(hash) super if hash.has_key? 'results' raise TypeError, "value '%s' is not an Array" % [hash['results']] unless hash['results'].is_a? Array @results = [] hash['results'].each do |e| @results << Ingenico::Connect::SDK::Domain::Definitions::ResultDoRiskAssessment.new_from_hash(e) end end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/riskassessments/risk_assessment_response.rb, line 18 def to_h hash = super hash['results'] = @results.collect{|val| val.to_h} unless @results.nil? hash end