1.1.0 • Published 8 months ago

laboral-kutxa v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

laboral-kutxa.js

Tests Coverage Status Documentation npm version

Unofficial Laboral Kutxa JS library

Install

npm install laboral-kutxa

Usage

Reading through the misProductos list:

import { login, getMyProducts } from "laboral-kutxa";

const main = async () => {
  const { USERNAME, PASSWORD } = process.env;
  const { token } = await login(USERNAME, PASSWORD);
  const products = await getMyProducts(token);
  products.misProductos.map(({ alias, grupo }) => ({ alias, grupo }));
};

Output:

[
  { alias: "CUENTA 0,0", grupo: "cuentasCorrientes" },
  { alias: "VISA ELECTRÓN", grupo: "tarjetas" },
  { alias: "PRESTAMO", grupo: "prestamos" },
];

Accessing the aggregated amounts per account types:

const products = await getMyProducts(token);
const { _CuentasCorrientes: currentAccount, _Financiacion: financing } =
  products._Importes;
console.log({ currentAccount, financing });

Output:

{
  currentAccount: { cantidad: 1234.56, moneda: 'EUR' },
  financing: { cantidad: 123456.78, moneda: 'EUR' }
}
1.1.0

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago