Class: ZATCA::UBL::CommonAggregateComponents::Party

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/zatca/ubl/common_aggregate_components/party.rb

Constant Summary

Constants inherited from BaseComponent

BaseComponent::ArrayOfBaseComponentOrNil

Instance Attribute Summary

Attributes inherited from BaseComponent

#attributes, #index, #value

Instance Method Summary collapse

Methods inherited from BaseComponent

#[], build, #build_xml, #dig, #find_nested_element_by_path, #generate_xml, #schema, #to_h, #to_xml

Constructor Details

#initialize(party_identification:, postal_address:, party_tax_scheme:, party_legal_entity:) ⇒ Party

Has: PartyIdentification PostalAddress PartyTaxScheme PartyLegalEntity



7
8
9
10
11
12
13
14
# File 'lib/zatca/ubl/common_aggregate_components/party.rb', line 7

def initialize(party_identification:, postal_address:, party_tax_scheme:, party_legal_entity:)
  super()

  @party_identification = party_identification
  @postal_address = postal_address
  @party_tax_scheme = party_tax_scheme
  @party_legal_entity = party_legal_entity
end

Instance Method Details

#elementsObject



20
21
22
23
24
25
26
27
# File 'lib/zatca/ubl/common_aggregate_components/party.rb', line 20

def elements
  [
    @party_identification,
    @postal_address,
    @party_tax_scheme,
    @party_legal_entity
  ]
end

#nameObject



16
17
18
# File 'lib/zatca/ubl/common_aggregate_components/party.rb', line 16

def name
  "cac:Party"
end