Class: Ingenico::Direct::SDK::Domain::MobilePaymentMethodSpecificOutput
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::MobilePaymentMethodSpecificOutput
- Defined in:
- lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb
Instance Attribute Summary collapse
-
#authorisation_code ⇒ String
The current value of authorisation_code.
-
#fraud_results ⇒ Ingenico::Direct::SDK::Domain::CardFraudResults
The current value of fraud_results.
-
#network ⇒ String
The current value of network.
-
#payment_data ⇒ Ingenico::Direct::SDK::Domain::MobilePaymentData
The current value of payment_data.
-
#payment_product_id ⇒ Integer
The current value of payment_product_id.
-
#three_d_secure_results ⇒ Ingenico::Direct::SDK::Domain::ThreeDSecureResults
The current value of three_d_secure_results.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#authorisation_code ⇒ String
Returns the current value of authorisation_code.
19 20 21 |
# File 'lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb', line 19 def @authorisation_code end |
#fraud_results ⇒ Ingenico::Direct::SDK::Domain::CardFraudResults
Returns the current value of fraud_results.
19 20 21 |
# File 'lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb', line 19 def fraud_results @fraud_results end |
#network ⇒ String
Returns the current value of network.
19 20 21 |
# File 'lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb', line 19 def network @network end |
#payment_data ⇒ Ingenico::Direct::SDK::Domain::MobilePaymentData
Returns the current value of payment_data.
19 20 21 |
# File 'lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb', line 19 def payment_data @payment_data end |
#payment_product_id ⇒ Integer
Returns the current value of payment_product_id.
19 20 21 |
# File 'lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb', line 19 def payment_product_id @payment_product_id end |
#three_d_secure_results ⇒ Ingenico::Direct::SDK::Domain::ThreeDSecureResults
Returns the current value of three_d_secure_results.
19 20 21 |
# File 'lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb', line 19 def three_d_secure_results @three_d_secure_results end |
Instance Method Details
#from_hash(hash) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# 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 ⇒ Hash
28 29 30 31 32 33 34 35 36 37 |
# 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 |