Exception: PensioAPI::Errors::GatewayError
- Inherits:
-
StandardError
- Object
- StandardError
- PensioAPI::Errors::GatewayError
- Includes:
- Mixins::HasTransactions
- Defined in:
- lib/pensio_api/errors/gateway_error.rb
Instance Attribute Summary collapse
-
#cardholder_message ⇒ Object
readonly
Returns the value of attribute cardholder_message.
-
#request_path ⇒ Object
readonly
Returns the value of attribute request_path.
-
#request_time ⇒ Object
readonly
Returns the value of attribute request_time.
Instance Method Summary collapse
-
#initialize(request) ⇒ GatewayError
constructor
A new instance of GatewayError.
Methods included from Mixins::HasTransactions
Constructor Details
#initialize(request) ⇒ GatewayError
Returns a new instance of GatewayError.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pensio_api/errors/gateway_error.rb', line 7 def initialize(request) super(request.body['MerchantErrorMessage']) @raw = request.body @request_time = Time.parse(request.headers['Date']) @request_path = request.headers['Path'] @cardholder_message = request.body['CardHolderErrorMessage'] map_transactions end |
Instance Attribute Details
#cardholder_message ⇒ Object (readonly)
Returns the value of attribute cardholder_message.
5 6 7 |
# File 'lib/pensio_api/errors/gateway_error.rb', line 5 def @cardholder_message end |
#request_path ⇒ Object (readonly)
Returns the value of attribute request_path.
5 6 7 |
# File 'lib/pensio_api/errors/gateway_error.rb', line 5 def request_path @request_path end |
#request_time ⇒ Object (readonly)
Returns the value of attribute request_time.
5 6 7 |
# File 'lib/pensio_api/errors/gateway_error.rb', line 5 def request_time @request_time end |