Skip to content

Commit

Permalink
Merge pull request #932 from duffelhq/STAYS-1786/metadata-on-read
Browse files Browse the repository at this point in the history
feat: add metadata to JS SDK for Stays.Bookings
  • Loading branch information
jekku authored Jul 4, 2024
2 parents 920405a + 9deab6a commit 2a1bbe6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@duffel/api",
"version": "2.12.1",
"version": "2.12.2",
"description": "Javascript client library for the Duffel API",
"main": "dist/index.js",
"module": "dist/index.es.js",
Expand Down
5 changes: 5 additions & 0 deletions src/Stays/StaysTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ export interface StaysBooking {
*/
rooms: number

/**
* Metadata pertaining to this booking, generated by the Duffel API.
*/
metadata: Record<string, string> | null

/**
* Deprecated: Instructions to access the accommodation in the booking
*/
Expand Down
3 changes: 3 additions & 0 deletions src/Stays/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ export const MOCK_BOOKING: StaysBooking = {
key_collection: {
instructions: 'Key is at the property. Collect from the lock box.',
},
metadata: {
checkout_reference: 'usr_0000AePJGl5G9ZYfmNllrs',
},
}

export const MOCK_CREATE_BOOKING_PAYLOAD: StaysBookingPayload = {
Expand Down

0 comments on commit 2a1bbe6

Please sign in to comment.