Class: ZATCA::UBL::Signing::QualifyingProperties

Inherits:
BaseComponent show all
Defined in:
lib/zatca/ubl/signing/qualifying_properties.rb

Constant Summary

Constants inherited from BaseComponent

BaseComponent::ArrayOfBaseComponentOrNil

Instance Attribute Summary

Attributes inherited from BaseComponent

#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(signing_time:, cert_digest_value:, cert_issuer_name:, cert_serial_number:) ⇒ QualifyingProperties

Returns a new instance of QualifyingProperties.



2
3
4
5
6
7
8
9
# File 'lib/zatca/ubl/signing/qualifying_properties.rb', line 2

def initialize(signing_time:, cert_digest_value:, cert_issuer_name:, cert_serial_number:)
  super()

  @signing_time = signing_time
  @cert_digest_value = cert_digest_value
  @cert_issuer_name = cert_issuer_name
  @cert_serial_number = cert_serial_number
end

Instance Method Details

#attributesObject



15
16
17
18
19
20
# File 'lib/zatca/ubl/signing/qualifying_properties.rb', line 15

def attributes
  {
    "Target" => "signature",
    "xmlns:xades" => "http://uri.etsi.org/01903/v1.3.2#"
  }
end

#elementsObject



22
23
24
25
26
# File 'lib/zatca/ubl/signing/qualifying_properties.rb', line 22

def elements
  [
    ZATCA::UBL::Signing::SignedProperties.new(signing_time: @signing_time, cert_digest_value: @cert_digest_value, cert_issuer_name: @cert_issuer_name, cert_serial_number: @cert_serial_number)
  ]
end

#nameObject



11
12
13
# File 'lib/zatca/ubl/signing/qualifying_properties.rb', line 11

def name
  "xades:QualifyingProperties"
end