Class: VatInfo::Request
- Inherits:
-
Object
- Object
- VatInfo::Request
- Defined in:
- lib/vat_info/request.rb,
lib/vat_info/request/unreliable_payer.rb
Direct Known Subclasses
Defined Under Namespace
Classes: UnreliablePayer
Constant Summary collapse
- SOAP_ENV_SCHEMA =
'http://schemas.xmlsoap.org/soap/envelope/'.freeze
Instance Method Summary collapse
Instance Method Details
#envelope ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/vat_info/request.rb', line 8 def envelope Nokogiri::XML::Builder.new('encoding' => 'UTF-8') do |xml| xml['soapenv'].Envelope('xmlns:soapenv' => 'http://schemas.xmlsoap.org/soap/envelope/') do xml['soapenv'].Body do end end end.doc end |
#to_xml ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/vat_info/request.rb', line 17 def to_xml msg = envelope.dup body = msg.at_xpath('//soapenv:Body') body.add_child(self.body.root) msg.to_xml end |