Exception: XeroGateway::ApiException
- Inherits:
-
StandardError
- Object
- StandardError
- XeroGateway::ApiException
- Defined in:
- lib/xero_gateway/exceptions.rb
Instance Attribute Summary collapse
-
#request_xml ⇒ Object
readonly
Returns the value of attribute request_xml.
-
#response_xml ⇒ Object
readonly
Returns the value of attribute response_xml.
Instance Method Summary collapse
-
#initialize(type, message, request_xml, response_xml) ⇒ ApiException
constructor
A new instance of ApiException.
- #message ⇒ Object
Constructor Details
#initialize(type, message, request_xml, response_xml) ⇒ ApiException
Returns a new instance of ApiException.
8 9 10 11 12 13 |
# File 'lib/xero_gateway/exceptions.rb', line 8 def initialize(type, , request_xml, response_xml) @type = type @message = @request_xml = request_xml @response_xml = response_xml end |
Instance Attribute Details
#request_xml ⇒ Object (readonly)
Returns the value of attribute request_xml.
15 16 17 |
# File 'lib/xero_gateway/exceptions.rb', line 15 def request_xml @request_xml end |
#response_xml ⇒ Object (readonly)
Returns the value of attribute response_xml.
15 16 17 |
# File 'lib/xero_gateway/exceptions.rb', line 15 def response_xml @response_xml end |
Instance Method Details
#message ⇒ Object
17 18 19 |
# File 'lib/xero_gateway/exceptions.rb', line 17 def "#{@type}: #{@message} \n Generated by the following XML: \n #{@response_xml}" end |