Class: Xrechnung::PostalAddress

Inherits:
Object
  • Object
show all
Includes:
MemberContainer
Defined in:
lib/xrechnung/postal_address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MemberContainer

#[], #[]=, included, #initialize

Instance Attribute Details

#additional_street_nameString



11
# File 'lib/xrechnung/postal_address.rb', line 11

member :additional_street_name, type: String

#city_nameString



15
# File 'lib/xrechnung/postal_address.rb', line 15

member :city_name, type: String

#country_idString



27
# File 'lib/xrechnung/postal_address.rb', line 27

member :country_id, type: String

#country_subentityString



23
# File 'lib/xrechnung/postal_address.rb', line 23

member :country_subentity, type: String

#postal_zoneString



19
# File 'lib/xrechnung/postal_address.rb', line 19

member :postal_zone, type: String

#street_nameString



7
# File 'lib/xrechnung/postal_address.rb', line 7

member :street_name, type: String

Instance Method Details

#to_xml(xml) ⇒ Object

noinspection RubyResolve



30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/xrechnung/postal_address.rb', line 30

def to_xml(xml)
  xml.cac :PostalAddress do
    xml.cbc :StreetName, street_name if street_name
    xml.cbc :AdditionalStreetName, additional_street_name if additional_street_name
    xml.cbc :CityName, city_name if city_name
    xml.cbc :PostalZone, postal_zone if postal_zone
    xml.cbc :CountrySubentity, country_subentity if country_subentity

    xml.cac :Country do
      xml.cbc :IdentificationCode, country_id
    end
  end
end