tipi-services
Version:
Node.js library to access wrapping REST API of tipi backend services
32 lines (24 loc) • 837 B
JavaScript
const Service = require('../../../Service')
const Endpoints = require('./Endpoints')
class XeroIntegrationsService extends Service {
constructor (baseUrl) {
super()
this.endpoints = Endpoints(baseUrl)
}
async authorizationUrl () {
return this.sendRequest({ endpoint: this.endpoints.authorizationUrl })
}
async contacts (query) {
return this.sendRequest({ endpoint: this.endpoints.contacts, query })
}
async taxRates (query) {
return this.sendRequest({ endpoint: this.endpoints.taxRates, query })
}
async accounts (query) {
return this.sendRequest({ endpoint: this.endpoints.accounts, query })
}
async brandingThemes (query) {
return this.sendRequest({ endpoint: this.endpoints.brandingThemes, query })
}
}
module.exports = XeroIntegrationsService