Class: OnlinePayments::SDK::Domain::CardPaymentMethodSpecificOutput

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#acquirer_informationOnlinePayments::SDK::Domain::AcquirerInformation

Returns the current value of acquirer_information.

Returns:



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def acquirer_information
  @acquirer_information
end

#authenticated_amountLong

Returns the current value of authenticated_amount.

Returns:

  • (Long)

    the current value of authenticated_amount



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def authenticated_amount
  @authenticated_amount
end

#authorisation_codeString

Returns the current value of authorisation_code.

Returns:

  • (String)

    the current value of authorisation_code



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def authorisation_code
  @authorisation_code
end

#cardOnlinePayments::SDK::Domain::CardEssentials

Returns the current value of card.

Returns:



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def card
  @card
end

#currency_conversionOnlinePayments::SDK::Domain::CurrencyConversion

Returns the current value of currency_conversion.

Returns:



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def currency_conversion
  @currency_conversion
end

#external_token_linkedOnlinePayments::SDK::Domain::ExternalTokenLinked

Returns the current value of external_token_linked.

Returns:



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def external_token_linked
  @external_token_linked
end

#fraud_resultsOnlinePayments::SDK::Domain::CardFraudResults

Returns the current value of fraud_results.

Returns:



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

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



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def initial_scheme_transaction_id
  @initial_scheme_transaction_id
end

#payment_account_referenceString

Returns the current value of payment_account_reference.

Returns:

  • (String)

    the current value of payment_account_reference



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def 
  @payment_account_reference
end

#payment_optionString

Returns the current value of payment_option.

Returns:

  • (String)

    the current value of payment_option



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def payment_option
  @payment_option
end

#payment_product3208_specific_outputOnlinePayments::SDK::Domain::PaymentProduct3208SpecificOutput

Returns the current value of payment_product3208_specific_output.

Returns:



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def payment_product3208_specific_output
  @payment_product3208_specific_output
end

#payment_product3209_specific_outputOnlinePayments::SDK::Domain::PaymentProduct3209SpecificOutput

Returns the current value of payment_product3209_specific_output.

Returns:



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def payment_product3209_specific_output
  @payment_product3209_specific_output
end

#payment_product_idInteger

Returns the current value of payment_product_id.

Returns:

  • (Integer)

    the current value of payment_product_id



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def payment_product_id
  @payment_product_id
end

#scheme_reference_dataString

Returns the current value of scheme_reference_data.

Returns:

  • (String)

    the current value of scheme_reference_data



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def scheme_reference_data
  @scheme_reference_data
end

#three_d_secure_resultsOnlinePayments::SDK::Domain::ThreeDSecureResults

Returns the current value of three_d_secure_results.

Returns:



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def three_d_secure_results
  @three_d_secure_results
end

#tokenString

Returns the current value of token.

Returns:

  • (String)

    the current value of token



33
34
35
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 33

def token
  @token
end

Instance Method Details

#from_hash(hash) ⇒ Object



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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 73

def from_hash(hash)
  super
  if hash.key? 'acquirerInformation'
    raise TypeError, "value '%s' is not a Hash" % [hash['acquirerInformation']] unless hash['acquirerInformation'].is_a? Hash
    @acquirer_information = OnlinePayments::SDK::Domain::AcquirerInformation.new_from_hash(hash['acquirerInformation'])
  end
  @authenticated_amount = hash['authenticatedAmount'] if hash.key? 'authenticatedAmount'
  @authorisation_code = hash['authorisationCode'] if hash.key? 'authorisationCode'
  if hash.key? 'card'
    raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
    @card = OnlinePayments::SDK::Domain::CardEssentials.new_from_hash(hash['card'])
  end
  if hash.key? 'currencyConversion'
    raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
    @currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversion.new_from_hash(hash['currencyConversion'])
  end
  if hash.key? 'externalTokenLinked'
    raise TypeError, "value '%s' is not a Hash" % [hash['externalTokenLinked']] unless hash['externalTokenLinked'].is_a? Hash
    @external_token_linked = OnlinePayments::SDK::Domain::ExternalTokenLinked.new_from_hash(hash['externalTokenLinked'])
  end
  if hash.key? 'fraudResults'
    raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash
    @fraud_results = OnlinePayments::SDK::Domain::CardFraudResults.new_from_hash(hash['fraudResults'])
  end
  @initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
  @payment_account_reference = hash['paymentAccountReference'] if hash.key? 'paymentAccountReference'
  @payment_option = hash['paymentOption'] if hash.key? 'paymentOption'
  if hash.key? 'paymentProduct3208SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3208SpecificOutput']] unless hash['paymentProduct3208SpecificOutput'].is_a? Hash
    @payment_product3208_specific_output = OnlinePayments::SDK::Domain::PaymentProduct3208SpecificOutput.new_from_hash(hash['paymentProduct3208SpecificOutput'])
  end
  if hash.key? 'paymentProduct3209SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3209SpecificOutput']] unless hash['paymentProduct3209SpecificOutput'].is_a? Hash
    @payment_product3209_specific_output = OnlinePayments::SDK::Domain::PaymentProduct3209SpecificOutput.new_from_hash(hash['paymentProduct3209SpecificOutput'])
  end
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
  @scheme_reference_data = hash['schemeReferenceData'] if hash.key? 'schemeReferenceData'
  if hash.key? 'threeDSecureResults'
    raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecureResults']] unless hash['threeDSecureResults'].is_a? Hash
    @three_d_secure_results = OnlinePayments::SDK::Domain::ThreeDSecureResults.new_from_hash(hash['threeDSecureResults'])
  end
  @token = hash['token'] if hash.key? 'token'
end

#to_hHash

Returns:

  • (Hash)


52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb', line 52

def to_h
  hash = super
  hash['acquirerInformation'] = @acquirer_information.to_h if @acquirer_information
  hash['authenticatedAmount'] = @authenticated_amount unless @authenticated_amount.nil?
  hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
  hash['card'] = @card.to_h if @card
  hash['currencyConversion'] = @currency_conversion.to_h if @currency_conversion
  hash['externalTokenLinked'] = @external_token_linked.to_h if @external_token_linked
  hash['fraudResults'] = @fraud_results.to_h if @fraud_results
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
  hash['paymentAccountReference'] = @payment_account_reference unless @payment_account_reference.nil?
  hash['paymentOption'] = @payment_option unless @payment_option.nil?
  hash['paymentProduct3208SpecificOutput'] = @payment_product3208_specific_output.to_h if @payment_product3208_specific_output
  hash['paymentProduct3209SpecificOutput'] = @payment_product3209_specific_output.to_h if @payment_product3209_specific_output
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
  hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
  hash['threeDSecureResults'] = @three_d_secure_results.to_h if @three_d_secure_results
  hash['token'] = @token unless @token.nil?
  hash
end