0.4.0 • Published 3 years ago

fatturazione-elettronica-aruba v0.4.0

Weekly downloads
93
License
MIT
Repository
github
Last release
3 years ago

fatturazione-elettronica-aruba

License: MIT Release npm version Coverage Status PRs Welcome FOSSA Status Known Vulnerabilities semantic-release

Node.js client to integrate the Aruba API for electronic invoicing ("Fatturazione Elettronica") within your project.

Roadmap

  • Complete support for Notifications
  • Implement MonitorCheck API
  • Add any new feature introduces by Aruba last minute

Links

Requirements

This module calls the Aruba Fatturazione Elettronica API, therefore you need a valid set of credentials with their service in order to use this module.

Install

npm install fatturazione-elettronica-aruba

How to use

const ArubaClient = require('fatturazione-elettronica-aruba');

const arubaClient = new ArubaClient();

await arubaClient.signIn({
  username: 'YOUR_ARUBA_USERNAME',
  password: 'YOUR_ARUBA_PASSWORD'
});

await arubaClient.uploadInvoice({ dataFile: 'BASE64_ENCODED_XML' });

Examples

See the examples page for additional use cases and demos.

API

Table of Contents

ArubaClient

ArubaClient constructor

Parameters

  • options Object?
    • options.env string? Aruba environment (demo or prod)

Returns Object Returns an instance of ArubaClient

signIn

Calls Aruba to generate a JWT that will be used for future calls

Parameters

Returns Promise Resolves to an boolean if successful, or an object containing the error message

refreshToken

Calls Aruba to refresh the JWT

Returns Promise Resolves to an boolean if successful, or an object containing the error message

searchInvoice

Search an invoice by username, filename, or id

Parameters
  • data (optional, default {})

Returns Promise Resolves to an boolean if successful, or an object containing the error message

getInvoiceNotifications

Get the invoice notifications

Parameters
  • data (optional, default {})

Returns Promise Resolves to an boolean if successful, or an object containing the error message

uploadInvoice

Calls Aruba to upload an invoice

Parameters
  • data Object (optional, default {})
    • data.dataFile string base64 encoded XML
    • data.signed boolean leave false if you are not sure (optional, default false)
    • data.credential string? signature creds (leave false if you are not sure)
    • data.domain string? signature domain (leave false if you are not sure)

Returns Promise Resolves with the uploadFileName if successfull

Disclaimer

This is a community driven open-source module.

License

node-fattura-elettronica-aruba is MIT licensed.

FOSSA Status

Support on Beerpay

Hey dude! Help me out for a couple of :beers:!

Beerpay Beerpay

0.4.0

3 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.20

4 years ago

0.0.19

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.5

5 years ago

0.0.3

5 years ago