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

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



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

def authorization_mode
  @authorization_mode
end

#decrypted_payment_dataObject



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

def decrypted_payment_data
  @decrypted_payment_data
end

#encrypted_payment_dataObject

String



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

def encrypted_payment_data
  @encrypted_payment_data
end

#payment_product320_specific_inputObject



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

def payment_product320_specific_input
  @payment_product320_specific_input
end

#requires_approvalObject

true/false



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

def requires_approval
  @requires_approval
end

#skip_fraud_serviceObject

true/false



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

def skip_fraud_service
  @skip_fraud_service
end

#transaction_idObject

String



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

def transaction_id
  @transaction_id
end

Instance Method Details

#from_hash(hash) ⇒ Object



48
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
# File 'lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_input.rb', line 48

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



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

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