Class: Ingenico::Connect::SDK::Domain::Payment::CardPaymentMethodSpecificOutput
- Inherits:
-
AbstractPaymentMethodSpecificOutput
- Object
- Ingenico::Connect::SDK::DataObject
- AbstractPaymentMethodSpecificOutput
- Ingenico::Connect::SDK::Domain::Payment::CardPaymentMethodSpecificOutput
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_output.rb
Instance Attribute Summary collapse
-
#authorisation_code ⇒ String
The current value of authorisation_code.
-
#card ⇒ Ingenico::Connect::SDK::Domain::Definitions::CardEssentials
The current value of card.
-
#fraud_results ⇒ Ingenico::Connect::SDK::Domain::Definitions::CardFraudResults
The current value of fraud_results.
-
#three_d_secure_results ⇒ Ingenico::Connect::SDK::Domain::Payment::ThreeDSecureResults
The current value of three_d_secure_results.
-
#token ⇒ String
The current value of token.
Attributes inherited from AbstractPaymentMethodSpecificOutput
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#authorisation_code ⇒ String
Returns the current value of authorisation_code.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_output.rb', line 19 def end |
#card ⇒ Ingenico::Connect::SDK::Domain::Definitions::CardEssentials
Returns the current value of card.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_output.rb', line 19 def card @card end |
#fraud_results ⇒ Ingenico::Connect::SDK::Domain::Definitions::CardFraudResults
Returns the current value of fraud_results.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_output.rb', line 19 def fraud_results @fraud_results end |
#three_d_secure_results ⇒ Ingenico::Connect::SDK::Domain::Payment::ThreeDSecureResults
Returns the current value of three_d_secure_results.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_output.rb', line 19 def three_d_secure_results @three_d_secure_results end |
#token ⇒ String
Returns the current value of token.
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_output.rb', line 19 def token @token end |
Instance Method Details
#from_hash(hash) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_output.rb', line 42 def from_hash(hash) super if hash.has_key? 'authorisationCode' = hash['authorisationCode'] end if hash.has_key? 'card' raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash @card = Ingenico::Connect::SDK::Domain::Definitions::CardEssentials.new_from_hash(hash['card']) end if hash.has_key? 'fraudResults' raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash @fraud_results = Ingenico::Connect::SDK::Domain::Definitions::CardFraudResults.new_from_hash(hash['fraudResults']) end if hash.has_key? 'threeDSecureResults' raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecureResults']] unless hash['threeDSecureResults'].is_a? Hash @three_d_secure_results = Ingenico::Connect::SDK::Domain::Payment::ThreeDSecureResults.new_from_hash(hash['threeDSecureResults']) end if hash.has_key? 'token' @token = hash['token'] end end |
#to_h ⇒ Hash
32 33 34 35 36 37 38 39 40 |
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_output.rb', line 32 def to_h hash = super hash['authorisationCode'] = unless .nil? hash['card'] = @card.to_h unless @card.nil? hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil? hash['threeDSecureResults'] = @three_d_secure_results.to_h unless @three_d_secure_results.nil? hash['token'] = @token unless @token.nil? hash end |