Class: VatInfo::Request
- Inherits:
-
Object
- Object
- VatInfo::Request
- Defined in:
- lib/vat_info/request.rb,
lib/vat_info/request/unreliable_payer.rb,
lib/vat_info/request/unreliable_payer_list.rb,
lib/vat_info/request/unreliable_payer_extended.rb
Direct Known Subclasses
UnreliablePayer, UnreliablePayerExtended, UnreliablePayerList
Defined Under Namespace
Classes: UnreliablePayer, UnreliablePayerExtended, UnreliablePayerList
Constant Summary collapse
- SOAP_ENV_SCHEMA =
'http://schemas.xmlsoap.org/soap/envelope/'.freeze
Instance Method Summary collapse
Instance Method Details
#envelope ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/vat_info/request.rb', line 10 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
19 20 21 22 23 24 25 |
# File 'lib/vat_info/request.rb', line 19 def to_xml msg = envelope.dup body = msg.at_xpath('//soapenv:Body') body.add_child(self.body.root) msg.to_xml end |