Class: Ingenico::Connect::SDK::Domain::Token::UpdateTokenRequest
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Token::UpdateTokenRequest
- Defined in:
- lib/ingenico/connect/sdk/domain/token/update_token_request.rb
Overview
Class UpdateTokenRequest
Instance Attribute Summary collapse
- #card ⇒ Object
- #e_wallet ⇒ Object
- #non_sepa_direct_debit ⇒ Object
-
#payment_product_id ⇒ Object
Integer.
- #sepa_direct_debit ⇒ Object
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#card ⇒ Object
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 19 def card @card end |
#e_wallet ⇒ Object
22 23 24 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 22 def e_wallet @e_wallet end |
#non_sepa_direct_debit ⇒ Object
25 26 27 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 25 def non_sepa_direct_debit @non_sepa_direct_debit end |
#payment_product_id ⇒ Object
Integer
28 29 30 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 28 def payment_product_id @payment_product_id end |
#sepa_direct_debit ⇒ Object
31 32 33 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 31 def sepa_direct_debit @sepa_direct_debit end |
Instance Method Details
#from_hash(hash) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 43 def from_hash(hash) super if hash.has_key?('card') if !(hash['card'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['card']] end @card = Ingenico::Connect::SDK::Domain::Token::TokenCard.new_from_hash(hash['card']) end if hash.has_key?('eWallet') if !(hash['eWallet'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['eWallet']] end @e_wallet = Ingenico::Connect::SDK::Domain::Token::TokenEWallet.new_from_hash(hash['eWallet']) end if hash.has_key?('nonSepaDirectDebit') if !(hash['nonSepaDirectDebit'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['nonSepaDirectDebit']] end @non_sepa_direct_debit = Ingenico::Connect::SDK::Domain::Token::TokenNonSepaDirectDebit.new_from_hash(hash['nonSepaDirectDebit']) end if hash.has_key?('paymentProductId') @payment_product_id = hash['paymentProductId'] end if hash.has_key?('sepaDirectDebit') if !(hash['sepaDirectDebit'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebit']] end @sepa_direct_debit = Ingenico::Connect::SDK::Domain::Token::TokenSepaDirectDebitWithoutCreditor.new_from_hash(hash['sepaDirectDebit']) end end |
#to_h ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 33 def to_h hash = super add_to_hash(hash, 'card', @card) add_to_hash(hash, 'eWallet', @e_wallet) add_to_hash(hash, 'nonSepaDirectDebit', @non_sepa_direct_debit) add_to_hash(hash, 'paymentProductId', @payment_product_id) add_to_hash(hash, 'sepaDirectDebit', @sepa_direct_debit) hash end |