tipi-services
Version:
Node.js library to access wrapping REST API of tipi backend services
25 lines (18 loc) • 606 B
JavaScript
const Service = require('../../../Service')
const Endpoints = require('./Endpoints')
class ReservationsService extends Service {
constructor (baseUrl) {
super()
this.endpoints = Endpoints(baseUrl)
}
async getCheckInStatus (query) {
return this.sendRequest({ endpoint: this.endpoints.checkInStatus, query })
}
async pull (data) {
return this.sendRequest({ endpoint: this.endpoints.pull, body: data })
}
async checkIn (data) {
return this.sendRequest({ endpoint: this.endpoints.checkIn, body: data })
}
}
module.exports = ReservationsService