UNPKG

tipi-services

Version:

Node.js library to access wrapping REST API of tipi backend services

33 lines (24 loc) 929 B
const Service = require('../../../Service') const Endpoints = require('./Endpoints') class reservationKeyChainsService extends Service { constructor (baseUrl) { super() this.endpoints = Endpoints(baseUrl) } async generate (ownerId, data) { return this.sendRequest({ endpoint: this.endpoints.generate, body: data, params: { ownerId } }) } async details (ownerId) { return this.sendRequest({ endpoint: this.endpoints.details, params: { ownerId } }) } async remove (ownerId) { return this.sendRequest({ endpoint: this.endpoints.remove, params: { ownerId } }) } async disablePin (ownerId) { return this.sendRequest({ endpoint: this.endpoints.disablePin, params: { ownerId } }) } async enablePin (ownerId) { return this.sendRequest({ endpoint: this.endpoints.enablePin, params: { ownerId } }) } } module.exports = reservationKeyChainsService