class Ingenico::Direct::SDK::Domain::MobilePaymentMethodSpecificInput
@attr [String] authorization_mode
@attr [Ingenico::Direct::SDK::Domain::DecryptedPaymentData] decrypted_payment_data
@attr [String] encrypted_payment_data
@attr [String] ephemeral_key
@attr [Ingenico::Direct::SDK::Domain::MobilePaymentProduct320SpecificInput] payment_product320_specific_input
@attr [Integer] payment_product_id
@attr [String] public_key_hash
@attr [true/false] requires_approval
Attributes
decrypted_payment_data[RW]
encrypted_payment_data[RW]
ephemeral_key[RW]
payment_product320_specific_input[RW]
payment_product_id[RW]
public_key_hash[RW]
requires_approval[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_input.rb, line 44 def from_hash(hash) super @authorization_mode = hash['authorizationMode'] if hash.key? 'authorizationMode' if hash.key? 'decryptedPaymentData' raise TypeError, "value '%s' is not a Hash" % [hash['decryptedPaymentData']] unless hash['decryptedPaymentData'].is_a? Hash @decrypted_payment_data = Ingenico::Direct::SDK::Domain::DecryptedPaymentData.new_from_hash(hash['decryptedPaymentData']) end @encrypted_payment_data = hash['encryptedPaymentData'] if hash.key? 'encryptedPaymentData' @ephemeral_key = hash['ephemeralKey'] if hash.key? 'ephemeralKey' if hash.key? 'paymentProduct320SpecificInput' raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificInput']] unless hash['paymentProduct320SpecificInput'].is_a? Hash @payment_product320_specific_input = Ingenico::Direct::SDK::Domain::MobilePaymentProduct320SpecificInput.new_from_hash(hash['paymentProduct320SpecificInput']) end @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId' @public_key_hash = hash['publicKeyHash'] if hash.key? 'publicKeyHash' @requires_approval = hash['requiresApproval'] if hash.key? 'requiresApproval' 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_input.rb, line 31 def to_h hash = super hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil? hash['decryptedPaymentData'] = @decrypted_payment_data.to_h if @decrypted_payment_data hash['encryptedPaymentData'] = @encrypted_payment_data unless @encrypted_payment_data.nil? hash['ephemeralKey'] = @ephemeral_key unless @ephemeral_key.nil? hash['paymentProduct320SpecificInput'] = @payment_product320_specific_input.to_h if @payment_product320_specific_input hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil? hash['publicKeyHash'] = @public_key_hash unless @public_key_hash.nil? hash['requiresApproval'] = @requires_approval unless @requires_approval.nil? hash end