Skip to content

Commit 35eae4d

Browse files
authored
Merge pull request #1091 from duffelhq/jo-estimated-commission
feat: expand types to have estimated commission
2 parents e1b57ef + d7cedaa commit 35eae4d

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/Stays/StaysTypes.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,16 @@ export interface StaysRate {
189189
*/
190190
loyalty_programme_required: boolean
191191

192+
/**
193+
* The estimated commission amount for this rate.
194+
*/
195+
estimated_commission_amount: string | null
196+
197+
/**
198+
* The currency of the estimated_commission_amount.
199+
*/
200+
estimated_commission_currency: string | null
201+
192202
/**
193203
* The source of the rate.
194204
* Useful in scenarios where a rate requires explicitly showing the source.
@@ -654,6 +664,16 @@ export interface StaysBooking {
654664
* Deprecated: Instructions to access the accommodation in the booking
655665
*/
656666
key_collection: StaysBookingKeyCollection | null
667+
668+
/**
669+
* The estimated commission amount for this rate.
670+
*/
671+
estimated_commission_amount: string | null
672+
673+
/**
674+
* The currency of the estimated_commission_amount.
675+
*/
676+
estimated_commission_currency: string | null
657677
}
658678

659679
// Age is not required for adult, but required for child

src/Stays/mocks.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ export const MOCK_ACCOMMODATION: StaysAccommodation = {
6363
supported_loyalty_programme: null,
6464
loyalty_programme_required: false,
6565
source: 'duffel_hotel_group',
66+
estimated_commission_amount: '10.00',
67+
estimated_commission_currency: 'GBP',
6668
},
6769
{
6870
total_currency: 'GBP',
@@ -94,6 +96,8 @@ export const MOCK_ACCOMMODATION: StaysAccommodation = {
9496
supported_loyalty_programme: 'duffel_hotel_group_rewards',
9597
loyalty_programme_required: true,
9698
source: 'duffel_hotel_group',
99+
estimated_commission_amount: '10.00',
100+
estimated_commission_currency: 'GBP',
97101
},
98102
],
99103
photos: [
@@ -230,6 +234,8 @@ export const MOCK_BOOKING: StaysBooking = {
230234
metadata: {
231235
checkout_reference: 'usr_0000AePJGl5G9ZYfmNllrs',
232236
},
237+
estimated_commission_amount: '10.00',
238+
estimated_commission_currency: 'GBP',
233239
}
234240

235241
export const MOCK_CREATE_BOOKING_PAYLOAD: StaysBookingPayload = {

0 commit comments

Comments
 (0)