diff --git a/lib/chartmogul/customer.js b/lib/chartmogul/customer.js index d83a50c..d6ed157 100644 --- a/lib/chartmogul/customer.js +++ b/lib/chartmogul/customer.js @@ -31,12 +31,12 @@ class Customer extends Resource { static notes (config, customerId, params, callback) { const path = util.expandPath(CustomerNote.path, []); - return Resource.request(config, 'GET', path, { ...params, customerId }, callback); + return Resource.request(config, 'GET', path, { ...params, customer_uuid: customerId }, callback); } - static createrNote (config, customerId, params, callback) { + static createNote (config, customerId, params, callback) { const path = util.expandPath(CustomerNote.path, []); - return Resource.request(config, 'POST', path, { ...params, customerId }, callback); + return Resource.request(config, 'POST', path, { ...params, customer_uuid: customerId }, callback); } } diff --git a/test/chartmogul/customer.js b/test/chartmogul/customer.js index 8a015da..534e5ed 100644 --- a/test/chartmogul/customer.js +++ b/test/chartmogul/customer.js @@ -191,7 +191,6 @@ describe('Customer', () => { it('creates a new note from a customer', () => { const customerUuid = 'cus_00000000-0000-0000-0000-000000000000'; const postBody = { - customer_uuid: customerUuid, type: 'note', author_email: 'john@example.com', note: 'This is a note' @@ -209,7 +208,7 @@ describe('Customer', () => { type: 'note' }); - Customer.createrNote(config, customerUuid, postBody) + Customer.createNote(config, customerUuid, postBody) .then(res => { expect(res).to.have.property('uuid'); });