Class: Xrechnung::Party

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MemberContainer

#[], #[]=, included

Constructor Details

#initialize(nested: true, **kwargs) ⇒ Party

Returns a new instance of Party.



35
36
37
38
# File 'lib/xrechnung/party.rb', line 35

def initialize(nested: true, **kwargs)
  super(**kwargs)
  self.nested = nested
end

Instance Attribute Details

#contactXrechnung::Contact

Returns:



31
# File 'lib/xrechnung/party.rb', line 31

member :contact, type: Xrechnung::Contact

#electronic_addressXrechnung::ElectronicAddress



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

member :electronic_address, type: Xrechnung::ElectronicAddress

#nameString

Returns:

  • (String)


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

member :name, type: String

#nestedObject

Returns the value of attribute nested.



33
34
35
# File 'lib/xrechnung/party.rb', line 33

def nested
  @nested
end

#party_identificationXrechnung::PartyIdentification



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

member :party_identification, type: Xrechnung::PartyIdentification


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

member :party_legal_entity, type: Xrechnung::PartyLegalEntity

#party_tax_schemeXrechnung::PartyTaxScheme



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

member :party_tax_scheme, type: Xrechnung::PartyTaxScheme

#postal_addressXrechnung::PostalAddress



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

member :postal_address, type: Xrechnung::PostalAddress

Instance Method Details

#to_xml(xml) ⇒ Object

noinspection RubyResolve



41
42
43
44
45
46
47
48
49
# File 'lib/xrechnung/party.rb', line 41

def to_xml(xml)
  if nested
    xml.cac :Party do
      party_body(xml)
    end
  else
    party_body(xml)
  end
end