Exception: KonoEppClient::Exceptions::ErrorResponse
- Inherits:
-
StandardError
- Object
- StandardError
- KonoEppClient::Exceptions::ErrorResponse
- Defined in:
- lib/kono_epp_client/exceptions/error_response.rb
Overview
:nodoc:
Direct Known Subclasses
AuthenticationPasswordExpired, DomainHasStatusCliTransProhibited, DomainHasStatusClientUpdateProhibited, LoginNeeded
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#reason_code ⇒ Object
Returns the value of attribute reason_code.
-
#response_code ⇒ Object
Returns the value of attribute response_code.
-
#response_xml ⇒ Object
Returns the value of attribute response_xml.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ErrorResponse
constructor
Generic EPP exception.
- #to_s ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ ErrorResponse
Generic EPP exception. Accepts a response code and a message
8 9 10 11 12 13 |
# File 'lib/kono_epp_client/exceptions/error_response.rb', line 8 def initialize(attributes = {}) @response_xml = attributes[:xml] @response_code = attributes[:response_code] @reason_code = attributes[:reason_code] = attributes[:message] end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
5 6 7 |
# File 'lib/kono_epp_client/exceptions/error_response.rb', line 5 def end |
#reason_code ⇒ Object
Returns the value of attribute reason_code.
5 6 7 |
# File 'lib/kono_epp_client/exceptions/error_response.rb', line 5 def reason_code @reason_code end |
#response_code ⇒ Object
Returns the value of attribute response_code.
5 6 7 |
# File 'lib/kono_epp_client/exceptions/error_response.rb', line 5 def response_code @response_code end |
#response_xml ⇒ Object
Returns the value of attribute response_xml.
5 6 7 |
# File 'lib/kono_epp_client/exceptions/error_response.rb', line 5 def response_xml @response_xml end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/kono_epp_client/exceptions/error_response.rb', line 15 def to_s "#{@message} (reason: #{@reason_code} code: #{@response_code})" end |