class Ingenico::Direct::SDK::Domain::MobilePaymentMethodSpecificOutput
@attr [String] authorisation_code
@attr [Ingenico::Direct::SDK::Domain::CardFraudResults] fraud_results
@attr [String] network @attr [Ingenico::Direct::SDK::Domain::MobilePaymentData] payment_data
@attr [Integer] payment_product_id
@attr [Ingenico::Direct::SDK::Domain::ThreeDSecureResults] three_d_secure_results
Attributes
fraud_results[RW]
network[RW]
payment_data[RW]
payment_product_id[RW]
three_d_secure_results[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Direct::SDK::DataObject#from_hash
# File lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb, line 39 def from_hash(hash) super @authorisation_code = hash['authorisationCode'] if hash.key? 'authorisationCode' if hash.key? 'fraudResults' raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash @fraud_results = Ingenico::Direct::SDK::Domain::CardFraudResults.new_from_hash(hash['fraudResults']) end @network = hash['network'] if hash.key? 'network' if hash.key? 'paymentData' raise TypeError, "value '%s' is not a Hash" % [hash['paymentData']] unless hash['paymentData'].is_a? Hash @payment_data = Ingenico::Direct::SDK::Domain::MobilePaymentData.new_from_hash(hash['paymentData']) end @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId' if hash.key? 'threeDSecureResults' raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecureResults']] unless hash['threeDSecureResults'].is_a? Hash @three_d_secure_results = Ingenico::Direct::SDK::Domain::ThreeDSecureResults.new_from_hash(hash['threeDSecureResults']) end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb, line 28 def to_h hash = super hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil? hash['fraudResults'] = @fraud_results.to_h if @fraud_results hash['network'] = @network unless @network.nil? hash['paymentData'] = @payment_data.to_h if @payment_data hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil? hash['threeDSecureResults'] = @three_d_secure_results.to_h if @three_d_secure_results hash end