Class: OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificOutput

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#authorisation_codeString

Returns the current value of authorisation_code.

Returns:

  • (String)

    the current value of authorisation_code



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

def authorisation_code
  @authorisation_code
end

#customer_bank_accountOnlinePayments::SDK::Domain::CustomerBankAccount

Returns the current value of customer_bank_account.

Returns:



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

def 
  @customer_bank_account
end

#fraud_resultsOnlinePayments::SDK::Domain::FraudResults

Returns the current value of fraud_results.

Returns:



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

def fraud_results
  @fraud_results
end

#payment_method3204_specific_outputOnlinePayments::SDK::Domain::PaymentProduct3204SpecificOutput

Returns the current value of payment_method3204_specific_output.

Returns:



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

def payment_method3204_specific_output
  @payment_method3204_specific_output
end

#payment_optionString

Returns the current value of payment_option.

Returns:

  • (String)

    the current value of payment_option



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

def payment_option
  @payment_option
end

#payment_product3203_specific_outputOnlinePayments::SDK::Domain::PaymentProduct3203SpecificOutput

Returns the current value of payment_product3203_specific_output.

Returns:



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

def payment_product3203_specific_output
  @payment_product3203_specific_output
end

#payment_product5001_specific_outputOnlinePayments::SDK::Domain::PaymentProduct5001SpecificOutput

Returns the current value of payment_product5001_specific_output.

Returns:



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

def payment_product5001_specific_output
  @payment_product5001_specific_output
end

#payment_product5402_specific_outputOnlinePayments::SDK::Domain::PaymentProduct5402SpecificOutput

Returns the current value of payment_product5402_specific_output.

Returns:



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

def payment_product5402_specific_output
  @payment_product5402_specific_output
end

#payment_product5500_specific_outputOnlinePayments::SDK::Domain::PaymentProduct5500SpecificOutput

Returns the current value of payment_product5500_specific_output.

Returns:



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

def payment_product5500_specific_output
  @payment_product5500_specific_output
end

#payment_product840_specific_outputOnlinePayments::SDK::Domain::PaymentProduct840SpecificOutput

Returns the current value of payment_product840_specific_output.

Returns:



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

def payment_product840_specific_output
  @payment_product840_specific_output
end

#payment_product_idInteger

Returns the current value of payment_product_id.

Returns:

  • (Integer)

    the current value of payment_product_id



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

def payment_product_id
  @payment_product_id
end

#tokenString

Returns the current value of token.

Returns:

  • (String)

    the current value of token



29
30
31
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 29

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
116
117
118
119
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 73

def from_hash(hash)
  super
  if hash.has_key? 'authorisationCode'
    @authorisation_code = hash['authorisationCode']
  end
  if hash.has_key? 'customerBankAccount'
    raise TypeError, "value '%s' is not a Hash" % [hash['customerBankAccount']] unless hash['customerBankAccount'].is_a? Hash
    @customer_bank_account = OnlinePayments::SDK::Domain::CustomerBankAccount.new_from_hash(hash['customerBankAccount'])
  end
  if hash.has_key? 'fraudResults'
    raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash
    @fraud_results = OnlinePayments::SDK::Domain::FraudResults.new_from_hash(hash['fraudResults'])
  end
  if hash.has_key? 'paymentMethod3204SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentMethod3204SpecificOutput']] unless hash['paymentMethod3204SpecificOutput'].is_a? Hash
    @payment_method3204_specific_output = OnlinePayments::SDK::Domain::PaymentProduct3204SpecificOutput.new_from_hash(hash['paymentMethod3204SpecificOutput'])
  end
  if hash.has_key? 'paymentOption'
    @payment_option = hash['paymentOption']
  end
  if hash.has_key? 'paymentProduct3203SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3203SpecificOutput']] unless hash['paymentProduct3203SpecificOutput'].is_a? Hash
    @payment_product3203_specific_output = OnlinePayments::SDK::Domain::PaymentProduct3203SpecificOutput.new_from_hash(hash['paymentProduct3203SpecificOutput'])
  end
  if hash.has_key? 'paymentProduct5001SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5001SpecificOutput']] unless hash['paymentProduct5001SpecificOutput'].is_a? Hash
    @payment_product5001_specific_output = OnlinePayments::SDK::Domain::PaymentProduct5001SpecificOutput.new_from_hash(hash['paymentProduct5001SpecificOutput'])
  end
  if hash.has_key? 'paymentProduct5402SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5402SpecificOutput']] unless hash['paymentProduct5402SpecificOutput'].is_a? Hash
    @payment_product5402_specific_output = OnlinePayments::SDK::Domain::PaymentProduct5402SpecificOutput.new_from_hash(hash['paymentProduct5402SpecificOutput'])
  end
  if hash.has_key? 'paymentProduct5500SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5500SpecificOutput']] unless hash['paymentProduct5500SpecificOutput'].is_a? Hash
    @payment_product5500_specific_output = OnlinePayments::SDK::Domain::PaymentProduct5500SpecificOutput.new_from_hash(hash['paymentProduct5500SpecificOutput'])
  end
  if hash.has_key? 'paymentProduct840SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct840SpecificOutput']] unless hash['paymentProduct840SpecificOutput'].is_a? Hash
    @payment_product840_specific_output = OnlinePayments::SDK::Domain::PaymentProduct840SpecificOutput.new_from_hash(hash['paymentProduct840SpecificOutput'])
  end
  if hash.has_key? 'paymentProductId'
    @payment_product_id = hash['paymentProductId']
  end
  if hash.has_key? 'token'
    @token = hash['token']
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
  hash['customerBankAccount'] = @customer_bank_account.to_h unless @customer_bank_account.nil?
  hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
  hash['paymentMethod3204SpecificOutput'] = @payment_method3204_specific_output.to_h unless @payment_method3204_specific_output.nil?
  hash['paymentOption'] = @payment_option unless @payment_option.nil?
  hash['paymentProduct3203SpecificOutput'] = @payment_product3203_specific_output.to_h unless @payment_product3203_specific_output.nil?
  hash['paymentProduct5001SpecificOutput'] = @payment_product5001_specific_output.to_h unless @payment_product5001_specific_output.nil?
  hash['paymentProduct5402SpecificOutput'] = @payment_product5402_specific_output.to_h unless @payment_product5402_specific_output.nil?
  hash['paymentProduct5500SpecificOutput'] = @payment_product5500_specific_output.to_h unless @payment_product5500_specific_output.nil?
  hash['paymentProduct840SpecificOutput'] = @payment_product840_specific_output.to_h unless @payment_product840_specific_output.nil?
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
  hash['token'] = @token unless @token.nil?
  hash
end