Class: VatInfo::Request::UnreliablePayerExtended

Inherits:
VatInfo::Request show all
Defined in:
lib/vat_info/request/unreliable_payer_extended.rb

Constant Summary

Constants inherited from VatInfo::Request

SOAP_ENV_SCHEMA

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from VatInfo::Request

#envelope, #to_xml

Constructor Details

#initialize(*vat_ids) ⇒ UnreliablePayerExtended

Returns a new instance of UnreliablePayerExtended.



6
7
8
# File 'lib/vat_info/request/unreliable_payer_extended.rb', line 6

def initialize(*vat_ids)
  self.vat_ids = vat_ids
end

Instance Attribute Details

#vat_idsObject

Returns the value of attribute vat_ids.



4
5
6
# File 'lib/vat_info/request/unreliable_payer_extended.rb', line 4

def vat_ids
  @vat_ids
end

Instance Method Details

#bodyObject



10
11
12
13
14
15
16
# File 'lib/vat_info/request/unreliable_payer_extended.rb', line 10

def body
  Nokogiri::XML::Builder.new('encoding' => 'UTF-8') do |xml|
    xml.StatusNespolehlivyPlatceRozsirenyRequest(xmlns: 'http://adis.mfcr.cz/rozhraniCRPDPH/') do
      vat_ids.each { |vat_id| xml.dic(vat_id) }
    end
  end.doc
end