Class: ZATCA::UBL::Signing::SignedProperties
Constant Summary
BaseComponent::ArrayOfBaseComponentOrNil
Instance Attribute Summary
#index, #value
Instance Method Summary
collapse
#[], 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:) ⇒ SignedProperties
Returns a new instance of SignedProperties.
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/zatca/ubl/signing/signed_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
#attributes ⇒ Object
20
21
22
23
24
|
# File 'lib/zatca/ubl/signing/signed_properties.rb', line 20
def attributes
{
"Id" => "xadesSignedProperties"
}
end
|
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/zatca/ubl/signing/signed_properties.rb', line 26
def elements
[
ZATCA::UBL::Signing::SignedSignatureProperties.new(
signing_time: @signing_time,
cert_digest_value: @cert_digest_value,
cert_issuer_name: @cert_issuer_name,
cert_serial_number: @cert_serial_number
)
]
end
|
#generate_hash ⇒ Object
37
38
39
|
# File 'lib/zatca/ubl/signing/signed_properties.rb', line 37
def generate_hash
ZATCA::Hashing.generate_hashes(zatca_whitespaced_xml_for_hashing)[:hexdigest_base64]
end
|
16
17
18
|
# File 'lib/zatca/ubl/signing/signed_properties.rb', line 16
def name
"xades:SignedProperties"
end
|