Class: ZATCA::UBL::Signing::SignatureInformation

Inherits:
BaseComponent show all
Defined in:
lib/zatca/ubl/signing/signature_information.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(signature:) ⇒ SignatureInformation

Returns a new instance of SignatureInformation.



2
3
4
5
6
# File 'lib/zatca/ubl/signing/signature_information.rb', line 2

def initialize(signature:)
  super()

  @signature = signature
end

Instance Method Details

#elementsObject



12
13
14
15
16
17
18
# File 'lib/zatca/ubl/signing/signature_information.rb', line 12

def elements
  [
    ZATCA::UBL::BaseComponent.new(name: "cbc:ID", value: "urn:oasis:names:specification:ubl:signature:1"),
    ZATCA::UBL::BaseComponent.new(name: "sbc:ReferencedSignatureID", value: "urn:oasis:names:specification:ubl:signature:Invoice"),
    @signature
  ]
end

#nameObject



8
9
10
# File 'lib/zatca/ubl/signing/signature_information.rb', line 8

def name
  "sac:SignatureInformation"
end