Class: Ingenico::Connect::SDK::Domain::Payment::CardPaymentMethodSpecificInput
Overview
Instance Attribute Summary collapse
#authorization_mode, #customer_reference, #recurring_payment_sequence_indicator, #requires_approval, #skip_authentication, #skip_fraud_service, #token
#payment_product_id
Instance Method Summary
collapse
new_from_hash
Instance Attribute Details
#card ⇒ Object
17
18
19
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 17
def card
@card
end
|
#external_cardholder_authentication_data ⇒ Object
20
21
22
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 20
def external_cardholder_authentication_data
@external_cardholder_authentication_data
end
|
#is_recurring ⇒ Object
23
24
25
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 23
def is_recurring
@is_recurring
end
|
#return_url ⇒ Object
26
27
28
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 26
def return_url
@return_url
end
|
Instance Method Details
#from_hash(hash) ⇒ Object
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 37
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
28
29
30
31
32
33
34
35
|
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb', line 28
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
|