Skip to content

Commit

Permalink
change method name,
Browse files Browse the repository at this point in the history
bump
  • Loading branch information
officert committed Jun 15, 2017
1 parent df74aca commit 6cd7103
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ client.events.create({
### [Apply Decisions](https://siftscience.com/developers/docs/curl/decisions-api/apply-decisions)

```javascript
client.decisions.createByAccountIdAndUserId('accountId', 'userId', {
client.decisions.applyByAccountIdAndUserId('accountId', 'userId', {
decision_id : 'user_looks_ok_payment_abuse'
});
```
Expand Down
2 changes: 1 addition & 1 deletion lib/client/decisions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function getDecisionsApi(siftScienceClient) {
* @param {Object} [params]
* https://siftscience.com/developers/docs/curl/decisions-api/apply-decisions
*/
createByAccountIdAndUserId(accountId, userId, data = {}, params = {}) {
applyByAccountIdAndUserId(accountId, userId, data = {}, params = {}) {
if (!accountId) return Promise.reject(new Error('accountId is required'));
if (!userId) return Promise.reject(new Error('userId is required'));

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-siftscience",
"version": "0.0.14",
"version": "0.0.15",
"description": "Node HTTP client for Sift Science's API",
"main": "index.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ before(() => {
describe('lib', () => {
describe('client', () => {
describe('decisions', () => {
describe('createByAccountIdAndUserId', () => {
describe('applyByAccountIdAndUserId', () => {
afterEach(() => {
sandbox.restore();
});
Expand All @@ -32,7 +32,7 @@ describe('lib', () => {
let accountId = null;

it('should reject with an error', () => {
return siftScienceClient.decisions.createByAccountIdAndUserId(accountId)
return siftScienceClient.decisions.applyByAccountIdAndUserId(accountId)
.then(should.not.exist)
.catch(err => {
should.exist(err);
Expand All @@ -47,7 +47,7 @@ describe('lib', () => {
let userId = null;

it('should reject with an error', () => {
return siftScienceClient.decisions.createByAccountIdAndUserId(accountId, userId)
return siftScienceClient.decisions.applyByAccountIdAndUserId(accountId, userId)
.then(should.not.exist)
.catch(err => {
should.exist(err);
Expand All @@ -73,7 +73,7 @@ describe('lib', () => {
});

it('should call v3HttpClient.post()', () => {
return siftScienceClient.decisions.createByAccountIdAndUserId(accountId, userId, data)
return siftScienceClient.decisions.applyByAccountIdAndUserId(accountId, userId, data)
.then(result => {
should.exist(result);
result.should.deepEqual(response.data);
Expand Down Expand Up @@ -104,7 +104,7 @@ describe('lib', () => {
});

it('should call v3HttpClient.post()', () => {
return siftScienceClient.decisions.createByAccountIdAndUserId(accountId, userId, data, params)
return siftScienceClient.decisions.applyByAccountIdAndUserId(accountId, userId, data, params)
.then(result => {
should.exist(result);
result.should.deepEqual(response.data);
Expand Down

0 comments on commit 6cd7103

Please sign in to comment.