0.0.1 • Published 10 months ago

lyzi-node v0.0.1

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
10 months ago

Lyzi-node

Lyzi API wrapper

Install

npm install lyzi-node

Usage

import LyziClient from "lyzi-node";
import { GoodsType, RequestCurrency } from "lyzi-node/types/conversion-type";

const lyziClient = new LyziClient({bearerToken: "abcdef"});
const requestRes = await lyziClient.conversion.requestConversion({
  amount: 100,
  fromAsset: "EUR",
  goods: {
    goodsName: `Voucher`,
    goodsCategory: "Z000", // Others
    goodsType: GoodsType.Virtual,
  },
  toAsset: RequestCurrency.EUR,
  anonymous: true,
  merchantIdentifier: "aubduez"
});

API

LyziClient(authOption, baseUrl?)

authOption

Type: object

{
    bearerToken?: string;
    apiKey?: string;
    internalKey?: string;
    basicAuth?: {
        username: string;
        password: string;
    };
}

baseUrl

Type: string

The Lyzi API URL (default: https://api-dev.lyzi.fr/api/next)

0.0.1

10 months ago