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