An open API service indexing awesome lists of open source software.

https://github.com/codex-team/codex-accounting-sdk

Simple SDK for communicating with CodeX Accounting
https://github.com/codex-team/codex-accounting-sdk

Last synced: 5 months ago
JSON representation

Simple SDK for communicating with CodeX Accounting

Awesome Lists containing this project

README

        

# CodeX Accounting SDK
This module simplifies communicating with CodeX Accounting API.

## Module initialization

1. Import module to project
```ts
import Accounting from 'codex-accounting-sdk';
```

2. Create accounting object with accounting URL in parameter
```ts
const accounting = new Accounting({
baseURL: '127.0.0.1:25565',
});
```

3. Use Accounting SDK in your project
```ts
accounting.createAccount({
name: 'Workspace',
type: AccountType.LIABILITY,
currency: Currency.USD,
});
```

## Using with TLS verification

Create accounting object with settings like this:

```ts
const accounting = new Accounting({
baseURL: '127.0.0.1:25565',
tlsVerify: {
tlsCaCertPath: '/usr/src/app/src/accounting/tls/ca.pem',
tlsCertPath: '/usr/src/app/src/accounting/tls/client.pem',
tlsKeyPath: '/usr/src/app/src/accounting/tls/client-key.pem',
},
});
```

You need to assign path values to `tlsCaCertPath`, `tlsCertPath` and `tlsKeyPath` in `tlsVerify` object.

## Build library

To build the library, run the following command:

```shell script
yarn build
```