Exception: GooglePayRuby::GooglePaymentDecryptionError
- Inherits:
-
StandardError
- Object
- StandardError
- GooglePayRuby::GooglePaymentDecryptionError
- Defined in:
- lib/google_pay_ruby/google_payment_decryption_error.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
- #full_message ⇒ Object
-
#initialize(message, errors = []) ⇒ GooglePaymentDecryptionError
constructor
A new instance of GooglePaymentDecryptionError.
Constructor Details
#initialize(message, errors = []) ⇒ GooglePaymentDecryptionError
Returns a new instance of GooglePaymentDecryptionError.
7 8 9 10 |
# File 'lib/google_pay_ruby/google_payment_decryption_error.rb', line 7 def initialize(, errors = []) @errors = errors super() end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
5 6 7 |
# File 'lib/google_pay_ruby/google_payment_decryption_error.rb', line 5 def errors @errors end |
Instance Method Details
#full_message ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/google_pay_ruby/google_payment_decryption_error.rb', line 12 def = [] if errors.any? << "\nDecryption attempts failed:" errors.each_with_index do |error, index| merchant_id = error.respond_to?(:merchant_identifier) ? error.merchant_identifier : "Unknown" << " [#{index + 1}] Merchant: #{merchant_id} - #{error.}" end end .join("\n") end |