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
- Host: GitHub
- URL: https://github.com/codex-team/codex-accounting-sdk
- Owner: codex-team
- License: mit
- Created: 2020-09-03T17:18:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-17T14:25:49.000Z (7 months ago)
- Last Synced: 2024-11-17T15:29:29.387Z (7 months ago)
- Language: TypeScript
- Size: 77.1 KB
- Stars: 1
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```