Class: Worldline::Connect::SDK::V1::Domain::MobilePaymentMethodSpecificOutput

Inherits:
AbstractPaymentMethodSpecificOutput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractPaymentMethodSpecificOutput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#authorisation_codeString

Returns the current value of authorisation_code.

Returns:

  • (String)

    the current value of authorisation_code



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 20

def authorisation_code
  @authorisation_code
end

#fraud_resultsWorldline::Connect::SDK::V1::Domain::CardFraudResults

Returns the current value of fraud_results.

Returns:



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 20

def fraud_results
  @fraud_results
end

#networkString

Returns the current value of network.

Returns:

  • (String)

    the current value of network



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 20

def network
  @network
end

#payment_dataWorldline::Connect::SDK::V1::Domain::MobilePaymentData

Returns the current value of payment_data.

Returns:



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 20

def payment_data
  @payment_data
end

#three_d_secure_resultsWorldline::Connect::SDK::V1::Domain::ThreeDSecureResults

Returns the current value of three_d_secure_results.

Returns:



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 20

def three_d_secure_results
  @three_d_secure_results
end

Instance Method Details

#from_hash(hash) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 43

def from_hash(hash)
  super
  if hash.has_key? 'authorisationCode'
    @authorisation_code = hash['authorisationCode']
  end
  if hash.has_key? 'fraudResults'
    raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash
    @fraud_results = Worldline::Connect::SDK::V1::Domain::CardFraudResults.new_from_hash(hash['fraudResults'])
  end
  if hash.has_key? 'network'
    @network = hash['network']
  end
  if hash.has_key? 'paymentData'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentData']] unless hash['paymentData'].is_a? Hash
    @payment_data = Worldline::Connect::SDK::V1::Domain::MobilePaymentData.new_from_hash(hash['paymentData'])
  end
  if hash.has_key? 'threeDSecureResults'
    raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecureResults']] unless hash['threeDSecureResults'].is_a? Hash
    @three_d_secure_results = Worldline::Connect::SDK::V1::Domain::ThreeDSecureResults.new_from_hash(hash['threeDSecureResults'])
  end
end

#to_hHash

Returns:

  • (Hash)


33
34
35
36
37
38
39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 33

def to_h
  hash = super
  hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
  hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
  hash['network'] = @network unless @network.nil?
  hash['paymentData'] = @payment_data.to_h unless @payment_data.nil?
  hash['threeDSecureResults'] = @three_d_secure_results.to_h unless @three_d_secure_results.nil?
  hash
end