Exception: DkPaymentGateway::APIError

Inherits:
Error
  • Object
show all
Defined in:
lib/dk_payment_gateway/errors.rb

Direct Known Subclasses

TransactionError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response_code: nil, response_message: nil, response_description: nil, response_detail: nil) ⇒ APIError

Returns a new instance of APIError.



23
24
25
26
27
28
29
30
# File 'lib/dk_payment_gateway/errors.rb', line 23

def initialize(message, response_code: nil, response_message: nil,
               response_description: nil, response_detail: nil)
  super(message)
  @response_code = response_code
  @response_message = response_message
  @response_description = response_description
  @response_detail = response_detail
end

Instance Attribute Details

#response_codeObject (readonly)

Returns the value of attribute response_code.



21
22
23
# File 'lib/dk_payment_gateway/errors.rb', line 21

def response_code
  @response_code
end

#response_descriptionObject (readonly)

Returns the value of attribute response_description.



21
22
23
# File 'lib/dk_payment_gateway/errors.rb', line 21

def response_description
  @response_description
end

#response_detailObject (readonly)

Returns the value of attribute response_detail.



21
22
23
# File 'lib/dk_payment_gateway/errors.rb', line 21

def response_detail
  @response_detail
end

#response_messageObject (readonly)

Returns the value of attribute response_message.



21
22
23
# File 'lib/dk_payment_gateway/errors.rb', line 21

def response_message
  @response_message
end