0.12.0 • Published 3 months ago

@everymundo/short-fare v0.12.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

short-fare

Short fare document for the flow Mongo => Stitch => Kinesis => Lambda

Instalation

npm install @everymundo/short-fare

Usage

Airline Fares

const { ShortFareToMongo } = require('@everymundo/short-fare/ShortFareToMongo.class')

const doc = new ShortFareToMongo({
  airlineIataCode: 'XX',
  departureAirportIataCode: 'MIA',
  arrivalAirportIataCode: 'JFK',
  outboundDate: '2020-01-01',
  inboundDate: '2020-02-01',
  currencyCode: 'USD',
  journeyType: 'RT', //RT || OW
  fareClass: 'E', // E = ECONOMY / B = BUSINESS / F = FIRST
  flightType: 'I', // I = INTERNATIONAL / D = DOMESTIC
  siteEdition: ShortFareToMongo.formatSiteEdition('en-us'), // not required but enforces the format en_US
  totalPrice: 1234.34,
  createdAt: new Date(),
  updatedAt: new Date(), // optional
  isSoldOut: false, // defaults to false
  sourceId: undefined // optional. Field can be used to track the origin of the document
})

Bus fares

const { ShortFareToMongo } = require('@everymundo/short-fare/ShortFareToMongo.class')

const doc = new ShortFareBusToMongo({
  tenantCode: 'XX',
  departureBusStopId: '345678',
  arrivalBusStopId: '234567',
  departureCityGeoId: 567890,
  arrivalCityGeoId: 345678,
  departureCityName: 'Miami',
  arrivalCityName: 'Orlando',
  outboundDate: '2020-01-01',
  inboundDate: '2020-02-01',
  currencyCode: 'USD',
  journeyType: 'RT', //RT || OW
  fareClass: 'E', // E = ECONOMY / B = BUSINESS / F = FIRST
  flightType: 'I', // I = INTERNATIONAL / D = DOMESTIC
  siteEdition: ShortFareToMongo.formatSiteEdition('en-us'), // not required but enforces the format en_US
  totalPrice: 1234.34,
  createdAt: new Date(),
  updatedAt: new Date(), // optional
  isSoldOut: false, // defaults to false
  sourceId: undefined // optional. Field can be used to track the origin of the document
})
0.12.0

3 months ago

0.10.0

7 months ago

0.11.0

6 months ago

0.9.0

9 months ago

0.8.0

10 months ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago