Exception: RoyalMailApi::SoapError
- Defined in:
- lib/royal_mail_api/error.rb
Constant Summary collapse
- SOAP_FAULT_DESCRIPTIONS =
{ "env:VersionMismatch" => "Found an invalid namespace for the SOAP Envelope element.", "env:MustUnderstand" => "An immediate child element of the Header element, with the mustUnderstand attribute set to '1', was not understood.", "env:Client" => "The message was incorrectly formed or contained incorrect information.", "env:Server" => "There was a problem with the server, so the message could not proceed." }
Instance Attribute Summary collapse
-
#faultcode ⇒ Object
Returns the value of attribute faultcode.
-
#faultstring ⇒ Object
Returns the value of attribute faultstring.
-
#parser ⇒ Object
Returns the value of attribute parser.
-
#xml ⇒ Object
Returns the value of attribute xml.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(args) ⇒ SoapError
constructor
A new instance of SoapError.
Constructor Details
#initialize(args) ⇒ SoapError
Returns a new instance of SoapError.
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/royal_mail_api/error.rb', line 33 def initialize(args) super @xml = args[:xml] @code = args[:error_code] @parser = RoyalMailApi::XmlParser.new set_faultcode set_faultstring set_description end |
Instance Attribute Details
#faultcode ⇒ Object
Returns the value of attribute faultcode.
21 22 23 |
# File 'lib/royal_mail_api/error.rb', line 21 def faultcode @faultcode end |
#faultstring ⇒ Object
Returns the value of attribute faultstring.
21 22 23 |
# File 'lib/royal_mail_api/error.rb', line 21 def faultstring @faultstring end |
#parser ⇒ Object
Returns the value of attribute parser.
21 22 23 |
# File 'lib/royal_mail_api/error.rb', line 21 def parser @parser end |
#xml ⇒ Object
Returns the value of attribute xml.
21 22 23 |
# File 'lib/royal_mail_api/error.rb', line 21 def xml @xml end |