Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

Commit

Permalink
Added InvalidPurchaseOrderNumberError
Browse files Browse the repository at this point in the history
  • Loading branch information
Zenedith committed Nov 11, 2015
1 parent 0b958a7 commit 06239cc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
AlreadyExistsError: require('./lib/error/alreadyExistsError').AlreadyExistsError,
UnknownValidateError: require('./lib/error/unknownValidateError').UnknownValidateError,
InvalidPointOfSaleError: require('./lib/error/invalidPointOfSaleError').InvalidPointOfSaleError,
InvalidPurchaseOrderNumberError: require('./lib/error/invalidPurchaseOrderNumberError').InvalidPurchaseOrderNumberError,
InvalidDateError: require('./lib/error/invalidDateError').InvalidDateError,
InvalidAmountError: require('./lib/error/invalidAmountError').InvalidAmountError,
InvalidTaxRegistrationNumberError: require('./lib/error/invalidTaxRegistrationNumberError').InvalidTaxRegistrationNumberError
Expand Down
13 changes: 13 additions & 0 deletions lib/error/invalidPurchaseOrderNumberError.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var util = require('util');

var InvalidPurchaseOrderNumberError = function InvalidPurchaseOrderNumberError(message, userMessage, field) {
Error.call(this);
this.name = 'InvalidPurchaseOrderNumberError';
this.message = message;
this.userMessage = userMessage;
this.field = field;
};

util.inherits(InvalidPurchaseOrderNumberError, Error);

module.exports.InvalidPurchaseOrderNumberError = InvalidPurchaseOrderNumberError;
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "receipts-model",
"version": "0.5.5",
"version": "0.5.6",
"description": "Receipts model.",
"main": "./index.js",
"dependencies": {
Expand Down Expand Up @@ -42,6 +42,6 @@
"node": ">=0.10.0"
},
"readmeFilename": "README.md",
"_id": "[email protected].5",
"_from": "receipts-model@^0.5.5"
"_id": "[email protected].6",
"_from": "receipts-model@^0.5.6"
}
7 changes: 7 additions & 0 deletions test/indexTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ describe('index test', function () {
done();
});

it('should export InvalidPurchaseOrderNumberError', function (done) {

var InvalidPurchaseOrderNumberError = index.error.InvalidPurchaseOrderNumberError;
should.exist(InvalidPurchaseOrderNumberError);
done();
});

it('should export InvalidDateError', function (done) {

var InvalidDateError = index.error.InvalidDateError;
Expand Down

0 comments on commit 06239cc

Please sign in to comment.