From b61487503776b9a2805aee7b5bc8e9ee73dc626b Mon Sep 17 00:00:00 2001 From: SoeunSona <78331453+SoeunSona@users.noreply.github.com> Date: Wed, 20 Dec 2023 19:59:32 +0100 Subject: [PATCH] Fix incorrect method name --- lib/chartmogul/customer.js | 6 +++--- test/chartmogul/customer.js | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) 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'); });