-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from mrsool/feature/api_wrapper
- Loading branch information
Showing
227 changed files
with
116,066 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
ruby-version: ['3.1', '3.0', '2.7', '2.6', '2.5'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | ||
# change this to (see https://github.com/ruby/setup-ruby#versioning): | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
cache-version: 2 # changes cache key if you need to clear cache | ||
|
||
- name: Run tests | ||
run: bundle exec rspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,6 @@ | |
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
|
||
.byebug_history | ||
/*.pem | ||
.byebug_history | ||
Gemfile.lock |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
EXTVER=$(jq -r '.version' ${FATOORA_HOME}/global.json) | ||
|
||
CERTPASSWORD=$(jq -r '.certPassword' ${FATOORA_HOME}/global.json) | ||
|
||
|
||
java -Djdk.module.illegalAccess=deny -Djdk.sunec.disableNative=false -jar ${FATOORA_HOME}/zatca-einvoicing-sdk-${EXTVER}.jar --globalVersion $EXTVER -certpassword $CERTPASSWORD $1 $2 $3 $4 $5 $6 | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
@echo off | ||
|
||
SET VAR= | ||
FOR /F %%I IN ('jq .version %FATOORA_HOME%/global.json') DO set "VAR=%%I" | ||
|
||
SET CERT_PASS= | ||
FOR /F %%N IN ('jq .certPassword %FATOORA_HOME%/global.json') DO set "CERT_PASS=%%N" | ||
|
||
|
||
set "VAR=%VAR:~1,-1%" | ||
|
||
set "CERT_PASS=%CERT_PASS:~1,-1%" | ||
|
||
|
||
if exist "%FATOORA_HOME%/zatca-einvoicing-sdk-%VAR%.jar" call java -Djdk.module.illegalAccess=deny -Dfile.encoding=UTF-8 -jar %FATOORA_HOME%/zatca-einvoicing-sdk-%VAR%.jar --globalVersion %VAR% -certpassword %CERT_PASS% %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":"238-R3.2.7" , "certPassword": "123456789" } |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"xsdPath": "/zatca/Data/Schemas/xsds/UBL2.1/xsd/maindoc/UBL-Invoice-2.1.xsd", | ||
"enSchematron": "/zatca/Data/Rules/schematrons/CEN-EN16931-UBL.xsl", | ||
"zatcaSchematron": "/zatca/Data/Rules/schematrons/20210819_ZATCA_E-invoice_Validation_Rules.xsl", | ||
"certPath": "/zatca/Data/Certificates/cert.pem", | ||
"privateKeyPath": "/zatca/Data/Certificates/ec-secp256k1-priv-key.pem", | ||
"pihPath": "/zatca/Data/PIH/pih.txt", | ||
"certPassword": "123456789", | ||
"inputPath": "/zatca/Data/Input", | ||
"usagePathFile": "/zatca/Configuration/usage.txt" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"xsdPath": "../Data/Schemas/xsds/UBL2.1/xsd/maindoc/UBL-Invoice-2.1.xsd", | ||
"enSchematron": "../Data/Rules/schematrons/CEN-EN16931-UBL.xsl", | ||
"zatcaSchematron": "../Data/Rules/schematrons/20210819_ZATCA_E-invoice_Validation_Rules.xsl", | ||
"certPath": "../Data/Certificates/cert.pem", | ||
"privateKeyPath": "../Data/Certificates/ec-secp256k1-priv-key.pem", | ||
"pihPath": "../Data/PIH/pih.txt", | ||
"certPassword": "123456789", | ||
"inputPath": "../Data/Input", | ||
"usagePathFile": "../Configuration/usage.txt" | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[-csr]: flag used to generate csr and private key. | ||
[-pem]: flag used to generate csr and private key in pem format. | ||
[-privateKey <fileName>]: The name of the private key output file. | ||
[-generatedCsr <fileName>]: The name of the csr output file. | ||
[-csrConfig] <fileName> : The name of the csr configuration file. | ||
[-invoice] <filename> : The name of the invoice file. | ||
[-qr]: flag used to generate qr. | ||
[-sign]: flag used to sign invoice. | ||
[-signedInvoice <fileName>]: The name of the signed invoice output file. | ||
[-invoiceRequest]: flag used to generate invoice request. | ||
[-apiRequest <fileName>]: The name of the invoice json request output file | ||
[-generateHash]: flag used to generate new hash for the provided invoice. | ||
[-validate]: flag used to validate invoice. | ||
[-nonprod]: flag pointing to use the csr and private key on non production server. | ||
[-sim]: flag pointing to use the csr and private key on simulation server. | ||
[-help]: flag used to display this help menu and exit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
MIID6jCCA5CgAwIBAgITbwAAgbuRbo5tpQ+QjgABAACBuzAKBggqhkjOPQQDAjBjMRUwEwYKCZImiZPyLGQBGRYFbG9jYWwxEzARBgoJkiaJk/IsZAEZFgNnb3YxFzAVBgoJkiaJk/IsZAEZFgdleHRnYXp0MRwwGgYDVQQDExNUU1pFSU5WT0lDRS1TdWJDQS0xMB4XDTIyMTEwOTA4MDcyMloXDTI0MTEwODA4MDcyMlowTjELMAkGA1UEBhMCU0ExEzARBgNVBAoTCjM5OTk5OTk5OTkxDDAKBgNVBAsTA1RTVDEcMBoGA1UEAxMTVFNULTM5OTk5OTk5OTkwMDAwMzBWMBAGByqGSM49AgEGBSuBBAAKA0IABGGDDKDmhWAITDv7LXqLX2cmr6+qddUkpcLCvWs5rC2O29W/hS4ajAK4Qdnahym6MaijX75Cg3j4aao7ouYXJ9GjggI5MIICNTCBmgYDVR0RBIGSMIGPpIGMMIGJMTswOQYDVQQEDDIxLVRTVHwyLVRTVHwzLTlmMDkyMjM4LTFkOTctNDcxOC1iNDQxLWNiYzMwMTMyMWIwYTEfMB0GCgmSJomT8ixkAQEMDzM5OTk5OTk5OTkwMDAwMzENMAsGA1UEDAwEMTEwMDEMMAoGA1UEGgwDVFNUMQwwCgYDVQQPDANUU1QwHQYDVR0OBBYEFDuWYlOzWpFN3no1WtyNktQdrA8JMB8GA1UdIwQYMBaAFHZgjPsGoKxnVzWdz5qspyuZNbUvME4GA1UdHwRHMEUwQ6BBoD+GPWh0dHA6Ly90c3RjcmwuemF0Y2EuZ292LnNhL0NlcnRFbnJvbGwvVFNaRUlOVk9JQ0UtU3ViQ0EtMS5jcmwwga0GCCsGAQUFBwEBBIGgMIGdMG4GCCsGAQUFBzABhmJodHRwOi8vdHN0Y3JsLnphdGNhLmdvdi5zYS9DZXJ0RW5yb2xsL1RTWkVpbnZvaWNlU0NBMS5leHRnYXp0Lmdvdi5sb2NhbF9UU1pFSU5WT0lDRS1TdWJDQS0xKDEpLmNydDArBggrBgEFBQcwAYYfaHR0cDovL3RzdGNybC56YXRjYS5nb3Yuc2Evb2NzcDAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMDMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwIwCgYIKwYBBQUHAwMwCgYIKoZIzj0EAwIDSAAwRQIgeWUEjxXaW4s8XilH/abzbDJhHHjO3uLaD87YqioA89YCIQDNltfAU98b8FnTD7M8NYIk8cqi7OnPu7h85v5V1Bt3Hg== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
MHQCAQEEIDyLDaWIn/1/g3PGLrwupV4nTiiLKM59UEqUch1vDfhpoAcGBSuBBAAKoUQDQgAEYYMMoOaFYAhMO/steotfZyavr6p11SSlwsK9azmsLY7b1b+FLhqMArhB2dqHKboxqKNfvkKDePhpqjui5hcn0Q== |
9 changes: 9 additions & 0 deletions
9
einvoicing-sdk/Data/Input/csr-config-example-AR-VAT-Group.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
csr.common.name=TST-886431145-311111111101113 | ||
csr.serial.number=1-TST|2-TST|3-ed22f1d8-e6a2-1118-9b58-d9a8f11e445f | ||
csr.organization.identifier=311111111111113 | ||
csr.organization.unit.name=3111111111 | ||
csr.organization.name=ABCD المحدودة | ||
csr.country.name=SA | ||
csr.invoice.type=1111 | ||
csr.location.address=RRRD2929 | ||
csr.industry.business.category=الأنشطة العقارية |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
csr.common.name=TST-886431145-311111111101113 | ||
csr.serial.number=1-TST|2-TST|3-ed22f1d8-e6a2-1118-9b58-d9a8f11e445f | ||
csr.organization.identifier=311111111101113 | ||
csr.organization.unit.name=فرع الرياض | ||
csr.organization.name=ABCD المحدودة | ||
csr.country.name=SA | ||
csr.invoice.type=1111 | ||
csr.location.address=RRRD2929 | ||
csr.industry.business.category=الأنشطة العقارية |
9 changes: 9 additions & 0 deletions
9
einvoicing-sdk/Data/Input/csr-config-example-EN-VAT-group.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
csr.common.name=TST-886431145-311111111101113 | ||
csr.serial.number=1-TST|2-TST|3-ed22f1d8-e6a2-1118-9b58-d9a8f11e445f | ||
csr.organization.identifier=311111111111113 | ||
csr.organization.unit.name=3111111111 | ||
csr.organization.name=ABCD Limited | ||
csr.country.name=SA | ||
csr.invoice.type=1111 | ||
csr.location.address=RRRD2929 | ||
csr.industry.business.category=Real estate activities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
csr.common.name=TST-886431145-311111111101113 | ||
csr.serial.number=1-TST|2-TST|3-ed22f1d8-e6a2-1118-9b58-d9a8f11e445f | ||
csr.organization.identifier=311111111101113 | ||
csr.organization.unit.name=Riyadh Branch | ||
csr.organization.name=ABCD Limited | ||
csr.country.name=SA | ||
csr.invoice.type=1111 | ||
csr.location.address=RRRD2929 | ||
csr.industry.business.category=Real estate activities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
csr.common.name= | ||
csr.serial.number= | ||
csr.organization.identifier= | ||
csr.organization.unit.name= | ||
csr.organization.name= | ||
csr.country.name= | ||
csr.invoice.type= | ||
csr.location.address= | ||
csr.industry.business.category= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NWZlY2ViNjZmZmM4NmYzOGQ5NTI3ODZjNmQ2OTZjNzljMmRiYzIzOWRkNGU5MWI0NjcyOWQ3M2EyN2ZiNTdlOQ== |
Oops, something went wrong.