Skip to content

Commit fccf01a

Browse files
authored
Merge pull request #1079 from duffelhq/igorp1/tsp-494-update-order-header-and-itinerary-components-to-include-fare
fix: update broken fare condition types
2 parents 13ea849 + 4cd9e09 commit fccf01a

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

src/booking/AirlineInitiatedChanges/mockAirlineInitiatedChanges.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export const mockAirlineInitiatedChange: AirlineInitiatedChange = {
1111
penalty_amount: '100.00',
1212
allowed: true,
1313
},
14-
refund_before_departure: null,
1514
},
1615
destination_type: 'airport',
1716
origin_type: 'airport',
@@ -147,7 +146,6 @@ export const mockAirlineInitiatedChange: AirlineInitiatedChange = {
147146
penalty_amount: '100.00',
148147
allowed: true,
149148
},
150-
refund_before_departure: null,
151149
},
152150
destination_type: 'airport',
153151
origin_type: 'airport',

src/booking/Orders/OrdersTypes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import {
66
CabinClass,
77
DuffelPassengerGender,
88
DuffelPassengerTitle,
9-
PassengerType,
109
FlightsConditions,
1110
LoyaltyProgrammeAccount,
1211
OfferAvailableServiceBaggage,
1312
OfferAvailableServiceBaggageMetadata,
13+
OrderCancellation,
1414
PassengerIdentityDocumentType,
15+
PassengerType,
1516
PaymentType,
1617
Place,
1718
PlaceType,
18-
OrderCancellation,
1919
} from '../../types'
2020

2121
/**
@@ -347,7 +347,7 @@ export interface OrderSlice {
347347
* The conditions associated with this slice, describing the kinds of modifications you can make and any penalties that will apply to those modifications.
348348
* This condition is applied only to this slice and to all the passengers associated with this order - for information at the order level (e.g. "what happens if I want to change all the slices?") refer to the `conditions` at the top level. If a particular kind of modification is allowed, you may not always be able to take action through the Duffel API. In some cases, you may need to contact the Duffel support team or the airline directly.
349349
*/
350-
conditions: FlightsConditions
350+
conditions: Omit<FlightsConditions, 'refund_before_departure'>
351351
/**
352352
* The city or airport where this slice ends
353353
*/

src/booking/Orders/mockOrders.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ export const mockOrder: Order = {
209209
penalty_amount: '100.00',
210210
allowed: true,
211211
},
212-
refund_before_departure: null,
213212
},
214213
},
215214
],
@@ -423,7 +422,6 @@ export const mockOnHoldOrders: Order[] = [
423422
},
424423
conditions: {
425424
change_before_departure: null,
426-
refund_before_departure: null,
427425
},
428426
},
429427
],
@@ -604,7 +602,6 @@ export const mockOnHoldOrders: Order[] = [
604602
},
605603
conditions: {
606604
change_before_departure: null,
607-
refund_before_departure: null,
608605
},
609606
},
610607
],

src/types/shared.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ export type FlightsConditionAllowed = {
7878
*
7979
* @example "GBP"
8080
*/
81-
penalty_currency: string
81+
penalty_currency: string | null
8282
/**
8383
* If the modification is `allowed` then this is the amount payable to apply the modification to all passengers.
8484
* If there is no penalty, the value will be zero. If the modification isn't `allowed` or the penalty is not known then this field will be `null`.
8585
* If this is `null` then the `penalty_currency` will also be null.
8686
*
8787
* @example "100.00"
8888
*/
89-
penalty_amount: string
89+
penalty_amount: string | null
9090
/**
9191
* Whether this kind of modification is allowed post-booking
9292
*

0 commit comments

Comments
 (0)