Skip to content

Commit

Permalink
Add acceptConditions to bookings API methods
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoAdamek committed Jul 2, 2024
1 parent b535931 commit 72eb9da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tigerbay",
"version": "1.0.0-beta.3",
"version": "1.0.0-beta.4",
"description": "API Client library for TigerBay",
"main": "lib/client.js",
"type": "commonjs",
Expand Down
2 changes: 1 addition & 1 deletion src/models/cache.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import qs from "qs";
import { APIGroup } from "./common";
import { AccommodationUnit, DeparturePricing, Flight, Inventory } from "./tours";
import { AccommodationUnit, Inventory } from "./tours";

export default class CacheApi extends APIGroup {
public async search(params: CacheSearchRequest): Promise<Departure[]> {
Expand Down
11 changes: 11 additions & 0 deletions src/models/reservations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,17 @@ export class Api extends APIGroup {
return (await this.axios.get<Array<Tasks.Task>>(`/sales/reservations/${id}/tasks`)).data
}

/**
* Accept terms and conditions for a booking.
*
* @param id Booking ID
* @returns
*/
public async acceptConditions(id: string): Promise<void> {
await this.axios.put(`/sales/reservations/${id}/conditions`, {action: 'accept'})
return
}

/**
* Confirm a reservation
*
Expand Down

0 comments on commit 72eb9da

Please sign in to comment.