Class: Ingenico::Connect::SDK::Domain::Payment::CardPaymentMethodSpecificInput
Instance Attribute Summary collapse
#authorization_mode, #customer_reference, #recurring_payment_sequence_indicator, #requires_approval, #skip_authentication, #skip_fraud_service, #token, #tokenize, #transaction_channel
#payment_product_id
Instance Method Summary
collapse
new_from_hash
Instance Attribute Details
#card ⇒ Object
16
17
18
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 16
def card
@card
end
|
#external_cardholder_authentication_data ⇒ Object
19
20
21
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 19
def external_cardholder_authentication_data
@external_cardholder_authentication_data
end
|
#is_recurring ⇒ Object
22
23
24
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 22
def is_recurring
@is_recurring
end
|
#return_url ⇒ Object
25
26
27
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 25
def return_url
@return_url
end
|
Instance Method Details
#from_hash(hash) ⇒ Object
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 36
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::Definitions::Card.new_from_hash(hash['card'])
end
if hash.has_key?('externalCardholderAuthenticationData')
if !(hash['externalCardholderAuthenticationData'].is_a? Hash)
raise TypeError, "value '%s' is not a Hash" % [hash['externalCardholderAuthenticationData']]
end
@external_cardholder_authentication_data = Ingenico::Connect::SDK::Domain::Payment::ExternalCardholderAuthenticationData.new_from_hash(hash['externalCardholderAuthenticationData'])
end
if hash.has_key?('isRecurring')
@is_recurring = hash['isRecurring']
end
if hash.has_key?('returnUrl')
@return_url = hash['returnUrl']
end
end
|
#to_h ⇒ Object
27
28
29
30
31
32
33
34
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 27
def to_h
hash = super
add_to_hash(hash, 'card', @card)
add_to_hash(hash, 'externalCardholderAuthenticationData', @external_cardholder_authentication_data)
add_to_hash(hash, 'isRecurring', @is_recurring)
add_to_hash(hash, 'returnUrl', @return_url)
hash
end
|