From 565ce203342dc5794823b6bbd3c6c901d64d3fcb Mon Sep 17 00:00:00 2001 From: Andreja Kogovsek Date: Mon, 24 Jul 2023 15:06:14 +0100 Subject: [PATCH] fix: add new payment_method to stays rate --- src/Stays/StaysTypes.ts | 5 +++++ src/Stays/mocks.ts | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/Stays/StaysTypes.ts b/src/Stays/StaysTypes.ts index 3dddb758..5d182f18 100644 --- a/src/Stays/StaysTypes.ts +++ b/src/Stays/StaysTypes.ts @@ -133,6 +133,11 @@ export interface StaysRate { * The currency of the total_amount, as an ISO 4217 currency code */ total_currency: string + + /** + * The method available for payment of this rate. A rate with the `balance` payment type will be paid for using your Duffel Balance, and a rate with the `card` payment type will be paid for with card details provided at time of booking. + */ + payment_method: 'balance' | 'card' } export interface StaysPhoto { diff --git a/src/Stays/mocks.ts b/src/Stays/mocks.ts index 041a0cc7..4fa44da5 100644 --- a/src/Stays/mocks.ts +++ b/src/Stays/mocks.ts @@ -46,6 +46,7 @@ export const MOCK_ACCOMMODATION: StaysAccommodation = { fee_amount: '40.00', cancellation_timeline: [], board_type: 'room_only', + payment_method: 'balance', }, { total_currency: 'GBP', @@ -73,6 +74,7 @@ export const MOCK_ACCOMMODATION: StaysAccommodation = { fee_amount: '40.00', cancellation_timeline: [], board_type: 'room_only', + payment_method: 'card', }, ], photos: [