zatca 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/zatca/tag.rb +1 -1
- data/lib/zatca/tags.rb +4 -0
- data/lib/zatca/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c3d50ea1cc7ced6ae04db6b019bbb93b89acd164c93ce6bf0f918e93d3300ca2
|
|
4
|
+
data.tar.gz: 29217d567f38527e15424d822c681e84c44de620f1212658f49fd7e9c9d28a46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b3c1935011617463f0adee23e3590eddf956be5df53dd6adcd56e1f0c0ba97135faabcb5c97baa93b0565e04dcd2ffde0136573751c12d390f531a5cdccc576
|
|
7
|
+
data.tar.gz: b1f4612a7c601565791d14d21bae937ef0c7728e3e2aeada65611b7db7a10d12261ebaf2f8b3c56ff6bb5f793173022ea3c26ae126732e3038d17fb27903ca69
|
data/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# zatca
|
|
2
2
|
 
|
|
3
3
|
|
|
4
|
-
[🚧 Still being validated by ZATCA](https://github.com/mrsool/zatca/issues/3).
|
|
5
|
-
|
|
6
4
|
A Ruby library for generating QR Codes for the e-invoice standard by ZATCA in Saudi Arabia.
|
|
7
5
|
|
|
6
|
+
✅ Validated to have the same output as [ZATCA's SDK](https://zatca.gov.sa/en/E-Invoicing/SystemsDevelopers/ComplianceEnablementToolbox/Pages/DownloadSDK.aspx) as of 12 November 2021.
|
|
7
|
+
|
|
8
8
|
# Installation
|
|
9
9
|
|
|
10
10
|
## Rubygems
|
data/lib/zatca/tag.rb
CHANGED
|
@@ -24,7 +24,7 @@ module ZATCA
|
|
|
24
24
|
# TLV should be concatenated together without any separator in the following
|
|
25
25
|
# format: character_value_of_id character_value_of_value_length value_itself
|
|
26
26
|
# All of this should be in 8-bit ASCII.
|
|
27
|
-
tlv = @id.chr + @value.
|
|
27
|
+
tlv = @id.chr + @value.bytesize.chr + value
|
|
28
28
|
|
|
29
29
|
# We need to use force_encoding because encode will raise errors when
|
|
30
30
|
# trying to encode a string with utf-8 characters.
|
data/lib/zatca/tags.rb
CHANGED
data/lib/zatca/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zatca
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Omar Bahareth
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-11-
|
|
11
|
+
date: 2021-11-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: zeitwerk
|