1.0.14 • Published 1 year ago

@flowpay/flowpay-js v1.0.14

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year 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

1 year ago

1.0.13

1 year ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.12

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago