vatapi
Version:
vatapi.com API Nodejs library.
22 lines (15 loc) • 721 B
text/coffeescript
BaseModel = require '../BaseModel'
class Invoice extends BaseModel
create: (body, fn = null) =>
"Invoice::create(#{body})"
"invoice", body, (err, data) -> fn err, data if fn
retrieve: (invoiceId, fn = null) =>
"Invoice::retrieve(#{invoiceId})"
"invoice/" + invoiceId, {}, (err, data) -> fn err, data if fn
update: (invoiceId, body, fn = null) =>
"Invoice::update(#{invoiceId}, #{body})"
"invoice/" + invoiceId, body, (err, data) -> fn err, data if fn
remove: (invoiceId, fn = null) =>
"Invoice::remove(#{invoiceId})"
"invoice/" + invoiceId, (err, data) -> fn err, data if fn
module.exports = (client) -> new Invoice client