CertificateManager class

The CertificateManager class is a singleton that manages the generation of key pairs, CSRs, and the issuance of compliance and production certificates.

This is a Phase-2 (FATOORA Integration) helper. Phase-1 merchants (see SimpleZatcaManager) do not need any of the methods on this class.

Properties

env ↔ ZatcaEnvironment
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkInvoiceCompliance({required ZatcaCertificate complianceCertificate, required String ublXml, required String invoiceHash, required String uuid, ZatcaEnvironment? environment}) → Future<Map<String, dynamic>>
Check an invoice against the ZATCA compliance endpoint and return the gateway's raw response.
generateCSR(String privateKeyPem, CSRConfigProps csrProps, String path) → Future<String>
Generates a CSR (Certificate Signing Request) using the provided private key and CSR configuration properties.
generateCSRInDeskTop(String privateKeyPem, CSRConfigProps csrProps, String path) → Future<String>
Generates a CSR (Certificate Signing Request) using the provided private key and CSR configuration properties.
generateKeyPair() → Map<String, dynamic>
Generates a key pair for the EGS unit.
issueComplianceCertificate(String csr, String otp, {ZatcaEnvironment? environment}) → Future<ZatcaCertificate>
Issues a compliance certificate using the provided CSR and OTP. Issues a compliance certificate using the provided CSR and OTP.
issueProductionCertificate(ZatcaCertificate certificate, {ZatcaEnvironment? environment}) → Future<ZatcaCertificate>
Issues a production certificate using the provided compliance certificate.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance ↔ CertificateManager
The single instance of the CertificateManager class.
getter/setter pair