diff --git a/README.md b/README.md index 5663b17..146d447 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ As of version 0.1.4 the module implements the fallowing API calls: * `setItemQuantity(customerCode, itemCode, amount, callback)` * `addCustomCharge(customerCode, chargeCode, quantity, amount, description, callback)` * `deleteCustomCharge(customerCode, chargeId, callback)` +* `oneTimeInvoice(customerCode, {data}, callback)` All callbacks are called with `error` and `results` parameters. diff --git a/lib/cheddargetter.js b/lib/cheddargetter.js index 1ca2be1..366cee8 100644 --- a/lib/cheddargetter.js +++ b/lib/cheddargetter.js @@ -156,3 +156,8 @@ cheddargetter.prototype.deleteCustomCharge = function (customerCode, chargeId, c chargeId = {chargeId: chargeId}; this.callAPI(amount, "/customers/delete-charge/productCode/" + this.productCode + "/code/" + customerCode, callback); }; + +cheddargetter.prototype.oneTimeInvoice = function (customerCode, data, callback) { + this.callAPI(data, "/invoices/new/productCode/" + this.productCode + "/code/" + customerCode, callback); +}; +