Skip to content

Commit

Permalink
fix: orq origin & destination types are objects, not strings
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejak committed Mar 25, 2024
1 parent cb75914 commit 0eaf09f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/booking/OfferRequests/OfferRequestsTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ export interface OfferRequestSlice {
/**
* The city or airport the passengers want to travel to
*/
destination: Place | string
destination: Place

/**
* The city or airport the passengers want to depart from
*/
origin: Place | string
origin: Place

/**
* The type of the origin
Expand Down
28 changes: 26 additions & 2 deletions src/booking/PartialOfferRequests/mockPartialOfferRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,32 @@ import { CreateOfferRequest, OfferRequest } from '../../types'
export const mockCreatePartialOfferRequest: CreateOfferRequest = {
slices: [
{
origin: 'LHR',
destination: 'JFK',
origin: {
iata_code: 'LHR',
type: 'airport',
name: 'Heathrow Airport',
longitude: -0.458118,
latitude: 51.470311,
id: 'arp_lhr_gb',
icao_code: 'EGLL',
iata_country_code: 'GB',
iata_city_code: 'LON',
time_zone: 'Europe/London',
city_name: 'London',
},
destination: {
iata_code: 'JFK',
type: 'airport',
time_zone: 'America/New_York',
name: 'John F. Kennedy International Airport',
longitude: -73.778519,
latitude: 40.640556,
id: 'arp_jfk_us',
icao_code: 'KJFK',
iata_country_code: 'US',
iata_city_code: 'NYC',
city_name: 'New York',
},
departure_date: '2020-04-24',
},
],
Expand Down

0 comments on commit 0eaf09f

Please sign in to comment.