Skip to main content

Unofficial Python wrapper for the ZIMRA FDMS API by Tarmica Chiwara

Project description

this is my in house library for interacting with Zimra's FDMS system

Fiscal Device Gateway API Client

This repository provides a Python client for interacting with the Fiscal Device Gateway API provided by ZIMRA. The client can be used to manage various operations related to fiscal devices, such as registering a device, fetching configurations, issuing certificates, and handling fiscal day operations.

Table of Contents

Installation

To use this client, clone the repository and install the necessary dependencies:

git clone https://github.com/lordskyzw/zimra.git
cd zimra
pip install -r requirements.txt

Usage

You can use the Device class to interact with the Fiscal Device Gateway API. Below is an example of how to initialize the class and perform some operations.

Example

from zimra import Device

# Initialize the device in test mode
device = Device(test_mode=True)

# Get the configuration of the device
config_status = device.getConfig()
print(config_status)

# Open a fiscal day
fiscal_day_status = device.openDay(fiscalDayNo=102)
print(fiscal_day_status)

Class Methods

__init__(self, test_mode=False, *args)

Initializes the Device class.

  • test_mode: Boolean to specify whether to use the test environment or production environment.

register(self)

Registers the device.

verifyTaxpayerInformation(self)

Verifies the taxpayer information associated with the device.

getConfig(self)

Fetches the device configuration and updates the device attributes.

issueCertificate(self)

Issues a certificate for the device.

getStatus(self)

Gets the current status of the device.

openDay(self, fiscalDayNo, fiscalDayOpened=None)

Opens a fiscal day.

submitReceipt(self, receiptData)

Submits a receipt to the fiscal device gateway.

closeDay(self)

Closes the fiscal day.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zimra-0.0.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

zimra-0.0.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file zimra-0.0.2.tar.gz.

File metadata

  • Download URL: zimra-0.0.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for zimra-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ff2912ad756c8d0efbe409c62138ad3aad3e257af4750c203c59504bf9398700
MD5 90822b4d811b40b9afc620cf324135a8
BLAKE2b-256 3bd4963e5b83541b2e7d051325217c7d52e5a3efdec9d8155cedaafd95ce6195

See more details on using hashes here.

File details

Details for the file zimra-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: zimra-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for zimra-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b9cd209cb6993e1dd07b2a4256dac2c7e150b0c773139206aaa03a0aefd6dc2f
MD5 8e98afa45d50a39daec69a5100ddc2aa
BLAKE2b-256 2ecb9d0e7418ea5eecd22dc0fdcb20311bac35e5e3a967362bd7c50063004856

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page