Class: XmlLaborabrechnungsdaten::MwstGruppe
- Inherits:
-
Object
- Object
- XmlLaborabrechnungsdaten::MwstGruppe
- Includes:
- MemberContainer
- Defined in:
- lib/xml_laborabrechnungsdaten/mwst_gruppe.rb
Instance Attribute Summary collapse
-
#mehrwertsteuerbetrag ⇒ String
VAT amount.
-
#mehrwertsteuersatz ⇒ String
VAT rate.
-
#positionen ⇒ Array<Position>
List of positions in this VAT group.
-
#zwischensumme_netto ⇒ String
Net subtotal amount.
Instance Method Summary collapse
-
#add_position(position) ⇒ Array<Position>
Adds a position to the VAT group.
-
#to_xml(xml) ⇒ void
Generates XML representation of the VAT group.
Methods included from MemberContainer
#[], #[]=, included, #initialize, #members
Instance Attribute Details
#mehrwertsteuerbetrag ⇒ String
Returns VAT amount.
15 |
# File 'lib/xml_laborabrechnungsdaten/mwst_gruppe.rb', line 15 member :mehrwertsteuerbetrag, type: String |
#mehrwertsteuersatz ⇒ String
Returns VAT rate.
11 |
# File 'lib/xml_laborabrechnungsdaten/mwst_gruppe.rb', line 11 member :mehrwertsteuersatz, type: String |
#positionen ⇒ Array<Position>
Returns List of positions in this VAT group.
19 |
# File 'lib/xml_laborabrechnungsdaten/mwst_gruppe.rb', line 19 member :positionen, type: Array, default: [] |
#zwischensumme_netto ⇒ String
Returns Net subtotal amount.
7 |
# File 'lib/xml_laborabrechnungsdaten/mwst_gruppe.rb', line 7 member :zwischensumme_netto, type: String |
Instance Method Details
#add_position(position) ⇒ Array<Position>
Adds a position to the VAT group
24 25 26 27 |
# File 'lib/xml_laborabrechnungsdaten/mwst_gruppe.rb', line 24 def add_position(position) positionen << position positionen end |
#to_xml(xml) ⇒ void
This method returns an undefined value.
Generates XML representation of the VAT group
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/xml_laborabrechnungsdaten/mwst_gruppe.rb', line 32 def to_xml(xml) attributes = { Zwischensumme_netto: zwischensumme_netto, Mehrwertsteuersatz: mehrwertsteuersatz, Mehrwertsteuerbetrag: mehrwertsteuerbetrag }.compact # Removes nil values xml.tag!(:"MWST-Gruppe", attributes) do # Add all positions as child elements positionen.each do |position| position.to_xml(xml) end end end |