import Client from './client'; export default class Accounts extends Client { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } options.serviceName = 'bml-gen-test-application'; super(options); } post(options = {}) { return this.makeRequest(`${this.host}/accounts`, { ...options, method: 'POST', }); } getById(id, options = {}) { return this.makeRequest(`${this.host}/accounts/${id}`, options); } getFooById(id, options = {}) { return this.makeRequest(`${this.host}/accounts/${id}/foo`, options); } get(options = {}) { return this.makeRequest(`${this.host}/accounts`, options); } deleteById(id, options = {}) { return this.makeRequest(`${this.host}/accounts/${id}`, { ...options, method: 'DELETE', }); } }