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 = 'mard2p API'; super(options); } postCreate(options = {}) { return this.makeRequest(`${this.host}/accounts/create`, { ...options, method: 'POST', }); } putUpdateByAccountid(accountid, options = {}) { return this.makeRequest(`${this.host}/accounts/update/${accountid}`, { ...options, method: 'PUT', }); } deleteDeleteByAccountid(accountid, options = {}) { return this.makeRequest(`${this.host}/accounts/delete/${accountid}`, { ...options, method: 'DELETE', }); } getByAccountid(accountid, options = {}) { return this.makeRequest(`${this.host}/accounts/${accountid}`, options); } getList(options = {}) { return this.makeRequest(`${this.host}/accounts/list`, options); } }