@everymundo/short-fare

0.12.0 • Public • Published

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
})

Readme

Keywords

none

Package Sidebar

Install

npm i @everymundo/short-fare

Weekly Downloads

0

Version

0.12.0

License

ISC

Unpacked Size

23 kB

Total Files

11

Last publish

Collaborators

  • volodymyrpetrov
  • a11y-dev
  • jsalvadorpp
  • lindolo25
  • double2-us
  • ceciliagalarza
  • carla-villegas
  • eblez
  • mjremedios1985
  • mtmorell88
  • a11y_automation2
  • ramses83
  • raydel
  • alex-orga
  • estebanpablo89
  • yartiles
  • jonmorazav
  • everymundo-admin
  • ballester
  • danielsan
  • halain
  • avivero93
  • anahiem
  • herlin
  • karinfdez
  • erlin
  • front10devs
  • hdelcastillo
  • dcuevacem
  • rodneyem
  • ortega.dc98
  • pedroleon917
  • kaylingw
  • lazjramos
  • daniuska-em