feat: (broken) implement route map and address autocomplete widgets with associated infrastructure testing scripts
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
const axios = require('axios');
|
||||
async function testRate() {
|
||||
const passages = [
|
||||
{ operatorId: '04', tollId: '178' },
|
||||
{ operatorId: '09', tollId: '079' }
|
||||
];
|
||||
const payload = {
|
||||
vehicleCategory: "2", paymentOption: 2,
|
||||
tollPassages: passages.map((p) => ({
|
||||
toll: { operatorId: p.operatorId, tollId: p.tollId }, passageDate: new Date().toISOString(),
|
||||
})),
|
||||
};
|
||||
try {
|
||||
const res = await axios.post('https://api-ulys.azure-api.net/tollstation/v1/rate', payload);
|
||||
console.log("Rate:");
|
||||
console.log(JSON.stringify(res.data, null, 2));
|
||||
} catch (e) {
|
||||
console.error(e.response ? e.response.data : e.message);
|
||||
}
|
||||
}
|
||||
testRate();
|
||||
Reference in New Issue
Block a user