Class: Worldline::Connect::SDK::V1::Domain::UpdateTokenRequest
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::UpdateTokenRequest
- Defined in:
- lib/worldline/connect/sdk/v1/domain/update_token_request.rb
Instance Attribute Summary collapse
-
#card ⇒ Worldline::Connect::SDK::V1::Domain::TokenCard
The current value of card.
-
#e_wallet ⇒ Worldline::Connect::SDK::V1::Domain::TokenEWallet
The current value of e_wallet.
-
#non_sepa_direct_debit ⇒ Worldline::Connect::SDK::V1::Domain::TokenNonSepaDirectDebit
The current value of non_sepa_direct_debit.
-
#payment_product_id ⇒ Integer
The current value of payment_product_id.
-
#sepa_direct_debit ⇒ Worldline::Connect::SDK::V1::Domain::TokenSepaDirectDebitWithoutCreditor
The current value of sepa_direct_debit.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#card ⇒ Worldline::Connect::SDK::V1::Domain::TokenCard
Returns the current value of card.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/update_token_request.rb', line 21 def card @card end |
#e_wallet ⇒ Worldline::Connect::SDK::V1::Domain::TokenEWallet
Returns the current value of e_wallet.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/update_token_request.rb', line 21 def e_wallet @e_wallet end |
#non_sepa_direct_debit ⇒ Worldline::Connect::SDK::V1::Domain::TokenNonSepaDirectDebit
Returns the current value of non_sepa_direct_debit.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/update_token_request.rb', line 21 def non_sepa_direct_debit @non_sepa_direct_debit end |
#payment_product_id ⇒ Integer
Returns the current value of payment_product_id.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/update_token_request.rb', line 21 def payment_product_id @payment_product_id end |
#sepa_direct_debit ⇒ Worldline::Connect::SDK::V1::Domain::TokenSepaDirectDebitWithoutCreditor
Returns the current value of sepa_direct_debit.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/update_token_request.rb', line 21 def sepa_direct_debit @sepa_direct_debit end |
Instance Method Details
#from_hash(hash) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/worldline/connect/sdk/v1/domain/update_token_request.rb', line 44 def from_hash(hash) super if hash.has_key? 'card' raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash @card = Worldline::Connect::SDK::V1::Domain::TokenCard.new_from_hash(hash['card']) end if hash.has_key? 'eWallet' raise TypeError, "value '%s' is not a Hash" % [hash['eWallet']] unless hash['eWallet'].is_a? Hash @e_wallet = Worldline::Connect::SDK::V1::Domain::TokenEWallet.new_from_hash(hash['eWallet']) end if hash.has_key? 'nonSepaDirectDebit' raise TypeError, "value '%s' is not a Hash" % [hash['nonSepaDirectDebit']] unless hash['nonSepaDirectDebit'].is_a? Hash @non_sepa_direct_debit = Worldline::Connect::SDK::V1::Domain::TokenNonSepaDirectDebit.new_from_hash(hash['nonSepaDirectDebit']) end if hash.has_key? 'paymentProductId' @payment_product_id = hash['paymentProductId'] end if hash.has_key? 'sepaDirectDebit' raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebit']] unless hash['sepaDirectDebit'].is_a? Hash @sepa_direct_debit = Worldline::Connect::SDK::V1::Domain::TokenSepaDirectDebitWithoutCreditor.new_from_hash(hash['sepaDirectDebit']) end end |
#to_h ⇒ Hash
34 35 36 37 38 39 40 41 42 |
# File 'lib/worldline/connect/sdk/v1/domain/update_token_request.rb', line 34 def to_h hash = super hash['card'] = @card.to_h unless @card.nil? hash['eWallet'] = @e_wallet.to_h unless @e_wallet.nil? hash['nonSepaDirectDebit'] = @non_sepa_direct_debit.to_h unless @non_sepa_direct_debit.nil? hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil? hash['sepaDirectDebit'] = @sepa_direct_debit.to_h unless @sepa_direct_debit.nil? hash end |