Class: Worldline::Connect::SDK::V1::Domain::CreateTokenRequest
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::CreateTokenRequest
- Defined in:
- lib/worldline/connect/sdk/v1/domain/create_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.
-
#encrypted_customer_input ⇒ String
The current value of encrypted_customer_input.
-
#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.
22 23 24 |
# File 'lib/worldline/connect/sdk/v1/domain/create_token_request.rb', line 22 def card @card end |
#e_wallet ⇒ Worldline::Connect::SDK::V1::Domain::TokenEWallet
Returns the current value of e_wallet.
22 23 24 |
# File 'lib/worldline/connect/sdk/v1/domain/create_token_request.rb', line 22 def e_wallet @e_wallet end |
#encrypted_customer_input ⇒ String
Returns the current value of encrypted_customer_input.
22 23 24 |
# File 'lib/worldline/connect/sdk/v1/domain/create_token_request.rb', line 22 def encrypted_customer_input @encrypted_customer_input end |
#non_sepa_direct_debit ⇒ Worldline::Connect::SDK::V1::Domain::TokenNonSepaDirectDebit
Returns the current value of non_sepa_direct_debit.
22 23 24 |
# File 'lib/worldline/connect/sdk/v1/domain/create_token_request.rb', line 22 def non_sepa_direct_debit @non_sepa_direct_debit end |
#payment_product_id ⇒ Integer
Returns the current value of payment_product_id.
22 23 24 |
# File 'lib/worldline/connect/sdk/v1/domain/create_token_request.rb', line 22 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.
22 23 24 |
# File 'lib/worldline/connect/sdk/v1/domain/create_token_request.rb', line 22 def sepa_direct_debit @sepa_direct_debit end |
Instance Method Details
#from_hash(hash) ⇒ Object
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/worldline/connect/sdk/v1/domain/create_token_request.rb', line 48 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? 'encryptedCustomerInput' @encrypted_customer_input = hash['encryptedCustomerInput'] 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
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/worldline/connect/sdk/v1/domain/create_token_request.rb', line 37 def to_h hash = super hash['card'] = @card.to_h unless @card.nil? hash['eWallet'] = @e_wallet.to_h unless @e_wallet.nil? hash['encryptedCustomerInput'] = @encrypted_customer_input unless @encrypted_customer_input.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 |