1.3.30 • Published 1 month ago

@vergelijkdirect/insurance-transmission-client v1.3.30

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
1 month ago

insurance-transmission-client

Usage:

import InsuranceTransmissionClient from './clients/insurance-transmission.client';
import LocalStorageAdapter from './adapters/local-storage.adapter';
 
const storage = new LocalStorageAdapter('insurances');

const client = new InsuranceTransmissionClient(storage);

let rate = client.save('moped', {
 'Premium':20,
 'CompanyName': 'Unigarant'
}).get('moped').first();

const summary = {
 "Name": "Test",
 "Initials": "B",
 "NameInfix": "string",
 "Gender": "M",
 "Birthdate": "2000-01-01",
 "Email": "test@hotmail.com",
 "ZipCode": "0000xx",
 "HouseNumber": 0,
 "HouseNumberAddition": "string",
 "IBAN": "NL43ABNA5239941823",
 "MobileNumber": "0XXXXXXXXX",
 "CustomerId": "string",
 "CustomerIdExtern": "string",
};

let url = rate.getPaymentUrl();
let companyName = rate.getCompanyName();
let request = client.getRequest(summary);

client.remove('moped');

console.log(rate, url, companyName, request);

Testing in browser

In some cases we need to test directly from browser as some package as fetch are different. Node has own fetch for example which used as polyfill. So we need to be able sometime to test not only from cli(node) environment but also from browser during development

To test in browser install browserify

npm i -g browserify

Build bundle

npm run browserify --arg=comparison

Open index.html (src/tests/browser) in browser, open console and call function makeItcCall Change code in comparison.webtest.js, change request if needed or create new one in directory (src/tests/browser/requests)

If you changed ITC run compile first

npm run compile and then run 

and then run

npm run browserify --arg=comparison

for testing specific test you need to run

npm run test -- api --testNamePattern="VehicleData"
1.3.30

1 month ago

1.3.29

1 month ago

1.3.27

2 months ago

1.3.26

4 months ago

1.3.25

5 months ago

1.3.24

6 months ago

1.3.23

6 months ago

1.3.22

6 months ago

1.3.21

7 months ago