Class: ACube::Schema::Header::Header
- Inherits:
-
Object
- Object
- ACube::Schema::Header::Header
- Defined in:
- lib/acube/schema/header/header.rb
Instance Attribute Summary collapse
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#progressive ⇒ Object
Returns the value of attribute progressive.
-
#supplier ⇒ Object
Returns the value of attribute supplier.
-
#transmission_format ⇒ Object
Returns the value of attribute transmission_format.
Instance Method Summary collapse
-
#initialize(supplier, customer) ⇒ Header
constructor
A new instance of Header.
- #to_xml ⇒ Object
Constructor Details
#initialize(supplier, customer) ⇒ Header
Returns a new instance of Header.
9 10 11 12 |
# File 'lib/acube/schema/header/header.rb', line 9 def initialize(supplier, customer) @supplier = supplier @customer = customer end |
Instance Attribute Details
#customer ⇒ Object
Returns the value of attribute customer.
5 6 7 |
# File 'lib/acube/schema/header/header.rb', line 5 def customer @customer end |
#progressive ⇒ Object
Returns the value of attribute progressive.
7 8 9 |
# File 'lib/acube/schema/header/header.rb', line 7 def progressive @progressive end |
#supplier ⇒ Object
Returns the value of attribute supplier.
5 6 7 |
# File 'lib/acube/schema/header/header.rb', line 5 def supplier @supplier end |
#transmission_format ⇒ Object
Returns the value of attribute transmission_format.
6 7 8 |
# File 'lib/acube/schema/header/header.rb', line 6 def transmission_format @transmission_format end |
Instance Method Details
#to_xml ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/acube/schema/header/header.rb', line 14 def to_xml Nokogiri::XML::Builder.new do |xml| xml.FatturaElettronicaHeader { xml.DatiTrasmissione { xml.IdTrasmittente { xml.IdPaese ACube.transmission_nation_id xml.IdCodice ACube.transmission_id_code } xml.ProgressivoInvio progressive xml.FormatoTrasmissione transmission_format xml.CodiceDestinatario "0000000" } xml << supplier.to_xml xml << customer.to_xml } end.to_xml(save_with: 2) end |