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



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 25

def authorisation_code
  @authorisation_code
end

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

Returns the current value of fraud_results.

Returns:



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 25

def fraud_results
  @fraud_results
end

#initial_scheme_transaction_idString

Returns the current value of initial_scheme_transaction_id.

Returns:

  • (String)

    the current value of initial_scheme_transaction_id



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 25

def initial_scheme_transaction_id
  @initial_scheme_transaction_id
end

#networkString

Returns the current value of network.

Returns:

  • (String)

    the current value of network



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 25

def network
  @network
end

Returns the current value of original_transaction_link_id.

Returns:

  • (String)

    the current value of original_transaction_link_id



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 25

def original_transaction_link_id
  @original_transaction_link_id
end

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

Returns the current value of payment_data.

Returns:



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 25

def payment_data
  @payment_data
end

#scheme_transaction_idString

Returns the current value of scheme_transaction_id.

Returns:

  • (String)

    the current value of scheme_transaction_id



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 25

def scheme_transaction_id
  @scheme_transaction_id
end

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

Returns the current value of three_d_secure_results.

Returns:



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 25

def three_d_secure_results
  @three_d_secure_results
end

#tokenString

Returns the current value of token.

Returns:

  • (String)

    the current value of token



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 25

def token
  @token
end

Returns the current value of transaction_link_id.

Returns:

  • (String)

    the current value of transaction_link_id



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 25

def transaction_link_id
  @transaction_link_id
end

Instance Method Details

#from_hash(hash) ⇒ Object



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_output.rb', line 63

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? 'initialSchemeTransactionId'
    @initial_scheme_transaction_id = hash['initialSchemeTransactionId']
  end
  if hash.has_key? 'network'
    @network = hash['network']
  end
  if hash.has_key? 'originalTransactionLinkId'
    @original_transaction_link_id = hash['originalTransactionLinkId']
  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? 'schemeTransactionId'
    @scheme_transaction_id = hash['schemeTransactionId']
  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
  if hash.has_key? 'token'
    @token = hash['token']
  end
  if hash.has_key? 'transactionLinkId'
    @transaction_link_id = hash['transactionLinkId']
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
  hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
  hash['network'] = @network unless @network.nil?
  hash['originalTransactionLinkId'] = @original_transaction_link_id unless @original_transaction_link_id.nil?
  hash['paymentData'] = @payment_data.to_h unless @payment_data.nil?
  hash['schemeTransactionId'] = @scheme_transaction_id unless @scheme_transaction_id.nil?
  hash['threeDSecureResults'] = @three_d_secure_results.to_h unless @three_d_secure_results.nil?
  hash['token'] = @token unless @token.nil?
  hash['transactionLinkId'] = @transaction_link_id unless @transaction_link_id.nil?
  hash
end