diff --git a/dist/resources/notification.js b/dist/resources/notification.js index 7739dec..ddae1a7 100644 --- a/dist/resources/notification.js +++ b/dist/resources/notification.js @@ -22,6 +22,10 @@ var create = function create(opts, preferences) { return _api2.default.post(opts, '/preferences/notifications', preferences); }; +var createForApp = function createForApp(opts, appId, preferences) { + return _api2.default.post(opts, '/preferences/' + appId + '/notifications', preferences); +}; + var remove = function remove(opts, _id) { return _api2.default.remove(opts, '/preferences/notifications/' + _id); }; @@ -30,5 +34,6 @@ exports.default = { getOne: getOne, getAll: getAll, create: create, + createForApp: createForApp, remove: remove }; \ No newline at end of file diff --git a/test/refund.spec.js b/test/refund.spec.js index fdef148..d9b4086 100644 --- a/test/refund.spec.js +++ b/test/refund.spec.js @@ -23,7 +23,7 @@ describe('Moip Payment Refunds', () => { it('Should successfully create an order', (done) => { moip.order.create(orderModel) - .then(({body}) => { + .then(({ body }) => { orderId = body.id done() }) @@ -32,7 +32,7 @@ describe('Moip Payment Refunds', () => { it('Should successfully create a payment for an order', (done) => { moip.payment.create(orderId, paymentModel) - .then(({body}) => { + .then(({ body }) => { // Verify and add to schema body.should.have.property('id') paymentModel.id = body.id @@ -43,7 +43,7 @@ describe('Moip Payment Refunds', () => { it('Should successfully refund the payment', (done) => { moip.payment.refunds.create(paymentModel.id) - .then(({body}) => { + .then(({ body }) => { body.should.have.property('id') body.should.have.property('status') body.status.should.be.eql('COMPLETED') @@ -77,7 +77,7 @@ describe('Moip Order Refunds', () => { it('Should successfully create an order', (done) => { moip.order.create(orderModel) - .then(({body}) => { + .then(({ body }) => { orderId = body.id done() }) @@ -86,7 +86,7 @@ describe('Moip Order Refunds', () => { it('Should successfully create a payment for an order', (done) => { moip.payment.create(orderId, paymentModel) - .then(({body}) => { + .then(({ body }) => { // Verify and add to schema body.should.have.property('id') paymentModel.id = body.id @@ -97,19 +97,19 @@ describe('Moip Order Refunds', () => { it('Should successfully refund the order', (done) => { moip.order.refunds.create(orderId) - .then(({body}) => { + .then(({ body }) => { refundId = body.id body.should.have.property('id') body.should.have.property('status') body.status.should.be.eql('COMPLETED') done() - }) + }) .catch(done) }) it('Should successfully get the refund', (done) => { moip.refund.get(refundId) - .then(({body}) => { + .then(({ body }) => { body.should.have.property('id') done() })