Class: Ingenico::Direct::SDK::Domain::CardPaymentMethodSpecificOutput
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::CardPaymentMethodSpecificOutput
- Defined in:
- lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb
Instance Attribute Summary collapse
-
#authenticated_amount ⇒ Long
The current value of authenticated_amount.
-
#authorisation_code ⇒ String
The current value of authorisation_code.
-
#card ⇒ Ingenico::Direct::SDK::Domain::CardEssentials
The current value of card.
-
#external_token_linked ⇒ Ingenico::Direct::SDK::Domain::ExternalTokenLinked
The current value of external_token_linked.
-
#fraud_results ⇒ Ingenico::Direct::SDK::Domain::CardFraudResults
The current value of fraud_results.
-
#initial_scheme_transaction_id ⇒ String
The current value of initial_scheme_transaction_id.
-
#payment_option ⇒ String
The current value of payment_option.
-
#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.
-
#token ⇒ String
The current value of token.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#authenticated_amount ⇒ Long
Returns the current value of authenticated_amount.
24 25 26 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 24 def authenticated_amount @authenticated_amount end |
#authorisation_code ⇒ String
Returns the current value of authorisation_code.
24 25 26 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 24 def @authorisation_code end |
#card ⇒ Ingenico::Direct::SDK::Domain::CardEssentials
Returns the current value of card.
24 25 26 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 24 def card @card end |
#external_token_linked ⇒ Ingenico::Direct::SDK::Domain::ExternalTokenLinked
Returns the current value of external_token_linked.
24 25 26 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 24 def external_token_linked @external_token_linked end |
#fraud_results ⇒ Ingenico::Direct::SDK::Domain::CardFraudResults
Returns the current value of fraud_results.
24 25 26 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 24 def fraud_results @fraud_results end |
#initial_scheme_transaction_id ⇒ String
Returns the current value of initial_scheme_transaction_id.
24 25 26 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 24 def initial_scheme_transaction_id @initial_scheme_transaction_id end |
#payment_option ⇒ String
Returns the current value of payment_option.
24 25 26 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 24 def payment_option @payment_option end |
#payment_product_id ⇒ Integer
Returns the current value of payment_product_id.
24 25 26 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 24 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.
24 25 26 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 24 def three_d_secure_results @three_d_secure_results end |
#token ⇒ String
Returns the current value of token.
24 25 26 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 24 def token @token end |
Instance Method Details
#from_hash(hash) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 52 def from_hash(hash) super @authenticated_amount = hash['authenticatedAmount'] if hash.key? 'authenticatedAmount' @authorisation_code = hash['authorisationCode'] if hash.key? 'authorisationCode' if hash.key? 'card' raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash @card = Ingenico::Direct::SDK::Domain::CardEssentials.new_from_hash(hash['card']) end if hash.key? 'externalTokenLinked' raise TypeError, "value '%s' is not a Hash" % [hash['externalTokenLinked']] unless hash['externalTokenLinked'].is_a? Hash @external_token_linked = Ingenico::Direct::SDK::Domain::ExternalTokenLinked.new_from_hash(hash['externalTokenLinked']) end 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 @initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId' @payment_option = hash['paymentOption'] if hash.key? 'paymentOption' @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 @token = hash['token'] if hash.key? 'token' end |
#to_h ⇒ Hash
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb', line 37 def to_h hash = super hash['authenticatedAmount'] = @authenticated_amount unless @authenticated_amount.nil? hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil? hash['card'] = @card.to_h if @card hash['externalTokenLinked'] = @external_token_linked.to_h if @external_token_linked hash['fraudResults'] = @fraud_results.to_h if @fraud_results hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil? hash['paymentOption'] = @payment_option unless @payment_option.nil? hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil? hash['threeDSecureResults'] = @three_d_secure_results.to_h if @three_d_secure_results hash['token'] = @token unless @token.nil? hash end |