Class: MpApi::PaymentError

Inherits:
Object
  • Object
show all
Defined in:
lib/mp_api/payment_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json_response:) ⇒ PaymentError

Returns a new instance of PaymentError.



5
6
7
# File 'lib/mp_api/payment_error.rb', line 5

def initialize(json_response:)
  @json_response = json_response
end

Instance Attribute Details

#json_responseObject (readonly)

Returns the value of attribute json_response.



4
5
6
# File 'lib/mp_api/payment_error.rb', line 4

def json_response
  @json_response
end

Instance Method Details

#errorsObject



9
10
11
# File 'lib/mp_api/payment_error.rb', line 9

def errors
  rejected_payment_error || failed_payment_error
end