Class: OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificOutput
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificOutput
- Defined in:
- lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb
Instance Attribute Summary collapse
-
#authorisation_code ⇒ String
The current value of authorisation_code.
-
#customer_bank_account ⇒ OnlinePayments::SDK::Domain::CustomerBankAccount
The current value of customer_bank_account.
-
#fraud_results ⇒ OnlinePayments::SDK::Domain::FraudResults
The current value of fraud_results.
-
#payment_option ⇒ String
The current value of payment_option.
-
#payment_product5001_specific_output ⇒ OnlinePayments::SDK::Domain::PaymentProduct5001SpecificOutput
The current value of payment_product5001_specific_output.
-
#payment_product5402_specific_output ⇒ OnlinePayments::SDK::Domain::PaymentProduct5402SpecificOutput
The current value of payment_product5402_specific_output.
-
#payment_product5500_specific_output ⇒ OnlinePayments::SDK::Domain::PaymentProduct5500SpecificOutput
The current value of payment_product5500_specific_output.
-
#payment_product840_specific_output ⇒ OnlinePayments::SDK::Domain::PaymentProduct840SpecificOutput
The current value of payment_product840_specific_output.
-
#payment_product_id ⇒ Integer
The current value of payment_product_id.
-
#token ⇒ String
The current value of token.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#authorisation_code ⇒ String
Returns the current value of authorisation_code.
25 26 27 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 25 def @authorisation_code end |
#customer_bank_account ⇒ OnlinePayments::SDK::Domain::CustomerBankAccount
Returns the current value of customer_bank_account.
25 26 27 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 25 def customer_bank_account @customer_bank_account end |
#fraud_results ⇒ OnlinePayments::SDK::Domain::FraudResults
Returns the current value of fraud_results.
25 26 27 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 25 def fraud_results @fraud_results end |
#payment_option ⇒ String
Returns the current value of payment_option.
25 26 27 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 25 def payment_option @payment_option end |
#payment_product5001_specific_output ⇒ OnlinePayments::SDK::Domain::PaymentProduct5001SpecificOutput
Returns the current value of payment_product5001_specific_output.
25 26 27 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 25 def payment_product5001_specific_output @payment_product5001_specific_output end |
#payment_product5402_specific_output ⇒ OnlinePayments::SDK::Domain::PaymentProduct5402SpecificOutput
Returns the current value of payment_product5402_specific_output.
25 26 27 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 25 def payment_product5402_specific_output @payment_product5402_specific_output end |
#payment_product5500_specific_output ⇒ OnlinePayments::SDK::Domain::PaymentProduct5500SpecificOutput
Returns the current value of payment_product5500_specific_output.
25 26 27 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 25 def payment_product5500_specific_output @payment_product5500_specific_output end |
#payment_product840_specific_output ⇒ OnlinePayments::SDK::Domain::PaymentProduct840SpecificOutput
Returns the current value of payment_product840_specific_output.
25 26 27 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 25 def payment_product840_specific_output @payment_product840_specific_output end |
#payment_product_id ⇒ Integer
Returns the current value of payment_product_id.
25 26 27 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 25 def payment_product_id @payment_product_id end |
#token ⇒ String
Returns the current value of token.
25 26 27 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 25 def token @token end |
Instance Method Details
#from_hash(hash) ⇒ Object
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 78 79 80 81 82 83 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 53 def from_hash(hash) super @authorisation_code = hash['authorisationCode'] if hash.key? 'authorisationCode' if hash.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.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 @payment_option = hash['paymentOption'] if hash.key? 'paymentOption' if hash.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.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.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.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 @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId' @token = hash['token'] if hash.key? 'token' end |
#to_h ⇒ Hash
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb', line 38 def to_h hash = super hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil? hash['customerBankAccount'] = @customer_bank_account.to_h if @customer_bank_account hash['fraudResults'] = @fraud_results.to_h if @fraud_results hash['paymentOption'] = @payment_option unless @payment_option.nil? hash['paymentProduct5001SpecificOutput'] = @payment_product5001_specific_output.to_h if @payment_product5001_specific_output hash['paymentProduct5402SpecificOutput'] = @payment_product5402_specific_output.to_h if @payment_product5402_specific_output hash['paymentProduct5500SpecificOutput'] = @payment_product5500_specific_output.to_h if @payment_product5500_specific_output hash['paymentProduct840SpecificOutput'] = @payment_product840_specific_output.to_h if @payment_product840_specific_output hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil? hash['token'] = @token unless @token.nil? hash end |