Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StaysRate.source #869

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Stays/StaysTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ export interface StaysRate {
* The duffel_hotel_group_rewards value is an example programme for testing and integration purposes, and will only appear on Duffel Hotel Group test hotel rates.
*/
supported_loyalty_programme: StaysLoyaltyProgramme | null

/**
* The source of the rate.
* Useful in scenarios where a rate requires explicitly showing the source.
*/
source: 'bookingcom' | 'priceline' | 'travelport' | 'duffel_hotel_group'
}

export interface StaysRoomRate extends StaysRate {
Expand Down
2 changes: 2 additions & 0 deletions src/Stays/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const MOCK_ACCOMMODATION: StaysAccommodation = {
payment_method: 'balance',
quantity_available: 1,
supported_loyalty_programme: null,
source: 'duffel_hotel_group',
},
{
total_currency: 'GBP',
Expand Down Expand Up @@ -82,6 +83,7 @@ export const MOCK_ACCOMMODATION: StaysAccommodation = {
payment_method: 'card',
quantity_available: 1,
supported_loyalty_programme: 'duffel_hotel_group_rewards',
source: 'duffel_hotel_group',
},
],
photos: [
Expand Down