class Ingenico::Connect::SDK::Domain::Riskassessments::RiskAssessment
@attr [Ingenico::Connect::SDK::Domain::Definitions::FraudFields] fraud_fields
@attr [Ingenico::Connect::SDK::Domain::Riskassessments::MerchantRiskAssessment] merchant @attr [Ingenico::Connect::SDK::Domain::Riskassessments::OrderRiskAssessment] order @attr [Integer] payment_product_id
Attributes
fraud_fields[RW]
merchant[RW]
order[RW]
payment_product_id[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.rb, line 38 def from_hash(hash) super if hash.has_key? 'fraudFields' raise TypeError, "value '%s' is not a Hash" % [hash['fraudFields']] unless hash['fraudFields'].is_a? Hash @fraud_fields = Ingenico::Connect::SDK::Domain::Definitions::FraudFields.new_from_hash(hash['fraudFields']) end if hash.has_key? 'merchant' raise TypeError, "value '%s' is not a Hash" % [hash['merchant']] unless hash['merchant'].is_a? Hash @merchant = Ingenico::Connect::SDK::Domain::Riskassessments::MerchantRiskAssessment.new_from_hash(hash['merchant']) end if hash.has_key? 'order' raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash @order = Ingenico::Connect::SDK::Domain::Riskassessments::OrderRiskAssessment.new_from_hash(hash['order']) end if hash.has_key? 'paymentProductId' @payment_product_id = hash['paymentProductId'] 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.rb, line 29 def to_h hash = super hash['fraudFields'] = @fraud_fields.to_h unless @fraud_fields.nil? hash['merchant'] = @merchant.to_h unless @merchant.nil? hash['order'] = @order.to_h unless @order.nil? hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil? hash end