Class: ZATCA::UBL::CommonAggregateComponents::PartyLegalEntity

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

Constant Summary

Constants inherited from BaseComponent

BaseComponent::ArrayOfBaseComponentOrNil

Instance Attribute Summary collapse

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(registration_name:) ⇒ PartyLegalEntity

Returns a new instance of PartyLegalEntity.



4
5
6
7
8
# File 'lib/zatca/ubl/common_aggregate_components/party_legal_entity.rb', line 4

def initialize(registration_name:)
  super()

  @registration_name = registration_name
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



2
3
4
# File 'lib/zatca/ubl/common_aggregate_components/party_legal_entity.rb', line 2

def id
  @id
end

#scheme_idObject (readonly)

Returns the value of attribute scheme_id.



2
3
4
# File 'lib/zatca/ubl/common_aggregate_components/party_legal_entity.rb', line 2

def scheme_id
  @scheme_id
end

Instance Method Details

#elementsObject



14
15
16
17
18
# File 'lib/zatca/ubl/common_aggregate_components/party_legal_entity.rb', line 14

def elements
  [
    ZATCA::UBL::BaseComponent.build(name: "cbc:RegistrationName", value: @registration_name)
  ]
end

#nameObject



10
11
12
# File 'lib/zatca/ubl/common_aggregate_components/party_legal_entity.rb', line 10

def name
  "cac:PartyLegalEntity"
end