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
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
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 18 def card @card end |
#e_wallet ⇒ Object
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 21 def e_wallet @e_wallet end |
#non_sepa_direct_debit ⇒ Object
24 25 26 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 24 def non_sepa_direct_debit @non_sepa_direct_debit end |
#payment_product_id ⇒ Object
Integer
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 27 def payment_product_id @payment_product_id end |
#sepa_direct_debit ⇒ Object
30 31 32 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 30 def sepa_direct_debit @sepa_direct_debit 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 63 64 65 66 67 68 69 70 71 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 42 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
32 33 34 35 36 37 38 39 40 |
# File 'lib/ingenico/connect/sdk/domain/token/update_token_request.rb', line 32 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 |