Class: Ingenico::Direct::SDK::Domain::HostedCheckoutSpecificInput
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::HostedCheckoutSpecificInput
- Defined in:
- lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb
Instance Attribute Summary collapse
-
#card_payment_method_specific_input ⇒ Ingenico::Direct::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout
The current value of card_payment_method_specific_input.
-
#is_recurring ⇒ true/false
The current value of is_recurring.
-
#locale ⇒ String
The current value of locale.
-
#payment_product_filters ⇒ Ingenico::Direct::SDK::Domain::PaymentProductFiltersHostedCheckout
The current value of payment_product_filters.
-
#return_url ⇒ String
The current value of return_url.
-
#show_result_page ⇒ true/false
The current value of show_result_page.
-
#tokens ⇒ String
The current value of tokens.
-
#variant ⇒ String
The current value of variant.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#card_payment_method_specific_input ⇒ Ingenico::Direct::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout
Returns the current value of card_payment_method_specific_input.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb', line 20 def card_payment_method_specific_input @card_payment_method_specific_input end |
#is_recurring ⇒ true/false
Returns the current value of is_recurring.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb', line 20 def is_recurring @is_recurring end |
#locale ⇒ String
Returns the current value of locale.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb', line 20 def locale @locale end |
#payment_product_filters ⇒ Ingenico::Direct::SDK::Domain::PaymentProductFiltersHostedCheckout
Returns the current value of payment_product_filters.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb', line 20 def payment_product_filters @payment_product_filters end |
#return_url ⇒ String
Returns the current value of return_url.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb', line 20 def return_url @return_url end |
#show_result_page ⇒ true/false
Returns the current value of show_result_page.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb', line 20 def show_result_page @show_result_page end |
#tokens ⇒ String
Returns the current value of tokens.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb', line 20 def tokens @tokens end |
#variant ⇒ String
Returns the current value of variant.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb', line 20 def variant @variant 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 |
# File 'lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb', line 44 def from_hash(hash) super if hash.key? 'cardPaymentMethodSpecificInput' raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificInput']] unless hash['cardPaymentMethodSpecificInput'].is_a? Hash @card_payment_method_specific_input = Ingenico::Direct::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout.new_from_hash(hash['cardPaymentMethodSpecificInput']) end @is_recurring = hash['isRecurring'] if hash.key? 'isRecurring' @locale = hash['locale'] if hash.key? 'locale' if hash.key? 'paymentProductFilters' raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductFilters']] unless hash['paymentProductFilters'].is_a? Hash @payment_product_filters = Ingenico::Direct::SDK::Domain::PaymentProductFiltersHostedCheckout.new_from_hash(hash['paymentProductFilters']) end @return_url = hash['returnUrl'] if hash.key? 'returnUrl' @show_result_page = hash['showResultPage'] if hash.key? 'showResultPage' @tokens = hash['tokens'] if hash.key? 'tokens' @variant = hash['variant'] if hash.key? 'variant' end |
#to_h ⇒ Hash
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb', line 31 def to_h hash = super hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h if @card_payment_method_specific_input hash['isRecurring'] = @is_recurring unless @is_recurring.nil? hash['locale'] = @locale unless @locale.nil? hash['paymentProductFilters'] = @payment_product_filters.to_h if @payment_product_filters hash['returnUrl'] = @return_url unless @return_url.nil? hash['showResultPage'] = @show_result_page unless @show_result_page.nil? hash['tokens'] = @tokens unless @tokens.nil? hash['variant'] = @variant unless @variant.nil? hash end |