Class: Ingenico::Connect::SDK::Domain::Payment::MobilePaymentMethodSpecificInput

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

Overview

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



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

def authorization_mode
  @authorization_mode
end

#decrypted_payment_dataObject



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

def decrypted_payment_data
  @decrypted_payment_data
end

#encrypted_payment_dataObject

String



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

def encrypted_payment_data
  @encrypted_payment_data
end

#payment_product320_specific_inputObject



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

def payment_product320_specific_input
  @payment_product320_specific_input
end

#requires_approvalObject

true/false



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

def requires_approval
  @requires_approval
end

#skip_fraud_serviceObject

true/false



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

def skip_fraud_service
  @skip_fraud_service
end

#transaction_idObject

String



35
36
37
# File 'lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_input.rb', line 35

def transaction_id
  @transaction_id
end

Instance Method Details

#from_hash(hash) ⇒ Object



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_input.rb', line 49

def from_hash(hash)
  super
  if hash.has_key?('authorizationMode')
    @authorization_mode = hash['authorizationMode']
  end
  if hash.has_key?('decryptedPaymentData')
    if !(hash['decryptedPaymentData'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['decryptedPaymentData']]
    end
    @decrypted_payment_data = Ingenico::Connect::SDK::Domain::Payment::DecryptedPaymentData.new_from_hash(hash['decryptedPaymentData'])
  end
  if hash.has_key?('encryptedPaymentData')
    @encrypted_payment_data = hash['encryptedPaymentData']
  end
  if hash.has_key?('paymentProduct320SpecificInput')
    if !(hash['paymentProduct320SpecificInput'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificInput']]
    end
    @payment_product320_specific_input = Ingenico::Connect::SDK::Domain::Payment::MobilePaymentProduct320SpecificInput.new_from_hash(hash['paymentProduct320SpecificInput'])
  end
  if hash.has_key?('requiresApproval')
    @requires_approval = hash['requiresApproval']
  end
  if hash.has_key?('skipFraudService')
    @skip_fraud_service = hash['skipFraudService']
  end
  if hash.has_key?('transactionId')
    @transaction_id = hash['transactionId']
  end
end

#to_hObject



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_input.rb', line 37

def to_h
  hash = super
  add_to_hash(hash, 'authorizationMode', @authorization_mode)
  add_to_hash(hash, 'decryptedPaymentData', @decrypted_payment_data)
  add_to_hash(hash, 'encryptedPaymentData', @encrypted_payment_data)
  add_to_hash(hash, 'paymentProduct320SpecificInput', @payment_product320_specific_input)
  add_to_hash(hash, 'requiresApproval', @requires_approval)
  add_to_hash(hash, 'skipFraudService', @skip_fraud_service)
  add_to_hash(hash, 'transactionId', @transaction_id)
  hash
end