Skip to content

Commit

Permalink
Fix incorrect method name
Browse files Browse the repository at this point in the history
  • Loading branch information
SoeunSona committed Dec 20, 2023
1 parent 54ff216 commit b614875
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/chartmogul/customer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
3 changes: 1 addition & 2 deletions test/chartmogul/customer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '[email protected]',
note: 'This is a note'
Expand All @@ -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');
});
Expand Down

0 comments on commit b614875

Please sign in to comment.