# @acid-tango/arcus-js

> [![NPM version](https://img.shields.io/npm/v/@acid-tango/arcus-js.svg)](https://www.npmjs.com/package/@acid-tango/arcus-js) [![CI](https://github.com/acidtango/arcus-js/actions/workflows/main.yaml/badge.svg)](https://github.com/acidtango/arcus-js/actions/

Latest version **0.1.3** (published 2021-07-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @acid-tango/arcus-js
pnpm add @acid-tango/arcus-js
yarn add @acid-tango/arcus-js
bun add @acid-tango/arcus-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2021-07-29 |
| First published | 2021-05-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 2 |
| Unpacked size | 129.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | acid-tango |

## Links

- npm: https://www.npmjs.com/package/@acid-tango/arcus-js
- Repository: git@github.com:acidtango/arcus-js
- Homepage: https://github.com/acidtango/arcus-js#readme
- Issues: https://github.com/acidtango/arcus-js/issues
- npm.io page: https://npm.io/package/@acid-tango/arcus-js

## Dependencies (2)

- [node-fetch](https://npm.io/package/node-fetch.md) 2.6.1
- [regenerator-runtime](https://npm.io/package/regenerator-runtime.md) 0.13.9

## Recent versions

- 0.1.3 (latest) — 2021-07-29
- 0.1.2 — 2021-07-19
- 0.1.1 — 2021-07-12
- 0.1.0 — 2021-06-24
- 0.0.7 — 2021-06-11
- 0.0.6 — 2021-05-31

## README

# arcus-js

[![NPM version](https://img.shields.io/npm/v/@acid-tango/arcus-js.svg)](https://www.npmjs.com/package/@acid-tango/arcus-js)
[![CI](https://github.com/acidtango/arcus-js/actions/workflows/main.yaml/badge.svg)](https://github.com/acidtango/arcus-js/actions/workflows/main.yaml)

Arcus TypeScript client library for [Arcus API v3.x](https://docs.arcusfi.com/api/3.mx/endpoints/)

## Installation

```bash
npm install --save @acid-tango/arcus-js
# or
yarn add @acid-tango/arcus-js
```

## Usage

- [Authentication](#authentication)
- [Account](#account)
- [Billers](#billers)
- [Payment](#payment)
- [Transactions](#transactions)

### Authentication

```typescript
import { Arcus } from '@acid-tango/arcus-js';

const arcusClient = Arcus.create(
    process.env.ARCUS_API_KEY as string,
    process.env.ARCUS_SECRET_KEY as string,
  );
```

### Get account info

Returns all the info about your account.

```typescript
const account = await arcusClient.getAccount()
```

### Billers methods

Return all billers:

```typescript
const allBillers = await arcusClient.getBillers()
```

Return billers by type:

```typescript
const utilities = await arcusClient.getBillersUtilities()
const topUps = await arcusClient.getBillersTopUps()
const giftCards = await arcusClient.getBillersGiftCards()
```

### Payment

```typescript
// Creates a single payment and returns the created transaction
const singlePayParams: ArcusSinglePayParams = {...}

const transaction = await arcusClient.singlePay(singlePayParams)
```

### Transactions

Get a transaction by id:

```typescript
const transaction = await arcusClient.getTransaction(transactionId)
```

Cancel a transaction by id:

```typescript
await arcusClient.cancelTransaction(transactionId)
```
### How to do a release

1. Update the changelog
    ```
    yarn release
    ```
2. Delete the tag created by the release script
3. Create a PR
4. Merge to main with `rebase and merge` button to avoid merge commit.
5. Create a tag starting with "v". example `v0.0.6`
6. Push the tag
7. Create a release
8. Wait for ci to automatically publish.

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'feat: Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## 📲 Contact

The project was mainly developed by [Abel García](mailto:abelgarcia@acidtango.com), [Aarón Pérez](mailto:aaron@acidtango.com), [Daniel Ramos](mailto:danielramos@acidtango.com) and [Daniel Gak](mailto:danielgak@acidtango.com) from [Acid Tango](https://acidtango.com/) with ❤️ and 💪 for [Rabbit](https://www.rabbitmx.com/).

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/@acid-tango/arcus-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
