1.0.14 • Published 2 months ago

@flowpay/flowpay-js v1.0.14

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Flowpay.js

Installation

Use npm to install the Flowpay.js module:

$ npm install --save @flowpay/flowpay-js

Usage

// JS:
const flowpay = require('@flowpay/flowpay-js');

// TS:
import { PartnerOffer, ProductType calculateInstallmentPlan } from '@flowpay/flowpay-js';

Calculate installment plan with specified product parameters given provided financing offer

// JS:
var offer = {
  id: '1',
  products: [
    {
      product: 'M3',
      minAmount: 100000,
      maxAmount: 200000,
      currency: 'CZK',
      ratePerc: 1,
      balloon: true,
      installmentCount: 3,
      prolongationEnabled: true,
      postponeEnabled: false,
      maxPostponeLength: 0,
      maxProlongationLength: 2,
      interestRateMultiplier: 1,
      postponeFeeMultiplier: 1,
      prolongationFeeMultiplier: 1,
    },
  ],
};

var plan = flowpay.calculateInstallmentPlan(
  offer,
  'M3',
  100000,
  new Date('2022-01-03'),
  0,
  false
);

console.log(plan);

// TS:
const offer: PartnerOffer = {
  id: '1',
  products: [
    {
      product: ProductType.M3,
      minAmount: 100000,
      maxAmount: 200000,
      currency: 'CZK',
      ratePerc: 1,
      balloon: true,
      installmentCount: 3,
      prolongationEnabled: true,
      postponeEnabled: false,
      maxPostponeLength: 0,
      maxProlongationLength: 2,
      interestRateMultiplier: 1,
      postponeFeeMultiplier: 1,
      prolongationFeeMultiplier: 1,
    },
  ],
};

const plan = calculateInstallmentPlan(
  offer,
  ProductType.M3,
  100000,
  new Date('2022-01-03'),
  0,
  false
);

console.log(plan);
1.0.14

2 months ago

1.0.13

4 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.11

9 months ago

1.0.10

9 months ago

1.0.12

7 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago