Class: Ingenico::Connect::SDK::Domain::Payment::CardPaymentMethodSpecificInputBase

Inherits:
Definitions::AbstractPaymentMethodSpecificInput show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb

Overview

Direct Known Subclasses

CardPaymentMethodSpecificInput

Instance Attribute Summary collapse

Attributes inherited from Definitions::AbstractPaymentMethodSpecificInput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#authorization_modeObject

String



15
16
17
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb', line 15

def authorization_mode
  @authorization_mode
end

#customer_referenceObject

String



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb', line 18

def customer_reference
  @customer_reference
end

#recurring_payment_sequence_indicatorObject

String



21
22
23
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb', line 21

def recurring_payment_sequence_indicator
  @recurring_payment_sequence_indicator
end

#requires_approvalObject

true/false



24
25
26
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb', line 24

def requires_approval
  @requires_approval
end

#skip_authenticationObject

true/false



27
28
29
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb', line 27

def skip_authentication
  @skip_authentication
end

#skip_fraud_serviceObject

true/false



30
31
32
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb', line 30

def skip_fraud_service
  @skip_fraud_service
end

#tokenObject

String



33
34
35
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb', line 33

def token
  @token
end

Instance Method Details

#from_hash(hash) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb', line 47

def from_hash(hash)
  super
  if hash.has_key?('authorizationMode')
    @authorization_mode = hash['authorizationMode']
  end
  if hash.has_key?('customerReference')
    @customer_reference = hash['customerReference']
  end
  if hash.has_key?('recurringPaymentSequenceIndicator')
    @recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
  end
  if hash.has_key?('requiresApproval')
    @requires_approval = hash['requiresApproval']
  end
  if hash.has_key?('skipAuthentication')
    @skip_authentication = hash['skipAuthentication']
  end
  if hash.has_key?('skipFraudService')
    @skip_fraud_service = hash['skipFraudService']
  end
  if hash.has_key?('token')
    @token = hash['token']
  end
end

#to_hObject



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb', line 35

def to_h
  hash = super
  add_to_hash(hash, 'authorizationMode', @authorization_mode)
  add_to_hash(hash, 'customerReference', @customer_reference)
  add_to_hash(hash, 'recurringPaymentSequenceIndicator', @recurring_payment_sequence_indicator)
  add_to_hash(hash, 'requiresApproval', @requires_approval)
  add_to_hash(hash, 'skipAuthentication', @skip_authentication)
  add_to_hash(hash, 'skipFraudService', @skip_fraud_service)
  add_to_hash(hash, 'token', @token)
  hash
end