import Client from './client'; export default class Payments 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}/payments/create`, { ...options, method: 'POST', }); } putUpdateByPayid(payid, options = {}) { return this.makeRequest(`${this.host}/payments/update/${payid}`, { ...options, method: 'PUT', }); } deleteDeleteByPayid(payid, options = {}) { return this.makeRequest(`${this.host}/payments/delete/${payid}`, { ...options, method: 'DELETE', }); } getByPayid(payid, options = {}) { return this.makeRequest(`${this.host}/payments/${payid}`, options); } getByRefAccountid(refAccountid, options = {}) { return this.makeRequest(`${this.host}/payments/${refAccountid}`, options); } getList(options = {}) { return this.makeRequest(`${this.host}/payments/list`, options); } }